Reintroduce SP 1.6 models in TPCE 24/77324/8
authorMartial COULIBALY <martial.coulibaly@gfi.fr>
Fri, 21 Sep 2018 14:45:23 +0000 (16:45 +0200)
committerMartial COULIBALY <martial.coulibaly@gfi.fr>
Mon, 12 Nov 2018 16:03:07 +0000 (17:03 +0100)
JIIRA:TRNSPRTPCE-44
Change-Id: Ib3cb5d7e7efe8998de446db4d011ed6a3912bc68
Signed-off-by: Martial COULIBALY <martial.coulibaly@gfi.fr>
48 files changed:
api/src/main/yang/service_path/transportpce-service-path@2017-10-17.yang
pce/src/main/java/org/opendaylight/transportpce/pce/PceCalculation.java
pce/src/main/java/org/opendaylight/transportpce/pce/PceComplianceCheck.java
pce/src/main/java/org/opendaylight/transportpce/pce/PceConstraints.java
pce/src/main/java/org/opendaylight/transportpce/pce/PceConstraintsCalc.java
pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java
pce/src/main/java/org/opendaylight/transportpce/pce/PceResult.java
pce/src/main/java/org/opendaylight/transportpce/pce/PceSendingPceRPCs.java
pce/src/main/java/org/opendaylight/transportpce/pce/impl/PceProvider.java
pce/src/main/java/org/opendaylight/transportpce/pce/impl/PceServiceRPCImpl.java
pce/src/main/java/org/opendaylight/transportpce/pce/service/PathComputationService.java
pce/src/main/java/org/opendaylight/transportpce/pce/service/PathComputationServiceImpl.java
pce/src/test/java/org/opendaylight/transportpce/pce/PceManyTests.java
pce/src/test/java/org/opendaylight/transportpce/pce/PceSingleTests.java
pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestData.java
pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestUtils.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/ModelMappingUtils.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/NetworkModelWavelengthService.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/NetworkModelWavelengthServiceImpl.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/RendererProvider.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperations.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/rpcs/TransportPCEServicePathRPCImpl.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/NetworkModelWaveLengthServiceFreeTest.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/NetworkModelWaveLengthServiceUseTest.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImplDeleteTest.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImplTest.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDataUtils.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDeleteDataUtils.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceImplementationDataUtils.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/MappingConstraints.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtils.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerProvider.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/PceListenerImpl.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/service/PCEServiceWrapper.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperations.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperationsImpl.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/MappingConstraintsTest.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtilsTest.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/impl/ServiceHandlerImplTest.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/listensers/PceListenserImplTest.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/service/PCEServiceWrapperTest.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperationsImplTest.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubRendererServiceOperations.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererCompliancyCheck.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererImpl.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/utils/ServiceDataUtils.java

index 373adfdabfbbec87070312cc543691e3c372901c..82a6a695f977253cba8bef081d0e78bb17f3360e 100644 (file)
@@ -7,6 +7,7 @@ module transportpce-servicepath {
   }
   import transportpce-common-service-path-types {
     prefix transportpce-common-service-path-types;
+    revision-date 2017-10-16; 
   }
 
   organization
index aede67294f734b894fc1ab38cc10e7c66ca9d958..74125e3356dd6456e9b43d39bf655cc9689264f2 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.common.ResponseCodes;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
index 86b34f2ec18d958e8ee7882e4ea4ffcc58569f34..65d6e0e5ea00f8cb5bc9daf5c931fb78c18b9c60 100755 (executable)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.transportpce.pce;
 
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 8c4af6bbc6bf2b8255d75b48c361865198df7397..d64674809993d50b48c4b061f08417404212bb56 100644 (file)
@@ -9,9 +9,7 @@ package org.opendaylight.transportpce.pce;
 
 import java.util.ArrayList;
 import java.util.List;
-
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.RoutingConstraintsSp;
-
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index cfe13a9e7288a5fce182a00f3ad400a5b6384ff6..97beb039fe04bca57663aff48eaf90f1037b4046 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.transportpce.pce;
 
 import com.google.common.base.Optional;
-
 import java.util.ArrayList;
 import java.util.List;
 //import java.util.Optional;
@@ -16,28 +15,26 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.stream.Collectors;
-
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.Timeouts;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.Node;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.node.NodeIdentifier;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.RoutingConstraintsSp.PceMetric;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.CoRoutingOrGeneral;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.CoRouting;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.General;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.general.Diversity;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.general.Exclude;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.general.Latency;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.path.PathDescription;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServicePathList;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePaths;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePathsKey;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.Node;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.CoRoutingOrGeneral;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.CoRouting;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.General;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.general.Diversity;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.general.Exclude;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.general.Latency;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePathsKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -186,33 +183,40 @@ public class PceConstraintsCalc {
                 return false;
             }
             return aToZ.getResource().getResource() instanceof Node;
