Merge "ROADM To ROADM Path Calculation"
authorGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 14 Nov 2018 10:15:25 +0000 (10:15 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 14 Nov 2018 10:15:25 +0000 (10:15 +0000)
100 files changed:
api/src/main/yang/service_path/transportpce-common-types@2017-09-07.yang [moved from api/src/main/yang/org-transportpce-common-types@2017-09-07.yang with 98% similarity]
api/src/main/yang/service_path/transportpce-pce@2017-04-26.yang [moved from api/src/main/yang/pce@2017-04-26.yang with 99% similarity]
api/src/main/yang/service_path/transportpce-pce@2017-10-17.yang [moved from api/src/main/yang/service_path/transportpce-pce.yang with 96% similarity]
api/src/main/yang/service_path/transportpce-renderer-device@2017-02-28.yang [moved from api/src/main/yang/renderer@2017-02-28.yang with 85% similarity]
api/src/main/yang/service_path/transportpce-renderer@2017-10-17.yang [moved from api/src/main/yang/service_path/transportpce-renderer.yang with 94% similarity]
api/src/main/yang/service_path/transportpce-service-path@2017-10-17.yang [new file with mode: 0644]
api/src/main/yang/service_path/transportpce-servicehandler@2017-09-30.yang [moved from api/src/main/yang/servicehandler.yang with 98% similarity]
api/src/main/yang/service_path/transportpce-servicehandler@2017-10-17.yang [moved from api/src/main/yang/service_path/transportpce-servicehandler.yang with 94% similarity]
api/src/main/yang/transportpce-alarmsuppression@2017-11-02.yang [moved from api/src/main/yang/alarmsuppression@2017-11-02.yang with 87% similarity]
api/src/main/yang/transportpce-networkutils@2017-08-18.yang [moved from api/src/main/yang/networkutils@2017-08-18.yang with 93% similarity]
api/src/main/yang/transportpce-olm@2017-04-18.yang [moved from api/src/main/yang/olm@2017-04-18.yang with 95% similarity]
api/src/main/yang/transportpce-portmapping@2017-02-28.yang [moved from api/src/main/yang/portmapping@2017-02-28.yang with 93% similarity]
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMapping.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingImpl.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/NetworkModelProvider.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/NetworkUtilsImpl.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/OrdLink.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/R2RLinkDiscovery.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/Rdm2XpdrLink.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/AlarmNotificationListener.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/LinkIdUtil.java
olm/src/main/java/org/opendaylight/transportpce/olm/OlmPowerServiceRpcImpl.java
olm/src/main/java/org/opendaylight/transportpce/olm/OlmProvider.java
olm/src/main/java/org/opendaylight/transportpce/olm/power/PowerMgmt.java
olm/src/main/java/org/opendaylight/transportpce/olm/service/OlmPowerService.java
olm/src/main/java/org/opendaylight/transportpce/olm/service/OlmPowerServiceImpl.java
olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils.java
olm/src/main/java/org/opendaylight/transportpce/olm/util/RoadmLinks.java [deleted file]
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/ServicePathInputData.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmInterfaceFactory.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/DeviceRendererService.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/DeviceRendererServiceImpl.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/provisiondevice/tasks/DeviceRenderingRollbackTask.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/tasks/DeviceRenderingTask.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/tasks/OlmPowerSetupRollbackTask.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/tasks/OlmPowerSetupTask.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/rpcs/DeviceRendererRPCImpl.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/rpcs/TransportPCEServicePathRPCImpl.java
renderer/src/main/resources/org/opendaylight/blueprint/renderer-blueprint.xml
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/DeviceRendererServiceImplCreateOtsOmsTest.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/provisiondevice/DeviceRendererServiceImplDeleteTest.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/provisiondevice/DeviceRendererServiceImplRollbackTest.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/provisiondevice/DeviceRendererServiceImplSetupTest.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/stub/OlmServiceStub.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/CreateOtsOmsDataUtils.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/MountPointUtils.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/main/java/org/opendaylight/transportpce/servicehandler/stub/StubRendererServiceOperations.java [moved from servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubRendererServiceOperations.java with 79% similarity]
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererCompliancyCheck.java [moved from servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererCompliancyCheck.java with 95% similarity]
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererImpl.java [moved from servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererImpl.java with 82% similarity]
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/utils/ServiceDataUtils.java
tests/SH_stubs.diff
tests/transportpce_tests/test_olm.py
tests/transportpce_tests/test_pce.py
tests/transportpce_tests/test_portmapping.py
tests/transportpce_tests/test_renderer_service_path_nominal.py
tests/transportpce_tests/test_servicehandler.py
tests/transportpce_tests/test_topoPortMapping.py
tests/transportpce_tests/test_topology.py

similarity index 98%
rename from api/src/main/yang/org-transportpce-common-types@2017-09-07.yang
rename to api/src/main/yang/service_path/transportpce-common-types@2017-09-07.yang
index 27c52c5bb8403b24f878a922a746ca1566b1a356..7fcc41407203a1f046700892ed5c095776a06639 100644 (file)
@@ -1,4 +1,4 @@
-module org-transportpce-common-types {
+module transportpce-common-types {
     namespace "http://org/transportpce/common-types";
     prefix org-transportpce-common-types;
 
similarity index 99%
rename from api/src/main/yang/pce@2017-04-26.yang
rename to api/src/main/yang/service_path/transportpce-pce@2017-04-26.yang
index 76630a4e470b5bb41c344f72baf4abce11341336..2e665ab3349e90df2e37e3858b40612797fb6107 100644 (file)
@@ -1,9 +1,7 @@
-module pce {
-    yang-version 1;
+module transportpce-pce {
     namespace "http://org/opendaylight/transportpce/pce";
     prefix "org-opendaylight-transportpce-pce";
 
-
     import ietf-yang-types {
         prefix yang;
         revision-date 2013-07-15;
@@ -75,7 +73,7 @@ module pce {
       revision 2017-04-26 {
           description
             "Version 1.5";
-        }
+      }
 
       rpc path-computation-request {
         input {
similarity index 96%
rename from api/src/main/yang/service_path/transportpce-pce.yang
rename to api/src/main/yang/service_path/transportpce-pce@2017-10-17.yang
index ca2708f823f33ce56a18d9dc670b91d97f1c39e9..6c1c942cb8e607e638ce32f1dba4d614d1676c45 100644 (file)
@@ -1,6 +1,6 @@
 module transportpce-pce {
-  namespace "http://org/transportpce/B-interface/pce";
-  prefix transportpce-pce;
+    namespace "http://org/opendaylight/transportpce/pce";
+    prefix "org-opendaylight-transportpce-pce";
 
   import ietf-yang-types {
     prefix yang;
@@ -56,6 +56,11 @@ module transportpce-pce {
       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
+  revision 2017-04-26 {
+      description
+        "Version 1.5";
+  }
+
   revision 2017-10-17 {
     description
       "Version 1.6";
similarity index 85%
rename from api/src/main/yang/renderer@2017-02-28.yang
rename to api/src/main/yang/service_path/transportpce-renderer-device@2017-02-28.yang
index d3cb4b77afb088701f399b2ba910a8b0879ac32b..2c3bd483aa673ee2a54f6d75b220a7f736c0d43b 100644 (file)
@@ -1,9 +1,8 @@
-module renderer {
-  yang-version 1;
-  namespace "urn:opendaylight:params:xml:ns:yang:renderer";
-  prefix "renderer";
+module transportpce-device-renderer {
+  namespace "http://org/opendaylight/transportpce/renderer/device";
+  prefix "org-opendaylight-transportpce-renderer-device";
 
-  import org-transportpce-common-types {
+  import transportpce-common-types {
       prefix org-transportpce-common-types;
       revision-date 2017-09-07;
   }
@@ -19,7 +18,7 @@ module renderer {
                  Shweta Vachhani ( sv111y@att.com )";
 
   revision "2017-02-28" {
-    description "Initial revision of renderer model";
+    description "Initial revision of renderer model version 1.5";
   }
 
   rpc service-path {
similarity index 94%
rename from api/src/main/yang/service_path/transportpce-renderer.yang
rename to api/src/main/yang/service_path/transportpce-renderer@2017-10-17.yang
index 1051a35199ed7482cc8c923f20aaa4d297ee2d4d..ff472a71c23a22b1130e2cd3236f9cf66c3b7b18 100644 (file)
@@ -1,12 +1,13 @@
 module transportpce-renderer {
-  namespace "http://org/transportpce/C-interface/renderer";
-  prefix transportpce-renderer;
+    namespace "http://org/opendaylight/transportpce/renderer";
+    prefix "org-opendaylight-transportpce-renderer";
 
   import ietf-yang-types {
     prefix yang;
   }
   import org-openroadm-common-service-types {
     prefix org-openroadm-common-service-types;
+    revision-date 2016-10-14;
   }
   import transportpce-common-service-path-types {
     prefix transportpce-common-service-path-types;
@@ -55,6 +56,10 @@ module transportpce-renderer {
       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
+  revision "2017-02-28" {
+      description "Initial revision of renderer model version 1.5";
+  }
+
   revision 2017-10-17 {
     description
       "Version 1.6";
diff --git a/api/src/main/yang/service_path/transportpce-service-path@2017-10-17.yang b/api/src/main/yang/service_path/transportpce-service-path@2017-10-17.yang
new file mode 100644 (file)
index 0000000..82a6a69
--- /dev/null
@@ -0,0 +1,66 @@
+module transportpce-servicepath {
+  namespace "http://org/transportpce/B-C-interface/servicepath";
+  prefix transportpce-servicepath;
+
+  import ietf-yang-types {
+    prefix yang;
+  }
+  import transportpce-common-service-path-types {
+    prefix transportpce-common-service-path-types;
+    revision-date 2017-10-16; 
+  }
+
+  organization
+    "transportPCE";
+  contact
+    "transportPCE committers - ODL";
+  description
+    "YANG definitions for service-path (transportPCE). Adapted from service definition (openroadm)
+     Copyright Â© 2017 Orange, Inc. and others.  All rights reserved.
+
+     openroadm copyright:
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      AT&T Intellectual Property.  All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2017-04-26 {
+      description
+        "Version 1.5";
+  }
+  revision 2017-10-17 {
+    description
+      "Version 1.6";
+  }
+
+  container service-path-list {
+    description
+      "List of service paths. Can only be created, deleted, modified, etc. using special RPCs.";
+    list service-paths {
+      key "service-path-name";
+      uses transportpce-common-service-path-types:service-path;
+    }
+  }
+
+}
similarity index 98%
rename from api/src/main/yang/servicehandler.yang
rename to api/src/main/yang/service_path/transportpce-servicehandler@2017-09-30.yang
index b33130fa5968192a77f10021dad9d36fe877f627..ea2fc116454b0fe46bb0f1b3b9f8c648fedd3313 100644 (file)
@@ -1,4 +1,4 @@
-module servicehandler {
+module transportpce-servicehandler {
   namespace "http://org/opendaylight/transportpce/servicehandler";
   prefix "org-opendaylight-transportpce-servicehandler";
 
similarity index 94%
rename from api/src/main/yang/service_path/transportpce-servicehandler.yang
rename to api/src/main/yang/service_path/transportpce-servicehandler@2017-10-17.yang
index feed6e1fc4d6d24b2b59549b014b8c2ce7268b1a..cf7858f93abf0b52175633d4be90aa12866c8a27 100644 (file)
@@ -1,6 +1,6 @@
 module transportpce-servicehandler {
-  namespace "http://org/transportpce/B-C-interface/servicehandler";
-  prefix transportpce-servicehandler;
+    namespace "http://org/opendaylight/transportpce/servicehandler";
+    prefix "org-opendaylight-transportpce-servicehandler";
 
   import ietf-yang-types {
     prefix yang;
@@ -69,6 +69,13 @@ module transportpce-servicehandler {
     description
       "Version 1.6";
   }
+  
+  revision 2017-09-30 {
+      description
+        "Version 1.2";
+  }
+  
+  
   notification service-rpc-result-sh{
     description
       "This Notification indicates result of service RPC";
similarity index 87%
rename from api/src/main/yang/alarmsuppression@2017-11-02.yang
rename to api/src/main/yang/transportpce-alarmsuppression@2017-11-02.yang
index 2ddce0035130aa12bde6f2815d54d453abce7813..8d165da3e39c61103acd40f7ab878622b3595f8f 100644 (file)
@@ -1,7 +1,7 @@
-module alarmsuppression {
+module transportpce-alarmsuppression {
   yang-version 1;
-  namespace "urn:opendaylight:params:xml:ns:yang:alarmsuppression";
-  prefix "alarmsuppression";
+  namespace "http://org/opendaylight/transportpce/alarmsuppression";
+  prefix "org-opendaylight-transportpce-alarmsuppression";
 
  organization
     "transportPCE";
similarity index 93%
rename from api/src/main/yang/networkutils@2017-08-18.yang
rename to api/src/main/yang/transportpce-networkutils@2017-08-18.yang
index d4f872781c2cf3db858b940888c130b6da1c7499..1a1a0c73bc340b2b0afde58941ae35656d74e3fd 100644 (file)
@@ -1,7 +1,7 @@
-module networkutils {
+module transportpce-networkutils {
     yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:networkutils";
-    prefix "networkutils";
+    namespace "http://org/opendaylight/transportpce/networkutils";
+    prefix "org-opendaylight-transportpce-networkutils";
 
     revision "2017-08-18" {
         description "Initial revision of networkutils model";
similarity index 95%
rename from api/src/main/yang/olm@2017-04-18.yang
rename to api/src/main/yang/transportpce-olm@2017-04-18.yang
index b970eccbc696f48bb212d9cf06d0c4c232e9abae..60e3486589bbe851d58a0e208d78a61123fd237f 100644 (file)
@@ -1,9 +1,9 @@
-module olm {
+module transportpce-olm {
   yang-version 1;
-  namespace "urn:opendaylight:params:xml:ns:yang:olm";
-  prefix "olm";
+  namespace "http://org/opendaylight/transportpce/olm";
+  prefix "org-opendaylight-transportpce-olm";
 
-  import org-transportpce-common-types {
+  import transportpce-common-types {
       prefix org-transportpce-common-types;
       revision-date 2017-09-07;
   }
@@ -26,6 +26,7 @@ module olm {
   revision "2017-04-18" {
     description "Initial revision of olm model";
   }
+
   rpc get-pm{
    description
       "This RPC fetches from the device a list of pm measurements
similarity index 93%
rename from api/src/main/yang/portmapping@2017-02-28.yang
rename to api/src/main/yang/transportpce-portmapping@2017-02-28.yang
index 7f683fa772d2d7816dcd7b1f95ebedde9072416c..3e892da1995d89967908a08a9f9843387428e0b5 100644 (file)
@@ -1,7 +1,7 @@
-module portmapping {
+module transportpce-portmapping {
   yang-version 1;
-  namespace "urn:opendaylight:params:xml:ns:yang:portmapping";
-  prefix "portmapping";
+  namespace "http://org/opendaylight/transportpce/portmapping";
+  prefix "org-opendaylight-transportpce-portmapping";
 
   import org-openroadm-common-types {
     prefix org-openroadm-common-types;
index a213fd795e7722cd20e41a2af3beab6deb5320b5..a636105c4bda082b50ee2d617ee88dae1c682c5b 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.transportpce.common.mapping;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.Mapping;
 
 public interface PortMapping {
 
index 2ede78500dbf483fa8a4cd32f72d3b5195076a9d..029cf949adb903400e303f38a46235b1901b1c68 100644 (file)
@@ -32,6 +32,17 @@ import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaces;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.Network;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.NetworkBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.NodesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.NodesKey;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.CpToDegree;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.CpToDegreeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.CpToDegreeKey;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.MappingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.MappingKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.NodeTypes;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.CircuitPack;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.Port;
@@ -54,19 +65,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.Inte
 import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.OpenROADMOpticalMultiplex;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.OpticalTransport;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.Protocols1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.lldp.container.Lldp;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.lldp.container.lldp.PortConfig;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.Network;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.NetworkBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.NodesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.NodesKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.CpToDegree;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.CpToDegreeBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.CpToDegreeKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.MappingBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.MappingKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -93,7 +92,8 @@ public class PortMappingImpl implements PortMapping {
         List<Mapping> portMapList = new ArrayList<>();
         InstanceIdentifier<Info> infoIID = InstanceIdentifier.create(OrgOpenroadmDevice.class).child(Info.class);
         Optional<Info> deviceInfoOptional = this.deviceTransactionManager.getDataFromDevice(nodeId,
-            LogicalDatastoreType.OPERATIONAL, infoIID, Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
+            LogicalDatastoreType.OPERATIONAL, infoIID,
+            Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
 
         Info deviceInfo;
         if (deviceInfoOptional.isPresent()) {
@@ -166,24 +166,25 @@ public class PortMappingImpl implements PortMapping {
         for (ConnectionPorts cp : degreeConPorts) {
             String circuitPackName = cp.getCircuitPackName();
             String portName = cp.getPortName().toString();
-            InstanceIdentifier<Ports> portIID = InstanceIdentifier.create(OrgOpenroadmDevice.class).child(
-                CircuitPacks.class, new CircuitPacksKey(circuitPackName)).child(Ports.class, new PortsKey(portName));
+            InstanceIdentifier<Ports> portIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
+                .child(CircuitPacks.class, new CircuitPacksKey(circuitPackName))
+                .child(Ports.class, new PortsKey(portName));
 
             LOG.info("Fetching logical Connection Point value for port {} at circuit pack {}", portName,
                 circuitPackName);
             Optional<Ports> portObject = this.deviceTransactionManager.getDataFromDevice(nodeId,
-                LogicalDatastoreType.OPERATIONAL, portIID, Timeouts.DEVICE_READ_TIMEOUT,
-                Timeouts.DEVICE_READ_TIMEOUT_UNIT);
+                LogicalDatastoreType.OPERATIONAL, portIID,
+                Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
             if (portObject.isPresent()) {
                 Ports port = portObject.get();
                 if (port.getLogicalConnectionPoint() != null) {
-                    LOG.info("Logical Connection Point for {} {} is {}", circuitPackName, portName, port
-                        .getLogicalConnectionPoint());
-                    portMapList.add(createMappingObject(nodeId, port, circuitPackName, port
-                        .getLogicalConnectionPoint()));
+                    LOG.info("Logical Connection Point for {} {} is {}", circuitPackName, portName,
+                        port.getLogicalConnectionPoint());
+                    portMapList.add(createMappingObject(nodeId, port, circuitPackName,
+                        port.getLogicalConnectionPoint()));
                 } else {
-                    LOG.warn("Logical Connection Point value is missing for {} {}", circuitPackName, port
-                        .getPortName());
+                    LOG.warn("Logical Connection Point value is missing for {} {}", circuitPackName,
+                        port.getPortName());
                 }
             } else {
                 LOG.warn("Port {} is not present in node {} in circuit pack {}!", portName, nodeId, circuitPackName);
@@ -207,11 +208,11 @@ public class PortMappingImpl implements PortMapping {
 
         for (int degreeCounter = 1; degreeCounter <= maxDegree; degreeCounter++) {
             LOG.info("Getting Connection ports for Degree Number {}", degreeCounter);
-            InstanceIdentifier<Degree> deviceIID = InstanceIdentifier.create(OrgOpenroadmDevice.class).child(
-                Degree.class, new DegreeKey(degreeCounter));
+            InstanceIdentifier<Degree> deviceIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
+                .child(Degree.class, new DegreeKey(degreeCounter));
             Optional<Degree> ordmDegreeObject = this.deviceTransactionManager.getDataFromDevice(deviceId,
-                LogicalDatastoreType.CONFIGURATION, deviceIID, Timeouts.DEVICE_READ_TIMEOUT,
-                Timeouts.DEVICE_READ_TIMEOUT_UNIT);
+                LogicalDatastoreType.CONFIGURATION,
+                deviceIID, Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
             if (ordmDegreeObject.isPresent()) {
                 degrees.add(ordmDegreeObject.get());
             } else {
@@ -243,23 +244,21 @@ public class PortMappingImpl implements PortMapping {
 
     private boolean createPpPortMapping(String nodeId, Info deviceInfo, List<Mapping> portMapList) {
         // Creating mapping data for SRG's PP
-        HashMap<Integer, List<
-            org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg.CircuitPacks>> srgCps = getSrgCps(
-                nodeId, deviceInfo);
-        Set<Map.Entry<Integer, List<
-            org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg.CircuitPacks>>> circuitPacks = srgCps
-                .entrySet();
-        for (Entry<Integer, List<
-            org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg.CircuitPacks>> entry : circuitPacks) {
+        HashMap<Integer, List<org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg
+            .CircuitPacks>> srgCps = getSrgCps(nodeId, deviceInfo);
+        Set<Map.Entry<Integer, List<org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206
+            .srg.CircuitPacks>>> circuitPacks = srgCps.entrySet();
+        for (Entry<Integer, List<org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg
+                .CircuitPacks>> entry : circuitPacks) {
             Integer srgIndex = entry.getKey();
             for (org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg.CircuitPacks cp : entry
                 .getValue()) {
                 String circuitPackName = cp.getCircuitPackName();
-                InstanceIdentifier<CircuitPacks> cpIID = InstanceIdentifier.create(OrgOpenroadmDevice.class).child(
-                    CircuitPacks.class, new CircuitPacksKey(circuitPackName));
+                InstanceIdentifier<CircuitPacks> cpIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
+                    .child(CircuitPacks.class, new CircuitPacksKey(circuitPackName));
                 Optional<CircuitPacks> circuitPackObject = this.deviceTransactionManager.getDataFromDevice(nodeId,
-                    LogicalDatastoreType.OPERATIONAL, cpIID, Timeouts.DEVICE_READ_TIMEOUT,
-                    Timeouts.DEVICE_READ_TIMEOUT_UNIT);
+                    LogicalDatastoreType.OPERATIONAL, cpIID,
+                    Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
 
                 if (!circuitPackObject.isPresent() || (circuitPackObject.get().getPorts() == null)) {
                     LOG.warn("{} : Circuit pack {} not found or without ports.", nodeId, circuitPackName);
@@ -270,11 +269,13 @@ public class PortMappingImpl implements PortMapping {
                     if (port.getLogicalConnectionPoint() != null) {
                         String logicalConnectionPoint = getLogicalConnectionPort(port, srgIndex);
                         LOG.info("{} : Logical Connection Point for {} {} is {}", nodeId, circuitPackName, port
-                            .getPortName(), logicalConnectionPoint);
+                            .getPortName(),
+                            logicalConnectionPoint);
                         portMapList.add(createMappingObject(nodeId, port, circuitPackName, logicalConnectionPoint));
                     } else if (Port.PortQual.RoadmInternal.equals(port.getPortQual())) {
                         LOG.info("Port is internal, skipping Logical Connection Point missing for {} {}",
-                            circuitPackName, port.getPortName());
+                            circuitPackName,
+                            port.getPortName());
                     } else if (port.getLogicalConnectionPoint() == null) {
                         LOG.info("Value missing, Skipping Logical Connection Point missing for {} {}", circuitPackName,
                             port.getPortName());
@@ -298,12 +299,10 @@ public class PortMappingImpl implements PortMapping {
      * @return List of circuit packs object belonging to- shared risk group
      *         subtree
      */
-    private HashMap<Integer, List<
-        org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg.CircuitPacks>> getSrgCps(String deviceId,
-            Info ordmInfo) {
-        HashMap<Integer, List<
-            org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg.CircuitPacks>> cpPerSrg =
-                new HashMap<>();
+    private HashMap<Integer, List<org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg
+        .CircuitPacks>> getSrgCps(String deviceId, Info ordmInfo) {
+        HashMap<Integer, List<org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg
+            .CircuitPacks>> cpPerSrg = new HashMap<>();
         Integer maxSrg;
         // Get value for max Srg from info subtree, required for iteration
         // if not present assume to be 20 (temporary)
@@ -316,11 +315,11 @@ public class PortMappingImpl implements PortMapping {
             List<org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.srg.CircuitPacks> srgCps =
                 new ArrayList<>();
             LOG.info("Getting Circuitpacks for Srg Number {}", srgCounter);
-            InstanceIdentifier<SharedRiskGroup> srgIID = InstanceIdentifier.create(OrgOpenroadmDevice.class).child(
-                SharedRiskGroup.class, new SharedRiskGroupKey(srgCounter));
+            InstanceIdentifier<SharedRiskGroup> srgIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
+                .child(SharedRiskGroup.class, new SharedRiskGroupKey(srgCounter));
             Optional<SharedRiskGroup> ordmSrgObject = this.deviceTransactionManager.getDataFromDevice(deviceId,
-                LogicalDatastoreType.CONFIGURATION, srgIID, Timeouts.DEVICE_READ_TIMEOUT,
-                Timeouts.DEVICE_READ_TIMEOUT_UNIT);
+                LogicalDatastoreType.CONFIGURATION,
+                srgIID, Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
             if (ordmSrgObject.isPresent()) {
                 srgCps.addAll(ordmSrgObject.get().getCircuitPacks());
                 cpPerSrg.put(ordmSrgObject.get().getSrgNumber(), srgCps);
@@ -355,8 +354,8 @@ public class PortMappingImpl implements PortMapping {
         // Creating for Xponder Line and Client Ports
         InstanceIdentifier<OrgOpenroadmDevice> deviceIID = InstanceIdentifier.create(OrgOpenroadmDevice.class);
         Optional<OrgOpenroadmDevice> deviceObject = this.deviceTransactionManager.getDataFromDevice(nodeId,
-            LogicalDatastoreType.OPERATIONAL, deviceIID, Timeouts.DEVICE_READ_TIMEOUT,
-            Timeouts.DEVICE_READ_TIMEOUT_UNIT);
+            LogicalDatastoreType.OPERATIONAL, deviceIID,
+            Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
 
         // Variable to keep track of number of line ports
         int line = 1;
@@ -380,55 +379,19 @@ public class PortMappingImpl implements PortMapping {
                 if (Port.PortQual.XpdrNetwork.equals(port.getPortQual())) {
                     portMapList.add(createMappingObject(nodeId, port, circuitPackName,
                         "XPDR1-" + OpenRoadmInterfacesImpl.NETWORK_TOKEN + line));
-                //String lcp = port.getLogicalConnectionPoint();
-                //String regex = "XPDR[0-9]+-NETWORK[0-9]+";
-                //checkLogicalConnectionPoint(regex, lcp, nodeId, portMapList, circuitPackName, port, "NETWORK", line);
                     line++;
                 } else if (Port.PortQual.XpdrClient.equals(port.getPortQual())) {
                     portMapList.add(createMappingObject(nodeId, port, circuitPackName,
                         "XPDR1-" + OpenRoadmInterfacesImpl.CLIENT_TOKEN + client));
-                //String lcp = port.getLogicalConnectionPoint();
-                //String regex = "XPDR[0-9]+-CLIENT[0-9]+";
-                //checkLogicalConnectionPoint(regex, lcp, nodeId, portMapList, circuitPackName, port, "CLIENT", client);
                     client++;
                 } else {
-                    LOG.warn("Port type {} not supported", port.getPortQual());
+                    LOG.warn("Not supported type of port! Port type: {}", port.getPortQual());
                 }
             }
         }
         return true;
     }
 
-    private void checkLogicalConnectionPoint(String regex, String logicalConnectionPoint, String nodeId, List<
-        Mapping> portMapList, String circuitPackName, Ports port, String portQual, int index) {
-        if (logicalConnectionPoint.matches(regex)) {
-            Mapping map = createMappingObject(nodeId, port, circuitPackName, logicalConnectionPoint);
-            if (portMapList.stream().filter(mapping -> mapping.getLogicalConnectionPoint().equals(
-                logicalConnectionPoint)).count() > 0) {
-                LOG.warn("{} : logical connection point {} on {}  {} already used. Port can not be used", nodeId,
-                    logicalConnectionPoint, circuitPackName, port.getPortName());
-            } else {
-                portMapList.add(map);
-                LOG.info("{} : logical connection point for {}  {} is {}", nodeId, circuitPackName, port.getPortName(),
-                    logicalConnectionPoint);
-            }
-        } else if (logicalConnectionPoint.isEmpty()) {
-            String lcp = "XPDR0-" + portQual + index;
-            Mapping map = createMappingObject(nodeId, port, circuitPackName, lcp);
-            if (portMapList.contains(map)) {
-                LOG.warn("{} : can not assign logical connection point {} to port {} of circuit pack {}. "
-                    + "Name is already used", nodeId, lcp, port.getPortName(), circuitPackName);
-            } else {
-                portMapList.add(createMappingObject(nodeId, port, circuitPackName, lcp));
-                LOG.info("{} : no logical connection port on {}  {}. Assigning {}.", nodeId, circuitPackName, port
-                    .getPortName(), lcp);
-            }
-        } else {
-            LOG.warn("{} : logical connection point {} on {} {} does not respect OrgOpenRoadm recommendation. Port can "
-                + "not be used.", nodeId, logicalConnectionPoint, circuitPackName, port.getPortName());
-        }
-    }
-
     /**
      * This private method builds the mapping object to be pushed in MD-SAL in
      * order to save port mapping. In case of TTP ports, it also saves the
@@ -454,8 +417,8 @@ public class PortMappingImpl implements PortMapping {
         if (logicalConnectionPoint.contains(OpenRoadmInterfacesImpl.TTP_TOKEN) && (port.getInterfaces() != null)) {
             for (Interfaces interfaces : port.getInterfaces()) {
                 try {
-                    Optional<Interface> openRoadmInterface = this.openRoadmInterfaces.getInterface(nodeId, interfaces
-                        .getInterfaceName());
+                    Optional<Interface> openRoadmInterface = this.openRoadmInterfaces.getInterface(nodeId,
+                        interfaces.getInterfaceName());
                     if (openRoadmInterface.isPresent()) {
                         Class<? extends InterfaceType> interfaceType = openRoadmInterface.get().getType();
                         // Check if interface type is OMS or OTS
@@ -478,30 +441,30 @@ public class PortMappingImpl implements PortMapping {
     }
 
     private CpToDegree createCpToDegreeObject(String circuitPackName, String degreeNumber, String nodeId,
-                                                     Map<String, String> interfaceList) {
+            Map<String, String> interfaceList) {
         String interfaceName = null;
         if (interfaceList.get(circuitPackName) !=  null) {
             interfaceName = interfaceList.get(circuitPackName);
         }
         return new CpToDegreeBuilder().withKey(new CpToDegreeKey(circuitPackName)).setCircuitPackName(circuitPackName)
-            .setDegreeNumber(new Long(degreeNumber)).setInterfaceName(interfaceName).build();
+        .setDegreeNumber(new Long(degreeNumber)).setInterfaceName(interfaceName).build();
     }
 
     private static List<ConnectionPorts> getDegreePorts(List<Degree> degrees) {
-        return degrees.stream().filter(degree -> degree.getConnectionPorts() != null).flatMap(degree -> degree
-            .getConnectionPorts().stream()).collect(Collectors.toList());
+        return degrees.stream().filter(degree -> degree.getConnectionPorts() != null)
+            .flatMap(degree -> degree.getConnectionPorts().stream()).collect(Collectors.toList());
     }
 
     private List<CpToDegree> getCpToDegreeList(List<Degree> degrees, String nodeId,
-                                               Map<String, String> interfaceList) {
+            Map<String, String> interfaceList) {
         List<CpToDegree> cpToDegreeList = new ArrayList<>();
         for (Degree degree : degrees) {
             if (degree.getCircuitPacks() != null) {
                 LOG.info("Inside CP to degree list");
                 cpToDegreeList.addAll(degree.getCircuitPacks().stream()
-                    .map(cp -> createCpToDegreeObject(cp.getCircuitPackName() ,
-                            degree.getDegreeNumber().toString(), nodeId ,interfaceList))
-                    .collect(Collectors.toList()));
+                        .map(cp -> createCpToDegreeObject(cp.getCircuitPackName() ,
+                                degree.getDegreeNumber().toString(), nodeId ,interfaceList))
+                        .collect(Collectors.toList()));
             }
         }
         return cpToDegreeList;
@@ -523,8 +486,8 @@ public class PortMappingImpl implements PortMapping {
      *
      * @return Result true/false based on status of operation.
      */
-    private boolean postPortMapping(Info deviceInfo, List<Mapping> portMapList, Integer nodeType, List<
-        CpToDegree> cp2DegreeList) {
+    private boolean postPortMapping(Info deviceInfo, List<Mapping> portMapList, Integer nodeType,
+        List<CpToDegree> cp2DegreeList) {
         NodesBuilder nodesBldr = new NodesBuilder();
         nodesBldr.withKey(new NodesKey(deviceInfo.getNodeId())).setNodeId(deviceInfo.getNodeId());
         nodesBldr.setNodeType(NodeTypes.forValue(nodeType));
@@ -621,8 +584,8 @@ public class PortMappingImpl implements PortMapping {
             }
             return logicalConnectionPoint;
         }
-        LOG.warn("Unsupported port direction for port {} - {} - LogicalConnectionPoint is null", port, port
-            .getPortDirection());
+        LOG.warn("Unsupported port direction for port {} - {} - LogicalConnectionPoint is null",
+            port, port.getPortDirection());
         return null; // TODO return false or continue?
     }
 
@@ -630,8 +593,8 @@ public class PortMappingImpl implements PortMapping {
     public void deleteMappingData(String nodeId) {
         LOG.info("Deleting Mapping Data corresponding at node '{}'", nodeId);
         WriteTransaction rw = this.dataBroker.newWriteOnlyTransaction();
-        InstanceIdentifier<Nodes> nodesIID = InstanceIdentifier.create(Network.class).child(Nodes.class, new NodesKey(
-            nodeId));
+        InstanceIdentifier<Nodes> nodesIID = InstanceIdentifier.create(Network.class)
+            .child(Nodes.class, new NodesKey(nodeId));
         rw.delete(LogicalDatastoreType.CONFIGURATION, nodesIID);
         try {
             rw.submit().get(1, TimeUnit.SECONDS);
@@ -648,7 +611,7 @@ public class PortMappingImpl implements PortMapping {
         InstanceIdentifier<Ports> portIId = InstanceIdentifier.create(OrgOpenroadmDevice.class).child(
             CircuitPacks.class, new CircuitPacksKey(oldMapping.getSupportingCircuitPackName())).child(Ports.class,
                 new PortsKey(oldMapping.getSupportingPort()));
-        if (oldMapping != null && nodeId != null) {
+        if ((oldMapping != null) && (nodeId != null)) {
             try {
                 Optional<Ports> portObject = this.deviceTransactionManager.getDataFromDevice(nodeId,
                     LogicalDatastoreType.OPERATIONAL, portIId, Timeouts.DEVICE_READ_TIMEOUT,
@@ -677,38 +640,47 @@ public class PortMappingImpl implements PortMapping {
             LOG.error("Impossible to update mapping");
             return false;
         }
-
     }
 
     private Map<String, String> getEthInterfaceList(String nodeId) {
         LOG.info("It is calling get ethernet interface");
         Map<String, String> cpToInterfaceMap = new HashMap<>();
-        InstanceIdentifier<Lldp> lldpIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
-                .child(Protocols.class).augmentation(Protocols1.class).child(Lldp.class);
-        Optional<Lldp> lldpObject = this.deviceTransactionManager.getDataFromDevice(nodeId,
-                LogicalDatastoreType.OPERATIONAL, lldpIID, Timeouts.DEVICE_READ_TIMEOUT,
+        InstanceIdentifier<Protocols> protocolsIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
+                .child(Protocols.class);
+        Optional<Protocols> protocolObject = this.deviceTransactionManager.getDataFromDevice(nodeId,
+                LogicalDatastoreType.OPERATIONAL, protocolsIID, Timeouts.DEVICE_READ_TIMEOUT,
                 Timeouts.DEVICE_READ_TIMEOUT_UNIT);
-        if (lldpObject.isPresent() && (lldpObject.get().getPortConfig() != null)) {
-            for (PortConfig portConfig : lldpObject.get().getPortConfig()) {
+        if (!protocolObject.isPresent() || (protocolObject.get().augmentation(Protocols1.class) == null)) {
+            LOG.warn("LLDP subtree is missing : isolated openroadm device");
+            return cpToInterfaceMap;
+        }
+        List<PortConfig> portConfigList = protocolObject.get().augmentation(Protocols1.class).getLldp().getPortConfig();
+        if (!portConfigList.isEmpty()) {
+            for (PortConfig portConfig : portConfigList) {
                 if (portConfig.getAdminStatus().equals(PortConfig.AdminStatus.Txandrx)) {
                     InstanceIdentifier<Interface> interfaceIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
                             .child(Interface.class, new InterfaceKey(portConfig.getIfName()));
                     Optional<Interface> interfaceObject = this.deviceTransactionManager.getDataFromDevice(nodeId,
                             LogicalDatastoreType.OPERATIONAL, interfaceIID, Timeouts.DEVICE_READ_TIMEOUT,
                             Timeouts.DEVICE_READ_TIMEOUT_UNIT);
-                    if (interfaceObject.isPresent() && (interfaceObject.get().getSupportingCircuitPackName() != null)) {
+                    if (interfaceObject.isPresent()
+                            && (interfaceObject.get().getSupportingCircuitPackName() != null)) {
                         String supportingCircuitPackName = interfaceObject.get().getSupportingCircuitPackName();
                         cpToInterfaceMap.put(supportingCircuitPackName, portConfig.getIfName());
-                        InstanceIdentifier<CircuitPacks> circuitPacksIID = InstanceIdentifier.create(OrgOpenroadmDevice
-                                .class).child(CircuitPacks.class, new CircuitPacksKey(supportingCircuitPackName));
+                        InstanceIdentifier<CircuitPacks> circuitPacksIID = InstanceIdentifier
+                                .create(OrgOpenroadmDevice.class).child(CircuitPacks.class,
+                                        new CircuitPacksKey(supportingCircuitPackName));
                         Optional<CircuitPacks> circuitPackObject = this.deviceTransactionManager.getDataFromDevice(
                                 nodeId, LogicalDatastoreType.OPERATIONAL, circuitPacksIID, Timeouts
                                                 .DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
-                        if (circuitPackObject.isPresent() && (circuitPackObject.get().getParentCircuitPack() != null)) {
-                            cpToInterfaceMap.put(circuitPackObject.get().getParentCircuitPack().getCircuitPackName() ,
-                                    portConfig.getIfName());
+                        if (circuitPackObject.isPresent()
+                                && (circuitPackObject.get().getParentCircuitPack() != null)) {
+                            cpToInterfaceMap.put(circuitPackObject.get().getParentCircuitPack()
+                                    .getCircuitPackName(), portConfig.getIfName());
                         }
                     }
+                } else {
+                    LOG.warn("PortConfig Admi Status is not equal Txandrx");
                 }
             }
         } else {
index e485367a3ef046a2f11cd69d00f32b1a8501ebe1..ff946da7d3d88a4376da3acf545a4ec065611902 100644 (file)
@@ -16,7 +16,7 @@ import org.opendaylight.transportpce.common.InstanceIdentifiers;
 import org.opendaylight.transportpce.networkmodel.util.ClliNetwork;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmNetwork;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmTopology;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.NetworkutilsService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.TransportpceNetworkutilsService;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.slf4j.Logger;
@@ -28,14 +28,14 @@ public class NetworkModelProvider {
 
     private final DataBroker dataBroker;
     private final RpcProviderRegistry rpcProviderRegistry;
-    private final NetworkutilsService networkutilsService;
+    private final TransportpceNetworkutilsService networkutilsService;
     private final NetConfTopologyListener topologyListener;
     private final OpenRoadmTopology openRoadmTopology;
     private ListenerRegistration<NetConfTopologyListener> dataTreeChangeListenerRegistration;
-    private BindingAwareBroker.RpcRegistration<NetworkutilsService> networkutilsServiceRpcRegistration;
+    private BindingAwareBroker.RpcRegistration<TransportpceNetworkutilsService> networkutilsServiceRpcRegistration;
 
     public NetworkModelProvider(final DataBroker dataBroker, final RpcProviderRegistry rpcProviderRegistry,
-            final NetworkutilsService networkutilsService, final NetConfTopologyListener topologyListener,
+            final TransportpceNetworkutilsService networkutilsService, final NetConfTopologyListener topologyListener,
             OpenRoadmTopology openRoadmTopology) {
         this.dataBroker = dataBroker;
         this.rpcProviderRegistry = rpcProviderRegistry;
@@ -56,7 +56,7 @@ public class NetworkModelProvider {
                 dataBroker.registerDataTreeChangeListener(new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL,
                         InstanceIdentifiers.NETCONF_TOPOLOGY_II.child(Node.class)), topologyListener);
         networkutilsServiceRpcRegistration =
-                rpcProviderRegistry.addRpcImplementation(NetworkutilsService.class, networkutilsService);
+                rpcProviderRegistry.addRpcImplementation(TransportpceNetworkutilsService.class, networkutilsService);
     }
 
     /**
index 7100c56c1d2777b03e0f71105860ee26536753df..afadd0ff57513691d919722e7fc191729c0f32ab 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.transportpce.networkmodel;
 
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.ListenableFuture;
-
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
@@ -17,6 +16,19 @@ import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmTopology;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.DeleteLinkInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.DeleteLinkOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.DeleteLinkOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRdmXpdrLinksInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRdmXpdrLinksOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRdmXpdrLinksOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRoadmNodesInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRoadmNodesOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRoadmNodesOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitXpdrRdmLinksInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitXpdrRdmLinksOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitXpdrRdmLinksOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.TransportpceNetworkutilsService;
 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;
@@ -24,26 +36,13 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.top
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.DeleteLinkInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.DeleteLinkOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.DeleteLinkOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitRdmXpdrLinksInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitRdmXpdrLinksOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitRdmXpdrLinksOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitRoadmNodesInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitRoadmNodesOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitRoadmNodesOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitXpdrRdmLinksInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitXpdrRdmLinksOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitXpdrRdmLinksOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.NetworkutilsService;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class NetworkUtilsImpl implements NetworkutilsService {
+public class NetworkUtilsImpl implements TransportpceNetworkutilsService {
 
     private static final Logger LOG = LoggerFactory.getLogger(NetworkUtilsImpl.class);
     private final DataBroker dataBroker;
@@ -98,6 +97,7 @@ public class NetworkUtilsImpl implements NetworkutilsService {
         }
     }
 
+    @Override
     public ListenableFuture<RpcResult<InitRoadmNodesOutput>> initRoadmNodes(InitRoadmNodesInput input) {
         boolean createRdmLinks = OrdLink.createRdm2RdmLinks(input,
                 this.openRoadmTopology,this.dataBroker);
index 408d13adccb885eaeeb63dba1e8f319ee8249937..1f83df4f593a6a98e7f5fc27a55da6fc0cb21f50 100644 (file)
@@ -9,13 +9,13 @@
 package org.opendaylight.transportpce.networkmodel;
 
 import java.util.concurrent.ExecutionException;
-
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.networkmodel.util.LinkIdUtil;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmTopology;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRoadmNodesInput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1Builder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.link.OMSAttributesBuilder;
@@ -28,7 +28,6 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.top
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkBuilder;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitRoadmNodesInput;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index 78b76f2d29111a3119e60648edc1e8b35d8c400e..e7784647eb8452ef78d24649a84d9c7301b0b2eb 100644 (file)
@@ -12,7 +12,6 @@ import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
-
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.MountPoint;
 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
@@ -21,6 +20,12 @@ import org.opendaylight.transportpce.common.Timeouts;
 import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaces;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmTopology;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRoadmNodesInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.Network;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.NodesKey;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.CpToDegree;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev170929.Direction;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.OrgOpenroadmDevice;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.org.openroadm.device.Protocols;
@@ -28,12 +33,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.Protocols1
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.lldp.container.lldp.NbrList;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.lldp.container.lldp.nbr.list.IfName;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitRoadmNodesInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.Network;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.NodesKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.CpToDegree;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -96,7 +95,7 @@ public class R2RLinkDiscovery {
         try (ReadOnlyTransaction readTx = this.dataBroker.newReadOnlyTransaction()) {
             Optional<Nodes> nodesObject = readTx.read(LogicalDatastoreType.CONFIGURATION, nodesIID)
                     .get().toJavaUtil();
-            if (nodesObject.isPresent() && nodesObject.get().getMapping() != null) {
+            if (nodesObject.isPresent() && (nodesObject.get().getMapping() != null)) {
                 List<Mapping> mappingList = nodesObject.get().getMapping();
                 mappingList = mappingList.stream().filter(mp -> mp.getLogicalConnectionPoint().contains("DEG"
                         + degreeCounter)).collect(Collectors.toList());
@@ -249,13 +248,13 @@ public class R2RLinkDiscovery {
         try (ReadOnlyTransaction readTx = this.dataBroker.newReadOnlyTransaction()) {
             Optional<Nodes> nodesObject = readTx.read(LogicalDatastoreType.CONFIGURATION, nodesIID)
                     .get().toJavaUtil();
-            if (nodesObject.isPresent() && nodesObject.get().getCpToDegree() != null) {
+            if (nodesObject.isPresent() && (nodesObject.get().getCpToDegree() != null)) {
                 List<CpToDegree> cpToDeg = nodesObject.get().getCpToDegree();
                 Stream cpToDegStream = cpToDeg.stream().filter(cp -> cp.getInterfaceName() != null)
                         .filter(cp -> cp.getInterfaceName().equals(interfaceName));
                 if (cpToDegStream != null) {
                     Optional<CpToDegree> firstCpToDegree = cpToDegStream.findFirst();
-                    if (firstCpToDegree.isPresent() && firstCpToDegree != null) {
+                    if (firstCpToDegree.isPresent() && (firstCpToDegree != null)) {
                         LOG.debug("Found and returning {}",firstCpToDegree.get().getDegreeNumber().intValue());
                         return firstCpToDegree.get().getDegreeNumber().intValue();
                     } else {
index b67091ee7cc4d4a5b0c22fe6bd046f1dd2b9e7ca..9b748824f87acad21b9a6fece5e7e30fe957b501 100644 (file)
@@ -16,6 +16,7 @@ import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmTopology;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.links.input.grouping.LinksInput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1Builder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmLinkType;
@@ -26,7 +27,6 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1Builder;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.links.input.grouping.LinksInput;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index 80e89c888b9e4d9933bd46782fe610a69018d141..ac2497333e91d6d6952215d2089f98f6f62db3cf 100644 (file)
@@ -14,6 +14,10 @@ import java.util.concurrent.ExecutionException;
 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.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102.ServiceNodelist;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102.service.nodelist.Nodelist;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102.service.nodelist.nodelist.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102.service.nodelist.nodelist.NodesBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.alarm.rev161014.AlarmNotification;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.alarm.rev161014.OrgOpenroadmAlarmListener;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.alarm.rev161014.alarm.ProbableCause;
@@ -29,10 +33,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev161014.resour
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev161014.resource.resource.resource.Service;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev161014.resource.resource.resource.Shelf;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev161014.resource.resource.resource.Srg;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.ServiceNodelist;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.service.nodelist.Nodelist;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.service.nodelist.nodelist.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.service.nodelist.nodelist.NodesBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index cf6eed3be51cdeff1200207656acaf01b8cf3497..d8e037ac0f734e4af8d4d3a0df7694785bc451a6 100644 (file)
@@ -9,8 +9,8 @@
 package org.opendaylight.transportpce.networkmodel.util;
 
 import java.text.MessageFormat;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRoadmNodesInput;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.networkutils.rev170818.InitRoadmNodesInput;
 
 public final class LinkIdUtil {
 
index d793f6d70951ae7f17f9ba8246035c19db8800ab..60b237b7189b639d9400a764e97e67acbd47da58 100644 (file)
@@ -9,26 +9,26 @@ package org.opendaylight.transportpce.olm;
 
 import com.google.common.util.concurrent.ListenableFuture;
 import org.opendaylight.transportpce.olm.service.OlmPowerService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossBaseInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossBaseOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossCurrentInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossCurrentOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerResetInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerResetOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInput;
+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.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
 /**
  * The Class OlmPowerServiceRpcImpl.
  */
-public class OlmPowerServiceRpcImpl implements OlmService {
+public class OlmPowerServiceRpcImpl implements TransportpceOlmService {
     private final OlmPowerService olmPowerService;
 
     public OlmPowerServiceRpcImpl(OlmPowerService olmPowerService) {
index 36343095cab2030eb944c21a94e76a78e7450e7c..b283ef561ec2fcaaa472d99edb58e706686691b3 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.transportpce.olm;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.transportpce.olm.service.OlmPowerService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.TransportpceOlmService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -22,7 +22,7 @@ public class OlmProvider {
     private static final Logger LOG = LoggerFactory.getLogger(OlmProvider.class);
     private final RpcProviderRegistry rpcProviderRegistry;
     private final OlmPowerService olmPowerService;
-    private RpcRegistration<OlmService> olmRPCRegistration;
+    private RpcRegistration<TransportpceOlmService> olmRPCRegistration;
 
     /**
      * Instantiates a new olm provider.
@@ -42,8 +42,8 @@ public class OlmProvider {
     public void init() {
         LOG.info("OlmProvider Session Initiated");
         // Initializing Notification module
-        olmRPCRegistration = rpcProviderRegistry.addRpcImplementation(OlmService.class, new OlmPowerServiceRpcImpl(
-            this.olmPowerService));
+        olmRPCRegistration = rpcProviderRegistry.addRpcImplementation(TransportpceOlmService.class,
+                new OlmPowerServiceRpcImpl(this.olmPowerService));
     }
 
     /**
index 82b11c0b95dfcab73f5f83a5b0731692b9cf37bd..755236d3825a967c72d035632bfc08059e7d5e94 100644 (file)
@@ -24,6 +24,11 @@ import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaces;
 import org.opendaylight.transportpce.olm.util.OlmUtils;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.MappingKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.NodeTypes;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.OpticalControlMode;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.PowerDBm;
@@ -42,11 +47,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.re
 import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.Interface1Builder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.och.container.OchBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.transport.interfaces.rev161014.Interface1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.MappingKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index 63e91cf83df8a9d7eff9f788dd6114bd1b0c8e0e..19206d6d89afe881210eca0b474fc278d41be6c8 100644 (file)
@@ -8,18 +8,18 @@
 
 package org.opendaylight.transportpce.olm.service;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossBaseInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossBaseOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossCurrentInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossCurrentOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerResetInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerResetOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownOutput;
 
 public interface OlmPowerService {
 
index 700409635aac0fb13be7e34b2dbd6917a065b869..c76401a8ee37d066034a2af2d04810b8511b6d13 100644 (file)
@@ -37,6 +37,28 @@ import org.opendaylight.transportpce.common.mapping.PortMapping;
 import org.opendaylight.transportpce.olm.power.PowerMgmt;
 import org.opendaylight.transportpce.olm.util.OlmUtils;
 import org.opendaylight.transportpce.olm.util.OtsPmHolder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossBaseInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossBaseOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossBaseOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossCurrentInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossCurrentOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossCurrentOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerResetInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerResetOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInput;
+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.ServicePowerTurndownOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.calculate.spanloss.base.output.Spans;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.calculate.spanloss.base.output.SpansBuilder;
+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.portmapping.rev170228.network.nodes.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.RatioDB;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.Interface;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceBuilder;
@@ -61,28 +83,6 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.calculate.spanloss.base.output.Spans;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.calculate.spanloss.base.output.SpansBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm.output.Measurements;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 import org.slf4j.Logger;
@@ -98,7 +98,7 @@ public class OlmPowerServiceImpl implements OlmPowerService {
     private final PortMapping portMapping;
 
     public OlmPowerServiceImpl(DataBroker dataBroker, PowerMgmt powerMgmt,
-        DeviceTransactionManager deviceTransactionManager, PortMapping portMapping) {
+            DeviceTransactionManager deviceTransactionManager, PortMapping portMapping) {
         this.dataBroker = dataBroker;
         this.powerMgmt = powerMgmt;
         this.portMapping = portMapping;
@@ -113,6 +113,7 @@ public class OlmPowerServiceImpl implements OlmPowerService {
         LOG.info("close ...");
     }
 
+
     @Override
     public GetPmOutput getPm(GetPmInput pmInput) {
         GetPmOutputBuilder pmOutputBuilder = OlmUtils.pmFetch(pmInput, this.deviceTransactionManager);
@@ -134,7 +135,7 @@ public class OlmPowerServiceImpl implements OlmPowerService {
 
     @Override
     public ServicePowerTurndownOutput servicePowerTurndown(
-        ServicePowerTurndownInput powerTurndownInput) {
+            ServicePowerTurndownInput powerTurndownInput) {
 
         ServicePowerTurndownOutputBuilder powerTurnDownOutput = new ServicePowerTurndownOutputBuilder();
         // TODO add flag or return failure instead of string
@@ -150,17 +151,16 @@ public class OlmPowerServiceImpl implements OlmPowerService {
     public CalculateSpanlossBaseOutput calculateSpanlossBase(CalculateSpanlossBaseInput spanlossBaseInput) {
 
         LOG.info("CalculateSpanlossBase Request received for source type {}", spanlossBaseInput.getSrcType());
-
         List<Link> networkLinks = getNetworkLinks();
         if (networkLinks.isEmpty()) {
             LOG.warn("Failed to get links form {} topology.", NetworkUtils.OVERLAY_NETWORK_ID);
             return new CalculateSpanlossBaseOutputBuilder().setResult(FAILED).build();
         }
 
-        if (!CalculateSpanlossBaseInput.SrcType.All.equals(spanlossBaseInput.getSrcType())) {
+        if (! CalculateSpanlossBaseInput.SrcType.All.equals(spanlossBaseInput.getSrcType())) {
             networkLinks = networkLinks.stream()
-                .filter(link -> link.getLinkId().equals(spanlossBaseInput.getLinkId()))
-                .collect(Collectors.toList());
+                    .filter(link -> link.getLinkId().equals(spanlossBaseInput.getLinkId()))
+                    .collect(Collectors.toList());
         }
 
         List<Link> roadmLinks = new ArrayList<>();
@@ -168,10 +168,11 @@ public class OlmPowerServiceImpl implements OlmPowerService {
             Link1 roadmLinkAugmentation = link.augmentation(Link1.class);
             if (roadmLinkAugmentation == null) {
                 LOG.debug("Missing OpenRoadm link augmentation in link {} from {} topology.",
-                    link.getLinkId().getValue(), NetworkUtils.OVERLAY_NETWORK_ID);
+                        link.getLinkId().getValue(), NetworkUtils.OVERLAY_NETWORK_ID);
                 continue;
             }
             if (OpenroadmLinkType.ROADMTOROADM.equals(roadmLinkAugmentation.getLinkType())) {
+                // Only calculate spanloss for Roadm-to-Roadm links
                 roadmLinks.add(link);
             }
         }
@@ -216,7 +217,7 @@ public class OlmPowerServiceImpl implements OlmPowerService {
             Link1 roadmLinkAugmentation = link.augmentation(Link1.class);
             if (roadmLinkAugmentation == null) {
                 LOG.debug("Missing OpenRoadm link augmentation in link {} from {} topology.",
-                    link.getLinkId().getValue(), NetworkUtils.OVERLAY_NETWORK_ID);
+                        link.getLinkId().getValue(), NetworkUtils.OVERLAY_NETWORK_ID);
                 continue;
             }
             if (OpenroadmLinkType.ROADMTOROADM.equals(roadmLinkAugmentation.getLinkType())) {
@@ -252,22 +253,21 @@ public class OlmPowerServiceImpl implements OlmPowerService {
         NetworkKey overlayTopologyKey = new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID));
 
         InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Network.class, overlayTopologyKey)
-            .augmentation(Network1.class)
-            .build();
+                .augmentation(Network1.class)
+                .build();
         Optional<Network1> networkOptional;
         try (ReadOnlyTransaction rtx = this.dataBroker.newReadOnlyTransaction()) {
-            // TODO change to constant from Timeouts class when it will be
-            // merged.
+            //TODO change to constant from Timeouts class when it will be merged.
             networkOptional = rtx.read(LogicalDatastoreType.CONFIGURATION, networkIID).get(Timeouts.DATASTORE_READ,
-                TimeUnit.MILLISECONDS).toJavaUtil();
+                    TimeUnit.MILLISECONDS).toJavaUtil();
         } catch (InterruptedException | ExecutionException | TimeoutException e) {
             LOG.warn("Read of {} topology failed", NetworkUtils.OVERLAY_NETWORK_ID);
             return Collections.emptyList();
         }
 
-        if (!networkOptional.isPresent()) {
+        if (! networkOptional.isPresent()) {
             LOG.warn("Network augmentation with links data is not present in {} topology.",
-                NetworkUtils.OVERLAY_NETWORK_ID);
+                    NetworkUtils.OVERLAY_NETWORK_ID);
             return Collections.emptyList();
         }
 
@@ -280,21 +280,16 @@ public class OlmPowerServiceImpl implements OlmPowerService {
     }
 
     /**
-     * This method retrieves OTS PM from current PM list by nodeId and TPId:
-     * Steps:
+     * This method retrieves OTS PM from current PM list by nodeId and TPId: Steps:
      *
      * <p>
-     * 1. Get OTS interface name from port mapping by TPId 2. Call getPm RPC to
-     * get OTS PM
+     * 1. Get OTS interface name from port mapping by TPId 2. Call getPm RPC to get OTS PM
      *
      * <p>
      *
-     * @param nodeId
-     *            Node-id of the NE.
-     * @param tpID
-     *            Termination point Name.
-     * @param pmName
-     *            PM name which need to be retrieved
+     * @param nodeId Node-id of the NE.
+     * @param tpID Termination point Name.
+     * @param pmName PM name which need to be retrieved
      * @return reference to OtsPmHolder
      */
     private OtsPmHolder getPmMeasurements(String nodeId, String tpID, String pmName) {
@@ -304,10 +299,10 @@ public class OlmPowerServiceImpl implements OlmPowerService {
             return null;
         }
         GetPmInput getPmInput = new GetPmInputBuilder().setNodeId(realNodeId)
-            .setResourceType(ResourceTypeEnum.Interface).setGranularity(PmGranularity._15min)
-            .setResourceIdentifier(
-                new ResourceIdentifierBuilder().setResourceName(mapping.getSupportingOts()).build())
-            .build();
+                .setResourceType(ResourceTypeEnum.Interface).setGranularity(PmGranularity._15min)
+                .setResourceIdentifier(
+                        new ResourceIdentifierBuilder().setResourceName(mapping.getSupportingOts()).build())
+                .build();
         GetPmOutput otsPmOutput = getPm(getPmInput);
 
         if (otsPmOutput == null) {
@@ -318,7 +313,7 @@ public class OlmPowerServiceImpl implements OlmPowerService {
             for (Measurements measurement : otsPmOutput.getMeasurements()) {
                 if (pmName.equals(measurement.getPmparameterName())) {
                     return new OtsPmHolder(pmName, Double.parseDouble(measurement.getPmparameterValue()),
-                        mapping.getSupportingOts());
+                            mapping.getSupportingOts());
                 }
             }
         } catch (NumberFormatException e) {
@@ -336,18 +331,15 @@ public class OlmPowerServiceImpl implements OlmPowerService {
      * <p>
      * 2. Set spanloss
      *
-     * @param nodeId
-     *            nodeId of NE on which spanloss need to be updated
-     * @param interfaceName
-     *            OTS interface for NE on which spanloss is cacluated
-     * @param spanLoss
-     *            calculated spanloss value
-     * @param direction
-     *            for which spanloss is calculated.It can be either Tx or Rx
+     * @param nodeId nodeId of NE on which spanloss need to be updated
+     * @param interfaceName OTS interface for NE on which spanloss is cacluated
+     * @param spanLoss calculated spanloss value
+     * @param direction for which spanloss is calculated.It can be either Tx or Rx
      * @return true/false
      */
     private boolean setSpanLoss(String nodeId, String interfaceName, BigDecimal spanLoss, String direction) {
         String realNodeId = getRealNodeId(nodeId);
+        LOG.info("Setting Spanloss in device for {}, InterfaceName: {}", realNodeId, interfaceName);
         switch (direction) {
             case "TX":
                 LOG.info("Setting 'span-loss-transmit' in device:  {}, Interface: {}", realNodeId, interfaceName);
@@ -360,11 +352,11 @@ public class OlmPowerServiceImpl implements OlmPowerService {
                 break;
         }
         InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
-            .child(Interface.class, new InterfaceKey(interfaceName));
+                .child(Interface.class, new InterfaceKey(interfaceName));
         com.google.common.base.Optional<Interface> interfaceObject;
         try {
             Future<Optional<DeviceTransaction>> deviceTxFuture =
-                this.deviceTransactionManager.getDeviceTransaction(realNodeId);
+                    this.deviceTransactionManager.getDeviceTransaction(realNodeId);
             java.util.Optional<DeviceTransaction> deviceTxOpt = deviceTxFuture.get();
             DeviceTransaction deviceTx;
             if (deviceTxOpt.isPresent()) {
@@ -401,7 +393,7 @@ public class OlmPowerServiceImpl implements OlmPowerService {
                 interfaceBuilder.addAugmentation(Interface1.class, intf1Builder.setOts(otsBuilder.build()).build());
                 deviceTx.put(LogicalDatastoreType.CONFIGURATION, interfacesIID, interfaceBuilder.build());
                 ListenableFuture<Void> submit =
-                    deviceTx.submit(Timeouts.DEVICE_WRITE_TIMEOUT, Timeouts.DEVICE_WRITE_TIMEOUT_UNIT);
+                        deviceTx.submit(Timeouts.DEVICE_WRITE_TIMEOUT, Timeouts.DEVICE_WRITE_TIMEOUT_UNIT);
                 submit.get();
                 LOG.info("Spanloss Value update completed successfully");
                 return true;
@@ -457,7 +449,7 @@ public class OlmPowerServiceImpl implements OlmPowerService {
 
     private String getRealNodeId(String mappedNodeId) {
         KeyedInstanceIdentifier<Node, NodeKey> mappedNodeII =
-            InstanceIdentifiers.OVERLAY_NETWORK_II.child(Node.class, new NodeKey(new NodeId(mappedNodeId)));
+                InstanceIdentifiers.OVERLAY_NETWORK_II.child(Node.class, new NodeKey(new NodeId(mappedNodeId)));
         com.google.common.base.Optional<Node> realNode;
         try (ReadOnlyTransaction readOnlyTransaction = this.dataBroker.newReadOnlyTransaction()) {
             realNode = readOnlyTransaction.read(LogicalDatastoreType.CONFIGURATION, mappedNodeII).get();
@@ -467,16 +459,16 @@ public class OlmPowerServiceImpl implements OlmPowerService {
         }
         if (!realNode.isPresent() || (realNode.get().getSupportingNode() == null)) {
             throw new IllegalArgumentException(
-                String.format("Could not find node %s, or supporting node is not present", mappedNodeId));
+                    String.format("Could not find node %s, or supporting node is not present", mappedNodeId));
         }
         List<SupportingNode> collect = realNode.get().getSupportingNode().stream()
-            .filter(node -> (node.getNetworkRef() != null)
-                && NetworkUtils.UNDERLAY_NETWORK_ID.equals(node.getNetworkRef().getValue())
-                && (node.getNodeRef() != null) && !Strings.isNullOrEmpty(node.getNodeRef().getValue()))
-            .collect(Collectors.toList());
+                .filter(node -> (node.getNetworkRef() != null)
+                        && NetworkUtils.UNDERLAY_NETWORK_ID.equals(node.getNetworkRef().getValue())
+                        && (node.getNodeRef() != null) && !Strings.isNullOrEmpty(node.getNodeRef().getValue()))
+                .collect(Collectors.toList());
         if (collect.isEmpty() || (collect.size() > 1)) {
             throw new IllegalArgumentException(String.format("Invalid support node count [%d] was found for node %s",
-                collect.size(), mappedNodeId));
+                    collect.size(), mappedNodeId));
         }
         return collect.iterator().next().getNodeRef().getValue();
     }
index 41caec5b6da769400b2f8fe633bae267522b3a31..ff1697554596905365805cfd95d83b6354488cdf 100644 (file)
@@ -8,19 +8,23 @@
 package org.opendaylight.transportpce.olm.util;
 
 import com.google.common.base.Strings;
-
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 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.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.Timeouts;
 import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutputBuilder;
+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.portmapping.rev170228.Network;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.NodesKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.rev161014.CurrentPmlist;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.rev161014.current.pm.Measurements;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.rev161014.currentpmlist.CurrentPm;
@@ -40,12 +44,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev161014.resour
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.get.pm.input.ResourceIdentifier;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.network.topology.topology.topology.types.TopologyNetconf;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm.output.MeasurementsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.Network;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.NodesKey;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
@@ -112,8 +110,8 @@ public final class OlmUtils {
                 .getDataFromDevice(input.getNodeId(), LogicalDatastoreType.OPERATIONAL, currentPmsIID,
                         Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
         if (currentPmList.isPresent()) {
-            List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm.output
-                    .Measurements> measurements = extractWantedMeasurements(currentPmList.get(),
+            List<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.get.pm.output
+                .Measurements> measurements = extractWantedMeasurements(currentPmList.get(),
                     input.getResourceType(), input.getResourceIdentifier(), input.getGranularity());
             if (measurements.isEmpty()) {
                 LOG.error("No Matching PM data found for node: {}, " + "resource type: {}, resource name: {}",
@@ -144,12 +142,12 @@ public final class OlmUtils {
         }
     }
 
-    private static List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm
-            .output.Measurements> extractWantedMeasurements(CurrentPmlist currentPmList,
+    private static List<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.get.pm.output
+        .Measurements> extractWantedMeasurements(CurrentPmlist currentPmList,
             ResourceTypeEnum wantedResourceType, ResourceIdentifier wantedResourceIdentifier,
             PmGranularity wantedGranularity) {
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm
-            .output.Measurements> measurements = new ArrayList<>();
+        List<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.get.pm.output
+            .Measurements> measurements = new ArrayList<>();
         for (CurrentPm pm : currentPmList.getCurrentPm()) {
             ResourceTypeEnum currentResourceType = pm.getResource().getResourceType().getType();
             if (currentResourceType.equals(wantedResourceType)) {
@@ -165,10 +163,10 @@ public final class OlmUtils {
         return measurements;
     }
 
-    private static List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm
-            .output.Measurements> extractMeasurements(List<Measurements> measurementsFromDevice) {
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm.output.Measurements>
-            extractedMeasurements = new ArrayList<>();
+    private static List<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.get.pm.output
+        .Measurements> extractMeasurements(List<Measurements> measurementsFromDevice) {
+        List<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.get.pm.output
+            .Measurements> extractedMeasurements = new ArrayList<>();
         for (Measurements measure : measurementsFromDevice) {
             MeasurementsBuilder measurement = new MeasurementsBuilder();
             if (!measure.getMeasurement().getPmParameterName().getType().equals(PmNamesEnum.VendorExtension)) {
@@ -193,7 +191,7 @@ public final class OlmUtils {
             PmGranularity wantedGranularity) {
         boolean identifiersAreEqual = compareResourceIdentifiers(resource, wantedResourceType,
                 wantedResourceIdentifier);
-        return identifiersAreEqual && granularity != null && granularity.equals(wantedGranularity);
+        return identifiersAreEqual && (granularity != null) && granularity.equals(wantedGranularity);
     }
 
     private static boolean compareResourceIdentifiers(Resource resource, ResourceTypeEnum wantedResourceType,
@@ -263,8 +261,8 @@ public final class OlmUtils {
                         .map(port -> {
                             String portName = port.getPortName();
                             String circuitPackName = port.getCircuitPackName();
-                            return portName != null
-                                    && circuitPackName != null
+                            return (portName != null)
+                                    && (circuitPackName != null)
                                     && portName.equals(wantedResourceIdentifier.getResourceName())
                                     && circuitPackName.equals(wantedResourceIdentifier.getCircuitPackName());
                         })
diff --git a/olm/src/main/java/org/opendaylight/transportpce/olm/util/RoadmLinks.java b/olm/src/main/java/org/opendaylight/transportpce/olm/util/RoadmLinks.java
deleted file mode 100644 (file)
index 6c9de8b..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright Â© 2017 AT&T and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.transportpce.olm.util;
-/**
- * The Class RoadmLinks.
- */
-public class RoadmLinks {
-
-    /** The src node id. */
-    private String srcNodeId;
-
-    /** The src tp id. */
-    private String srcTpId;
-
-    /** The dest node id. */
-    private String destNodeId;
-
-    /** The dest tpid. */
-    private String destTpid;
-
-    /**
-     * Gets the src node id.
-     *
-     * @return the src node id
-     */
-    public String getSrcNodeId() {
-        return srcNodeId;
-    }
-
-    /**
-     * Sets the src node id.
-     *
-     * @param srcNodeId the new src node id
-     */
-    public void setSrcNodeId(String srcNodeId) {
-        this.srcNodeId = srcNodeId;
-    }
-
-    /**
-     * Gets the src tp id.
-     *
-     * @return the src tp id
-     */
-    public String getSrcTpId() {
-        return srcTpId;
-    }
-
-    /**
-     * Sets the src tp id.
-     *
-     * @param srcTpId the new src tp id
-     */
-    public void setSrcTpId(String srcTpId) {
-        this.srcTpId = srcTpId;
-    }
-
-    /**
-     * Gets the dest node id.
-     *
-     * @return the dest node id
-     */
-    public String getDestNodeId() {
-        return destNodeId;
-    }
-
-    /**
-     * Sets the dest node id.
-     *
-     * @param destNodeId the new dest node id
-     */
-    public void setDestNodeId(String destNodeId) {
-        this.destNodeId = destNodeId;
-    }
-
-    /**
-     * Gets the dest tpid.
-     *
-     * @return the dest tpid
-     */
-    public String getDestTpid() {
-        return destTpid;
-    }
-
-    /**
-     * Sets the dest tpid.
-     *
-     * @param destTpid the new dest tpid
-     */
-    public void setDestTpid(String destTpid) {
-        this.destTpid = destTpid;
-    }
-
-}
index 8cb8c418f3c8dc02d2e01ff5bbd3339e95ef6e0e..0b19ac9937c411291bc15068c7ab6bc0296f71cc 100644 (file)
@@ -21,7 +21,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 4be7d752efeca80dd7d39a29f2fdb0e177f56d8a..af8a7f5803efa1f811b01b68d9307d563c784ad3 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 e24e09c4b5822b32e2c6312794cd4db1f4015a73..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.PceService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.TransportpcePceService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -24,7 +24,7 @@ public class PceProvider {
 
     private final RpcProviderRegistry rpcRegistry;
     private final PathComputationService pathComputationService;
-    private BindingAwareBroker.RpcRegistration<PceService> rpcRegistration;
+    private BindingAwareBroker.RpcRegistration<TransportpcePceService> rpcRegistration;
 
     public PceProvider(RpcProviderRegistry rpcProviderRegistry, PathComputationService pathComputationService) {
         this.rpcRegistry = rpcProviderRegistry;
@@ -37,7 +37,7 @@ public class PceProvider {
     public void init() {
         LOG.info("PceProvider Session Initiated");
         final PceServiceRPCImpl consumer = new PceServiceRPCImpl(pathComputationService);
-        rpcRegistration = rpcRegistry.addRpcImplementation(PceService.class, consumer);
+        rpcRegistration = rpcRegistry.addRpcImplementation(TransportpcePceService.class, consumer);
     }
 
     /*
index 27b91ce3935d93749eb9ba72759e31815a1b6ba8..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.PceService;
-/*
-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;
@@ -27,7 +22,7 @@ import org.slf4j.LoggerFactory;
 /**
  * PceService implementation.
  */
-public class PceServiceRPCImpl implements PceService {
+public class PceServiceRPCImpl implements TransportpcePceService {
 
     private static final Logger LOG = LoggerFactory.getLogger(PceServiceRPCImpl.class);
 
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 4b5a7b03fedda510ae7f1cec9a617943c0aa48f5..2309750cd3079f0c83facd15b13c36283cb2dbed 100644 (file)
@@ -14,25 +14,25 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
+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;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInputBuilder;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
@@ -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 69dad3864565ebef98c839252226ebacf4138ba0..8913c925dbe6a2e0b3a024d78b228a9dfc088c09 100644 (file)
@@ -12,8 +12,8 @@ import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
 import org.opendaylight.transportpce.renderer.rpcs.DeviceRendererRPCImpl;
 import org.opendaylight.transportpce.renderer.rpcs.TransportPCEServicePathRPCImpl;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.TransportpceServicepathService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.TransportpceDeviceRendererService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.TransportpceRendererService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -21,13 +21,13 @@ public class RendererProvider {
 
     private static final Logger LOG = LoggerFactory.getLogger(RendererProvider.class);
     private final RpcProviderRegistry rpcProviderRegistry;
-    private RpcRegistration<RendererService> deviceRendererRegistration;
     private DeviceRendererRPCImpl deviceRendererRPCImpl;
-    private RpcRegistration<TransportpceServicepathService> tpceServiceRegistry;
+    private RpcRegistration<TransportpceDeviceRendererService> deviceRendererRegistration;
+    private RpcRegistration<TransportpceRendererService> tpceServiceRegistry;
     private RendererServiceOperations rendererServiceOperations;
 
     public RendererProvider(RpcProviderRegistry rpcProviderRegistry, DeviceRendererRPCImpl deviceRendererRPCImpl,
-                            RendererServiceOperations rendererServiceOperations) {
+            RendererServiceOperations rendererServiceOperations) {
         this.rpcProviderRegistry = rpcProviderRegistry;
         this.deviceRendererRPCImpl = deviceRendererRPCImpl;
         this.rendererServiceOperations = rendererServiceOperations;
@@ -41,9 +41,9 @@ public class RendererProvider {
         TransportPCEServicePathRPCImpl transportPCEServicePathRPCImpl =
             new TransportPCEServicePathRPCImpl(this.rendererServiceOperations);
         this.deviceRendererRegistration = this.rpcProviderRegistry
-                .addRpcImplementation(RendererService.class, this.deviceRendererRPCImpl);
+                .addRpcImplementation(TransportpceDeviceRendererService.class, deviceRendererRPCImpl);
         this.tpceServiceRegistry = this.rpcProviderRegistry
-                .addRpcImplementation(TransportpceServicepathService.class, transportPCEServicePathRPCImpl);
+                .addRpcImplementation(TransportpceRendererService.class, transportPCEServicePathRPCImpl);
     }
 
     /**
index 7869a9b7b35b2c26717abca994e124b916c75c42..155a60ebb0b72d7e93d3c93db3acf3e38fc4cbcb 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.transportpce.renderer;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathInput;
 
 public class ServicePathInputData {
 
index 75b43fa2729389aa1b73ebae5bf0d364423c7a06..70abad7dc1453e4abe2109dc8704fbefca632412 100644 (file)
@@ -13,6 +13,7 @@ import org.opendaylight.transportpce.common.mapping.PortMapping;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaces;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.PowerDBm;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceKey;
@@ -40,7 +41,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161
 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.OTU4;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.OtuAttributes;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.otu.container.OtuBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -54,7 +54,7 @@ public class OpenRoadmInterfaceFactory {
         this.openRoadmInterfaces = openRoadmInterfaces;
     }
 
-    public String createOpenRoadmEthInterface(String nodeId, String logicalConnPoint,String serviceName)
+    public String createOpenRoadmEthInterface(String nodeId, String logicalConnPoint)
         throws OpenRoadmInterfaceException {
         Mapping portMap = this.portMapping.getMapping(nodeId, logicalConnPoint);
         if (portMap == null) {
@@ -71,7 +71,7 @@ public class OpenRoadmInterfaceFactory {
         ethIfBuilder.setMtu(9000L);
 
         InterfaceBuilder ethInterfaceBldr = createGenericInterfaceBuilder(portMap, EthernetCsmacd.class,
-            logicalConnPoint + "-ETHERNET",serviceName);
+            logicalConnPoint + "-ETHERNET");
 
         // Create Interface1 type object required for adding as augmentation
         Interface1Builder ethIf1Builder = new Interface1Builder();
@@ -90,14 +90,15 @@ public class OpenRoadmInterfaceFactory {
      * This methods creates an OCH interface on the given termination point on
      * Roadm.
      *
-     * @param waveNumber
-     *            wavelength number of the OCH interface.
+     * @param nodeId node ID
+     * @param logicalConnPoint logical Connection Point
+     * @param waveNumber wavelength number of the OCH interface
      *
      * @return Name of the interface if successful, otherwise return null.
+     * @throws OpenRoadmInterfaceException OpenRoadmInterfaceException
      */
 
-    public String createOpenRoadmOchInterface(String nodeId, String logicalConnPoint, Long waveNumber,
-                                              String serviceName)
+    public String createOpenRoadmOchInterface(String nodeId, String logicalConnPoint, Long waveNumber)
         throws OpenRoadmInterfaceException {
         Mapping portMap = this.portMapping.getMapping(nodeId, logicalConnPoint);
         if (portMap == null) {
@@ -106,7 +107,7 @@ public class OpenRoadmInterfaceFactory {
         }
         // Create generic interface
         InterfaceBuilder ochInterfaceBldr = createGenericInterfaceBuilder(portMap, OpticalChannel.class,
-            createOpenRoadmOchInterfaceName(logicalConnPoint, waveNumber),serviceName);
+            createOpenRoadmOchInterfaceName(logicalConnPoint, waveNumber));
 
         // OCH interface specific data
         OchBuilder ocIfBuilder = new OchBuilder();
@@ -136,8 +137,7 @@ public class OpenRoadmInterfaceFactory {
     }
 
     public String createOpenRoadmOchInterface(String nodeId, String logicalConnPoint, Long waveNumber, Class<
-        ? extends RateIdentity> rate, OchAttributes.ModulationFormat format,String serviceName)
-        throws OpenRoadmInterfaceException {
+        ? extends RateIdentity> rate, OchAttributes.ModulationFormat format) throws OpenRoadmInterfaceException {
         Mapping portMap = this.portMapping.getMapping(nodeId, logicalConnPoint);
         if (portMap == null) {
             throw new OpenRoadmInterfaceException(String.format("Unable to get mapping from PortMapping for node %s and"
@@ -158,7 +158,7 @@ public class OpenRoadmInterfaceFactory {
             .interfaces.rev161014.Interface1Builder();
         // Create generic interface
         InterfaceBuilder ochInterfaceBldr = createGenericInterfaceBuilder(portMap, OpticalChannel.class,
-            createOpenRoadmOchInterfaceName(logicalConnPoint, waveNumber),serviceName);
+            createOpenRoadmOchInterfaceName(logicalConnPoint, waveNumber));
         ochInterfaceBldr.addAugmentation(
             org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.Interface1.class,
             ochIf1Builder.setOch(ocIfBuilder.build()).build());
@@ -180,12 +180,15 @@ public class OpenRoadmInterfaceFactory {
     /**
      * This methods creates an ODU interface on the given termination point.
      *
+     * @param nodeId node ID
+     * @param logicalConnPoint logical Connection Point
+     * @param supportingOtuInterface supporting OTU Interface
      *
      * @return Name of the interface if successful, otherwise return null.
+     * @throws OpenRoadmInterfaceException OpenRoadmInterfaceException
      */
 
-    public String createOpenRoadmOdu4Interface(String nodeId, String logicalConnPoint, String supportingOtuInterface,
-                                               String serviceName)
+    public String createOpenRoadmOdu4Interface(String nodeId, String logicalConnPoint, String supportingOtuInterface)
         throws OpenRoadmInterfaceException {
         Mapping portMap = this.portMapping.getMapping(nodeId, logicalConnPoint);
         if (portMap == null) {
@@ -193,7 +196,7 @@ public class OpenRoadmInterfaceFactory {
                 + " logical connection port %s", nodeId, logicalConnPoint));
         }
         InterfaceBuilder oduInterfaceBldr = createGenericInterfaceBuilder(portMap, OtnOdu.class, logicalConnPoint
-            + "-ODU",serviceName);
+            + "-ODU");
         oduInterfaceBldr.setSupportingInterface(supportingOtuInterface);
 
         // ODU interface specific data
@@ -223,13 +226,15 @@ public class OpenRoadmInterfaceFactory {
     /**
      * This methods creates an OTU interface on the given termination point.
      *
+     * @param nodeId node ID
+     * @param logicalConnPoint logical Connection Point
+     * @param supportOchInterface support OCH Interface
      *
      * @return Name of the interface if successful, otherwise return null.
      * @throws OpenRoadmInterfaceException OpenRoadmInterfaceException
      */
 
-    public String createOpenRoadmOtu4Interface(String nodeId, String logicalConnPoint, String supportOchInterface,
-                                               String serviceName)
+    public String createOpenRoadmOtu4Interface(String nodeId, String logicalConnPoint, String supportOchInterface)
         throws OpenRoadmInterfaceException {
         Mapping portMap = this.portMapping.getMapping(nodeId, logicalConnPoint);
         if (portMap == null) {
@@ -238,7 +243,7 @@ public class OpenRoadmInterfaceFactory {
         }
         // Create generic interface
         InterfaceBuilder otuInterfaceBldr = createGenericInterfaceBuilder(portMap, OtnOtu.class, logicalConnPoint
-            + "-OTU",serviceName);
+            + "-OTU");
         otuInterfaceBldr.setSupportingInterface(supportOchInterface);
 
         // OTU interface specific data
@@ -263,7 +268,7 @@ public class OpenRoadmInterfaceFactory {
         if (mapping.getSupportingOts() == null) {
             // Create generic interface
             InterfaceBuilder otsInterfaceBldr = createGenericInterfaceBuilder(mapping, OpticalTransport.class, "OTS-"
-                + mapping.getLogicalConnectionPoint(),"");
+                + mapping.getLogicalConnectionPoint());
             // OTS interface augmentation specific data
             OtsBuilder otsIfBuilder = new OtsBuilder();
             otsIfBuilder.setFiberType(FiberType.Smf);
@@ -288,7 +293,7 @@ public class OpenRoadmInterfaceFactory {
         if (mapping.getSupportingOms() == null) {
             // Create generic interface
             InterfaceBuilder omsInterfaceBldr = createGenericInterfaceBuilder(mapping, OpenROADMOpticalMultiplex.class,
-                "OMS-" + mapping.getLogicalConnectionPoint(),"");
+                "OMS-" + mapping.getLogicalConnectionPoint());
             if (mapping.getSupportingOts() != null) {
                 omsInterfaceBldr.setSupportingInterface(mapping.getSupportingOts());
             } else {
@@ -305,10 +310,10 @@ public class OpenRoadmInterfaceFactory {
     }
 
     private InterfaceBuilder createGenericInterfaceBuilder(Mapping portMap, Class<? extends InterfaceType> type,
-                                                           String key,String serviceName) {
+        String key) {
         InterfaceBuilder interfaceBuilder = new InterfaceBuilder();
         interfaceBuilder.setDescription("  TBD   ");
-        interfaceBuilder.setCircuitId(serviceName);
+        interfaceBuilder.setCircuitId("   TBD    ");
         interfaceBuilder.setSupportingCircuitPackName(portMap.getSupportingCircuitPackName());
         interfaceBuilder.setSupportingPort(portMap.getSupportingPort());
         interfaceBuilder.setAdministrativeState(AdminStates.InService);
index 5dc595d6bdd1d4c8d01f7377681c82d4414fb784..6fb01df07b4997d6ecc7c7de1bafcfb790255e7b 100644 (file)
@@ -10,12 +10,13 @@ package org.opendaylight.transportpce.renderer.provisiondevice;
 
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
 import org.opendaylight.transportpce.renderer.provisiondevice.servicepath.ServicePathDirection;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackOutput;
+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.ServicePathOutput;
+
 
 public interface DeviceRendererService {
 
index f5a57fc0a1616204edfe90180ccc585a42ff767d..ef2cf9a599612b8026517b84aa056e2786a50380 100644 (file)
@@ -37,6 +37,22 @@ import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfa
 import org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmInterfaceFactory;
 import org.opendaylight.transportpce.renderer.provisiondevice.servicepath.ServiceListTopology;
 import org.opendaylight.transportpce.renderer.provisiondevice.servicepath.ServicePathDirection;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102.ServiceNodelist;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102.service.nodelist.NodelistBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102.service.nodelist.NodelistKey;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackOutputBuilder;
+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.ServicePathOutput;
+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.device.rev170228.renderer.rollback.output.FailedToRollback;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.renderer.rollback.output.FailedToRollbackBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.renderer.rollback.output.FailedToRollbackKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.service.Topology;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.get.connection.port.trail.output.Ports;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.OrgOpenroadmDevice;
@@ -52,22 +68,6 @@ import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.node.interfaces.NodeInterfaceBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.node.interfaces.NodeInterfaceKey;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.ServiceNodelist;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.service.nodelist.NodelistBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.service.nodelist.NodelistKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.renderer.rollback.output.FailedToRollback;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.renderer.rollback.output.FailedToRollbackBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.renderer.rollback.output.FailedToRollbackKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -80,7 +80,6 @@ public class DeviceRendererServiceImpl implements DeviceRendererService {
     private final OpenRoadmInterfaces openRoadmInterfaces;
     private final CrossConnect crossConnect;
     private final PortMapping portMapping;
-    private String serviceName;
 
     public DeviceRendererServiceImpl(DataBroker dataBroker, DeviceTransactionManager deviceTransactionManager,
             OpenRoadmInterfaceFactory openRoadmInterfaceFactory, OpenRoadmInterfaces openRoadmInterfaces,
@@ -91,12 +90,10 @@ public class DeviceRendererServiceImpl implements DeviceRendererService {
         this.openRoadmInterfaces = openRoadmInterfaces;
         this.crossConnect = crossConnect;
         this.portMapping = portMapping;
-        serviceName = "Undefined";
     }
 
     @Override
     public ServicePathOutput setupServicePath(ServicePathInput input, ServicePathDirection direction) {
-        this.serviceName = input.getServiceName();
         List<Nodes> nodes = input.getNodes();
         // Register node for suppressing alarms
         if (!alarmSuppressionNodeRegistration(input)) {
@@ -127,49 +124,49 @@ public class DeviceRendererServiceImpl implements DeviceRendererService {
                         crossConnectFlag++;
                         // create OpenRoadm Xponder Line Interfaces
                         String supportingOchInterface = this.openRoadmInterfaceFactory.createOpenRoadmOchInterface(
-                                nodeId, destTp, waveNumber, R100G.class, ModulationFormat.DpQpsk, serviceName);
+                                nodeId, destTp, waveNumber, R100G.class, ModulationFormat.DpQpsk);
                         createdOchInterfaces.add(supportingOchInterface);
                         String supportingOtuInterface = this.openRoadmInterfaceFactory
-                                .createOpenRoadmOtu4Interface(nodeId, destTp, supportingOchInterface, serviceName);
+                                .createOpenRoadmOtu4Interface(nodeId, destTp, supportingOchInterface);
                         createdOtuInterfaces.add(supportingOtuInterface);
                         createdOduInterfaces.add(this.openRoadmInterfaceFactory.createOpenRoadmOdu4Interface(nodeId,
-                                destTp, supportingOtuInterface, serviceName));
+                                destTp, supportingOtuInterface));
                     }
                     if ((srcTp != null) && srcTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
                         crossConnectFlag++;
                         // create OpenRoadm Xponder Client Interfaces
                         createdEthInterfaces.add(
-                            this.openRoadmInterfaceFactory.createOpenRoadmEthInterface(nodeId, srcTp, serviceName));
+                            this.openRoadmInterfaceFactory.createOpenRoadmEthInterface(nodeId, srcTp));
                     }
                     if ((srcTp != null) && srcTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)) {
                         crossConnectFlag++;
                         // create OpenRoadm Xponder Line Interfaces
                         String supportingOchInterface = this.openRoadmInterfaceFactory.createOpenRoadmOchInterface(
-                                nodeId, srcTp, waveNumber, R100G.class, ModulationFormat.DpQpsk, serviceName);
+                                nodeId, srcTp, waveNumber, R100G.class, ModulationFormat.DpQpsk);
                         createdOchInterfaces.add(supportingOchInterface);
                         String supportingOtuInterface = this.openRoadmInterfaceFactory
-                                .createOpenRoadmOtu4Interface(nodeId, srcTp, supportingOchInterface, serviceName);
+                                .createOpenRoadmOtu4Interface(nodeId, srcTp, supportingOchInterface);
                         createdOtuInterfaces.add(supportingOtuInterface);
                         createdOduInterfaces.add(this.openRoadmInterfaceFactory.createOpenRoadmOdu4Interface(nodeId,
-                                srcTp, supportingOtuInterface, serviceName));
+                                srcTp, supportingOtuInterface));
                     }
                     if ((destTp != null) && destTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
                         crossConnectFlag++;
                         // create OpenRoadm Xponder Client Interfaces
                         createdEthInterfaces.add(
-                            this.openRoadmInterfaceFactory.createOpenRoadmEthInterface(nodeId, destTp, serviceName));
+                            this.openRoadmInterfaceFactory.createOpenRoadmEthInterface(nodeId, destTp));
                     }
                     if ((srcTp != null) && (srcTp.contains(OpenRoadmInterfacesImpl.TTP_TOKEN)
                             || srcTp.contains(OpenRoadmInterfacesImpl.PP_TOKEN))) {
                         createdOchInterfaces.add(
                             this.openRoadmInterfaceFactory
-                                .createOpenRoadmOchInterface(nodeId, srcTp, waveNumber, serviceName));
+                                .createOpenRoadmOchInterface(nodeId, srcTp, waveNumber));
                     }
                     if ((destTp != null) && (destTp.contains(OpenRoadmInterfacesImpl.TTP_TOKEN)
                             || destTp.contains(OpenRoadmInterfacesImpl.PP_TOKEN))) {
                         createdOchInterfaces.add(
                             this.openRoadmInterfaceFactory
-                                .createOpenRoadmOchInterface(nodeId, destTp, waveNumber, serviceName));
+                                .createOpenRoadmOchInterface(nodeId, destTp, waveNumber));
                     }
                     if (crossConnectFlag < 1) {
                         LOG.info("Creating cross connect between source {} and destination {} for node {}", srcTp,
@@ -398,21 +395,20 @@ public class DeviceRendererServiceImpl implements DeviceRendererService {
         NodelistBuilder nodeListBuilder = new NodelistBuilder();
         nodeListBuilder.withKey(new NodelistKey(input.getServiceName()));
         nodeListBuilder.setServiceName(input.getServiceName());
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.service
+        List<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102.service
             .nodelist.nodelist.Nodes> nodeList =
                 new ArrayList<>();
         for (Nodes node : input.getNodes()) {
             nodeList.add(
-                    new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102
+                    new org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102
                     .service.nodelist.nodelist.NodesBuilder()
                             .setNodeId(node.getNodeId()).build());
         }
         nodeListBuilder.setNodes(nodeList);
-        InstanceIdentifier<
-                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.service
-                    .nodelist.Nodelist> nodeListIID =
+        InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102
+            .service.nodelist.Nodelist> nodeListIID =
                         InstanceIdentifier.create(ServiceNodelist.class).child(
-                                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression
+                                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression
                                     .rev171102.service.nodelist.Nodelist.class,
                                 new NodelistKey(input.getServiceName()));
         final WriteTransaction writeTransaction = this.dataBroker.newWriteOnlyTransaction();
@@ -428,23 +424,22 @@ public class DeviceRendererServiceImpl implements DeviceRendererService {
         }
     }
 
-    private boolean alarmSuppressionNodeRemoval(String name) {
-        InstanceIdentifier<
-                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression.rev171102.service
-                    .nodelist.Nodelist> nodeListIID =
+    private boolean alarmSuppressionNodeRemoval(String serviceName) {
+        InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression.rev171102
+            .service.nodelist.Nodelist> nodeListIID =
                         InstanceIdentifier.create(ServiceNodelist.class).child(
-                                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.alarmsuppression
+                                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.alarmsuppression
                                     .rev171102.service.nodelist.Nodelist.class,
-                                new NodelistKey(name));
+                                new NodelistKey(serviceName));
         final WriteTransaction writeTransaction = this.dataBroker.newWriteOnlyTransaction();
         writeTransaction.delete(LogicalDatastoreType.CONFIGURATION, nodeListIID);
         Future<Void> submit = writeTransaction.submit();
         try {
             submit.get(Timeouts.DATASTORE_DELETE, TimeUnit.MILLISECONDS);
-            LOG.info("Nodes are unregister for alarm suppression for service: {}", name);
+            LOG.info("Nodes are unregister for alarm suppression for service: {}", serviceName);
             return true;
         } catch (InterruptedException | TimeoutException | ExecutionException e) {
-            LOG.warn("Failed to alarm suppresslist for service: {}", name, e);
+            LOG.warn("Failed to alarm suppresslist for service: {}", serviceName, e);
             return false;
         }
     }
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 7c3f101dcd3c87632eef245532eb5ee749ffd4dd..9aa073a99057bba54a889df4141419a8d1941e55 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.common.util.concurrent.MoreExecutors;
-
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
@@ -20,7 +19,6 @@ import java.util.concurrent.Executors;
 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.common.api.data.LogicalDatastoreType;
@@ -36,25 +34,25 @@ import org.opendaylight.transportpce.renderer.provisiondevice.tasks.DeviceRender
 import org.opendaylight.transportpce.renderer.provisiondevice.tasks.OlmPowerSetupRollbackTask;
 import org.opendaylight.transportpce.renderer.provisiondevice.tasks.OlmPowerSetupTask;
 import org.opendaylight.transportpce.renderer.provisiondevice.tasks.RollbackProcessor;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInputBuilder;
+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.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm.output.Measurements;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
@@ -70,12 +68,12 @@ public class RendererServiceOperationsImpl implements RendererServiceOperations
     private static final int NUMBER_OF_THREADS = 4;
 
     private final DeviceRendererService deviceRenderer;
-    private final OlmService olmService;
+    private final TransportpceOlmService olmService;
     private final DataBroker dataBroker;
     private ListeningExecutorService executor;
     private NetworkModelWavelengthService networkModelWavelengthService;
 
-    public RendererServiceOperationsImpl(DeviceRendererService deviceRenderer, OlmService olmService,
+    public RendererServiceOperationsImpl(DeviceRendererService deviceRenderer, TransportpceOlmService olmService,
             DataBroker dataBroker, NetworkModelWavelengthService networkModelWavelengthService) {
         this.deviceRenderer = deviceRenderer;
         this.olmService = olmService;
index 01bf58cb3a7c303631bcf30d9c8b8231860746a3..93d6c51846a7ab5818a1976b11fcf7cac9f191a4 100644 (file)
@@ -10,11 +10,11 @@ package org.opendaylight.transportpce.renderer.provisiondevice.tasks;
 import java.util.ArrayList;
 import java.util.List;
 import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRendererService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInput;
+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.RendererRollbackOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.renderer.rollback.output.FailedToRollback;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.node.interfaces.NodeInterface;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.renderer.rollback.output.FailedToRollback;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index abe78185ea7f25b9e63447e6da60824d599c85c2..975b0435989ac38dfb583f0defa5239034b40e11 100644 (file)
@@ -9,13 +9,12 @@ package org.opendaylight.transportpce.renderer.provisiondevice.tasks;
 
 import java.util.List;
 import java.util.concurrent.Callable;
-
 import org.opendaylight.transportpce.renderer.ServicePathInputData;
 import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRendererService;
 import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRenderingResult;
 import org.opendaylight.transportpce.renderer.provisiondevice.servicepath.ServicePathDirection;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathOutput;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutput;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 8b1027ccf346c4732c2d4ea0561cdd0a2bb85a0f..7ce0a7a3d17f4f0f160874d6dd1d0d99ee60e9a5 100644 (file)
@@ -8,11 +8,11 @@
 package org.opendaylight.transportpce.renderer.provisiondevice.tasks;
 
 import java.util.concurrent.Future;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInputBuilder;
+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.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -22,10 +22,10 @@ public class OlmPowerSetupRollbackTask extends RollbackTask {
     private static final Logger LOG = LoggerFactory.getLogger(OlmPowerSetupRollbackTask.class);
     private static final String FAILED = "Failed";
     private final boolean isRollbackNecessary;
-    private final OlmService olmService;
+    private final TransportpceOlmService olmService;
     private final ServicePowerSetupInput powerSetupInput;
 
-    public OlmPowerSetupRollbackTask(String id, boolean isRollbackNecessary, OlmService olmService,
+    public OlmPowerSetupRollbackTask(String id, boolean isRollbackNecessary, TransportpceOlmService olmService,
             ServicePowerSetupInput powerSetupInput) {
         super(id);
         this.isRollbackNecessary = isRollbackNecessary;
index aaf54a9a7a62b3d17884c619f6294f564a3e603d..5d4f3f72082ef62ba56e3c06edea6de5a4fe26a8 100644 (file)
@@ -9,11 +9,10 @@ package org.opendaylight.transportpce.renderer.provisiondevice.tasks;
 
 import java.util.concurrent.Callable;
 import java.util.concurrent.Future;
-
 import org.opendaylight.transportpce.renderer.provisiondevice.OLMRenderingResult;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.TransportpceOlmService;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -22,10 +21,10 @@ public class OlmPowerSetupTask implements Callable<OLMRenderingResult> {
 
     private static final Logger LOG = LoggerFactory.getLogger(OlmPowerSetupTask.class);
 
-    private final OlmService olmService;
+    private final TransportpceOlmService olmService;
     private final ServicePowerSetupInput input;
 
-    public OlmPowerSetupTask(OlmService olmService, ServicePowerSetupInput input) {
+    public OlmPowerSetupTask(TransportpceOlmService olmService, ServicePowerSetupInput input) {
         this.olmService = olmService;
         this.input = input;
     }
index a5060820a218b91132494a4997336300234e93cf..b850f2a74a3dab1f68a7c74d7e21d5bcfbd59482 100644 (file)
@@ -11,20 +11,20 @@ package org.opendaylight.transportpce.renderer.rpcs;
 import com.google.common.util.concurrent.ListenableFuture;
 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
 import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRendererService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackOutput;
+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.ServicePathOutput;
+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.device.rev170228.TransportpceDeviceRendererService;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class DeviceRendererRPCImpl implements RendererService {
+public class DeviceRendererRPCImpl implements TransportpceDeviceRendererService {
 
     private static final Logger LOG = LoggerFactory.getLogger(DeviceRendererRPCImpl.class);
     private DeviceRendererService deviceRenderer;
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 9af74625656fefa84c8f6d0c7b24140ee6f602f9..467e352661562ae95940a0d2a5a566624a992e79 100644 (file)
@@ -20,7 +20,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <reference id="crossConnect" interface="org.opendaylight.transportpce.common.crossconnect.CrossConnect" />
 
   <odl:rpc-service id="olmService"
-      interface="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService"/>
+      interface="org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.TransportpceOlmService"/>
 
   <bean id="openRoadmInterfaceFactory" class="org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmInterfaceFactory" >
     <argument ref="portMapping" />
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 6440bfcb962d9dd45ebb620ab0c214ef9f37cd5b..bfe5aa4d18174e77b226e844d597dee83f4e23b2 100644 (file)
@@ -28,8 +28,8 @@ import org.opendaylight.transportpce.renderer.stub.MountPointServiceStub;
 import org.opendaylight.transportpce.renderer.utils.CreateOtsOmsDataUtils;
 import org.opendaylight.transportpce.renderer.utils.MountPointUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsOutput;
 
 public class DeviceRendererServiceImplCreateOtsOmsTest extends AbstractTest {
 
index 46365bd48956ff7adf26061fef0e79703a60dd9b..65fe3fa7af244150f34c8d43be99332fe934a938 100644 (file)
@@ -32,6 +32,8 @@ import org.opendaylight.transportpce.renderer.utils.MountPointUtils;
 import org.opendaylight.transportpce.renderer.utils.ServiceImplementationDataUtils;
 import org.opendaylight.transportpce.renderer.utils.TransactionUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
+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.ServicePathOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.connection.DestinationBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.connection.SourceBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.OrgOpenroadmDevice;
@@ -39,8 +41,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.open
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.org.openroadm.device.RoadmConnectionsBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.org.openroadm.device.RoadmConnectionsKey;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutput;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 public class DeviceRendererServiceImplDeleteTest extends AbstractTest {
index d1a2db3a189442cd1112ca10898423d8e79efa61..3cf081ede49d09f5c7406dfaefe46e93b048f0bb 100644 (file)
@@ -29,12 +29,12 @@ import org.opendaylight.transportpce.renderer.stub.MountPointServiceStub;
 import org.opendaylight.transportpce.renderer.stub.MountPointStub;
 import org.opendaylight.transportpce.renderer.utils.ServiceImplementationDataUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInput;
+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.RendererRollbackOutput;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.node.interfaces.NodeInterface;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.node.interfaces.NodeInterfaceBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.node.interfaces.NodeInterfaceKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackOutput;
 
 public class DeviceRendererServiceImplRollbackTest extends AbstractTest {
 
index bc69d17a07f90eecf5f6ef636b9cc6bba749b025..dfb78bf2a437f6ef2081ac4c4c5b22d12cf6dc86 100644 (file)
@@ -30,9 +30,9 @@ import org.opendaylight.transportpce.renderer.stub.MountPointServiceStub;
 import org.opendaylight.transportpce.renderer.utils.MountPointUtils;
 import org.opendaylight.transportpce.renderer.utils.ServiceImplementationDataUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
+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.ServicePathOutput;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutput;
 
 public class DeviceRendererServiceImplSetupTest extends AbstractTest {
 
index 62a96093ba31cfabbe755697cc8aea9b1fa7435a..9a89f3ed541ebcef35851dbd3ebff42999f6d7ea 100644 (file)
@@ -37,15 +37,15 @@ import org.opendaylight.transportpce.renderer.stub.OlmServiceStub;
 import org.opendaylight.transportpce.renderer.utils.ServiceDeleteDataUtils;
 import org.opendaylight.transportpce.renderer.utils.TransactionUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
-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.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutputBuilder;
+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.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;
 
@@ -59,7 +59,7 @@ public class RendererServiceOperationsImplDeleteTest extends AbstractTest {
     private PortMapping portMapping;
     private CrossConnect crossConnect;
     private NetworkModelWavelengthService networkModelWavelengthService;
-    private OlmService olmService;
+    private TransportpceOlmService olmService;
 
     private void setMountPoint(MountPoint mountPoint) {
         MountPointService mountPointService = new MountPointServiceStub(mountPoint);
index 563fde1eb2d106d6e4f12124eb24fc9d66514e65..cc250c95667908ef9a893d71b59129e0a0a3fcb9 100644 (file)
@@ -34,19 +34,19 @@ import org.opendaylight.transportpce.renderer.stub.OlmServiceStub;
 import org.opendaylight.transportpce.renderer.utils.MountPointUtils;
 import org.opendaylight.transportpce.renderer.utils.ServiceDataUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutputBuilder;
+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.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.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm.output.Measurements;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.get.pm.output.MeasurementsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutputBuilder;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
 public class RendererServiceOperationsImplTest extends AbstractTest {
@@ -59,7 +59,7 @@ public class RendererServiceOperationsImplTest extends AbstractTest {
     private PortMapping portMapping;
     private OpenRoadmInterfaceFactory openRoadmInterfaceFactory;
     private CrossConnect crossConnect;
-    private OlmService olmService;
+    private TransportpceOlmService olmService;
     private NetworkModelWavelengthService networkModelWavelengthService;
 
     private void setMountPoint(MountPoint mountPoint) {
index 91a3ca0e841349d580ab6c62ded15e888a2ee44a..519f7f58d9f3e47d3c894b66d2a91296bacada19 100644 (file)
@@ -9,26 +9,26 @@ package org.opendaylight.transportpce.renderer.stub;
 
 import com.google.common.util.concurrent.ListenableFuture;
 import java.util.ArrayList;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossBaseInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossBaseOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossCurrentInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.CalculateSpanlossCurrentOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.GetPmOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerResetInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerResetOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInput;
+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.ServicePowerTurndownOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.TransportpceOlmService;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
-public class OlmServiceStub implements OlmService {
+public class OlmServiceStub implements TransportpceOlmService {
 
     @Override public ListenableFuture<RpcResult<CalculateSpanlossCurrentOutput>> calculateSpanlossCurrent(
         CalculateSpanlossCurrentInput input) {
index 588f5f205202fb7523b9d52ec1ccb9d388426e58..533f02ad14a8ec319f6f9efe8f14b86848b9b01b 100644 (file)
@@ -8,8 +8,8 @@
 
 package org.opendaylight.transportpce.renderer.utils;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.CreateOtsOmsInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsInputBuilder;
 
 public final class CreateOtsOmsDataUtils {
 
index 0c95254744b2f389992c2fbf1c0a4441ca239f3f..3431e94d77fc40901703456edf3b7888f259923b 100644 (file)
@@ -17,16 +17,16 @@ import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.sal.binding.api.RpcConsumerRegistry;
 import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
 import org.opendaylight.transportpce.renderer.stub.MountPointStub;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.Network;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.NodesKey;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.MappingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.MappingKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.GetConnectionPortTrailOutput;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.GetConnectionPortTrailOutputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.OrgOpenroadmDeviceService;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.get.connection.port.trail.output.Ports;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.Network;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.Nodes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.NodesKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.MappingBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.MappingKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
index e646ed94ba214fda74399547b6db22e275d37ba4..ebe2d86f9a789c34074dcfb8cf2bb179b93823cd 100644 (file)
@@ -11,43 +11,40 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInput;
+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;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInputBuilder;
 
 
 public final class ServiceDataUtils {
@@ -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 8995a633508d930019eeda35ddfd880ad3881fee..d1d7b67344e9092a0be381c02628e8c1926fec75 100644 (file)
@@ -9,43 +9,40 @@ package org.opendaylight.transportpce.renderer.utils;
 
 import java.util.ArrayList;
 import java.util.List;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInput;
+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;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererRollbackInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInputBuilder;
 
 
 public final class ServiceImplementationDataUtils {
@@ -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 250c5ee83abf9239d61d6bda2844d46508810d94..28e8b00215531ac23f5123ebe7a35a17c640ea93 100644 (file)
@@ -15,7 +15,7 @@ import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.transportpce.pce.service.PathComputationService;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
 import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PceListener;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.TransportpcePceListener;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.OrgOpenroadmServiceService;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.slf4j.Logger;
@@ -34,7 +34,7 @@ public class ServicehandlerProvider {
     private final DataBroker dataBroker;
     private final RpcProviderRegistry rpcRegistry;
     private final NotificationService notificationService;
-    private ListenerRegistration<PceListener> pcelistenerRegistration;
+    private ListenerRegistration<TransportpcePceListener> pcelistenerRegistration;
     private RpcRegistration<OrgOpenroadmServiceService> rpcRegistration;
     private PathComputationService pathComputationService;
     private RendererServiceOperations rendererServiceOperations;
@@ -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 30a72e12de0e2497ea00b56d3fac0478b085f27c..fa0ebfb8f9ec6d9f011c612e843142550081bb2c 100644 (file)
@@ -7,15 +7,15 @@
  */
 package org.opendaylight.transportpce.servicehandler.listeners;
 
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PceListener;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.ServicePathRpcResult;
-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;
 
 @Deprecated
-public class PceListenerImpl implements PceListener {
+public class PceListenerImpl implements TransportpcePceListener {
 
     private static final Logger LOG = LoggerFactory.getLogger(PceListenerImpl.class);
 
@@ -30,8 +30,8 @@ public class PceListenerImpl implements PceListener {
                     "Received '" + notification.getNotificationType() + "' StubPce notification " + "from service '"
                             + notification.getServiceName() + "' " + "with status '" + notification.getStatus() + "'");
             build.append(" with StatusMessage '" + notification.getStatusMessage() + "'");
-            if (notification.getStatus() == RpcStatusEx.Successful && notification.getNotificationType()
-                    .getIntValue() == ServicePathNotificationTypes.PathComputationRequest.getIntValue()) {
+            if ((notification.getStatus() == RpcStatusEx.Successful) && (notification.getNotificationType()
+                    .getIntValue() == ServicePathNotificationTypes.PathComputationRequest.getIntValue())) {
                 build.append(" PathDescription : " + notification.getPathDescription().toString());
                 /*
                  * switch (action.getIntValue()) { case 1: //service-create case
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;
@@ -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;
similarity index 95%
rename from servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererCompliancyCheck.java
rename to servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererCompliancyCheck.java
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;
similarity index 82%
rename from servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererImpl.java
rename to servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererImpl.java
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 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 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 {
index 088fdfe44448beaaae2e28d9facdb8c842400f71..bb26d8af2967ebed315ac92c78b70aea7c229b84 100644 (file)
-diff --git a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtils.java b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtils.java
-index e5b44c4..a063b9e 100644
---- a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtils.java
-+++ b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtils.java
-@@ -8,8 +8,6 @@
- package org.opendaylight.transportpce.servicehandler;
- import com.google.common.util.concurrent.ListenableFuture;
--import java.util.ArrayList;
--import java.util.List;
- 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;
-@@ -18,8 +16,6 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev17
- 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;
--import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.service.Topology;
--import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.service.TopologyBuilder;
- import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.LifecycleState;
- 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;
-@@ -31,12 +27,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.Service
- import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceReconfigureInput;
- 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.topology.rev161014.topology.AToZ;
--import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topology.AToZBuilder;
--import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topology.AToZKey;
--import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topology.ZToA;
--import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topology.ZToABuilder;
--import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topology.ZToAKey;
- 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;
-@@ -238,42 +228,6 @@ public final class ModelMappingUtils {
-                 .setSoftConstraints(serviceReconfigureInput.getSoftConstraints())
-                 .setLifecycleState(LifecycleState.Planned).setServiceAEnd(aend).setServiceZEnd(zend);
-         }
--
--        org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.response
--                .parameters.sp.ResponseParameters responseParameters = output.getResponseParameters();
--        if (responseParameters != null) {
--            // service.setPceMetric(responseParameters.getPceMetric());
--            org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426
--                .response.parameters.sp.response.parameters.PathDescription pathDescription =
--                responseParameters.getPathDescription();
--            if (pathDescription != null) {
--                List<AToZ> atozList = new ArrayList<>();
--                List<ZToA> ztoaList = new ArrayList<>();
--
--                for (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426
--                    .path.description.atoz.direction.AToZ tmp : pathDescription.getAToZDirection().getAToZ()) {
--
--                    AToZKey key = new AToZKey(tmp.key().getId());
--                    AToZ atoz = new AToZBuilder().setId(tmp.getId()).withKey(key)
--                            // .setResource(tmp.getResource())
--                            .build();
--                    atozList.add(atoz);
--                }
--
--                for (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426
--                        .path.description.ztoa.direction.ZToA
--                        tmp : pathDescription.getZToADirection().getZToA()) {
--                    ZToAKey key = new ZToAKey(tmp.key().getId());
--                    ZToA ztoa = new ZToABuilder().setId(tmp.getId()).withKey(key)
--                            // .setResource(tmp.getResource())
--                            .build();
--                    ztoaList.add(ztoa);
--                }
--
--                Topology topology = new TopologyBuilder().setAToZ(atozList).setZToA(ztoaList).build();
--                service.setTopology(topology);
--            }
--        }
-         return service.build();
-     }
 diff --git a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java
-index b81e9b4..c5b5045 100644
+index ccd0f14..8219393 100644
 --- a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java
 +++ b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java
-@@ -27,6 +27,7 @@ import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOper
+@@ -22,6 +22,7 @@ import org.opendaylight.transportpce.servicehandler.ModelMappingUtils;
+ import org.opendaylight.transportpce.servicehandler.service.PCEServiceWrapper;
+ import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
+ import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperationsImpl;
++import org.opendaylight.transportpce.servicehandler.stub.StubRendererServiceOperations;
  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.transportpce.stubrenderer.SendingRendererRPCs;
- import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.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.SdncRequestHeaderBuilder;
-@@ -89,6 +90,7 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
+@@ -84,6 +85,7 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
+     private DataBroker db;
      private ServiceDataStoreOperations serviceDataStoreOperations;
      private RendererServiceOperations rendererServiceOperations;
++    private StubRendererServiceOperations stubRendererServiceOperations;
      private PCEServiceWrapper pceServiceWrapper;
-+    private SendingRendererRPCs stubrendererService;
  
      //TODO: remove private request fields as they are in global scope
-@@ -145,8 +147,9 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
+@@ -92,6 +94,7 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
+                               RendererServiceOperations rendererServiceOperations) {
+         this.db = databroker;
+         this.rendererServiceOperations = rendererServiceOperations;
++        this.stubRendererServiceOperations = new StubRendererServiceOperations();
+         this.serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(this.db);
+         this.serviceDataStoreOperations.initialize();
+         this.pceServiceWrapper = new PCEServiceWrapper(pathComputationService);
+@@ -141,8 +144,8 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
  
          ServiceImplementationRequestInput serviceImplementationRequest =
                  ModelMappingUtils.createServiceImplementationRequest(input, pceResponse);
-+        this.stubrendererService = new SendingRendererRPCs();
-         org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
--            .ServiceImplementationRequestOutput serviceImplementationRequestOutput = this.rendererServiceOperations
-+            .ServiceImplementationRequestOutput serviceImplementationRequestOutput = this.stubrendererService
-             .serviceImplementation(serviceImplementationRequest);
+-        ServiceImplementationRequestOutput serviceImplementationRequestOutput = this.rendererServiceOperations
+-            .serviceImplementation(serviceImplementationRequest);
++        ServiceImplementationRequestOutput serviceImplementationRequestOutput = this.stubRendererServiceOperations
++                .serviceImplementation(serviceImplementationRequest);
          if (ResponseCodes.RESPONSE_OK
                  .equals(serviceImplementationRequestOutput.getConfigurationResponseCommon().getResponseCode())) {
-@@ -215,8 +218,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);
-+        this.stubrendererService = new SendingRendererRPCs();
-         org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426
+             String message = "Service rendered successfully !";
+@@ -216,8 +219,7 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
+         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);
-+            .ServiceDeleteOutput output = this.stubrendererService.serviceDelete(serviceDeleteInput);
+-
++            .ServiceDeleteOutput output = this.stubRendererServiceOperations.serviceDelete(serviceDeleteInput);
          if (!ResponseCodes.RESPONSE_OK
                  .equals(output.getConfigurationResponseCommon().getResponseCode())) {
-diff --git a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubRendererServiceOperations.java b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubRendererServiceOperations.java
-index 6db468c..76e4a26 100644
---- a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubRendererServiceOperations.java
-+++ b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/stub/StubRendererServiceOperations.java
-@@ -9,13 +9,8 @@ package org.opendaylight.transportpce.servicehandler.stub;
- import java.util.concurrent.ExecutionException;
- import java.util.concurrent.Future;
--
- import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
- import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
--import org.opendaylight.transportpce.servicehandler.mappers.ServiceDeleteInputConverter;
--import org.opendaylight.transportpce.servicehandler.mappers.ServiceDeleteOutputConverter;
--import org.opendaylight.transportpce.servicehandler.mappers.ServiceImplementationRequestInputConverter;
--import org.opendaylight.transportpce.servicehandler.mappers.ServiceImplementationRequestOutputConverter;
- import org.opendaylight.transportpce.stubrenderer.impl.StubrendererImpl;
- 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;
-@@ -30,16 +25,15 @@ public class StubRendererServiceOperations implements RendererServiceOperations
-     private StubrendererImpl stubrenderer;
-     public StubRendererServiceOperations(NotificationPublishService notificationPublishService) {
--        this.stubrenderer = new StubrendererImpl(notificationPublishService);
-+        this.stubrenderer = new StubrendererImpl();
-     }
-     @Override
-     public ServiceImplementationRequestOutput serviceImplementation(ServiceImplementationRequestInput input) {
--        Future<RpcResult<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426
--            .ServiceImplementationRequestOutput>> rpcResultFuture = this.stubrenderer
--                .serviceImplementationRequest(ServiceImplementationRequestInputConverter.getStub(input));
-+        Future<RpcResult<ServiceImplementationRequestOutput>> rpcResultFuture = this.stubrenderer
-+                .serviceImplementationRequest(input);
-         try {
--            return ServiceImplementationRequestOutputConverter.getConcrete(rpcResultFuture.get().getResult());
-+            return rpcResultFuture.get().getResult();
-         } catch (InterruptedException e) {
-             LOG.error("RPC serviceImplementation failed !",e);
-         } catch (ExecutionException e) {
-@@ -50,11 +44,10 @@ public class StubRendererServiceOperations implements RendererServiceOperations
-     @Override
-     public ServiceDeleteOutput serviceDelete(ServiceDeleteInput input) {
--        Future<RpcResult<org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426
--            .ServiceDeleteOutput>> rpcResultFuture = this.stubrenderer
--                .serviceDelete(ServiceDeleteInputConverter.getStub(input));
-+        Future<RpcResult<ServiceDeleteOutput>> rpcResultFuture = this.stubrenderer
-+                .serviceDelete(input);
-         try {
--            return ServiceDeleteOutputConverter.getConcrete(rpcResultFuture.get().getResult());
-+            return rpcResultFuture.get().getResult();
-         } catch (InterruptedException e) {
-             LOG.error("RPC serviceDelete failed !",e);
-         } catch (ExecutionException e) {
-diff --git a/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/SendingRendererRPCs.java b/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/SendingRendererRPCs.java
-index cdcdc0e..b43535f 100644
---- a/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/SendingRendererRPCs.java
-+++ b/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/SendingRendererRPCs.java
-@@ -8,16 +8,18 @@
- package org.opendaylight.transportpce.stubrenderer;
--import com.google.common.util.concurrent.ListenableFuture;
--import com.google.common.util.concurrent.ListeningExecutorService;
--
- import java.util.ArrayList;
- import java.util.List;
--import java.util.concurrent.Callable;
--
-+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.service.TopologyBuilder;
- import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topology.AToZ;
- import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topology.ZToA;
-+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.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-@@ -41,73 +43,78 @@ public class SendingRendererRPCs {
-     private List<AToZ> atoz;
-     private List<ZToA> ztoa;
-     private String error;
--    private final ListeningExecutorService executor;
--    public SendingRendererRPCs(ListeningExecutorService executor) {
--        success = true;
-+    public SendingRendererRPCs() {
-+        this.success = true;
-         setTopology(null);
--        this.executor = executor;
-         setError("");
-     }
-     private void buildAtoZ() {
--        atoz = new ArrayList<AToZ>();
-+        this.atoz = new ArrayList<AToZ>();
-     }
-     private void buildZtoA() {
--        ztoa = new ArrayList<ZToA>();
-+        this.ztoa = new ArrayList<ZToA>();
-     }
--    public ListenableFuture<Boolean> serviceDelete() {
-+    public ServiceDeleteOutput serviceDelete(ServiceDeleteInput input) {
-+        String message = "Service deleted !";
-+        String responseCode = "200";
-         LOG.info("ServiceDelete request ...");
--        success = false;
--        return executor.submit(new Callable<Boolean>() {
--            @Override
--            public Boolean call() throws Exception {
--                Boolean output = true;
--                LOG.info("Wait for 10s til beginning the Renderer serviceDelete request");
--                try {
--                    Thread.sleep(10000); //sleep for 10s
--                } catch (InterruptedException e) {
--                    output = false;
--                    LOG.error("Thread.sleep failed : {}", e.toString());
--                }
--                buildAtoZ();
--                buildZtoA();
--                success = true;
--                return output;
--            }
--        });
-+        LOG.info("Wait for 10s til beginning the Renderer serviceDelete request");
-+        try {
-+            Thread.sleep(1000); //sleep for 1s
-+        } catch (InterruptedException e) {
-+            message = "deleting service failed !";
-+            LOG.error(message);
-+            responseCode = "500";
-+            setError(message);
-+        }
-+        ConfigurationResponseCommonBuilder configurationResponseCommon = new ConfigurationResponseCommonBuilder()
-+                .setAckFinalIndicator("yes")
-+                .setRequestId(input.getServiceHandlerHeader().getRequestId())
-+                .setResponseCode(responseCode)
-+                .setResponseMessage(message);
-+        ServiceDeleteOutput output =  new ServiceDeleteOutputBuilder()
-+                .setConfigurationResponseCommon(configurationResponseCommon.build())
-+                .build();
-+        return output;
-     }
--    public ListenableFuture<Boolean> serviceImplementation() {
-+    public ServiceImplementationRequestOutput serviceImplementation(ServiceImplementationRequestInput input) {
-+        String message = "Service implemented !";
-+        String responseCode = "200";
-+        setSuccess(true);
-         LOG.info("serviceImplementation request ...");
--        success = false;
--        return executor.submit(new Callable<Boolean>() {
--            @Override
--            public Boolean call() throws Exception {
--                Boolean output = true;
--                LOG.info("Wait for 10s til beginning the Renderer serviceDelete request");
--                try {
--                    Thread.sleep(10000); //sleep for 10s
--                } catch (InterruptedException e) {
--                    output = false;
--                    LOG.error("Thread.sleep failed : {}", e.toString());
--                }
--                buildAtoZ();
--                buildZtoA();
--                setTopology(new TopologyBuilder()
--                        .setAToZ(atoz)
--                        .setZToA(ztoa));
--                output = true;
--                success = true;
--                return output;
--            }
--        });
-+        LOG.info("Wait for 10s til beginning the Renderer serviceDelete request");
-+        try {
-+            Thread.sleep(1000); //sleep for 1s
-+        } catch (InterruptedException e) {
-+            message = "implementing service failed !";
-+            LOG.error(message);
-+            setError(message);
-+            responseCode = "500";
-+            setSuccess(false);
-+        }
-+        buildAtoZ();
-+        buildZtoA();
-+        setTopology(new TopologyBuilder()
-+                .setAToZ(SendingRendererRPCs.this.atoz)
-+                .setZToA(SendingRendererRPCs.this.ztoa));
-+        ConfigurationResponseCommonBuilder configurationResponseCommon = new ConfigurationResponseCommonBuilder()
-+                .setAckFinalIndicator("yes")
-+                .setRequestId(input.getServiceHandlerHeader().getRequestId())
-+                .setResponseCode(responseCode)
-+                .setResponseMessage(message);
-+        ServiceImplementationRequestOutput output =  new ServiceImplementationRequestOutputBuilder()
-+                .setConfigurationResponseCommon(configurationResponseCommon.build())
-+                .build();
-+        return output;
-     }
-     public Boolean getSuccess() {
--        return success;
-+        return this.success;
-     }
-     public void setSuccess(Boolean success) {
-@@ -115,7 +122,7 @@ public class SendingRendererRPCs {
-     }
-     public TopologyBuilder getTopology() {
--        return topology;
-+        return this.topology;
-     }
-     public void setTopology(TopologyBuilder topo) {
-@@ -123,7 +130,7 @@ public class SendingRendererRPCs {
-     }
-     public String getError() {
--        return error;
-+        return this.error;
-     }
-     public void setError(String error) {
-diff --git a/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererImpl.java b/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererImpl.java
-index 6e197d5..e3e1984 100644
---- a/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererImpl.java
-+++ b/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererImpl.java
-@@ -9,30 +9,21 @@
- package org.opendaylight.transportpce.stubrenderer.impl;
--import com.google.common.util.concurrent.FutureCallback;
--import com.google.common.util.concurrent.Futures;
- import com.google.common.util.concurrent.ListenableFuture;
--import com.google.common.util.concurrent.ListeningExecutorService;
--import com.google.common.util.concurrent.MoreExecutors;
--import java.util.concurrent.Executors;
--import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
- import org.opendaylight.transportpce.stubrenderer.SendingRendererRPCs;
- import org.opendaylight.transportpce.stubrenderer.StubrendererCompliancyCheck;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceDeleteInput;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceDeleteOutput;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceDeleteOutputBuilder;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceImplementationRequestInput;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceImplementationRequestOutput;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceImplementationRequestOutputBuilder;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceRpcResultSp;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceRpcResultSpBuilder;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.StubrendererService;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.service.rpc.result.sp.PathTopology;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.service.rpc.result.sp.PathTopologyBuilder;
- 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.service.TopologyBuilder;
--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.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.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.servicepath.rev170426.TransportpceServicepathService;
- import org.opendaylight.yangtools.yang.common.RpcResult;
- import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
- import org.slf4j.Logger;
-@@ -45,21 +36,12 @@ import org.slf4j.LoggerFactory;
-  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
-  *
-  */
--public class StubrendererImpl implements StubrendererService {
-+public class StubrendererImpl implements TransportpceServicepathService {
-     /** Logging. */
-     private static final Logger LOG = LoggerFactory.getLogger(StubrendererImpl.class);
--    /** send notification. */
--    private NotificationPublishService notificationPublishService;
--    private ServiceRpcResultSp notification;
--    private final ListeningExecutorService executor = MoreExecutors
--            .listeningDecorator(Executors.newFixedThreadPool(10));
-     /** check service sdnc-request-header compliancy. */
-     private StubrendererCompliancyCheck compliancyCheck;
--    public StubrendererImpl(NotificationPublishService notificationPublishService) {
--        this.notificationPublishService = notificationPublishService;
--    }
--
-     @Override
-     public ListenableFuture<RpcResult<ServiceImplementationRequestOutput>> serviceImplementationRequest(
-             ServiceImplementationRequestInput input) {
-@@ -77,102 +59,20 @@ public class StubrendererImpl implements StubrendererService {
-              * a path and implement a service.
-              */
--            this.notification = new ServiceRpcResultSpBuilder()
--                    .setNotificationType(ServicePathNotificationTypes.ServiceImplementationRequest)
--                    .setServiceName(input.getServiceName())
--                    .setStatus(RpcStatusEx.Pending)
--                    .setStatusMessage("Service compliant, submitting serviceImplementation Request ...")
--                    .build();
--            try {
--                this.notificationPublishService.putNotification(this.notification);
--            } catch (InterruptedException e) {
--                LOG.info("notification offer rejected : {}", e);
-+            SendingRendererRPCs sendingRenderer = new SendingRendererRPCs();
-+            sendingRenderer.serviceImplementation(input);
-+            if (sendingRenderer.getSuccess()) {
-+                message = "Service implemented !";
-+                LOG.info(message);
-+                responseCode = "200";
-+            } else {
-+                message = "Service implementation failed : " + sendingRenderer.getError();
-+                LOG.error(message);
-+                responseCode = "500";
-             }
--
--            SendingRendererRPCs sendingRenderer = new SendingRendererRPCs(this.executor);
--            FutureCallback<Boolean> rendererCallback =
--                    new FutureCallback<Boolean>() {
--                String message = "";
--                ServiceRpcResultSp notification = null;
--
--                @Override
--                public void onFailure(Throwable arg0) {
--                    LOG.error("Failure message : {}", arg0.toString());
--                    LOG.error("Service implementation failed !");
--                    this.notification = new ServiceRpcResultSpBuilder()
--                            .setNotificationType(ServicePathNotificationTypes.ServiceImplementationRequest)
--                            .setServiceName(input.getServiceName()).setStatus(RpcStatusEx.Failed)
--                            .setStatusMessage("PCR Request failed  : {}" + arg0.getMessage()).build();
--                    try {
--                        StubrendererImpl.this.notificationPublishService.putNotification(this.notification);
--                    } catch (InterruptedException e) {
--                        LOG.info("notification offer rejected : {}", e);
--                    }
--                }
--
--                @Override
--                public void onSuccess(Boolean response) {
--                    LOG.info("response : {}", response);
--                    if (response) {
--                        this.message = "Service implemented !";
--                        TopologyBuilder topo = sendingRenderer.getTopology();
--                        ServiceRpcResultSpBuilder tmp = new ServiceRpcResultSpBuilder()
--                                .setNotificationType(ServicePathNotificationTypes.ServiceImplementationRequest)
--                                .setServiceName(input.getServiceName())
--                                .setStatus(RpcStatusEx.Successful)
--                                .setStatusMessage(this.message);
--                        if (topo != null) {
--                            PathTopology value = new PathTopologyBuilder()
--                                    .setAToZ(topo.getAToZ())
--                                    .setZToA(topo.getZToA())
--                                    .build();
--                            tmp.setPathTopology(value);
--                        }
--                        this.notification = tmp.build();
--                    } else {
--                        this.message = "Service implementation failed : " + sendingRenderer.getError();
--                        this.notification = new ServiceRpcResultSpBuilder()
--                                .setNotificationType(ServicePathNotificationTypes.ServiceImplementationRequest)
--                                .setServiceName("")
--                                .setStatus(RpcStatusEx.Failed).setStatusMessage(this.message)
--                                .build();
--                    }
--                    LOG.info(this.notification.toString());
--                    try {
--                        StubrendererImpl.this.notificationPublishService.putNotification(this.notification);
--                    } catch (InterruptedException e) {
--                        LOG.info("notification offer rejected : {}", e);
--                    }
--                    LOG.info(this.message);
--                }
--            };
--            ListenableFuture<Boolean> renderer = sendingRenderer.serviceImplementation();
--            Futures.addCallback(renderer, rendererCallback, this.executor);
--            LOG.info("Service implmentation Request in progress ");
--            configurationResponseCommon = new ConfigurationResponseCommonBuilder()
--                    .setAckFinalIndicator("Yes")
--                    .setRequestId(input.getServiceHandlerHeader().getRequestId())
--                    .setResponseCode("200")
--                    .setResponseMessage("Service implementation Request in progress ");
--
--            ServiceImplementationRequestOutput output = new ServiceImplementationRequestOutputBuilder()
--                    .setConfigurationResponseCommon(configurationResponseCommon.build())
--                    .build();
--            return RpcResultBuilder.success(output).buildFuture();
-         } else {
--            message = this.compliancyCheck.getMessage();
-+            message = "Service not compliant";
+             message = "Service delete failed!";
+diff --git a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererImpl.java b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererImpl.java
+index 630fb67..2cc2bdf 100644
+--- a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererImpl.java
++++ b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/stub/StubrendererImpl.java
+@@ -51,6 +51,8 @@ public final class StubrendererImpl {
+             LOG.error("deleting service failed !", e);
              responseCode = "500";
--            LOG.info("Service not compliant caused by : {}", message);
--            this.notification = new ServiceRpcResultSpBuilder()
--                    .setNotificationType(ServicePathNotificationTypes.ServiceDelete)
--                    .setServiceName(input.getServiceName()).setStatus(RpcStatusEx.Failed)
--                    .setStatusMessage("Service not compliant caused by : " + message)
--                    .build();
--            try {
--                this.notificationPublishService.putNotification(this.notification);
--            } catch (InterruptedException e) {
--                LOG.info("notification offer rejected : {}", e);
--            }
          }
-         configurationResponseCommon = new ConfigurationResponseCommonBuilder()
++        responseCode = "200";
++        message = "Service deleted";
+         ConfigurationResponseCommonBuilder configurationResponseCommon = new ConfigurationResponseCommonBuilder()
                  .setAckFinalIndicator("yes")
-@@ -201,90 +101,20 @@ public class StubrendererImpl implements StubrendererService {
-              * a path and implement a service.
-              */
--            this.notification = new ServiceRpcResultSpBuilder()
--                    .setNotificationType(ServicePathNotificationTypes.ServiceDelete)
--                    .setServiceName(input.getServiceName())
--                    .setStatus(RpcStatusEx.Pending)
--                    .setStatusMessage("Service compliant, submitting serviceDelete Request ...")
--                    .build();
--            try {
--                this.notificationPublishService.putNotification(this.notification);
--            } catch (InterruptedException e) {
--                LOG.info("notification offer rejected : {}", e);
-+            SendingRendererRPCs sendingRenderer = new SendingRendererRPCs();
-+            sendingRenderer.serviceDelete(input);
-+            if (sendingRenderer.getSuccess()) {
-+                message = "Service deleted !";
-+                responseCode = "200";
-+                LOG.info(message);
-+            } else {
-+                message = "Service implementation failed : " + sendingRenderer.getError();
-+                LOG.error(message);
-+                responseCode = "500";
-             }
--            SendingRendererRPCs sendingRenderer = new SendingRendererRPCs(this.executor);
--            FutureCallback<Boolean> rendererCallback = new FutureCallback<Boolean>() {
--                String message = "";
--                ServiceRpcResultSp notification = null;
--
--                @Override
--                public void onFailure(Throwable arg0) {
--                    LOG.error("Failure message : {}", arg0.toString());
--                    LOG.error("Service delete failed !");
--                    this.notification = new ServiceRpcResultSpBuilder()
--                            .setNotificationType(ServicePathNotificationTypes.ServiceDelete)
--                            .setServiceName(input.getServiceName()).setStatus(RpcStatusEx.Failed)
--                            .setStatusMessage("PCR Request failed  : " + arg0.getMessage()).build();
--                    try {
--                        StubrendererImpl.this.notificationPublishService.putNotification(this.notification);
--                    } catch (InterruptedException e) {
--                        LOG.info("notification offer rejected : {}", e);
--                    }
--                }
--
--                @Override
--                public void onSuccess(Boolean response) {
--                    LOG.info("response : {}", response);
--                    if (response) {
--                        this.message = "Service deleted !";
--                        this.notification = new ServiceRpcResultSpBuilder()
--                                .setNotificationType(ServicePathNotificationTypes.ServiceDelete)
--                                .setServiceName(input.getServiceName()).setStatus(RpcStatusEx.Successful)
--                                .setStatusMessage(this.message).build();
--                    } else {
--                        this.message = "Service delete failed : " + sendingRenderer.getError();
--                        this.notification = new ServiceRpcResultSpBuilder()
--                                .setNotificationType(ServicePathNotificationTypes.ServiceDelete)
--                                .setServiceName("")
--                                .setStatus(RpcStatusEx.Failed).setStatusMessage(this.message)
--                                .build();
--                    }
--                    LOG.info(this.notification.toString());
--                    try {
--                        StubrendererImpl.this.notificationPublishService.putNotification(this.notification);
--                    } catch (InterruptedException e) {
--                        LOG.info("notification offer rejected : {}", e);
--                    }
--                    LOG.info(this.message);
--                }
--            };
--            ListenableFuture<Boolean> renderer = sendingRenderer.serviceDelete();
--            Futures.addCallback(renderer, rendererCallback, this.executor);
--            message = "Service delete Request in progress ...";
--            LOG.info(message);
--            configurationResponseCommon = new ConfigurationResponseCommonBuilder()
--                    .setAckFinalIndicator("Yes")
--                    .setRequestId(input.getServiceHandlerHeader().getRequestId())
--                    .setResponseCode("200")
--                    .setResponseMessage(message);
--            ServiceDeleteOutput output = new ServiceDeleteOutputBuilder()
--                    .setConfigurationResponseCommon(configurationResponseCommon.build())
--                    .build();
--            return RpcResultBuilder.success(output).buildFuture();
-         } else {
--            message = this.compliancyCheck.getMessage();
--            LOG.info("Service not compliant caused by : {}", message);
-+            message = "Service not compliant";
+                 .setRequestId(input.getServiceHandlerHeader().getRequestId())
+@@ -75,6 +77,8 @@ public final class StubrendererImpl {
+             LOG.error(message);
              responseCode = "500";
--            this.notification = new ServiceRpcResultSpBuilder()
--                    .setNotificationType(ServicePathNotificationTypes.ServiceDelete)
--                    .setServiceName(input.getServiceName()).setStatus(RpcStatusEx.Failed)
--                    .setStatusMessage("Service not compliant caused by : " + message)
--                    .build();
--            try {
--                this.notificationPublishService.putNotification(this.notification);
--            } catch (InterruptedException e) {
--                LOG.info("notification offer rejected : {}", e);
--            }
          }
-         configurationResponseCommon = new ConfigurationResponseCommonBuilder()
++        responseCode = "200";
++        message = "Service implemented";
+         ConfigurationResponseCommonBuilder configurationResponseCommon = new ConfigurationResponseCommonBuilder()
                  .setAckFinalIndicator("yes")
-@@ -296,4 +126,24 @@ public class StubrendererImpl implements StubrendererService {
-                 .build();
-         return RpcResultBuilder.success(output).buildFuture();
-     }
-+
-+    /* (non-Javadoc)
-+     * @see org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.TransportpceServicepathService#pathComputationRequest(org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.PathComputationRequestInput)
-+     */
-+    @Override
-+    public ListenableFuture<RpcResult<PathComputationRequestOutput>> pathComputationRequest(
-+            PathComputationRequestInput input) {
-+        // TODO Auto-generated method stub
-+        return null;
-+    }
-+
-+    /* (non-Javadoc)
-+     * @see org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.TransportpceServicepathService#cancelResourceReserve(org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.CancelResourceReserveInput)
-+     */
-+    @Override
-+    public ListenableFuture<RpcResult<CancelResourceReserveOutput>> cancelResourceReserve(
-+            CancelResourceReserveInput input) {
-+        // TODO Auto-generated method stub
-+        return null;
-+    }
- }
-diff --git a/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererProvider.java b/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererProvider.java
-index 0beb087..92b20f5 100644
---- a/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererProvider.java
-+++ b/tests/stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererProvider.java
-@@ -13,9 +13,7 @@ import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService
- import org.opendaylight.controller.md.sal.binding.api.NotificationService;
- import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
- import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.StubrendererListener;
--import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.StubrendererService;
--import org.opendaylight.yangtools.concepts.ListenerRegistration;
-+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.TransportpceServicepathService;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-@@ -27,17 +25,13 @@ import org.slf4j.LoggerFactory;
- public class StubrendererProvider {
-     private static final Logger LOG = LoggerFactory.getLogger(StubrendererProvider.class);
-     private final RpcProviderRegistry rpcRegistry;
--    private final NotificationPublishService notificationPublishService;
--
--    private BindingAwareBroker.RpcRegistration<StubrendererService> rpcRegistration;
--    private ListenerRegistration<StubrendererListener> stubRendererlistenerRegistration;
-+    private BindingAwareBroker.RpcRegistration<TransportpceServicepathService> rpcRegistration;
-     public StubrendererProvider(RpcProviderRegistry rpcProviderRegistry,
-             NotificationService notificationService,
-             NotificationPublishService notificationPublishService) {
-         this.rpcRegistry = rpcProviderRegistry;
--        this.notificationPublishService = notificationPublishService;
-     }
-     /**
-@@ -45,8 +39,8 @@ public class StubrendererProvider {
-      */
-     public void init() {
-         LOG.info("StubrendererProvider Session Initiated");
--        final StubrendererImpl consumer = new StubrendererImpl(this.notificationPublishService);
--        this.rpcRegistration = this.rpcRegistry.addRpcImplementation(StubrendererService.class, consumer);
-+        final StubrendererImpl consumer = new StubrendererImpl();
-+        this.rpcRegistration = this.rpcRegistry.addRpcImplementation(TransportpceServicepathService.class, consumer);
-     }
-     /**
+                 .setRequestId(input.getServiceHandlerHeader().getRequestId())
index bf38678acacd8f863e56ff425e4e5beb6047414a..66a0dac89f38199bf112b217fa0f77548e112fd8 100644 (file)
@@ -199,7 +199,7 @@ class TransportOlmTesting(unittest.TestCase):
         time.sleep(20)
 
     def test_05_connect_xprdA_to_roadmA(self):
-        url = "{}/operations/networkutils:init-xpdr-rdm-links".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-networkutils:init-xpdr-rdm-links".format(self.restconf_baseurl)
         data = {
             "networkutils:input": {
                 "networkutils:links-input": {
@@ -221,7 +221,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertIn('Xponder Roadm Link created successfully', res["output"]["result"])
 
     def test_06_connect_roadmA_to_xpdrA(self):
-        url = "{}/operations/networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
         data = {
             "networkutils:input": {
                 "networkutils:links-input": {
@@ -243,7 +243,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertIn('Roadm Xponder links created successfully', res["output"]["result"])
 
     def test_07_connect_xprdC_to_roadmC(self):
-        url = "{}/operations/networkutils:init-xpdr-rdm-links".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-networkutils:init-xpdr-rdm-links".format(self.restconf_baseurl)
         data = {
             "networkutils:input": {
                 "networkutils:links-input": {
@@ -265,7 +265,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertIn('Xponder Roadm Link created successfully', res["output"]["result"])
 
     def test_08_connect_roadmC_to_xpdrC(self):
-        url = "{}/operations/networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
         data = {
             "networkutils:input": {
                 "networkutils:links-input": {
@@ -287,7 +287,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertIn('Roadm Xponder links created successfully', res["output"]["result"])
 
     def test_09_create_OTS_ROADMA(self):
-        url = "{}/operations/renderer:create-ots-oms".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:create-ots-oms".format(self.restconf_baseurl)
         data = {
             "input" : {
                 "node-id" : "ROADMA",
@@ -304,7 +304,7 @@ class TransportOlmTesting(unittest.TestCase):
                       res["output"]["result"])
 
     def test_10_create_OTS_ROADMC(self):
-        url = "{}/operations/renderer:create-ots-oms".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:create-ots-oms".format(self.restconf_baseurl)
         data = {
             "input" : {
                 "node-id" : "ROADMC",
@@ -321,7 +321,7 @@ class TransportOlmTesting(unittest.TestCase):
                       res["output"]["result"])
 
     def test_11_get_PM_ROADMA(self):
-        url = "{}/operations/olm:get-pm".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-olm:get-pm".format(self.restconf_baseurl)
         data = {
             "input": {
                 "node-id": "ROADMA",
@@ -352,7 +352,7 @@ class TransportOlmTesting(unittest.TestCase):
             }, res["output"]["measurements"])
 
     def test_12_get_PM_ROADMC(self):
-        url = "{}/operations/olm:get-pm".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-olm:get-pm".format(self.restconf_baseurl)
         data = {
             "input": {
                 "node-id": "ROADMC",
@@ -383,7 +383,7 @@ class TransportOlmTesting(unittest.TestCase):
             }, res["output"]["measurements"])
 
     def test_13_calculate_span_loss_base_ROADMA_ROADMC(self):
-        url = "{}/operations/olm:calculate-spanloss-base".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-olm:calculate-spanloss-base".format(self.restconf_baseurl)
         data = {
             "input": {
                 "src-type": "link",
@@ -405,7 +405,7 @@ class TransportOlmTesting(unittest.TestCase):
         time.sleep(5)
 
     def test_14_calculate_span_loss_base_all(self):
-        url = "{}/operations/olm:calculate-spanloss-base".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-olm:calculate-spanloss-base".format(self.restconf_baseurl)
         data = {
             "input": {
                 "src-type": "all"
@@ -454,7 +454,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(6, res['org-openroadm-optical-transport-interfaces:ots']['span-loss-receive'])
 
     def test_17_servicePath_create_AToZ(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:service-path".format(self.restconf_baseurl)
         data = {
             "input": {
                 "service-name": "test",
@@ -495,7 +495,7 @@ class TransportOlmTesting(unittest.TestCase):
         time.sleep(40)
 
     def test_18_servicePath_create_ZToA(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:service-path".format(self.restconf_baseurl)
         data = {
             "input": {
                 "service-name": "test",
@@ -536,7 +536,7 @@ class TransportOlmTesting(unittest.TestCase):
         time.sleep(40)
 
     def test_19_service_power_setup_XPDRA_XPDRC(self):
-        url = "{}/operations/olm:service-power-setup".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-olm:service-power-setup".format(self.restconf_baseurl)
         data = {
             "input": {
                 "service-name": "test",
@@ -609,7 +609,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual("power", res['roadm-connections'][0]['opticalControlMode'])
 
     def test_23_service_power_setup_XPDRC_XPDRA(self):
-        url = "{}/operations/olm:service-power-setup".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-olm:service-power-setup".format(self.restconf_baseurl)
         data = {
             "input": {
                 "service-name": "test",
@@ -671,7 +671,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(2, res['roadm-connections'][0]['target-output-power'])
 
     def test_26_service_power_turndown_XPDRA_XPDRC(self):
-        url = "{}/operations/olm:service-power-turndown".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-olm:service-power-turndown".format(self.restconf_baseurl)
         data = {
             "input": {
                 "service-name": "test",
@@ -732,7 +732,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual("off", res['roadm-connections'][0]['opticalControlMode'])
 
     def test_29_servicePath_delete_AToZ(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:service-path".format(self.restconf_baseurl)
         data = {
             "input": {
                 "service-name": "test",
@@ -773,7 +773,7 @@ class TransportOlmTesting(unittest.TestCase):
         time.sleep(10)
 
     def test_30_servicePath_delete_ZToA(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:service-path".format(self.restconf_baseurl)
         data = {
             "input": {
                 "service-name": "test",
@@ -816,7 +816,7 @@ class TransportOlmTesting(unittest.TestCase):
     """to test case where SRG where the xpdr is connected to has no optical range data"""
 
     def test_31_connect_xprdA_to_roadmA(self):
-        url = "{}/operations/networkutils:init-xpdr-rdm-links".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-networkutils:init-xpdr-rdm-links".format(self.restconf_baseurl)
         data = {
             "networkutils:input": {
                 "networkutils:links-input": {
@@ -838,7 +838,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertIn('Xponder Roadm Link created successfully', res["output"]["result"])
 
     def test_32_connect_roadmA_to_xpdrA(self):
-        url = "{}/operations/networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
         data = {
             "networkutils:input": {
                 "networkutils:links-input": {
@@ -860,7 +860,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertIn('Roadm Xponder links created successfully', res["output"]["result"])
 
     def test_33_servicePath_create_AToZ(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:service-path".format(self.restconf_baseurl)
         data = {
             "input": {
                 "service-name": "test2",
@@ -903,7 +903,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(2, res['org-openroadm-optical-channel-interfaces:och']['wavelength-number'])
 
     def test_35_servicePath_delete_AToZ(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:service-path".format(self.restconf_baseurl)
         data = {
             "input": {
                 "service-name": "test",
@@ -956,7 +956,7 @@ class TransportOlmTesting(unittest.TestCase):
         time.sleep(10)
 
     def test_38_calculate_span_loss_current(self):
-        url = "{}/operations/olm:calculate-spanloss-current".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-olm:calculate-spanloss-current".format(self.restconf_baseurl)
         headers = {'content-type': 'application/json'}
         response = requests.request(
              "POST", url, headers=headers, auth=('admin', 'admin'))
index 05b23c59da5488d09f59817d46e7d7fe131a555e..8d60017be414ce7c2879e2e8b82370bc5169afb7 100644 (file)
@@ -107,7 +107,7 @@ class TransportPCEtesting(unittest.TestCase):
 
     # Path Computation success
     def test_04_path_computation(self):
-        url = ("{}/operations/pce:path-computation-request"
+        url = ("{}/operations/transportpce-pce:path-computation-request"
               .format(self.restconf_baseurl))
         body = {"input": {
                 "service-name": "service-1",
@@ -191,7 +191,7 @@ class TransportPCEtesting(unittest.TestCase):
 
     # Test failed path computation
     def test_09_fail_path_computation(self):
-        url = ("{}/operations/pce:path-computation-request"
+        url = ("{}/operations/transportpce-pce:path-computation-request"
               .format(self.restconf_baseurl))
         body = {"input": {
                 "service-handler-header": {
@@ -212,7 +212,7 @@ class TransportPCEtesting(unittest.TestCase):
 
     # Test1 success path computation
     def test_10_success1_path_computation(self):
-        url = ("{}/operations/pce:path-computation-request"
+        url = ("{}/operations/transportpce-pce:path-computation-request"
               .format(self.restconf_baseurl))
         body = {"input": {
                 "service-name": "service1",
@@ -313,7 +313,7 @@ class TransportPCEtesting(unittest.TestCase):
 
     # Test2 success path computation with path description
     def test_11_success2_path_computation(self):
-        url = ("{}/operations/pce:path-computation-request"
+        url = ("{}/operations/transportpce-pce:path-computation-request"
               .format(self.restconf_baseurl))
         body = {"input": {
                 "service-name": "service 1",
@@ -349,7 +349,7 @@ class TransportPCEtesting(unittest.TestCase):
 
     # Test3 success path computation with hard-constraints exclude
     def test_12_success3_path_computation(self):
-        url = ("{}/operations/pce:path-computation-request"
+        url = ("{}/operations/transportpce-pce:path-computation-request"
               .format(self.restconf_baseurl))
         body = {"input": {
                 "service-name": "service 1",
index 8eb6706449b95fd51e42b273c0c9ce5aed4f870d..f43218f2011d9a0b7d9cc9e127a7995888be7802 100644 (file)
@@ -97,7 +97,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
 #                         'connected')
 
     def test_02_restconfAPI(self):
-        url = ("{}/config/portmapping:network/nodes/controller-config".format(self.restconf_baseurl))
+        url = ("{}/config/transportpce-portmapping:network/nodes/controller-config".format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
             "GET", url, headers=headers, auth=('admin', 'admin'))
@@ -142,7 +142,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         time.sleep(10)
 
     def test_05_rdm_portmapping_DEG1_TTP_TXRX(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/ROADMA/mapping/DEG1-TTP-TXRX"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -156,7 +156,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             res['mapping'])
 
     def test_06_rdm_portmapping_SRG1_PP7_TXRX(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/ROADMA/mapping/SRG1-PP7-TXRX"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -170,7 +170,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             res['mapping'])
 
     def test_07_rdm_portmapping_SRG3_PP1_TXRX(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/ROADMA/mapping/SRG3-PP1-TXRX"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -217,7 +217,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         time.sleep(10)
 
     def test_10_xpdr_portmapping_NETWORK1(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/XPDRA/mapping/XPDR1-NETWORK1"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -231,7 +231,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             res['mapping'])
 
     def test_11_xpdr_portmapping_NETWORK2(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/XPDRA/mapping/XPDR1-NETWORK2"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -245,7 +245,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             res['mapping'])
 
     def test_12_xpdr_portmapping_CLIENT1(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/XPDRA/mapping/XPDR1-CLIENT1"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -260,7 +260,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             res['mapping'])
 
     def test_13_xpdr_portmapping_CLIENT2(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/XPDRA/mapping/XPDR1-CLIENT2"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -275,7 +275,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             res['mapping'])
 
     def test_14_xpdr_portmapping_CLIENT4(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/XPDRA/mapping/XPDR1-CLIENT4"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -314,7 +314,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             res['errors']['error'])
 
     def test_17_xpdr_device_disconnected(self):
-        url = ("{}/config/portmapping:network/nodes/XPDRA".format(self.restconf_baseurl))
+        url = ("{}/config/transportpce-portmapping:network/nodes/XPDRA".format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
             "GET", url, headers=headers, auth=('admin', 'admin'))
@@ -349,7 +349,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             res['errors']['error'])
 
     def test_20_rdm_device_disconnected(self):
-        url = ("{}/config/portmapping:network/nodes/ROADMA".format(self.restconf_baseurl))
+        url = ("{}/config/transportpce-portmapping:network/nodes/ROADMA".format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
             "GET", url, headers=headers, auth=('admin', 'admin'))
index d0d1cfd4a8a7d6eca6cb2df96f1a670b7aedfac5..729bbb7f36b2d3c47a6a3d9ecf9801ab4b6748dc 100644 (file)
@@ -126,7 +126,7 @@ class TransportPCERendererTesting(unittest.TestCase):
         time.sleep(20)
 
     def test_03_rdm_portmapping(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/ROADMA"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -144,7 +144,7 @@ class TransportPCERendererTesting(unittest.TestCase):
              res['nodes'][0]['mapping'])
 
     def test_04_xpdr_portmapping(self):
-        url = ("{}/config/portmapping:network/"
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/XPDRA"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -163,7 +163,7 @@ class TransportPCERendererTesting(unittest.TestCase):
              res['nodes'][0]['mapping'])
 
     def test_05_service_path_create(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:service-path".format(self.restconf_baseurl)
         data = {"renderer:input": {
              "renderer:service-name": "service_test",
              "renderer:wave-number": "7",
@@ -350,7 +350,7 @@ class TransportPCERendererTesting(unittest.TestCase):
         self.assertIn('not-reserved-inuse', res['circuit-packs'][0]["equipment-state"])
 
     def test_14_service_path_delete(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
+        url = "{}/operations/transportpce-device-renderer:service-path".format(self.restconf_baseurl)
         data = {"renderer:input": {
              "renderer:service-name": "service_test",
              "renderer:wave-number": "7",
index 6faf2e3e81bc506390568e7873ca98670987c590..51271fa15eaca92b625453cac681594ac84ea0be 100644 (file)
@@ -657,7 +657,7 @@ class TransportPCEtesting(unittest.TestCase):
 
     # Verify 'test' service deleted
     def test_13_get_service(self):
-        url = ("{}/operational/org-openroadm-service:service-list/services/test-new"
+        url = ("{}/operational/org-openroadm-service:service-list/services/test"
               .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json',
         "Accept": "application/json"}
index fa1ed4db78e74849b696eaf28405d423c44b5447..60a1dd0be6f882bfa27208f984a170dedf257cf9 100644 (file)
@@ -117,7 +117,7 @@ class TransportPCEtesting(unittest.TestCase):
             for i in range(0,nbTP):
                 tp_id=res_topo['node'][0]['ietf-network-topology:termination-point'][i]['tp-id']
                 if(not "CP" in tp_id):
-                    url_map="{}/config/portmapping:network/nodes/ROADMA/mapping/"+tp_id
+                    url_map="{}/config/transportpce-portmapping:network/nodes/ROADMA/mapping/"+tp_id
                     with open('./transportpce_tests/log/topoPortMap.log', 'a') as outfile1:
                         outfile1.write('Config: '+`i`+'/'+ `nbTP`+' : '+url_map+'\n')
                     url = (url_map.format(self.restconf_baseurl))
@@ -142,7 +142,7 @@ class TransportPCEtesting(unittest.TestCase):
             for i in range(0,nbTP):
                 tp_id=res_topo['node'][0]['ietf-network-topology:termination-point'][i]['tp-id']
                 if(not "CTP" in tp_id):
-                    url_map ="{}/config/portmapping:network/nodes/ROADMA/mapping/"+tp_id
+                    url_map ="{}/config/transportpce-portmapping:network/nodes/ROADMA/mapping/"+tp_id
                     with open('./transportpce_tests/log/topoPortMap.log', 'a') as outfile1:
                         outfile1.write('Config: '+`i`+'/'+ `nbTP`+' : '+url_map+'\n')
                     url = (url_map.format(self.restconf_baseurl))
@@ -215,7 +215,7 @@ class TransportPCEtesting(unittest.TestCase):
             nbTP=len(res_topo['node'][0]['ietf-network-topology:termination-point'])
             for i in range(0,nbTP):
                 tp_id=res_topo['node'][0]['ietf-network-topology:termination-point'][i]['tp-id']
-                url_map = "{}/config/portmapping:network/nodes/XPDRA/mapping/"+tp_id
+                url_map = "{}/config/transportpce-portmapping:network/nodes/XPDRA/mapping/"+tp_id
                 with open('./transportpce_tests/log/topoPortMap.log', 'a') as outfile1:
                     outfile1.write('Config: '+`i`+'/'+ `nbTP`+' : '+url_map+'\n')
                 url = url_map.format(self.restconf_baseurl)
@@ -226,7 +226,7 @@ class TransportPCEtesting(unittest.TestCase):
                 if("CLIENT" in tp_id):
                     #Verify the tail equipment id of the client
                     xpdr_client=res_topo['node'][0]['ietf-network-topology:termination-point'][i]["org-openroadm-network-topology:xpdr-client-attributes"]["tail-equipment-id"]
-                    url_map = "{}/config/portmapping:network/nodes/XPDRA/mapping/"+xpdr_client
+                    url_map = "{}/config/transportpce-portmapping:network/nodes/XPDRA/mapping/"+xpdr_client
                     with open('./transportpce_tests/log/topoPortMap.log', 'a') as outfile1:
                         outfile1.write('Config: '+`i`+'/'+ `nbTP`+' : '+xpdr_client+'\n')
                     url = url_map.format(self.restconf_baseurl)
@@ -237,7 +237,7 @@ class TransportPCEtesting(unittest.TestCase):
                 if("NETWORK" in tp_id):
                     #Verify the tail equipment id of the network
                     xpdr_network=res_topo['node'][0]['ietf-network-topology:termination-point'][i]["org-openroadm-network-topology:xpdr-network-attributes"]["tail-equipment-id"]
-                    url_map = "{}/config/portmapping:network/nodes/XPDRA/mapping/"+xpdr_network
+                    url_map = "{}/config/transportpce-portmapping:network/nodes/XPDRA/mapping/"+xpdr_network
                     with open('./transportpce_tests/log/topoPortMap.log', 'a') as outfile1:
                         outfile1.write('Config: '+`i`+'/'+ `nbTP`+' : '+xpdr_network+'\n')
                     url = url_map.format(self.restconf_baseurl)
index 40d21b8767fa2d41e55593ffd9fce7a7cfc8af06..535ffb3eaca72379eb64b39008887231933636cb 100644 (file)
@@ -341,7 +341,7 @@ class TransportPCEtesting(unittest.TestCase):
     #Connect the tail XPDRA to ROADMA and vice versa
     def test_10_connect_tail_xpdr_rdm(self):
          #Connect the tail: XPDRA to ROADMA
-        url = ("{}/operations/networkutils:init-xpdr-rdm-links"
+        url = ("{}/operations/transportpce-networkutils:init-xpdr-rdm-links"
                 .format(self.restconf_baseurl))
         data = {"networkutils:input": {
              "networkutils:links-input": {
@@ -363,7 +363,7 @@ class TransportPCEtesting(unittest.TestCase):
 
     def test_11_connect_tail_rdm_xpdr(self):
          #Connect the tail: ROADMA to XPDRA
-         url = ("{}/operations/networkutils:init-rdm-xpdr-links"
+         url = ("{}/operations/transportpce-networkutils:init-rdm-xpdr-links"
                  .format(self.restconf_baseurl))
          data = {"networkutils:input": {
               "networkutils:links-input": {