commit | 4b11fab8a02e03a6b97fe6d31df96af0c962ec46 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@ak.jp.nec.com> | Tue May 15 13:03:29 2018 -0700 |
committer | Yuta HIGUCHI <y-higuchi@opennetworking.org> | Tue May 15 20:51:49 2018 +0000 |
tree | ff409a066cca9ed4e3c9f9afac788937f1902606 | |
parent | 4ecc871a22c216d31fca44afb466ea76601b7899 [diff] |
Update logical port grouping id Change-Id: I7f7671487fb5c8c0c375df03992f2334226a823d
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/behaviour/OdtnDeviceDescriptionDiscovery.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/behaviour/OdtnDeviceDescriptionDiscovery.java index 6e5bc81..8030950 100644 --- a/apps/odtn/api/src/main/java/org/onosproject/odtn/behaviour/OdtnDeviceDescriptionDiscovery.java +++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/behaviour/OdtnDeviceDescriptionDiscovery.java
@@ -41,13 +41,12 @@ */ String OC_TYPE = "oc-type"; - // will also be used from TAPI model to point to what we want to configure /** * Annotations key intended for a Port, * which stores string identifier used to - * logically group Ports corresponding to a transponder. + * logically group Ports corresponding to a transponder, etc. */ - String TRANSPONDER_NAME = "odtn-transponder-name"; + String CONNECTION_ID = "odtn-connection-id"; /**
diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/OpenConfigDeviceDiscovery.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/OpenConfigDeviceDiscovery.java index b2e76a2..1c2e599 100644 --- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/OpenConfigDeviceDiscovery.java +++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/OpenConfigDeviceDiscovery.java
@@ -175,10 +175,15 @@ switch (type) { case "oc-platform-types:PORT": case "oc-platform-types:TRANSCEIVER": - case "oc-opt-types:OPTICAL_CHANNEL": + //case "oc-opt-types:OPTICAL_CHANNEL": // TODO assign appropriate port type & annotations at some point // for now we just need a Port with annotations builder.type(Type.PACKET); + + // Just a heuristics to deal with simple transponder + // if the device declare odtn-connection-id, just use them + // if not assign same value to relevant ports types + props.putIfAbsent(CONNECTION_ID, "the-only-one"); break; default: