Upgrade Network model from 2.1 to 4.1 09/81609/4
authorGilles Thouenon <gilles.thouenon@orange.com>
Thu, 11 Apr 2019 08:41:18 +0000 (10:41 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Thu, 18 Apr 2019 09:37:32 +0000 (11:37 +0200)
- update models to migrate network models to 4.1
- adapt new yang model naming to be compliant with ODL
- integrate rfc8345 dependencies in network/pom
- adapt all the code to new models

Change-Id: Ia48271cb45590aa59956130f5d80891c4140a749
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Co-authored-by: Christophe Betoule <christophe.betoule@orange.com>
Co-authored-by: Dhruv Bhardwaj <db929a@att.com>
Co-authored-by: Shweta Vachhani <sv111y@att.com>
83 files changed:
api/src/main/yang/transportpce-olm@2017-04-18.yang
common/src/main/java/org/opendaylight/transportpce/common/InstanceIdentifiers.java
common/src/test/java/org/opendaylight/transportpce/common/device/DeviceTransactionManagerTest.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/NetConfTopologyListener.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/NetworkUtilsImpl.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/OrdLink.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/R2RLinkDiscovery.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/Rdm2XpdrLink.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/dto/NodeData.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/dto/TopologyShard.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/LldpListener.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/LldpListener221.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/NetworkModelService.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/NetworkModelServiceImpl.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/ClliNetwork.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/LinkIdUtil.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmFactory.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmNetwork.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmTopology121.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmTopology22.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/TopologyUtils.java
olm/src/main/java/org/opendaylight/transportpce/olm/service/OlmPowerServiceImpl.java
olm/src/test/java/org/opendaylight/transportpce/olm/power/PowerMgmtTest.java
olm/src/test/java/org/opendaylight/transportpce/olm/service/OlmPowerServiceImplTest.java
olm/src/test/java/org/opendaylight/transportpce/olm/util/OlmPowerServiceRpcImplUtil.java
olm/src/test/java/org/opendaylight/transportpce/olm/util/TransactionUtils.java
ordmodels/common/src/main/yang/org-openroadm-alarm@2018-10-19.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-common-amplifier-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-equipment-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-link-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-node-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-optical-channel-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-state-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-types@2018-10-19.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-common-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-equipment-states-types@2017-12-15.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-equipment-states-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-maintenance@2018-10-19.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-otn-common-types@2017-12-15.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-otn-common-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-pm-types@2017-12-15.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-pm@2018-10-19.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-port-types@2018-10-19.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-port-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-probable-cause@2016-10-14.yang
ordmodels/common/src/main/yang/org-openroadm-probable-cause@2018-10-19.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-resource-types@2018-10-19.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-resource@2018-10-19.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-switching-pool-types@2017-12-15.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-switching-pool-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-tca@2018-10-19.yang [changed mode: 0755->0644]
ordmodels/common/src/main/yang/org-openroadm-user-mgmt@2017-12-15.yang [changed mode: 0755->0644]
ordmodels/network/pom.xml
ordmodels/network/src/main/yang/ietf-network-topology@2015-06-08.yang [deleted file]
ordmodels/network/src/main/yang/ietf-network@2015-06-08.yang [deleted file]
ordmodels/network/src/main/yang/org-openroadm-amplifier@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-amplifier@2017-09-29.yang with 80% similarity]
ordmodels/network/src/main/yang/org-openroadm-clli-network@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-clli-network@2017-06-26.yang with 90% similarity]
ordmodels/network/src/main/yang/org-openroadm-common-network@2018-11-30.yang [new file with mode: 0644]
ordmodels/network/src/main/yang/org-openroadm-degree@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-degree@2017-09-29.yang with 80% similarity]
ordmodels/network/src/main/yang/org-openroadm-external-pluggable@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-external-pluggable@2017-09-29.yang with 73% similarity]
ordmodels/network/src/main/yang/org-openroadm-link@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-link@2017-09-29.yang with 76% similarity]
ordmodels/network/src/main/yang/org-openroadm-network-topology-types@2018-11-30.yang [new file with mode: 0644]
ordmodels/network/src/main/yang/org-openroadm-network-topology@2017-09-29.yang [deleted file]
ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang [new file with mode: 0644]
ordmodels/network/src/main/yang/org-openroadm-network-types@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-network-types@2017-09-29.yang with 66% similarity]
ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-network@2017-09-29.yang with 67% similarity]
ordmodels/network/src/main/yang/org-openroadm-opposite-links@2017-09-29.yang [deleted file]
ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2017-09-29.yang [deleted file]
ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang [new file with mode: 0644]
ordmodels/network/src/main/yang/org-openroadm-roadm@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-roadm@2017-09-29.yang with 92% similarity]
ordmodels/network/src/main/yang/org-openroadm-srg@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-srg@2017-09-29.yang with 77% similarity]
ordmodels/network/src/main/yang/org-openroadm-xponder@2018-11-30.yang [moved from ordmodels/network/src/main/yang/org-openroadm-xponder@2017-09-29.yang with 74% similarity]
pce/src/main/java/org/opendaylight/transportpce/pce/MapUtils.java
pce/src/main/java/org/opendaylight/transportpce/pce/PceCalculation.java
pce/src/main/java/org/opendaylight/transportpce/pce/PceGraph.java
pce/src/main/java/org/opendaylight/transportpce/pce/PceLink.java
pce/src/main/java/org/opendaylight/transportpce/pce/PceNode.java
pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java
pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestUtils.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/NetworkModelWavelengthServiceImpl.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/NetworkModelWaveLengthServiceFreeTest.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/NetworkModelWaveLengthServiceUseTest.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/WaveLengthServiceUtils.java

index 60e3486589bbe851d58a0e208d78a61123fd237f..8620705fdde481bbd6763502b70a5229db4ee0ab 100644 (file)
@@ -10,7 +10,6 @@ module transportpce-olm {
 
   import ietf-network-topology {
      prefix ietf-network-topology;
-     revision-date 2015-06-08;
   }
 
  organization
index 5c698f40c44dc34066a8494e8b05d926c993e3a5..18f0c9cfd31acc875b486aa8c31c392d52139f6b 100644 (file)
@@ -8,9 +8,10 @@
 
 package org.opendaylight.transportpce.common;
 
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.network.topology.topology.topology.types.TopologyNetconf;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
@@ -25,13 +26,16 @@ public final class InstanceIdentifiers {
                     new TopologyId(TopologyNetconf.QNAME.getLocalName())));
 
     public static final InstanceIdentifier<Network> UNDERLAY_NETWORK_II = InstanceIdentifier
-            .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.UNDERLAY_NETWORK_ID))).build();
+            .builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.UNDERLAY_NETWORK_ID))).build();
 
     public static final InstanceIdentifier<Network> OVERLAY_NETWORK_II = InstanceIdentifier
-            .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).build();
+            .builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).build();
 
     public static final InstanceIdentifier<Network> CLLI_NETWORK_II = InstanceIdentifier
-            .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.CLLI_NETWORK_ID))).build();
+            .builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.CLLI_NETWORK_ID))).build();
 
     private InstanceIdentifiers() {
         // Instance should be not created
index 536aec4b546e227ff5c70615a097a86a8a72f062..355d57367c5c125f40d140c40d2ae55569f21232 100644 (file)
@@ -37,8 +37,8 @@ import org.opendaylight.controller.md.sal.binding.api.MountPoint;
 import org.opendaylight.controller.md.sal.binding.api.MountPointService;
 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkBuilder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
index 790d6c901c423b3e43eeb955641ffc06f39829a5..4d6579ae42220768266012866c0416242b288d13 100644 (file)
@@ -122,7 +122,7 @@ public class NetConfTopologyListener implements DataTreeChangeListener<Node> {
 //            final ListenerRegistration<OrgOpenroadmLldpListener> accessLldpNotificationListenerRegistration =
 //                notificationService.get().registerNotificationListener(lldpListener);
 
-            final OrgOpenroadmTcaListener tcaListener = new TcaListener();
+            TcaListener tcaListener = new TcaListener();
             LOG.info("Registering notification listener on OrgOpenroadmTcaListener for node: {}", nodeId);
             final ListenerRegistration<OrgOpenroadmTcaListener> accessTcaNotificationListenerRegistration =
                 notificationService.get().registerNotificationListener(tcaListener);
@@ -275,7 +275,7 @@ public class NetConfTopologyListener implements DataTreeChangeListener<Node> {
                                 LOG.info("OpenROADM node detected: {} {}", nodeId, connectionStatus.name());
                                 switch (connectionStatus) {
                                     case Connected:
-                                        this.networkModelService.createOpenROADMnode(nodeId, deviceCapabilities.get(0)
+                                        this.networkModelService.createOpenRoadmNode(nodeId, deviceCapabilities.get(0)
                                             .getCapability());
                                         onDeviceConnected(nodeId,deviceCapabilities.get(0).getCapability());
                                         break;
index 4f57a042c36b46e8223a0c94d50b40885bcde841..83d9ecacb072592cf6cd02369daed469e1a47b59 100644 (file)
@@ -30,13 +30,14 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkut
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitXpdrRdmLinksOutput;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitXpdrRdmLinksOutputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.TransportpceNetworkutilsService;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
@@ -59,9 +60,8 @@ public class NetworkUtilsImpl implements TransportpceNetworkutilsService {
 
         LinkId linkId = new LinkId(input.getLinkId());
         // Building link instance identifier
-        InstanceIdentifier.InstanceIdentifierBuilder<Link> linkIID = InstanceIdentifier
-            .builder(Network.class,
-                new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+        InstanceIdentifier.InstanceIdentifierBuilder<Link> linkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
             .augmentation(Network1.class).child(Link.class, new LinkKey(linkId));
 
 
index 414053ece469814af22a9efb1cb2ecce6b5f9df5..a479b1f646f6a4452d5d2a5f15efd4bb5bc9b347 100644 (file)
@@ -16,18 +16,19 @@ import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.networkmodel.util.LinkIdUtil;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmFactory;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRoadmNodesInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.link.OMSAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmLinkType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.link.OMSAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmLinkType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,8 +51,8 @@ final class OrdLink {
         link1Builder.setOMSAttributes(omsAttributesBuilder.build());
 
         //For opposite link augment
-        org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1Builder oppsiteLinkBuilder =
-            new org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1Builder();
+        org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.Link1Builder oppsiteLinkBuilder =
+            new org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.Link1Builder();
         oppsiteLinkBuilder.setOppositeLink(oppositeLinkId);
         link1Builder.setLinkType(OpenroadmLinkType.ROADMTOROADM);
         String srcNode = new StringBuilder(input.getRdmANode()).append("-DEG").append(input.getDegANum()).toString();
@@ -63,14 +64,14 @@ final class OrdLink {
         LinkBuilder linkBuilder = openRoadmFactory.createLink(srcNode, destNode, srcTp, destTp);
 
         linkBuilder.addAugmentation(Link1.class,link1Builder.build());
-        linkBuilder.addAugmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929
+        linkBuilder.addAugmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130
             .Link1.class, oppsiteLinkBuilder.build());
         LinkId linkId = LinkIdUtil.buildLinkId(srcNode, srcTp, destNode, destTp);
 
         // Building link instance identifier
-        InstanceIdentifier.InstanceIdentifierBuilder<Link> linkIID =
-            InstanceIdentifier.builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
-                .augmentation(Network1.class).child(Link.class, new LinkKey(linkId));
+        InstanceIdentifier.InstanceIdentifierBuilder<Link> linkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+            .augmentation(Network1.class).child(Link.class, new LinkKey(linkId));
 
         WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
         writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, linkIID.build(), linkBuilder.build());
index a38b6887c19f3be0351ea6ffccdc8db2c2d7528b..8045dd4a598ea40dbbdf3ba03a40be3387bb4e78 100644 (file)
@@ -37,7 +37,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.open
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.Protocols1;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.lldp.container.lldp.NbrList;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.lldp.container.lldp.nbr.list.IfName;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index 5dd085a78ed1ec1ea1f8abc6df0012b95fe26577..4ed0c9461f5d71085bdccfabc20c4b165829df78 100644 (file)
@@ -18,16 +18,17 @@ import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.networkmodel.util.LinkIdUtil;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmFactory;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.links.input.grouping.LinksInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmLinkType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1Builder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmLinkType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1Builder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -49,9 +50,8 @@ final class Rdm2XpdrLink {
 
         Network topoNetowkLayer = createNetworkBuilder(srcNode, srcTp, destNode, destTp, false,
             openRoadmFactory).build();
-        InstanceIdentifier.InstanceIdentifierBuilder<Network> nwIID =
-            InstanceIdentifier.builder(Network.class,
-                new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)));
+        InstanceIdentifier.InstanceIdentifierBuilder<Network> nwIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)));
         WriteTransaction wrtx = dataBroker.newWriteOnlyTransaction();
         wrtx.merge(LogicalDatastoreType.CONFIGURATION, nwIID.build(), topoNetowkLayer);
 
@@ -82,8 +82,8 @@ final class Rdm2XpdrLink {
         Network topoNetowkLayer = createNetworkBuilder(srcNode, srcTp, destNode, destTp, true,
             openRoadmFactory).build();
         InstanceIdentifier.InstanceIdentifierBuilder<Network> nwIID =
-            InstanceIdentifier.builder(Network.class,
-                new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)));
+            InstanceIdentifier.builder(Networks.class).child(Network.class,
+            new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)));
         WriteTransaction wrtx = dataBroker.newWriteOnlyTransaction();
         wrtx.merge(LogicalDatastoreType.CONFIGURATION, nwIID.build(), topoNetowkLayer);
         CheckedFuture<Void, TransactionCommitFailedException> submit = wrtx.submit();
@@ -104,21 +104,14 @@ final class Rdm2XpdrLink {
         NetworkBuilder nwBuilder = new NetworkBuilder();
         nwBuilder.setNetworkId(nwId);
         nwBuilder.withKey(new NetworkKey(nwId));
-//        Link1Builder lnk1bldr = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.network
-//                .rev181130.Link1Builder();
         Link1Builder lnk1bldr = new Link1Builder();
         LinkBuilder linkBuilder = openRoadmFactory.createLink(srcNode, destNode, srcTp, destTp);
         lnk1bldr.setLinkType(isXponderInput ? OpenroadmLinkType.XPONDERINPUT : OpenroadmLinkType.XPONDEROUTPUT);
-        org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1Builder lnk2bldr =
-            new org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1Builder();
-        lnk2bldr.setOppositeLink(LinkIdUtil.getOppositeLinkId(srcNode, srcTp, destNode, destTp));
+        lnk1bldr.setOppositeLink(LinkIdUtil.getOppositeLinkId(srcNode, srcTp, destNode, destTp));
         linkBuilder.addAugmentation(Link1.class, lnk1bldr.build());
-        linkBuilder.addAugmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1
-            .class, lnk2bldr.build());
 
         LOG.info("Link id in the linkbldr {}", linkBuilder.getLinkId());
-        LOG.info("Link with oppo link {}", linkBuilder.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm
-            .opposite.links.rev170929.Link1.class));
+        LOG.info("Link with oppo link {}", linkBuilder.augmentation(Link1.class));
         Network1Builder nwBldr1 = new Network1Builder();
         nwBldr1.setLink(ImmutableList.of(linkBuilder.build()));
         nwBuilder.addAugmentation(Network1.class, nwBldr1.build());
