Merge "Fix bug in OLM during spanloss computation"
authorGuillaume Lambert <guillaume.lambert@orange.com>
Fri, 29 Oct 2021 13:32:04 +0000 (13:32 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 29 Oct 2021 13:32:04 +0000 (13:32 +0000)
58 files changed:
INFO.yaml
api/pom.xml
common/pom.xml
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion121.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion221.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion710.java
dmaap-client/pom.xml
docs/developer-guide.rst
docs/images/TransportPCE-tapi-abstraction.jpg
docs/tox-guide.rst
features/odl-transportpce-dmaap-client/pom.xml
features/odl-transportpce-inventory/pom.xml
features/odl-transportpce-nbinotifications/pom.xml
features/odl-transportpce-swagger/pom.xml
features/odl-transportpce-tapi/pom.xml
features/odl-transportpce/pom.xml
features/pom.xml
inventory/pom.xml
karaf/pom.xml
nbinotifications/pom.xml
networkmodel/pom.xml
olm/pom.xml
ordmodels/common/pom.xml
ordmodels/device/pom.xml
ordmodels/network/pom.xml
ordmodels/pom.xml
ordmodels/service/pom.xml
pce/pom.xml
pom.xml
renderer/pom.xml
servicehandler/pom.xml
tapi/pom.xml
tapimodels/pom.xml
test-common/pom.xml
tests/build_karaf_for_tests.sh
tests/karaf121.env [new file with mode: 0644]
tests/karaf221.env [new file with mode: 0644]
tests/karaf71.env [new file with mode: 0644]
tests/launch_tests.sh
tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py
tests/transportpce_tests/1.2.1/test05_olm.py
tests/transportpce_tests/1.2.1/test06_end2end.py
tests/transportpce_tests/2.2.1/test03_otn_topology.py
tests/transportpce_tests/2.2.1/test04_flex_grid.py
tests/transportpce_tests/2.2.1/test05_renderer_service_path_nominal.py
tests/transportpce_tests/2.2.1/test08_olm.py
tests/transportpce_tests/2.2.1/test09_tapi.py
tests/transportpce_tests/2.2.1/test11_end2end.py
tests/transportpce_tests/7.1/test01_portmapping.py
tests/transportpce_tests/common/simulators.py
tests/transportpce_tests/common/test_utils.py
tests/transportpce_tests/hybrid/test01_device_change_notifications.py
tests/transportpce_tests/hybrid/test02_B100G_end2end.py
tests/transportpce_tests/pce/test01_pce.py
tests/transportpce_tests/pce/test02_pce_400G.py
tests/transportpce_tests/with_docker/test01_gnpy.py
tests/transportpce_tests/with_docker/test02_nbinotifications.py
tox.ini

index 473ec70b8be9b6d126cb3e6ee0118cb51f43b5b3..169677399abc9b73d897933419e653bf937e734c 100644 (file)
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -4,10 +4,10 @@ project_creation_date: '2016-05-26'
 project_category: ''
 lifecycle_state: 'Incubation'
 project_lead: &odl_transportpce_ptl
-    name: 'Guillaume Lambert'
-    email: 'guillaume.lambert@orange.com'
+    name: 'Gilles Thouenon'
+    email: 'gilles.thouenon@orange.com'
     company: 'orange'
-    id: 'guillaume.lambert'
+    id: 'gthouenon'
     timezone: 'Europe/Paris'
 primary_contact: *odl_transportpce_ptl
 issue_tracking:
@@ -44,10 +44,10 @@ committers:
       company: 'att'
       id: 'b95quare'
       timezone: 'America/New_York'
-    - name: 'Gilles Thouenon'
-      email: 'gilles.thouenon@orange.com'
+    - name: 'Guillaume Lambert'
+      email: 'guillaume.lambert@orange.com'
       company: 'orange'
-      id: 'gthouenon'
+      id: 'guillaume.lambert'
       timezone: 'Europe/Paris'
     - name: 'Shweta Vachhani'
       email: 'sv111y@att.com'
index 5b787459c67c08c91c9cb1e5fa900b6448de5de0..c78d64d889aa2bb91d40b631f4c0ee6834d12544 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
index dbc4b9465677c56be6c2a9178079b1a036355bc3..fe5e8b1b404215970da97c59d0178525f441c9a2 100644 (file)
@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.5</version>
+        <version>8.0.7</version>
         <relativePath />
     </parent>
 
@@ -24,7 +24,7 @@
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>netconf-artifacts</artifactId>
-                <version>2.0.5</version>
+                <version>2.0.7</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index 9862ec9ad978533bf1ae55a9cc24e9323387acd0..6db57d08a7f0bb63c2e75cd5534f1ac792215e3d 100644 (file)
@@ -374,9 +374,8 @@ public class PortMappingVersion121 {
             LOG.error(PortMappingUtils.NOT_CORRECT_PARTNERPORT_LOGMSG + PortMappingUtils.PARTNERPORT_CONF_ERROR_LOGMSG,
                 nodeId, port2.getPortName(), port.getPartnerPort().getCircuitPackName(),
                 port.getPortName(), circuitPackName);
-            //portIndex++;
-            //TODO check if we really needed to increase portIndex
-            //     if yes this block should not be in getPartnerPort
+            //TODO check if we really needed to increment portIndex in this condition
+            //     if yes this block should not be in getPartnerPort and must move back to createPpPortMapping
             return null;
         }
         return port2;
index b56c59045d771ef99616062a7294a5290c69ad33..39521f172e27c22db6fe272ab8684530ad9892c5 100644 (file)
@@ -242,40 +242,7 @@ public class PortMappingVersion221 {
             }
         }
         if (device.getOduSwitchingPools() != null) {
-            List<SwitchingPoolLcp> switchingPoolList = new ArrayList<>();
-            for (OduSwitchingPools odp : device.nonnullOduSwitchingPools().values()) {
-                Map<NonBlockingListKey,NonBlockingList> nbMap = new HashMap<>();
-                for (org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.org.openroadm.device.container.org
-                    .openroadm.device.odu.switching.pools.NonBlockingList nbl : odp.nonnullNonBlockingList().values()) {
-                    if (nbl.getPortList() == null) {
-                        continue;
-                    }
-                    List<String> lcpList = new ArrayList<>();
-                    for (PortList item : nbl.nonnullPortList().values()) {
-                        String key = item.getCircuitPackName() + "+" + item.getPortName();
-                        if (!lcpMap.containsKey(key)) {
-                            LOG.error(PortMappingUtils.NO_ASSOC_FOUND_LOGMSG,
-                                nodeId, item.getPortName(), item.getCircuitPackName(), "to a logical connection point");
-                            continue;
-                        }
-                        lcpList.add(lcpMap.get(key));
-                    }
-                    NonBlockingList nonBlockingList = new NonBlockingListBuilder()
-                        .setNblNumber(nbl.getNblNumber())
-                        .setInterconnectBandwidth(nbl.getInterconnectBandwidth())
-                        .setInterconnectBandwidthUnit(nbl.getInterconnectBandwidthUnit())
-                        .setLcpList(lcpList)
-                        .build();
-                    nbMap.put(nonBlockingList.key(), nonBlockingList);
-                }
-                switchingPoolList.add(
-                    new SwitchingPoolLcpBuilder()
-                        .setSwitchingPoolNumber(odp.getSwitchingPoolNumber())
-                        .setSwitchingPoolType(SwitchingPoolTypes.forValue(odp.getSwitchingPoolType().getIntValue()))
-                        .setNonBlockingList(nbMap)
-                        .build());
-            }
-            postPortMapping(nodeId, null, null, null, switchingPoolList, null);
+            postPortMapping(nodeId, null, null, null, getSwitchingPoolList(device, lcpMap, nodeId), null);
         }
         mappingMap.forEach((k,v) -> portMapList.add(v));
         return true;
@@ -371,6 +338,44 @@ public class PortMappingVersion221 {
         return portsList.get();
     }
 
