commit | 8f9f6adbbb1073d3502b2d79a5e625d4752bd5f4 | [log] [tgz] |
---|---|---|
author | Boyuan Yan <boyuan@opennetworking.org> | Wed Jun 12 16:54:42 2019 -0700 |
committer | Andrea Campanella <andrea@opennetworking.org> | Thu Jun 13 09:43:49 2019 +0000 |
tree | 9cc6b2b31f2a863954abbb041d7357626f59725b | |
parent | 6b23b3845502c7c54b719125e5f9a9f23e740fe1 [diff] |
Fix two little bugs in odtn: 1. Add "nc:" namespace prefix in <edit-config> operation. 2. Use the last segment of UUID as the port number. Change-Id: I9d1ffa96f69746585137f2bbf8ceb11a488152b4
diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/CassiniFlowRuleProgrammable.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/CassiniFlowRuleProgrammable.java index a17bdff..fee9499 100644 --- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/CassiniFlowRuleProgrammable.java +++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/CassiniFlowRuleProgrammable.java
@@ -172,7 +172,7 @@ StringBuilder sb = new StringBuilder(); sb.append( "<components xmlns='http://openconfig.net/yang/platform'>" - + "<component operation='merge'>" + + "<component nc:operation='merge'>" + "<name>" + optChannel + "</name>" + "<oc-opt-term:optical-channel " +
diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/openconfig/TerminalDeviceFlowRuleProgrammable.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/openconfig/TerminalDeviceFlowRuleProgrammable.java index 0d0787e..d7b3206 100644 --- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/openconfig/TerminalDeviceFlowRuleProgrammable.java +++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/openconfig/TerminalDeviceFlowRuleProgrammable.java
@@ -323,7 +323,7 @@ StringBuilder sb = new StringBuilder(); sb.append( "<components xmlns='http://openconfig.net/yang/platform'>" - + "<component operation='merge'>" + + "<component nc:operation='merge'>" + "<name>" + optChannel + "</name>" + "<oc-opt-term:optical-channel " +
diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceDescriptionDiscovery.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceDescriptionDiscovery.java index 50ab094..4459ffc 100644 --- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceDescriptionDiscovery.java +++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceDescriptionDiscovery.java
@@ -138,7 +138,8 @@ JsonNode sipAttributes = iter.next(); if (checkValidEndpoint(sipAttributes)) { String uuid = sipAttributes.get(UUID).textValue(); - PortNumber portNumber = PortNumber.portNumber(uuid.split("-")[0]); + String[] uuidSeg = uuid.split("-"); + PortNumber portNumber = PortNumber.portNumber(uuidSeg[uuidSeg.length - 1]); annotations.set(UUID, uuid); JsonNode mcPool = sipAttributes.get(MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC).get(MC_POOL);