-        }).filter(aToZ -> {
+        }).map(aToZ -> {
             Node node = (Node) aToZ.getResource().getResource();
-            if (node.getNodeIdentifier() == null) {
+            if (node.getNodeId() == null) {
                 LOG.warn("Node in AToZ node {} contains null! Skipping this node!", aToZ.getId());
-                return false;
+                return null;
             }
-            return true;
-        }).map(aToZ -> {
-            NodeIdentifier node = ((Node) aToZ.getResource().getResource()).getNodeIdentifier();
             return node.getNodeId().toString();
         }).collect(Collectors.toList());
     }
 
     private Optional<PathDescription> getPathDescriptionFromDatastore(String serviceName) {
-        InstanceIdentifier<PathDescription> pathDescriptionIID = InstanceIdentifier.create(ServicePathList.class)
-                .child(ServicePaths.class, new ServicePathsKey(serviceName)).child(PathDescription.class);
+        Optional<PathDescription> result = Optional.absent();
+        InstanceIdentifier<ServicePaths> pathDescriptionIID = InstanceIdentifier.create(ServicePathList.class)
+                .child(ServicePaths.class, new ServicePathsKey(serviceName));
         ReadOnlyTransaction pathDescReadTx = this.dataBroker.newReadOnlyTransaction();
         try {
             LOG.info("PCE diversity constraints: Getting path description for service {}", serviceName);
-            return pathDescReadTx.read(LogicalDatastoreType.CONFIGURATION, pathDescriptionIID)
-                    .get(Timeouts.DATASTORE_READ, TimeUnit.MILLISECONDS);
+            ServicePaths servicePaths = pathDescReadTx.read(LogicalDatastoreType.CONFIGURATION, pathDescriptionIID)
+                    .get(Timeouts.DATASTORE_READ, TimeUnit.MILLISECONDS).get();
+            if (servicePaths != null) {
+                PathDescription path = servicePaths.getPathDescription();
+                if (path != null) {
+                    result = Optional.of(path);
+                }
+            }
+//            return pathDescReadTx.read(LogicalDatastoreType.CONFIGURATION, pathDescriptionIID)
+//                    .get(Timeouts.DATASTORE_READ, TimeUnit.MILLISECONDS);
         } catch (InterruptedException | ExecutionException | TimeoutException e) {
             LOG.warn(
                 "PCE diversity constraints: Exception while getting path description from datastore {} for service {}!",
                 pathDescriptionIID,serviceName, e);
-            return Optional.absent();
+            return result;
         }
+        return result;
     }
 
     private void readCoRoutingContrains(CoRouting tmpcoRouting, PceConstraints constraints) {
index 6c31082170bb3f9a9f67113976edcc56b04d469d..a65a0773d346ec7ea655acfffdb0b572f59f5316 100644 (file)
@@ -12,23 +12,20 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import org.opendaylight.transportpce.common.ResponseCodes;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToA;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToABuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToAKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.Resource;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.ResourceBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.LinkBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.NodeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPoint;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPointBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.link.LinkIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.node.NodeIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.termination.point.TerminationPointIdentifierBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToA;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToABuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToAKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.Resource;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.ResourceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.LinkBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.NodeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPoint;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPointBuilder;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -96,8 +93,7 @@ public class PcePathDescription {
         String tpName = path.get(0).getClient();
         String xname = path.get(0).getSourceId().getValue();
         TerminationPoint stp = new TerminationPointBuilder()
-                .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder()
-                        .setNodeId(xname).setTpId(tpName).build())
+                .setTpId(tpName).setTpNodeId(xname)
                 .build();
 
         AToZKey clientKey = new AToZKey(index.toString());
@@ -112,9 +108,9 @@ public class PcePathDescription {
             String srcName = pcelink.getSourceId().getValue();
 
             // Nodes
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce
+            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce
                 .resource.resource.resource.Node sourceNode = new NodeBuilder()
-                .setNodeIdentifier(new NodeIdentifierBuilder().setNodeId(srcName).build())
+                .setNodeId(srcName)
                 .build();
 
             // Source Resource
@@ -127,8 +123,7 @@ public class PcePathDescription {
             // source TP
             tpName = pcelink.getSourceTP().toString();
             stp = new TerminationPointBuilder()
-                    .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder()
-                            .setNodeId(srcName).setTpId(tpName).build())
+                    .setTpNodeId(srcName).setTpId(tpName)
                     .build();
 
             // Resource
@@ -140,9 +135,9 @@ public class PcePathDescription {
 
             String linkName = pcelink.getLinkId().getValue();
             // Link
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce
+            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce
                 .resource.resource.resource.Link atozLink = new LinkBuilder()
-                .setLinkIdentifier(new LinkIdentifierBuilder().setLinkId(linkName).build())
+                .setLinkId(linkName)
                 .build();
 
             // Link Resource
@@ -156,8 +151,7 @@ public class PcePathDescription {
             // target TP
             tpName = pcelink.getDestTP().toString();
             TerminationPoint dtp = new TerminationPointBuilder()
-                    .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder()
-                            .setNodeId(destName).setTpId(tpName).build())
+                    .setTpNodeId(destName).setTpId(tpName)
                     .build();
 
             // Resource
@@ -167,9 +161,9 @@ public class PcePathDescription {
             index++;
             etoeList.add(ttpResource);
 
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce
+            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce
                 .resource.resource.resource.Node targetNode = new NodeBuilder()
-                .setNodeIdentifier(new NodeIdentifierBuilder().setNodeId(destName).build())
+                .setNodeId(destName)
                 .build();
 
             // Target Resource
@@ -186,8 +180,7 @@ public class PcePathDescription {
         tpName = lastLink.getClient();
         xname = lastLink.getDestId().getValue();
         stp = new TerminationPointBuilder()
-                .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder()
-                        .setNodeId(xname).setTpId(tpName).build())
+                .setTpNodeId(xname).setTpId(tpName)
                 .build();
 
 
@@ -209,8 +202,7 @@ public class PcePathDescription {
         String tpName = pcelink.getClient();
         String xname = pcelink.getSourceId().getValue();
         TerminationPoint stp = new TerminationPointBuilder()
-                .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder()
-                        .setNodeId(xname).setTpId(tpName).build())
+                .setTpNodeId(xname).setTpId(tpName)
                 .build();
 
         ZToAKey clientKey = new ZToAKey(index.toString());
@@ -228,10 +220,9 @@ public class PcePathDescription {
 
 
             // Nodes
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce
+            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce
                 .resource.resource.resource.Node sourceNode = new NodeBuilder()
-                .setNodeIdentifier(new NodeIdentifierBuilder().setNodeId(srcName).build()).build();
-
+                .setNodeId(srcName).build();
 
 
             // Source Resource
@@ -244,8 +235,7 @@ public class PcePathDescription {
             // source TP
             tpName = pcelink.getSourceTP().toString();
             stp = new TerminationPointBuilder()
-                    .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder()
-                            .setNodeId(srcName).setTpId(tpName).build())
+                    .setTpNodeId(srcName).setTpId(tpName)
                     .build();
 
             // Resource
@@ -257,9 +247,9 @@ public class PcePathDescription {
 
             String linkName = pcelink.getLinkId().getValue();
             // Link
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce
+            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce
                 .resource.resource.resource.Link ztoaLink = new LinkBuilder()
-                .setLinkIdentifier(new LinkIdentifierBuilder().setLinkId(linkName).build()).build();
+                .setLinkId(linkName).build();
 
             // Link Resource
             ZToAKey linkKey = new ZToAKey(index.toString());
@@ -272,9 +262,7 @@ public class PcePathDescription {
             // target TP
             tpName = pcelink.getDestTP().toString();
             TerminationPoint ttp = new TerminationPointBuilder()
-                    .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder()
-                            .setNodeId(destName).setTpId(tpName).build())
-                    .build();
+                    .setTpNodeId(destName).setTpId(tpName).build();
 
             // Resource
             ZToAKey destTPKey = new ZToAKey(index.toString());
@@ -284,9 +272,9 @@ public class PcePathDescription {
             etoelist.add(ttpResource);
 
 
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce
+            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce
                 .resource.resource.resource.Node targetNode = new NodeBuilder()
-                .setNodeIdentifier(new NodeIdentifierBuilder().setNodeId(destName).build()).build();
+                .setNodeId(destName).build();
             // Target Resource
             ZToAKey targetKey = new ZToAKey(index.toString());
             Resource nodeResource3 = new ResourceBuilder().setResource(targetNode).build();
@@ -300,9 +288,7 @@ public class PcePathDescription {
         tpName = lastLink.getClient();
         xname = lastLink.getDestId().getValue();
         stp = new TerminationPointBuilder()
-                .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder()
-                        .setNodeId(xname).setTpId(tpName).build())
-                .build();
+                .setTpNodeId(xname).setTpId(tpName).build();
 
 
         index++;
index 4ee19df5a984c8ffa5dfd772c09289da6a797440..c5563e5385e6a160f3a0389c065fdc399850a0d2 100644 (file)
@@ -9,8 +9,8 @@
 package org.opendaylight.transportpce.pce;
 
 import org.opendaylight.transportpce.common.ResponseCodes;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index a897b86f96d26df4f12d44a86e7421934a9b31d3..1eb5d3196e5ddac1a3e3986c0c57389564981e40 100644 (file)
@@ -10,11 +10,11 @@ package org.opendaylight.transportpce.pce;
 
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.transportpce.pce.PceResult.LocalCause;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.RoutingConstraintsSp.PceMetric;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.response.parameters.sp.response.parameters.PathDescriptionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.service.path.rpc.result.PathDescriptionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 043d647f3e7f5d234c723724146e64e33af2cc3a..c3d27b3a47cb092762368dafcea3d29e2f220f6f 100755 (executable)
@@ -10,7 +10,7 @@ package org.opendaylight.transportpce.pce.impl;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.transportpce.pce.service.PathComputationService;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.TransportpcePceService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.TransportpcePceService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index f078bdc4b27f6ae5283dbe201defc7d9d9167cfc..091ed56763590e617ed9821f03b90582cda1a547 100755 (executable)
@@ -9,16 +9,11 @@ package org.opendaylight.transportpce.pce.impl;
 
 import com.google.common.util.concurrent.ListenableFuture;
 import org.opendaylight.transportpce.pce.service.PathComputationService;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.TransportpcePceService;
-/*
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.service.path.rpc.result.PathDescriptionBuilder;
-///// check well PathDescriptionBuilder import
-//---------------------------------------------
-*/
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.TransportpcePceService;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
index d04c882f1a85d9e88acb87fa9a4dd478a9ad3fc0..88f372a40951c4411561e5f13376913c94fa966a 100644 (file)
@@ -7,10 +7,10 @@
  */
 package org.opendaylight.transportpce.pce.service;
 
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 
 /**
  * Path Computation Service.
index b7bc6b424fe7c82f85db2d35e54c073c7f61bb08..e93ea094ba9625ecfe8b0054dcdfa34f2a75a2f7 100644 (file)
@@ -12,22 +12,22 @@ import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService
 import org.opendaylight.transportpce.pce.PceComplianceCheck;
 import org.opendaylight.transportpce.pce.PceComplianceCheckResult;
 import org.opendaylight.transportpce.pce.PceSendingPceRPCs;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.ServicePathRpcResult;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.ServicePathRpcResultBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.service.path.rpc.result.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.ServicePathRpcResult;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.ServicePathRpcResultBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.service.path.rpc.result.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.service.path.rpc.result.PathDescriptionBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.RpcStatusEx;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.ServicePathNotificationTypes;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.response.parameters.sp.ResponseParametersBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.response.parameters.sp.response.parameters.PathDescriptionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.RpcStatusEx;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.ServicePathNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.response.parameters.sp.ResponseParametersBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -131,6 +131,7 @@ public class PathComputationServiceImpl implements PathComputationService {
         PathDescriptionBuilder path = null;
         path = sendingPCE.getPathDescription();
 
+
         LOG.info("PCE response: {} {}", message, responseCode);
         if ((sendingPCE.getSuccess() == false) || (path == null)) {
             configurationResponseCommon
@@ -156,7 +157,7 @@ public class PathComputationServiceImpl implements PathComputationService {
                 .setStatus(RpcStatusEx.Successful)
                 .setStatusMessage(message);
         PathDescription pathDescription = new org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce
-                .pce.rev170426.service.path.rpc.result.PathDescriptionBuilder()
+                .pce.rev171017.service.path.rpc.result.PathDescriptionBuilder()
                 .setAToZDirection(path.getAToZDirection())
                 .setZToADirection(path.getZToADirection())
                 .build();
@@ -170,9 +171,9 @@ public class PathComputationServiceImpl implements PathComputationService {
         }
 
         org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
-                .rev170426.response.parameters.sp.response.parameters.PathDescription pathDescription1
+                .rev171016.response.parameters.sp.response.parameters.PathDescription pathDescription1
                 = new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
-                .rev170426.response.parameters.sp.response.parameters.PathDescriptionBuilder()
+                .rev171016.response.parameters.sp.response.parameters.PathDescriptionBuilder()
                 .setAToZDirection(path.getAToZDirection())
                 .setZToADirection(path.getZToADirection())
                 .build();
@@ -184,14 +185,14 @@ public class PathComputationServiceImpl implements PathComputationService {
 
         //debug prints
         AToZDirection atoz = pathDescription.getAToZDirection();
-        if (atoz != null && atoz.getAToZ() != null) {
+        if ((atoz != null) && (atoz.getAToZ() != null)) {
             LOG.info("Impl AtoZ Notification: [{}] elements in description", atoz.getAToZ().size());
             for (int i = 0; i < atoz.getAToZ().size(); i++) {
                 LOG.info("Impl AtoZ Notification: [{}] {}", i, atoz.getAToZ().get(i));
             }
         }
         ZToADirection ztoa = pathDescription.getZToADirection();
-        if (ztoa != null && ztoa.getZToA() != null) {
+        if ((ztoa != null) && (ztoa.getZToA() != null)) {
             LOG.info("Impl ZtoA Notification: [{}] elements in description", ztoa.getZToA().size());
             for (int i = 0; i < ztoa.getZToA().size(); i++) {
                 LOG.info("Impl ZtoA Notification: [{}] {}", i, ztoa.getZToA().get(i));
index 5575e4722c87e67e396047bfc77a05b4240ae7a5..846210fa95e3d63bbfc9381189b7e982a7355222 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.transportpce.pce;
 
 import java.util.Arrays;
 import java.util.Collection;
-
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -23,8 +22,8 @@ import org.opendaylight.transportpce.pce.utils.PceTestUtils;
 import org.opendaylight.transportpce.renderer.NetworkModelWavelengthService;
 import org.opendaylight.transportpce.renderer.NetworkModelWavelengthServiceImpl;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -82,7 +81,7 @@ public class PceManyTests extends AbstractTest {
         PceTestUtils.checkConfigurationResponse(output, expectedOutput);
 
         if (ResponseCodes.RESPONSE_OK.equals(output.getConfigurationResponseCommon().getResponseCode())) {
-            networkModelWavelengthService.useWavelengths(output.getResponseParameters().getPathDescription());
+            //networkModelWavelengthService.useWavelengths(output.getResponseParameters().getPathDescription());
             PceTestUtils.checkCalculatedPath(output, expectedOutput);
         }
     }
index 010cb01fa499c0b2fe957fb1b644db165d2f4d68..bcf40e3860e3a36368196bbbe7f0db8e4a1f8932 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.transportpce.pce;
 
 import java.util.Arrays;
 import java.util.Collection;
-
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -24,8 +23,8 @@ import org.opendaylight.transportpce.pce.utils.PceTestUtils;
 import org.opendaylight.transportpce.renderer.NetworkModelWavelengthService;
 import org.opendaylight.transportpce.renderer.NetworkModelWavelengthServiceImpl;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index d4747a53f125d30f2e83175bd8f0feff1a116627..cb77148613817432f76d262567cd93ebbef24d95 100644 (file)
@@ -8,16 +8,15 @@
 package org.opendaylight.transportpce.pce.utils;
 
 import java.util.Arrays;
-
 import org.opendaylight.transportpce.common.ResponseCodes;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.path.computation.request.input.ServiceAEnd;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.path.computation.request.input.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.path.computation.request.input.ServiceZEnd;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.path.computation.request.input.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.path.computation.request.input.ServiceAEnd;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.path.computation.request.input.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.path.computation.request.input.ServiceZEnd;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.path.computation.request.input.ServiceZEndBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.ConnectionType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.ServiceFormat;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommon;
@@ -26,27 +25,27 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev1
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.service.port.PortBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceCreateInput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.RoutingConstraintsSp;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.GeneralBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.general.DiversityBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.general.ExcludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.diversity.existing.service.contraints.sp.ExistingServiceApplicability;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.diversity.existing.service.contraints.sp.ExistingServiceApplicabilityBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.HardConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.SoftConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.response.parameters.sp.ResponseParameters;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.response.parameters.sp.ResponseParametersBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.response.parameters.sp.response.parameters.PathDescription;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.response.parameters.sp.response.parameters.PathDescriptionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.handler.header.ServiceHandlerHeader;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.handler.header.ServiceHandlerHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.GeneralBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.general.DiversityBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.general.ExcludeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.diversity.existing.service.contraints.sp.ExistingServiceApplicability;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.diversity.existing.service.contraints.sp.ExistingServiceApplicabilityBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.SoftConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.response.parameters.sp.ResponseParameters;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.response.parameters.sp.ResponseParametersBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.response.parameters.sp.response.parameters.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.response.parameters.sp.response.parameters.PathDescriptionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.handler.header.ServiceHandlerHeader;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.handler.header.ServiceHandlerHeaderBuilder;
 
 public final class PceTestData {
 
@@ -126,7 +125,7 @@ public final class PceTestData {
         PathComputationRequestInput input = new PathComputationRequestInputBuilder()
             .setServiceName("service1")
             .setResourceReserve(true)
-            .setPceMetric(RoutingConstraintsSp.PceMetric.HopCount)
+            .setPceMetric(PceMetric.HopCount)
             .setLocallyProtectedLinks(true)
             .setServiceHandlerHeader(serviceHandlerHeader)
             .setServiceAEnd(serviceAEnd)
@@ -135,7 +134,7 @@ public final class PceTestData {
             .setCustomerCode(Arrays.asList("Some customer-code"))
             .setCoRoutingOrGeneral(new CoRoutingBuilder()
             .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                 .rev170426.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
+                 .rev171017.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
             .setExistingService(Arrays.asList("Some existing-service"))
             .build())
             .build())
@@ -144,7 +143,7 @@ public final class PceTestData {
             .setCustomerCode(Arrays.asList("Some customer-code"))
             .setCoRoutingOrGeneral(new CoRoutingBuilder()
             .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                .rev170426.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
+                .rev171017.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
             .setExistingService(Arrays.asList("Some existing-service"))
             .build())
             .build())
@@ -214,7 +213,7 @@ public final class PceTestData {
                 .setServiceHandlerHeader(serviceHandlerHeader)
                 .setServiceName("service 1")
                 .setResourceReserve(true)
-                .setPceMetric(RoutingConstraintsSp.PceMetric.HopCount)
+                .setPceMetric(PceMetric.HopCount)
                 .setServiceAEnd(serviceAEnd)
                 .setServiceZEnd(serviceZEnd)
                 .build();
@@ -280,7 +279,7 @@ public final class PceTestData {
                 .setServiceHandlerHeader(serviceHandlerHeader)
                 .setServiceName("service 1")
                 .setResourceReserve(true)
-                .setPceMetric(RoutingConstraintsSp.PceMetric.HopCount)
+                .setPceMetric(PceMetric.HopCount)
                 .setServiceAEnd(serviceAEnd)
                 .setServiceZEnd(serviceZEnd)
                 .setHardConstraints(new HardConstraintsBuilder()
@@ -351,7 +350,7 @@ public final class PceTestData {
                 .setServiceHandlerHeader(serviceHandlerHeader)
                 .setServiceName("service 1")
                 .setResourceReserve(true)
-                .setPceMetric(RoutingConstraintsSp.PceMetric.HopCount)
+                .setPceMetric(PceMetric.HopCount)
                 .setServiceAEnd(serviceAEnd)
                 .setServiceZEnd(serviceZEnd)
                 .setHardConstraints(new HardConstraintsBuilder()
@@ -395,7 +394,7 @@ public final class PceTestData {
                 .setServiceHandlerHeader(serviceHandlerHeader)
                 .setServiceName("service 1")
                 .setResourceReserve(true)
-                .setPceMetric(RoutingConstraintsSp.PceMetric.HopCount)
+                .setPceMetric(PceMetric.HopCount)
                 .setServiceAEnd(serviceAEnd)
                 .setServiceZEnd(serviceZEnd)
                 .build();
index b12f399988511918a6564da753229ac4f5e726b6..00701404185194c8f5fdc67ddbf380edf5d09c41 100644 (file)
@@ -12,7 +12,6 @@ import java.util.List;
 import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 import java.util.stream.Collectors;
-
 import org.junit.Assert;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
@@ -21,10 +20,9 @@ import org.opendaylight.transportpce.binding.converter.XMLDataObjectConverter;
 import org.opendaylight.transportpce.binding.converter.api.DataObjectConverter;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.test.common.DataStoreContext;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.Node;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.node.NodeIdentifier;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.Node;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
@@ -124,15 +122,12 @@ public final class PceTestUtils {
                     return false;
                 }
                 return aToZ.getResource().getResource() instanceof Node;
-            }).filter(aToZ -> {
+            }).map(aToZ -> {
                 Node node = (Node) aToZ.getResource().getResource();
-                if (node.getNodeIdentifier() == null) {
+                if (node.getNodeId() == null) {
                     LOG.warn("Node in AToZ node {} contains null! Skipping this node!", aToZ.getId());
-                    return false;
+                    return null;
                 }
-                return true;
-            }).map(aToZ -> {
-                NodeIdentifier node = ((Node) aToZ.getResource().getResource()).getNodeIdentifier();
                 return node.getNodeId().toString();
             }).collect(Collectors.toList());
     }
index a080619c6d5d2a09b9383429ccf4e6a3115c81b9..2309750cd3079f0c83facd15b13c36283cb2dbed 100644 (file)
@@ -18,18 +18,18 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev17
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathInput;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommon;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommonBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.PathDescription;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToA;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPoint;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToA;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPoint;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.NodesBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.NodesKey;
@@ -74,7 +74,12 @@ public final class ModelMappingUtils {
     }
 
     public static ListenableFuture<RpcResult<ServiceImplementationRequestOutput>>
-        createRpcResponse(ServiceImplementationRequestOutput payload) {
+        createServiceImplementationRpcResponse(ServiceImplementationRequestOutput payload) {
+        return RpcResultBuilder.success(payload).buildFuture();
+    }
+
+    public static ListenableFuture<RpcResult<ServiceDeleteOutput>>
+        createServiceDeleteRpcResponse(ServiceDeleteOutput payload) {
         return RpcResultBuilder.success(payload).buildFuture();
     }
 
@@ -126,10 +131,10 @@ public final class ModelMappingUtils {
             try {
                 if (TERMINATION_POINT.equals(resourceType)) {
                     tp = (TerminationPoint) pathDesObj.getResource().getResource();
-                    LOG.info(" TP is {} {}", tp.getTerminationPointIdentifier().getTpId(),
-                            tp.getTerminationPointIdentifier().getNodeId());
-                    tpID = tp.getTerminationPointIdentifier().getTpId();
-                    nodeID = tp.getTerminationPointIdentifier().getNodeId();
+                    LOG.info(" TP is {} {}", tp.getTpId(),
+                            tp.getTpNodeId());
+                    tpID = tp.getTpId();
+                    nodeID = tp.getTpNodeId();
                     sortId = pathDesObj.getId();
 
                     //TODO: do not rely on ID to be in certain format
@@ -200,10 +205,10 @@ public final class ModelMappingUtils {
             try {
                 if (TERMINATION_POINT.equals(resourceType)) {
                     tp = (TerminationPoint) pathDesObj.getResource().getResource();
-                    LOG.info(" TP is {} {}", tp.getTerminationPointIdentifier().getTpId(),
-                            tp.getTerminationPointIdentifier().getNodeId());
-                    tpID = tp.getTerminationPointIdentifier().getTpId();
-                    nodeID = tp.getTerminationPointIdentifier().getNodeId();
+                    LOG.info(" TP is {} {}", tp.getTpId(),
+                            tp.getTpNodeId());
+                    tpID = tp.getTpId();
+                    nodeID = tp.getTpNodeId();
                     sortId = pathDesObj.getId();
 
                     //TODO: do not rely on ID to be in certain format
index cf9e27426fdab87077e7d8f3b784a93942b4c1de..45f814ba1e323975f73c67c1aa0fdc4ac555fd18 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.transportpce.renderer;
 
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.PathDescription;
 
 public interface NetworkModelWavelengthService {
 
index a354bdab6a8a8954372e7e54b0b2cc351792a9c2..138ff8e3a114136e51d4963759b2873c5cf6098b 100644 (file)
@@ -8,14 +8,12 @@
 package org.opendaylight.transportpce.renderer;
 
 import com.google.common.base.Optional;
-
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.stream.Collectors;
-
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
@@ -56,11 +54,10 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.O
 import org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes.AvailableWavelengthsBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev170929.xpdr.port.connection.attributes.Wavelength;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev170929.xpdr.port.connection.attributes.WavelengthBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.PathDescription;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToA;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPoint;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.termination.point.TerminationPointIdentifier;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToA;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPoint;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
@@ -121,19 +118,13 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                         return false;
                     }
                     return aToZ.getResource().getResource() instanceof TerminationPoint;
-                }).filter(aToZ -> {
+                }).map(aToZ -> {
                     TerminationPoint tp = (TerminationPoint) aToZ.getResource().getResource();
-                    if ((tp.getTerminationPointIdentifier() == null)
-                            || (tp.getTerminationPointIdentifier().getNodeId() == null)
-                            || (tp.getTerminationPointIdentifier().getTpId() == null)) {
+                    if ((tp == null) || (tp.getTpNodeId() == null) ||  (tp.getTpId() == null)) {
                         LOG.warn("Termination point in AToZ node {} contains nulls! Skipping this node!", aToZ.getId());
-                        return false;
+                        return null;
                     }
-                    return true;
-                }).map(aToZ -> {
-                    TerminationPointIdentifier tp =
-                            ((TerminationPoint) aToZ.getResource().getResource()).getTerminationPointIdentifier();
-                    return new NodeIdPair(tp.getNodeId(), tp.getTpId());
+                    return new NodeIdPair(tp.getTpNodeId(), tp.getTpId());
                 }).collect(Collectors.toList());
     }
 
@@ -146,20 +137,13 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                         return false;
                     }
                     return zToA.getResource().getResource() instanceof TerminationPoint;
-                }).filter(zToA -> {
+                }).map(zToA -> {
                     TerminationPoint tp = (TerminationPoint) zToA.getResource().getResource();
-                    if ((tp.getTerminationPointIdentifier() == null)
-                            || (tp.getTerminationPointIdentifier().getNodeId() == null)
-                            || (tp.getTerminationPointIdentifier().getTpId() == null)) {
+                    if ((tp == null) || (tp.getTpNodeId() == null) ||  (tp.getTpId() == null)) {
                         LOG.warn("Termination point in ZToA node {} contains nulls! Skipping this node!", zToA.getId());
-                        return false;
+                        return null;
                     }
-                    return true;
-                })
-                .map(zToA -> {
-                    TerminationPointIdentifier tp =
-                            ((TerminationPoint) zToA.getResource().getResource()).getTerminationPointIdentifier();
-                    return new NodeIdPair(tp.getNodeId(), tp.getTpId());
+                    return new NodeIdPair(tp.getTpNodeId(), tp.getTpId());
                 }).collect(Collectors.toList());
     }
 
index 80c13e44c77d2fa48d39aba139d7067427353eb0..8913c925dbe6a2e0b3a024d78b228a9dfc088c09 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOpe
 import org.opendaylight.transportpce.renderer.rpcs.DeviceRendererRPCImpl;
 import org.opendaylight.transportpce.renderer.rpcs.TransportPCEServicePathRPCImpl;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.TransportpceDeviceRendererService;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.TransportpceServicepathService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.TransportpceRendererService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -23,7 +23,7 @@ public class RendererProvider {
     private final RpcProviderRegistry rpcProviderRegistry;
     private DeviceRendererRPCImpl deviceRendererRPCImpl;
     private RpcRegistration<TransportpceDeviceRendererService> deviceRendererRegistration;
-    private RpcRegistration<TransportpceServicepathService> tpceServiceRegistry;
+    private RpcRegistration<TransportpceRendererService> tpceServiceRegistry;
     private RendererServiceOperations rendererServiceOperations;
 
     public RendererProvider(RpcProviderRegistry rpcProviderRegistry, DeviceRendererRPCImpl deviceRendererRPCImpl,
@@ -43,7 +43,7 @@ public class RendererProvider {
         this.deviceRendererRegistration = this.rpcProviderRegistry
                 .addRpcImplementation(TransportpceDeviceRendererService.class, deviceRendererRPCImpl);
         this.tpceServiceRegistry = this.rpcProviderRegistry
-                .addRpcImplementation(TransportpceServicepathService.class, transportPCEServicePathRPCImpl);
+                .addRpcImplementation(TransportpceRendererService.class, transportPCEServicePathRPCImpl);
     }
 
     /**
index d04423770eb51e5ffc8b1820e6e63b611b55c0b9..fcaf88c878b58a626d44cb7622da91ab33bd518c 100644 (file)
@@ -7,10 +7,10 @@
  */
 package org.opendaylight.transportpce.renderer.provisiondevice;
 
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutput;
 
 public interface RendererServiceOperations {
 
index d116f6941739f794635a7dfe1967f26959b1e917..9aa073a99057bba54a889df4141419a8d1941e55 100644 (file)
@@ -41,16 +41,16 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev17
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownOutput;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.TransportpceOlmService;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.get.pm.output.Measurements;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev161014.PmGranularity;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.path.PathDescription;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServicePathList;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePaths;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePathsKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.path.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePathsKey;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.get.pm.input.ResourceIdentifierBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
index e86fc4b268c9f916f190e078879cf2bb39a5e979..3dd8c178c1d3eed8b61a4add4975286ad1c784db 100644 (file)
@@ -10,20 +10,16 @@ package org.opendaylight.transportpce.renderer.rpcs;
 import com.google.common.util.concurrent.ListenableFuture;
 import org.opendaylight.transportpce.renderer.ModelMappingUtils;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.CancelResourceReserveInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.CancelResourceReserveOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.PathComputationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.TransportpceServicepathService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.TransportpceRendererService;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class TransportPCEServicePathRPCImpl implements TransportpceServicepathService {
+public class TransportPCEServicePathRPCImpl implements TransportpceRendererService {
 
     private static final Logger LOG = LoggerFactory.getLogger(TransportPCEServicePathRPCImpl.class);
 
@@ -33,17 +29,12 @@ public class TransportPCEServicePathRPCImpl implements TransportpceServicepathSe
         this.rendererServiceOperations = rendererServiceOperations;
     }
 
-    @Override
-    public ListenableFuture<RpcResult<CancelResourceReserveOutput>> cancelResourceReserve(
-            CancelResourceReserveInput input) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
     @Override
     public ListenableFuture<RpcResult<ServiceDeleteOutput>> serviceDelete(ServiceDeleteInput input) {
-        // TODO Auto-generated method stub
-        return null;
+        String serviceName = input.getServiceName();
+        LOG.info("Calling RPC service delete request {} {}", serviceName);
+        return ModelMappingUtils
+                .createServiceDeleteRpcResponse(this.rendererServiceOperations.serviceDelete(input));
     }
 
     @Override
@@ -51,14 +42,8 @@ public class TransportPCEServicePathRPCImpl implements TransportpceServicepathSe
             ServiceImplementationRequestInput input) {
         String serviceName = input.getServiceName();
         LOG.info("Calling RPC service impl request {} {}", serviceName);
-        return ModelMappingUtils.createRpcResponse(this.rendererServiceOperations.serviceImplementation(input));
-    }
-
-    @Override
-    public ListenableFuture<RpcResult<PathComputationRequestOutput>> pathComputationRequest(
-            PathComputationRequestInput input) {
-        // TODO Auto-generated method stub
-        return null;
+        return ModelMappingUtils
+                .createServiceImplementationRpcResponse(this.rendererServiceOperations.serviceImplementation(input));
     }
 
 }
index 6bd143299f474973589fae1b18f9a2bb691b37d3..ce1759d6d137d17b0763520ed63aaddabb598452 100644 (file)
@@ -46,7 +46,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev17092
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmTpType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev170929.xpdr.port.connection.attributes.WavelengthBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.PathDescription;
 
 @RunWith(Parameterized.class)
 public class NetworkModelWaveLengthServiceFreeTest extends AbstractTest {
index c3f1706b6a45aa8503f795771017d108dd5b3a94..c0703d3a45a71017b086ca03ea00b54c7391a80e 100644 (file)
@@ -44,7 +44,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev17092
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrPortAttributesBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmTpType;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.PathDescription;
 
 @RunWith(Parameterized.class)
 public class NetworkModelWaveLengthServiceUseTest extends AbstractTest {
index 50563d20d6ce3eedab97f90ab22c26377c3bb934..9a89f3ed541ebcef35851dbd3ebff42999f6d7ea 100644 (file)
@@ -39,13 +39,13 @@ import org.opendaylight.transportpce.renderer.utils.TransactionUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownOutputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.TransportpceOlmService;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.handler.header.ServiceHandlerHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServicePathList;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePaths;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePathsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePathsKey;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.handler.header.ServiceHandlerHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePathsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePathsKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
index 5a23ff510646513f0fd92f47f2102960e432e73a..cc250c95667908ef9a893d71b59129e0a0a3fcb9 100644 (file)
@@ -42,10 +42,10 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev17
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.get.pm.output.Measurements;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.get.pm.output.MeasurementsBuilder;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev161014.PmGranularity;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.get.pm.input.ResourceIdentifierBuilder;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
index 55611bf642346dcaeb0ddc16e7e86b34c9610169..ebe2d86f9a789c34074dcfb8cf2bb179b93823cd 100644 (file)
@@ -15,36 +15,33 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathInput;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation.request.input.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation.request.input.PathDescriptionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation.request.input.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation.request.input.ServiceZEndBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.ServiceFormat;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToA;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToABuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToAKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.ResourceBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.Link;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.LinkBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.NodeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPoint;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPointBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.link.LinkIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.node.NodeIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.termination.point.TerminationPointIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.handler.header.ServiceHandlerHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation.request.input.PathDescription;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation.request.input.PathDescriptionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation.request.input.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation.request.input.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToA;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToABuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToAKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.ResourceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.Link;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.LinkBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.NodeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPoint;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPointBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.handler.header.ServiceHandlerHeaderBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.NodesBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.NodesKey;
@@ -113,14 +110,12 @@ public final class ServiceDataUtils {
 
     private static PathDescription createPathDescriptionInvalidResource() {
         List<AToZ> atoZList = new ArrayList<AToZ>();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource
+        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource
             .resource.resource.NodeBuilder nodesBuilder = new NodeBuilder();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource
-            .resource.resource.Node node1 = nodesBuilder.setNodeIdentifier(new NodeIdentifierBuilder()
-            .setNodeId("XPONDER-1-2").build()).build();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource
-            .resource.resource.Node node2 = nodesBuilder.setNodeIdentifier(new NodeIdentifierBuilder()
-            .setNodeId("XPONDER-1-2").build()).build();
+        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource
+            .resource.resource.Node node1 = nodesBuilder.setNodeId("XPONDER-1-2").build();
+        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource
+            .resource.resource.Node node2 = nodesBuilder.setNodeId("XPONDER-1-2").build();
         AToZ atoZ = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
             .setResource(node1).build()).build();
         AToZ atoZ2 = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
@@ -157,11 +152,8 @@ public final class ServiceDataUtils {
         Integer atozId = 1;
         for (String nodeId : nodeIds) {
             for (String otherNodeId : nodeIds) {
-                TerminationPoint terminationPoint = terminationPointBuilder
-                    .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder().setNodeId(nodeId + '-'
-                            + tpId)
-                        .setTpId(tpId).build())
-                    .build();
+                TerminationPoint terminationPoint = terminationPointBuilder.setTpNodeId(nodeId + '-' + tpId)
+                        .setTpId(tpId).build();
                 AToZ atoZ = new AToZBuilder().setId(atozId.toString())
                     .withKey(new AToZKey(atozId.toString())).setResource(new ResourceBuilder()
                         .setResource(terminationPoint).build()).build();
@@ -180,11 +172,8 @@ public final class ServiceDataUtils {
         Integer ztoaId = 1;
         for (String nodeId : nodeIds) {
             for (String otherNodeId : nodeIds) {
-                TerminationPoint terminationPoint = terminationPointBuilder
-                    .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder().setNodeId(nodeId + '-'
-                            + tpId)
-                        .setTpId(tpId).build())
-                    .build();
+                TerminationPoint terminationPoint = terminationPointBuilder.setTpNodeId(nodeId + '-' + tpId)
+                        .setTpId(tpId).build();
                 ZToA ztoA = new ZToABuilder().setId(ztoaId.toString())
                     .withKey(new ZToAKey(ztoaId.toString())).setResource(new ResourceBuilder()
                         .setResource(terminationPoint).build()).build();
@@ -205,12 +194,8 @@ public final class ServiceDataUtils {
 
     private static PathDescription createPathDescriptionLinkResource() {
         List<AToZ> atoZList = new ArrayList<AToZ>();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource
-            .resource.resource.NodeBuilder nodesBuilder = new NodeBuilder();
-        Link link1 = new LinkBuilder().setLinkIdentifier(new LinkIdentifierBuilder().setLinkId("link 1").build())
-            .build();
-        Link link2 = new LinkBuilder().setLinkIdentifier(new LinkIdentifierBuilder().setLinkId("link 2").build())
-            .build();
+        Link link1 = new LinkBuilder().setLinkId("link 1").build();
+        Link link2 = new LinkBuilder().setLinkId("link 2").build();
         AToZ atoZ = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
             .setResource(link1).build()).build();
         AToZ atoZ2 = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
index 6928dd658552bbff72696cde7fcceceee51e1574..27a5526f23991a021ff36d55ae0c4622bf1623d1 100644 (file)
@@ -12,26 +12,25 @@ import java.util.ArrayList;
 import java.util.List;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.ServiceFormat;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToA;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToABuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToAKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.ResourceBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPoint;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPointBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.termination.point.TerminationPointIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.path.PathDescription;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.path.PathDescriptionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.path.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.path.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToA;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToABuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToAKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.ResourceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPoint;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPointBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.path.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.path.PathDescriptionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.path.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.path.ServiceZEndBuilder;
 
 public final class ServiceDeleteDataUtils {
 
@@ -42,12 +41,10 @@ public final class ServiceDeleteDataUtils {
     public static PathDescription createTransactionPathDescription(String tpId) {
         List<AToZ> atoZList = new ArrayList<AToZ>();
         TerminationPointBuilder terminationPointBuilder = new TerminationPointBuilder();
-        TerminationPoint terminationPoint = terminationPointBuilder
-                .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder().setNodeId("node2" + tpId)
-                        .setTpId(tpId).build()).build();
-        TerminationPoint terminationPoint2 = terminationPointBuilder
-                .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder().setNodeId("node1" + tpId)
-                        .setTpId(tpId).build()).build();
+        TerminationPoint terminationPoint = terminationPointBuilder.setTpNodeId("node2" + tpId)
+                        .setTpId(tpId).build();
+        TerminationPoint terminationPoint2 = terminationPointBuilder.setTpNodeId("node1" + tpId)
+                        .setTpId(tpId).build();
         AToZ atoZ = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
                 .setResource(terminationPoint).build()).build();
         AToZ atoZ2 = new AToZBuilder().setId("2").withKey(new AToZKey("2")).setResource(new ResourceBuilder()
index cd52ccac101f62a31a453ab8140464d2442a4f9e..d1d7b67344e9092a0be381c02628e8c1926fec75 100644 (file)
@@ -13,36 +13,33 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathInput;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation.request.input.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation.request.input.PathDescriptionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation.request.input.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation.request.input.ServiceZEndBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.ServiceFormat;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.atoz.direction.AToZKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToA;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToABuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ztoa.direction.ZToAKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.ResourceBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.Link;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.LinkBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.NodeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPoint;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.TerminationPointBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.link.LinkIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.node.NodeIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.termination.point.TerminationPointIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.handler.header.ServiceHandlerHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation.request.input.PathDescription;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation.request.input.PathDescriptionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation.request.input.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation.request.input.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToA;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToABuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToAKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.ResourceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.Link;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.LinkBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.NodeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPoint;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPointBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.handler.header.ServiceHandlerHeaderBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.NodesBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.NodesKey;
@@ -111,14 +108,12 @@ public final class ServiceImplementationDataUtils {
 
     private static PathDescription createPathDescriptionInvalidResource() {
         List<AToZ> atoZList = new ArrayList<AToZ>();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource
+        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource
             .resource.resource.NodeBuilder nodesBuilder = new NodeBuilder();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource
-            .resource.resource.Node node1 = nodesBuilder.setNodeIdentifier(new NodeIdentifierBuilder()
-            .setNodeId("XPONDER-1-2").build()).build();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource
-            .resource.resource.Node node2 = nodesBuilder.setNodeIdentifier(new NodeIdentifierBuilder()
-            .setNodeId("XPONDER-1-2").build()).build();
+        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource
+            .resource.resource.Node node1 = nodesBuilder.setNodeId("XPONDER-1-2").build();
+        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource
+            .resource.resource.Node node2 = nodesBuilder.setNodeId("XPONDER-1-2").build();
         AToZ atoZ = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
             .setResource(node1).build()).build();
         AToZ atoZ2 = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
@@ -151,12 +146,10 @@ public final class ServiceImplementationDataUtils {
     public static PathDescription createPathDescriptionTerminationPointResource(String tpId) {
         List<AToZ> atoZList = new ArrayList<AToZ>();
         TerminationPointBuilder terminationPointBuilder = new TerminationPointBuilder();
-        TerminationPoint terminationPoint = terminationPointBuilder
-            .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder().setNodeId("XPONDER-1-2")
-                .setTpId("XPONDER-1-2-" + tpId).build()).build();
-        TerminationPoint terminationPoint2 = terminationPointBuilder
-            .setTerminationPointIdentifier(new TerminationPointIdentifierBuilder().setNodeId("XPONDER-1-2")
-                .setTpId("XPONDER-1-2-" + tpId).build()).build();
+        TerminationPoint terminationPoint = terminationPointBuilder.setTpNodeId("XPONDER-1-2")
+                .setTpId("XPONDER-1-2-" + tpId).build();
+        TerminationPoint terminationPoint2 = terminationPointBuilder.setTpNodeId("XPONDER-1-2")
+                .setTpId("XPONDER-1-2-" + tpId).build();
         AToZ atoZ = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
             .setResource(terminationPoint).build()).build();
         AToZ atoZ2 = new AToZBuilder().setId("2").withKey(new AToZKey("2")).setResource(new ResourceBuilder()
@@ -188,12 +181,8 @@ public final class ServiceImplementationDataUtils {
 
     private static PathDescription createPathDescriptionLinkResource() {
         List<AToZ> atoZList = new ArrayList<AToZ>();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource
-            .resource.resource.NodeBuilder nodesBuilder = new NodeBuilder();
-        Link link1 = new LinkBuilder().setLinkIdentifier(new LinkIdentifierBuilder().setLinkId("link 1").build())
-            .build();
-        Link link2 = new LinkBuilder().setLinkIdentifier(new LinkIdentifierBuilder().setLinkId("link 2").build())
-            .build();
+        Link link1 = new LinkBuilder().setLinkId("link 1").build();
+        Link link2 = new LinkBuilder().setLinkId("link 2").build();
         AToZ atoZ = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
             .setResource(link1).build()).build();
         AToZ atoZ2 = new AToZBuilder().setId("1").withKey(new AToZKey("1")).setResource(new ResourceBuilder()
index ed519942844dde4b0d36be590fd8bd32852e13aa..a9f8749e36765af336268188e16ef7b4c00c169c 100644 (file)
@@ -19,15 +19,15 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161
 import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161014.constraints.co.routing.or.general.general.Latency;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161014.routing.constraints.HardConstraints;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161014.routing.constraints.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.ConstraintsSp;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.general.DiversityBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.general.ExcludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.general.IncludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.constraints.sp.co.routing.or.general.general.LatencyBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.diversity.existing.service.contraints.sp.ExistingServiceApplicabilityBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.HardConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.SoftConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.ConstraintsSp;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.general.DiversityBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.general.ExcludeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.general.IncludeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.general.LatencyBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.diversity.existing.service.contraints.sp.ExistingServiceApplicabilityBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.SoftConstraintsBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -44,9 +44,9 @@ public class MappingConstraints {
     private HardConstraints serviceHardConstraints;
     private SoftConstraints serviceSoftConstraints;
     private org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-        .routing.constraints.rev170426.routing.constraints.sp.HardConstraints servicePathHardConstraints;
+        .routing.constraints.rev171017.routing.constraints.sp.HardConstraints servicePathHardConstraints;
     private org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-        .routing.constraints.rev170426.routing.constraints.sp.SoftConstraints servicePathSoftConstraints;
+        .routing.constraints.rev171017.routing.constraints.sp.SoftConstraints servicePathSoftConstraints;
 
     /**
      * MappingConstraints class constructor
@@ -68,9 +68,9 @@ public class MappingConstraints {
      * @param soft SoftConstraints
      */
     public MappingConstraints(org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-            .routing.constraints.rev170426.routing.constraints.sp.HardConstraints hard,
+            .routing.constraints.rev171017.routing.constraints.sp.HardConstraints hard,
             org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-            .routing.constraints.rev170426.routing.constraints.sp.SoftConstraints soft) {
+            .routing.constraints.rev171017.routing.constraints.sp.SoftConstraints soft) {
         setServicePathHardConstraints(hard);
         setServicePathSoftConstraints(soft);
     }
@@ -87,20 +87,20 @@ public class MappingConstraints {
         CoRoutingOrGeneral coRoutingOrGeneral = null;
         HardConstraintsBuilder tempHard = new HardConstraintsBuilder();
         SoftConstraintsBuilder tempSoft = new SoftConstraintsBuilder();
-        if (input  !=  null && input instanceof Constraints) {
+        if ((input  !=  null) && (input instanceof Constraints)) {
             Constraints constraints = (Constraints)input;
             coRoutingOrGeneral = constraints.getCoRoutingOrGeneral();
             General tmpGeneral = null;
             CoRouting tmpCoRouting = null;
             if (coRoutingOrGeneral  !=  null) {
                 org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.GeneralBuilder finalGeneral =
+                    .rev171017.constraints.sp.co.routing.or.general.GeneralBuilder finalGeneral =
                     new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.GeneralBuilder();
+                    .rev171017.constraints.sp.co.routing.or.general.GeneralBuilder();
                 org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder finalCoRouting =
+                    .rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder finalCoRouting =
                     new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder();
+                    .rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder();
                 if (coRoutingOrGeneral instanceof General) {
                     tmpGeneral = (General) coRoutingOrGeneral;
                     if (tmpGeneral  !=  null) {
@@ -190,13 +190,13 @@ public class MappingConstraints {
             CoRouting tmpCoRouting = null;
             if (coRoutingOrGeneral  !=  null) {
                 org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.GeneralBuilder finalGeneral =
+                    .rev171017.constraints.sp.co.routing.or.general.GeneralBuilder finalGeneral =
                     new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.GeneralBuilder();
+                    .rev171017.constraints.sp.co.routing.or.general.GeneralBuilder();
                 org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder finalCoRouting =
+                    .rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder finalCoRouting =
                     new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder();
+                    .rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder();
                 if (coRoutingOrGeneral instanceof General) {
                     tmpGeneral = (General) coRoutingOrGeneral;
                     if (tmpGeneral  !=  null) {
@@ -264,8 +264,8 @@ public class MappingConstraints {
             servicePathHardConstraints = tempHard.build();*/
 
             org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                .rev170426.routing.constraints.sp.HardConstraints tempHard = (org.opendaylight.yang.gen
-                    .v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing
+                .rev171017.routing.constraints.sp.HardConstraints tempHard = (org.opendaylight.yang.gen
+                    .v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing
                     .constraints.sp.HardConstraints) getConstraints(serviceHardConstraints);
             if (tempHard != null) {
                 servicePathHardConstraints = tempHard;
@@ -277,13 +277,13 @@ public class MappingConstraints {
             CoRouting tmpCoRouting = null;
             if (coRoutingOrGeneral  !=  null) {
                 org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.GeneralBuilder finalGeneral =
+                    .rev171017.constraints.sp.co.routing.or.general.GeneralBuilder finalGeneral =
                     new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.GeneralBuilder();
+                    .rev171017.constraints.sp.co.routing.or.general.GeneralBuilder();
                 org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder finalCoRouting =
+                    .rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder finalCoRouting =
                     new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                    .rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder();
+                    .rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder();
                 if (coRoutingOrGeneral instanceof General) {
                     tmpGeneral = (General) coRoutingOrGeneral;
                     if (tmpGeneral  !=  null) {
@@ -350,8 +350,8 @@ public class MappingConstraints {
             }
             servicePathSoftConstraints = tempSoft.build();*/
             org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
-                .rev170426.routing.constraints.sp.SoftConstraints tempSoft = (org.opendaylight.yang.gen
-                    .v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing
+                .rev171017.routing.constraints.sp.SoftConstraints tempSoft = (org.opendaylight.yang.gen
+                    .v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing
                     .constraints.sp.SoftConstraints) getConstraints(serviceSoftConstraints);
             if (tempSoft != null) {
                 servicePathSoftConstraints = tempSoft;
@@ -381,25 +381,25 @@ public class MappingConstraints {
 
 
     public org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-        .routing.constraints.rev170426.routing.constraints.sp.HardConstraints getServicePathHardConstraints() {
+        .routing.constraints.rev171017.routing.constraints.sp.HardConstraints getServicePathHardConstraints() {
         return servicePathHardConstraints;
     }
 
 
     public void setServicePathHardConstraints(org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-            .routing.constraints.rev170426.routing.constraints.sp.HardConstraints servicePathHardConstraints) {
+            .routing.constraints.rev171017.routing.constraints.sp.HardConstraints servicePathHardConstraints) {
         this.servicePathHardConstraints = servicePathHardConstraints;
     }
 
 
     public org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-        .routing.constraints.rev170426.routing.constraints.sp.SoftConstraints getServicePathSoftConstraints() {
+        .routing.constraints.rev171017.routing.constraints.sp.SoftConstraints getServicePathSoftConstraints() {
         return servicePathSoftConstraints;
     }
 
 
     public void setServicePathSoftConstraints(org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-            .routing.constraints.rev170426.routing.constraints.sp.SoftConstraints servicePathSoftConstraints) {
+            .routing.constraints.rev171017.routing.constraints.sp.SoftConstraints servicePathSoftConstraints) {
         this.servicePathSoftConstraints = servicePathSoftConstraints;
     }
 
index 08890a70347a0f6f68f9986aec5f060fd6f02be0..08bdfe3ea4c97f27623f1c2733ee977014f9be09 100644 (file)
@@ -8,12 +8,14 @@
 package org.opendaylight.transportpce.servicehandler;
 
 import com.google.common.util.concurrent.ListenableFuture;
-
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.path.computation.request.input.ServiceAEnd;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.path.computation.request.input.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.path.computation.request.input.ServiceZEnd;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.path.computation.request.input.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.path.computation.request.input.ServiceAEnd;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.path.computation.request.input.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.path.computation.request.input.ServiceZEnd;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.path.computation.request.input.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommon;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommonBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.response.parameters.ResponseParametersBuilder;
@@ -32,23 +34,24 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.Service
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceRerouteOutputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.Services;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.ServicesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.HardConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.SoftConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.RxDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.TxDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.endpoint.sp.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.handler.header.ServiceHandlerHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.path.PathDescriptionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePaths;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePathsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.SoftConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.RxDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.TxDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.endpoint.sp.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.handler.header.ServiceHandlerHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.path.PathDescriptionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePathsBuilder;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class ModelMappingUtils {
+    private static final Logger LOG = LoggerFactory.getLogger(ModelMappingUtils.class);
+
     private ModelMappingUtils() {
     }
 
@@ -57,53 +60,49 @@ public final class ModelMappingUtils {
         ServiceImplementationRequestInputBuilder serviceImplementationRequestInputBuilder =
                 new ServiceImplementationRequestInputBuilder();
         serviceImplementationRequestInputBuilder.setServiceName(input.getServiceName());
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation
-            .request.input.ServiceAEndBuilder serviceAEnd =
-                new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service
-                .implementation.request.input.ServiceAEndBuilder();
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation
+            .request.input.ServiceAEndBuilder serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.opendaylight
+                .transportpce.renderer.rev171017.service.implementation.request.input.ServiceAEndBuilder();
         serviceAEnd.setServiceFormat(input.getServiceAEnd().getServiceFormat())
-                .setServiceRate(input.getServiceAEnd().getServiceRate()).setClli(input.getServiceAEnd().getClli())
-                .setNodeId(input.getServiceAEnd().getNodeId())
-                .setTxDirection(
-                        new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426
-                        .service.endpoint.sp.TxDirectionBuilder()
-                                .setPort(input.getServiceAEnd().getTxDirection().getPort()).build())
-                .setRxDirection(
-                        new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426
-                        .service.endpoint.sp.RxDirectionBuilder()
-                                .setPort(input.getServiceAEnd().getRxDirection().getPort()).build());
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation
-            .request.input.ServiceZEndBuilder serviceZEnd =
-                new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service
-                .implementation.request.input.ServiceZEndBuilder();
+            .setServiceRate(input.getServiceAEnd().getServiceRate()).setClli(input.getServiceAEnd().getClli())
+            .setNodeId(input.getServiceAEnd().getNodeId())
+            .setTxDirection(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
+            .rev171016.service.endpoint.sp.TxDirectionBuilder()
+            .setPort(input.getServiceAEnd().getTxDirection().getPort()).build())
+            .setRxDirection(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
+            .rev171016.service.endpoint.sp.RxDirectionBuilder()
+            .setPort(input.getServiceAEnd().getRxDirection().getPort()).build());
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation
+            .request.input.ServiceZEndBuilder serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.opendaylight
+                .transportpce.renderer.rev171017.service.implementation.request.input.ServiceZEndBuilder();
         serviceZEnd.setServiceFormat(input.getServiceZEnd().getServiceFormat())
-                .setServiceRate(input.getServiceZEnd().getServiceRate()).setClli(input.getServiceZEnd().getClli())
-                .setNodeId(input.getServiceZEnd().getNodeId())
-                .setTxDirection(
-                        new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426
-                        .service.endpoint.sp.TxDirectionBuilder()
-                                .setPort(input.getServiceZEnd().getTxDirection().getPort()).build())
-                .setRxDirection(
-                        new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426
-                        .service.endpoint.sp.RxDirectionBuilder()
-                                .setPort(input.getServiceZEnd().getRxDirection().getPort()).build());
+            .setServiceRate(input.getServiceZEnd().getServiceRate()).setClli(input.getServiceZEnd().getClli())
+            .setNodeId(input.getServiceZEnd().getNodeId())
+            .setTxDirection(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
+            .rev171016.service.endpoint.sp.TxDirectionBuilder()
+            .setPort(input.getServiceZEnd().getTxDirection().getPort()).build())
+            .setRxDirection(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
+            .rev171016.service.endpoint.sp.RxDirectionBuilder()
+            .setPort(input.getServiceZEnd().getRxDirection().getPort()).build());
         serviceImplementationRequestInputBuilder.setServiceAEnd(serviceAEnd.build());
         serviceImplementationRequestInputBuilder.setServiceZEnd(serviceZEnd.build());
         serviceImplementationRequestInputBuilder.setServiceHandlerHeader(
-                new ServiceHandlerHeaderBuilder().setRequestId(input.getSdncRequestHeader().getRequestId()).build());
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation
+            new ServiceHandlerHeaderBuilder().setRequestId(input.getSdncRequestHeader().getRequestId()).build());
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation
             .request.input.PathDescriptionBuilder pathDescBuilder = new org.opendaylight.yang.gen.v1.http.org
-            .transportpce.b.c._interface.servicepath.rev170426.service.implementation.request.input
-            .PathDescriptionBuilder();
-        pathDescBuilder.setAToZDirection(pceResponse.getResponseParameters().getPathDescription().getAToZDirection());
-        pathDescBuilder.setZToADirection(pceResponse.getResponseParameters().getPathDescription().getZToADirection());
+                .opendaylight.transportpce.renderer.rev171017.service.implementation.request.input
+                    .PathDescriptionBuilder();
+        pathDescBuilder.setAToZDirection(pceResponse.getResponseParameters()
+                .getPathDescription().getAToZDirection());
+        pathDescBuilder.setZToADirection(pceResponse.getResponseParameters()
+                .getPathDescription().getZToADirection());
         serviceImplementationRequestInputBuilder.setPathDescription(pathDescBuilder.build());
         return serviceImplementationRequestInputBuilder.build();
     }
 
-    public static
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput
-            createServiceDeleteInput(ServiceDeleteInput serviceDeleteInput) {
+
+    public static org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+        .ServiceDeleteInput createServiceDeleteInput(ServiceDeleteInput serviceDeleteInput) {
         ServiceDeleteInputBuilder builder = new ServiceDeleteInputBuilder();
         builder.setServiceName(serviceDeleteInput.getServiceDeleteReqInfo().getServiceName());
         builder.setServiceHandlerHeader(new ServiceHandlerHeaderBuilder()
@@ -111,13 +110,12 @@ public final class ModelMappingUtils {
         return builder.build();
     }
 
-    public static
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput
-            createServiceDeleteInput(ServiceRerouteInput serviceRerouteInput, Services service) {
+    public static org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+        .ServiceDeleteInput createServiceDeleteInput(ServiceRerouteInput serviceRerouteinput, Services services) {
         ServiceDeleteInputBuilder builder = new ServiceDeleteInputBuilder();
-        builder.setServiceName(serviceRerouteInput.getServiceName());
-        builder.setServiceHandlerHeader(
-                new ServiceHandlerHeaderBuilder().setRequestId(service.getSdncRequestHeader().getRequestId()).build());
+        builder.setServiceName(serviceRerouteinput.getServiceName());
+        builder.setServiceHandlerHeader(new ServiceHandlerHeaderBuilder().setRequestId(
+                services.getSdncRequestHeader().getRequestId()).build());
         return builder.build();
     }
 
@@ -174,13 +172,6 @@ public final class ModelMappingUtils {
         return RpcResultBuilder.success(output).buildFuture();
     }
 
-    public static ListenableFuture<RpcResult<ServiceRerouteOutput>> createRerouteServiceReply(ServiceRerouteInput input,
-            String finalAck, String message, RpcStatus rpcStatus) {
-        ServiceRerouteOutputBuilder output = new ServiceRerouteOutputBuilder().setHardConstraints(null)
-                .setSoftConstraints(null).setStatusMessage(message).setStatus(rpcStatus);
-        return RpcResultBuilder.success(output.build()).buildFuture();
-    }
-
     public static ListenableFuture<RpcResult<ServiceCreateOutput>> createCreateServiceReply(ServiceCreateInput input,
             String finalAck, String message, String responseCode) {
         ResponseParametersBuilder responseParameters = new ResponseParametersBuilder();
@@ -197,6 +188,16 @@ public final class ModelMappingUtils {
         return RpcResultBuilder.success(output.build()).buildFuture();
     }
 
+    public static ListenableFuture<RpcResult<ServiceRerouteOutput>> createRerouteServiceReply(ServiceRerouteInput input,
+            String finalAckYes, String message, RpcStatus status) {
+        ServiceRerouteOutputBuilder output = new ServiceRerouteOutputBuilder()
+                .setHardConstraints(null)
+                .setSoftConstraints(null)
+                .setStatus(status)
+                .setStatusMessage(message);
+        return RpcResultBuilder.success(output.build()).buildFuture();
+    }
+
     /*
      * Map Input (ServiceCreateInmput, ServiceReconfigureInput) & output
      * (PathComputationRequestOutput) to Service.
@@ -262,37 +263,34 @@ public final class ModelMappingUtils {
             ServiceReconfigureInput serviceReconfigureInput, PathComputationRequestOutput output) {
         ServicePathsBuilder servicePathBuilder = new ServicePathsBuilder();
         if (serviceCreateInput != null) {
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.path
-                .ServiceAEndBuilder serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-                .service.types.rev170426.service.path.ServiceAEndBuilder();
+            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
+                .service.types.rev171016.service.path.ServiceAEndBuilder serviceAEnd =
+                new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
+                    .service.types.rev171016.service.path.ServiceAEndBuilder();
             serviceAEnd.setServiceFormat(serviceCreateInput.getServiceAEnd().getServiceFormat())
-                    .setServiceRate(serviceCreateInput.getServiceAEnd().getServiceRate())
-                    .setClli(serviceCreateInput.getServiceAEnd().getClli())
-                    .setNodeId(serviceCreateInput.getServiceAEnd().getNodeId())
-                    .setTxDirection(
-                            new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
-                            .rev170426.service.endpoint.sp.TxDirectionBuilder()
-                                    .setPort(serviceCreateInput.getServiceAEnd().getTxDirection().getPort()).build())
-                    .setRxDirection(
-                            new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
-                            .rev170426.service.endpoint.sp.RxDirectionBuilder()
-                                    .setPort(serviceCreateInput.getServiceAEnd().getRxDirection().getPort()).build());
-            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.path
-                .ServiceZEndBuilder serviceZEnd =
-                    new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426
-                        .service.path.ServiceZEndBuilder();
+                .setServiceRate(serviceCreateInput.getServiceAEnd().getServiceRate())
+                .setClli(serviceCreateInput.getServiceAEnd().getClli())
+                .setNodeId(serviceCreateInput.getServiceAEnd().getNodeId())
+                .setTxDirection(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
+                .rev171016.service.endpoint.sp.TxDirectionBuilder()
+                .setPort(serviceCreateInput.getServiceAEnd().getTxDirection().getPort()).build())
+                .setRxDirection(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
+                .rev171016.service.endpoint.sp.RxDirectionBuilder()
+                .setPort(serviceCreateInput.getServiceAEnd().getRxDirection().getPort()).build());
+            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
+                .service.types.rev171016.service.path.ServiceZEndBuilder serviceZEnd =
+                new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
+                    .service.types.rev171016.service.path.ServiceZEndBuilder();
             serviceZEnd.setServiceFormat(serviceCreateInput.getServiceZEnd().getServiceFormat())
-                    .setServiceRate(serviceCreateInput.getServiceZEnd().getServiceRate())
-                    .setClli(serviceCreateInput.getServiceZEnd().getClli())
-                    .setNodeId(serviceCreateInput.getServiceZEnd().getNodeId())
-                    .setTxDirection(
-                            new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
-                                .rev170426.service.endpoint.sp.TxDirectionBuilder()
-                                    .setPort(serviceCreateInput.getServiceZEnd().getTxDirection().getPort()).build())
-                    .setRxDirection(
-                            new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
-                                .rev170426.service.endpoint.sp.RxDirectionBuilder()
-                                    .setPort(serviceCreateInput.getServiceZEnd().getRxDirection().getPort()).build());
+                .setServiceRate(serviceCreateInput.getServiceZEnd().getServiceRate())
+                .setClli(serviceCreateInput.getServiceZEnd().getClli())
+                .setNodeId(serviceCreateInput.getServiceZEnd().getNodeId())
+                .setTxDirection(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
+                .rev171016.service.endpoint.sp.TxDirectionBuilder()
+                .setPort(serviceCreateInput.getServiceZEnd().getTxDirection().getPort()).build())
+                .setRxDirection(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types
+                .rev171016.service.endpoint.sp.RxDirectionBuilder()
+                .setPort(serviceCreateInput.getServiceZEnd().getRxDirection().getPort()).build());
             servicePathBuilder.setServiceAEnd(serviceAEnd.build());
             servicePathBuilder.setServiceZEnd(serviceZEnd.build());
             MappingConstraints mapConstraints = new MappingConstraints(serviceCreateInput.getHardConstraints(),
index 48583b38f131bc0f033cc234ddf7fd9643bcbd10..ccd0f143ad785b3a4a30cb6ff1242a371b7e070d 100644 (file)
@@ -25,7 +25,9 @@ import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOper
 import org.opendaylight.transportpce.servicehandler.validation.ServiceCreateValidation;
 import org.opendaylight.transportpce.servicehandler.validation.checks.ComplianceCheckResult;
 import org.opendaylight.transportpce.servicehandler.validation.checks.ServicehandlerCompliancyCheck;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.RpcActions;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.sdnc.request.header.SdncRequestHeaderBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.RpcStatus;
@@ -65,7 +67,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.delete.input.ServiceDeleteReqInfo.TailRetention;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.delete.input.ServiceDeleteReqInfoBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
@@ -140,8 +141,7 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
 
         ServiceImplementationRequestInput serviceImplementationRequest =
                 ModelMappingUtils.createServiceImplementationRequest(input, pceResponse);
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
-            .ServiceImplementationRequestOutput serviceImplementationRequestOutput = this.rendererServiceOperations
+        ServiceImplementationRequestOutput serviceImplementationRequestOutput = this.rendererServiceOperations
             .serviceImplementation(serviceImplementationRequest);
         if (ResponseCodes.RESPONSE_OK
                 .equals(serviceImplementationRequestOutput.getConfigurationResponseCommon().getResponseCode())) {
@@ -213,9 +213,9 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
         }
 
         LOG.debug("Service '{}' present in datastore !", serviceName);
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput
-                serviceDeleteInput = ModelMappingUtils.createServiceDeleteInput(input);
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+            .ServiceDeleteInput serviceDeleteInput = ModelMappingUtils.createServiceDeleteInput(input);
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
             .ServiceDeleteOutput output = this.rendererServiceOperations.serviceDelete(serviceDeleteInput);
 
         if (!ResponseCodes.RESPONSE_OK
@@ -326,11 +326,9 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
                     return ModelMappingUtils.createRerouteServiceReply(input, ResponseCodes.FINAL_ACK_YES,
                             message, RpcStatus.Failed);
                 }
-                ServiceRerouteOutputBuilder output = new ServiceRerouteOutputBuilder()
-                    .setHardConstraints(null).setSoftConstraints(null).setStatus(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.RpcStatus.Successful)
-                    .setStatusMessage("Service reroute successfully !");
-                return RpcResultBuilder.success(output).buildFuture();
+                message = "Service reroute successfully !";
+                return ModelMappingUtils.createRerouteServiceReply(input, ResponseCodes.FINAL_ACK_YES,
+                        message, RpcStatus.Successful);
             } else {
                 LOG.error("Service '{}' is not present", input.getServiceName());
                 message = "Service '" + input.getServiceName() + "' is not present";
index e2ba6b0c710816981a7909f7c0711caa30861d98..28e8b00215531ac23f5123ebe7a35a17c640ea93 100644 (file)
@@ -57,7 +57,6 @@ public class ServicehandlerProvider {
         final ServicehandlerImpl servicehandler = new ServicehandlerImpl(dataBroker, pathComputationService,
                 rendererServiceOperations);
         final PceListenerImpl pceListener = new PceListenerImpl();
-        pcelistenerRegistration = notificationService.registerNotificationListener(pceListener);
         rpcRegistration = rpcRegistry.addRpcImplementation(OrgOpenroadmServiceService.class, servicehandler);
     }
 
index d5a831f4dfe86f1d5463e37bb5df1138275054f5..fa0ebfb8f9ec6d9f011c612e843142550081bb2c 100644 (file)
@@ -7,10 +7,10 @@
  */
 package org.opendaylight.transportpce.servicehandler.listeners;
 
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.ServicePathRpcResult;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.TransportpcePceListener;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.RpcStatusEx;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.ServicePathNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.ServicePathRpcResult;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.TransportpcePceListener;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.RpcStatusEx;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.ServicePathNotificationTypes;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index dbf6e01211a54d32cb010cb7c5bd7fb7dd96d806..3d06f96f9bf3923b633892ab144ec7c5239258e1 100644 (file)
@@ -10,17 +10,17 @@ package org.opendaylight.transportpce.servicehandler.service;
 import org.opendaylight.transportpce.pce.service.PathComputationService;
 import org.opendaylight.transportpce.servicehandler.MappingConstraints;
 import org.opendaylight.transportpce.servicehandler.ModelMappingUtils;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.sdnc.request.header.SdncRequestHeader;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.RoutingConstraintsSp;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.handler.header.ServiceHandlerHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.handler.header.ServiceHandlerHeaderBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -64,7 +64,7 @@ public class PCEServiceWrapper {
                 .setServiceHandlerHeader(serviceHandlerHeader.build())
                 .setHardConstraints(hardConstraints)
                 .setSoftConstraints(softConstraints)
-                .setPceMetric(RoutingConstraintsSp.PceMetric.TEMetric)
+                .setPceMetric(PceMetric.TEMetric)
                 .setServiceAEnd(ModelMappingUtils.createServiceAEnd(serviceCreateInput.getServiceAEnd()))
                 .setServiceZEnd(ModelMappingUtils.createServiceZEnd(serviceCreateInput.getServiceZEnd()))
                 .build();
index f097c7159aa2c73b85b638eb41010693928fbfef..90a883c49390738185738aa464dcffebe3f2aaac 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.transportpce.servicehandler.service;
 
 import java.util.Optional;
 import org.opendaylight.transportpce.common.OperationResult;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.State;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceCreateInput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.Services;
index d2e2c2d025021b7ea0a146a92c77ebe2dd23b39d..372b7b801be95041298ab4d436c9b61c1e8caddc 100644 (file)
@@ -12,7 +12,6 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
-
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
@@ -20,7 +19,7 @@ import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.OperationResult;
 import org.opendaylight.transportpce.common.Timeouts;
 import org.opendaylight.transportpce.servicehandler.ModelMappingUtils;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.State;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceCreateInput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceList;
@@ -28,9 +27,9 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.Service
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.Services;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.ServicesBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.ServicesKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServicePathList;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePaths;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePathsKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePathsKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index 883821d0dad04df6e585e9f4088d9e419cfa8585..1fe4ee7de9274fcb7abfebb77677fa52bed7754a 100644 (file)
@@ -91,41 +91,41 @@ public class MappingConstraintsTest {
     public void serviceToServicePathConstarintsParameterizedConstructor() {
         this.mappingConstraints = new MappingConstraints(
             new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-            .routing.constraints.rev170426.routing.constraints.sp.HardConstraintsBuilder()
+            .routing.constraints.rev171017.routing.constraints.sp.HardConstraintsBuilder()
             .setCustomerCode(Arrays.asList("Some customer-code"))
             .setCoRoutingOrGeneral(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
-                .constraints.rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder()
+                .constraints.rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder()
                 .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
-                    .constraints.rev170426.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
+                    .constraints.rev171017.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
                     .setExistingService(Arrays.asList("Some existing-service"))
                     .build())
                 .build()).build(),
             new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-                .routing.constraints.rev170426.routing.constraints.sp.SoftConstraintsBuilder()
+                .routing.constraints.rev171017.routing.constraints.sp.SoftConstraintsBuilder()
                 .setCustomerCode(Arrays.asList("Some customer-code"))
                 .setCoRoutingOrGeneral(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
-                    .constraints.rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder()
+                    .constraints.rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder()
                     .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
-                        .constraints.rev170426.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
+                        .constraints.rev171017.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
                         .setExistingService(Arrays.asList("Some existing-service"))
                         .build())
                     .build()).build());
 
         this.mappingConstraints.serviceToServicePathConstarints();
         Assert.assertEquals(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
-            .constraints.rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder()
+            .constraints.rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder()
             .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
-                .constraints.rev170426.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
+                .constraints.rev171017.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
                 .setExistingService(Arrays.asList("Some existing-service"))
                 .build())
             .build(), this.mappingConstraints.getServicePathHardConstraints().getCoRoutingOrGeneral());
         Assert.assertEquals(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-            .routing.constraints.rev170426.routing.constraints.sp.SoftConstraintsBuilder()
+            .routing.constraints.rev171017.routing.constraints.sp.SoftConstraintsBuilder()
             .setCustomerCode(Arrays.asList("Some customer-code"))
             .setCoRoutingOrGeneral(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
-                .constraints.rev170426.constraints.sp.co.routing.or.general.CoRoutingBuilder()
+                .constraints.rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder()
                 .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
-                    .constraints.rev170426.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
+                    .constraints.rev171017.constraints.sp.co.routing.or.general.co.routing.CoRoutingBuilder()
                     .setExistingService(Arrays.asList("Some existing-service"))
                     .build())
                 .build()).build(), this.mappingConstraints.getServicePathSoftConstraints());
index 62aecaa3338d471d9d44dbe15caa7049036cb1ac..5dbb939b6b7390c8e1118ab68a47ce8db0aca57d 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.transportpce.pce.utils.NotificationPublishServiceMock;
 import org.opendaylight.transportpce.servicehandler.service.PCEServiceWrapper;
 import org.opendaylight.transportpce.servicehandler.utils.ServiceDataUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.ConnectionType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161014.constraints.co.routing.or.general.CoRoutingBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161014.routing.constraints.HardConstraintsBuilder;
@@ -29,8 +29,8 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.Service
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceReconfigureInputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.Services;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.ServicesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePaths;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.path.list.ServicePathsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePathsBuilder;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 
 
index 3e277512f73e7e8e0ba7b36aaa5eb2f635879c0d..561935a8db72e85242cf9feeb5765efe7160a4ab 100644 (file)
@@ -42,8 +42,11 @@ import org.opendaylight.transportpce.servicehandler.stub.StubRendererServiceOper
 import org.opendaylight.transportpce.servicehandler.utils.ServiceDataUtils;
 import org.opendaylight.transportpce.servicehandler.validation.checks.ComplianceCheckResult;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.RpcActions;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommon;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommonBuilder;
@@ -67,8 +70,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.Service
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.delete.input.ServiceDeleteReqInfoBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.Services;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.ServicesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutputBuilder;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -881,15 +882,13 @@ public class ServiceHandlerImplTest extends AbstractTest {
         ServiceDeleteInput serviceDeleteInput = ServiceDataUtils.buildServiceDeleteInput();
         Optional<Services> service = Optional.of(new ServicesBuilder().setServiceName("service 1").build());
         Mockito.when(this.serviceDataStoreOperationsMock.getService("service 1")).thenReturn(service);
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
-            .ServiceDeleteInput input = ModelMappingUtils
-                .createServiceDeleteInput(serviceDeleteInput);
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+            .ServiceDeleteInput input = ModelMappingUtils.createServiceDeleteInput(serviceDeleteInput);
         ConfigurationResponseCommon configurationResponseCommon = new ConfigurationResponseCommonBuilder()
                 .setAckFinalIndicator(ResponseCodes.FINAL_ACK_YES).setRequestId("1")
                 .setResponseCode(ResponseCodes.RESPONSE_FAILED).setResponseMessage("success").build();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
-            .ServiceDeleteOutput output = new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-                .servicepath.rev170426.ServiceDeleteOutputBuilder()
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+            .ServiceDeleteOutput output = new ServiceDeleteOutputBuilder()
                 .setConfigurationResponseCommon(configurationResponseCommon).build();
         Mockito.when(this.rendererServiceOperationsMock.serviceDelete(input)).thenReturn(output);
         ServiceDeleteOutput result = this.serviceHandlerImplMock.serviceDelete(serviceDeleteInput).get().getResult();
@@ -904,15 +903,13 @@ public class ServiceHandlerImplTest extends AbstractTest {
         ServiceDeleteInput serviceDeleteInput = ServiceDataUtils.buildServiceDeleteInput();
         Optional<Services> service = Optional.of(new ServicesBuilder().setServiceName("service 1").build());
         Mockito.when(this.serviceDataStoreOperationsMock.getService("service 1")).thenReturn(service);
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
-            .ServiceDeleteInput input = ModelMappingUtils
-                .createServiceDeleteInput(serviceDeleteInput);
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+            .ServiceDeleteInput input = ModelMappingUtils.createServiceDeleteInput(serviceDeleteInput);
         ConfigurationResponseCommon configurationResponseCommon = new ConfigurationResponseCommonBuilder()
                 .setAckFinalIndicator(ResponseCodes.FINAL_ACK_YES).setRequestId("1")
                 .setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("success").build();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
-            .ServiceDeleteOutput output = new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-                .servicepath.rev170426.ServiceDeleteOutputBuilder()
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+            .ServiceDeleteOutput output = new ServiceDeleteOutputBuilder()
                 .setConfigurationResponseCommon(configurationResponseCommon).build();
         Mockito.when(this.rendererServiceOperationsMock.serviceDelete(input)).thenReturn(output);
         Mockito.when(this.serviceDataStoreOperationsMock
@@ -933,15 +930,13 @@ public class ServiceHandlerImplTest extends AbstractTest {
         ServiceDeleteInput serviceDeleteInput = ServiceDataUtils.buildServiceDeleteInput();
         Optional<Services> service = Optional.of(new ServicesBuilder().setServiceName("service 1").build());
         Mockito.when(this.serviceDataStoreOperationsMock.getService("service 1")).thenReturn(service);
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
-            .ServiceDeleteInput input = ModelMappingUtils
-                .createServiceDeleteInput(serviceDeleteInput);
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+            .ServiceDeleteInput input = ModelMappingUtils.createServiceDeleteInput(serviceDeleteInput);
         ConfigurationResponseCommon configurationResponseCommon = new ConfigurationResponseCommonBuilder()
                 .setAckFinalIndicator(ResponseCodes.FINAL_ACK_YES).setRequestId("1")
                 .setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("success").build();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
-            .ServiceDeleteOutput output = new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-                .servicepath.rev170426.ServiceDeleteOutputBuilder()
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+            .ServiceDeleteOutput output = new ServiceDeleteOutputBuilder()
                 .setConfigurationResponseCommon(configurationResponseCommon).build();
         Mockito.when(this.rendererServiceOperationsMock.serviceDelete(input)).thenReturn(output);
         Mockito.when(this.serviceDataStoreOperationsMock
@@ -962,14 +957,14 @@ public class ServiceHandlerImplTest extends AbstractTest {
         ServiceDeleteInput serviceDeleteInput = ServiceDataUtils.buildServiceDeleteInput();
         Optional<Services> service = Optional.of(new ServicesBuilder().setServiceName("service 1").build());
         Mockito.when(this.serviceDataStoreOperationsMock.getService("service 1")).thenReturn(service);
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
             .ServiceDeleteInput input = ModelMappingUtils.createServiceDeleteInput(serviceDeleteInput);
         ConfigurationResponseCommon configurationResponseCommon = new ConfigurationResponseCommonBuilder()
                 .setAckFinalIndicator(ResponseCodes.FINAL_ACK_YES).setRequestId("1")
                 .setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("success").build();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
-            .ServiceDeleteOutput output = new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-                .servicepath.rev170426.ServiceDeleteOutputBuilder()
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+            .ServiceDeleteOutput output = new org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer
+                .rev171017.ServiceDeleteOutputBuilder()
                 .setConfigurationResponseCommon(configurationResponseCommon).build();
         Mockito.when(this.rendererServiceOperationsMock.serviceDelete(input)).thenReturn(output);
         Mockito.when(this.serviceDataStoreOperationsMock
@@ -1005,14 +1000,14 @@ public class ServiceHandlerImplTest extends AbstractTest {
         Services serviceMock = ModelMappingUtils.mappingServices(serviceInput, null);
         Optional<Services> service = Optional.of(serviceMock);
         Mockito.when(this.serviceDataStoreOperationsMock.getService(any(String.class))).thenReturn(service);
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
             .ServiceDeleteInput input = ModelMappingUtils.createServiceDeleteInput(serviceRerouteinput, service.get());
         ConfigurationResponseCommon configurationResponseCommon = new ConfigurationResponseCommonBuilder()
                 .setAckFinalIndicator(ResponseCodes.FINAL_ACK_YES).setRequestId("1")
                 .setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("success").build();
-        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
-            .ServiceDeleteOutput output = new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
-                .servicepath.rev170426.ServiceDeleteOutputBuilder()
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
+            .ServiceDeleteOutput output = new org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer
+                .rev171017.ServiceDeleteOutputBuilder()
                 .setConfigurationResponseCommon(configurationResponseCommon).build();
         Mockito.when(this.rendererServiceOperationsMock.serviceDelete(input)).thenReturn(output);
         Mockito.when(this.serviceDataStoreOperationsMock
index 7e576cc54ca8e24d8a71378e8bd0b4f2ca1f5415..80c4bc1e38ef8e33b218c2544450a86044562fe0 100644 (file)
@@ -10,10 +10,11 @@ package org.opendaylight.transportpce.servicehandler.listensers;
 import org.junit.Test;
 import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
 import org.opendaylight.transportpce.servicehandler.utils.ServiceDataUtils;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.ServicePathRpcResult;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.ServicePathRpcResultBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.RpcStatusEx;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.ServicePathNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.ServicePathRpcResult;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.ServicePathRpcResultBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.RpcStatusEx;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.ServicePathNotificationTypes;
+
 
 public class PceListenserImplTest {
 
index 53ac744649bf745e5eaf338415da809b2176c24b..eec103d6999ee945b0ed569443792a6da03d4c6f 100644 (file)
@@ -19,8 +19,8 @@ import org.opendaylight.transportpce.pce.service.PathComputationServiceImpl;
 import org.opendaylight.transportpce.pce.utils.NotificationPublishServiceMock;
 import org.opendaylight.transportpce.servicehandler.utils.ServiceDataUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.CancelResourceReserveInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.RpcActions;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.sdnc.request.header.SdncRequestHeader;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.sdnc.request.header.SdncRequestHeaderBuilder;
index 60616616a856566a289a441dabf07a0b61cea56b..a19eec6d4015660f0cd98e0aaa0a5e891872d328 100644 (file)
@@ -21,7 +21,7 @@ import org.opendaylight.transportpce.servicehandler.impl.ServicehandlerImpl;
 import org.opendaylight.transportpce.servicehandler.stub.StubRendererServiceOperations;
 import org.opendaylight.transportpce.servicehandler.utils.ServiceDataUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.State;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceCreateInput;
 
index 37c926b29352cbd62a6692b9f5f6b09771540f84..d87a4a7f794e1f3ce078ee871d0ad44279e5ed51 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.transportpce.servicehandler.stub;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutput;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index 1fe514c5b843b1a1e4a5a05718c529781f8f7292..24b40e3469397604683c2c4fde3d11e38a5951eb 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.transportpce.servicehandler.stub;
 
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.service.handler.header.ServiceHandlerHeader;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.handler.header.ServiceHandlerHeader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -44,7 +44,7 @@ public class StubrendererCompliancyCheck {
      */
     public Boolean checkString(String value) {
         Boolean result = false;
-        if (value != null && value.compareTo("") != 0) {
+        if ((value != null) && (value.compareTo("") != 0)) {
             result = true;
         }
         return result;
index ccdf7d3c91e90d67f736f5ab44f55b21d379d4be..630fb67c67d5dece88af05ad9151ca4719317757 100644 (file)
 package org.opendaylight.transportpce.servicehandler.stub;
 
 import com.google.common.util.concurrent.ListenableFuture;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestOutputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutputBuilder;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
index acdb2288502cb9470abac83689e69451e90c9473..2006b4ce75748b3a9f7619536678f07545b88e4e 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.transportpce.servicehandler.utils;
 import java.time.OffsetDateTime;
 import java.time.ZoneOffset;
 import java.time.format.DateTimeFormatter;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.ServicePathRpcResult;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.ServicePathRpcResultBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.service.path.rpc.result.PathDescription;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.service.path.rpc.result.PathDescriptionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.ServicePathRpcResult;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.ServicePathRpcResultBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.service.path.rpc.result.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.service.path.rpc.result.PathDescriptionBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.ConnectionType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.RpcActions;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.ServiceFormat;
@@ -28,12 +28,12 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.Service
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceRerouteInputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.delete.input.ServiceDeleteReqInfo;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.delete.input.ServiceDeleteReqInfoBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.AToZDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.path.description.ZToADirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.RpcStatusEx;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.ServicePathNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.RpcStatusEx;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.ServicePathNotificationTypes;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 
 public final class ServiceDataUtils {