+    private List<SwitchingPoolLcp> getSwitchingPoolList(OrgOpenroadmDevice device,
+            Map<String, String> lcpMap, String nodeId) {
+        List<SwitchingPoolLcp> switchingPoolList = new ArrayList<>();
+        for (OduSwitchingPools odp : device.nonnullOduSwitchingPools().values()) {
+            Map<NonBlockingListKey,NonBlockingList> nbMap = new HashMap<>();
+            for (org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.org.openroadm.device.container.org
+                .openroadm.device.odu.switching.pools.NonBlockingList nbl : odp.nonnullNonBlockingList().values()) {
+                if (nbl.getPortList() == null) {
+                    continue;
+                }
+                List<String> lcpList = new ArrayList<>();
+                for (PortList item : nbl.nonnullPortList().values()) {
+                    String key = item.getCircuitPackName() + "+" + item.getPortName();
+                    if (!lcpMap.containsKey(key)) {
+                        LOG.error(PortMappingUtils.NO_ASSOC_FOUND_LOGMSG,
+                            nodeId, item.getPortName(), item.getCircuitPackName(), "to a logical connection point");
+                        continue;
+                    }
+                    lcpList.add(lcpMap.get(key));
+                }
+                NonBlockingList nonBlockingList = new NonBlockingListBuilder()
+                    .setNblNumber(nbl.getNblNumber())
+                    .setInterconnectBandwidth(nbl.getInterconnectBandwidth())
+                    .setInterconnectBandwidthUnit(nbl.getInterconnectBandwidthUnit())
+                    .setLcpList(lcpList)
+                    .build();
+                nbMap.put(nonBlockingList.key(), nonBlockingList);
+            }
+            switchingPoolList.add(
+                new SwitchingPoolLcpBuilder()
+                    .setSwitchingPoolNumber(odp.getSwitchingPoolNumber())
+                    .setSwitchingPoolType(SwitchingPoolTypes.forValue(odp.getSwitchingPoolType().getIntValue()))
+                    .setNonBlockingList(nbMap)
+                    .build());
+        }
+        return switchingPoolList;
+    }
+
     private boolean checkPartnerPortNotNull(Ports port) {
         return (port.getPartnerPort() != null
             && port.getPartnerPort().getCircuitPackName() != null
@@ -498,9 +503,8 @@ public class PortMappingVersion221 {
             LOG.error(PortMappingUtils.NOT_CORRECT_PARTNERPORT_LOGMSG + PortMappingUtils.PARTNERPORT_CONF_ERROR_LOGMSG,
                 nodeId, port2.getPortName(), port.getPartnerPort().getCircuitPackName(),
                 port.getPortName(), circuitPackName);
-            //portIndex++;
-            //TODO check if we really needed to increase portIndex
-            //     if yes this block should not be in getPartnerPort
+            //TODO check if we really needed to increment portIndex in this condition
+            //     if yes this block should not be in getPartnerPort and must move back to createPpPortMapping
             return null;
         }
         return port2;
index 121c7514010f367e547b0d8a6b69454615237bf3..cfed29e9ce41ca0d6f5f87d9a2e4b9d6802a0d14 100644 (file)
@@ -327,41 +327,7 @@ public class PortMappingVersion710 {
             }
         }
         if (device.getOduSwitchingPools() != null) {
-            List<SwitchingPoolLcp> switchingPoolList = new ArrayList<>();
-            for (OduSwitchingPools odp : device.nonnullOduSwitchingPools().values()) {
-                Map<NonBlockingListKey,NonBlockingList> nbMap = new HashMap<>();
-                for (org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org
-                    .openroadm.device.odu.switching.pools.NonBlockingList nbl : odp.nonnullNonBlockingList().values()) {
-                    if (nbl.getPortList() == null) {
-                        continue;
-                    }
-                    List<String> lcpList = new ArrayList<>();
-                    for (PortList item : nbl.nonnullPortList().values()) {
-                        String key = item.getCircuitPackName() + "+" + item.getPortName();
-                        if (!lcpMap.containsKey(key)) {
-                            LOG.error(PortMappingUtils.NO_ASSOC_FOUND_LOGMSG,
-                                nodeId, item.getPortName(), item.getCircuitPackName(), "to a logical connection point");
-                            continue;
-                        }
-                        lcpList.add(lcpMap.get(key));
-                    }
-                    NonBlockingList nonBlockingList = new NonBlockingListBuilder()
-                        .setNblNumber(nbl.getNblNumber())
-                        .setInterconnectBandwidth(nbl.getInterconnectBandwidth())
-                        .setInterconnectBandwidthUnit(nbl.getInterconnectBandwidthUnit())
-                        .setLcpList(lcpList)
-                        .build();
-                    nbMap.put(nonBlockingList.key(), nonBlockingList);
-                }
-                switchingPoolList.add(
-                    new SwitchingPoolLcpBuilder()
-                        .setSwitchingPoolNumber(odp.getSwitchingPoolNumber())
-                        .setSwitchingPoolType(odp.getSwitchingPoolType())
-                        //TODO differs from 2.2.1 SwitchingPoolTypes.forValue(odp.getSwitchingPoolType().getIntValue())
-                        .setNonBlockingList(nbMap)
-                        .build());
-            }
-            postPortMapping(nodeId, null, null, null, switchingPoolList, null);
+            postPortMapping(nodeId, null, null, null, getSwitchingPoolList(device, lcpMap, nodeId), null);
         }
         mappingMap.forEach((k,v) -> portMapList.add(v));
         return true;
@@ -457,6 +423,45 @@ public class PortMappingVersion710 {
         return portsList.get();
     }
 
+    private List<SwitchingPoolLcp> getSwitchingPoolList(OrgOpenroadmDevice device,
+            Map<String, String> lcpMap, String nodeId) {
+        List<SwitchingPoolLcp> switchingPoolList = new ArrayList<>();
+        for (OduSwitchingPools odp : device.nonnullOduSwitchingPools().values()) {
+            Map<NonBlockingListKey,NonBlockingList> nbMap = new HashMap<>();
+            for (org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org
+                .openroadm.device.odu.switching.pools.NonBlockingList nbl : odp.nonnullNonBlockingList().values()) {
+                if (nbl.getPortList() == null) {
+                    continue;
+                }
+                List<String> lcpList = new ArrayList<>();
+                for (PortList item : nbl.nonnullPortList().values()) {
+                    String key = item.getCircuitPackName() + "+" + item.getPortName();
+                    if (!lcpMap.containsKey(key)) {
+                        LOG.error(PortMappingUtils.NO_ASSOC_FOUND_LOGMSG,
+                            nodeId, item.getPortName(), item.getCircuitPackName(), "to a logical connection point");
+                        continue;
+                    }
+                    lcpList.add(lcpMap.get(key));
+                }
+                NonBlockingList nonBlockingList = new NonBlockingListBuilder()
+                    .setNblNumber(nbl.getNblNumber())
+                    .setInterconnectBandwidth(nbl.getInterconnectBandwidth())
+                    .setInterconnectBandwidthUnit(nbl.getInterconnectBandwidthUnit())
+                    .setLcpList(lcpList)
+                    .build();
+                nbMap.put(nonBlockingList.key(), nonBlockingList);
+            }
+            switchingPoolList.add(
+                new SwitchingPoolLcpBuilder()
+                    .setSwitchingPoolNumber(odp.getSwitchingPoolNumber())
+                    .setSwitchingPoolType(odp.getSwitchingPoolType())
+                    //TODO differs from 2.2.1 SwitchingPoolTypes.forValue(odp.getSwitchingPoolType().getIntValue())
+                    .setNonBlockingList(nbMap)
+                    .build());
+        }
+        return switchingPoolList;
+    }
+
     private boolean checkPartnerPortNotNull(Ports port) {
         return (port.getPartnerPort() != null
             && port.getPartnerPort().getCircuitPackName() != null
@@ -584,9 +589,8 @@ public class PortMappingVersion710 {
             LOG.error(PortMappingUtils.NOT_CORRECT_PARTNERPORT_LOGMSG + PortMappingUtils.PARTNERPORT_CONF_ERROR_LOGMSG,
                 nodeId, port2.getPortName(), port.getPartnerPort().getCircuitPackName(),
                 port.getPortName(), circuitPackName);
-            //portIndex++;
-            //TODO check if we really needed to increase portIndex
-            //     if yes this block should not be in getPartnerPort
+            //TODO check if we really needed to increment portIndex in this condition
+            //     if yes this block should not be in getPartnerPort and must move back to createPpPortMapping
             return null;
         }
         return port2;
index c31de1313f7c37f4689de26e55c30ce0bddbf4c8..57d2e1d616df2916547f6516aeaf63b7cf992f0a 100644 (file)
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.5</version>
+        <version>8.0.7</version>
         <relativePath />
     </parent>
     <groupId>org.opendaylight.transportpce</groupId>
index 2e3389c4dcd314057d6a0c1ba9db16db3177a3f8..410ade6d1517d1b2f89a2231eb67b16d98f4aa45 100644 (file)
@@ -86,6 +86,12 @@ possible to manage some LO-ODU services (for the time being, only 10GE-ODU2e ser
 The full support of OTN services, including 1GE-ODU0 or 100GE, will be introduced along next
 releases (Mg/Al).
 
+In Silicon release, the management of TopologyUpdateNotification coming from the *Topology Management*
+module was implemented. This functionality enables the controller to update the information of existing
+services according to the online status of the network infrastructure. If any service is affected by
+the topology update and the *odl-transportpce-nbi* feature is installed, the Service Handler will send a
+notification to a Kafka server with the service update information.
+
 PCE
 ^^^
 
@@ -152,6 +158,11 @@ It includes several network layers:
    The population of OTN links (OTU4 and ODU4), and the adjustment of the tributary ports/slots
    pool occupancy when OTN services are created is supported since Magnesium SR2.**
 
+Since Silicon release, the Topology Management module process NETCONF event received through an
+event stream (as defined in RFC 5277) between devices and the NETCONF adapter of the controller.
+Current implementation detects device configuration changes and updates the topology datastore accordingly.
+Then, it sends a TopologyUpdateNotification to the *Service Handler* to indicate that a change has been
+detected in the network that may affect some of the already existing services.
 
 Renderer
 ^^^^^^^^
@@ -319,6 +330,7 @@ Internal APIs define REST APIs to interconnect TransportPCE modules :
 -   PCE to Topology Management
 -   Service Handler to Renderer
 -   Renderer to OLM
+-   Network Model to Service Handler
 
 Pce Service
 ^^^^^^^^^^^
@@ -397,7 +409,7 @@ odl-transportpce-stubmodels
 
    -  This feature provides function to be able to stub some of TransportPCE modules, pce and
       renderer (Stubpce and Stubrenderer).
-      Stubs are used for development purposes and can be used for some of the functionnal tests.
+      Stubs are used for development purposes and can be used for some of the functional tests.
 
 Interfaces to external software
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1345,16 +1357,33 @@ odl-transportpce-tapi
 
 This feature allows TransportPCE application to expose at its northbound interface other APIs than
 those defined by the OpenROADM MSA. With this feature, TransportPCE provides part of the Transport-API
-specified by the Open Networking Foundation. More specifically, part of the Topology Service component
-is implemented, allowing to expose to higher level applications an abstraction of its OpenROADM
-topologies in the form of topologies respecting the T-API modelling. The current version of TransportPCE
-implements the *tapi-topology.yang* model in the revision 2018-12-10 (T-API v2.1.2).
+specified by the Open Networking Foundation. More specifically, the Topology Service and Connectivity
+Service components are implemented, allowing to expose to higher level applications an abstraction of
+its OpenROADM topologies in the form of topologies respecting the T-API modelling, as well as
+creating/deleting connectivity services between the Service Interface Points (SIPs) exposed by the
+T-API topology. The current version of TransportPCE implements the *tapi-topology.yang* and
+*tapi-connectivity.yang* models in the revision 2018-12-10 (T-API v2.1.2).
 
+Additionally, support for the Notification Service component will be added in future releases, which
+will allow higher level applications to create/delete a Notification Subscription Service to receive
+several T-API notifications as defined in the *tapi-notification.yang* model.
 
--  RPC call
+T-API Topology Service
+~~~~~~~~~~~~~~~~~~~~~~
+
+-  RPC calls implemented:
 
    -  get-topology-details
 
+   -  get-node-details
+
+   -  get-node-edge-point-details
+
+   -  get-link-details
+
+   -  get-topology-list
+
+
 As in IETF or OpenROADM topologies, T-API topologies are composed of lists of nodes and links that
 abstract a set of network resources. T-API specifies the *T0 - Multi-layer topology* which is, as
 indicated by its name, a single topology that collapses network logical abstraction for all network
@@ -1375,13 +1404,35 @@ In the same way, a pair of unidirectional OTN links (OTU4, ODU4) present in *otn
 represented by a bidirectional OTN link in TAPI topology, while retaining their available bandwidth
 characteristics.
 
-Two kinds of topologies are currently implemented. The first one is the *"T0 - Multi-layer topology"*
+Phosphorus SR0 extends the T-API topology service implementation by bringing a fully described topology.
+*T0 - Full Multi-layer topology* is derived from the existing *T0 - Multi-layer topology*. But the ROADM
+infrastructure is not abstracted and the higher level application can get more details on the composition
+of the ROADM infrastructure controlled by TransportPCE. Each ROADM node found in the *openroadm-network*
+is converted into a *Photonic Media* node. The details of these T-API nodes are obtained from the
+*openroadm-topology*. Therefore, the external traffic ports of *Degree* and *SRG* nodes are represented
+with a set of Network Edge Points (NEPs) and SIPs belonging to the *Photonic Media* node and a pair of
+roadm-to-roadm links present in *openroadm-topology* is represented by a bidirectional *OMS* link in TAPI
+topology.
+Additionally, T-API topology related information is stored in TransportPCE datastore in the same way as
+OpenROADM topology layers. When a node is connected to the controller through the corresponding *REST API*,
+the T-API topology context gets updated dynamically and stored.
+
+.. note::
+
+    A naming nomenclature is defined to be able to map T-API and OpenROADM data.
+    i.e., T-API_roadm_Name = OpenROADM_roadmID+T-API_layer
+    i.e., T-API_roadm_nep_Name = OpenROADM_roadmID+T-API_layer+OpenROADM_terminationPointID
+
+Three kinds of topologies are currently implemented. The first one is the *"T0 - Multi-layer topology"*
 defined in the reference implementation of T-API. This topology gives an abstraction from data coming
 from openroadm-topology and otn-topology. Such topology may be rather complex since most of devices are
 represented through several nodes and links.
 Another topology, named *"Transponder 100GE"*, is also implemented. That latter provides a higher level
 of abstraction, much simpler, for the specific case of 100GE transponder, in the form of a single
 DSR node.
+Lastly, the *T0 - Full Multi-layer topology* topology was added. This topology collapses the data coming
+from openroadm-network, openroadm-topology and otn-topology. It gives a complete view of the optical
+network as defined in the reference implementation of T-API
 
 The figure below shows an example of TAPI abstractions as performed by TransportPCE starting from Aluminium SR2.
 
@@ -1439,13 +1490,282 @@ be connected together, through a point-to-point 100GE service running over a wav
     port is connected to Add/Drop nodes of the ROADM infrastructure are retrieved in order to
     abstract only relevant information.
 
+This request builds the TAPI *T0 - Full Multi-layer* topology with respect to the information existing in
+the T-API topology context stored in OpenDaylight datastores.
+
+.. code:: json
+
+    {
+      "tapi-topology:input": {
+        "tapi-topology:topology-id-or-name": "T0 - Full Multi-layer topology"
+        }
+    }
+
+**REST API** : *POST /restconf/operations/tapi-topology:get-node-details*
+
+This request returns the information, stored in the Topology Context, of the corresponding T-API node.
+The user can provide, either the Uuid associated to the attribute or its name.
+
+**Sample JSON Data**
+
+.. code:: json
+
+    {
+      "tapi-topology:input": {
+        "tapi-topology:topology-id-or-name": "T0 - Full Multi-layer topology",
+        "tapi-topology:node-id-or-name": "ROADM-A1+PHOTONINC_MEDIA"
+      }
+    }
+
+**REST API** : *POST /restconf/operations/tapi-topology:get-node-edge-point-details*
+
+This request returns the information, stored in the Topology Context, of the corresponding T-API NEP.
+The user can provide, either the Uuid associated to the attribute or its name.
+
+**Sample JSON Data**
+
+.. code:: json
+
+    {
+      "tapi-topology:input": {
+        "tapi-topology:topology-id-or-name": "T0 - Full Multi-layer topology",
+        "tapi-topology:node-id-or-name": "ROADM-A1+PHOTONINC_MEDIA",
+        "tapi-topology:ep-id-or-name": "ROADM-A1+PHOTONINC_MEDIA+DEG1-TTP-TXRX"
+      }
+    }
+
+**REST API** : *POST /restconf/operations/tapi-topology:get-link-details*
+
+This request returns the information, stored in the Topology Context, of the corresponding T-API link.
+The user can provide, either the Uuid associated to the attribute or its name.
+
+**Sample JSON Data**
+
+.. code:: json
+
+    {
+      "tapi-topology:input": {
+        "tapi-topology:topology-id-or-name": "T0 - Full Multi-layer topology",
+        "tapi-topology:link-id-or-name": "ROADM-C1-DEG1-DEG1-TTP-TXRXtoROADM-A1-DEG2-DEG2-TTP-TXRX"
+      }
+    }
+
+T-API Connectivity & Common Services
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Phosphorus SR0 extends the T-API interface support by implementing the T-API connectivity Service.
+This interface enables a higher level controller or an orchestrator to request the creation of
+connectivity services as defined in the *tapi-connectivity* model. As it is necessary to indicate the
+two (or more) SIPs (or endpoints) of the connectivity service, the *tapi-common* model is implemented
+to retrieve from the datastore all the innformation related to the SIPs in the tapi-context.
+Current implementation of the connectivity service maps the *connectivity-request* into the appropriate
+*openroadm-service-create* and relies on the Service Handler to perform path calculation and configuration
+of devices. Results received from the PCE and the Rendererare mapped back into T-API to create the
+corresponding Connection End Points (CEPs) and Connections in the T-API Connectivity Context and store it
+in the datastore.
+
+This first implementation includes the creation of:
+
+-   ROADM-to-ROADM tapi-connectivity service (MC connectivity service)
+-   OTN tapi-connectivity services (OCh/OTU, OTSi/OTU & ODU connectivity services)
+-   Ethernet tapi-connectivity services (DSR connectivity service)
+
+-  RPC calls implemented
+
+   -  create-connectivity-service
+
+   -  get-connectivity-service-details
+
+   -  get-connection-details
+
+   -  delete-connectivity-service
+
+   -  get-connection-end-point-details
+
+   -  get-connectivity-service-list
+
+   -  get-service-interface-point-details
+
+   -  get-service-interface-point-list
+
+Creating a T-API Connectivity service
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Use the *tapi* interface to create any end-to-end connectivity service on a T-API based
+network. Two kind of end-to-end "optical" connectivity services are managed by TransportPCE T-API module:
+- 10GE service from client port to client port of two OTN Xponders (MUXPDR or SWITCH)
+- Media Channel (MC) connectivity service from client add/drop port (PP port of SRG) to
+client add/drop port of two ROADMs.
+
+As mentioned earlier, T-API module interfaces with the Service Handler to automatically invoke the
+*renderer* module to create all required tapi connections and cross-connection on each device
+supporting the service.
+
+Before creating a low-order OTN connectivity service (1GE or 10GE services terminating on
+client port of MUXPDR or SWITCH), the user must ensure that a high-order ODU4 container
+exists and has previously been configured (it means structured to support low-order otn services)
+to support low-order OTN containers.
+
+Thus, OTN connectivity service creation implies three steps:
+1. OTSi/OTU connectivity service from network port to network port of two OTN Xponders (MUXPDR or SWITCH in Photonic media layer)
+2. ODU connectivity service from network port to network port of two OTN Xponders (MUXPDR or SWITCH in DSR/ODU layer)
+3. 10GE connectivity service creation from client port to client port of two OTN Xponders (MUXPDR or SWITCH in DSR/ODU layer)
+
+The first step corresponds to the OCH-OTU4 service from network port to network port of OpenROADM.
+The corresponding T-API cross and top connections are created between the CEPs of the T-API nodes
+involved in each request.
+
+Additionally, an *MC connectivity service* could be created between two ROADMs to create an optical
+tunnel and reserve resources in advance. This kind of service corresponds to the OC service creation
+use case described earlier.
+
+The management of other OTN services through T-API (1GE-ODU0, 100GE...) is planned for future releases.
+
+Any-Connectivity service creation
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+As for the Service Creation described for OpenROADM, the initial steps are the same:
+
+-   Connect netconf devices to the controller
+-   Create XPDR-RDM links and configure RDM-to-RDM links (in openroadm topologies)
+
+Bidirectional T-API links between xpdr and rdm nodes must be created manually. To that end, use the
+following REST RPCs:
+
+From xpdr <--> rdm:
+^^^^^^^^^^^^^^^^^^^
+
+**REST API** : *POST /restconf/operations/transportpce-tapinetworkutils:init-xpdr-rdm-tapi-link*
+
+**Sample JSON Data**
+
+.. code:: json
+
+    {
+        "input": {
+            "xpdr-node": "<XPDR_OpenROADM_id>",
+            "network-tp": "<XPDR_TP_OpenROADM_id>",
+            "rdm-node": "<ROADM_OpenROADM_id>",
+            "add-drop-tp": "<ROADM_TP_OpenROADM_id>"
+        }
+    }
+
+Use the following REST RPC to invoke T-API module in order to create a bidirectional connectivity
+service between two devices. The network should be composed of two ROADMs and two Xponders (SWITCH or MUX)
+
+**REST API** : *POST /restconf/operations/tapi-connectivity:create-connectivity-service*
+
+**Sample JSON Data**
+
+.. code:: json
+
+    {
+        "tapi-connectivity:input": {
+            "tapi-connectivity:end-point": [
+                {
+                    "tapi-connectivity:layer-protocol-name": "<Node_TAPI_Layer>",
+                    "tapi-connectivity:service-interface-point": {
+                        "tapi-connectivity:service-interface-point-uuid": "<SIP_UUID_of_NEP>"
+                    },
+                    "tapi-connectivity:administrative-state": "UNLOCKED",
+                    "tapi-connectivity:operational-state": "ENABLED",
+                    "tapi-connectivity:direction": "BIDIRECTIONAL",
+                    "tapi-connectivity:role": "SYMMETRIC",
+                    "tapi-connectivity:protection-role": "WORK",
+                    "tapi-connectivity:local-id": "<OpenROADM node ID>",
+                    "tapi-connectivity:name": [
+                        {
+                            "tapi-connectivity:value-name": "OpenROADM node id",
+                            "tapi-connectivity:value": "<OpenROADM node ID>"
+                        }
+                    ]
+                },
+                {
+                    "tapi-connectivity:layer-protocol-name": "<Node_TAPI_Layer>",
+                    "tapi-connectivity:service-interface-point": {
+                        "tapi-connectivity:service-interface-point-uuid": "<SIP_UUID_of_NEP>"
+                    },
+                    "tapi-connectivity:administrative-state": "UNLOCKED",
+                    "tapi-connectivity:operational-state": "ENABLED",
+                    "tapi-connectivity:direction": "BIDIRECTIONAL",
+                    "tapi-connectivity:role": "SYMMETRIC",
+                    "tapi-connectivity:protection-role": "WORK",
+                    "tapi-connectivity:local-id": "<OpenROADM node ID>",
+                    "tapi-connectivity:name": [
+                        {
+                            "tapi-connectivity:value-name": "OpenROADM node id",
+                            "tapi-connectivity:value": "<OpenROADM node ID>"
+                        }
+                    ]
+                }
+            ],
+            "tapi-connectivity:connectivity-constraint": {
+                "tapi-connectivity:service-layer": "<TAPI_Service_Layer>",
+                "tapi-connectivity:service-type": "POINT_TO_POINT_CONNECTIVITY",
+                "tapi-connectivity:service-level": "Some service-level",
+                "tapi-connectivity:requested-capacity": {
+                    "tapi-connectivity:total-size": {
+                        "value": "<CAPACITY>",
+                        "unit": "GB"
+                    }
+                }
+            },
+            "tapi-connectivity:state": "Some state"
+        }
+    }
+
+As for the previous RPC, MC and OTSi correspond to PHOTONIC_MEDIA layer services,
+ODU to ODU layer services and 10GE/DSR to DSR layer services. This RPC invokes the
+*Service Handler* module to trigger the *PCE* to compute a path over the
+*otn-topology* that must contains ODU4 links with valid bandwidth parameters. Once the path is computed
+and validated, the T-API CEPs (associated with a NEP), cross connections and top connections will be created
+according to the service request and the topology objects inside the computed path. Then, the *renderer* and
+*OLM* are invoked to implement the end-to-end path into the devices and to update the status of the connections
+and connectivity service.
+
+.. note::
+    Refer to the "Unconstrained E2E Service Provisioning" use cases from T-API Reference Implementation to get
+    more details about the process of connectivity service creation
+
+Deleting a connectivity service
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Use the following REST RPC to invoke *TAPI* module in order to delete a given optical
+connectivity service.
+
+**REST API** : *POST /restconf/operations/tapi-connectivity:delete-connectivity-service*
+
+**Sample JSON Data**
+
+.. code:: json
+
+    {
+        "tapi-connectivity:input": {
+            "tapi-connectivity:service-id-or-name": "<Service_UUID_or_Name>"
+        }
+    }
+
+.. note::
+    Deleting OTN connectivity services implies proceeding in the reverse way to their creation. Thus, OTN
+    connectivity service deletion must respect the three following steps:
+    1. delete first all 10GE services supported over any ODU4 to be deleted
+    2. delete ODU4
+    3. delete MC-OTSi supporting the just deleted ODU4
+
+T-API Notification Service
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In future releases, the T-API notification service will be implemented. The objective will be to write and read
+T-API notifications stored in topics of a Kafka server as explained later in the odl-transportpce-nbinotifications
+section, but T-API based.
+
+
 odl-transportpce-dmaap-client
 -----------------------------
 
 This feature allows TransportPCE application to send notifications on ONAP Dmaap Message router
 following service request results.
 This feature listens on NBI notifications and sends the PublishNotificationService content to
-Dmaap on the topic "unauthenticated.TPCE" through a POST request on /events/unauthenticated.TPCE
+Dmaap on the topic "unauthenticated. TPCE" through a POST request on /events/unauthenticated.TPCE
 It uses Jackson to serialize the notification to JSON and jersey client to send the POST request.
 
 odl-transportpce-nbinotifications
@@ -1455,7 +1775,7 @@ This feature allows TransportPCE application to write and read notifications sto
 It is basically composed of two kinds of elements. First are the 'publishers' that are in charge of sending a notification to
 a Kafka server. To protect and only allow specific classes to send notifications, each publisher
 is dedicated to an authorized class.
-Then are the 'subscribers' that are in charge of reading notifications from a Kafka server.
+There are the 'subscribers' that are in charge of reading notifications from a Kafka server.
 So when the feature is called to write notification to a Kafka server, it will serialize the notification
 into JSON format and then will publish it in a topic of the server via a publisher.
 And when the feature is called to read notifications from a Kafka server, it will retrieve it from
index 71f5ffeb82f9a3bd919835dff68fd436389c6186..072620ef4cabd70d339510c62b157e6a77548cb0 100644 (file)
Binary files a/docs/images/TransportPCE-tapi-abstraction.jpg and b/docs/images/TransportPCE-tapi-abstraction.jpg differ
index fc01f247c53fb96fd6046c0d3418caaa6fd8fa94..1ede63a3c2ef130330899a9ef175b553fdcd856f 100644 (file)
@@ -191,7 +191,7 @@ And::
 
 are equivalent to::
 
-    $ nosetests transportpce_tests/2.2.1/test01_portmapping.py
+    $ nosetests transportpce_tests/7.1/test01_portmapping.py
 
 but will ask tests script to use the controller `lighty.io <https://lighty.io/>`_
 build instead of Karaf.
@@ -214,6 +214,9 @@ Each of these profiles depend on the `buildcontroller` profile, which is simply
 there to build the controller from sources and adapt OLM default timers.
 They can also depend on `sims121` or `sims221` or `sims71` profiles to download
 simulators of OpenROADM devices when needed.
+Other profiles named from the pattern `build_karaf_testsXXX` have also been
+added to configure separate karaf instances with alternate listening ports
+in order to use concurrency.
 
 The `depend` parameter in `tox.ini` allows tox to establish the most efficient
 tests order strategy  when calling tox without the `-e` option.
@@ -226,6 +229,10 @@ For example::
 
     $ tox -e buildcontroller,sims121,tests121
 
+or with karaf alternate builds::
+
+    $ tox -e buildcontroller,build_karaf_tests121,sims121,tests121
+
 will build the controller and download simulators before running every functional
 tests for OpenROADM devices 1.2.1.
 Once that done, you only need to list the others sims versions profiles before
@@ -233,6 +240,10 @@ lauching hybrid tests::
 
     $ tox -e sims221,sims71,tests_hybrid
 
+or with karaf alternate builds::
+
+    $ tox -e build_karaf_tests_hybrid,sims221,sims71,tests_hybrid
+
 Also the same way arguments can be passed to the `launch_tests.sh` script,
 tests names can be passed as argument when calling the corresponding tox profiles.
 
@@ -340,3 +351,7 @@ For example, the following command will test the portmapping behavior
 for every OpenROADM devices supported versions::
 
     $  tox -p 3 -e buildcontroller,sims121,sims221,sims71,tests121,tests221,tests71 portmapping
+
+or with karaf alternate builds::
+
+    $  tox -p 3 -e buildcontroller,build_karaf_tests121,build_karaf_tests221,build_karaf_tests71,sims121,sims221,sims71,tests121,tests221,tests71 portmapping
index 1a1e02b79c7a155991d6f1e8212bf8ac6b443172..781e52dc4168ce749348bbd45e5e463788d85226 100644 (file)
@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.6</version>
+        <version>9.0.8</version>
         <relativePath />
     </parent>
     <groupId>org.opendaylight.transportpce</groupId>
index 6f8e952a194c284d713c24d7aa4ae29249513ffc..4449819c4c48da650e9ab036570c6c24bced1d27 100644 (file)
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.6</version>
+        <version>9.0.8</version>
         <relativePath/>
     </parent>
 
index 26499e07108bd3e73934cd4289a465eb1d145114..8e84062afdbf68a8efae467b3d936f94ead82ff0 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.6</version>
+        <version>9.0.8</version>
         <relativePath />
     </parent>
 
index e4c876f4bc0d3a4cff23591742d6729b3ea2d519..b8409fb39782203fc819b222d5d92b109e7dc14f 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>9.0.6</version>
+    <version>9.0.8</version>
     <relativePath/>
   </parent>
 
@@ -24,7 +24,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <name>OpenDaylight :: transportpce :: swagger</name>
 
   <properties>
-    <netconf.version>2.0.5</netconf.version>
+    <netconf.version>2.0.7</netconf.version>
     <configfile.directory>etc/opendaylight/karaf</configfile.directory>
   </properties>
 
index 76d8a42ccd7493cce67871a6ea73991a7c00790f..a5edc613e9666e1e57dae6e01c2a7d8f79d1f577 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>9.0.6</version>
+    <version>9.0.8</version>
     <relativePath/>
   </parent>
 
index 8f896cd0e6ec4d3bcadb3c5f9de913e11a3928f5..94a51a70149e4909197efc3c0e9f82b208687920 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>9.0.6</version>
+    <version>9.0.8</version>
     <relativePath/>
   </parent>
 
@@ -24,7 +24,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <name>OpenDaylight :: transportpce</name>
 
   <properties>
-    <netconf.version>2.0.5</netconf.version>
+    <netconf.version>2.0.7</netconf.version>
     <configfile.directory>etc/opendaylight/karaf</configfile.directory>
   </properties>
 
index c6157ce200f89c04ced0402e2effe84671a62ff2..3f55cd9aa9bcece0c8ecf55e75f2c4ad5df7b004 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>9.0.6</version>
+    <version>9.0.8</version>
     <relativePath/>
   </parent>
 
index 1fbabde4ef12155d9454fb9662bb183d3435d916..dd88fed09d0d4913f36c23baa9cf0cbfd87e48dc 100644 (file)
@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.5</version>
+        <version>8.0.7</version>
         <relativePath />
     </parent>
 
index 900d4457fa118c6afc0f5b37fa1c9866f05a96f3..8ed99ad436d894745ee129451847bc9192aa7271 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>9.0.6</version>
+    <version>9.0.8</version>
     <relativePath/>
   </parent>
 
index 654bb5d6cc13bdc8d58b946aa3f2ad342116e54f..4726600364dfc11f864cc8c1acb988ec3d428cc2 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.5</version>
+        <version>8.0.7</version>
         <relativePath />
     </parent>
 
index c257f636df21136012a607aca6e1e1de871c321d..491e3647b1e95a5a44c081c3e415772cd71cce8a 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>9.0.6</version>
+    <version>9.0.8</version>
     <relativePath/>
   </parent>
 
@@ -27,7 +27,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <dependency>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>mdsal-artifacts</artifactId>
-        <version>8.0.5</version>
+        <version>8.0.7</version>
         <scope>import</scope>
         <type>pom</type>
       </dependency>
index 4857dc1ff1d125a0346a0988f7dfffc87de06408..77d4217dec4d5a1d1987a8f564987425366b73fc 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
@@ -38,25 +38,21 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
-      <version>3.2.4</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.powermock</groupId>
       <artifactId>powermock-core</artifactId>
-      <version>2.0.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.powermock</groupId>
       <artifactId>powermock-api-mockito2</artifactId>
-      <version>2.0.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.powermock</groupId>
       <artifactId>powermock-module-junit4</artifactId>
-      <version>2.0.2</version>
       <scope>test</scope>
     </dependency>
 
index 01e8c747828c9ee258f98b5d964305a6ef057df2..de036e1825f1570a51fa6fcd48c647d65dcabc29 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
index 2b03901969e486b72921735f7f74499ee3587591..cf344f68f4cefcfc675b736e37557382f0aedaad 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
@@ -26,7 +26,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <dependency>
         <groupId>org.opendaylight.netconf</groupId>
         <artifactId>netconf-artifacts</artifactId>
-        <version>2.0.5</version>
+        <version>2.0.7</version>
         <scope>import</scope>
         <type>pom</type>
       </dependency>
index 39dd8fe5e14f2fe5b134813fdfe67af261a15c29..f21f9bcb779b69e60241ab08336c6de3bd95abaa 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
index 6d3b31ae79c4632a268631ee3c2de4259ba52e9e..3396ae393033c6e11b3bb87d9d824f3e0dcc4ff9 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
@@ -56,7 +56,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.18.1</version>
         <configuration>
           <skipTests>true</skipTests>
         </configuration>
index 5bb08f1fa8a0d05a22b6124f8245326b7a3b4f9c..f318e6c5d245916846e92ae2d21cb125105fbb72 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
index 617edb4a33760f73c0199952920fcf5f3a9a7e99..273caa99b5f38c61651ac2b009cb144dd690f444 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.5</version>
+        <version>8.0.7</version>
         <relativePath />
     </parent>
 
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
-            <version>2.25.0</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
             <artifactId>powermock-core</artifactId>
-            <version>2.0.2</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
             <artifactId>powermock-api-mockito2</artifactId>
-            <version>2.0.2</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
             <artifactId>powermock-module-junit4</artifactId>
-            <version>2.0.2</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
-                <version>2.6</version>
                 <executions>
                     <execution>
                         <goals>
diff --git a/pom.xml b/pom.xml
index d4172a51d08ceefe9061531a4489bc1799d1166c..6a20de91669df4f9dd5cb3ae7667c44cfae620aa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>9.0.6</version>
+        <version>9.0.8</version>
         <relativePath/>
     </parent>
 
index a7b5186654fb7afe949be9f8982f85855c484bc7..da29abb5f21e63c0fdb1a7634a0fd56a3a5adb65 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
index 147bf3cd446a49c4e69aac467fae95a840927a40..d42c4459709d1996998995e85c8ba604eca9aa2a 100644 (file)
@@ -15,7 +15,7 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
index 8804d0017b636cacaabb3bab7dfc04867b5753b0..618fc4cd3b99c1edbde3e905f39974521796d616 100644 (file)
@@ -15,7 +15,7 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
index fe2510a805392160c5c23fa5398d83eba720fc9f..cf73cfa15159f2ca0799c8c89e8a7f4f9242312a 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.5</version>
+    <version>8.0.7</version>
     <relativePath/>
   </parent>
 
index 5d2da04d6c183ca71d68552db946ee551c750ce8..b04d0fbee7d910dbfd81d31fd387d0bfd7d9cfba 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.5</version>
+        <version>8.0.7</version>
         <relativePath />
     </parent>
 
@@ -25,7 +25,7 @@
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>netconf-artifacts</artifactId>
-                <version>2.0.5</version>
+                <version>2.0.7</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index 3476e713c2e64a68ec92b9f00c6b0edd9cffe725..e2d13cd12eba411c3a645576e7a49b68aa897c5d 100755 (executable)
@@ -1,15 +1,21 @@
 #!/bin/sh
 
+if [ "$USE_LIGHTY" = "True" ]; then
+    echo "USE_LIGHTY set to True - no need to build karaf"
+    exit
+fi
+
 if [ -z "$USE_ODL_ALT_KARAF_INSTALL_DIR" ]; then
     exit
 fi
 
 cd $(dirname $0)
 
-if [ -f ../"$USE_ODL_ALT_KARAF_INSTALL_DIR"/target/assembly/bin/karaf_ ]; then
+if [ -z "$USE_ODL_ALT_KARAF_ENV" ]; then
     exit
 fi
 
+. $USE_ODL_ALT_KARAF_ENV
 . ./reflectwarn.sh
 cd  ../$USE_ODL_ALT_KARAF_INSTALL_DIR
 mvn clean install -B -q -s ../tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true
diff --git a/tests/karaf121.env b/tests/karaf121.env
new file mode 100644 (file)
index 0000000..078e71e
--- /dev/null
@@ -0,0 +1,7 @@
+export USE_ODL_ALT_WEBSOCKET_PORT=8186
+export USE_ODL_ALT_AKKA_PORT=2551
+export USE_ODL_ALT_AKKA_MGT_PORT=8559
+export USE_ODL_ALT_SHELL_PORT=8102
+export USE_ODL_ALT_RMI_REGISTRY_PORT=1100
+export USE_ODL_ALT_RMI_SERVER_PORT=44445
+export USE_ODL_ALT_RESTCONF_PORT=8182
diff --git a/tests/karaf221.env b/tests/karaf221.env
new file mode 100644 (file)
index 0000000..1366aab
--- /dev/null
@@ -0,0 +1,7 @@
+export USE_ODL_ALT_WEBSOCKET_PORT=8187
+export USE_ODL_ALT_AKKA_PORT=2552
+export USE_ODL_ALT_AKKA_MGT_PORT=8560
+export USE_ODL_ALT_SHELL_PORT=8103
+export USE_ODL_ALT_RMI_REGISTRY_PORT=1101
+export USE_ODL_ALT_RMI_SERVER_PORT=44446
+export USE_ODL_ALT_RESTCONF_PORT=8183
diff --git a/tests/karaf71.env b/tests/karaf71.env
new file mode 100644 (file)
index 0000000..9d8c219
--- /dev/null
@@ -0,0 +1,7 @@
+export USE_ODL_ALT_WEBSOCKET_PORT=8188
+export USE_ODL_ALT_AKKA_PORT=2553
+export USE_ODL_ALT_AKKA_MGT_PORT=8561
+export USE_ODL_ALT_SHELL_PORT=8104
+export USE_ODL_ALT_RMI_REGISTRY_PORT=1102
+export USE_ODL_ALT_RMI_SERVER_PORT=44447
+export USE_ODL_ALT_RESTCONF_PORT=8184
index f1951c2205bf83d9186a62c7c77060df8e3bb3c9..a2f3f1997ddd50e7c02b198161c05aa9f687ea12 100755 (executable)
@@ -1,7 +1,8 @@
 #!/bin/sh
 
-if [ "$USE_LIGHTY" != "True" ]; then
-    ./build_karaf_for_tests.sh
+if [ -n "$USE_ODL_ALT_KARAF_ENV" ]; then
+    echo "using environment variables from $USE_ODL_ALT_KARAF_ENV"
+    . $USE_ODL_ALT_KARAF_ENV
 fi
 
 for arg in $@; do
index 305c2ec89ee83a0b2d8ea96c808bdfcf4abbc00a..3a3368fe43a3905975588351dc15aa8812624c95 100644 (file)
@@ -19,6 +19,7 @@ import sys
 sys.path.append('transportpce_tests/common/')
 import test_utils
 
+
 class TransportPCERendererTesting(unittest.TestCase):
 
     processes = None
@@ -289,7 +290,8 @@ class TransportPCERendererTesting(unittest.TestCase):
             res['errors']['error'])
 
     def test_17_service_path_delete_rdm_check(self):
-        response = test_utils.check_netconf_node_request("ROADMA01", "roadm-connections/SRG1-PP7-TXRX-DEG1-TTP-TXRX-713:720")
+        response = test_utils.check_netconf_node_request(
+            "ROADMA01", "roadm-connections/SRG1-PP7-TXRX-DEG1-TTP-TXRX-713:720")
         self.assertEqual(response.status_code, requests.codes.conflict)
         res = response.json()
         self.assertIn(
index 96778f5acc2598c88d64bf1a01116954c4458323..0443b5ca16773293704aa196915755b6ccde5c0a 100644 (file)
@@ -227,8 +227,8 @@ class TransportOlmTesting(unittest.TestCase):
                                                      "dest-tp": "SRG1-PP1-TXRX", "src-tp": "DEG2-TTP-TXRX"},
                                                     {"node-id": "XPDRC01",
                                                      "dest-tp": "XPDR1-CLIENT1", "src-tp": "XPDR1-NETWORK1"}],
-                                                    196.1, 40, 196.075, 196.125, 761,
-                                                    768)
+                                                   196.1, 40, 196.075, 196.125, 761,
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
@@ -245,8 +245,8 @@ class TransportOlmTesting(unittest.TestCase):
                                                      "src-tp": "DEG1-TTP-TXRX", "dest-tp": "SRG1-PP1-TXRX"},
                                                     {"node-id": "XPDRA01",
                                                      "src-tp": "XPDR1-NETWORK1", "dest-tp": "XPDR1-CLIENT1"}],
