Merge changes I66f5e0aa,I2aa60123
authorGuillaume Lambert <guillaume.lambert@orange.com>
Thu, 29 Aug 2019 13:36:38 +0000 (13:36 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 29 Aug 2019 13:36:38 +0000 (13:36 +0000)
* changes:
  Fix lighty.io compilation issues
  build lighty.io with ordm4.1 models deviations

lighty/build.sh
lighty/patch_ordm41_deviations.diff [deleted file]
lighty/src/main/java/io/lighty/controllers/tpce/module/TransportPCEImpl.java

index 86d2781ba7363341fe071fb46cad898000a0eae8..5962381e364e5311fdaa3c4441aeb612277d795d 100755 (executable)
@@ -1,9 +1,7 @@
 #!/bin/bash
 
 cd ..
-patch -p0 <lighty/patch_ordm41_deviations.diff
 mvn clean install -DskipTests
-#git checkout -- ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
 git clone https://github.com/PantheonTechnologies/lighty-core.git
 cd lighty-core
 git checkout 10.0.x
diff --git a/lighty/patch_ordm41_deviations.diff b/lighty/patch_ordm41_deviations.diff
deleted file mode 100644 (file)
index 1650677..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-diff --git ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
-index 9928281..3ad3749 100644
---- ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
-+++ ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
-@@ -110,64 +110,6 @@ module org-openroadm-network-topology {
-       "Version 2.0";
-   }
-
--  deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
--    deviate add {
--      must
--        "(not /nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology) or
--         (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology and
--         (../cnet:node-type = 'DEGREE' or ../cnet:node-type = 'SRG' or ../cnet:node-type = 'TPDR' or ../cnet:node-type = 'SWITCH' or
--          ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI' or ../cnet:node-type = 'EXT-PLUGGABLE' or
--          ../cnet:node-type = 'MUXPDR'))" {
--        error-message "Invalid node type for openroadm-topology";
--        description
--          "The valid node types in the ROADM topology are 'SRG', 'DEGREE',
--           'TPDR', 'SWITCH', 'REGEN', 'REGEN-UNI', 'EXT-PLUGGABLE' and 'MUXPDR'";
--      }
--    }
--  }
--  deviation "/nd:networks/nd:network/nd:node/nwt:termination-point/cnet:tp-type" {
--    description
--      "Defines which TP types can be instantiated on which Node types";
--    deviate add {
--      must
--        "/nd:network/nd:node/cnet:node-type != 'DEGREE' or (../../cnet:node-type = 'DEGREE'  and
--         (../cnet:tp-type = 'DEGREE-TX-TTP' or ../cnet:tp-type = 'DEGREE-RX-TTP' or  ../cnet:tp-type = 'DEGREE-TXRX-TTP' or
--         ../cnet:tp-type = 'DEGREE-TX-CTP' or ../cnet:tp-type = 'DEGREE-RX-CTP' or ../cnet:tp-type = 'DEGREE-TXRX-CTP'))" {
--        error-message "Invalid TP for node type 'DEGREE'";
--      }
--      must
--        "/nd:network/nd:node/cnet:node-type != 'SRG' or (../../cnet:node-type = 'SRG' and
--         (../cnet:tp-type = 'SRG-TX-CP' or ../cnet:tp-type = 'SRG-RX-CP' or ../cnet:tp-type = 'SRG-TXRX-CP' or
--         ../cnet:tp-type = 'SRG-RX-PP' or ../cnet:tp-type = 'SRG-TX-PP' or ../cnet:tp-type = 'SRG-TXRX-PP'))" {
--        error-message "Invalid TP for node type 'SRG'";
--      }
--      must
--        " (/nd:network/nd:node/cnet:node-type != 'TPDR' and ../../cnet:node-type != 'MUXPDR' and ../../cnet:node-type != 'REGEN' and
--         ../../cnet:node-type != 'REGEN-UNI' and ../../cnet:node-type != 'SWITCH')
--         or ((../../cnet:node-type = 'TPDR' or ../../cnet:node-type = 'MUXPDR' or ../../cnet:node-type = 'REGEN' or
--         ../../cnet:node-type = 'REGEN-UNI' or ../../cnet:node-type = 'SWITCH') and
--         (../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'))" {
--        error-message "Invalid TP for node type 'XPONDER'";
--      }
--      must "/nd:network/nd:node/cnet:node-type != 'EXT-PLUGGABLE' or (../../cnet:node-type = 'EXT-PLUGGABLE' and ../cnet:tp-type = 'EXT-PLUGGABLE-TP')" {
--        error-message "Invalid TP for node type 'EXT-PLUGGABLE'";
--      }
--    }
--  }
--  deviation "/nd:networks/nd:network/nwt:link/cnet:link-type" {
--    deviate add {
--      must
--        "(not /nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology) or
--         (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology and
--         (../cnet:link-type = 'ROADM-TO-ROADM' or ../cnet:link-type = 'ADD-LINK' or ../cnet:link-type = 'DROP-LINK' or
--          ../cnet:link-type = 'EXPRESS-LINK' or ../cnet:link-type = 'XPONDER-INPUT' or ../cnet:link-type = 'XPONDER-OUTPUT'))" {
--        error-message "Invalid link type for openroadm-topology";
--        description
--          "The valid link types in the ROADM topology are 'ROADM-TO-ROADM', 'ADD-LINK',
--           'DROP-LINK', 'EXPRESS-LINK', 'XPONDER-INPUT', 'XPONDER-OUTPUT'";
--      }
--    }
--  }
-   augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" {
-     description
-       "Introduce new network type for the Open ROADM optical
-diff --git ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
-index a236b88..ce5a8d9 100644
---- ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
-+++ ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
-@@ -104,18 +104,6 @@ module org-openroadm-network {
-       "Version 1.2";
-   }
-
--  deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
--    deviate add {
--      must
--        "(not /nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-network) or
--         (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-network and
--         (../cnet:node-type = 'ROADM' or ../cnet:node-type = 'XPONDER' or ../cnet:node-type = 'EXT-PLUGGABLE'))" {
--        error-message "Invalid node type for openroadm-network";
--        description
--          "The valid node types in the ROADM network are XPONDER, EXT-PLUGGABLE and ROADM.";
--      }
--    }
--  }
-   augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" {
-     description
-       "Introduce new network type for the Open ROADM optical network";
-diff --git ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
-index 756f4df..fd2d1f1 100644
---- ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
-+++ ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
-@@ -90,44 +90,6 @@ module org-openroadm-otn-network-topology {
-       "Version 2.1";
-   }
-
--  deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
--    deviate add {
--      must
--        "(not /nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology) or
--         (/nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology and
--         (../cnet:node-type = 'SWITCH' or ../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'TPDR' or
--          ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI'))" {
--        error-message "Invalid node type for otn-topology";
--        description
--          "The type of a node in the OTN topology. Valid node types are 'MUXPDR', 'TPDR' and 'SWITCH'";
--      }
--    }
--  }
--  deviation "/nd:networks/nd:network/nd:node/nwt:termination-point/cnet:tp-type" {
--    description
--      "Defines which TP types can be instantiated on which Node types";
--    deviate add {
--      must
--        "(/nd:network/nd:node/cnet:node-type != 'MUXPDR' and ../../cnet:node-type != 'SWITCH' and ../../cnet:node-type != 'TPDR'
--         and ../cnet:node-type != 'REGEN' and ../cnet:node-type != 'REGEN-UNI') or
--         ((../../cnet:node-type = 'MUXPDR' or ../../cnet:node-type = 'SWITCH' or ../../cnet:node-type = 'TPDR' or
--         ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI') and
--         (../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'))" {
--        error-message "Invalid TP for node type Xponder";
--      }
--    }
--  }
--  deviation "/nd:networks/nd:network/nwt:link/cnet:link-type" {
--    deviate add {
--      must
--        "(not /nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology) or
--         (/nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology and ../cnet:link-type = 'OTN-LINK')" {
--        error-message "Invalid link type for otn-topology";
--        description
--          "The valid link type in the OTN topology is 'OTN-LINK'";
--      }
--    }
--  }
-   augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" {
-     description
-       "Introduce new network type for the Open ROADM OTN network topology";
index 6431cb894ab821a69d0089cc2afaddee32fe8505..cf64773cda0188cd1e8ce8c8dc483b2dcfdbbcb0 100644 (file)
@@ -30,7 +30,6 @@ import org.opendaylight.transportpce.networkmodel.NetworkUtilsImpl;
 import org.opendaylight.transportpce.networkmodel.R2RLinkDiscovery;
 import org.opendaylight.transportpce.networkmodel.service.NetworkModelServiceImpl;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmFactory;
