From 187805a0af78135aea27ebd7a36e795ecd6c1902 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Sat, 25 Nov 2023 19:36:52 +0200 Subject: [PATCH] refactoring --- pom.xml | 2 +- .../java/org/etsi/osl/mano/MANOClient.java | 16 ++++----- .../org/etsi/osl/mano/MANOController.java | 36 +++++++++---------- .../org/etsi/osl/mano/MANORouteBuilder.java | 20 +++++------ .../mano/NSCreateInstanceRequestPayload.java | 2 +- .../NSInstantiateInstanceRequestPayload.java | 6 ++-- 6 files changed, 41 insertions(+), 41 deletions(-) diff --git a/pom.xml b/pom.xml index 4009888..623dca0 100644 --- a/pom.xml +++ b/pom.xml @@ -141,7 +141,7 @@ org.etsi.osl - org.etsi.osl.model + org.etsi.osl.model.nfv ${project.version} diff --git a/src/main/java/org/etsi/osl/mano/MANOClient.java b/src/main/java/org/etsi/osl/mano/MANOClient.java index cf30357..3581ab7 100644 --- a/src/main/java/org/etsi/osl/mano/MANOClient.java +++ b/src/main/java/org/etsi/osl/mano/MANOClient.java @@ -44,14 +44,14 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.hibernate5.jakarta.Hibernate5JakartaModule; -import org.etsi.osl.model.DeploymentDescriptor; -import org.etsi.osl.model.ExperimentMetadata; -import org.etsi.osl.model.ExperimentOnBoardDescriptor; -import org.etsi.osl.model.Infrastructure; -import org.etsi.osl.model.MANOprovider; -import org.etsi.osl.model.PortalUser; -import org.etsi.osl.model.VxFMetadata; -import org.etsi.osl.model.VxFOnBoardedDescriptor; +import org.etsi.osl.model.nfv.DeploymentDescriptor; +import org.etsi.osl.model.nfv.ExperimentMetadata; +import org.etsi.osl.model.nfv.ExperimentOnBoardDescriptor; +import org.etsi.osl.model.nfv.Infrastructure; +import org.etsi.osl.model.nfv.MANOprovider; +import org.etsi.osl.model.nfv.PortalUser; +import org.etsi.osl.model.nfv.VxFMetadata; +import org.etsi.osl.model.nfv.VxFOnBoardedDescriptor; import org.etsi.osl.tmf.am642.model.AffectedService; import org.etsi.osl.tmf.am642.model.AlarmCreate; import org.etsi.osl.tmf.am642.model.AlarmStateType; diff --git a/src/main/java/org/etsi/osl/mano/MANOController.java b/src/main/java/org/etsi/osl/mano/MANOController.java index b1ba5c1..11a1d74 100644 --- a/src/main/java/org/etsi/osl/mano/MANOController.java +++ b/src/main/java/org/etsi/osl/mano/MANOController.java @@ -48,24 +48,24 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.jayway.jsonpath.JsonPath; -import org.etsi.osl.model.CompositeExperimentOnBoardDescriptor; -import org.etsi.osl.model.CompositeVxFOnBoardDescriptor; -import org.etsi.osl.model.ConstituentVxF; -import org.etsi.osl.model.DeploymentDescriptor; -import org.etsi.osl.model.DeploymentDescriptorStatus; -import org.etsi.osl.model.DeploymentDescriptorVxFInstanceInfo; -import org.etsi.osl.model.ExperimentMetadata; -import org.etsi.osl.model.ExperimentOnBoardDescriptor; -import org.etsi.osl.model.Infrastructure; -import org.etsi.osl.model.InfrastructureStatus; -import org.etsi.osl.model.MANOprovider; -import org.etsi.osl.model.OnBoardingStatus; -import org.etsi.osl.model.PackagingFormat; -import org.etsi.osl.model.ScaleDescriptor; -import org.etsi.osl.model.VFImage; -import org.etsi.osl.model.ValidationStatus; -import org.etsi.osl.model.VxFMetadata; -import org.etsi.osl.model.VxFOnBoardedDescriptor; +import org.etsi.osl.model.nfv.CompositeExperimentOnBoardDescriptor; +import org.etsi.osl.model.nfv.CompositeVxFOnBoardDescriptor; +import org.etsi.osl.model.nfv.ConstituentVxF; +import org.etsi.osl.model.nfv.DeploymentDescriptor; +import org.etsi.osl.model.nfv.DeploymentDescriptorStatus; +import org.etsi.osl.model.nfv.DeploymentDescriptorVxFInstanceInfo; +import org.etsi.osl.model.nfv.ExperimentMetadata; +import org.etsi.osl.model.nfv.ExperimentOnBoardDescriptor; +import org.etsi.osl.model.nfv.Infrastructure; +import org.etsi.osl.model.nfv.InfrastructureStatus; +import org.etsi.osl.model.nfv.MANOprovider; +import org.etsi.osl.model.nfv.OnBoardingStatus; +import org.etsi.osl.model.nfv.PackagingFormat; +import org.etsi.osl.model.nfv.ScaleDescriptor; +import org.etsi.osl.model.nfv.VFImage; +import org.etsi.osl.model.nfv.ValidationStatus; +import org.etsi.osl.model.nfv.VxFMetadata; +import org.etsi.osl.model.nfv.VxFOnBoardedDescriptor; import org.etsi.osl.sol005nbi.OSMClient; import org.etsi.osl.sol005nbi.ΑNSActionRequestPayload; import jakarta.transaction.Transactional; diff --git a/src/main/java/org/etsi/osl/mano/MANORouteBuilder.java b/src/main/java/org/etsi/osl/mano/MANORouteBuilder.java index e902b9f..7189166 100644 --- a/src/main/java/org/etsi/osl/mano/MANORouteBuilder.java +++ b/src/main/java/org/etsi/osl/mano/MANORouteBuilder.java @@ -32,8 +32,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; -import org.etsi.osl.model.ScaleDescriptor; -import org.etsi.osl.model.VxFOnBoardedDescriptor; +import org.etsi.osl.model.nfv.ScaleDescriptor; +import org.etsi.osl.model.nfv.VxFOnBoardedDescriptor; /** * @author ctranoris @@ -154,25 +154,25 @@ public class MANORouteBuilder extends RouteBuilder{ from("activemq:topic:vxf.onboard") .log( "activemq:topic:vxf.onboard for ${body} !" ) - .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.VxFOnBoardedDescriptor.class, true) + .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.nfv.VxFOnBoardedDescriptor.class, true) .bean( aMANOController, "onBoardVxFToMANOProviderByOBD" ) .to("log:DEBUG?showBody=true&showHeaders=true"); from("activemq:topic:vxf.onboardbyfile") .log( "activemq:topic:vxf.onboardbyfile for ${body} !" ) - .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.VxFOnBoardedDescriptor.class, true) + .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.nfv.VxFOnBoardedDescriptor.class, true) .bean( aMANOController, "onBoardVxFToMANOProviderByFile" ) .to("log:DEBUG?showBody=true&showHeaders=true"); from("activemq:topic:vxf.onBoardByCompositeObj") .log( "activemq:topic:vxf.onBoardByCompositeObj for ${body} !" ) - .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.CompositeVxFOnBoardDescriptor.class, true) + .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.nfv.CompositeVxFOnBoardDescriptor.class, true) .bean( aMANOController, "onBoardVxFToMANOProviderByCompositeObj" ) .to("log:DEBUG?showBody=true&showHeaders=true"); from("activemq:topic:vxf.offboard") .log( "activemq:topic:vxf.offboard for ${body} !" ) - .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.VxFOnBoardedDescriptor.class, true) + .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.nfv.VxFOnBoardedDescriptor.class, true) .doTry() .bean( aMANOController, "offBoardVxFFromMANOProvider" ) //Replies with a ResponseInstance .marshal().json( JsonLibrary.Jackson, true) @@ -185,25 +185,25 @@ public class MANORouteBuilder extends RouteBuilder{ from("activemq:topic:nsd.onboardbyfile") .log( "activemq:topic:nsd.onboardbyfile for ${body} !" ) - .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.ExperimentOnBoardDescriptor.class, true) + .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.nfv.ExperimentOnBoardDescriptor.class, true) .bean( aMANOController, "onBoardNSDToMANOProviderByFile" ) .to("log:DEBUG?showBody=true&showHeaders=true"); from("activemq:topic:nsd.onBoardByCompositeObj") .log( "activemq:topic:nsd.onBoardByCompositeObj for ${body} !" ) - .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.CompositeExperimentOnBoardDescriptor.class, true) + .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.nfv.CompositeExperimentOnBoardDescriptor.class, true) .bean( aMANOController, "onBoardNSDToMANOProviderByCompositeObj" ) .to("log:DEBUG?showBody=true&showHeaders=true"); from("activemq:topic:nsd.onboard") .log( "activemq:topic:nsd.onboard for ${body} !" ) - .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.ExperimentOnBoardDescriptor.class, true) + .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.nfv.ExperimentOnBoardDescriptor.class, true) .bean( aMANOController, "onBoardNSDToMANOProvider" ) .to("log:DEBUG?showBody=true&showHeaders=true"); from("activemq:topic:nsd.offboard") .log( "activemq:topic:nsd.offboard for ${body} !" ) - .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.ExperimentOnBoardDescriptor.class, true) + .unmarshal().json( JsonLibrary.Jackson, org.etsi.osl.model.nfv.ExperimentOnBoardDescriptor.class, true) .doTry() .bean( aMANOController, "offBoardNSDFromMANOProvider" ) //Replies with a ResponseInstance .marshal().json( JsonLibrary.Jackson, true) diff --git a/src/main/java/org/etsi/osl/mano/NSCreateInstanceRequestPayload.java b/src/main/java/org/etsi/osl/mano/NSCreateInstanceRequestPayload.java index 3331042..cad1a23 100644 --- a/src/main/java/org/etsi/osl/mano/NSCreateInstanceRequestPayload.java +++ b/src/main/java/org/etsi/osl/mano/NSCreateInstanceRequestPayload.java @@ -21,7 +21,7 @@ package org.etsi.osl.mano; -import org.etsi.osl.model.DeploymentDescriptor; +import org.etsi.osl.model.nfv.DeploymentDescriptor; /** * @author ctranoris diff --git a/src/main/java/org/etsi/osl/mano/NSInstantiateInstanceRequestPayload.java b/src/main/java/org/etsi/osl/mano/NSInstantiateInstanceRequestPayload.java index 7140dd3..5879089 100644 --- a/src/main/java/org/etsi/osl/mano/NSInstantiateInstanceRequestPayload.java +++ b/src/main/java/org/etsi/osl/mano/NSInstantiateInstanceRequestPayload.java @@ -30,9 +30,9 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.etsi.osl.model.DeploymentDescriptor; -import org.etsi.osl.model.DeploymentDescriptorVxFPlacement; -import org.etsi.osl.model.ExperimentOnBoardDescriptor; +import org.etsi.osl.model.nfv.DeploymentDescriptor; +import org.etsi.osl.model.nfv.DeploymentDescriptorVxFPlacement; +import org.etsi.osl.model.nfv.ExperimentOnBoardDescriptor; /** * @author ctranoris -- GitLab