-                                                    196.1, 40, 196.075, 196.125, 761,
-                                                    768)
+                                                   196.1, 40, 196.075, 196.125, 761,
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
@@ -304,14 +304,16 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(1, res['org-openroadm-optical-channel-interfaces:och']['wavelength-number'])
 
     def test_21_get_roadmconnection_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADMA01", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADMA01", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("gainLoss", res['roadm-connections'][0]['opticalControlMode'])
         self.assertEqual(-3.3, res['roadm-connections'][0]['target-output-power'])
 
     def test_22_get_roadmconnection_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADMC01", "roadm-connections/DEG2-TTP-TXRX-SRG1-PP1-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADMC01", "roadm-connections/DEG2-TTP-TXRX-SRG1-PP1-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("power", res['roadm-connections'][0]['opticalControlMode'])
@@ -367,7 +369,8 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(1, res['org-openroadm-optical-channel-interfaces:och']['wavelength-number'])
 
     def test_25_get_roadmconnection_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADMC01", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADMC01", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("gainLoss", res['roadm-connections'][0]['opticalControlMode'])
@@ -416,14 +419,16 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertIn('Success', res["output"]["result"])
 
     def test_27_get_roadmconnection_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADMA01", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADMA01", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("off", res['roadm-connections'][0]['opticalControlMode'])
         self.assertEqual(-60, res['roadm-connections'][0]['target-output-power'])
 
     def test_28_get_roadmconnection_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADMC01", "roadm-connections/DEG2-TTP-TXRX-SRG1-PP1-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADMC01", "roadm-connections/DEG2-TTP-TXRX-SRG1-PP1-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("off", res['roadm-connections'][0]['opticalControlMode'])