-import org.opendaylight.transportpce.networkmodel.util.OpenRoadmTopology121;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmTopology22;
 import org.opendaylight.transportpce.olm.OlmPowerServiceRpcImpl;
 import org.opendaylight.transportpce.olm.OlmProvider;
@@ -77,7 +76,6 @@ public class TransportPCEImpl extends AbstractLightyModule implements TransportP
     private final PceProvider pceProvider;
 
     // network model beans
-    private final OpenRoadmTopology121 openRoadmTopology121;
     private final OpenRoadmTopology22 openRoadmTopology22;
     private final OpenRoadmFactory openRoadmFactory;
     private final R2RLinkDiscovery linkDiscoveryImpl;
@@ -116,20 +114,19 @@ public class TransportPCEImpl extends AbstractLightyModule implements TransportP
         requestProcessor = new RequestProcessor(lightyServices.getControllerBindingPingPongDataBroker());
         networkTransaction = new NetworkTransactionImpl(requestProcessor);
         portMappingVersion121 = new PortMappingVersion121(lightyServices.getControllerBindingPingPongDataBroker(), deviceTransactionManager, openRoadmInterfaces);
-        portMapping = new PortMappingImpl(lightyServices.getControllerBindingPingPongDataBroker(), portMappingVersion221, mappingUtils, portMappingVersion121);
+        portMapping = new PortMappingImpl(lightyServices.getControllerBindingPingPongDataBroker(), portMappingVersion221, portMappingVersion121);
         crossConnectImpl121 = new CrossConnectImpl121(deviceTransactionManager);
         crossConnectImpl221 = new CrossConnectImpl221(deviceTransactionManager);
         crossConnect = new CrossConnectImpl(deviceTransactionManager, mappingUtils, crossConnectImpl121, crossConnectImpl221);
         fixedFlex = new FixedFlexImpl();
 
         LOG.info("Creating PCE beans ...");