index c5eae8210d76426e0392ee39acbc1d4bed47cc49..06e8fa9bd356127da9ec9e421eae3eec7e81438c 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.transportpce.networkmodel.dto;
 
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeBuilder;
 
 public class NodeData {
 
index d7508934cb902684d5fb6927ac24cf71a51af3d5..b31c7a55fb4f70b171c7a26ffaf4a2a1450fe3bd 100644 (file)
@@ -9,8 +9,8 @@ package org.opendaylight.transportpce.networkmodel.dto;
 
 import java.util.List;
 
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
 
 /**
  * Data holder for topology fragment.
index e76ad29959af10e2b34d8b93637a1e1d92d823f5..90d8d80dbff3a56fdcdc78d76fc5f32be1d1a829 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.transportpce.networkmodel.listeners;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.LldpNbrInfoChange;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.OrgOpenroadmLldpListener;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceNotificationType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 0a2bc8022d0c890441bc8e7e39e4fbfa22bcac3d..775d0ed76dbdf41a4744f9c176f92032e700c6d5 100644 (file)
@@ -12,7 +12,7 @@ import org.opendaylight.transportpce.networkmodel.R2RLinkDiscovery;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev181019.LldpNbrInfoChange;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev181019.OrgOpenroadmLldpListener;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev181019.ResourceNotificationType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index d4d890c70724b737ffa9509f808108735ddef6b4..a0b10c68f1414d99532f3018a66d8d4bcf64be50 100644 (file)
@@ -22,7 +22,7 @@ public interface NetworkModelService {
      * @param nodeVersion
      *   OpenROADM node version
      */
-    void createOpenROADMnode(String nodeId, String nodeVersion);
+    void createOpenRoadmNode(String nodeId, String nodeVersion);
 
     /**
      * Delete OpenROADM node mapping and topologies.
index 0d45a835aa37da7b096eae45cc6409aeda64f705..fb633a008cb639d29f22cbba0fb4c56687e4a46e 100644 (file)
@@ -24,14 +24,15 @@ import org.opendaylight.transportpce.networkmodel.util.ClliNetwork;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmFactory;
 import org.opendaylight.transportpce.networkmodel.util.OpenRoadmNetwork;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.Nodes.OpenroadmVersion;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeConnectionStatus;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
@@ -70,7 +71,7 @@ public class NetworkModelServiceImpl implements NetworkModelService {
     }
 
     @Override
-    public void createOpenROADMnode(String nodeId, String openRoadmVersion) {
+    public void createOpenRoadmNode(String nodeId, String openRoadmVersion) {
         try {
             LOG.info("createOpenROADMNode: {} ", nodeId);
 
@@ -86,9 +87,8 @@ public class NetworkModelServiceImpl implements NetworkModelService {
                 return;
             }
 
-            InstanceIdentifier<Node> iiClliNode = InstanceIdentifier
-                .builder(Network.class, new NetworkKey(new
-                            NetworkId(NetworkUtils.CLLI_NETWORK_ID)))
+            InstanceIdentifier<Node> iiClliNode = InstanceIdentifier.builder(Networks.class)
+                .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.CLLI_NETWORK_ID)))
                 .child(Node.class, clliNode.key())
                 .build();
 
@@ -102,9 +102,8 @@ public class NetworkModelServiceImpl implements NetworkModelService {
                 LOG.error("Unable to create OpenRoadm node! Node id: {}", nodeId);
                 return;
             }
-            InstanceIdentifier<Node> iiOpenRoadmNode = InstanceIdentifier
-                .builder(Network.class, new NetworkKey(new
-                            NetworkId(NetworkUtils.UNDERLAY_NETWORK_ID)))
+            InstanceIdentifier<Node> iiOpenRoadmNode = InstanceIdentifier.builder(Networks.class)
+                .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.UNDERLAY_NETWORK_ID)))
                 .child(Node.class, openRoadmNode.key())
                 .build();
 
@@ -124,8 +123,8 @@ public class NetworkModelServiceImpl implements NetworkModelService {
             for (Node openRoadmTopologyNode: topologyShard.getNodes()) {
                 LOG.info("creating node {} in {}", openRoadmTopologyNode.getNodeId().getValue(),
                         NetworkUtils.OVERLAY_NETWORK_ID);
-                InstanceIdentifier<Node> iiOpenRoadmTopologyNode = InstanceIdentifier
-                    .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+                InstanceIdentifier<Node> iiOpenRoadmTopologyNode = InstanceIdentifier.builder(Networks.class)
+                    .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
                     .child(Node.class, openRoadmTopologyNode.key())
                     .build();
                 networkTransactionService.merge(LogicalDatastoreType.CONFIGURATION, iiOpenRoadmTopologyNode,
@@ -134,8 +133,8 @@ public class NetworkModelServiceImpl implements NetworkModelService {
             for (Link openRoadmTopologyLink: topologyShard.getLinks()) {
                 LOG.info("creating link {} in {}", openRoadmTopologyLink.getLinkId().getValue(),
                         NetworkUtils.OVERLAY_NETWORK_ID);
-                InstanceIdentifier<Link> iiOpenRoadmTopologyLink = InstanceIdentifier
-                    .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+                InstanceIdentifier<Link> iiOpenRoadmTopologyLink = InstanceIdentifier.builder(Networks.class)
+                    .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
                     .augmentation(Network1.class)
                     .child(Link.class, openRoadmTopologyLink.key())
                     .build();
@@ -179,15 +178,15 @@ public class NetworkModelServiceImpl implements NetworkModelService {
             NodeKey nodeIdKey = new NodeKey(new NodeId(nodeId));
 
             LOG.info("deleting node in {}", NetworkUtils.CLLI_NETWORK_ID);
-            InstanceIdentifier<Node> iiClliNode = InstanceIdentifier
-                .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.CLLI_NETWORK_ID)))
+            InstanceIdentifier<Node> iiClliNode = InstanceIdentifier.builder(Networks.class)
+                .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.CLLI_NETWORK_ID)))
                 .child(Node.class, nodeIdKey)
                 .build();
             this.networkTransactionService.delete(LogicalDatastoreType.CONFIGURATION, iiClliNode);
 
             LOG.info("deleting node in {}", NetworkUtils.UNDERLAY_NETWORK_ID);
-            InstanceIdentifier<Node> iiOpenRoadmNode = InstanceIdentifier
-                .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.UNDERLAY_NETWORK_ID)))
+            InstanceIdentifier<Node> iiOpenRoadmNode = InstanceIdentifier.builder(Networks.class)
+                .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.UNDERLAY_NETWORK_ID)))
                 .child(Node.class, nodeIdKey)
                 .build();
             this.networkTransactionService.delete(LogicalDatastoreType.CONFIGURATION, iiOpenRoadmNode);
@@ -198,8 +197,8 @@ public class NetworkModelServiceImpl implements NetworkModelService {
                 for (Node openRoadmTopologyNode: topologyShard .getNodes()) {
                     LOG.info("deleting node {} in {}", openRoadmTopologyNode.getNodeId().getValue(),
                             NetworkUtils.OVERLAY_NETWORK_ID);
-                    InstanceIdentifier<Node> iiOpenRoadmTopologyNode = InstanceIdentifier
-                        .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+                    InstanceIdentifier<Node> iiOpenRoadmTopologyNode = InstanceIdentifier.builder(Networks.class)
+                        .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
                         .child(Node.class, openRoadmTopologyNode.key())
                         .build();
                     this.networkTransactionService.delete(LogicalDatastoreType.CONFIGURATION, iiOpenRoadmTopologyNode);
@@ -207,8 +206,8 @@ public class NetworkModelServiceImpl implements NetworkModelService {
                 for (Link openRoadmTopologyLink: topologyShard.getLinks()) {
                     LOG.info("deleting link {} in {}", openRoadmTopologyLink.getLinkId().getValue(),
                             NetworkUtils.OVERLAY_NETWORK_ID);
-                    InstanceIdentifier<Link> iiOpenRoadmTopologyLink = InstanceIdentifier
-                        .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+                    InstanceIdentifier<Link> iiOpenRoadmTopologyLink = InstanceIdentifier.builder(Networks.class)
+                        .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
                         .augmentation(Network1.class)
                         .child(Link.class, openRoadmTopologyLink.key())
                         .build();
index e144f241406a3b1f7b43bd0b19beaba8857557c8..09a797d1769416368e81d04097a7db8b6e927501 100644 (file)
@@ -16,20 +16,21 @@ import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev170626.NetworkTypes1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev170626.NetworkTypes1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev170626.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev170626.Node1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev170626.network.network.types.ClliNetworkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NetworkTypesBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev181130.NetworkTypes1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev181130.NetworkTypes1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev181130.Node1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev181130.networks.network.network.types.ClliNetworkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NetworkTypesBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder;
 import org.slf4j.Logger;
@@ -51,7 +52,7 @@ public final class ClliNetwork {
     public static void createClliLayer(DataBroker controllerdb) {
         try {
             Network clliNetwork = createNetwork();
-            InstanceIdentifierBuilder<Network> nwIID = InstanceIdentifier.builder(Network.class,
+            InstanceIdentifierBuilder<Network> nwIID = InstanceIdentifier.builder(Networks.class).child(Network.class,
                 new NetworkKey(new NetworkId(NetworkUtils.CLLI_NETWORK_ID)));
             WriteTransaction wrtx = controllerdb.newWriteOnlyTransaction();
             wrtx.put(LogicalDatastoreType.CONFIGURATION, nwIID.build(), clliNetwork);
index 940d41dd88244bb1d01504e41cf7ab9587735c26..15fbc35a03f11bef172f768dc6a1dc213c3d7b1a 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.transportpce.networkmodel.util;
 
 import java.text.MessageFormat;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.InitRoadmNodesInput;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
 
 
 public final class LinkIdUtil {
index be6b89728877bc273586c6cf336d68596119fdd6..04b3705625d6f1d913c3e4952fe0bb3ccf6c42a0 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.transportpce.common.StringConstants;
 import org.opendaylight.transportpce.common.mapping.MappingUtils;
 import org.opendaylight.transportpce.common.network.NetworkTransactionService;
 import org.opendaylight.transportpce.networkmodel.dto.TopologyShard;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 93b68cea7df91f1436da3ab3e2136e23e04934eb..d5eec885c20247fa50043e8ad532ef4521a5eb90 100644 (file)
@@ -12,29 +12,31 @@ import com.google.common.collect.ImmutableList;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
+
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.rev170929.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.rev170929.Node1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.NetworkTypes1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.NetworkTypes1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.network.types.OpenroadmTopologyBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.NetworkTypes1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.NetworkTypes1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.networks.network.network.types.OpenroadmCommonNetworkBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.rev181130.Node1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmNodeType;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NetworkTypesBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.node.SupportingNodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.node.SupportingNodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NetworkTypesBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder;
 import org.slf4j.Logger;
@@ -58,7 +60,7 @@ public final class OpenRoadmNetwork {
     public static void createOpenRoadmNetworkLayer(DataBroker controllerdb) {
         try {
             Network openRoadmNetwork = createOpenRoadmNetwork();
-            InstanceIdentifierBuilder<Network> nwIID = InstanceIdentifier.builder(Network.class,
+            InstanceIdentifierBuilder<Network> nwIID = InstanceIdentifier.builder(Networks.class).child(Network.class,
                 new NetworkKey(new NetworkId(NetworkUtils.UNDERLAY_NETWORK_ID)));
             WriteTransaction wrtx = controllerdb.newWriteOnlyTransaction();
             wrtx.put(LogicalDatastoreType.CONFIGURATION, nwIID.build(), openRoadmNetwork);
@@ -158,7 +160,7 @@ public final class OpenRoadmNetwork {
         openrdmnwBuilder.withKey(new NetworkKey(nwId));
         // sets network type to OpenRoadmNetwork
         NetworkTypes1Builder openRoadmNetworkTypesBldr = new NetworkTypes1Builder();
-        openRoadmNetworkTypesBldr.setOpenroadmTopology(new OpenroadmTopologyBuilder().build());
+        openRoadmNetworkTypesBldr.setOpenroadmCommonNetwork(new OpenroadmCommonNetworkBuilder().build());
         NetworkTypesBuilder openrdmnwTypeBuilder = new NetworkTypesBuilder();
         openrdmnwTypeBuilder.addAugmentation(NetworkTypes1.class, openRoadmNetworkTypesBldr.build());
         openrdmnwBuilder.setNetworkTypes(openrdmnwTypeBuilder.build());
index 3428d5f477433e2820443128119fc67766496ff0..07de58816dd4145293a917fcff4107e73fc9ff30 100644 (file)
@@ -23,10 +23,13 @@ import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
 import org.opendaylight.transportpce.common.network.NetworkTransactionService;
 import org.opendaylight.transportpce.networkmodel.dto.NodeData;
 import org.opendaylight.transportpce.networkmodel.dto.TopologyShard;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.NetworkTypes1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.NetworkTypes1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.networks.network.network.types.OpenroadmCommonNetworkBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.NodeTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes.AvailableWavelengths;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes.AvailableWavelengthsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes.AvailableWavelengthsKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes.AvailableWavelengths;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes.AvailableWavelengthsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes.AvailableWavelengthsKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.circuit.pack.Ports;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.circuit.pack.PortsKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.circuit.packs.CircuitPacks;
@@ -38,46 +41,40 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.open
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.org.openroadm.device.Info;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.org.openroadm.device.SharedRiskGroup;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.org.openroadm.device.SharedRiskGroupKey;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.NetworkTypes1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.NetworkTypes1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.network.types.OpenroadmTopologyBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.DegreeAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.SrgAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrClientAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrNetworkAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmLinkType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmTpType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NetworkTypesBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.node.SupportingNode;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.node.SupportingNodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.node.SupportingNodeKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1Builder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.TpId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.link.DestinationBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.link.SourceBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node.TerminationPoint;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node.TerminationPointBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node.TerminationPointKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.DegreeAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.SrgAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrClientAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrNetworkAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmLinkType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmNodeType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmTpType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NetworkTypesBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNode;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1Builder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPoint;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPointBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPointKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder;
 import org.slf4j.Logger;
@@ -106,7 +103,7 @@ public class OpenRoadmTopology121 {
     public void createTopoLayer() {
         try {
             Network openRoadmTopology = createOpenRoadmTopology();
-            InstanceIdentifierBuilder<Network> nwIID = InstanceIdentifier.builder(Network.class,
+            InstanceIdentifierBuilder<Network> nwIID = InstanceIdentifier.builder(Networks.class).child(Network.class,
                 new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)));
             this.networkTransactionService.put(LogicalDatastoreType.CONFIGURATION, nwIID.build(), openRoadmTopology);
             this.networkTransactionService.submit().get(1, TimeUnit.SECONDS);
@@ -126,7 +123,7 @@ public class OpenRoadmTopology121 {
         nwBuilder.withKey(new NetworkKey(nwId));
         // set network type to Transport Underlay
         NetworkTypes1Builder topoNetworkTypesBldr = new NetworkTypes1Builder();
-        topoNetworkTypesBldr.setOpenroadmTopology(new OpenroadmTopologyBuilder().build());
+        topoNetworkTypesBldr.setOpenroadmCommonNetwork(new OpenroadmCommonNetworkBuilder().build());
         NetworkTypesBuilder nwTypeBuilder = new NetworkTypesBuilder();
         nwTypeBuilder.addAugmentation(NetworkTypes1.class, topoNetworkTypesBldr.build());
         nwBuilder.setNetworkTypes(nwTypeBuilder.build());
@@ -324,12 +321,12 @@ public class OpenRoadmTopology121 {
             lineCounter--;
         }
         LOG.info("printing tpList {}",tpList);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
                 .Node1Builder tpNode1 = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf
-                .network.topology.rev150608.Node1Builder();
+                .network.topology.rev180226.Node1Builder();
         tpNode1.setTerminationPoint(tpList);
         nodebldr.addAugmentation(
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1.class,
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class,
             tpNode1.build());
         LOG.info("The nodebldr {}",nodebldr);
         return nodebldr;
@@ -429,15 +426,15 @@ public class OpenRoadmTopology121 {
 
         }
 
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
                 .Node1Builder tpNode1
                 = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network
-                .topology.rev150608.Node1Builder();
+                .topology.rev180226.Node1Builder();
 
         tpNode1.setTerminationPoint(tpList);
 
         nodebldr.addAugmentation(
-                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1.class,
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class,
                 tpNode1.build());
         return new NodeData(nodebldr, portDirectionEnum);
     }
@@ -536,13 +533,13 @@ public class OpenRoadmTopology121 {
                 break;
         }
 
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1Builder tpNode1 =
-            new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1Builder();
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1Builder tpNode1 =
+            new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1Builder();
 
         tpNode1.setTerminationPoint(tpList);
 
         nodebldr.addAugmentation(
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1.class,
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class,
             tpNode1.build());
 
         return nodebldr;
@@ -642,35 +639,6 @@ public class OpenRoadmTopology121 {
         return tpBldr;
     }
 
-    // This method returns the linkBuilder object for given source and destination
-    public LinkBuilder createLink(String srcNode, String dstNode, String srcTp, String destTp) {
-        LOG.info("creating link for {}-{}", srcNode, dstNode);
-        // Create Destination for link
-        DestinationBuilder dstNodeBldr = new DestinationBuilder();
-        dstNodeBldr.setDestTp(destTp);
-        dstNodeBldr.setDestNode(new NodeId(dstNode));
-        // Create Source for the link
-        SourceBuilder srcNodeBldr = new SourceBuilder();
-        srcNodeBldr.setSourceNode(new NodeId(srcNode));
-        srcNodeBldr.setSourceTp(srcTp);
-        // set link builder attribute
-        LinkBuilder lnkBldr = new LinkBuilder();
-        lnkBldr.setDestination(dstNodeBldr.build());
-        lnkBldr.setSource(srcNodeBldr.build());
-        lnkBldr.setLinkId(LinkIdUtil.buildLinkId(srcNode, srcTp, dstNode, destTp));
-        lnkBldr.withKey(new LinkKey(lnkBldr.getLinkId()));
-
-        org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1Builder lnk1Bldr =
-            new org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1Builder();
-        LinkId oppositeLinkId = LinkIdUtil.getOppositeLinkId(srcNode, srcTp, dstNode, destTp);
-        lnk1Bldr.setOppositeLink(oppositeLinkId);
-        lnkBldr.addAugmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1.class,
-            lnk1Bldr.build());
-        return lnkBldr;
-    }
-
-
-
     private List<Link> createExpressLinks(String nodeId, int numOfDegrees, int portDirectionEnum) {
         LOG.info("creating express links {} {} {}", nodeId, numOfDegrees, portDirectionEnum);
         List<Link> links = new ArrayList<>();
@@ -694,7 +662,7 @@ public class OpenRoadmTopology121 {
                     srcTp = "DEG" + i + "-CTP-TX";
                     destTp = "DEG" + j + "-CTP-RX";
 
-                    LinkBuilder expLinkBldr = createLink(srcNode, destNode, srcTp, destTp);
+                    LinkBuilder expLinkBldr = TopologyUtils.createLink(srcNode, destNode, srcTp, destTp);
 
                     Link1Builder lnk1Bldr = new Link1Builder();
                     lnk1Bldr.setLinkType(OpenroadmLinkType.EXPRESSLINK);
@@ -705,7 +673,7 @@ public class OpenRoadmTopology121 {
                     srcTp = "DEG" + i + "-CTP-RX";
                     destTp = "DEG" + j + "-CTP-TX";
 
-                    expLinkBldr = createLink(destNode, srcNode, destTp, srcTp);
+                    expLinkBldr = TopologyUtils.createLink(destNode, srcNode, destTp, srcTp);
                     expLinkBldr.addAugmentation(Link1.class, lnk1Bldr.build());
 
                     links.add(expLinkBldr.build());
@@ -729,12 +697,12 @@ public class OpenRoadmTopology121 {
 
                     Link1Builder lnk1Bldr = new Link1Builder();
                     lnk1Bldr.setLinkType(OpenroadmLinkType.EXPRESSLINK);
-                    LinkBuilder expLinkBldr = createLink(srcNode, destNode, srcTp, destTp);
+                    LinkBuilder expLinkBldr = TopologyUtils.createLink(srcNode, destNode, srcTp, destTp);
                     expLinkBldr.addAugmentation(Link1.class, lnk1Bldr.build());
                     links.add(expLinkBldr.build());
 
                     // ZtoA direction
-                    expLinkBldr = createLink(destNode, srcNode, destTp, srcTp);
+                    expLinkBldr = TopologyUtils.createLink(destNode, srcNode, destTp, srcTp);
                     expLinkBldr.addAugmentation(Link1.class, lnk1Bldr.build());
                     links.add(expLinkBldr.build());
                 }
@@ -766,7 +734,7 @@ public class OpenRoadmTopology121 {
                     srcTp = "DEG" + i + "-CTP-TX";
                     destTp = "SRG" + j + "-CP-RX";
 
-                    LinkBuilder addDropLinkBldr = createLink(srcNode, destNode, srcTp, destTp);
+                    LinkBuilder addDropLinkBldr = TopologyUtils.createLink(srcNode, destNode, srcTp, destTp);
                     Link1Builder lnk1Bldr = new Link1Builder();
                     lnk1Bldr.setLinkType(OpenroadmLinkType.DROPLINK);
                     addDropLinkBldr.addAugmentation(Link1.class, lnk1Bldr.build());
@@ -776,7 +744,7 @@ public class OpenRoadmTopology121 {
                     srcTp = "DEG" + i + "-CTP-RX";
                     destTp = "SRG" + j + "-CP-TX";
 
-                    addDropLinkBldr = createLink(destNode, srcNode, destTp, srcTp);
+                    addDropLinkBldr = TopologyUtils.createLink(destNode, srcNode, destTp, srcTp);
                     lnk1Bldr.setLinkType(OpenroadmLinkType.ADDLINK);
                     addDropLinkBldr.addAugmentation(Link1.class, lnk1Bldr.build());
                     links.add(addDropLinkBldr.build());
@@ -797,7 +765,7 @@ public class OpenRoadmTopology121 {
                     srcTp = "DEG" + i + "-CTP-TXRX";
                     destTp = "SRG" + j + "-CP-TXRX";
 
-                    LinkBuilder addDropLinkBldr = createLink(srcNode, destNode, srcTp, destTp);
+                    LinkBuilder addDropLinkBldr = TopologyUtils.createLink(srcNode, destNode, srcTp, destTp);
                     Link1Builder lnk1Bldr = new Link1Builder();
                     lnk1Bldr.setLinkType(OpenroadmLinkType.DROPLINK);
                     addDropLinkBldr.addAugmentation(Link1.class, lnk1Bldr.build());
@@ -805,7 +773,7 @@ public class OpenRoadmTopology121 {
                     links.add(addDropLinkBldr.build());
 
                     // add link
-                    addDropLinkBldr = createLink(destNode, srcNode, destTp, srcTp);
+                    addDropLinkBldr = TopologyUtils.createLink(destNode, srcNode, destTp, srcTp);
                     lnk1Bldr.setLinkType(OpenroadmLinkType.ADDLINK);
                     addDropLinkBldr.addAugmentation(Link1.class, lnk1Bldr.build());
                     links.add(addDropLinkBldr.build());
@@ -829,20 +797,20 @@ public class OpenRoadmTopology121 {
         return waveList;
     }
 
-    private List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+    private List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
             .AvailableWavelengths> create96AvalWaveSrg() {
 
-        List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+        List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                 .AvailableWavelengths> waveList = new ArrayList<>();
 
         for (int i = 1; i < 97; i++) {
-            org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+            org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                     .AvailableWavelengthsBuilder avalBldr =
-                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                             .AvailableWavelengthsBuilder();
             avalBldr.setIndex((long) i);
             avalBldr.withKey(
-                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                             .AvailableWavelengthsKey((long) i));
             waveList.add(avalBldr.build());
         }
index ecba7552228a8558919cda4bf3f8ee23129d9be3..9d7518c8df1a13ee89f47c8e77b2ad0827d430da 100644 (file)
@@ -23,11 +23,14 @@ import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
 import org.opendaylight.transportpce.common.network.NetworkTransactionService;
 import org.opendaylight.transportpce.networkmodel.dto.NodeData;
 import org.opendaylight.transportpce.networkmodel.dto.TopologyShard;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.NetworkTypes1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.NetworkTypes1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.networks.network.network.types.OpenroadmCommonNetworkBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.NodeTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev170929.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes.AvailableWavelengths;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes.AvailableWavelengthsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes.AvailableWavelengthsKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes.AvailableWavelengths;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes.AvailableWavelengthsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes.AvailableWavelengthsKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.circuit.pack.Ports;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.circuit.pack.PortsKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.circuit.packs.CircuitPacks;
@@ -39,44 +42,42 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.org.open
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.org.openroadm.device.container.org.openroadm.device.Info;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.org.openroadm.device.container.org.openroadm.device.SharedRiskGroup;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.org.openroadm.device.container.org.openroadm.device.SharedRiskGroupKey;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.NetworkTypes1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.NetworkTypes1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.network.types.OpenroadmTopologyBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.DegreeAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.SrgAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrClientAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrNetworkAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmLinkType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmTpType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NetworkTypesBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.node.SupportingNode;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.node.SupportingNodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.node.SupportingNodeKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1Builder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.TpId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node.TerminationPoint;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node.TerminationPointBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node.TerminationPointKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.DegreeAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.SrgAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrClientAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrNetworkAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmLinkType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmNodeType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmTpType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NetworkTypesBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNode;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1Builder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPoint;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPointBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPointKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder;
 import org.slf4j.Logger;
@@ -105,7 +106,7 @@ public class OpenRoadmTopology22 {
     public void createTopoLayer() {
         try {
             Network openRoadmTopology = createOpenRoadmTopology();
-            InstanceIdentifierBuilder<Network> nwIID = InstanceIdentifier.builder(Network.class,
+            InstanceIdentifierBuilder<Network> nwIID = InstanceIdentifier.builder(Networks.class).child(Network.class,
                 new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)));
 
             this.networkTransactionService.put(LogicalDatastoreType.CONFIGURATION, nwIID.build(), openRoadmTopology);
@@ -125,7 +126,7 @@ public class OpenRoadmTopology22 {
         nwBuilder.setNetworkId(nwId);
         nwBuilder.withKey(new NetworkKey(nwId));
         NetworkTypes1Builder topoNetworkTypesBldr = new NetworkTypes1Builder();
-        topoNetworkTypesBldr.setOpenroadmTopology(new OpenroadmTopologyBuilder().build());
+        topoNetworkTypesBldr.setOpenroadmCommonNetwork(new OpenroadmCommonNetworkBuilder().build());
         NetworkTypesBuilder nwTypeBuilder = new NetworkTypesBuilder();
         nwTypeBuilder.addAugmentation(NetworkTypes1.class, topoNetworkTypesBldr.build());
         nwBuilder.setNetworkTypes(nwTypeBuilder.build());
@@ -319,12 +320,12 @@ public class OpenRoadmTopology22 {
             tpList.add(tempTpBldr.build());
             lineCounter--; }
         LOG.info("printing tpList {}",tpList);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
                 .Node1Builder tpNode1 = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
-                .ietf.network.topology.rev150608.Node1Builder();
+                .ietf.network.topology.rev180226.Node1Builder();
         tpNode1.setTerminationPoint(tpList);
         nodebldr.addAugmentation(
-                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1.class,
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class,
                 tpNode1.build());
         LOG.info("The nodebldr {}",nodebldr);
         return nodebldr;
@@ -424,14 +425,14 @@ public class OpenRoadmTopology22 {
 
         }
 
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1Builder tpNode1
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1Builder tpNode1
                 = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology
-                .rev150608.Node1Builder();
+                .rev180226.Node1Builder();
 
         tpNode1.setTerminationPoint(tpList);
 
         nodebldr.addAugmentation(
-                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1.class,
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class,
                 tpNode1.build());
         return new NodeData(nodebldr, portDirectionEnum);
     }
@@ -529,13 +530,13 @@ public class OpenRoadmTopology22 {
                 break;
         }
 
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1Builder tpNode1 =
-            new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1Builder();
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1Builder tpNode1 =
+            new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1Builder();
 
         tpNode1.setTerminationPoint(tpList);
 
         nodebldr.addAugmentation(
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1.class,
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class,
             tpNode1.build());
 
         return nodebldr;
@@ -675,7 +676,6 @@ public class OpenRoadmTopology22 {
 
                     expLinkBldr = TopologyUtils.createLink(destNode, srcNode, destTp, srcTp);
                     expLinkBldr.addAugmentation(Link1.class, lnk1Bldr.build());
-
                     links.add(expLinkBldr.build());
 
                 }
@@ -800,7 +800,7 @@ public class OpenRoadmTopology22 {
     public static boolean deleteLinkLinkId(LinkId linkId , NetworkTransactionService networkTransactionService) {
         LOG.info("deleting link for LinkId: {}", linkId);
         try {
-            InstanceIdentifierBuilder<Link> linkIID = InstanceIdentifier.builder(Network.class,
+            InstanceIdentifierBuilder<Link> linkIID = InstanceIdentifier.builder(Networks.class).child(Network.class,
                 new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).augmentation(Network1.class)
                 .child(Link.class, new LinkKey(linkId));
             com.google.common.base.Optional<Link> link =
@@ -808,7 +808,7 @@ public class OpenRoadmTopology22 {
             if (link.isPresent()) {
                 LinkBuilder linkBuilder = new LinkBuilder(link.get());
                 Link1Builder link1Builder = new Link1Builder(linkBuilder.augmentation(org.opendaylight
-                        .yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1.class));
+                        .yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1.class));
                 link1Builder.setAdministrativeState(State.OutOfService);
                 linkBuilder.removeAugmentation(Link1.class);
                 linkBuilder.addAugmentation(Link1.class,link1Builder.build());
@@ -841,21 +841,21 @@ public class OpenRoadmTopology22 {
         return waveList;
     }
 
-    private List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node
+    private List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node
             .attributes.AvailableWavelengths> create96AvalWaveSrg() {
 
-        List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+        List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                 .AvailableWavelengths> waveList =
                 new ArrayList<>();
 
         for (int i = 1; i < 97; i++) {
-            org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+            org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                     .AvailableWavelengthsBuilder avalBldr =
-                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node
+                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node
                             .attributes.AvailableWavelengthsBuilder();
             avalBldr.setIndex((long) i);
             avalBldr.withKey(
-                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node
+                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node
                             .attributes.AvailableWavelengthsKey(
                             (long) i));
             waveList.add(avalBldr.build());
index da639eae10f4447add89c1baf904266492da13ca..cf59315c38303e76a53cace547e7d7faeb072295 100644 (file)
@@ -14,20 +14,20 @@ import java.util.concurrent.TimeoutException;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.common.network.NetworkTransactionService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev170929.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1Builder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.link.DestinationBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.link.SourceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.Link1Builder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.link.DestinationBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.link.SourceBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -60,12 +60,11 @@ public  final class TopologyUtils {
         lnkBldr.setLinkId(LinkIdUtil.buildLinkId(srcNode, srcTp, dstNode, destTp));
         lnkBldr.withKey(new LinkKey(lnkBldr.getLinkId()));
 
-        org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1Builder lnk1Bldr =
-            new org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1Builder();
+        //set opposite link
+        Link1Builder lnk1Bldr = new Link1Builder();
         LinkId oppositeLinkId = LinkIdUtil.getOppositeLinkId(srcNode, srcTp, dstNode, destTp);
         lnk1Bldr.setOppositeLink(oppositeLinkId);
-        lnkBldr.addAugmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1.class,
-            lnk1Bldr.build());
+        lnkBldr.addAugmentation(Link1.class,lnk1Bldr.build());
         return lnkBldr;
     }
 
@@ -87,16 +86,15 @@ public  final class TopologyUtils {
     public static boolean deleteLinkLinkId(LinkId linkId , NetworkTransactionService networkTransactionService) {
         LOG.info("deleting link for LinkId: {}", linkId);
         try {
-            InstanceIdentifier.InstanceIdentifierBuilder<Link> linkIID = InstanceIdentifier.builder(Network.class,
-                new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).augmentation(Network1.class)
-                .child(Link.class, new LinkKey(linkId));
+            InstanceIdentifier.InstanceIdentifierBuilder<Link> linkIID = InstanceIdentifier.builder(Networks.class)
+                .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+                .augmentation(Network1.class).child(Link.class, new LinkKey(linkId));
             com.google.common.base.Optional<Link> link =
                 networkTransactionService.read(LogicalDatastoreType.CONFIGURATION,linkIID.build()).get();
             if (link.isPresent()) {
                 LinkBuilder linkBuilder = new LinkBuilder(link.get());
-                Link1Builder link1Builder = new Link1Builder(linkBuilder.augmentation(org.opendaylight.yang.gen.v1
-                        .http.org.openroadm.network.topology.rev170929.Link1.class));
-                link1Builder.setAdministrativeState(State.OutOfService);
+                Link1Builder link1Builder = new Link1Builder(linkBuilder.augmentation(Link1.class));
+//                link1Builder.setAdministrativeState(State.OutOfService);
                 linkBuilder.removeAugmentation(Link1.class);
                 linkBuilder.addAugmentation(Link1.class,link1Builder.build());
                 networkTransactionService.merge(LogicalDatastoreType.CONFIGURATION, linkIID.build(),
index 41adb8d3d074aa0d880d69586df79fa67f51d41b..dc289b26bc01a4e1e2a8891d8d5f66798fead8aa 100644 (file)
@@ -64,8 +64,8 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfac
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.OrgOpenroadmDevice;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmLinkType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmLinkType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.transport.interfaces.rev161014.Interface1;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.transport.interfaces.rev161014.Interface1Builder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.transport.interfaces.rev161014.ots.container.Ots;
@@ -73,16 +73,17 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.transport.interfa
 import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev161014.PmGranularity;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.get.pm.input.ResourceIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.node.SupportingNode;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNode;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 import org.slf4j.Logger;
@@ -252,7 +253,8 @@ public class  OlmPowerServiceImpl implements OlmPowerService {
     private List<Link> getNetworkLinks() {
         NetworkKey overlayTopologyKey = new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID));
 
-        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Network.class, overlayTopologyKey)
+        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, overlayTopologyKey)
                 .augmentation(Network1.class)
                 .build();
         Optional<Network1> networkOptional;
index bc25a2726eea5f9e7d9d7aad50c38524f0bf3760..2a358384129e3b55b5de5c83a3bd09c02d52301c 100644 (file)
@@ -39,7 +39,7 @@ import org.opendaylight.transportpce.olm.util.OlmPowerServiceRpcImplUtil;
 import org.opendaylight.transportpce.olm.util.TransactionUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInput;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
 
 public class PowerMgmtTest extends AbstractTest {
 
index cac70eb699df6a45427df91256b01c8b7dfcd3d5..f86276bed3c1ec55517fadf6d8b5528bb4fbabdb 100644 (file)
@@ -54,10 +54,11 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev17
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInput;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownOutput;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -178,7 +179,8 @@ public class OlmPowerServiceImplTest  extends AbstractTest {
     @Test
     public void testCalculateSpanlossBase2() {
         NetworkKey overlayTopologyKey = new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID));
-        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Network.class, overlayTopologyKey)
+        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, overlayTopologyKey)
             .augmentation(Network1.class)
             .build();
         Network1 network = TransactionUtils.getNetwork();
@@ -197,7 +199,8 @@ public class OlmPowerServiceImplTest  extends AbstractTest {
     @Test
     public void testCalculateSpanlossBase3() {
         NetworkKey overlayTopologyKey = new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID));
-        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Network.class, overlayTopologyKey)
+        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, overlayTopologyKey)
             .augmentation(Network1.class)
             .build();
         Network1 network = TransactionUtils.getNetwork();
@@ -217,7 +220,8 @@ public class OlmPowerServiceImplTest  extends AbstractTest {
     @Test
     public void testCalculateSpanlossBase4() {
         NetworkKey overlayTopologyKey = new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID));
-        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Network.class, overlayTopologyKey)
+        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, overlayTopologyKey)
             .augmentation(Network1.class)
             .build();
         Network1 network = TransactionUtils.getEmptyNetwork();
@@ -236,7 +240,8 @@ public class OlmPowerServiceImplTest  extends AbstractTest {
     @Test
     public void testCalculateSpanlossBase5() {
         NetworkKey overlayTopologyKey = new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID));
-        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Network.class, overlayTopologyKey)
+        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, overlayTopologyKey)
             .augmentation(Network1.class)
             .build();
         Network1 network = TransactionUtils.getNullNetwork();
@@ -316,7 +321,8 @@ public class OlmPowerServiceImplTest  extends AbstractTest {
     @Test
     public void testCalculateSpanlossCurrent2() {
         NetworkKey overlayTopologyKey = new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID));
-        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Network.class, overlayTopologyKey)
+        InstanceIdentifier<Network1> networkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, overlayTopologyKey)
             .augmentation(Network1.class)
             .build();
         Network1 network = TransactionUtils.getNetwork();
index fcb236dc1fdf20c958f7501f32b8a9f93038cf4a..f6d783fd44b03ee900af18f90798afbba39a073d 100644 (file)
@@ -23,14 +23,14 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev17
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerSetupInputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInput;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.ServicePowerTurndownInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1Builder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev161014.PmGranularity;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.get.pm.input.ResourceIdentifierBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.NodesBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
 
 public final class OlmPowerServiceRpcImplUtil {
 
index 4ae7f820b1da70fc53e3f57d314abb12b4e14f9e..6bc3e58206899670a0532b7ebb6fec987c6ee034 100644 (file)
@@ -27,30 +27,31 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmappi
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.MappingBuilder;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.MappingKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.link.types.rev181130.FiberPmd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.link.types.rev181130.RatioDB;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.NodeTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev170929.FiberPmd;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev170929.RatioDB;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev170929.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link.attributes.amplified.link.SectionElementBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.span.attributes.LinkConcatenation;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.span.attributes.LinkConcatenationBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.link.OMSAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.link.oms.attributes.AmplifiedLinkBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.link.oms.attributes.SpanBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmLinkType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1Builder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.LinkBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.link.DestinationBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.link.SourceBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.link.SupportingLink;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.link.SupportingLinkBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev181130.AdminStates;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link.attributes.amplified.link.SectionElementBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.span.attributes.LinkConcatenation;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.span.attributes.LinkConcatenationBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.link.OMSAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.link.oms.attributes.AmplifiedLinkBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.link.oms.attributes.SpanBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmLinkType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1Builder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.LinkBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.link.DestinationBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.link.SourceBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.link.SupportingLink;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.link.SupportingLinkBuilder;
 import org.opendaylight.yangtools.yang.binding.Augmentation;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -150,16 +151,16 @@ public final class TransactionUtils {
             .build();
         linkConcentationValues.add(linkConcatenation);
         linkConcentationValues.add(linkConcatenation2);
-        List<org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link.attributes.AmplifiedLink>
+        List<org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link.attributes.AmplifiedLink>
             amplifiedLinkValues = new ArrayList<>();
-        org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link.attributes.AmplifiedLink al = new
-            org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link.attributes
+        org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link.attributes.AmplifiedLink al = new
+            org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link.attributes
                 .AmplifiedLinkBuilder().setSectionElement(new SectionElementBuilder()
-                .setSectionElement(new org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link
+                .setSectionElement(new org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link
                     .attributes.amplified.link.section.element.section.element.SpanBuilder()
-                        .setSpan(new org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link
+                        .setSpan(new org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link
                                 .attributes.amplified.link.section.element.section.element.span.SpanBuilder()
-                                    .setAdministrativeState(State.InService)
+                                    .setAdministrativeState(AdminStates.InService)
                                     .setAutoSpanloss(true)
                                     .setClfi("clfi")
                                     .setEngineeredSpanloss(new RatioDB(BigDecimal.ONE))
@@ -170,14 +171,14 @@ public final class TransactionUtils {
                     .build())
                 .build())
             .setSectionEltNumber(Integer.valueOf(1)).build();
-        org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link.attributes.AmplifiedLink al2 = new
-            org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link.attributes
+        org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link.attributes.AmplifiedLink al2 = new
+            org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link.attributes
                 .AmplifiedLinkBuilder().setSectionElement(new SectionElementBuilder()
-                .setSectionElement(new org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link
+                .setSectionElement(new org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link
                      .attributes.amplified.link.section.element.section.element.SpanBuilder()
-                        .setSpan(new org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.amplified.link
+                        .setSpan(new org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.amplified.link
                                 .attributes.amplified.link.section.element.section.element.span.SpanBuilder()
-                                    .setAdministrativeState(State.InService)
+                                    .setAdministrativeState(AdminStates.InService)
                                     .setAutoSpanloss(true)
                                     .setClfi("clfi")
                                     .setEngineeredSpanloss(new RatioDB(BigDecimal.ONE))
old mode 100755 (executable)
new mode 100644 (file)
index 20d65be..6168ed3
@@ -25,31 +25,31 @@ module org-openroadm-alarm {
     "OpenROADM.org";
   description
     "YANG definitions of an alarm.
-     
-     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
      AT&T Intellectual Property.  All other rights reserved.
-     
-     Redistribution and use in source and binary forms, with or without modification, 
+
+     Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
-     
-     * Redistributions of source code must retain the above copyright notice, this 
+
+     * Redistributions of source code must retain the above copyright notice, this
        list of conditions and the following disclaimer.
-     * Redistributions in binary form must reproduce the above copyright notice, 
-       this list of conditions and the following disclaimer in the documentation and/or 
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
        other materials provided with the distribution.
-     * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-       contributors may be used to endorse or promote products derived from this software 
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
        without specific prior written permission.
-     
-     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
   revision 2018-10-19 {
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-amplifier-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-common-amplifier-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..c2c004f
--- /dev/null
@@ -0,0 +1,95 @@
+module org-openroadm-common-amplifier-types {
+  namespace "http://org/openroadm/common-amplifier-types";
+  prefix org-openroadm-common-amplifier-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef amplifier-types {
+    type enumeration {
+      enum "standard" {
+        value 1;
+      }
+    }
+    description
+      "identifier for amplifier type
+       1. standard for amplifier as defined initially in the ROADM MSA specifications
+       To be completed if/when additional amplifier types are required ";
+  }
+
+  typedef line-amplifier-control-mode {
+    type enumeration {
+      enum "gainLoss" {
+        value 2;
+      }
+      enum "off" {
+        value 3;
+      }
+    }
+    description
+      "Identifies the line amplifier control mode, either off or gain.";
+  }
+
+  typedef amplifier-gain-range {
+    type enumeration {
+      enum "gain-range-1" {
+        value 1;
+      }
+      enum "gain-range-2" {
+        value 2;
+      }
+      enum "gain-range-3" {
+        value 3;
+      }
+      enum "gain-range-4" {
+        value 4;
+      }
+    }
+    description
+      "Operational mode for the amplifier:
+       this parameter allows modeling different operational modes (gain ranges) ,notably for switched-gain amplifiers.
+       It indicates which performance model shall be used by the path feasibility engine.
+       For standard amplifier, or when performance evaluation is based on incremental noise, use gain-range-1.
+       When performance evaluation is based on advanced parameters, specify used gain-range (1 to 4).
+       Up to release 2.1, only gain-range-1 is to be used (default value) ";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-equipment-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-common-equipment-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..842d9b1
--- /dev/null
@@ -0,0 +1,98 @@
+module org-openroadm-common-equipment-types {
+  namespace "http://org/openroadm/common-equipment-types";
+  prefix org-openroadm-common-equipment-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef optic-types {
+    type enumeration {
+      enum "gray" {
+        value 1;
+      }
+      enum "dwdm" {
+        value 2;
+      }
+    }
+  }
+
+  typedef equipment-type-enum {
+    type enumeration {
+      enum "other" {
+        value 1;
+      }
+      enum "powerSupply" {
+        value 2;
+      }
+      enum "shelfProcessor" {
+        value 3;
+      }
+      enum "crossConnect" {
+        value 4;
+      }
+      enum "fan" {
+        value 5;
+      }
+      enum "accessPanel" {
+        value 6;
+      }
+      enum "circuitPack" {
+        value 7;
+      }
+    }
+  }
+
+  grouping equipment-type {
+    leaf type {
+      type equipment-type-enum;
+      config false;
+      mandatory true;
+    }
+    leaf extension {
+      type string;
+      config false;
+      mandatory false;
+      description
+        "Populated with equipment type when enum value is set to 'other'";
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-link-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-common-link-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..cd8c6ac
--- /dev/null
@@ -0,0 +1,90 @@
+module org-openroadm-common-link-types {
+  namespace "http://org/openroadm/common-link-types";
+  prefix org-openroadm-common-link-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common link types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef power-dBm {
+    type decimal64 {
+      fraction-digits 2;
+    }
+    units "dBm";
+    description
+      "Power value in dBm.";
+  }
+
+  typedef ratio-dB {
+    type decimal64 {
+      fraction-digits 3;
+    }
+    units "dB";
+    description
+      "Power ratio in dB.";
+  }
+
+  typedef fiber-pmd {
+    type decimal64 {
+      fraction-digits 2;
+    }
+    units "ps/(km[1/2])";
+    description
+      "Polarization Mode Dispersion expressed in ps/km(1/2).";
+  }
+
+  typedef optical-control-mode {
+    type enumeration {
+      enum "power" {
+        value 1;
+      }
+      enum "gainLoss" {
+        value 2;
+      }
+      enum "off" {
+        value 3;
+      }
+    }
+    description
+      "Optical Control Mode: identifies specific algorithm related to power management and general optical control.";
+    reference "openroadm.org: Open ROADM MSA Specification.";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-node-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-common-node-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..2079c03
--- /dev/null
@@ -0,0 +1,65 @@
+module org-openroadm-common-node-types {
+  namespace "http://org/openroadm/common-node-types";
+  prefix org-openroadm-common-node-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common node types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef node-id-type {
+    type string {
+      length "7..63";
+      pattern "([a-zA-Z][a-zA-Z0-9-]{5,61}[a-zA-Z0-9])" {
+        error-message
+          "A node-id must be 7 to 63 characters in length.
+           A node-id can contain letters, numbers, and hyphens.
+           The first character must be a letter.
+           The last character must be a letter or number.";
+      }
+    }
+    description
+      "Globally unique identifier for a device.";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-optical-channel-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-common-optical-channel-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..2a3d461
--- /dev/null
@@ -0,0 +1,286 @@
+module org-openroadm-common-optical-channel-types {
+  namespace "http://org/openroadm/common-optical-channel-types";
+  prefix org-openroadm-common-optical-channel-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common optical channel types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  identity och-rate-identity {
+    description
+      "A unique och rate identification";
+  }
+
+  identity otsi-rate-identity {
+    description
+      "A unique OTSi rate identification";
+  }
+
+  identity fec-identity {
+    description
+      "A unique FEC identification";
+  }
+
+  identity sc-fec {
+    base fec-identity;
+    description
+      "Staircase FEC identification";
+  }
+
+  identity rs-fec {
+    base fec-identity;
+    description
+      "Reed Solomon FEC identification";
+  }
+
+  identity o-fec {
+    base fec-identity;
+    description
+      "OpenROADM FEC identification";
+  }
+
+  identity foic-identity {
+    description
+      "A unique FOICx.k identification (G.709.3 FlexO-LR and
+       G.709.1 FlexO-SR)";
+  }
+
+  identity flexo-otsi-rate-identity {
+    description
+      "A unique rate identification. Applicable to specify OTSi rate. Also
+       applicable to FOIC rate when associated with FlexO processing
+       (G.709.3 FlexO-LR Table 11-2, G.709.1 FlexO-SR clause 9.2.2
+        Table 11-1, 12-1, 13-1) and G.Sup58.";
+  }
+
+  identity foic1.2 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.Sup58";
+  }
+
+  identity foic1.4 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.709.1 and G.709.3";
+  }
+
+  identity foic2.4 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.709.1";
+  }
+
+  identity foic2.8 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.Sup58";
+  }
+
+  identity foic3.6 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in future";
+  }
+
+  identity foic4.8 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.709.1";
+  }
+
+  identity foic4.16 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.Sup58";
+  }
+
+  identity R400G-flexo-otsi {
+    base flexo-otsi-rate-identity;
+    description
+      "Applicable instance for flexo/otsi rate identity";
+  }
+
+  identity R200G-flexo-otsi {
+    base flexo-otsi-rate-identity;
+    description
+      "Applicable instance for flexo/otsi rate identity";
+  }
+
+  identity R200G {
+    base och-rate-identity;
+    description
+      "Identity for 200G Rate";
+  }
+
+  identity R100G-flexo-otsi {
+    base flexo-otsi-rate-identity;
+    description
+      "Applicable instance for otsi/flexo rate identity";
+  }
+
+  identity R100G {
+    base och-rate-identity;
+    description
+      "Identity for 100G Rate";
+  }
+
+  identity R56G-foic-otsi {
+    base flexo-otsi-rate-identity;
+    description
+      "Applicable instance for otsi rate identity";
+  }
+
+  identity R28G-foic-otsi {
+    base flexo-otsi-rate-identity;
+    description
+      "Applicable instance for otsi rate identity";
+  }
+
+  identity R10.7G {
+    base och-rate-identity;
+    description
+      "Identity for 10.7G Rate";
+  }
+
+  identity R11.1G {
+    base och-rate-identity;
+    description
+      "Identity for 11.1G Rate";
+  }
+
+  typedef frequency-THz {
+    type decimal64 {
+      fraction-digits 8;
+    }
+    units "THz";
+    description
+      "Frequency value in THz.";
+  }
+
+  typedef frequency-GHz {
+    type decimal64 {
+      fraction-digits 5;
+    }
+    units "GHz";
+    description
+      "Frequency value in GHz.";
+  }
+
+  typedef wavelength-duplication-type {
+    type enumeration {
+      enum "one-per-srg" {
+        value 1;
+        description
+          "The SRG cannot handle wavelength duplication. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will result in failure.";
+      }
+      enum "one-per-degree" {
+        value 2;
+        description
+          "The SRG can handle wavelength duplication, but only one per degree. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will succeed, so long as the connections are not using the same degree.";
+      }
+    }
+    description
+      "One per srg is applied to C/D add/drop group
+       one per degree is applied to C/D/C add drop group";
+  }
+
+  typedef modulation-format {
+    type enumeration {
+      enum "bpsk" {
+        value 0;
+        description
+          "binary phase-shift keying";
+      }
+      enum "dc-dp-bpsk" {
+        value 1;
+        description
+          "DC dual-polarization binary phase-shift keying";
+      }
+      enum "qpsk" {
+        value 2;
+        description
+          "quadrature phase-shift keying";
+      }
+      enum "dp-qpsk" {
+        value 3;
+        description
+          "dual-polarization binary phase-shift keying";
+      }
+      enum "qam16" {
+        value 4;
+        description
+          "quadrature amplitude modulation 16";
+      }
+      enum "dp-qam16" {
+        value 5;
+        description
+          "dual-polarization quadrature amplitude modulation 16";
+      }
+      enum "dc-dp-qam16" {
+        value 6;
+        description
+          "DC dual-polarization quadrature amplitude modulation 16";
+      }
+      enum "qam8" {
+        value 7;
+        description
+          "quadrature amplitude modulation 8";
+      }
+      enum "dp-qam8" {
+        value 8;
+        description
+          "dual-polarization quadrature amplitude modulation 8";
+      }
+      enum "dc-dp-qam8" {
+        value 9;
+        description
+          "DC dual-polarization quadrature amplitude modulation 8";
+      }
+    }
+    description
+      "Modulation format";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-state-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-common-state-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..03d352e
--- /dev/null
@@ -0,0 +1,109 @@
+module org-openroadm-common-state-types {
+  namespace "http://org/openroadm/common-state-types";
+  prefix org-openroadm-common-state-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef lifecycle-state {
+    type enumeration {
+      enum "deployed" {
+        value 1;
+      }
+      enum "planned" {
+        value 2;
+      }
+      enum "maintenance" {
+        value 3;
+      }
+      enum "deploying" {
+        value 4;
+      }
+      enum "undeploying" {
+        value 5;
+      }
+      enum "undeployed" {
+        value 6;
+      }
+      enum "proposed" {
+        value 7;
+      }
+      enum "draft" {
+        value 8;
+      }
+      enum "deploy-failed" {
+        value 9;
+      }
+      enum "undeploy-failed" {
+        value 10;
+      }
+      enum "deployed-augmented" {
+        value 11;
+      }
+      enum "deployed-updating" {
+        value 12;
+      }
+    }
+    description
+      "Lifecycle state.";
+  }
+
+  typedef state {
+    type enumeration {
+      enum "inService" {
+        value 1;
+      }
+      enum "outOfService" {
+        value 2;
+      }
+      enum "degraded" {
+        value 3;
+      }
+    }
+    description
+      "State that indicates whether the resource is able to provide fulfill its role - carry traffic, etc.";
+  }
+}
old mode 100755 (executable)
new mode 100644 (file)
index c83e074..6f2d9fe
@@ -8,31 +8,31 @@ module org-openroadm-common-types {
     "OpenROADM.org";
   description
     "YANG definitions of common types.
-       
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
+
+      Redistribution and use in source and binary forms, with or without modification,
       are permitted provided that the following conditions are met:
-      
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2018-10-19 {
@@ -236,9 +236,9 @@ module org-openroadm-common-types {
       }
     }
     description
-      "Operational mode for the amplifier:  
+      "Operational mode for the amplifier:
        this parameter allows modeling different operational modes (gain ranges) ,notably for switched-gain amplifiers.
-       It indicates which performance model shall be used by the path feasibility engine. 
+       It indicates which performance model shall be used by the path feasibility engine.
        For standard amplifier, or when performance evaluation is based on incremental noise, use gain-range-1.
        When performance evaluation is based on advanced parameters, specify used gain-range (1 to 4).
        Up to release 2.1, only gain-range-1 is to be used (default value) ";
@@ -279,7 +279,7 @@ module org-openroadm-common-types {
       enum "commit" {
         value 2;
         description
-          "commit the software or database. 
+          "commit the software or database.
            For software activate, this event can happen in the following scenarios:
              1) immediately when user issue db-activate command without rollBackTimer
                 or if the rollBackTimer is specified as 00-00-00;
@@ -295,7 +295,7 @@ module org-openroadm-common-types {
           "cancel the database or software activation operation.
            For software activate, this event can happen in the following cases:
              1) when the rollBackTimer expires;
-             2) when the user issues cancel-rollback-timer with accept=false.  
+             2) when the user issues cancel-rollback-timer with accept=false.
            For database activate, this event can happen in the following cases:
              1) when the rollBackTimer expires;
              2) when the user issues cancel-rollback-timer with accept=false.";
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-common-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..2458192
--- /dev/null
@@ -0,0 +1,238 @@
+module org-openroadm-common-types {
+  namespace "http://org/openroadm/common-types";
+  prefix org-openroadm-common-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef activate-notification-type {
+    type enumeration {
+      enum "activate" {
+        value 1;
+        description
+          "software or database activation";
+      }
+      enum "commit" {
+        value 2;
+        description
+          "commit the software or database.
+           For software activate, this event can happen in the following scenarios:
+             1) immediately when user issue sw-activate command without validationTimer
+                or if the validationTimer is specified as 00-00-00;
+             2) when user issue cancel-validation-timer before it expires and with accept=true.
+           For database activate, this event can occur in the following scenarios:
+             1) immediately when user issue db-activate command without rollBackTimer
+                or if the rollBackTimer is specified as 00-00-00;
+             2) when user issue cancel-rollback-timer before it expires and with accept=true.";
+      }
+      enum "cancel" {
+        value 3;
+        description
+          "cancel the database or software activation operation.
+           For software activate, this event can happen in the following cases:
+             1) when the validationTimer expires;
+             2) when the user issues cancel-validation-timer with accept=false.
+           For database activate, this event can happen in the following cases:
+             1) when the rollBackTimer expires;
+             2) when the user issues cancel-rollback-timer with accept=false.";
+      }
+    }
+    description
+      "Type of notification on software or database activation events";
+  }
+
+  typedef rpc-status {
+    type enumeration {
+      enum "Successful" {
+        value 1;
+      }
+      enum "Failed" {
+        value 2;
+      }
+    }
+    description
+      "status of RPC ";
+  }
+
+  typedef extended-rpc-status {
+    type enumeration {
+      enum "Successful" {
+        value 1;
+      }
+      enum "Failed" {
+        value 2;
+      }
+      enum "In-progress" {
+        value 3;
+      }
+    }
+    description
+      "status of RPC ";
+  }
+
+  typedef openroadm-version-type {
+    type enumeration {
+      enum "1.0" {
+        value 1;
+        description
+          "value for 1.0";
+      }
+      enum "2.0" {
+        value 2;
+        description
+          "value for 2.0";
+      }
+      enum "2.1" {
+        value 3;
+        description
+          "value for 2.1";
+      }
+      enum "2.2" {
+        value 4;
+        description
+          "value for 2.2";
+      }
+      enum "3.0" {
+        value 5;
+        description
+          "value for 3.0";
+      }
+      enum "3.1" {
+        value 6;
+        description
+          "value for 3.1";
+      }
+      enum "4.0" {
+        value 7;
+        description
+          "value for 4.0";
+      }
+      enum "2.2.1" {
+        value 8;
+        description
+          "value for 2.2.1";
+      }
+      enum "4.1" {
+        value 9;
+        description
+          "value for 4.1";
+      }
+      enum "3.1.1" {
+        value 10;
+        description
+          "value for 3.1.1";
+      }
+    }
+    description
+      "OpenROADM version enum type";
+  }
+
+  grouping rpc-response-status {
+    leaf status {
+      type rpc-status;
+      mandatory true;
+      description
+        "Successful or Failed";
+    }
+    leaf status-message {
+      type string;
+      description
+        "Gives a more detailed status";
+    }
+  }
+
+  grouping extended-rpc-response-status {
+    leaf status {
+      type extended-rpc-status;
+      mandatory true;
+      description
+        "Successful, Failed or In-progress";
+    }
+    leaf status-message {
+      type string;
+      description
+        "Gives a more detailed status.";
+    }
+  }
+
+  grouping eth-rate-and-burst-size {
+    description
+      "Grouping of ethernet committed rate and burst size.";
+    leaf committed-info-rate {
+      type uint32;
+      mandatory true;
+      description
+        "Committed Information Rate (CIR), unit in Mbps. For example, 1250 Mbps";
+    }
+    leaf committed-burst-size {
+      type uint16;
+      mandatory true;
+      description
+        "Committed Burst Size, unit in 1KB (K Byte).
+                Range 16 | 32 | 64 | 128 | 512 | 1024. Default: 16";
+    }
+  }
+}
old mode 100755 (executable)
new mode 100644 (file)
index 72ec70e..0c951ae
@@ -8,31 +8,31 @@ module org-openroadm-equipment-states-types {
     "OpenROADM.org";
   description
     "YANG definitions for types of states of equipment (slot/subslot).
-     
-     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
      AT&T Intellectual Property.  All other rights reserved.
-     
-     Redistribution and use in source and binary forms, with or without modification, 
+
+     Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
-     
-     * Redistributions of source code must retain the above copyright notice, this 
+
+     * Redistributions of source code must retain the above copyright notice, this
        list of conditions and the following disclaimer.
-     * Redistributions in binary form must reproduce the above copyright notice, 
-       this list of conditions and the following disclaimer in the documentation and/or 
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
        other materials provided with the distribution.
-     * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-       contributors may be used to endorse or promote products derived from this software 
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
        without specific prior written permission.
-     
-     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
   revision 2017-12-15 {
diff --git a/ordmodels/common/src/main/yang/org-openroadm-equipment-states-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-equipment-states-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..20aa29c
--- /dev/null
@@ -0,0 +1,143 @@
+module org-openroadm-equipment-states-types {
+  namespace "http://org/openroadm/equipment/states/types";
+  prefix org-openroadm-equipment-states-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for types of states of equipment (slot/subslot).
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef admin-states {
+    type enumeration {
+      enum "inService" {
+        value 1;
+      }
+      enum "outOfService" {
+        value 2;
+      }
+      enum "maintenance" {
+        value 3;
+      }
+    }
+  }
+
+  typedef states {
+    type enumeration {
+      enum "reserved-for-facility-planned" {
+        value 1;
+        description
+          "equipment is planned for use by a service";
+      }
+      enum "not-reserved-planned" {
+        value 2;
+        description
+          "equipment is planned by not reserved for any purpose";
+      }
+      enum "reserved-for-maintenance-planned" {
+        value 3;
+        description
+          "equipment is planned for use as a maintenance spare";
+      }
+      enum "reserved-for-facility-unvalidated" {
+        value 4;
+        description
+          "equipment is reserved for use by a service but not
+           validated against planned equipment";
+      }
+      enum "not-reserved-unvalidated" {
+        value 5;
+        description
+          "equipment is not reserved for any purpose and
+           not validated against planned equipment";
+      }
+      enum "unknown-unvalidated" {
+        value 6;
+        description
+          "unknown equipment not validated against planned equipment";
+      }
+      enum "reserved-for-maintenance-unvalidated" {
+        value 7;
+        description
+          "equipment is to be used for use as a maintenance spare
+           but not validated against planned equipment";
+      }
+      enum "reserved-for-facility-available" {
+        value 8;
+        description
+          "reserved for use by a service and available";
+      }
+      enum "not-reserved-available" {
+        value 9;
+        description
+          "not reserved for use by a service and available";
+      }
+      enum "reserved-for-maintenance-available" {
+        value 10;
+        description
+          "reserved as a maintenance spare and available";
+      }
+      enum "reserved-for-reversion-inuse" {
+        value 11;
+        description
+          "equipment that is reserved as part of a home path
+           for a service that has been temporarily re-routed";
+      }
+      enum "not-reserved-inuse" {
+        value 12;
+        description
+          "equipment in use for a service";
+      }
+      enum "reserved-for-maintenance-inuse" {
+        value 13;
+        description
+          "maintenance spare equipment that is in use as a
+           maintenance spare";
+      }
+    }
+  }
+}
old mode 100755 (executable)
new mode 100644 (file)
index 95b358e..748055f
@@ -13,31 +13,31 @@ module org-openroadm-maintenance {
     "OpenROADM.org";
   description
     "YANG definitions of maintenace operations.
-       
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
+
+      Redistribution and use in source and binary forms, with or without modification,
       are permitted provided that the following conditions are met:
-      
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2018-10-19 {
old mode 100755 (executable)
new mode 100644 (file)
index 62f2b93..41f4cdf
@@ -8,39 +8,39 @@ module org-openroadm-otn-common-types {
     "OpenROADM.org";
   description
     "YANG definitions for common otn related type definitions.
-     
-     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
      AT&T Intellectual Property.  All other rights reserved.
-     
-     Redistribution and use in source and binary forms, with or without modification, 
+
+     Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
-     
-     * Redistributions of source code must retain the above copyright notice, this 
+
+     * Redistributions of source code must retain the above copyright notice, this
        list of conditions and the following disclaimer.
-     * Redistributions in binary form must reproduce the above copyright notice, 
-       this list of conditions and the following disclaimer in the documentation and/or 
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
        other materials provided with the distribution.
-     * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-       contributors may be used to endorse or promote products derived from this software 
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
        without specific prior written permission.
-     
-     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.
-     
+
      Also contains code components extracted from IETF Interfaces.  These code components
      are copyrighted and licensed as follows:
-     
+
      Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
      All rights reserved.
-     
+
      This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
      publication of this document. Please review these documents carefully, as they
diff --git a/ordmodels/common/src/main/yang/org-openroadm-otn-common-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-otn-common-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..f6f11c8
--- /dev/null
@@ -0,0 +1,311 @@
+module org-openroadm-otn-common-types {
+  namespace "http://org/openroadm/otn-common-types";
+  prefix org-openroadm-otn-common-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for common otn related type definitions.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+
+  identity otu-rate-identity {
+    description
+      "A unique rate identification of the OTU.";
+  }
+
+  identity OTU4 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU4";
+  }
+
+  identity OTU3 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU3";
+  }
+
+  identity OTU2 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU2";
+  }
+
+  identity OTU2e {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU2e";
+  }
+
+  identity OTU1 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU1";
+  }
+
+  identity OTU0 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU0";
+  }
+
+  identity OTUflex {
+    base otu-rate-identity;
+    description
+      "Identity for an OTUflex";
+  }
+
+  identity odu-rate-identity {
+    description
+      "A unique rate identification of the ODU.";
+  }
+
+  identity ODU4 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU4";
+  }
+
+  identity ODU3 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU3";
+  }
+
+  identity ODU2 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU2";
+  }
+
+  identity ODU2e {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU2e";
+  }
+
+  identity ODU1 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU1";
+  }
+
+  identity ODU0 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU0";
+  }
+
+  identity ODUflex-cbr {
+    base odu-rate-identity;
+    description
+      "ODUFlex for CBR client signals (G.709)";
+  }
+
+  identity ODUflex-cbr-25G {
+    base odu-rate-identity;
+    description
+      "ODUFlex for CBR client signals 25G (G.709 17.13.1)";
+  }
+
+  identity ODUflex-cbr-200G {
+    base odu-rate-identity;
+    description
+      "ODUFlex for CBR client signals 200G (G.709 17.13.2)";
+  }
+
+  identity ODUflex-cbr-400G {
+    base odu-rate-identity;
+    description
+      "ODUFlex for CBR client signals 400G (G.709 17.13.2)";
+  }
+
+  identity ODUflex-imp {
+    base odu-rate-identity;
+    description
+      "ODUFlex for IMP (Idle insertion Mapping Procedure) mapped client signals (G.709)";
+  }
+
+  identity ODUflex-flexe {
+    base odu-rate-identity;
+    description
+      "ODUflex for FlexE-aware client signals (G.709)";
+  }
+
+  identity ODUflex-gfp {
+    base odu-rate-identity;
+    description
+      "ODUflex for GFP-F mapped client signals (G.709)";
+  }
+
+  identity odtu-type-identity {
+    description
+      "A unique identification for the MSI odtu type.";
+  }
+
+  identity ODTU4.ts-Allocated {
+    base odtu-type-identity;
+    description
+      "OPU4 MSI - ODTU4.ts, OPU4 MSI TS is occupied/allocated.
+       Applies to all ODTU4.x mappings";
+  }
+
+  identity ODTU01 {
+    base odtu-type-identity;
+    description
+      "ODTU01 MSI type";
+  }
+
+  identity ODTU12 {
+    base odtu-type-identity;
+    description
+      "ODTU12 MSI type";
+  }
+
+  identity ODTU13 {
+    base odtu-type-identity;
+    description
+      "ODTU13 MSI type";
+  }
+
+  identity ODTU23 {
+    base odtu-type-identity;
+    description
+      "ODTU23 MSI type";
+  }
+
+  identity ODTU2.ts {
+    base odtu-type-identity;
+    description
+      "ODTU2.ts MSI type";
+  }
+
+  identity ODTU3.ts {
+    base odtu-type-identity;
+    description
+      "ODTU3.ts MSI type";
+  }
+
+  identity unallocated {
+    base odtu-type-identity;
+    description
+      "Unallocated MSI type";
+  }
+
+  identity odu-function-identity {
+    description
+      "A unique identification of the ODUk interface function.";
+  }
+
+  identity ODU-TTP {
+    base odu-function-identity;
+    description
+      "ODU TTP facility facing trail termination";
+  }
+
+  identity ODU-CTP {
+    base odu-function-identity;
+    description
+      "ODU CTP connection termination";
+  }
+
+  identity ODU-TTP-CTP {
+    base odu-function-identity;
+    description
+      "ODU CTP mapper level connection termination with trail termination and client adaptation";
+  }
+
+  typedef payload-type-def {
+    type string {
+      length "2";
+      pattern "[0-9a-fA-F]*";
+    }
+    description
+      "Common type definition for odu payload-type";
+  }
+
+  typedef opucn-trib-slot-def {
+    type string;
+    description
+      "OPUCn trib slot in the form of 'A.B' with
+       A = 1..n
+       B = 1..20";
+  }
+
+  typedef tcm-direction-enum {
+    type enumeration {
+      enum "up-tcm" {
+        description
+          "TCM termination direction faces the switch fabric.";
+      }
+      enum "down-tcm" {
+        description
+          "TCM termination direction faces the facility";
+      }
+    }
+    description
+      "Enumeration type for TCM direction";
+  }
+}
old mode 100755 (executable)
new mode 100644 (file)
index a7230b1..2501ee3
@@ -8,31 +8,31 @@ module org-openroadm-pm-types {
     "OpenROADM.org";
   description
     "YANG definitions of performance management types.
-       
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
+
+      Redistribution and use in source and binary forms, with or without modification,
       are permitted provided that the following conditions are met:
-      
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2017-12-15 {
old mode 100755 (executable)
new mode 100644 (file)
index c1985c9..6254d9a
@@ -29,31 +29,31 @@ module org-openroadm-pm {
     "OpenROADM.org";
   description
     "YANG definitions of performance management.
-       
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
+
+      Redistribution and use in source and binary forms, with or without modification,
       are permitted provided that the following conditions are met:
-      
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2018-10-19 {
@@ -192,7 +192,7 @@ module org-openroadm-pm {
         config false;
         mandatory true;
         description
-          "The time at the end of the period; For example if bin starts at 
+          "The time at the end of the period; For example if bin starts at
            01:15:00 and ends at 01:29:59, the completion-time is 01:29:59";
       }
     }
@@ -204,12 +204,12 @@ module org-openroadm-pm {
         length "10..255";
       }
       description
-        "The file name to write the historical PM data. 
+        "The file name to write the historical PM data.
          The controller should be able to use this name to retrieve the file via ftp/sftp.
-         The file name should be unique for each RPC request since a new RPC request 
+         The file name should be unique for each RPC request since a new RPC request
          could be initiated while the file transfer of the previous file is still in progress.
-         
-         The file content should be written in xml format based on the historical-pm-list 
+
+         The file content should be written in xml format based on the historical-pm-list
          yang definition and the file should be gzip compressed.";
     }
     uses org-openroadm-common-types:rpc-response-status;
@@ -243,7 +243,7 @@ module org-openroadm-pm {
   rpc collect-historical-pm-file {
     description
       "Command to query historical PM data.
-       The device should be able to process an rpc request for 15min data 
+       The device should be able to process an rpc request for 15min data
        and a separate request for 24hour data in parallel.";
     input {
       leaf from-bin-number {
old mode 100755 (executable)
new mode 100644 (file)
index 8db93cc..2319877
@@ -13,31 +13,31 @@ module org-openroadm-port-types {
     "OpenROADM.org";
   description
     "YANG definitions for port types.
-     
-     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
      AT&T Intellectual Property.  All other rights reserved.
-     
-     Redistribution and use in source and binary forms, with or without modification, 
+
+     Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
-     
-     * Redistributions of source code must retain the above copyright notice, this 
+
+     * Redistributions of source code must retain the above copyright notice, this
        list of conditions and the following disclaimer.
-     * Redistributions in binary form must reproduce the above copyright notice, 
-       this list of conditions and the following disclaimer in the documentation and/or 
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
        other materials provided with the distribution.
-     * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-       contributors may be used to endorse or promote products derived from this software 
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
        without specific prior written permission.
-     
-     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
   revision 2018-10-19 {
diff --git a/ordmodels/common/src/main/yang/org-openroadm-port-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-port-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..3f7ce71
--- /dev/null
@@ -0,0 +1,294 @@
+module org-openroadm-port-types {
+  namespace "http://org/openroadm/port/types";
+  prefix org-openroadm-port-types;
+
+  import org-openroadm-common-link-types {
+    prefix org-openroadm-common-link-types;
+    revision-date 2018-11-30;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for port types.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  identity supported-if-capability {
+    description
+      "Base identity from which specific supported interfaces are derived";
+  }
+
+  identity if-100GE {
+    base supported-if-capability;
+  }
+
+  identity if-OMS {
+    base supported-if-capability;
+  }
+
+  identity if-OTS {
+    base supported-if-capability;
+  }
+
+  identity if-OTS-OMS-MC-NMC {
+    base supported-if-capability;
+  }
+
+  identity if-NMC {
+    base supported-if-capability;
+  }
+
+  identity if-OCH {
+    base supported-if-capability;
+  }
+
+  identity if-1GE {
+    base supported-if-capability;
+  }
+
+  identity if-10GE {
+    base supported-if-capability;
+  }
+
+  identity if-40GE {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU1-ODU1 {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU2-ODU2 {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU2E-ODU2E {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU3-ODU3 {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU4-ODU4 {
+    base supported-if-capability;
+  }
+
+  identity if-OTUCn-ODUCn {
+    base supported-if-capability;
+  }
+
+  identity if-otsi-flexo-flexogroup {
+    base supported-if-capability;
+  }
+
+  identity if-otsi-otucn-oducn {
+    base supported-if-capability;
+  }
+
+  identity if-OTU4-ODU4 {
+    base supported-if-capability;
+  }
+
+  identity if-OTU1-ODU1 {
+    base supported-if-capability;
+  }
+
+  identity if-OTU2-ODU2 {
+    base supported-if-capability;
+  }
+
+  identity if-OTU2e-ODU2e {
+    base supported-if-capability;
+  }
+
+  identity if-OTU3-ODU3 {
+    base supported-if-capability;
+  }
+
+  identity if-1GE-ODU0 {
+    base supported-if-capability;
+  }
+
+  identity if-10GE-ODU2 {
+    base supported-if-capability;
+  }
+
+  identity if-10GE-ODU2e {
+    base supported-if-capability;
+  }
+
+  identity if-10GE-oduflexgfp {
+    base supported-if-capability;
+  }
+
+  identity if-25GE-oduflexcbr {
+    base supported-if-capability;
+  }
+
+  identity if-40GE-ODU3 {
+    base supported-if-capability;
+  }
+
+  identity if-40GE-oduflexgfp {
+    base supported-if-capability;
+  }
+
+  identity if-100GE-ODU4 {
+    base supported-if-capability;
+  }
+
+  identity if-100GE-oduflexgfp {
+    base supported-if-capability;
+  }
+
+  identity if-200GE-oduflexcbr {
+    base supported-if-capability;
+  }
+
+  identity if-400GE-odufleximp {
+    base supported-if-capability;
+  }
+
+  identity if-400GE-oduflexcbr {
+    base supported-if-capability;
+  }
+
+  identity supported-xpdr-capability {
+    description
+      "Base identity from which specific supported xponder are derived";
+  }
+
+  identity Transponder {
+    base supported-xpdr-capability;
+  }
+
+  identity Regen {
+    base supported-xpdr-capability;
+  }
+
+  typedef port-wavelength-types {
+    type enumeration {
+      enum "wavelength" {
+        value 1;
+        description
+          "Port on a transponder or ROADM SRG add drop";
+      }
+      enum "multi-wavelength" {
+        value 2;
+        description
+          "External port connecting to other roadm.";
+      }
+    }
+    description
+      "Port types.";
+  }
+
+  typedef port-module-types {
+    type enumeration {
+      enum "100GBASE-LR4" {
+        value 1;
+      }
+      enum "CWDM-4" {
+        value 2;
+      }
+    }
+    description
+      "Pluggable modue types.";
+  }
+
+  grouping common-port {
+    leaf port-power-capability-min-rx {
+      type org-openroadm-common-link-types:power-dBm;
+      config false;
+      description
+        "Based on port capabilities, the minimum power in the system spec for this port to
+         provide optimum function in rx direction";
+    }
+    leaf port-power-capability-min-tx {
+      type org-openroadm-common-link-types:power-dBm;
+      config false;
+      description
+        "Based on port capabilities, the minimum power in the system spec for this port to
+         provide optimum function in tx direction.";
+    }
+    leaf port-power-capability-max-rx {
+      type org-openroadm-common-link-types:power-dBm;
+      config false;
+      description
+        "Based on port capabilities, the maximum power in the system spec for this port to
+         provide optimum function in rx direction.";
+    }
+    leaf port-power-capability-max-tx {
+      type org-openroadm-common-link-types:power-dBm;
+      config false;
+      description
+        "Based on port capabilities, the maximum power in the system spec for this port to
+         provide optimum function in tx direction.";
+    }
+  }
+
+  grouping roadm-port {
+    uses common-port;
+  }
+}
index eaa0d2a47709853a0b871748b540f5d9713a57e7..642c2560b24501d1adbca3fc5733f7d2d6f335fe 100644 (file)
@@ -4,6 +4,7 @@ module org-openroadm-probable-cause {
 
   import org-openroadm-common-types {
     prefix org-openroadm-common-types;
+    revision-date 2016-10-14;
   }
 
   organization "Open ROADM MSA";
old mode 100755 (executable)
new mode 100644 (file)
index 9b6a017..030c93c
@@ -13,31 +13,31 @@ module org-openroadm-probable-cause {
     "OpenROADM.org";
   description
     "YANG definitions of Probable Causes.
-     
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
+
+      Redistribution and use in source and binary forms, with or without modification,
       are permitted provided that the following conditions are met:
-      
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2018-10-19 {
old mode 100755 (executable)
new mode 100644 (file)
index 374ff1d..765c380
@@ -13,31 +13,31 @@ module org-openroadm-resource-types {
     "OpenROADM.org";
   description
     "YANG definitions of common resource types.
-       
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
+
+      Redistribution and use in source and binary forms, with or without modification,
       are permitted provided that the following conditions are met:
-      
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2018-10-19 {
@@ -197,7 +197,7 @@ module org-openroadm-resource-types {
     leaf node-id {
       type org-openroadm-common-types:node-id-type;
       description
-        "Node Id is a globally unique identifier for a device. 
+        "Node Id is a globally unique identifier for a device.
          Same as leafref value in model, if applicable.";
     }
   }
@@ -217,7 +217,7 @@ module org-openroadm-resource-types {
     leaf port-name {
       type string;
       description
-        "Port identifier. Unique within the context of a circuit-pack. 
+        "Port identifier. Unique within the context of a circuit-pack.
          Same as leafref value in model, if applicable.";
     }
   }
@@ -227,7 +227,7 @@ module org-openroadm-resource-types {
       type string;
       mandatory true;
       description
-        "Physical Link identifier. Unique within the context of a device. 
+        "Physical Link identifier. Unique within the context of a device.
          Same as leafref value in model, if applicable.";
     }
   }
@@ -237,7 +237,7 @@ module org-openroadm-resource-types {
       type string;
       mandatory true;
       description
-        "Internal Link identifier. Unique within the context of a device. 
+        "Internal Link identifier. Unique within the context of a device.
          Same as leafref value in model, if applicable.";
     }
   }
@@ -246,7 +246,7 @@ module org-openroadm-resource-types {
     leaf connection-name {
       type string;
       description
-        "Connection name. Unique within the context of a device. 
+        "Connection name. Unique within the context of a device.
          Same as leafref value in model, if applicable.";
     }
   }
@@ -255,7 +255,7 @@ module org-openroadm-resource-types {
     leaf degree-number {
       type uint16;
       description
-        "Degree identifier. Unique within the context of a device. 
+        "Degree identifier. Unique within the context of a device.
          Same as leafref value in model, if applicable.";
     }
   }
@@ -264,7 +264,7 @@ module org-openroadm-resource-types {
     leaf srg-number {
       type uint16;
       description
-        "Shared Risk Group identifier. Unique within the context of a device. 
+        "Shared Risk Group identifier. Unique within the context of a device.
          Same as leafref value in model, if applicable.";
     }
   }
@@ -274,7 +274,7 @@ module org-openroadm-resource-types {
       type string;
       mandatory true;
       description
-        "Shelf-id identifier. Unique within the context of a device.  
+        "Shelf-id identifier. Unique within the context of a device.
          Same as leafref value in model, if applicable.";
     }
   }
@@ -284,7 +284,7 @@ module org-openroadm-resource-types {
       type string;
       mandatory true;
       description
-        "Service identifier. Unique within the context of a network.  
+        "Service identifier. Unique within the context of a network.
          Same as leafref value in model, if applicable.";
     }
   }
@@ -294,7 +294,7 @@ module org-openroadm-resource-types {
       type string;
       mandatory true;
       description
-        "Service identifier. Unique within the context of a network.  
+        "Service identifier. Unique within the context of a network.
          Same as leafref value in model, if applicable.";
     }
     leaf version-number {
@@ -310,7 +310,7 @@ module org-openroadm-resource-types {
       type string;
       mandatory true;
       description
-        "Service identifier. Unique within the context of a network.  
+        "Service identifier. Unique within the context of a network.
          Same as leafref value in model, if applicable.";
     }
   }
old mode 100755 (executable)
new mode 100644 (file)
index c7afac4..7baff87
@@ -13,31 +13,31 @@ module org-openroadm-resource {
     "OpenROADM.org";
   description
     "YANG definitions of resources.
-       
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
+
+      Redistribution and use in source and binary forms, with or without modification,
       are permitted provided that the following conditions are met:
-      
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2018-10-19 {
old mode 100755 (executable)
new mode 100644 (file)
index fc6cd08..10cff01
@@ -8,29 +8,29 @@ module org-openroadm-switching-pool-types {
     "OpenROADM.org";
   description
     "YANG definitions of common types.
-       
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      Redistribution and use in source and binary forms, with or without modification,
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2017-12-15 {
diff --git a/ordmodels/common/src/main/yang/org-openroadm-switching-pool-types@2018-11-30.yang b/ordmodels/common/src/main/yang/org-openroadm-switching-pool-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..0817cee
--- /dev/null
@@ -0,0 +1,59 @@
+module org-openroadm-switching-pool-types {
+  namespace "http://org/openroadm/switching-pool-types";
+  prefix org-openroadm-switching-pool-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+
+  typedef switching-pool-types {
+    type enumeration {
+      enum "non-blocking" {
+        value 1;
+        description
+          "Single non-blocking element";
+      }
+      enum "blocking" {
+        value 2;
+        description
+          "Multiple connected non-blocking lists";
+      }
+    }
+  }
+}
old mode 100755 (executable)
new mode 100644 (file)
index 8cc0cdd..969a666
@@ -25,31 +25,31 @@ module org-openroadm-tca {
     "OpenROADM.org";
   description
     "YANG definitions of Threshold Crossing Alert types.
-       
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
+
+      Redistribution and use in source and binary forms, with or without modification,
       are permitted provided that the following conditions are met:
-      
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2018-10-19 {
old mode 100755 (executable)
new mode 100644 (file)
index 7e3227d..cf55c1b
@@ -8,31 +8,31 @@ module org-openroadm-user-mgmt {
     "OpenROADM.org";
   description
     "YANG definitions of user managements.
-       
-      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
       AT&T Intellectual Property.  All other rights reserved.
-      
-      Redistribution and use in source and binary forms, with or without modification, 
+
+      Redistribution and use in source and binary forms, with or without modification,
       are permitted provided that the following conditions are met:
-      
-      * Redistributions of source code must retain the above copyright notice, this 
+
+      * Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice, 
-        this list of conditions and the following disclaimer in the documentation and/or 
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.
-      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
-        contributors may be used to endorse or promote products derived from this software 
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
         without specific prior written permission.
-      
-      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
-      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
-      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
-      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
-      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2017-12-15 {
@@ -57,7 +57,7 @@ module org-openroadm-user-mgmt {
       length "3..32";
       pattern "[a-z][a-z0-9]{2,31}" {
         error-message
-          "A username must begin with a lowercase letter, The remainder 
+          "A username must begin with a lowercase letter, The remainder
            of the string may contain lowercase letters, or numbers 0 through 9.";
       }
     }
@@ -73,13 +73,13 @@ module org-openroadm-user-mgmt {
       }
     }
     description
-      "The password for this entry. This shouldn't be in clear text 
-       The Password must contain at least 2 characters from 
-       each of the following groups: 
-       a) Lower case alphabetic (a-z) 
-       b) Upper case alphabetic (A-Z) 
-       c) Numeric 0-9 
-       d) Special characters Allowed !$%^()[]_-~{}.+ 
+      "The password for this entry. This shouldn't be in clear text
+       The Password must contain at least 2 characters from
+       each of the following groups:
+       a) Lower case alphabetic (a-z)
+       b) Upper case alphabetic (A-Z)
+       c) Numeric 0-9
+       d) Special characters Allowed !$%^()[]_-~{}.+
        Password must not contain Username.";
   }
 
index 62535093a01e24381a1798b5bf15a8ababb8816f..8d12b42034ffa3580971ca77745b7b9bdc81e676 100644 (file)
@@ -30,6 +30,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         <scope>import</scope>
         <type>pom</type>
       </dependency>
+      <!--dependency>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>mdsal-artifacts</artifactId>
+        <version>3.0.6</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency-->
     </dependencies>
   </dependencyManagement>
 
@@ -50,26 +57,27 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
       <artifactId>rfc6991-ietf-yang-types</artifactId>
     </dependency>
-    <!--dependency>
+
+    <!-- to upgrade topology to 4.1 -->
+    <dependency>
       <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
       <artifactId>rfc8345</artifactId>
+      <version>1.2.6</version>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
       <artifactId>rfc8345-ietf-network</artifactId>
+      <version>1.2.6</version>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
       <artifactId>rfc8345-ietf-network-topology</artifactId>
+      <version>1.2.6</version>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
       <artifactId>rfc8345-ietf-network-topology-state</artifactId>
+      <version>1.2.6</version>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>ietf-network-2015-06-08</artifactId>
-      <version>1.6.1-SNAPSHOT</version>
-    </dependency-->
   </dependencies>
 </project>
diff --git a/ordmodels/network/src/main/yang/ietf-network-topology@2015-06-08.yang b/ordmodels/network/src/main/yang/ietf-network-topology@2015-06-08.yang
deleted file mode 100644 (file)
index 0aeb2e5..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-module ietf-network-topology {
-  yang-version 1;
-  namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology";
-  prefix lnk;
-
-  import ietf-inet-types {
-    prefix inet;
-  }
-  import ietf-network {
-    prefix nd;
-  }
-
-  organization "TBD";
-  contact
-    "WILL-BE-DEFINED-LATER";
-  description
-    "This module defines a common base model for network topology,
-     augmenting the base network model with links to connect nodes,
-     as well as termination points to terminate links on nodes.";
-
-  revision 2015-06-08 {
-    description
-      "Initial revision.";
-    reference "draft-ietf-i2rs-yang-network-topo-01";
-  }
-
-  typedef link-id {
-    type inet:uri;
-    description
-      "An identifier for a link in a topology.
-       The identifier may be opaque.
-       The identifier SHOULD be chosen such that the same link in a
-       real network topology will always be identified through the
-       same identifier, even if the model is instantiated in
-       separate datastores. An implementation MAY choose to capture
-       semantics in the identifier, for example to indicate the type
-       of link and/or the type of topology that the link is a part
-       of.";
-  }
-
-  typedef tp-id {
-    type inet:uri;
-    description
-      "An identifier for termination points on a node.
-       The identifier may be opaque.
-       The identifier SHOULD be chosen such that the same TP in a
-       real network topology will always be identified through the
-       same identifier, even if the model is instantiated in
-       separate datastores. An implementation MAY choose to capture
-       semantics in the identifier, for example to indicate the type
-       of TP and/or the type of node and topology that the TP is a
-       part of.";
-  }
-
-  grouping link-ref {
-    description
-      "References a link in a specific network.";
-    leaf link-ref {
-      type leafref {
-        path "/nd:network[nd:network-id=current()/../"+
-          "nd:network-ref]/link/link-id";
-      }
-      description
-        "A type for an absolute reference a link instance.
-         (This type should not be used for relative references.
-         In such a case, a relative path should be used instead.)";
-    }
-    uses nd:network-ref;
-  }
-
-  grouping tp-ref {
-    description
-      "References a termination point in a specific node.";
-    leaf tp-ref {
-      type leafref {
-        path "/nd:network[nd:network-id=current()/../"+
-          "nd:network-ref]/nd:node[nd:node-id=current()/../"+
-          "nd:node-ref]/termination-point/tp-id";
-      }
-      description
-        "A type for an absolute reference to a termination point.
-         (This type should not be used for relative references.
-         In such a case, a relative path should be used instead.)";
-    }
-    uses nd:node-ref;
-  }
-
-  augment "/nd:network" {
-    description
-      "Add links to the network model.";
-    list link {
-      key "link-id";
-      description
-        "A Network Link connects a by Local (Source) node and
-         a Remote (Destination) Network Nodes via a set of the
-         nodes' termination points.
-         As it is possible to have several links between the same
-         source and destination nodes, and as a link could
-         potentially be re-homed between termination points, to
-         ensure that we would always know to distinguish between
-         links, every link is identified by a dedicated link
-         identifier.
-         Note that a link models a point-to-point link, not a
-         multipoint link.
-         Layering dependencies on links in underlay topologies are
-         not represented as the layering information of nodes and of
-         termination points is sufficient.";
-      container source {
-        description
-          "This container holds the logical source of a particular
-           link.";
-        leaf source-node {
-          type leafref {
-            path "../../../nd:node/nd:node-id";
-          }
-          mandatory true;
-          description
-            "Source node identifier, must be in same topology.";
-        }
-        leaf source-tp {
-          type leafref {
-            path "../../../nd:node[nd:node-id=current()/../"+
-              "source-node]/termination-point/tp-id";
-          }
-          description
-            "Termination point within source node that terminates
-             the link.";
-        }
-      }
-      container destination {
-        description
-          "This container holds the logical destination of a
-           particular link.";
-        leaf dest-node {
-          type leafref {
-            path "../../../nd:node/nd:node-id";
-          }
-          mandatory true;
-          description
-            "Destination node identifier, must be in the same
-             network.";
-        }
-        leaf dest-tp {
-          type leafref {
-            path "../../../nd:node[nd:node-id=current()/../"+
-              "dest-node]/termination-point/tp-id";
-          }
-          description
-            "Termination point within destination node that
-             terminates the link.";
-        }
-      }
-      leaf link-id {
-        type link-id;
-        description
-          "The identifier of a link in the topology.
-           A link is specific to a topology to which it belongs.";
-      }
-      list supporting-link {
-        key "network-ref link-ref";
-        description
-          "Identifies the link, or links, that this link
-           is dependent on.";
-        leaf network-ref {
-          type leafref {
-            path "../../../nd:supporting-network/nd:network-ref";
-          }
-          description
-            "This leaf identifies in which underlay topology
-             supporting link is present.";
-        }
-        leaf link-ref {
-          type leafref {
-            path "/nd:network[nd:network-id=current()/.."+
-              "/network-ref]/link/link-id";
-          }
-          description
-            "This leaf identifies a link which is a part
-             of this link's underlay. Reference loops, in which
-             a link identifies itself as its underlay, either
-             directly or transitively, are not allowed.";
-        }
-      }
-    }
-  }
-  augment "/nd:network/nd:node" {
-    description
-      "Augment termination points which terminate links.
-       Termination points can ultimately be mapped to interfaces.";
-    list termination-point {
-      key "tp-id";
-      description
-        "A termination point can terminate a link.
-         Depending on the type of topology, a termination point
-         could, for example, refer to a port or an interface.";
-      leaf tp-id {
-        type tp-id;
-        description
-          "Termination point identifier.";
-      }
-      list supporting-termination-point {
-        key "network-ref node-ref tp-ref";
-        description
-          "The leaf list identifies any termination points that
-           the termination point is dependent on, or maps onto.
-           Those termination points will themselves be contained
-           in a supporting node.
-           This dependency information can be inferred from
-           the dependencies between links.  For this reason,
-           this item is not separately configurable.  Hence no
-           corresponding constraint needs to be articulated.
-           The corresponding information is simply provided by the
-           implementing system.";
-        leaf network-ref {
-          type leafref {
-            path "../../../nd:supporting-node/nd:network-ref";
-          }
-          description
-            "This leaf identifies in which topology the
-             supporting termination point is present.";
-        }
-        leaf node-ref {
-          type leafref {
-            path "../../../nd:supporting-node/nd:node-ref";
-          }
-          description
-            "This leaf identifies in which node the supporting
-             termination point is present.";
-        }
-        leaf tp-ref {
-          type leafref {
-            path "/nd:network[nd:network-id=current()/../"+
-              "network-ref]/nd:node[nd:node-id=current()/../"+
-              "node-ref]/termination-point/tp-id";
-          }
-          description
-            "Reference to the underlay node, must be in a
-             different topology";
-        }
-      }
-    }
-  }
-}
diff --git a/ordmodels/network/src/main/yang/ietf-network@2015-06-08.yang b/ordmodels/network/src/main/yang/ietf-network@2015-06-08.yang
deleted file mode 100644 (file)
index 9e2dadf..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-module ietf-network {
-  yang-version 1;
-  namespace "urn:ietf:params:xml:ns:yang:ietf-network";
-  prefix nd;
-
-  import ietf-inet-types {
-    prefix inet;
-  }
-
-  organization "TBD";
-  contact
-    "WILL-BE-DEFINED-LATER";
-  description
-    "This module defines a common base model for a collection
-     of nodes in a network. Node definitions s are further used
-     in network topologies and inventories.";
-
-  revision 2015-06-08 {
-    description
-      "Initial revision.";
-    reference "draft-ietf-i2rs-yang-network-topo-01";
-  }
-
-  typedef node-id {
-    type inet:uri;
-    description
-      "Identifier for a node.";
-  }
-
-  typedef network-id {
-    type inet:uri;
-    description
-      "Identifier for a network.";
-  }
-
-  grouping network-ref {
-    description
-      "Contains the information necessary to reference a network,
-       for example an underlay network.";
-    leaf network-ref {
-      type leafref {
-        path "/network/network-id";
-      }
-      description
-        "Used to reference a network, for example an underlay
-         network.";
-    }
-  }
-
-  grouping node-ref {
-    description
-      "Contains the information necessary to reference a node.";
-    leaf node-ref {
-      type leafref {
-        path "/network[network-id=current()/../network-ref]"+
-          "/node/node-id";
-      }
-      description
-        "Used to reference a node.
-         Nodes are identified relative to the network they are
-         contained in.";
-    }
-    uses network-ref;
-  }
-
-  list network {
-    key "network-id";
-    description
-      "Describes a network.
-       A network typically contains an inventory of nodes,
-       topological information (augmented through
-       network-topology model), as well as layering
-       information.";
-    container network-types {
-      description
-        "Serves as an augmentation target.
-         The network type is indicated through corresponding
-         presence containers augmented into this container.";
-    }
-    leaf network-id {
-      type network-id;
-      description
-        "Identifies a network.";
-    }
-    leaf server-provided {
-      type boolean;
-      config false;
-      description
-        "Indicates whether the information concerning this
-         particular network is populated by the server
-         (server-provided true, the general case for network
-         information discovered from the server),
-         or whether it is configured by a client
-         (server-provided true, possible e.g. for
-         service overlays managed through a controller).";
-    }
-    list supporting-network {
-      key "network-ref";
-      description
-        "An underlay network, used to represent layered network
-         topologies.";
-      leaf network-ref {
-        type leafref {
-          path "/network/network-id";
-        }
-        description
-          "References the underlay network.";
-      }
-    }
-    list node {
-      key "node-id";
-      description
-        "The inventory of nodes of this network.";
-      leaf node-id {
-        type node-id;
-        description
-          "Identifies a node uniquely within the containing
-           network.";
-      }
-      list supporting-node {
-        key "network-ref node-ref";
-        description
-          "Represents another node, in an underlay network, that
-           this node is supported by.  Used to represent layering
-           structure.";
-        leaf network-ref {
-          type leafref {
-            path "../../../supporting-network/network-ref";
-          }
-          description
-            "References the underlay network that the
-             underlay node is part of.";
-        }
-        leaf node-ref {
-          type leafref {
-            path "/network/node/node-id";
-          }
-          description
-            "References the underlay node itself.";
-        }
-      }
-    }
-  }
-}
similarity index 80%
rename from ordmodels/network/src/main/yang/org-openroadm-amplifier@2017-09-29.yang
rename to ordmodels/network/src/main/yang/org-openroadm-amplifier@2018-11-30.yang
index 679da99747f5e9b7a27361656553172385263c1e..2db0c3082261baa8d3c83716bc84b93128231022 100644 (file)
@@ -1,10 +1,15 @@
 module org-openroadm-amplifier {
+  yang-version 1.1;
   namespace "http://org/openroadm/amplifier";
   prefix amp;
 
-  import org-openroadm-common-types {
-    prefix org-openroadm-common-types;
-    revision-date 2017-09-29;
+  import org-openroadm-common-amplifier-types {
+    prefix org-openroadm-common-amplifier-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-link-types {
+    prefix org-openroadm-common-link-types;
+    revision-date 2018-11-30;
   }
 
   organization
@@ -16,7 +21,7 @@ module org-openroadm-amplifier {
 
 
      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2017,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -41,6 +46,18 @@ module org-openroadm-amplifier {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
   revision 2017-09-29 {
     description
       "Version 2.1";
@@ -58,75 +75,75 @@ module org-openroadm-amplifier {
     description
       "Defines the group of amplifier attributes";
     leaf amp-type {
-      description
-        "Amplifier type";
-      type org-openroadm-common-types:amplifier-types;
+      type org-openroadm-common-amplifier-types:amplifier-types;
       config true;
       mandatory true;
+      description
+        "Amplifier type";
     }
     leaf amp-gain-range {
+      type org-openroadm-common-amplifier-types:amplifier-gain-range;
+      config true;
       description
         "Amplifier gain-range (gain-range 1 to 4 for switched gain amplifiers)
          gain-range-1 for standard amplifiers";
-      type org-openroadm-common-types:amplifier-gain-range;
-      config true;
     }
     leaf ingress-span-loss-aging-margin {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
       description
         "Span-loss margin used to set optical amplifier gain and output-voa
          extracted from corresponding device OTS interface container, optional
          since it concerns only line facing amp";
-      config true;
     }
     leaf gain {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
+      mandatory true;
       description
         "Overall Amplifier Signal gain, excluding ASE, including VOA attenuation
          retrieved from operational value (PM)";
-      config true;
-      mandatory true;
     }
     leaf initially-planned-gain {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
       description
         "Overall Amplifier Signal gain, excluding ASE, including VOA attenuation:
          value coming from planning tool initial design";
-      config true;
     }
     leaf tilt {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
       description
         "Tilt of smart EDFA retrieved from operational value (PM)";
-      config true;
     }
     leaf initially-planned-tilt {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
       description
         "Tilt of smart EDFA:
          value coming from planning tool initial design";
-      config true;
     }
     leaf out-voa-att {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
       description
         "output VOA attenuation";
-      config true;
     }
     leaf initially-planned-out-voa-att {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
       description
         "output VOA attenuation: value coming from planning tool initial design.
          As in R2.0, output VOA can not be configured by controller, this parameter may be used by the controller
          to check that value set by amplifiers is in the range of calculated value and take relevant decision if not";
-      config true;
     }
     leaf eol-max-load-pIn {
-      type org-openroadm-common-types:power-dBm;
+      type org-openroadm-common-link-types:power-dBm;
+      config true;
       description
         "End Of Life Total input power at maximum load used for amplifier and VOA setting
          extracted from corresponding device OTS interface container";
-      config true;
     }
   }
 }
similarity index 90%
rename from ordmodels/network/src/main/yang/org-openroadm-clli-network@2017-06-26.yang
rename to ordmodels/network/src/main/yang/org-openroadm-clli-network@2018-11-30.yang
index 6dbd262d70a80c9e910e07e5072bcb6aaa17ea59..62e778e6b983e04ee7de60d7e08118f7749e4dc5 100644 (file)
@@ -1,10 +1,11 @@
 module org-openroadm-clli-network {
+  yang-version 1.1;
   namespace "http://org/openroadm/clli/network";
   prefix cn;
 
   import ietf-network {
     prefix nd;
-    revision-date 2015-06-08;
+    revision-date 2018-02-26;
   }
 
   organization
@@ -15,7 +16,7 @@ module org-openroadm-clli-network {
     "YANG definitions for a CLLI Network
 
      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -40,12 +41,16 @@ module org-openroadm-clli-network {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
   revision 2017-06-26 {
     description
       "Version 2.0";
   }
 
-  augment "/nd:network/nd:network-types" {
+  augment "/nd:networks/nd:network/nd:network-types" {
     description
       "Introduce new network type for the Open ROADM optical network";
     container clli-network {
@@ -55,7 +60,7 @@ module org-openroadm-clli-network {
          network";
     }
   }
-  augment "/nd:network/nd:node" {
+  augment "/nd:networks/nd:network/nd:node" {
     when "../nd:network-types/clli-network";
     description
       "Augment the generic network node with Open ROADM attributes.";
diff --git a/ordmodels/network/src/main/yang/org-openroadm-common-network@2018-11-30.yang b/ordmodels/network/src/main/yang/org-openroadm-common-network@2018-11-30.yang
new file mode 100644 (file)
index 0000000..b42bea8
--- /dev/null
@@ -0,0 +1,185 @@
+module org-openroadm-common-network {
+  yang-version 1.1;
+  namespace "http://org/openroadm/common/network";
+  prefix cnet;
+
+  import ietf-network {
+    prefix nd;
+    revision-date 2018-02-26;
+  }
+  import ietf-network-topology {
+    prefix nwt;
+    revision-date 2018-02-26;
+  }
+  import org-openroadm-network-types {
+    prefix org-openroadm-network-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-state-types {
+    prefix org-openroadm-common-state-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-equipment-states-types {
+    prefix org-openroadm-equipment-states-types;
+    revision-date 2018-11-30;
+  }
+
+  organization
+    "OPEN ROADM MSA";
+  contact
+    "www.OpenROADM.org.";
+  description
+    "Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  augment "/nd:networks/nd:network/nd:network-types" {
+    description
+      "Introduce new network type for the Open ROADM common network";
+    container openroadm-common-network {
+      presence "indicates common network of Open ROADMs";
+      description
+        "The presence of the container node indicates Open ROADM common network";
+    }
+  }
+  augment "/nd:networks/nd:network/nd:node" {
+    when "../nd:network-types/openroadm-common-network";
+    description
+      "Augment the generic network node with Open ROADM common attributes.";
+    leaf node-type {
+      type org-openroadm-network-types:openroadm-node-type;
+      description
+        "A component of the network topology. Once the node-type is configured, it should not be modified.";
+    }
+    leaf node-status {
+      type org-openroadm-network-types:openroadm-node-status;
+      status deprecated;
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of a node. Whether it is planned, deployed, in maintenance, etc.";
+    }
+  }
+  augment "/nd:networks/nd:network/nd:node/nwt:termination-point" {
+    when "../../nd:network-types/openroadm-common-network";
+    leaf tp-type {
+      type org-openroadm-network-types:openroadm-tp-type;
+      description
+        "The type of a termination point in the ROADM topology.";
+    }
+    leaf eqpt-srg-id {
+      type uint32;
+      description
+        "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of a termination point. Whether it is planned, deployed, in maintenance, etc.";
+    }
+  }
+  augment "/nd:networks/nd:network/nwt:link" {
+    when "../nd:network-types/openroadm-common-network";
+    description
+      "This augmentation defines common link attributes in the Open ROADM common network";
+    leaf link-type {
+      type org-openroadm-network-types:openroadm-link-type;
+    }
+    leaf clfi {
+      type string;
+    }
+    leaf opposite-link {
+      type leafref {
+        path "../../nwt:link/nwt:link-id";
+      }
+      description
+        "optional - pointer to reverse link in case of bidirectional link. Supersedes opposite-link
+         originally defined in OMS-attributes container, to apply to any kind of link in the topology";
+    }
+    leaf link-length {
+      type decimal64 {
+        fraction-digits 2;
+      }
+    }
+    leaf link-latency {
+      type uint32;
+      description
+        "Latency of a link";
+    }
+    leaf TE-metric {
+      type uint32;
+      description
+        "defines a Traffic Engineering metric which could be used for any type of link.
+         Supersedes TE-metric originally defined in OMS-attributes grouping";
+    }
+    list link-concatenation {
+      key "SRLG-Id";
+      leaf SRLG-Id {
+        type uint32;
+        description
+          "unique identifier for SRLG";
+      }
+      leaf SRLG-length {
+        type uint32;
+        description
+          "fiber length in meters";
+      }
+    }
+    leaf administrative-group {
+      type uint32;
+      description
+        "according to RFC 3630 definition";
+    }
+    leaf operational-state {
+      type org-openroadm-common-state-types:state;
+    }
+    leaf administrative-state {
+      type org-openroadm-equipment-states-types:admin-states;
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of a link. Whether it is planned, deployed, in maintenance, etc.";
+    }
+  }
+}
similarity index 80%
rename from ordmodels/network/src/main/yang/org-openroadm-degree@2017-09-29.yang
rename to ordmodels/network/src/main/yang/org-openroadm-degree@2018-11-30.yang
index b336718f1cecfc3781f39c7763a896c7e6e7a827..01420c5db1ea30afd8ef8f2ad48e8e42162ccd3d 100644 (file)
@@ -1,14 +1,15 @@
 module org-openroadm-degree {
+  yang-version 1.1;
   namespace "http://org/openroadm/degree";
   prefix dgr;
 
-  import org-openroadm-common-types {
-    prefix org-openroadm-common-types;
-    revision-date 2017-09-29;
+  import org-openroadm-common-link-types {
+    prefix org-openroadm-common-link-types;
+    revision-date 2018-11-30;
   }
   import org-openroadm-network-types {
     prefix org-openroadm-network-types;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
   }
 
   organization
@@ -20,7 +21,7 @@ module org-openroadm-degree {
 
 
      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -45,6 +46,26 @@ module org-openroadm-degree {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
   revision 2017-09-29 {
     description
       "Version 2.1";
@@ -66,11 +87,10 @@ module org-openroadm-degree {
     description
       "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
        index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
-      will hold list of used spectrums";
+       will hold list of used spectra";
     list used-wavelengths {
       key "index";
       uses org-openroadm-network-types:wavelengths;
-
     }
   }
 
@@ -87,23 +107,23 @@ module org-openroadm-degree {
     }
     list available-wavelengths {
       key "index";
-      uses org-openroadm-network-types:wavelengths;
-     description
+      description
         "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
-      index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
-      will hold list of available spectrums";
+         index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
+         will hold list of available spectra";
+      uses org-openroadm-network-types:wavelengths;
     }
     leaf ingress-span-loss-aging-margin {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
       description
         "Span-loss margin extracted from corresponding device OTS interface container, optional";
-      config true;
     }
     leaf eol-max-load-pIn {
-      type org-openroadm-common-types:power-dBm;
+      type org-openroadm-common-link-types:power-dBm;
+      config true;
       description
         "End Of Life Total input power at maximum load extracted from corresponding device OTS interface container";
-      config true;
     }
   }
 }
similarity index 73%
rename from ordmodels/network/src/main/yang/org-openroadm-external-pluggable@2017-09-29.yang
rename to ordmodels/network/src/main/yang/org-openroadm-external-pluggable@2018-11-30.yang
index 5f9b6d8e4ecfa28faca721ded1d5c1b9ffddd9ae..c14f9dd51329b36c98e8e08f991e668dced3affb 100644 (file)
@@ -1,10 +1,19 @@
 module org-openroadm-external-pluggable {
+  yang-version 1.1;
   namespace "http://org/openroadm/external/pluggable";
   prefix plg;
 
-  import org-openroadm-common-types {
-    prefix org-openroadm-common-types;
-    revision-date 2017-09-29;
+  import org-openroadm-common-equipment-types {
+    prefix org-openroadm-common-equipment-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-state-types {
+    prefix org-openroadm-common-state-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2018-11-30;
   }
 
   organization
@@ -16,7 +25,7 @@ module org-openroadm-external-pluggable {
 
 
      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -41,6 +50,26 @@ module org-openroadm-external-pluggable {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
   revision 2017-09-29 {
     description
       "Version 2.1";
@@ -85,19 +114,19 @@ module org-openroadm-external-pluggable {
   grouping pluggable-tp-attributes {
     leaf rate {
       type identityref {
-        base org-openroadm-common-types:och-rate-identity;
+        base org-openroadm-common-optical-channel-types:och-rate-identity;
       }
       description
         "rate";
     }
     leaf modulation-format {
-      type org-openroadm-common-types:modulation-format;
+      type org-openroadm-common-optical-channel-types:modulation-format;
     }
     leaf optic {
-      type org-openroadm-common-types:optic-types;
+      type org-openroadm-common-equipment-types:optic-types;
     }
     leaf state {
-      type org-openroadm-common-types:state;
+      type org-openroadm-common-state-types:state;
       description
         "A xponder can be in one of the following
                states";
similarity index 76%
rename from ordmodels/network/src/main/yang/org-openroadm-link@2017-09-29.yang
rename to ordmodels/network/src/main/yang/org-openroadm-link@2018-11-30.yang
index 04c9088a230f5349e92b89f658b8e0e2c24923be..97c2cc39956d835edbf4246dc9d09c81be44d046 100644 (file)
@@ -1,14 +1,23 @@
 module org-openroadm-link {
+  yang-version 1.1;
   namespace "http://org/openroadm/link";
   prefix link;
 
-  import org-openroadm-common-types {
-    prefix org-openroadm-common-types;
-    revision-date 2017-09-29;
+  import org-openroadm-equipment-states-types {
+    prefix org-openroadm-equipment-states-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-link-types {
+    prefix org-openroadm-common-link-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-node-types {
+    prefix org-openroadm-common-node-types;
+    revision-date 2018-11-30;
   }
   import org-openroadm-amplifier {
     prefix org-openroadm-amplifier;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
   }
 
   organization
@@ -20,7 +29,7 @@ module org-openroadm-link {
 
 
      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2017,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -45,6 +54,22 @@ module org-openroadm-link {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
   revision 2017-09-29 {
     description
       "Version 2.1";
@@ -61,12 +86,14 @@ module org-openroadm-link {
   grouping OMS-attributes {
     leaf TE-metric {
       type uint32;
+      status deprecated;
     }
   }
 
   grouping span-attributes {
-    leaf clfi  {
+    leaf clfi {
       type string;
+      status deprecated;
     }
     leaf auto-spanloss {
       type boolean;
@@ -75,19 +102,24 @@ module org-openroadm-link {
         "Flag to enable/disable automatic spanloss measurement";
     }
     leaf spanloss-base {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
       description
         "Baseline ROADM span loss measured and accepted during
-         degree turn-up.";
+         degree turn-up. May be re-set to current value after a fiber repair or change.";
     }
     leaf spanloss-current {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
       description
         "Current ROADM span loss measured and accepted during
-         degree turn-up.";
+         degree turn-up. Updated periodically if auto-spanloss is enabled.";
+    }
+    leaf spanloss-last-measured {
+      type org-openroadm-common-link-types:ratio-dB;
+      description
+        "Last measured ROADM span loss, may or may not have been accepted and pushed to the NE.";
     }
     leaf engineered-spanloss {
-      type org-openroadm-common-types:ratio-dB;
+      type org-openroadm-common-link-types:ratio-dB;
       description
         "ROADM span loss provided by an external system";
     }
@@ -148,7 +180,7 @@ module org-openroadm-link {
           "fiber length in meters";
       }
       leaf pmd {
-        type org-openroadm-common-types:fiber-pmd;
+        type org-openroadm-common-link-types:fiber-pmd;
         description
           "Total PMD";
       }
@@ -157,9 +189,9 @@ module org-openroadm-link {
 
   grouping amplified-link-attributes {
     list amplified-link {
+      key "section-elt-number";
       description
         "defines the spans and the amplifier blocks of the amplified lines";
-      key "section-elt-number";
       leaf section-elt-number {
         type uint16;
         description
@@ -171,15 +203,13 @@ module org-openroadm-link {
             container ila {
               uses org-openroadm-amplifier:amplifier-node-attributes;
               leaf node-id {
-                type org-openroadm-common-types:node-id-type;
+                type org-openroadm-common-node-types:node-id-type;
                 mandatory true;
                 description
                   "Node id corresponding to the amplifier ";
               }
               leaf administrative-state {
-                type org-openroadm-common-types:state;
-                description
-                  "according to RFC3630 definition";
+                type org-openroadm-equipment-states-types:admin-states;
               }
             }
           }
@@ -187,9 +217,7 @@ module org-openroadm-link {
             container span {
               uses link:span-attributes;
               leaf administrative-state {
-                type org-openroadm-common-types:state;
-                description
-                  "according to RFC3630 definition";
+                type org-openroadm-equipment-states-types:admin-states;
               }
             }
           }
diff --git a/ordmodels/network/src/main/yang/org-openroadm-network-topology-types@2018-11-30.yang b/ordmodels/network/src/main/yang/org-openroadm-network-topology-types@2018-11-30.yang
new file mode 100644 (file)
index 0000000..d8372b5
--- /dev/null
@@ -0,0 +1,144 @@
+module org-openroadm-network-topology-types {
+  yang-version 1.1;
+  namespace "http://org/openroadm/network/topology/types";
+  prefix org-openroadm-network-topology-types;
+
+  import ietf-network {
+    prefix nd;
+    revision-date 2018-02-26;
+  }
+  import ietf-network-topology {
+    prefix nwt;
+    revision-date 2018-02-26;
+  }
+  import org-openroadm-switching-pool-types {
+    prefix org-openroadm-switching-pool-types;
+    revision-date 2018-11-30;
+  }
+
+  organization
+    "OPEN ROADM MSA";
+  contact
+    "www.OpenROADM.org.";
+  description
+    "Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+
+  grouping xpdr-tp-bandwidth-sharing {
+    list tp-bandwidth-sharing {
+      key "tp-sharing-id";
+      leaf tp-sharing-id {
+        type uint16;
+      }
+      leaf-list tp-list {
+        type nwt:tp-id;
+      }
+      leaf shared-bandwidth {
+        type uint16;
+        units "Gbps";
+      }
+    }
+  }
+
+  grouping xpdr-odu-switching-pools {
+    list odu-switching-pools {
+      key "switching-pool-number";
+      leaf switching-pool-number {
+        type uint16;
+        description
+          "Unique identifier for this odu-switching-pool";
+      }
+      leaf switching-pool-type {
+        type org-openroadm-switching-pool-types:switching-pool-types;
+      }
+      list non-blocking-list {
+        key "nbl-number";
+        description
+          "List of ports in a non-blocking switch element";
+        leaf nbl-number {
+          type uint16;
+          description
+            "Identifier for this non-blocking-list. Unique within odu-switching-pool";
+        }
+        leaf interconnect-bandwidth-unit {
+          type uint32;
+          description
+            "Switch fabric interconnect bandwidth unit rate in bits per second.
+             Represents granularity of switch fabric";
+        }
+        leaf capable-interconnect-bandwidth {
+          type uint32;
+          description
+            "Total interconnect bandwidth for a non-blocking element expressed as
+             number of inter-connect-bandwidth units";
+        }
+        leaf available-interconnect-bandwidth {
+          type uint32;
+          description
+            "Total interconnect bandwidth available for a non-blocking element can use as
+             number of inter-connect-bandwidth units";
+        }
+        leaf-list tp-list {
+          type nwt:tp-id;
+          description
+            "Termination point. Unique within device";
+        }
+      }
+    }
+  }
+
+  grouping xpdr-otn-tail-attributes {
+    leaf tp-id {
+      type nwt:tp-id;
+    }
+    leaf network-ref {
+      type leafref {
+        path "/nd:networks/nd:network/nd:network-id";
+      }
+      description
+        "Used to reference a network, for example an underlay
+         network.";
+    }
+    leaf node-ref {
+      type leafref {
+        path "/nd:networks/nd:network[nd:network-id=current()/../network-ref]/nd:node/nd:node-id";
+      }
+      description
+        "Used to reference a node.
+         Nodes are identified relative to the network they are
+         contained in.";
+    }
+  }
+}
diff --git a/ordmodels/network/src/main/yang/org-openroadm-network-topology@2017-09-29.yang b/ordmodels/network/src/main/yang/org-openroadm-network-topology@2017-09-29.yang
deleted file mode 100644 (file)
index 817cdf1..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-module org-openroadm-network-topology {
-  namespace "http://org/openroadm/network/topology";
-  prefix topo;
-
-  import ietf-network {
-    prefix nd;
-    revision-date 2015-06-08;
-  }
-  import ietf-network-topology {
-    prefix nwt;
-    revision-date 2015-06-08;
-  }
-  import org-openroadm-network-types {
-    prefix org-openroadm-network-types;
-    revision-date 2017-09-29;
-  }
-  import org-openroadm-srg {
-    prefix srg;
-    revision-date 2017-09-29;
-  }
-  import org-openroadm-degree {
-    prefix dgr;
-    revision-date 2017-09-29;
-  }
-  import org-openroadm-xponder {
-    prefix xpdr;
-    revision-date 2017-09-29;
-  }
-  import org-openroadm-external-pluggable {
-    prefix plg;
-    revision-date 2017-09-29;
-  }
-  import org-openroadm-link {
-    prefix link;
-    revision-date 2017-09-29;
-  }
-  import org-openroadm-common-types {
-    prefix ct;
-    revision-date 2017-09-29;
-  }
-
-  organization
-    "OPEN ROADM MSA";
-  contact
-    "OpenROADM.org.";
-  description
-    "YANG definitions for network view of a ROADM
-
-     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
-
-     Redistribution and use in source and binary forms, with or without modification,
-     are permitted provided that the following conditions are met:
-
-     * Redistributions of source code must retain the above copyright notice, this
-       list of conditions and the following disclaimer.
-     * Redistributions in binary form must reproduce the above copyright notice,
-       this list of conditions and the following disclaimer in the documentation and/or
-       other materials provided with the distribution.
-     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
-       contributors may be used to endorse or promote products derived from this software
-       without specific prior written permission.
-
-     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
-     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
-     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
-     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-     POSSIBILITY OF SUCH DAMAGE.";
-
-  revision 2017-09-29 {
-    description
-      "Version 2.1";
-  }
-  revision 2017-07-28 {
-    description
-      "Version 2.0.1 - added revision-date to imports";
-  }
-  revision 2017-06-26 {
-    description
-      "Version 2.0";
-  }
-
-  augment "/nd:network/nd:network-types" {
-    description
-      "Introduce new network type for the Open ROADM optical
-       `     network topology";
-    container openroadm-topology {
-      presence "indicates optical network topology for Open ROADMs";
-    }
-  }
-  augment "/nd:network/nd:node" {
-    when "../nd:network-types/openroadm-topology";
-    description
-      "This augmentations adds the ROADM Node type to the generic node
-       definition and defines node-sepcific attributes for each node type
-       in the ROADM Topology.";
-    leaf node-type {
-      type org-openroadm-network-types:openroadm-node-type;
-      description
-        "The type of a node in the ROADM topology. Valid node types are 'SRG', 'DEGREE',
-         'TPDR', 'SWITCH', 'REGEN', 'REGEN-UNI', 'EXT-PLUGGABLE' and 'MUXPDR'";
-    }
-    container srg-attributes {
-      when "../node-type = 'SRG'";
-      uses srg:srg-node-attributes;
-      description
-        "Topology-related attributes for SRG nodes";
-    }
-    container degree-attributes {
-      when "../node-type = 'DEGREE'";
-      uses dgr:degree-node-attributes;
-      description
-        "Topology-related attributes for degree nodes";
-    }
-   container xpdr-attributes {
-      when "../node-type = 'TPDR' or ../node-type = 'MUXPDR' or ../node-type = 'REGEN' or
-         ../node-type = 'REGEN-UNI' or ../node-type = 'SWITCH'";
-      uses xpdr:xpdr-topo-node-attributes;
-      description
-        "Topology-related attributes for Xponder nodes";
-    }
-  }
-  augment "/nd:network/nd:node/nwt:termination-point" {
-    when "../../nd:network-types/openroadm-topology";
-    description
-      "Defines the type of a termination point in the ROADM topology and
-       TP-specific attributes for each termination point type.";
-    leaf tp-type {
-      type org-openroadm-network-types:openroadm-tp-type;
-      must "../../topo:node-type != 'DEGREE' or (../../topo:node-type = 'DEGREE'  and
-      (../topo:tp-type = 'DEGREE-TX-TTP' or ../topo:tp-type = 'DEGREE-RX-TTP' or  ../topo:tp-type = 'DEGREE-TXRX-TTP' or
-       ../topo:tp-type = 'DEGREE-TX-CTP' or ../topo:tp-type = 'DEGREE-RX-CTP' or ../topo:tp-type = 'DEGREE-TXRX-CTP'))" {
-        error-message "Invalid TP for node type 'DEGREE'";
-      }
-      must "../../topo:node-type != 'SRG' or (../../topo:node-type = 'SRG' and
-     (../topo:tp-type = 'SRG-TX-CP' or ../topo:tp-type = 'SRG-RX-CP' or ../topo:tp-type = 'SRG-TXRX-CP' or
-      ../topo:tp-type = 'SRG-RX-PP' or ../topo:tp-type = 'SRG-TX-PP' or ../topo:tp-type = 'SRG-TXRX-PP'))" {
-        error-message "Invalid TP for node type 'SRG'";
-      }
-      must " (../../topo:node-type != 'TPDR' and ../../topo:node-type != 'MUXPDR' and ../../topo:node-type != 'REGEN' and
-            ../../topo:node-type != 'REGEN-UNI' and ../../topo:node-type != 'SWITCH')
-     or ((../../topo:node-type = 'TPDR' or ../../topo:node-type = 'MUXPDR' or ../../topo:node-type = 'REGEN' or
-         ../../topo:node-type = 'REGEN-UNI' or ../../topo:node-type = 'SWITCH') and
-     (../topo:tp-type = 'XPONDER-NETWORK' or ../topo:tp-type = 'XPONDER-CLIENT' or ../topo:tp-type = 'XPONDER-PORT'))" {
-        error-message "Invalid TP for node type 'XPONDER'";
-      }
-      must "../../topo:node-type != 'EXT-PLUGGABLE' or (../../topo:node-type = 'EXT-PLUGGABLE' and ../topo:tp-type = 'EXT-PLUGGABLE-TP')" {
-        error-message "Invalid TP for node type 'EXT-PLUGGABLE'";
-      }
-      description
-        "The TP type; also defines which TP types can be instantiated
-         on which Node types";
-    }
-    container tx-ttp-attributes {
-      when "../tp-type = 'DEGREE-TX-TTP' or ../tp-type = 'DEGREE-TXRX-TTP'";
-      description
-        "There must be only one TP of type DEGREE-TX-TTP in any given
-         degree node";
-      uses dgr:degree-used-wavelengths;
-    }
-    container rx-ttp-attributes {
-      when "../tp-type = 'DEGREE-RX-TTP'";
-      description
-        "There must be only one TP of type DEGREE-RX-TTP in any given
-         degree node";
-      uses dgr:degree-used-wavelengths;
-    }
-    container ctp-attributes {
-      when "../tp-type = 'DEGREE-TX-CTP' or ../tp-type = 'DEGREE-RX-CTP' or ../tp-type = 'DEGREE-TXRX-CTP'";
-       uses dgr:degree-used-wavelengths;
-    }
-    container cp-attributes {
-      when "../tp-type = 'SRG-TX-CP' or ../tp-type = 'SRG-RX-CP' or ../tp-type = 'SRG-TXRX-CP'";
-      list used-wavelengths {
-        key "index";
-        uses org-openroadm-network-types:wavelengths;
-      }
-     description
-        "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
-        index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
-       will hold list of used spectrums";
-    }
-    container pp-attributes {
-      when "../tp-type = 'SRG-TXRX-PP' or ../tp-type = 'SRG-TX-PP' or ../tp-type = 'SRG-RX-PP' ";
-      list used-wavelength {
-        key "index";
-        uses org-openroadm-network-types:wavelengths;
-      }
-     description
-        "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
-        index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
-       will hold list of used spectrums";
-    }
-   leaf eqpt-srg-id {
-       when "../tp-type = 'XPONDER-CLIENT' or ../tp-type = 'XPONDER-NETWORK' or ../tp-type = 'EXT-PLUGGABLE-TP' or
-            ../tp-type = 'XPONDER-PORT'";
-        description
-          "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
-        type uint32;
-    }
-    container xpdr-client-attributes {
-      when "../tp-type = 'XPONDER-CLIENT'";
-      uses xpdr:xpdr-connection-attributes;
-      uses xpdr:xpdr-port-connection-attributes;
-    }
-    container xpdr-network-attributes {
-      when "../tp-type = 'XPONDER-NETWORK'";
-      uses xpdr:xpdr-connection-attributes;
-      uses xpdr:xpdr-port-connection-attributes;
-    }
-    container xpdr-port-attributes {
-      when "../tp-type = 'XPONDER-PORT'";
-      uses xpdr:xpdr-connection-attributes;
-      uses xpdr:xpdr-port-connection-attributes;
-    }
-    container ext-pluggable-attributes {
-      when "../tp-type = 'EXT-PLUGGABLE-TP'";
-      uses plg:pluggable-tp-attributes;
-    }
-  }
-  augment "/nd:network/nwt:link" {
-    when "../nd:network-types/openroadm-topology";
-    description
-      "This augmentation defines ROADM link types in the ROADM topology";
-    leaf link-type {
-      type org-openroadm-network-types:openroadm-link-type;
-    }
-    leaf link-length {
-      type decimal64 {
-        fraction-digits 2;
-      }
-    }
-    leaf administrative-group {
-      type uint32;
-      description
-        "according to RFC 3630 definition";
-    }
-    leaf operational-state {
-      type ct:state;
-      description
-        "according to RFC 3630 definition";
-    }
-    leaf administrative-state {
-      type ct:state;
-      description
-        "according to RFC 3630 definition";
-    }
-    leaf link-latency {
-      type uint32;
-      description
-        "Latency of a link";
-    }
-    leaf amplified {
-      when "../link-type = 'ROADM-TO-ROADM'";
-      type boolean;
-      description
-        "defines whether an ROADM-TO-ROADM Link includes line amplifiers or not";
-    }
-    container OMS-attributes {
-      when "../link-type = 'ROADM-TO-ROADM'";
-      description
-        "";
-      uses link:OMS-attributes;
-      leaf opposite-link {
-        type leafref {
-          path "../../../nwt:link/nwt:link-id";
-        }
-        description
-          "optional - pointer to reverse link in case of bidirectional link";
-      }
-      container span {
-        when "../../amplified = 'false'";
-        description
-          "";
-        uses link:span-attributes;
-      }
-      container amplified-link {
-        when "../../amplified = 'true'";
-        description
-          "when amplified is set to true, rather than a simple OMS section
-           we have an amplified link";
-        uses link:amplified-link-attributes;
-      }
-    }
-  }
-}
diff --git a/ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang b/ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
new file mode 100644 (file)
index 0000000..9928281
--- /dev/null
@@ -0,0 +1,414 @@
+module org-openroadm-network-topology {
+  yang-version 1.1;
+  namespace "http://org/openroadm/network/topology";
+  prefix topo;
+
+  import ietf-network {
+    prefix nd;
+    revision-date 2018-02-26;
+  }
+  import ietf-network-topology {
+    prefix nwt;
+    revision-date 2018-02-26;
+  }
+  import org-openroadm-network-types {
+    prefix org-openroadm-network-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-srg {
+    prefix srg;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-degree {
+    prefix dgr;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-xponder {
+    prefix xpdr;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-external-pluggable {
+    prefix plg;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-link {
+    prefix link;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-state-types {
+    prefix org-openroadm-common-state-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-network {
+    prefix cnet;
+    revision-date 2018-11-30;
+  }
+
+  organization
+    "OPEN ROADM MSA";
+  contact
+    "OpenROADM.org.";
+  description
+    "YANG definitions for network view of a ROADM
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "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
+       `     network topology";
+    container openroadm-topology {
+      presence "indicates optical network topology for Open ROADMs";
+    }
+  }
+  augment "/nd:networks/nd:network/nd:node" {
+    when "../nd:network-types/cnet:openroadm-common-network/openroadm-topology";
+    description
+      "This augmentations adds the ROADM Node type to the generic node
+       definition and defines node-specific attributes for each node type
+       in the ROADM Topology.";
+    leaf node-type {
+      type org-openroadm-network-types:openroadm-node-type;
+      must
+        "(../node-type = 'DEGREE' or ../node-type = 'SRG' or ../node-type = 'TPDR' or ../node-type = 'SWITCH' or
+          ../node-type = 'REGEN' or ../node-type = 'REGEN-UNI' or ../node-type = 'EXT-PLUGGABLE' or
+          ../node-type = 'MUXPDR')" {
+        error-message "Invalid node type for openroadm-topology";
+      }
+      status deprecated;
+      description
+        "The type of a node in the ROADM topology. Valid node types are 'SRG', 'DEGREE',
+         'TPDR', 'SWITCH', 'REGEN', 'REGEN-UNI', 'EXT-PLUGGABLE' and 'MUXPDR'";
+    }
+    container srg-attributes {
+      when "../cnet:node-type = 'SRG'";
+      description
+        "Topology-related attributes for SRG nodes";
+      uses srg:srg-node-attributes;
+    }
+    container degree-attributes {
+      when "../cnet:node-type = 'DEGREE'";
+      description
+        "Topology-related attributes for degree nodes";
+      uses dgr:degree-node-attributes;
+    }
+    container xpdr-attributes {
+      when
+        "../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'";
+      description
+        "Topology-related attributes for Xponder nodes";
+      uses xpdr:xpdr-topo-node-attributes;
+    }
+  }
+  augment "/nd:networks/nd:network/nd:node/nwt:termination-point" {
+    when "../../nd:network-types/cnet:openroadm-common-network/openroadm-topology";
+    description
+      "Defines the type of a termination point in the ROADM topology and
+       TP-specific attributes for each termination point type.";
+    leaf tp-type {
+      type org-openroadm-network-types:openroadm-tp-type;
+      must
+        "../../topo:node-type != 'DEGREE' or (../../topo:node-type = 'DEGREE'  and
+         (../topo:tp-type = 'DEGREE-TX-TTP' or ../topo:tp-type = 'DEGREE-RX-TTP' or  ../topo:tp-type = 'DEGREE-TXRX-TTP' or
+         ../topo:tp-type = 'DEGREE-TX-CTP' or ../topo:tp-type = 'DEGREE-RX-CTP' or ../topo:tp-type = 'DEGREE-TXRX-CTP'))" {
+        error-message "Invalid TP for node type 'DEGREE'";
+      }
+      must
+        "../../topo:node-type != 'SRG' or (../../topo:node-type = 'SRG' and
+         (../topo:tp-type = 'SRG-TX-CP' or ../topo:tp-type = 'SRG-RX-CP' or ../topo:tp-type = 'SRG-TXRX-CP' or
+         ../topo:tp-type = 'SRG-RX-PP' or ../topo:tp-type = 'SRG-TX-PP' or ../topo:tp-type = 'SRG-TXRX-PP'))" {
+        error-message "Invalid TP for node type 'SRG'";
+      }
+      must
+        " (../../topo:node-type != 'TPDR' and ../../topo:node-type != 'MUXPDR' and ../../topo:node-type != 'REGEN' and
+         ../../topo:node-type != 'REGEN-UNI' and ../../topo:node-type != 'SWITCH')
+         or ((../../topo:node-type = 'TPDR' or ../../topo:node-type = 'MUXPDR' or ../../topo:node-type = 'REGEN' or
+         ../../topo:node-type = 'REGEN-UNI' or ../../topo:node-type = 'SWITCH') and
+         (../topo:tp-type = 'XPONDER-NETWORK' or ../topo:tp-type = 'XPONDER-CLIENT' or ../topo:tp-type = 'XPONDER-PORT'))" {
+        error-message "Invalid TP for node type 'XPONDER'";
+      }
+      must "../../topo:node-type != 'EXT-PLUGGABLE' or (../../topo:node-type = 'EXT-PLUGGABLE' and ../topo:tp-type = 'EXT-PLUGGABLE-TP')" {
+        error-message "Invalid TP for node type 'EXT-PLUGGABLE'";
+      }
+      status deprecated;
+      description
+        "The TP type; also defines which TP types can be instantiated
+         on which Node types";
+    }
+    container tx-ttp-attributes {
+      when "../cnet:tp-type = 'DEGREE-TX-TTP' or ../cnet:tp-type = 'DEGREE-TXRX-TTP'";
+      description
+        "There must be only one TP of type DEGREE-TX-TTP in any given
+         degree node";
+      uses dgr:degree-used-wavelengths;
+    }
+    container rx-ttp-attributes {
+      when "../cnet:tp-type = 'DEGREE-RX-TTP'";
+      description
+        "There must be only one TP of type DEGREE-RX-TTP in any given
+         degree node";
+      uses dgr:degree-used-wavelengths;
+    }
+    container ctp-attributes {
+      when "../cnet:tp-type = 'DEGREE-TX-CTP' or ../cnet:tp-type = 'DEGREE-RX-CTP' or ../cnet:tp-type = 'DEGREE-TXRX-CTP'";
+      uses dgr:degree-used-wavelengths;
+    }
+    container cp-attributes {
+      when "../cnet:tp-type = 'SRG-TX-CP' or ../cnet:tp-type = 'SRG-RX-CP' or ../cnet:tp-type = 'SRG-TXRX-CP'";
+      description
+        "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
+         index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
+         will hold list of used spectra";
+      list used-wavelengths {
+        key "index";
+        uses org-openroadm-network-types:wavelengths;
+      }
+    }
+    container pp-attributes {
+      when "../cnet:tp-type = 'SRG-TXRX-PP' or ../cnet:tp-type = 'SRG-TX-PP' or ../cnet:tp-type = 'SRG-RX-PP' ";
+      description
+        "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
+         index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
+         will hold list of used spectra";
+      list used-wavelength {
+        key "index";
+        uses org-openroadm-network-types:wavelengths;
+      }
+    }
+    leaf eqpt-srg-id {
+      when
+        "../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'EXT-PLUGGABLE-TP' or
+         ../cnet:tp-type = 'XPONDER-PORT'";
+      type uint32;
+      status deprecated;
+      description
+        "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
+    }
+    container xpdr-client-attributes {
+      when "../../topo:node-type = 'TPDR' and ../cnet:tp-type = 'XPONDER-CLIENT'";
+      description
+        "Topology layer will allow client TPs only for Transponder nodes";
+      uses xpdr:xpdr-connection-attributes;
+      uses xpdr:xpdr-port-connection-attributes;
+    }
+    container xpdr-network-attributes {
+      when "../cnet:tp-type = 'XPONDER-NETWORK'";
+      uses xpdr:xpdr-connection-attributes;
+      uses xpdr:xpdr-port-connection-attributes;
+    }
+    container xpdr-port-attributes {
+      when "../cnet:tp-type = 'XPONDER-PORT'";
+      uses xpdr:xpdr-connection-attributes;
+      uses xpdr:xpdr-port-connection-attributes;
+    }
+    container ext-pluggable-attributes {
+      when "../cnet:tp-type = 'EXT-PLUGGABLE-TP'";
+      uses plg:pluggable-tp-attributes;
+    }
+  }
+  augment "/nd:networks/nd:network/nwt:link" {
+    when "../nd:network-types/cnet:openroadm-common-network/openroadm-topology";
+    description
+      "This augmentation defines ROADM link types in the ROADM topology";
+    leaf link-type {
+      type org-openroadm-network-types:openroadm-link-type;
+      must
+        "(../link-type = 'ROADM-TO-ROADM' or ../link-type = 'ADD-LINK' or ../link-type = 'DROP-LINK' or
+          ../link-type = 'EXPRESS-LINK' or ../link-type = 'XPONDER-INPUT' or ../link-type = 'XPONDER-OUTPUT')" {
+        error-message "Invalid link type for openroadm-topology";
+      }
+      status deprecated;
+    }
+    leaf link-length {
+      type decimal64 {
+        fraction-digits 2;
+      }
+      status deprecated;
+    }
+    leaf administrative-group {
+      type uint32;
+      status deprecated;
+      description
+        "according to RFC 3630 definition";
+    }
+    leaf operational-state {
+      type org-openroadm-common-state-types:state;
+      status deprecated;
+    }
+    leaf administrative-state {
+      type org-openroadm-common-state-types:state;
+      status deprecated;
+    }
+    leaf link-latency {
+      type uint32;
+      status deprecated;
+      description
+        "Latency of a link";
+    }
+    leaf amplified {
+      when "../cnet:link-type = 'ROADM-TO-ROADM'";
+      type boolean;
+      description
+        "defines whether an ROADM-TO-ROADM Link includes line amplifiers or not";
+    }
+    leaf TE-metric {
+      type uint32;
+      status deprecated;
+      description
+        "defines a Traffic Engineering metric which could be used for any type of link.
+         Supersedes TE-metric originally defined in OMS-attributes grouping";
+    }
+    leaf opposite-link {
+      type leafref {
+        path "../../nwt:link/nwt:link-id";
+      }
+      status deprecated;
+      description
+        "optional - pointer to reverse link in case of bidirectional link. Supersedes opposite-link
+         originally defined in OMS-attributes container, to apply to any kind of link in the topology";
+    }
+    container OMS-attributes {
+      when "../cnet:link-type = 'ROADM-TO-ROADM'";
+      description
+        "";
+      uses link:OMS-attributes;
+      leaf opposite-link {
+        type leafref {
+          path "../../../nwt:link/nwt:link-id";
+        }
+        status deprecated;
+        description
+          "optional - pointer to reverse link in case of bidirectional link";
+      }
+      container span {
+        when "../../amplified = 'false'";
+        description
+          "";
+        uses link:span-attributes;
+      }
+      container amplified-link {
+        when "../../amplified = 'true'";
+        description
+          "when amplified is set to true, rather than a simple OMS section
+           we have an amplified link";
+        uses link:amplified-link-attributes;
+      }
+    }
+  }
+}
similarity index 66%
rename from ordmodels/network/src/main/yang/org-openroadm-network-types@2017-09-29.yang
rename to ordmodels/network/src/main/yang/org-openroadm-network-types@2018-11-30.yang
index bfc6da9c4ed1a497ffa217d8330268f7f44b3c4d..a246e9a3dcaadcf2d64295500eb8031f6733f82c 100644 (file)
@@ -1,22 +1,19 @@
 module org-openroadm-network-types {
+  yang-version 1.1;
   namespace "http://org/openroadm/network/types";
   prefix nt;
 
-  import ietf-network-topology {
-    prefix nwt;
-    revision-date 2015-06-08;
-  }
   import ietf-yang-types {
     prefix yang;
     revision-date 2013-07-15;
   }
-  import org-openroadm-common-types {
-    prefix org-openroadm-common-types;
-    revision-date 2017-09-29;
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2018-11-30;
   }
   import org-openroadm-port-types {
     prefix org-openroadm-port-types;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
   }
 
   organization
@@ -25,7 +22,7 @@ module org-openroadm-network-types {
     "www.OpenROADM.org.";
   description
     "Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -50,6 +47,26 @@ module org-openroadm-network-types {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
   revision 2017-09-29 {
     description
       "Version 2.1";
@@ -191,15 +208,18 @@ module org-openroadm-network-types {
     }
   }
 
-  typedef openroadm-node-mount-status {
-     type enumeration {
-         enum "MOUNTED" {
-           value 1;
-         }
-         enum "UNMOUNTED" {
-           value 2;
-         }
+  typedef openroadm-node-connection-status {
+    type enumeration {
+      enum "CONNECTED" {
+        value 1;
       }
+      enum "CONNECTING" {
+        value 2;
+      }
+      enum "UNABLE-TO-CONNECT" {
+        value 3;
+      }
+    }
   }
 
   grouping wavelengths {
@@ -211,16 +231,16 @@ module org-openroadm-network-types {
 
   grouping flex-wave {
     leaf frequency {
-      type org-openroadm-common-types:frequency-THz;
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      config true;
       description
         "Center Frequency in THz";
-      config true;
     }
     leaf width {
-      type org-openroadm-common-types:frequency-GHz;
+      type org-openroadm-common-optical-channel-types:frequency-GHz;
+      config true;
       description
         "Frequency width in GHz.";
-      config true;
     }
   }
 
@@ -230,85 +250,11 @@ module org-openroadm-network-types {
       description
         "Supported interface capability on the port.";
       leaf if-cap-type {
-      description
-        "Interface type/hierarchy/rate supported on this port";
         type identityref {
-           base org-openroadm-port-types:supported-if-capability;
+          base org-openroadm-port-types:supported-if-capability;
         }
-      }
-    }
-  }
-
-  grouping xpdr-tp-bandwidth-sharing {
-    list tp-bandwidth-sharing {
-      key "tp-sharing-id";
-      leaf tp-sharing-id {
-        type uint16;
-      }
-      leaf-list tp-list {
-        type nwt:tp-id;
-      }
-      leaf shared-bandwidth {
-        type uint16;
-        units "Gbps";
-      }
-    }
-  }
-
-  grouping xpdr-odu-switching-pools {
-    list odu-switching-pools {
-      key "switching-pool-number";
-      leaf switching-pool-number {
-      description
-        "Unique identifier for this odu-switching-pool";
-        type uint16;
-      }
-      leaf switching-pool-type {
-         type enumeration {
-           enum "non-blocking" {
-            value 1;
-            description
-              "Single non-blocking element";
-           }
-           enum "blocking" {
-            value 2;
-            description
-              "Multiple connected non-blocking lists";
-          }
-        }
-      }
-      list non-blocking-list {
-        description
-          "List of ports in a non-blocking switch element";
-        key "nbl-number";
-        leaf nbl-number {
-        description
-          "Identifier for this non-blocking-list. Unique within odu-switching-pool";
-          type uint16;
-        }
-        leaf interconnect-bandwidth-unit {
         description
-          "Switch fabric interconnect bandwidth unit rate in bits per second.
-          Represents granularity of switch fabric";
-          type uint32;
-        }
-        leaf capable-interconnect-bandwidth {
-        description
-          "Total interconnect bandwidth for a non-blocking element expressed as
-          number of inter-connect-bandwidth units";
-          type uint32;
-        }
-        leaf available-interconnect-bandwidth {
-        description
-          "Total interconnect bandwidth available for a non-blocking element can use as
-          number of inter-connect-bandwidth units";
-          type uint32;
-        }
-        leaf-list tp-list {
-            description
-                "Termination point. Unique within device";
-            type nwt:tp-id;
-        }
+          "Interface type/hierarchy/rate supported on this port";
       }
     }
   }
similarity index 67%
rename from ordmodels/network/src/main/yang/org-openroadm-network@2017-09-29.yang
rename to ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
index cb949867582bee1e3b826a5cce8bb3d684fe8f55..a236b8819873321dc0427d114a6d05956551e801 100644 (file)
@@ -1,31 +1,40 @@
 module org-openroadm-network {
+  yang-version 1.1;
   namespace "http://org/openroadm/network";
   prefix net;
 
   import ietf-network {
     prefix nd;
-    revision-date 2015-06-08;
+    revision-date 2018-02-26;
   }
   import org-openroadm-network-types {
     prefix nt;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
   }
   import org-openroadm-roadm {
     prefix roadm;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
   }
   import org-openroadm-external-pluggable {
     prefix plg;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
   }
   import org-openroadm-xponder {
     prefix xpdr;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
   }
   import ietf-inet-types {
     prefix inet;
     revision-date 2013-07-15;
   }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-network {
+    prefix cnet;
+    revision-date 2018-11-30;
+  }
 
   organization
     "OPEN ROADM MSA";
@@ -33,7 +42,7 @@ module org-openroadm-network {
     "www.OpenROADM.org.";
   description
     "Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -58,6 +67,26 @@ module org-openroadm-network {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
   revision 2017-09-29 {
     description
       "Version 2.1";
@@ -75,7 +104,19 @@ module org-openroadm-network {
       "Version 1.2";
   }
 
-  augment "/nd:network/nd:network-types" {
+  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";
     container openroadm-network {
@@ -85,29 +126,28 @@ module org-openroadm-network {
          network";
     }
   }
-  augment "/nd:network/nd:node" {
-    when "../nd:network-types/openroadm-network";
+  augment "/nd:networks/nd:network/nd:node" {
+    when "../nd:network-types/cnet:openroadm-common-network/openroadm-network";
     description
       "Augment the generic network node with Open ROADM attributes.";
     leaf node-type {
       type nt:openroadm-node-type;
+      must "(../node-type = 'ROADM' or ../node-type = 'XPONDER' or ../node-type = 'EXT-PLUGGABLE')" {
+        error-message "Invalid node type for openroadm-network";
+      }
+      status deprecated;
       description
         "A component of the network topology.
          Valid node types are XPONDER, EXT-PLUGGABLE and ROADM.
          Once the node-type is configured, it should not be modified.";
     }
-    leaf node-mount-status {
-      type nt:openroadm-node-mount-status;
-      description
-        "Mount status of a node";
-    }
     leaf software-version {
       type string;
       description
         "Vendor software version";
     }
     leaf openroadm-version {
-      type string;
+      type org-openroadm-common-types:openroadm-version-type;
       description
         "OpenROADM software version";
     }
@@ -141,26 +181,30 @@ module org-openroadm-network {
     }
     leaf node-status {
       type nt:openroadm-node-status;
+      status deprecated;
+    }
+    leaf node-connection-status {
+      type nt:openroadm-node-connection-status;
     }
     container roadm-attributes {
-      when "../node-type = 'ROADM'";
+      when "../cnet:node-type = 'ROADM'";
       description
         "Attributes for the ROADM Node.";
       uses roadm:roadm-node-attributes;
     }
     container xpdr-attributes {
-      when "../node-type = 'XPONDER'";
+      when "../cnet:node-type = 'XPONDER'";
       uses xpdr:xpdr-node-attributes;
     }
     container pluggable-attributes {
-      when "../node-type = 'EXT-PLUGGABLE'";
+      when "../cnet:node-type = 'EXT-PLUGGABLE'";
       uses plg:pluggable-node-attributes;
     }
     container plan-due-dates {
       uses nt:node-due-date-list;
     }
     container node-maintenance-schedule {
-       uses nt:node-due-date-list;
+      uses nt:node-due-date-list;
     }
   }
 }
diff --git a/ordmodels/network/src/main/yang/org-openroadm-opposite-links@2017-09-29.yang b/ordmodels/network/src/main/yang/org-openroadm-opposite-links@2017-09-29.yang
deleted file mode 100644 (file)
index 6764177..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-module org-openroadm-opposite-links {
-  namespace "http://org/openroadm/opposite/links";
-  prefix opp-links;
-
-  import ietf-network {
-    prefix nd;
-    revision-date 2015-06-08;
-  }
-  import ietf-network-topology {
-    prefix nwt;
-    revision-date 2015-06-08;
-  }
-
-  revision 2017-09-29 {
-    description
-      "Version 2.1";
-  }
-
-  augment "/nd:network/nwt:link" {
-    when "../nd:network-types/openroadm-topology";
-    description
-      "Introduce new field opposite-links";
-    leaf opposite-link {
-        type leafref {
-          path "../../nwt:link/nwt:link-id";
-        }
-        description
-          "optional - pointer to reverse link in case of bidirectional link";
-    }
-  }
-}
diff --git a/ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2017-09-29.yang b/ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2017-09-29.yang
deleted file mode 100644 (file)
index 2b89051..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-module org-openroadm-otn-network-topology {
-  namespace "http://org/openroadm/otn/network/topology";
-  prefix otn-topo;
-
-  import ietf-network {
-    prefix nd;
-    revision-date 2015-06-08;
-  }
-  import ietf-network-topology {
-    prefix nwt;
-    revision-date 2015-06-08;
-  }
-  import org-openroadm-network-types {
-    prefix org-openroadm-network-types;
-    revision-date 2017-09-29;
-  }
-  import org-openroadm-xponder {
-    prefix xpdr;
-    revision-date 2017-09-29;
-  }
-  import org-openroadm-common-types {
-    prefix ct;
-    revision-date 2017-09-29;
-  }
-
-  organization
-    "OPEN ROADM MSA";
-  contact
-    "OpenROADM.org.";
-  description
-    "YANG definitions for network view of a ROADM
-
-     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
-
-     Redistribution and use in source and binary forms, with or without modification,
-     are permitted provided that the following conditions are met:
-
-     * Redistributions of source code must retain the above copyright notice, this
-       list of conditions and the following disclaimer.
-     * Redistributions in binary form must reproduce the above copyright notice,
-       this list of conditions and the following disclaimer in the documentation and/or
-       other materials provided with the distribution.
-     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
-       contributors may be used to endorse or promote products derived from this software
-       without specific prior written permission.
-
-     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
-     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
-     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
-     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-     POSSIBILITY OF SUCH DAMAGE.";
-
-  revision 2017-09-29 {
-    description
-      "Version 2.1";
-  }
-
-  augment "/nd:network/nd:network-types" {
-    description
-      "Introduce new network type for the Open ROADM OTN
-       `     network topology";
-    container otn-topology {
-      presence "indicates OTN topology for Muxponder, Switchponder and OTN-switch";
-    }
-  }
-  augment "/nd:network/nd:node" {
-    when "../nd:network-types/otn-topology";
-    description
-      "This augmentations adds the OTN Node type to the generic node
-       definition and defines node-sepcific attributes for each node type
-       in the OTN Topology.";
-    leaf node-type {
-      type org-openroadm-network-types:openroadm-node-type;
-      description
-        "The type of a node in the OTN topology. Valid node types are 'MUXPDR' and 'SWITCH'";
-    }
-   container tp-bandwidth-sharing {
-      when "../node-type = 'MUXPDR' or ../node-type = 'SWITCH'";
-      uses org-openroadm-network-types:xpdr-tp-bandwidth-sharing;
-    }
-    container switching-pools {
-      when "../node-type = 'MUXPDR' or ../node-type = 'SWITCH'";
-      uses org-openroadm-network-types:xpdr-odu-switching-pools;
-      description
-        "ODU Switching pool";
-    }
-   container xpdr-attributes {
-      when "../node-type = 'MUXPDR' or ../node-type = 'SWITCH'";
-      uses xpdr:xpdr-topo-node-attributes;
-      description
-        "Topology-related attributes for Xponder nodes";
-    }
-  }
-  augment "/nd:network/nd:node/nwt:termination-point" {
-    when "../../nd:network-types/otn-topology";
-    description
-      "Defines the type of a termination point in the OTN topology and
-       TP-specific attributes for each termination point type.";
-    leaf tp-type {
-      type org-openroadm-network-types:openroadm-tp-type;
-      must "(../../otn-topo:node-type != 'MUXPDR' and ../../otn-topo:node-type != 'SWITCH') or
-     ((../../otn-topo:node-type = 'MUXPDR' or ../../otn-topo:node-type = 'SWITCH') and
-     (../otn-topo:tp-type = 'XPONDER-NETWORK' or ../otn-topo:tp-type = 'XPONDER-CLIENT' or ../otn-topo:tp-type = 'XPONDER-PORT'))" {
-        error-message "Invalid TP for node type Xponder";
-      }
-      description
-        "The TP type; also defines which TP types can be instantiated
-         on which Node types";
-    }
-    leaf eqpt-srg-id {
-        description
-          "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
-        type uint32;
-    }
-    container tp-supported-interfaces {
-      when "../tp-type = 'XPONDER-NETWORK' or ../tp-type = 'XPONDER-CLIENT' or ../tp-type = 'XPONDER-PORT'";
-      uses org-openroadm-network-types:xpdr-tp-supported-interfaces;
-      description
-        "Supported interface capability on the port.";
-    }
-    container xpdr-tp-port-connection-attributes {
-      when "../tp-type = 'XPONDER-NETWORK' or ../tp-type = 'XPONDER-CLIENT' or ../tp-type = 'XPONDER-PORT'";
-      description
-        "Topology-related attributes for Xpdr nodes";
-      uses xpdr:xpdr-otn-tp-attributes;
-      uses xpdr:xpdr-port-connection-attributes;
-      uses xpdr:xpdr-otn-tail-attributes;
-    }
-  }
-  augment "/nd:network/nwt:link" {
-    when "../nd:network-types/otn-topology";
-    description
-      "This augmentation defines Logical link types in the OTN topology connecting OTN elements";
-    leaf link-type {
-      type org-openroadm-network-types:openroadm-link-type;
-    }
-    leaf administrative-group {
-      type uint32;
-      description
-        "according to RFC 3630 definition";
-    }
-    leaf operational-state {
-      type ct:state;
-      description
-        "according to RFC 3630 definition";
-    }
-    leaf administrative-state {
-      type ct:state;
-      description
-        "according to RFC 3630 definition";
-    }
-    leaf available-bandwidth {
-      type uint32;
-      description
-        "Availabled bandwidth between OTN elements";
-    }
-    leaf used-bandwidth {
-      type uint32;
-      description
-        "Used bandwidth between OTN elements";
-    }
-    leaf ODU-protected {
-      type boolean;
-      description
-        "ODU protection flag";
-    }
-   }
-}
diff --git a/ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang b/ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
new file mode 100644 (file)
index 0000000..756f4df
--- /dev/null
@@ -0,0 +1,256 @@
+module org-openroadm-otn-network-topology {
+  yang-version 1.1;
+  namespace "http://org/openroadm/otn/network/topology";
+  prefix otn-topo;
+
+  import ietf-network {
+    prefix nd;
+    revision-date 2018-02-26;
+  }
+  import ietf-network-topology {
+    prefix nwt;
+    revision-date 2018-02-26;
+  }
+  import org-openroadm-network-types {
+    prefix org-openroadm-network-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-network-topology-types {
+    prefix org-openroadm-network-topology-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-xponder {
+    prefix xpdr;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-state-types {
+    prefix org-openroadm-common-state-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-network {
+    prefix cnet;
+    revision-date 2018-11-30;
+  }
+
+  organization
+    "OPEN ROADM MSA";
+  contact
+    "OpenROADM.org.";
+  description
+    "YANG definitions for network view of a ROADM
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "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";
+    container otn-topology {
+      presence "indicates OTN topology for Transponder, Muxponder, Switchponder and OTN-switch";
+    }
+  }
+  augment "/nd:networks/nd:network/nd:node" {
+    when "../nd:network-types/cnet:openroadm-common-network/otn-topology";
+    description
+      "This augmentations adds the OTN Node type to the generic node
+       definition and defines node-specific attributes for each node type
+       in the OTN Topology.";
+    leaf node-type {
+      type org-openroadm-network-types:openroadm-node-type;
+      must
+        "(../node-type = 'SWITCH' or ../node-type = 'MUXPDR' or ../node-type = 'TPDR' or
+         ../node-type = 'REGEN' or ../node-type = 'REGEN-UNI')" {
+        error-message "Invalid node type for otn-topology";
+      }
+      status deprecated;
+      description
+        "The type of a node in the OTN topology. Valid node types are 'MUXPDR', 'TPDR' and 'SWITCH'";
+    }
+    container tp-bandwidth-sharing {
+      when "../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'SWITCH' or ../cnet:node-type = 'TPDR'";
+      uses org-openroadm-network-topology-types:xpdr-tp-bandwidth-sharing;
+    }
+    container switching-pools {
+      when "../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'SWITCH' or ../cnet:node-type = 'TPDR'";
+      description
+        "ODU Switching pool";
+      uses org-openroadm-network-topology-types:xpdr-odu-switching-pools;
+    }
+    container xpdr-attributes {
+      when
+        "../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'";
+      description
+        "Topology-related attributes for Xponder nodes";
+      uses xpdr:xpdr-topo-node-attributes;
+    }
+  }
+  augment "/nd:networks/nd:network/nd:node/nwt:termination-point" {
+    when "../../nd:network-types/cnet:openroadm-common-network/otn-topology";
+    description
+      "Defines the type of a termination point in the OTN topology and
+       TP-specific attributes for each termination point type.";
+    leaf tp-type {
+      type org-openroadm-network-types:openroadm-tp-type;
+      must
+        "(../../otn-topo:node-type != 'MUXPDR' and ../../otn-topo:node-type != 'SWITCH' and ../../otn-topo:node-type != 'TPDR'
+         and ../../otn-topo:node-type != 'REGEN' and ../../otn-topo:node-type != 'REGEN-UNI') or
+         ((../../otn-topo:node-type = 'MUXPDR' or ../../otn-topo:node-type = 'SWITCH' or ../../otn-topo:node-type = 'TPDR'
+         or ../../otn-topo:node-type = 'REGEN' or ../../otn-topo:node-type = 'REGEN-UNI') and
+         (../otn-topo:tp-type = 'XPONDER-NETWORK' or ../otn-topo:tp-type = 'XPONDER-CLIENT' or ../otn-topo:tp-type = 'XPONDER-PORT'))" {
+        error-message "Invalid TP for node type Xponder";
+      }
+      status deprecated;
+      description
+        "The TP type; also defines which TP types can be instantiated
+         on which Node types";
+    }
+    leaf eqpt-srg-id {
+      type uint32;
+      status deprecated;
+      description
+        "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
+    }
+    container tp-supported-interfaces {
+      when "../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'";
+      description
+        "Supported interface capability on the port.";
+      uses org-openroadm-network-types:xpdr-tp-supported-interfaces;
+    }
+    container xpdr-tp-port-connection-attributes {
+      when "../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'";
+      description
+        "Topology-related attributes for Xpdr nodes";
+      uses xpdr:xpdr-otn-tp-attributes;
+      uses xpdr:xpdr-port-connection-attributes;
+      uses org-openroadm-network-topology-types:xpdr-otn-tail-attributes;
+    }
+  }
+  augment "/nd:networks/nd:network/nwt:link" {
+    when "../nd:network-types/cnet:openroadm-common-network/otn-topology";
+    description
+      "This augmentation defines Logical link types in the OTN topology connecting OTN elements";
+    leaf link-type {
+      type org-openroadm-network-types:openroadm-link-type;
+      must "(../link-type = 'OTN-LINK')" {
+        error-message "Invalid link type for otn-topology";
+      }
+      status deprecated;
+    }
+    leaf administrative-group {
+      type uint32;
+      status deprecated;
+      description
+        "according to RFC 3630 definition";
+    }
+    leaf operational-state {
+      type org-openroadm-common-state-types:state;
+      status deprecated;
+    }
+    leaf administrative-state {
+      type org-openroadm-common-state-types:state;
+      status deprecated;
+    }
+    leaf available-bandwidth {
+      type uint32;
+      description
+        "Available bandwidth between OTN elements";
+    }
+    leaf used-bandwidth {
+      type uint32;
+      description
+        "Used bandwidth between OTN elements";
+    }
+    leaf ODU-protected {
+      type boolean;
+      description
+        "ODU protection flag";
+    }
+  }
+}
similarity index 92%
rename from ordmodels/network/src/main/yang/org-openroadm-roadm@2017-09-29.yang
rename to ordmodels/network/src/main/yang/org-openroadm-roadm@2018-11-30.yang
index 75a6c4332a9cc1c9e1c731fd60ed1f9cdda75361..35c55443882def2ca93237781668441440b301b1 100644 (file)
@@ -1,4 +1,5 @@
 module org-openroadm-roadm {
+  yang-version 1.1;
   namespace "http://org/openroadm/roadm";
   prefix roadm;
 
@@ -10,7 +11,7 @@ module org-openroadm-roadm {
     "YANG definitions for network view of a ROADM
 
      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -35,7 +36,15 @@ module org-openroadm-roadm {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
-  revision 2017-09-29  {
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
     description
       "Version 2.1";
   }
similarity index 77%
rename from ordmodels/network/src/main/yang/org-openroadm-srg@2017-09-29.yang
rename to ordmodels/network/src/main/yang/org-openroadm-srg@2018-11-30.yang
index 73d77a44d977db6958495a35c89e74581cb724a2..323a5b8c5efdcc19af3a49418d64c45181512f0e 100644 (file)
@@ -1,14 +1,15 @@
 module org-openroadm-srg {
+  yang-version 1.1;
   namespace "http://org/openroadm/srg";
   prefix srg;
 
   import org-openroadm-network-types {
     prefix org-openroadm-network-types;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
   }
-  import org-openroadm-common-types {
-    prefix org-openroadm-common-types;
-    revision-date 2017-09-29;
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2018-11-30;
   }
 
   organization
@@ -19,7 +20,7 @@ module org-openroadm-srg {
     "YANG definitions for an Add/Drop group in Network Model
 
      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -44,6 +45,26 @@ module org-openroadm-srg {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
   revision 2017-09-29 {
     description
       "Version 2.1";
@@ -77,14 +98,14 @@ module org-openroadm-srg {
     }
     list available-wavelengths {
       key "index";
-      uses org-openroadm-network-types:wavelengths;
-     description
+      description
         "This list is created to accommodate fix grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
-      index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
-      will hold list of available spectrums";
+         index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
+         will hold list of available spectra";
+      uses org-openroadm-network-types:wavelengths;
     }
     leaf wavelength-duplication {
-      type org-openroadm-common-types:wavelength-duplication-type;
+      type org-openroadm-common-optical-channel-types:wavelength-duplication-type;
     }
   }
 }
similarity index 74%
rename from ordmodels/network/src/main/yang/org-openroadm-xponder@2017-09-29.yang
rename to ordmodels/network/src/main/yang/org-openroadm-xponder@2018-11-30.yang
index d6934d2be20483763775dc3ea72d9c2270d94ee8..124221e1dc0ec3d3a1a012c9c1826d7292129d1b 100644 (file)
@@ -1,26 +1,27 @@
 module org-openroadm-xponder {
+  yang-version 1.1;
   namespace "http://org/openroadm/xponder";
   prefix xpndr;
 
-  import ietf-network {
-    prefix nd;
-    revision-date 2015-06-08;
-  }
-  import ietf-network-topology {
-    prefix nwt;
-    revision-date 2015-06-08;
-  }
   import org-openroadm-network-types {
     prefix org-openroadm-network-types;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-equipment-types {
+    prefix org-openroadm-common-equipment-types;
+    revision-date 2018-11-30;
+  }
+  import org-openroadm-common-state-types {
+    prefix org-openroadm-common-state-types;
+    revision-date 2018-11-30;
   }
-  import org-openroadm-common-types {
-    prefix org-openroadm-common-types;
-    revision-date 2017-09-29;
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2018-11-30;
   }
   import org-openroadm-otn-common-types {
     prefix org-openroadm-otn-common-types;
-    revision-date 2017-09-29;
+    revision-date 2018-11-30;
   }
 
   organization
@@ -31,7 +32,7 @@ module org-openroadm-xponder {
     "YANG definitions for xponder
 
      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
-     AT&T Intellectual Property.  All other rights reserved.
+     All other rights reserved.
 
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
@@ -56,6 +57,26 @@ module org-openroadm-xponder {
      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      POSSIBILITY OF SUCH DAMAGE.";
 
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
   revision 2017-09-29 {
     description
       "Version 2.1";
@@ -93,19 +114,19 @@ module org-openroadm-xponder {
     }
     leaf rate {
       type identityref {
-        base org-openroadm-common-types:och-rate-identity;
+        base org-openroadm-common-optical-channel-types:och-rate-identity;
       }
       description
         "rate";
     }
     leaf modulation-format {
-      type org-openroadm-common-types:modulation-format;
+      type org-openroadm-common-optical-channel-types:modulation-format;
     }
     leaf optic {
-      type org-openroadm-common-types:optic-types;
+      type org-openroadm-common-equipment-types:optic-types;
     }
     leaf state {
-      type org-openroadm-common-types:state;
+      type org-openroadm-common-state-types:state;
       description
         "A xponder can be in one of the following
                  states";
@@ -114,7 +135,7 @@ module org-openroadm-xponder {
 
   grouping xpdr-port-connection-attributes {
     container wavelength {
-      uses org-openroadm-network-types:wavelengths;
+      uses org-openroadm-network-types:flex-wave;
     }
     leaf tail-equipment {
       type string;
@@ -127,30 +148,6 @@ module org-openroadm-xponder {
     }
   }
 
-  grouping xpdr-otn-tail-attributes {
-    leaf tp-id {
-      type nwt:tp-id;
-    }
-    leaf network-ref {
-      type leafref {
-        path "/nd:network/nd:network-id";
-      }
-      description
-        "Used to reference a network, for example an underlay
-         network.";
-    }
-    leaf node-ref {
-      type leafref {
-        path "/nd:network[nd:network-id=current()/../network-ref]"+
-          "/nd:node/nd:node-id";
-      }
-      description
-        "Used to reference a node.
-         Nodes are identified relative to the network they are
-         contained in.";
-    }
-  }
-
   grouping xpdr-otn-tp-attributes {
     leaf rate {
       type identityref {
@@ -170,16 +167,15 @@ module org-openroadm-xponder {
           "ODTU type, part of the MSI (Multiplex Structure Identifier)";
       }
       leaf-list tpn-pool {
-        type uint8;
+        type uint16;
         description
-          "Tributary Port Number (0-based), part of the MSI";
+          "List of available Tributary Port Number (0-based), part of the MSI";
       }
     }
     leaf-list ts-pool {
-        type uint16;
+      type uint16;
       description
-        "Timeslots used by port";
+        "List of available Tributary Slots used by port";
     }
   }
-
 }
index db2ebb2efe604a4777ba5ddad79c1d4e1bdc7570..d3985f00497893d842a02b562e2aad4c0ae45260 100644 (file)
@@ -10,12 +10,12 @@ package org.opendaylight.transportpce.pce;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev170929.span.attributes.LinkConcatenation;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.link.oms.attributes.Span;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmLinkType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev181130.span.attributes.LinkConcatenation;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.link.oms.attributes.Span;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmLinkType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index a0e81e9bf3acf26dfdabbc7bfdd10c9bb91f94f5..177fb7323bfc007cb24d5aebb959d293ea6729fd 100644 (file)
@@ -23,16 +23,17 @@ import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.common.ResponseCodes;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Network1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmNodeType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -106,8 +107,8 @@ public class PceCalculation {
 
     private boolean readMdSal() {
         LOG.info("readMdSal: network {}", NetworkUtils.OVERLAY_NETWORK_ID);
-        InstanceIdentifier<Network> nwInstanceIdentifier = InstanceIdentifier
-                .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).build();
+        InstanceIdentifier<Network> nwInstanceIdentifier = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).build();
         ReadOnlyTransaction readOnlyTransaction = this.dataBroker.newReadOnlyTransaction();
         Network nw = null;
         try {
index 6007dee626a1c3110592a5e8244fdc6fc90146d6..390a7ddb716423d0b12d3fea25f713981dabb1fb 100644 (file)
@@ -18,8 +18,7 @@ import java.util.Map;
 import org.apache.commons.collections15.Transformer;
 import org.opendaylight.transportpce.common.ResponseCodes;
 import org.opendaylight.transportpce.pce.PceResult.LocalCause;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-//import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -168,10 +167,10 @@ public class PceGraph {
             PceNode pcenode = node.getValue();
             List<PceLink> links = pcenode.getOutgoingLinks();
 
-            LOG.debug("In populateGraph: use node for graph {}", pcenode.toString());
+            LOG.info("In populateGraph: use node for graph {}", pcenode.toString());
 
             for (PceLink link : links) {
-                LOG.debug("In populateGraph: add edge to graph {}", link.toString());
+                LOG.info("In populateGraph: add edge to graph {}", link.toString());
                 addLinkToGraph(link);
 
             }
index 29455273b8454c92d8939add4b02689f980cbc58..2fb29265b5c165d54f9e85cd208da24499458b79 100644 (file)
@@ -9,12 +9,14 @@
 package org.opendaylight.transportpce.pce;
 
 import java.util.List;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Link1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.link.oms.attributes.Span;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmLinkType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.Link;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.link.oms.attributes.Span;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmLinkType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -79,11 +81,12 @@ public class PceLink {
     }
 
     private OpenroadmLinkType calcType(Link link) {
-        Link1 link1 = null;
+        org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.@Nullable Link1 link1 = null;
         OpenroadmLinkType tmplType = null;
 
         // ID and type
-        link1 = link.augmentation(Link1.class);
+        link1 = link.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130
+            .Link1.class);
         if (link1 == null) {
             this.isValid = false;
             LOG.error("PceLink: No Link augmentation available. Link is ignored {}", this.linkId);
@@ -102,9 +105,12 @@ public class PceLink {
     private LinkId calcOpposite(Link link) {
         // opposite link
         LinkId tmpoppositeLink = null;
-        org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1 linkOpposite = link
-            .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.opposite.links.rev170929.Link1.class);
-        tmpoppositeLink = linkOpposite.getOppositeLink();
+        Link1 linkOpposite = link.augmentation(Link1.class);
+        if (linkOpposite.getOppositeLink() != null) {
+            tmpoppositeLink = linkOpposite.getOppositeLink();
+        } else {
+            LOG.error("link {} has no opposite link", link.getLinkId().getValue());
+        }
         LOG.debug("PceLink: reading oppositeLink.  {}", linkOpposite.toString());
         if (tmpoppositeLink == null) {
             this.isValid = false;
index 28372ffb5b6bd94a91c7fef2d3e22dd812db2446..91a1f8ceff61d5a2434946bd0524d96b78c7dcd8 100644 (file)
@@ -14,13 +14,13 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.TreeMap;
 
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.pp.attributes.UsedWavelength;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmTpType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.pp.attributes.UsedWavelength;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmNodeType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmTpType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -59,19 +59,19 @@ public class PceNode {
             return;
         }
         LOG.info("initSrgTpList: getting SRG tps from ROADM node {}", this.nodeId);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1 nodeTp =
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1 nodeTp =
                 this.node.augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology
-                                .rev150608.Node1.class);
-        List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node
-            .TerminationPoint> allTps =
+                                .rev180226.Node1.class);
+        List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
+            .node.TerminationPoint> allTps =
                 nodeTp.getTerminationPoint();
         if (allTps == null) {
             LOG.error("initSrgTpList: ROADM TerminationPoint list is empty for node {}", this.toString());
             this.valid = false;
             return;
         }
-        for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node
-                .TerminationPoint tp : allTps) {
+        for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
+            .node.TerminationPoint tp : allTps) {
             TerminationPoint1 tp1 = tp.augmentation(TerminationPoint1.class);
             OpenroadmTpType type = tp1.getTpType();
             switch (type) {
@@ -124,7 +124,7 @@ public class PceNode {
         Node1 node1 = this.node.augmentation(Node1.class);
         switch (this.nodeType) {
             case SRG :
-                List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+                List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                     .AvailableWavelengths> srgAvailableWL =
                         node1.getSrgAttributes().getAvailableWavelengths();
                 if (srgAvailableWL == null) {
@@ -132,21 +132,21 @@ public class PceNode {
                     LOG.error("initWLlist: SRG AvailableWavelengths is empty for node  {}", this.toString());
                     return;
                 }
-                for (org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+                for (org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                         .AvailableWavelengths awl : srgAvailableWL) {
                     this.availableWLindex.add(awl.getIndex());
                     LOG.debug("initWLlist: SRG next = {} in {}", awl.getIndex(), this.toString());
                 }
                 break;
             case DEGREE :
-                List<org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes
+                List<org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes
                     .AvailableWavelengths> degAvailableWL = node1.getDegreeAttributes().getAvailableWavelengths();
                 if (degAvailableWL == null) {
                     this.valid = false;
                     LOG.error("initWLlist: DEG AvailableWavelengths is empty for node  {}", this.toString());
                     return;
                 }
-                for (org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes
+                for (org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes
                             .AvailableWavelengths awl : degAvailableWL) {
                     this.availableWLindex.add(awl.getIndex());
                     LOG.debug("initWLlist: DEGREE next = {} in {}", awl.getIndex(), this.toString());
@@ -175,19 +175,19 @@ public class PceNode {
         if (!isValid()) {
             return;
         }
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1 nodeTp =
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1 nodeTp =
                 this.node.augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology
-                        .rev150608.Node1.class);
-        List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node
-            .TerminationPoint> allTps = nodeTp.getTerminationPoint();
+                        .rev180226.Node1.class);
+        List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
+            .node.TerminationPoint> allTps = nodeTp.getTerminationPoint();
         if (allTps == null) {
             this.valid = false;
             LOG.error("initXndrTps: XPONDER TerminationPoint list is empty for node {}", this.toString());
             return;
         }
         this.valid = false;
-        for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node
-                    .TerminationPoint tp : allTps) {
+        for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
+            .node.TerminationPoint tp : allTps) {
             TerminationPoint1 tp1 = tp.augmentation(TerminationPoint1.class);
             if (tp1.getTpType() == OpenroadmTpType.XPONDERNETWORK) {
                 if (tp1.getXpdrNetworkAttributes().getWavelength() != null) {
@@ -240,7 +240,7 @@ public class PceNode {
         if (!this.availableSrgPp.isEmpty()) {
             Optional<String> client = null;
             final OpenroadmTpType openType = srgType;
-            client = this.availableSrgPp.entrySet().stream().filter(pp -> pp.getValue() == openType)
+            client = this.availableSrgPp.entrySet().stream().filter(pp -> pp.getValue().getName() == openType.getName())
                     .map(Map.Entry::getKey)
                     .sorted(new SortPortsByName())
                     .findFirst();
index a65a0773d346ec7ea655acfffdb0b572f59f5316..1193b2db6452df72938749ad251fb69d2ca1d3c1 100644 (file)
@@ -26,7 +26,7 @@ import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdes
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.NodeBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPoint;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPointBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 00701404185194c8f5fdc67ddbf380edf5d09c41..c53b96aa325e1bac730eea9cf7a14a247392e1c8 100644 (file)
@@ -23,9 +23,10 @@ import org.opendaylight.transportpce.test.common.DataStoreContext;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev171017.PathComputationRequestOutput;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -55,9 +56,9 @@ public final class PceTestUtils {
                 = ((ContainerNode) normalizedNode.get()).getValue().iterator().next();
         MapEntryNode mapNode = ((MapNode) next).getValue().iterator().next();
         Optional<DataObject> dataObject = dataObjectConverter.getDataObject(mapNode, Network.QNAME);
-        InstanceIdentifier<Network> nwInstanceIdentifier = InstanceIdentifier
-                .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
-                .build();
+        InstanceIdentifier<Network> nwInstanceIdentifier = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+            .build();
         WriteTransaction dataWriteTransaction = dataBroker.newWriteOnlyTransaction();
         dataWriteTransaction.put(LogicalDatastoreType.CONFIGURATION, nwInstanceIdentifier, (Network) dataObject.get());
         dataWriteTransaction.submit().get();
index a975025040956445346d5bb1d37df469b55588a1..0d596ee5551c27c3c2b2d71baf9b382ff8178617 100644 (file)
@@ -8,6 +8,8 @@
 package org.opendaylight.transportpce.renderer;
 
 import com.google.common.base.Optional;
+
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
@@ -20,53 +22,57 @@ import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.common.Timeouts;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes.AvailableWavelengthsKey;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.used.wavelengths.UsedWavelengths;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.used.wavelengths.UsedWavelengthsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.used.wavelengths.UsedWavelengthsKey;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.DegreeAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.DegreeAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.SrgAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.SrgAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.CpAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.CpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.CtpAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.CtpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.PpAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.PpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.RxTtpAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.RxTtpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.TxTtpAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.TxTtpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrClientAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrClientAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrNetworkAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrNetworkAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrPortAttributes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrPortAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.pp.attributes.UsedWavelength;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.pp.attributes.UsedWavelengthBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.pp.attributes.UsedWavelengthKey;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmTpType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes.AvailableWavelengthsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev170929.xpdr.port.connection.attributes.Wavelength;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev170929.xpdr.port.connection.attributes.WavelengthBuilder;
+import org.opendaylight.transportpce.common.fixedflex.FixedFlexImpl;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev181130.FrequencyGHz;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev181130.FrequencyTHz;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes.AvailableWavelengthsKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.used.wavelengths.UsedWavelengths;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.used.wavelengths.UsedWavelengthsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.used.wavelengths.UsedWavelengthsKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.DegreeAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.DegreeAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.SrgAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.SrgAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.CpAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.CpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.CtpAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.CtpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.PpAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.PpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.RxTtpAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.RxTtpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.TxTtpAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.TxTtpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrClientAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrClientAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrNetworkAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrNetworkAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrPortAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrPortAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.pp.attributes.UsedWavelength;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.pp.attributes.UsedWavelengthBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.pp.attributes.UsedWavelengthKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmTpType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes.AvailableWavelengthsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev181130.xpdr.port.connection.attributes.Wavelength;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev181130.xpdr.port.connection.attributes.WavelengthBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.PathDescription;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.atoz.direction.AToZ;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToA;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.resource.TerminationPoint;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.Node;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.TpId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node.TerminationPointKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPointKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder;
 import org.slf4j.Logger;
@@ -150,11 +156,10 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
 
     private InstanceIdentifier<Node1> createNode1IID(String nodeId) {
         return InstanceIdentifier
-                .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
-                .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608
-                        .network.Node.class, new NodeKey(new NodeId(nodeId)))
-                .augmentation(Node1.class)
-                .build();
+                .builder(Networks.class).child(Network.class, new NetworkKey(
+                new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+                .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network
+                .Node.class, new NodeKey(new NodeId(nodeId))).augmentation(Node1.class).build();
     }
 
     private Optional<Node1> getNode1FromDatastore(String nodeId) {
@@ -196,14 +201,14 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                     } else {
                         degreeAttributesBuilder = new DegreeAttributesBuilder(degreeAttributes);
                     }
-                    List<org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes
+                    List<org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes
                             .AvailableWavelengths> availableDegreeWLs =
                             degreeAttributesBuilder.getAvailableWavelengths();
                     if (availableDegreeWLs == null) {
                         availableDegreeWLs = new ArrayList<>();
                         degreeAttributesBuilder.setAvailableWavelengths(availableDegreeWLs);
                     }
-                    availableDegreeWLs.add(new org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree
+                    availableDegreeWLs.add(new org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree
                             .node.attributes.AvailableWavelengthsBuilder().setIndex(wavelengthNumber).build());
                     node1Builder.setDegreeAttributes(degreeAttributesBuilder.build());
                     break;
@@ -215,7 +220,7 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                     } else {
                         srgAttributesBuilder = new SrgAttributesBuilder(srgAttributes);
                     }
-                    List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+                    List<org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                             .AvailableWavelengths> availableSrgWLs = srgAttributesBuilder.getAvailableWavelengths();
                     if (availableSrgWLs == null) {
                         availableSrgWLs = new ArrayList<>();
@@ -251,24 +256,24 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                 continue;
             }
 
-            InstanceIdentifierBuilder<Node1> nodeIIDBuilder = InstanceIdentifier
-                    .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
-                    .child(Node.class, new NodeKey(new NodeId(nodeId))).augmentation(Node1.class);
+            InstanceIdentifierBuilder<Node1> nodeIIDBuilder = InstanceIdentifier.builder(Networks.class)
+                .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+                .child(Node.class, new NodeKey(new NodeId(nodeId))).augmentation(Node1.class);
             InstanceIdentifier availableWlIID;
 
             switch (node.getNodeType()) {
                 case DEGREE:
                     availableWlIID = nodeIIDBuilder.child(DegreeAttributes.class)
-                            .child(org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node
+                            .child(org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node
                                     .attributes.AvailableWavelengths.class,
                                     new AvailableWavelengthsKey(wavelengthNumber))
                             .build();
                     break;
                 case SRG:
                     availableWlIID = nodeIIDBuilder.child(SrgAttributes.class)
-                            .child(org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+                            .child(org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                                             .AvailableWavelengths.class,
-                                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node
+                                    new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node
                                             .attributes.AvailableWavelengthsKey(wavelengthNumber))
                             .build();
                     break;
@@ -289,13 +294,13 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
 
     private InstanceIdentifierBuilder<TerminationPoint1> createTerminationPoint1IIDBuilder(String nodeId, String tpId) {
         return InstanceIdentifier
-                .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
-                .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network
-                    .Node.class, new NodeKey(new NodeId(nodeId))).augmentation(
-                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1.class)
-                .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608
-                                .network.node.TerminationPoint.class,
-                        new TerminationPointKey(new TpId(tpId))).augmentation(TerminationPoint1.class);
+                .builder(Networks.class).child(Network.class, new NetworkKey(
+                new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml
+                .ns.yang.ietf.network.rev180226.networks.network.Node.class, new NodeKey(new NodeId(nodeId)))
+                .augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .Node1.class).child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology
+                .rev180226.networks.network.node.TerminationPoint.class, new TerminationPointKey(new TpId(tpId)))
+                .augmentation(TerminationPoint1.class);
     }
 
     private Optional<TerminationPoint1> getTerminationPoint1FromDatastore(String nodeId, String tpId) {
@@ -351,11 +356,10 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                 case SRGRXCP:
                 case SRGTXRXCP:
                     usedWlIID = usedWlIIDBuilder.child(CpAttributes.class).child(org.opendaylight.yang.gen.v1.http.org
-                                    .openroadm.network.topology.rev170929.network.node.termination.point.cp.attributes
-                                    .UsedWavelengths.class,
-                            new org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node
-                                    .termination.point.cp.attributes.UsedWavelengthsKey(
-                                    wavelengthIndex)).build();
+                        .openroadm.network.topology.rev181130.networks.network.node.termination.point.cp.attributes
+                        .UsedWavelengths.class, new org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology
+                        .rev181130.networks.network.node.termination.point.cp.attributes
+                        .UsedWavelengthsKey(wavelengthIndex)).build();
                     break;
 
                 case SRGTXRXPP:
@@ -391,6 +395,11 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
 
     private void addUsedWL(long wavelengthIndex, List<NodeIdPair> tpIds) {
         WriteTransaction addUsedWlTx = this.dataBroker.newWriteOnlyTransaction();
+        FixedFlexImpl fixedFlex = new FixedFlexImpl();
+        fixedFlex.getFixedFlexWaveMapping(wavelengthIndex);
+        FrequencyGHz frequencyGHz = new FrequencyGHz(new BigDecimal(fixedFlex.getWavelength()));
+        FrequencyTHz frequencyTHz = new FrequencyTHz(new BigDecimal(fixedFlex.getCenterFrequency()));
+
         for (NodeIdPair idPair : tpIds) {
             Optional<TerminationPoint1> tpOpt = getTerminationPoint1FromDatastore(idPair.getNodeID(), idPair.getTpID());
 
@@ -470,15 +479,15 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                     } else {
                         cpAttributesBuilder = new CpAttributesBuilder(cpAttributes);
                     }
-                    List<org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node
-                            .termination.point.cp.attributes.UsedWavelengths> usedDegreeCpWls =
-                            cpAttributesBuilder.getUsedWavelengths();
+                    List<org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network
+                        .node.termination.point.cp.attributes.UsedWavelengths> usedDegreeCpWls = cpAttributesBuilder
+                        .getUsedWavelengths();
                     if (usedDegreeCpWls == null) {
                         usedDegreeCpWls = new ArrayList<>();
                         cpAttributesBuilder.setUsedWavelengths(usedDegreeCpWls);
                     }
-                    usedDegreeCpWls.add(new org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929
-                            .network.node.termination.point.cp.attributes.UsedWavelengthsBuilder()
+                    usedDegreeCpWls.add(new org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130
+                            .networks.network.node.termination.point.cp.attributes.UsedWavelengthsBuilder()
                             .setIndex(wavelengthIndex).build());
                     tp1Builder.setCpAttributes(cpAttributesBuilder.build());
                     break;
@@ -510,7 +519,8 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                     } else {
                         xpdrNetworkAttributesBuilder = new XpdrNetworkAttributesBuilder(xpdrNetworkAttributes);
                     }
-                    Wavelength usedXpdrNetworkWl = new WavelengthBuilder().setIndex(wavelengthIndex).build();
+                    Wavelength usedXpdrNetworkWl = new WavelengthBuilder().setWidth(frequencyGHz)
+                        .setFrequency(frequencyTHz).build();
                     tp1Builder.setXpdrNetworkAttributes(xpdrNetworkAttributesBuilder
                             .setWavelength(usedXpdrNetworkWl)
                             .build());
@@ -523,7 +533,8 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                     } else {
                         xpdrClientAttributesBuilder = new XpdrClientAttributesBuilder(xpdrClientAttributes);
                     }
-                    Wavelength usedXpdrClientWl = new WavelengthBuilder().setIndex(wavelengthIndex).build();
+                    Wavelength usedXpdrClientWl = new WavelengthBuilder().setWidth(frequencyGHz)
+                        .setFrequency(frequencyTHz).build();
                     tp1Builder.setXpdrClientAttributes(xpdrClientAttributesBuilder
                             .setWavelength(usedXpdrClientWl)
                             .build());
@@ -536,7 +547,8 @@ public class NetworkModelWavelengthServiceImpl implements NetworkModelWavelength
                     } else {
                         xpdrPortAttributesBuilder = new XpdrPortAttributesBuilder(xpdrPortAttributes);
                     }
-                    Wavelength usedXpdrPortWl = new WavelengthBuilder().setIndex(wavelengthIndex).build();
+                    Wavelength usedXpdrPortWl = new WavelengthBuilder().setWidth(frequencyGHz)
+                        .setFrequency(frequencyTHz).build();
                     tp1Builder.setXpdrPortAttributes(xpdrPortAttributesBuilder
                             .setWavelength(usedXpdrPortWl)
                             .build());
index ec82d295fe24f5c8c88a961167e51c25fac026b7..f11598a2a88fed3a0557f7ce44061dcf3ab5bc20 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.transportpce.renderer;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -21,30 +22,33 @@ import org.junit.runners.Parameterized;
 import org.opendaylight.transportpce.common.StringConstants;
 import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
 import org.opendaylight.transportpce.common.device.DeviceTransactionManagerImpl;
+import org.opendaylight.transportpce.common.fixedflex.FixedFlexImpl;
 import org.opendaylight.transportpce.renderer.stub.MountPointServiceStub;
 import org.opendaylight.transportpce.renderer.stub.MountPointStub;
 import org.opendaylight.transportpce.renderer.utils.ServiceDeleteDataUtils;
 import org.opendaylight.transportpce.renderer.utils.WaveLengthServiceUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.used.wavelengths.UsedWavelengthsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.DegreeAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.SrgAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.CpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.CtpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.PpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.RxTtpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.TxTtpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrClientAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrNetworkAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrPortAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.pp.attributes.UsedWavelengthBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmTpType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev170929.xpdr.port.connection.attributes.WavelengthBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev181130.FrequencyGHz;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev181130.FrequencyTHz;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.used.wavelengths.UsedWavelengthsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.DegreeAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.SrgAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.CpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.CtpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.PpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.RxTtpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.TxTtpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrClientAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrNetworkAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrPortAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.pp.attributes.UsedWavelengthBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmNodeType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmTpType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev181130.xpdr.port.connection.attributes.WavelengthBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.PathDescription;
 
 @RunWith(Parameterized.class)
@@ -75,8 +79,8 @@ public class NetworkModelWaveLengthServiceFreeTest extends AbstractTest {
         terminationPoint1Builder.setCtpAttributes((new CtpAttributesBuilder()).setUsedWavelengths(Collections
             .singletonList((new UsedWavelengthsBuilder()).setIndex(WAVE_LENGTH).build())).build());
         terminationPoint1Builder.setCpAttributes((new CpAttributesBuilder()).setUsedWavelengths(Collections
-            .singletonList((new org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network
-                .node.termination.point.cp.attributes.UsedWavelengthsBuilder())
+            .singletonList((new org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks
+                .network.node.termination.point.cp.attributes.UsedWavelengthsBuilder())
                 .setIndex(WAVE_LENGTH).build())).build());
         terminationPoint1Builder.setTxTtpAttributes((new TxTtpAttributesBuilder()).setUsedWavelengths(Collections
             .singletonList((new UsedWavelengthsBuilder()).setIndex(WAVE_LENGTH).build())).build());
@@ -84,12 +88,21 @@ public class NetworkModelWaveLengthServiceFreeTest extends AbstractTest {
             .singletonList((new UsedWavelengthsBuilder()).setIndex(WAVE_LENGTH).build())).build());
         terminationPoint1Builder.setPpAttributes((new PpAttributesBuilder()).setUsedWavelength(Collections
             .singletonList((new UsedWavelengthBuilder()).setIndex(WAVE_LENGTH).build())).build());
+
+        FixedFlexImpl fixedFlex = new FixedFlexImpl();
+        fixedFlex = fixedFlex.getFixedFlexWaveMapping(WAVE_LENGTH);
+        FrequencyGHz frequencyGHz = new FrequencyGHz(new BigDecimal(fixedFlex.getWavelength()));
+        FrequencyTHz frequencyTHz = new FrequencyTHz(new BigDecimal(fixedFlex.getCenterFrequency()));
+
         terminationPoint1Builder.setXpdrClientAttributes((new XpdrClientAttributesBuilder())
-            .setWavelength((new WavelengthBuilder()).setIndex(WAVE_LENGTH).build()).build());
+            .setWavelength((new WavelengthBuilder()).setFrequency(frequencyTHz).setWidth(frequencyGHz)
+            .build()).build());
         terminationPoint1Builder.setXpdrNetworkAttributes((new XpdrNetworkAttributesBuilder())
-            .setWavelength((new WavelengthBuilder()).setIndex(WAVE_LENGTH).build()).build());
+            .setWavelength((new WavelengthBuilder()).setFrequency(frequencyTHz).setWidth(frequencyGHz)
+            .build()).build());
         terminationPoint1Builder.setXpdrPortAttributes((new XpdrPortAttributesBuilder())
-            .setWavelength((new WavelengthBuilder()).setIndex(WAVE_LENGTH).build()).build());
+            .setWavelength((new WavelengthBuilder()).setFrequency(frequencyTHz).setWidth(frequencyGHz)
+            .build()).build());
 
         Node1Builder node1Builder = new Node1Builder();
         node1Builder.setDegreeAttributes((new DegreeAttributesBuilder()).setAvailableWavelengths(new ArrayList<>())
index 5500288b4d56f3920ee1c07e27d7a72ecb21b2be..838fc252453a946e8ff9d1fae613fe2bd258c568 100644 (file)
@@ -26,23 +26,23 @@ import org.opendaylight.transportpce.renderer.stub.MountPointStub;
 import org.opendaylight.transportpce.renderer.utils.ServiceDeleteDataUtils;
 import org.opendaylight.transportpce.renderer.utils.WaveLengthServiceUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev170929.degree.node.attributes.AvailableWavelengthsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.DegreeAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.SrgAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.CpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.CtpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.PpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.RxTtpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.TxTtpAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrClientAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrNetworkAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.network.node.termination.point.XpdrPortAttributesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmNodeType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev170929.OpenroadmTpType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes.AvailableWavelengthsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.DegreeAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.SrgAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.CpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.CtpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.PpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.RxTtpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.TxTtpAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrClientAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrNetworkAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.networks.network.node.termination.point.XpdrPortAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmNodeType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmTpType;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev171016.service.path.PathDescription;
 
 @RunWith(Parameterized.class)
@@ -96,7 +96,7 @@ public class NetworkModelWaveLengthServiceUseTest extends AbstractTest {
             .setAvailableWavelengths(Collections.singletonList(new AvailableWavelengthsBuilder().setIndex(20L).build()))
             .build());
         node1Builder.setSrgAttributes((new SrgAttributesBuilder()).setAvailableWavelengths(Collections.singletonList(
-            new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev170929.srg.node.attributes
+            new org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
                 .AvailableWavelengthsBuilder().setIndex(20L).build())).build());
 
         for (OpenroadmNodeType nodeType : Arrays
index 8d785689bb07684c7c3c598dc6cbfdd01b76aa97..84d627f9f16c206b314e7f787336d3742e94d3c9 100644 (file)
@@ -12,17 +12,16 @@ import java.util.concurrent.ExecutionException;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
-//import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
-//import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.Node1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev170929.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.Network;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NetworkKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.NodeId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.TpId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.network.node.TerminationPointKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130.TerminationPoint1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.NodeKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPointKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder;
 
@@ -35,13 +34,17 @@ public final class WaveLengthServiceUtils {
     private static InstanceIdentifierBuilder<TerminationPoint1> createTerminationPoint1IIDBuilder(String nodeId,
         String tpId) {
         return InstanceIdentifier
-            .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
-            .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608.network
-                .Node.class, new NodeKey(new NodeId(nodeId))).augmentation(
-                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608.Node1.class)
-            .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev150608
-                    .network.node.TerminationPoint.class,
-                new TerminationPointKey(new TpId(tpId))).augmentation(TerminationPoint1.class);
+            .builder(Networks.class).child(Network.class,
+                new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+            .child(
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network
+                .Node.class, new NodeKey(new NodeId(nodeId)))
+            .augmentation(
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
+            .child(
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks
+                .network.node.TerminationPoint.class, new TerminationPointKey(new TpId(tpId)))
+            .augmentation(TerminationPoint1.class);
     }
 
     public static void putTerminationPoint1ToDatastore(String nodeId, String tpId, TerminationPoint1 terminationPoint1,
@@ -62,9 +65,11 @@ public final class WaveLengthServiceUtils {
 
     private static InstanceIdentifier<Node1> createNode1IID(String nodeId) {
         return InstanceIdentifier
-            .builder(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
-            .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev150608
-                .network.Node.class, new NodeKey(new NodeId(nodeId)))
+            .builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+            .child(
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network
+                .Node.class, new NodeKey(new NodeId(nodeId)))
             .augmentation(Node1.class)
             .build();
     }
@@ -72,8 +77,7 @@ public final class WaveLengthServiceUtils {
     public static void putNode1ToDatastore(String nodeId, Node1 node1,
         DeviceTransactionManager deviceTransactionManager)
         throws ExecutionException, InterruptedException {
-        InstanceIdentifier<Node1>
-            nodeIID = createNode1IID(nodeId);
+        InstanceIdentifier<Node1> nodeIID = createNode1IID(nodeId);
         TransactionUtils
             .writeTransaction(deviceTransactionManager, nodeId,
                 LogicalDatastoreType.CONFIGURATION, nodeIID, node1);
@@ -81,8 +85,7 @@ public final class WaveLengthServiceUtils {
 
     public static Node1 getNode1FromDatastore(String nodeId, DeviceTransactionManager deviceTransactionManager)
         throws ExecutionException, InterruptedException {
-        InstanceIdentifier<Node1>
-            nodeIID = createNode1IID(nodeId);
+        InstanceIdentifier<Node1> nodeIID = createNode1IID(nodeId);
         return (Node1) TransactionUtils
             .readTransaction(deviceTransactionManager, nodeId, LogicalDatastoreType.CONFIGURATION, nodeIID);
     }