@@ -438,8 +443,8 @@ class TransportOlmTesting(unittest.TestCase):
                                                      "dest-tp": "SRG1-PP1-TXRX", "src-tp": "DEG2-TTP-TXRX"},
                                                     {"node-id": "XPDRC01",
                                                      "dest-tp": "XPDR1-CLIENT1", "src-tp": "XPDR1-NETWORK1"}],
-                                                    196.1, 40, 196.075, 196.125, 761,
-                                                    768)
+                                                   196.1, 40, 196.075, 196.125, 761,
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Request processed', res["output"]["result"])
@@ -455,8 +460,8 @@ class TransportOlmTesting(unittest.TestCase):
                                                      "src-tp": "DEG1-TTP-TXRX", "dest-tp": "SRG1-PP1-TXRX"},
                                                     {"node-id": "XPDRA01",
                                                      "src-tp": "XPDR1-NETWORK1", "dest-tp": "XPDR1-CLIENT1"}],
-                                                    196.1, 40, 196.075, 196.125, 761,
-                                                    768)
+                                                   196.1, 40, 196.075, 196.125, 761,
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Request processed', res["output"]["result"])
@@ -484,8 +489,8 @@ class TransportOlmTesting(unittest.TestCase):
                                                      "dest-tp": "XPDR1-NETWORK2", "src-tp": "XPDR1-CLIENT2"},
                                                     {"node-id": "ROADMA01",
                                                      "dest-tp": "DEG1-TTP-TXRX", "src-tp": "SRG1-PP2-TXRX"}],
-                                                    196.05, 40, 196.025, 196.075, 753,
-                                                    760)
+                                                   196.05, 40, 196.025, 196.075, 753,
+                                                   760)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
@@ -507,8 +512,8 @@ class TransportOlmTesting(unittest.TestCase):
                                                      "dest-tp": "XPDR1-NETWORK2", "src-tp": "XPDR1-CLIENT2"},
                                                     {"node-id": "ROADMA01",
                                                      "dest-tp": "DEG1-TTP-TXRX", "src-tp": "SRG1-PP2-TXRX"}],
-                                                    196.1, 40, 196.075, 196.125, 761,
-                                                    768)
+                                                   196.1, 40, 196.075, 196.125, 761,
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Request processed', res["output"]["result"])
index 3f7ca3b52aff45306c1664bf6eba47d95da1c572..aba898bf9acdf25d5321e0f7242a37fa0f73407c 100644 (file)
@@ -19,6 +19,7 @@ import sys
 sys.path.append('transportpce_tests/common/')
 import test_utils
 