-        pathComputationService = new PathComputationServiceImpl(lightyServices.getControllerBindingPingPongDataBroker(), lightyServices.getControllerBindingNotificationPublishService());
+        pathComputationService = new PathComputationServiceImpl(networkTransaction, lightyServices.getControllerBindingNotificationPublishService());
         pceProvider = new PceProvider(lightyServices.getControllerRpcProviderRegistry(), pathComputationService);
 
         LOG.info("Creating network-model beans ...");
-        openRoadmTopology121 = new OpenRoadmTopology121(networkTransaction, deviceTransactionManager);
         openRoadmTopology22 = new OpenRoadmTopology22(networkTransaction, deviceTransactionManager);
-        openRoadmFactory = new OpenRoadmFactory(mappingUtils, openRoadmTopology121, openRoadmTopology22);
+        openRoadmFactory = new OpenRoadmFactory(mappingUtils, openRoadmTopology22);
         linkDiscoveryImpl = new R2RLinkDiscovery(lightyServices.getControllerBindingPingPongDataBroker(), deviceTransactionManager, openRoadmFactory, networkTransaction);
         networkutilsServiceImpl = new NetworkUtilsImpl(lightyServices.getControllerBindingPingPongDataBroker(), openRoadmFactory);
         networkModelService = new NetworkModelServiceImpl(networkTransaction, linkDiscoveryImpl, deviceTransactionManager, openRoadmFactory, portMapping);