+
 class TransportPCEFulltesting(unittest.TestCase):
     cr_serv_sample_data = {"input": {
         "sdnc-request-header": {
@@ -249,7 +250,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(2)
 
     def test_13_check_xc1_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADMA01", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADMA01", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -271,7 +273,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(5)
 
     def test_14_check_xc1_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADMC01", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADMC01", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -343,10 +346,10 @@ class TransportPCEFulltesting(unittest.TestCase):
                 freq_map_array = [int(x) for x in freq_map]
                 self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available")
             if ele['tp-id'] == 'DEG2-TTP-TXRX':
-                    freq_map = base64.b64decode(
-                        ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map'])
-                    freq_map_array = [int(x) for x in freq_map]
-                    self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available")
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available")
         time.sleep(3)
 
     def test_18_connect_xprdA_N2_to_roadmA_PP2(self):
@@ -411,7 +414,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(1)
 
     def test_24_check_xc2_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADMA01", "roadm-connections/DEG1-TTP-TXRX-SRG1-PP2-TXRX-753:760")
+        response = test_utils.check_netconf_node_request(
+            "ROADMA01", "roadm-connections/DEG1-TTP-TXRX-SRG1-PP2-TXRX-753:760")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -660,7 +664,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(1)
 
     def test_38_check_xc1_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADMA01", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADMA01", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -682,7 +687,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(7)
 
     def test_39_check_xc1_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADMC01", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADMC01", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -734,7 +740,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(2)
 
     def test_42_check_xc2_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADMA01", "roadm-connections/SRG1-PP2-TXRX-DEG1-TTP-TXRX-753:760")
+        response = test_utils.check_netconf_node_request(
+            "ROADMA01", "roadm-connections/SRG1-PP2-TXRX-DEG1-TTP-TXRX-753:760")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
index 84e3652c764aca4747e68fa576e8e38168917ecd..4ca1e226b54bf896eaa49be50b53f13378f83d6d 100644 (file)
@@ -183,15 +183,16 @@ class TransportPCEtesting(unittest.TestCase):
                     if tpType == 'XPONDER-CLIENT':
                         client += 1
                         print("tpId = {}".format(tpId))
-                        print("tp= {}".format(res['network'][0]['node'][i]['ietf-network-topology:termination-point'][j]))
+                        print("tp= {}".format(res['network'][0]['node'][i]
+                              ['ietf-network-topology:termination-point'][j]))
                         nbIfCapType = len(res['network'][0]['node'][i]['ietf-network-topology:termination-point'][j]
-                                 ['org-openroadm-otn-network-topology:tp-supported-interfaces']
-                                 ['supported-interface-capability'][0])
+                                          ['org-openroadm-otn-network-topology:tp-supported-interfaces']
+                                          ['supported-interface-capability'][0])
                         for k in range(0, nbIfCapType):
                             self.assertIn((res['network'][0]['node'][i]['ietf-network-topology:termination-point'][j]
-                                             ['org-openroadm-otn-network-topology:tp-supported-interfaces']
-                                             ['supported-interface-capability'][0]['if-cap-type']),
-                                           CHECK_LIST[nodeId]['port-types'])
+                                           ['org-openroadm-otn-network-topology:tp-supported-interfaces']
+                                           ['supported-interface-capability'][0]['if-cap-type']),
+                                          CHECK_LIST[nodeId]['port-types'])
                     elif tpType == 'XPONDER-NETWORK':
                         network += 1
                         self.assertEqual((res['network'][0]['node'][i]['ietf-network-topology:termination-point'][j]
index b48c9aacc05919e6455a09dd427e77f5949652d3..31b64cabe45b9081d61aaee54f4618ecc3f4047a 100644 (file)
@@ -71,13 +71,13 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         res = response.json()
         self.assertEqual(
             {
-              "mc-capabilities": [
-                {
-                  "mc-node-name": "DEG1-TTP",
-                  "center-freq-granularity": 6.25,
-                  "slot-width-granularity": 12.5
-                }
-              ]
+                "mc-capabilities": [
+                    {
+                        "mc-node-name": "DEG1-TTP",
+                        "center-freq-granularity": 6.25,
+                        "slot-width-granularity": 12.5
+                    }
+                ]
             }, res)
         time.sleep(3)
 
@@ -87,13 +87,13 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         res = response.json()
         self.assertEqual(
             {
-              "mc-capabilities": [
-                {
-                  "mc-node-name": "DEG2-TTP",
-                  "center-freq-granularity": 6.25,
-                  "slot-width-granularity": 12.5
-                }
-              ]
+                "mc-capabilities": [
+                    {
+                        "mc-node-name": "DEG2-TTP",
+                        "center-freq-granularity": 6.25,
+                        "slot-width-granularity": 12.5
+                    }
+                ]
             }, res)
         time.sleep(3)
 
@@ -103,13 +103,13 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         res = response.json()
         self.assertEqual(
             {
-              "mc-capabilities": [
-                {
-                  "mc-node-name": "SRG1-PP",
-                  "center-freq-granularity": 6.25,
-                  "slot-width-granularity": 12.5
-                }
-              ]
+                "mc-capabilities": [
+                    {
+                        "mc-node-name": "SRG1-PP",
+                        "center-freq-granularity": 6.25,
+                        "slot-width-granularity": 12.5
+                    }
+                ]
             }, res)
         time.sleep(3)
 
@@ -117,27 +117,27 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
     def test_07_device_renderer(self):
         data = {
             "transportpce-device-renderer:input": {
-            "transportpce-device-renderer:modulation-format": "dp-qpsk",
-            "transportpce-device-renderer:operation": "create",
-            "transportpce-device-renderer:service-name": "testNMC-MC",
-            "transportpce-device-renderer:wave-number": "0",
-            "transportpce-device-renderer:center-freq": "196.05",
-            "transportpce-device-renderer:width": "80",
-            "transportpce-device-renderer:nodes": [
-              {
-                "transportpce-device-renderer:node-id": "ROADM-D1",
-                "transportpce-device-renderer:src-tp": "SRG1-PP1-TXRX",
-                "transportpce-device-renderer:dest-tp": "DEG1-TTP-TXRX"
-              }
-            ],
-            "transportpce-device-renderer:min-freq": 196.00625,
-            "transportpce-device-renderer:max-freq": 196.09375,
-            "transportpce-device-renderer:lower-spectral-slot-number": 749,
-            "transportpce-device-renderer:higher-spectral-slot-number": 763
-          }
+                "transportpce-device-renderer:modulation-format": "dp-qpsk",
+                "transportpce-device-renderer:operation": "create",
+                "transportpce-device-renderer:service-name": "testNMC-MC",
+                "transportpce-device-renderer:wave-number": "0",
+                "transportpce-device-renderer:center-freq": "196.05",
+                "transportpce-device-renderer:width": "80",
+                "transportpce-device-renderer:nodes": [
+                    {
+                        "transportpce-device-renderer:node-id": "ROADM-D1",
+                        "transportpce-device-renderer:src-tp": "SRG1-PP1-TXRX",
+                        "transportpce-device-renderer:dest-tp": "DEG1-TTP-TXRX"
+                    }
+                ],
+                "transportpce-device-renderer:min-freq": 196.00625,
+                "transportpce-device-renderer:max-freq": 196.09375,
+                "transportpce-device-renderer:lower-spectral-slot-number": 749,
+                "transportpce-device-renderer:higher-spectral-slot-number": 763
+            }
         }
         url = test_utils.RESTCONF_BASE_URL + \
-              "/operations/transportpce-device-renderer:service-path"
+            "/operations/transportpce-device-renderer:service-path"
         response = test_utils.post_request(url, data)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
@@ -159,14 +159,14 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
                   "description": "TBD",
                   "supporting-port": "L1",
                   "type": "org-openroadm-interfaces:mediaChannelTrailTerminationPoint"},
-                  **res['interface'][0]),
+                 **res['interface'][0]),
             res['interface'][0])
 
         # Check the mc-ttp max and min-freq
         self.assertEqual({
-                          "min-freq": 196.00625,
-                          "max-freq": 196.09375
-                          },
+            "min-freq": 196.00625,
+            "max-freq": 196.09375
+        },
             res['interface'][0]['org-openroadm-media-channel-interfaces:mc-ttp'])
         time.sleep(3)
 
@@ -189,10 +189,10 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
 
         # Check the mc-ttp max and min-freq
         self.assertEqual({
-          "frequency": 196.05,
-          "width": 80
+            "frequency": 196.05,
+            "width": 80
         },
-        res['interface'][0]['org-openroadm-network-media-channel-interfaces:nmc-ctp'])
+            res['interface'][0]['org-openroadm-network-media-channel-interfaces:nmc-ctp'])
         time.sleep(3)
 
     # get SRG-NMC interface
@@ -216,7 +216,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
     # Create ROADM-connection
     def test_11_roadm_connection(self):
         response = test_utils.check_netconf_node_request("ROADM-D1",
-                                          "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-749:763")
+                                                         "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-749:763")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("SRG1-PP1-TXRX-DEG1-TTP-TXRX-749:763",
@@ -232,18 +232,18 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
     # delete ROADM connection
     def test_12_delete_roadm_connection(self):
         response = test_utils.delete_request(test_utils.URL_CONFIG_NETCONF_TOPO +
-                   "node/ROADM-D1/yang-ext:mount/" +
-                   "org-openroadm-device:org-openroadm-device/" +
-                   "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-749:763")
+                                             "node/ROADM-D1/yang-ext:mount/" +
+                                             "org-openroadm-device:org-openroadm-device/" +
+                                             "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-749:763")
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(3)
 
     # Delete NMC SRG interface
     def test_13_delete_srg_interface(self):
         response = test_utils.delete_request(test_utils.URL_CONFIG_NETCONF_TOPO +
-                                           "node/ROADM-D1/yang-ext:mount/" +
-                                           "org-openroadm-device:org-openroadm-device/" +
-                                           "interface/SRG1-PP1-TXRX-nmc-749:763")
+                                             "node/ROADM-D1/yang-ext:mount/" +
+                                             "org-openroadm-device:org-openroadm-device/" +
+                                             "interface/SRG1-PP1-TXRX-nmc-749:763")
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(3)
 
index 0c2ab278ad5a96db4fa8a3c47aa9b7579eda8d65..c4f263da40b9667232d108b44c62356ee8c88df2 100644 (file)
@@ -164,7 +164,8 @@ class TransportPCERendererTesting(unittest.TestCase):
             res['errors']['error'])
 
     def test_10_service_path_create_rdm_check(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP3-TXRX-DEG1-TTP-TXRX-713:720")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-A1", "roadm-connections/SRG1-PP3-TXRX-DEG1-TTP-TXRX-713:720")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
index 67e609fa775e7c09dc82a2d26b8b2f659636ad13..4c5316963d449adfaa8d94ae85cdd9951d1712ae 100644 (file)
@@ -229,7 +229,7 @@ class TransportOlmTesting(unittest.TestCase):
                                                     {"node-id": "XPDR-C1",
                                                      "dest-tp": "XPDR1-CLIENT1", "src-tp": "XPDR1-NETWORK1"}],
                                                    196.1, 40, 196.075, 196.125, 761,
-                                                    768)
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
@@ -247,7 +247,7 @@ class TransportOlmTesting(unittest.TestCase):
                                                     {"node-id": "XPDR-A1",
                                                      "src-tp": "XPDR1-NETWORK1", "dest-tp": "XPDR1-CLIENT1"}],
                                                    196.1, 40, 196.075, 196.125, 761,
-                                                    768)
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
@@ -301,14 +301,16 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(196.1, res['org-openroadm-optical-channel-interfaces:och']['frequency'])
 
     def test_21_get_roadmconnection_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("gainLoss", res['roadm-connections'][0]['opticalControlMode'])
         self.assertEqual(2.0, res['roadm-connections'][0]['target-output-power'])
 
     def test_22_get_roadmconnection_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADM-C1", "roadm-connections/DEG1-TTP-TXRX-SRG1-PP1-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-C1", "roadm-connections/DEG1-TTP-TXRX-SRG1-PP1-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("power", res['roadm-connections'][0]['opticalControlMode'])
@@ -360,7 +362,8 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(196.1, res['org-openroadm-optical-channel-interfaces:och']['frequency'])
 
     def test_25_get_roadmconnection_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("gainLoss", res['roadm-connections'][0]['opticalControlMode'])
@@ -404,14 +407,16 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertIn('Success', res["output"]["result"])
 
     def test_27_get_roadmconnection_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("off", res['roadm-connections'][0]['opticalControlMode'])
         self.assertEqual(-60, res['roadm-connections'][0]['target-output-power'])
 
     def test_28_get_roadmconnection_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADM-C1", "roadm-connections/DEG1-TTP-TXRX-SRG1-PP1-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-C1", "roadm-connections/DEG1-TTP-TXRX-SRG1-PP1-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("off", res['roadm-connections'][0]['opticalControlMode'])
@@ -427,7 +432,7 @@ class TransportOlmTesting(unittest.TestCase):
                                                     {"node-id": "XPDR-C1",
                                                      "dest-tp": "XPDR1-CLIENT1", "src-tp": "XPDR1-NETWORK1"}],
                                                    196.1, 40, 196.075, 196.125, 761,
-                                                    768)
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Request processed', res["output"]["result"])
@@ -444,7 +449,7 @@ class TransportOlmTesting(unittest.TestCase):
                                                     {"node-id": "XPDR-A1",
                                                      "src-tp": "XPDR1-NETWORK1", "dest-tp": "XPDR1-CLIENT1"}],
                                                    196.053125, 40, 196.025, 196.08125, 761,
-                                                    768)
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Request processed', res["output"]["result"])
@@ -473,7 +478,7 @@ class TransportOlmTesting(unittest.TestCase):
                                                     {"node-id": "ROADM-A1",
                                                      "dest-tp": "DEG2-TTP-TXRX", "src-tp": "SRG1-PP2-TXRX"}],
                                                    196.1, 40, 196.075, 196.125, 753,
-                                                    760)
+                                                   760)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
@@ -496,7 +501,7 @@ class TransportOlmTesting(unittest.TestCase):
                                                     {"node-id": "ROADM-A1",
                                                      "dest-tp": "DEG2-TTP-TXRX", "src-tp": "SRG1-PP2-TXRX"}],
                                                    196.053125, 40, 196.025, 196.08125, 761,
-                                                    768)
+                                                   768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Request processed', res["output"]["result"])
index 150a4c1af9a0ad8738c1d62a2b483bb1aff72cfe..25a09c2b29b2176749a0595a1ea3439b1cbf5f04 100644 (file)
@@ -25,6 +25,7 @@ import test_utils
 
 CREATED_SUCCESSFULLY = 'Result message should contain Xponder Roadm Link created successfully'
 
+
 class TransportTapitesting(unittest.TestCase):
 
     processes = None
@@ -191,7 +192,7 @@ class TransportTapitesting(unittest.TestCase):
         self.assertEqual("Tpdr100g over WDM node", res["output"]["topology"]["node"][0]["name"][0]["value"],
                          'node name should be: Tpdr100g over WDM node')
         self.assertIn("ETH", res["output"]["topology"]["node"][0]["layer-protocol-name"],
-                         'Node layer protocol should contain ETH')
+                      'Node layer protocol should contain ETH')
         self.assertEqual(1, len(res["output"]["topology"]["node"][0]["node-rule-group"]),
                          'node should contain 1 node rule group')
 
@@ -278,7 +279,7 @@ class TransportTapitesting(unittest.TestCase):
         self.assertEqual("ROADM-infra", res["output"]["topology"]["node"][0]["name"][0]["value"],
                          'node name should be: ROADM-infra')
         self.assertIn("PHOTONIC_MEDIA", res["output"]["topology"]["node"][0]["layer-protocol-name"],
-                         'Node layer protocol should contain PHOTONIC_MEDIA')
+                      'Node layer protocol should contain PHOTONIC_MEDIA')
         self.assertEqual(1, len(res["output"]["topology"]["node"][0]["node-rule-group"]),
                          'node should contain 1 node rule group')
 
@@ -543,10 +544,10 @@ class TransportTapitesting(unittest.TestCase):
         for link in links:
             if link["name"][0]["value"] == "OTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1":
                 self.assertEqual(100000, link["available-capacity"]["total-size"]["value"],
-                         'OTU4 link should have an available capacity of 100 000 Mbps')
+                                 'OTU4 link should have an available capacity of 100 000 Mbps')
             elif link["name"][0]["value-name"] == "transitional link name":
                 self.assertEqual(100, link["available-capacity"]["total-size"]["value"],
-                         'link should have an available capacity of 100 Gbps')
+                                 'link should have an available capacity of 100 Gbps')
             self.assertEqual(2, len(link["node-edge-point"]), 'link should have 2 neps')
 
     def test_33_create_ODU4_service(self):
@@ -588,13 +589,13 @@ class TransportTapitesting(unittest.TestCase):
         for link in links:
             if link["name"][0]["value"] == "OTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1":
                 self.assertEqual(0, link["available-capacity"]["total-size"]["value"],
-                         'OTU4 link should have an available capacity of 0 Mbps')
+                                 'OTU4 link should have an available capacity of 0 Mbps')
             elif link["name"][0]["value"] == "ODU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1":
                 self.assertEqual(100000, link["available-capacity"]["total-size"]["value"],
-                         'ODU4 link should have an available capacity of 100 000 Mbps')
+                                 'ODU4 link should have an available capacity of 100 000 Mbps')
             elif link["name"][0]["value-name"] == "transitional link name":
                 self.assertEqual(100, link["available-capacity"]["total-size"]["value"],
-                         'link should have an available capacity of 100 Gbps')
+                                 'link should have an available capacity of 100 Gbps')
             self.assertEqual(2, len(link["node-edge-point"]), 'link should have 2 neps')
 
     def test_35_connect_sprda_2_n2_to_roadma_pp3(self):
@@ -681,10 +682,10 @@ class TransportTapitesting(unittest.TestCase):
         links = res['network'][0]['ietf-network-topology:link']
         for link in links:
             if (link["org-openroadm-common-network:link-type"] == "XPONDER-OUTPUT" or
-            link["org-openroadm-common-network:link-type"] == "XPONDER-INPUT"):
-                 link_name = link["link-id"]
-                 response = test_utils.delete_request(url+link_name)
-                 self.assertEqual(response.status_code, requests.codes.ok)
+                    link["org-openroadm-common-network:link-type"] == "XPONDER-INPUT"):
+                link_name = link["link-id"]
+                response = test_utils.delete_request(url+link_name)
+                self.assertEqual(response.status_code, requests.codes.ok)
 
     def test_42_check_tapi_topology_T0(self):
         url = "{}/operations/tapi-topology:get-topology-details"
@@ -757,6 +758,7 @@ def find_object_with_key(list_dicts, key, value):
             return dict_
     return None
 
+
 def count_object_with_double_key(list_dicts, key1, key2, value):
     nb = 0
     for dict in list_dicts:
@@ -766,4 +768,4 @@ def count_object_with_double_key(list_dicts, key1, key2, value):
 
 
 if __name__ == "__main__":
-    unittest.main(verbosity=2)
\ No newline at end of file
+    unittest.main(verbosity=2)
index e68f798472f5fe9632cb8e67f27f35e4866474a6..422f525965caefca34f5da73f54b7591edb414ca 100644 (file)
@@ -10,6 +10,7 @@
 
 # pylint: disable=no-member
 # pylint: disable=too-many-public-methods
+
 import base64
 import unittest
 import time
@@ -18,7 +19,6 @@ import sys
 sys.path.append('transportpce_tests/common/')
 import test_utils
 
-
 class TransportPCEFulltesting(unittest.TestCase):
 
     processes = None
@@ -235,7 +235,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(2)
 
     def test_13_check_xc1_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -256,7 +257,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(5)
 
     def test_14_check_xc1_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -327,10 +329,10 @@ class TransportPCEFulltesting(unittest.TestCase):
                 freq_map_array = [int(x) for x in freq_map]
                 self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
             if ele['tp-id'] == 'DEG2-TTP-TXRX':
-                    freq_map = base64.b64decode(
-                        ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map'])
-                    freq_map_array = [int(x) for x in freq_map]
-                    self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
         time.sleep(3)
 
     def test_18_connect_xprdA_N2_to_roadmA_PP2(self):
@@ -390,7 +392,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(1)
 
     def test_24_check_xc2_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/DEG2-TTP-TXRX-SRG1-PP2-TXRX-753:760")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-A1", "roadm-connections/DEG2-TTP-TXRX-SRG1-PP2-TXRX-753:760")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -620,7 +623,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(1)
 
     def test_38_check_xc1_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -641,7 +645,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(7)
 
     def test_39_check_xc1_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -691,7 +696,8 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(2)
 
     def test_42_check_xc2_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP2-TXRX-DEG2-TTP-TXRX-753:760")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-A1", "roadm-connections/SRG1-PP2-TXRX-DEG2-TTP-TXRX-753:760")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
index 22d121dae20247328c2ed0d5e8da170a044a42d9..34632ee2e1980cf637ed7d9224e9f2e9a253ded9 100644 (file)
@@ -78,7 +78,7 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
         res = response.json()
         self.assertIn(
             {'supported-interface-capability':
-              ['org-openroadm-port-types:if-otsi-otsigroup'],
+             ['org-openroadm-port-types:if-otsi-otsigroup'],
              'supporting-port': 'L1',
              'supporting-circuit-pack-name': '1/1/2-PLUG-NET',
              'logical-connection-point': 'XPDR1-NETWORK1',
@@ -113,7 +113,7 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
         res = response.json()
         self.assertIn(
             {'supported-interface-capability':
-               ['org-openroadm-port-types:if-otsi-otsigroup'],
+             ['org-openroadm-port-types:if-otsi-otsigroup'],
              'supporting-port': 'L1',
              'supporting-circuit-pack-name': '1/2/2-PLUG-NET',
              'logical-connection-point': 'XPDR2-NETWORK1',
@@ -131,9 +131,9 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('org-openroadm-port-types:if-100GE-ODU4',
-            res['mapping'][0]['supported-interface-capability'])
+                      res['mapping'][0]['supported-interface-capability'])
         self.assertIn('org-openroadm-port-types:if-OCH-OTU4-ODU4',
-            res['mapping'][0]['supported-interface-capability'])
+                      res['mapping'][0]['supported-interface-capability'])
         self.assertEqual('C1', res['mapping'][0]['supporting-port'])
         self.assertEqual('1/2/1/1-PLUG-CLIENT', res['mapping'][0]['supporting-circuit-pack-name'])
         self.assertEqual('XPDR2-CLIENT1', res['mapping'][0]['logical-connection-point'])
@@ -143,9 +143,9 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
         self.assertEqual('InService', res['mapping'][0]['port-admin-state'])
         self.assertEqual('InService', res['mapping'][0]['port-oper-state'])
         self.assertEqual({
-               "min-trib-slot": "1.1",
-               "max-trib-slot": "1.20"
-             }, res['mapping'][0]['mpdr-restrictions'])
+            "min-trib-slot": "1.1",
+            "max-trib-slot": "1.20"
+        }, res['mapping'][0]['mpdr-restrictions'])
 
     # Added test to check mc-capability-profile for a transponder
     def test_08_check_mccapprofile(self):
@@ -182,4 +182,4 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
 
 
 if __name__ == '__main__':
-  unittest.main(verbosity=2)
+    unittest.main(verbosity=2)
index 95fe8d9da66c7973318de9ff7ad6c8e0e7f2a520..e361ea53f9416ae4e0a003f3b4edcd1fc5197fa1 100644 (file)
@@ -8,8 +8,6 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
-import os
-
 SIMS = {
     ('xpdra', '1.2.1'): {'port': '17830', 'configfile': 'oper-XPDRA.xml', 'logfile': 'xpdra-121.log'},
     ('roadma', '1.2.1'): {'port': '17831', 'configfile': 'oper-ROADMA.xml', 'logfile': 'roadma-121.log'},
@@ -33,4 +31,4 @@ SIMS = {
     ('xpdrc', '7.1'): {'port': '17854', 'configfile': 'oper-XPDRC.xml', 'logfile': 'xpdrc-71.log'},
     ('xpdra2', '7.1'): {'port': '17857', 'configfile': 'oper-XPDRA2.xml', 'logfile': 'xpdra2-71.log'},
     ('xpdrc2', '7.1'): {'port': '17858', 'configfile': 'oper-XPDRC2.xml', 'logfile': 'xpdrc2-71.log'}
-}
\ No newline at end of file
+}
index b70a4eeb5dbedda055726bfe65b3fee3f8700179..136991f444e90232cc44efba8cb782dad34d9cf0 100644 (file)
@@ -199,6 +199,7 @@ def put_xmlrequest(url, data):
         headers=TYPE_APPLICATION_XML,
         auth=(ODL_LOGIN, ODL_PWD))
 
+
 def put_jsonrequest(url, data):
     return requests.request(
         "PUT", url.format(RESTCONF_BASE_URL),
@@ -206,6 +207,7 @@ def put_jsonrequest(url, data):
         headers=TYPE_APPLICATION_JSON,
         auth=(ODL_LOGIN, ODL_PWD))
 
+
 def rawput_request(url, data):
     return requests.request(
         "PUT", url.format(RESTCONF_BASE_URL),
@@ -213,6 +215,7 @@ def rawput_request(url, data):
         headers=TYPE_APPLICATION_JSON,
         auth=(ODL_LOGIN, ODL_PWD))
 
+
 def rawpost_request(url, data):
     return requests.request(
         "POST", url.format(RESTCONF_BASE_URL),
index 8c5ac3b19527dcba1c50660e28446c883601dbdb..10a309ef7242158f170af63886c4d104e79bf9cf 100644 (file)
@@ -11,7 +11,6 @@
 # pylint: disable=no-member
 # pylint: disable=too-many-public-methods
 import json
-import base64
 import unittest
 import time
 import requests
@@ -19,7 +18,6 @@ import sys
 sys.path.append('transportpce_tests/common/')
 import test_utils
 
-
 class TransportPCEFulltesting(unittest.TestCase):
 
     processes = None
@@ -241,12 +239,12 @@ class TransportPCEFulltesting(unittest.TestCase):
     def test_13_change_status_line_port_xpdra(self):
         url = "{}/config/org-openroadm-device:org-openroadm-device/circuit-packs/1%2F0%2F1-PLUG-NET/ports/1"
         body = {"ports": [{
-                    "port-name": "1",
-                    "logical-connection-point": "XPDR1-NETWORK1",
-                    "port-type": "CFP2",
-                    "circuit-id": "XPDRA-NETWORK",
-                    "administrative-state": "outOfService",
-                    "port-qual": "xpdr-network"}]}
+            "port-name": "1",
+            "logical-connection-point": "XPDR1-NETWORK1",
+            "port-type": "CFP2",
+            "circuit-id": "XPDRA-NETWORK",
+            "administrative-state": "outOfService",
+            "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8130/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
                                     auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
@@ -318,12 +316,12 @@ class TransportPCEFulltesting(unittest.TestCase):
     def test_17_restore_status_line_port_xpdra(self):
         url = "{}/config/org-openroadm-device:org-openroadm-device/circuit-packs/1%2F0%2F1-PLUG-NET/ports/1"
         body = {"ports": [{
-                    "port-name": "1",
-                    "logical-connection-point": "XPDR1-NETWORK1",
-                    "port-type": "CFP2",
-                    "circuit-id": "XPDRA-NETWORK",
-                    "administrative-state": "inService",
-                    "port-qual": "xpdr-network"}]}
+            "port-name": "1",
+            "logical-connection-point": "XPDR1-NETWORK1",
+            "port-type": "CFP2",
+            "circuit-id": "XPDRA-NETWORK",
+            "administrative-state": "inService",
+            "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8130/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
                                     auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
@@ -368,12 +366,12 @@ class TransportPCEFulltesting(unittest.TestCase):
     def test_21_change_status_port_roadma_srg(self):
         url = "{}/config/org-openroadm-device:org-openroadm-device/circuit-packs/3%2F0/ports/C1"
         body = {"ports": [{
-                    "port-name": "C1",
-                    "logical-connection-point": "SRG1-PP1",
-                    "port-type": "client",
-                    "circuit-id": "SRG1",
-                    "administrative-state": "outOfService",
-                    "port-qual": "roadm-external"}]}
+            "port-name": "C1",
+            "logical-connection-point": "SRG1-PP1",
+            "port-type": "client",
+            "circuit-id": "SRG1",
+            "administrative-state": "outOfService",
+            "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
                                     auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
@@ -437,12 +435,12 @@ class TransportPCEFulltesting(unittest.TestCase):
     def test_24_restore_status_port_roadma_srg(self):
         url = "{}/config/org-openroadm-device:org-openroadm-device/circuit-packs/3%2F0/ports/C1"
         body = {"ports": [{
-                    "port-name": "C1",
-                    "logical-connection-point": "SRG1-PP1",
-                    "port-type": "client",
-                    "circuit-id": "SRG1",
-                    "administrative-state": "inService",
-                    "port-qual": "roadm-external"}]}
+            "port-name": "C1",
+            "logical-connection-point": "SRG1-PP1",
+            "port-type": "client",
+            "circuit-id": "SRG1",
+            "administrative-state": "inService",
+            "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
                                     auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
@@ -461,12 +459,12 @@ class TransportPCEFulltesting(unittest.TestCase):
     def test_28_change_status_line_port_roadma_deg(self):
         url = "{}/config/org-openroadm-device:org-openroadm-device/circuit-packs/2%2F0/ports/L1"
         body = {"ports": [{
-                    "port-name": "L1",
-                    "logical-connection-point": "DEG2-TTP-TXRX",
-                    "port-type": "LINE",
-                    "circuit-id": "1",
-                    "administrative-state": "outOfService",
-                    "port-qual": "roadm-external"}]}
+            "port-name": "L1",
+            "logical-connection-point": "DEG2-TTP-TXRX",
+            "port-type": "LINE",
+            "circuit-id": "1",
+            "administrative-state": "outOfService",
+            "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
                                     auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
@@ -530,12 +528,12 @@ class TransportPCEFulltesting(unittest.TestCase):
     def test_31_restore_status_line_port_roadma_srg(self):
         url = "{}/config/org-openroadm-device:org-openroadm-device/circuit-packs/2%2F0/ports/L1"
         body = {"ports": [{
-                    "port-name": "L1",
-                    "logical-connection-point": "DEG2-TTP-TXRX",
-                    "port-type": "LINE",
-                    "circuit-id": "1",
-                    "administrative-state": "inService",
-                    "port-qual": "roadm-external"}]}
+            "port-name": "L1",
+            "logical-connection-point": "DEG2-TTP-TXRX",
+            "port-type": "LINE",
+            "circuit-id": "1",
+            "administrative-state": "inService",
+            "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
                                     auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
@@ -554,10 +552,10 @@ class TransportPCEFulltesting(unittest.TestCase):
     def test_35_change_status_line_port_xpdrc(self):
         url = "{}/config/org-openroadm-device:org-openroadm-device/circuit-packs/1%2F0%2F1-PLUG-NET/ports/1"
         body = {"ports": [{
-                    "port-name": "1",
-                    "port-type": "CFP2",
-                    "administrative-state": "outOfService",
-                    "port-qual": "xpdr-network"}]}
+            "port-name": "1",
+            "port-type": "CFP2",
+            "administrative-state": "outOfService",
+            "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8154/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
                                     auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
@@ -621,10 +619,10 @@ class TransportPCEFulltesting(unittest.TestCase):
     def test_38_restore_status_line_port_xpdrc(self):
         url = "{}/config/org-openroadm-device:org-openroadm-device/circuit-packs/1%2F0%2F1-PLUG-NET/ports/1"
         body = {"ports": [{
-                    "port-name": "1",
-                    "port-type": "CFP2",
-                    "administrative-state": "inService",
-                    "port-qual": "xpdr-network"}]}
+            "port-name": "1",
+            "port-type": "CFP2",
+            "administrative-state": "inService",
+            "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8154/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
                                     auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
@@ -643,12 +641,12 @@ class TransportPCEFulltesting(unittest.TestCase):
     def test_42_change_status_port_roadma_srg(self):
         url = "{}/config/org-openroadm-device:org-openroadm-device/circuit-packs/3%2F0/ports/C2"
         body = {"ports": [{
-                    "port-name": "C2",
-                    "logical-connection-point": "SRG1-PP2",
-                    "port-type": "client",
-                    "circuit-id": "SRG1",
-                    "administrative-state": "outOfService",
-                    "port-qual": "roadm-external"}]}
+            "port-name": "C2",
+            "logical-connection-point": "SRG1-PP2",
+            "port-type": "client",
+            "circuit-id": "SRG1",
+            "administrative-state": "outOfService",
+            "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
                                     auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
index b5e8c70eb2a2b6e03f01c8f4f6d59841ecc3677b..f6e4e3a983775a3c7a2de00da20ac92edc0a6391 100644 (file)
@@ -20,7 +20,6 @@ import sys
 sys.path.append('transportpce_tests/common/')
 import test_utils
 
-
 class TransportPCEtesting(unittest.TestCase):
 
     processes = None
@@ -293,8 +292,8 @@ class TransportPCEtesting(unittest.TestCase):
 
         self.assertDictEqual(
             dict({u'frequency': 196.0812, u'otsi-rate': u'org-openroadm-common-optical-channel-types:R400G-otsi',
-             u'transmit-power': -5, u'modulation-format': 'dp-qam16'},
-                  **res['interface'][0]['org-openroadm-optical-tributary-signal-interfaces:otsi']),
+                  u'transmit-power': -5, u'modulation-format': 'dp-qam16'},
+                 **res['interface'][0]['org-openroadm-optical-tributary-signal-interfaces:otsi']),
             res['interface'][0]['org-openroadm-optical-tributary-signal-interfaces:otsi'])
 
     def test_15_check_interface_OTSI_GROUP_xpdra2(self):
@@ -359,8 +358,8 @@ class TransportPCEtesting(unittest.TestCase):
 
         self.assertDictEqual(
             dict({u'frequency': 196.0812, u'otsi-rate': u'org-openroadm-common-optical-channel-types:R400G-otsi',
-             u'transmit-power': -5, u'modulation-format': 'dp-qam16'},
-                  **res['interface'][0]['org-openroadm-optical-tributary-signal-interfaces:otsi']),
+                  u'transmit-power': -5, u'modulation-format': 'dp-qam16'},
+                 **res['interface'][0]['org-openroadm-optical-tributary-signal-interfaces:otsi']),
             res['interface'][0]['org-openroadm-optical-tributary-signal-interfaces:otsi'])
 
     def test_18_check_interface_OTSI_GROUP_xpdrc2(self):
@@ -637,11 +636,11 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         input_dict_1 = {'name': 'XPDR2-CLIENT1-ETHERNET100G',
-                      'administrative-state': 'inService',
-                      'supporting-circuit-pack-name': '1/2/1/1-PLUG-CLIENT',
-                      'type': 'org-openroadm-interfaces:ethernetCsmacd',
-                      'supporting-port': 'C1'
-                      }
+                        'administrative-state': 'inService',
+                        'supporting-circuit-pack-name': '1/2/1/1-PLUG-CLIENT',
+                        'type': 'org-openroadm-interfaces:ethernetCsmacd',
+                        'supporting-port': 'C1'
+                        }
         input_dict_2 = {u'speed': 100000}
         self.assertDictEqual(dict(input_dict_1, **res['interface'][0]),
                              res['interface'][0])
@@ -729,16 +728,16 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         input_dict_1 = {'name': 'XPDR2-CLIENT1-ETHERNET100G',
-                      'administrative-state': 'inService',
-                      'supporting-circuit-pack-name': '1/2/1/1-PLUG-CLIENT',
-                      'type': 'org-openroadm-interfaces:ethernetCsmacd',
-                      'supporting-port': 'C1'
-                      }
+                        'administrative-state': 'inService',
+                        'supporting-circuit-pack-name': '1/2/1/1-PLUG-CLIENT',
+                        'type': 'org-openroadm-interfaces:ethernetCsmacd',
+                        'supporting-port': 'C1'
+                        }
         input_dict_2 = {u'speed': 100000}
         self.assertDictEqual(dict(input_dict_1, **res['interface'][0]),
                              res['interface'][0])
         self.assertDictEqual(dict(input_dict_2, **res['interface'][0]['org-openroadm-ethernet-interfaces:ethernet']),
-            res['interface'][0]['org-openroadm-ethernet-interfaces:ethernet'])
+                             res['interface'][0]['org-openroadm-ethernet-interfaces:ethernet'])
 
     def test_36_check_interface_ODU4_CLIENT_xpdrc2(self):
         response = test_utils.check_netconf_node_request(
@@ -1033,7 +1032,7 @@ class TransportPCEtesting(unittest.TestCase):
                 for tp in tpList:
                     if tp['tp-id'] == 'XPDR2-NETWORK1':
                         self.assertNotIn('org-openroadm-otn-network-topology:xpdr-tp-port-connection-attributes',
-                             dict.keys(tp))
+                                         dict.keys(tp))
 
     def test_60_delete_OTUC4_service(self):
         response = test_utils.service_delete_request("service1-OTUC4")
@@ -1159,7 +1158,8 @@ class TransportPCEtesting(unittest.TestCase):
         time.sleep(2)
 
     def test_74_check_xc1_roadma(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-755:768")
+        response = test_utils.check_netconf_node_request(
+            "ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-755:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
@@ -1228,24 +1228,23 @@ class TransportPCEtesting(unittest.TestCase):
                 freq_map_array = [int(x) for x in freq_map]
                 self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
             if ele['tp-id'] == 'DEG2-TTP-TXRX':
-                    freq_map = base64.b64decode(
-                        ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map'])
-                    freq_map_array = [int(x) for x in freq_map]
-                    self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
         time.sleep(3)
 
-
     def test_78_check_interface_100GE_CLIENT_xpdra2(self):
         response = test_utils.check_netconf_node_request(
             "XPDR-A2", "interface/XPDR1-CLIENT1-ETHERNET")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         input_dict_1 = {'name': 'XPDR1-CLIENT1-ETHERNET',
-                      'administrative-state': 'inService',
-                      'supporting-circuit-pack-name': '1/1/1-PLUG-CLIENT',
-                      'type': 'org-openroadm-interfaces:ethernetCsmacd',
-                      'supporting-port': 'C1'
-                      }
+                        'administrative-state': 'inService',
+                        'supporting-circuit-pack-name': '1/1/1-PLUG-CLIENT',
+                        'type': 'org-openroadm-interfaces:ethernetCsmacd',
+                        'supporting-port': 'C1'
+                        }
         input_dict_2 = {u'speed': 400000}
         self.assertDictEqual(dict(input_dict_1, **res['interface'][0]),
                              res['interface'][0])
index bbed914aaa9fd0346ba07fcc8ac9d2732c1b0bdc..f54a5caaf82d2a5227e9713c5378e665918c3a90 100644 (file)
@@ -19,7 +19,6 @@ import requests
 sys.path.append('transportpce_tests/common/')
 import test_utils
 
-
 class TransportPCEtesting(unittest.TestCase):
 
     simple_topo_bi_dir_data = None
@@ -49,7 +48,7 @@ class TransportPCEtesting(unittest.TestCase):
             with open(TOPO_UNI_DIR_COMPLEX_FILE, 'r') as topo_uni_dir_complex:
                 cls.complex_topo_uni_dir_data = topo_uni_dir_complex.read()
             PORT_MAPPING_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
-                                                     "..", "..", "sample_configs", "pce_portmapping_121.json")
+                                             "..", "..", "sample_configs", "pce_portmapping_121.json")
             with open(PORT_MAPPING_FILE, 'r') as port_mapping:
                 cls.port_mapping_data = port_mapping.read()
             sample_files_parsed = True
@@ -354,7 +353,7 @@ class TransportPCEtesting(unittest.TestCase):
         nbElmPath = len(res['output']['response-parameters']['path-description']
                         ['aToZ-direction']['aToZ'])
         self.assertEqual(31, nbElmPath)
-        link = {"link-id": "OpenROADM-1-3-DEG2-to-OpenROADM-1-2-DEG2", "state":"inService"}
+        link = {"link-id": "OpenROADM-1-3-DEG2-to-OpenROADM-1-2-DEG2", "state": "inService"}
         find = False
         for i in range(0, nbElmPath):
             resource_i = (res['output']['response-parameters']['path-description']['aToZ-direction']['aToZ'][i]
@@ -384,7 +383,7 @@ class TransportPCEtesting(unittest.TestCase):
         nbElmPath = len(res['output']['response-parameters']['path-description']
                         ['aToZ-direction']['aToZ'])
         self.assertEqual(47, nbElmPath)
-        link = {"link-id": "OpenROADM-1-3-DEG2-to-OpenROADM-1-2-DEG2", "state":"inService"}
+        link = {"link-id": "OpenROADM-1-3-DEG2-to-OpenROADM-1-2-DEG2", "state": "inService"}
         find = False
         for i in range(0, nbElmPath):
             resource_i = (res['output']['response-parameters']['path-description']['aToZ-direction']['aToZ'][i]
index 2979105ec965c476168b094187db0158139a3a8c..d852d5bc7896a843581df31dd18450f40836088a 100644 (file)
@@ -19,7 +19,6 @@ import requests
 sys.path.append('transportpce_tests/common/')
 import test_utils
 
-
 class TransportPCE400Gtesting(unittest.TestCase):
 
     simple_topo_bi_dir_data = None
@@ -36,22 +35,22 @@ class TransportPCE400Gtesting(unittest.TestCase):
                 cls.topo_bi_dir_data = topo_bi_dir.read()
 
             OTN_TOPO_BI_DIR_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
-                                            "..", "..", "sample_configs", "honeynode-otntopo400G.json")
+                                                "..", "..", "sample_configs", "honeynode-otntopo400G.json")
             with open(OTN_TOPO_BI_DIR_FILE, 'r') as otn_topo_bi_dir:
                 cls.otn_topo_bi_dir_data = otn_topo_bi_dir.read()
 
             OTUC4_OTN_TOPO_BI_DIR_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
-                                            "..", "..", "sample_configs", "honeynode-otntopo400GwithOTUC4.json")
+                                                      "..", "..", "sample_configs", "honeynode-otntopo400GwithOTUC4.json")
             with open(OTUC4_OTN_TOPO_BI_DIR_FILE, 'r') as otuc4_otn_topo_bi_dir:
                 cls.otuc4_otn_topo_bi_dir_data = otuc4_otn_topo_bi_dir.read()
 
             ODUC4_OTN_TOPO_BI_DIR_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
-                                            "..", "..", "sample_configs", "honeynode-otntopo400GwithODUC4.json")
+                                                      "..", "..", "sample_configs", "honeynode-otntopo400GwithODUC4.json")
             with open(ODUC4_OTN_TOPO_BI_DIR_FILE, 'r') as oduc4_otn_topo_bi_dir:
                 cls.oduc4_otn_topo_bi_dir_data = oduc4_otn_topo_bi_dir.read()
 
             PORT_MAPPING_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
-                                                     "..", "..", "sample_configs", "pce_portmapping_71.json")
+                                             "..", "..", "sample_configs", "pce_portmapping_71.json")
             with open(PORT_MAPPING_FILE, 'r') as port_mapping:
                 cls.port_mapping_data = port_mapping.read()
             sample_files_parsed = True
@@ -139,11 +138,11 @@ class TransportPCE400Gtesting(unittest.TestCase):
                                                        {"service-rate": "400", "clli": "NodeA",
                                                            "service-format": "OTU", "node-id": "XPDR-A2",
                                                            "rx-direction": {"port": {"port-device-name": "XPDR-A2-XPDR2"}}
-                                                       },
+                                                        },
                                                        {"service-rate": "400", "clli": "NodeC",
                                                            "service-format": "OTU", "node-id": "XPDR-C2",
                                                            "rx-direction": {"port": {"port-device-name": "XPDR-C2-XPDR2"}}
-                                                       })
+                                                        })
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Path is calculated',
@@ -184,11 +183,11 @@ class TransportPCE400Gtesting(unittest.TestCase):
                                                        {"service-rate": "400", "clli": "NodeA", "service-format": "ODU",
                                                            "node-id": "XPDR-A2",
                                                            "tx-direction": {"port": {"port-device-name": "XPDR-A2-XPDR2"}}
-                                                       },
+                                                        },
                                                        {"service-rate": "400", "clli": "NodeC", "service-format": "ODU",
                                                            "node-id": "XPDR-C2",
                                                            "tx-direction": {"port": {"port-device-name": "XPDR-C2-XPDR2"}}
-                                                       })
+                                                        })
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Path is calculated',
@@ -217,11 +216,11 @@ class TransportPCE400Gtesting(unittest.TestCase):
                                                        {"service-rate": "100", "clli": "NodeA", "service-format": "Ethernet",
                                                         "node-id": "XPDR-A2",
                                                         "tx-direction": {"port": {"port-device-name": "XPDR-A2-XPDR2",
-                                                           "port-name": "XPDR2-CLIENT1"}}},
+                                                                                  "port-name": "XPDR2-CLIENT1"}}},
                                                        {"service-rate": "100", "clli": "NodeC", "service-format": "Ethernet",
                                                         "node-id": "XPDR-C2",
                                                         "tx-direction": {"port": {"port-device-name": "XPDR-C2-XPDR2",
-                                                           "port-name": "XPDR2-CLIENT1"}}})
+                                                                                  "port-name": "XPDR2-CLIENT1"}}})
 
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
@@ -247,5 +246,6 @@ class TransportPCE400Gtesting(unittest.TestCase):
                          ['zToA-direction']['modulation-format'])
         time.sleep(5)
 
+
 if __name__ == "__main__":
     unittest.main(verbosity=2)
index 103e06f08d59cc5c1abfb921c600c5bd652cdae8..c9fceb4d344d9ac6e90135100458b1403036224e 100644 (file)
@@ -20,7 +20,6 @@ import requests
 sys.path.append('transportpce_tests/common/')
 import test_utils
 
-
 class TransportGNPYtesting(unittest.TestCase):
 
     topo_cllinet_data = None
@@ -49,7 +48,7 @@ class TransportGNPYtesting(unittest.TestCase):
             with open(TOPO_ORDTOPO_FILE, 'r') as topo_ordtopo:
                 cls.topo_ordtopo_data = topo_ordtopo.read()
             PORT_MAPPING_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
-                                                     "..", "..", "sample_configs", "gnpy", "gnpy_portmapping_121.json")
+                                             "..", "..", "sample_configs", "gnpy", "gnpy_portmapping_121.json")
             with open(PORT_MAPPING_FILE, 'r') as port_mapping:
                 cls.port_mapping_data = port_mapping.read()
             sample_files_parsed = True
@@ -228,6 +227,7 @@ class TransportGNPYtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
+
 if __name__ == "__main__":
     # logging.basicConfig(filename='./transportpce_tests/log/response.log',filemode='w',level=logging.DEBUG)
     unittest.main(verbosity=2)
index 14b8bd8882c394ef472549072befac2123ae0422..45681f68437ffa29c41a036c7bdd781c961a18a2 100644 (file)
@@ -20,7 +20,6 @@ import requests
 sys.path.append('transportpce_tests/common/')
 import test_utils
 
-
 class TransportNbiNotificationstesting(unittest.TestCase):
     processes = None
     cr_serv_sample_data = {"input": {
diff --git a/tox.ini b/tox.ini
index 303b01356a801c5583f958f867f8ce693c77ee56..0751d9b1dd82dc207f89ed4738127273a7708896 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,10 @@
 [tox]
 minversion = 3.7.0
-envlist = buildcontroller,testsPCE,sims121,tests121,sims221,tests221,sims71,tests71,tests_hybrid
+envlist = buildcontroller,testsPCE,
+    sims121,build_karaf_tests121,tests121,
+    sims221,build_karaf_tests221,tests221,
+    sims71,build_karaf_tests71,tests71,
+    build_karaf_tests_hybrid,tests_hybrid,
     docs
     docs-linkcheck
     checkbashisms
@@ -56,20 +60,26 @@ passenv = LAUNCHER USE_LIGHTY
 commands =
   ./launch_tests.sh pce {posargs:}
 
+[testenv:build_karaf_tests121]
+depends = buildcontroller
+# testsPCE dependency is only here to chain tests in the gate and avoid resources starvation
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER USE_LIGHTY
+setenv =
+#    USE_LIGHTY=True
+    USE_ODL_ALT_KARAF_ENV=./karaf121.env
+    USE_ODL_ALT_KARAF_INSTALL_DIR=karaf121
+commands =
+  ./build_karaf_for_tests.sh
+
 [testenv:tests121]
-depends = buildcontroller,sims121,testsPCE
+depends = buildcontroller,build_karaf_tests121,sims121,testsPCE
 # testsPCE dependency is only here to chain tests in the gate and avoid resources starvation
 whitelist_externals = launch_tests.sh
 passenv = LAUNCHER USE_LIGHTY
 setenv =
 #    USE_LIGHTY=True
-    USE_ODL_ALT_WEBSOCKET_PORT=8186
-    USE_ODL_ALT_AKKA_PORT=2551
-    USE_ODL_ALT_AKKA_MGT_PORT=8559
-    USE_ODL_ALT_SHELL_PORT=8102
-    USE_ODL_ALT_RMI_REGISTRY_PORT=1100
-    USE_ODL_ALT_RMI_SERVER_PORT=44445
-    USE_ODL_ALT_RESTCONF_PORT=8182
+    USE_ODL_ALT_KARAF_ENV=./karaf121.env
     USE_ODL_ALT_KARAF_INSTALL_DIR=karaf121
 commands =
   ./launch_tests.sh 1.2.1 {posargs:}
@@ -82,41 +92,65 @@ commands =
 # which is more verbose than nose or 'export LAUNCHER="ls -l"' to only list script
 # files attributes.
 
+[testenv:build_karaf_tests221]
+depends = buildcontroller
+# testsPCE dependency is only here to chain tests in the gate and avoid resources starvation
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER USE_LIGHTY
+setenv =
+#    USE_LIGHTY=True
+    USE_ODL_ALT_KARAF_ENV=./karaf221.env
+    USE_ODL_ALT_KARAF_INSTALL_DIR=karaf221
+commands =
+  ./build_karaf_for_tests.sh
+
 [testenv:tests221]
-depends = buildcontroller,sims221,tests71
+depends = buildcontroller,build_karaf_tests221,sims221,tests71
 # tests71 dependency is only here to chain tests in the gate and avoid ressources starvation
 whitelist_externals = launch_tests.sh
 passenv = LAUNCHER USE_LIGHTY
 setenv =
 #    USE_LIGHTY=True
-    USE_ODL_ALT_WEBSOCKET_PORT=8187
-    USE_ODL_ALT_AKKA_PORT=2552
-    USE_ODL_ALT_AKKA_MGT_PORT=8560
-    USE_ODL_ALT_SHELL_PORT=8103
-    USE_ODL_ALT_RMI_REGISTRY_PORT=1101
-    USE_ODL_ALT_RMI_SERVER_PORT=44446
-    USE_ODL_ALT_RESTCONF_PORT=8183
+    USE_ODL_ALT_KARAF_ENV=./karaf221.env
     USE_ODL_ALT_KARAF_INSTALL_DIR=karaf221
 commands =
   ./launch_tests.sh 2.2.1 {posargs:}
 
+[testenv:build_karaf_tests71]
+depends = buildcontroller
+# testsPCE dependency is only here to chain tests in the gate and avoid resources starvation
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER USE_LIGHTY
+setenv =
+#    USE_LIGHTY=True
+    USE_ODL_ALT_KARAF_ENV=./karaf71.env
+    USE_ODL_ALT_KARAF_INSTALL_DIR=karaf71
+commands =
+  ./build_karaf_for_tests.sh
+
 [testenv:tests71]
-depends = buildcontroller,sims71
+depends = buildcontroller,build_karaf_tests71,sims71
 whitelist_externals = launch_tests.sh
 passenv = LAUNCHER USE_LIGHTY
 setenv =
 #    USE_LIGHTY=True
-    USE_ODL_ALT_WEBSOCKET_PORT=8188
-    USE_ODL_ALT_AKKA_PORT=2553
-    USE_ODL_ALT_AKKA_MGT_PORT=8561
-    USE_ODL_ALT_SHELL_PORT=8104
-    USE_ODL_ALT_RMI_REGISTRY_PORT=1102
-    USE_ODL_ALT_RMI_SERVER_PORT=44447
-    USE_ODL_ALT_RESTCONF_PORT=8184
+    USE_ODL_ALT_KARAF_ENV=./karaf71.env
     USE_ODL_ALT_KARAF_INSTALL_DIR=karaf71
 commands =
   ./launch_tests.sh 7.1 {posargs:}
 
+[testenv:build_karaf_tests_hybrid]
+depends = buildcontroller
+# testsPCE dependency is only here to chain tests in the gate and avoid resources starvation
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER USE_LIGHTY
+setenv =
+#    USE_LIGHTY=True
+    USE_ODL_ALT_KARAF_ENV=./karaf121.env
+    USE_ODL_ALT_KARAF_INSTALL_DIR=karaf_hybrid
+commands =
+  ./build_karaf_for_tests.sh
+
 [testenv:tests_hybrid]
 depends = buildcontroller,sims121,sims221,sims71,tests121,tests221,tests71
 #the last dependency is to avoid temporarily concurrent ressources problem in parallel mode
@@ -124,13 +158,7 @@ whitelist_externals = launch_tests.sh
 passenv = LAUNCHER USE_LIGHTY
 setenv =
 #    USE_LIGHTY=True
-    USE_ODL_ALT_WEBSOCKET_PORT=8186
-    USE_ODL_ALT_AKKA_PORT=2551
-    USE_ODL_ALT_AKKA_MGT_PORT=8559
-    USE_ODL_ALT_SHELL_PORT=8102
-    USE_ODL_ALT_RMI_REGISTRY_PORT=1100
-    USE_ODL_ALT_RMI_SERVER_PORT=44445
-    USE_ODL_ALT_RESTCONF_PORT=8182
+    USE_ODL_ALT_KARAF_ENV=./karaf121.env
     USE_ODL_ALT_KARAF_INSTALL_DIR=karaf_hybrid
 commands =
 #  nosetests --with-xunit transportpce_tests/hybrid/test01_device_change_notifications.py