commit | ca5cfe77821b2a750570a80418be30a90af25d9b | [log] [tgz] |
---|---|---|
author | Yi Tseng <yi@opennetworking.org> | Mon Feb 07 11:42:12 2022 -0800 |
committer | Yi Tseng <yi@opennetworking.org> | Tue Feb 08 22:16:28 2022 +0000 |
tree | ff7abcea75fad20d5355baea0f4d8535b669c9ed | |
parent | 4a1b4fbcb5a2c358bbd0851116100f4dbec3eae6 [diff] |
Add sdk-port annotation with discover port from Stratum Change-Id: I37f810767df9fb5adee815cd19e78c71a1aaa37c
diff --git a/drivers/gnmi/src/main/java/org/onosproject/drivers/gnmi/OpenConfigGnmiDeviceDescriptionDiscovery.java b/drivers/gnmi/src/main/java/org/onosproject/drivers/gnmi/OpenConfigGnmiDeviceDescriptionDiscovery.java index ee7ccc5..6ae4c33 100644 --- a/drivers/gnmi/src/main/java/org/onosproject/drivers/gnmi/OpenConfigGnmiDeviceDescriptionDiscovery.java +++ b/drivers/gnmi/src/main/java/org/onosproject/drivers/gnmi/OpenConfigGnmiDeviceDescriptionDiscovery.java
@@ -58,6 +58,7 @@ .getLogger(OpenConfigGnmiDeviceDescriptionDiscovery.class); private static final String LAST_CHANGE = "last-change"; + private static final String SDK_PORT = "sdk-port"; private static final String UNKNOWN = "unknown"; @@ -170,6 +171,7 @@ switch (pathElemName) { case "ifindex": // port number builder.withPortNumber(PortNumber.portNumber(val.getUintVal(), ifName)); + annotationsBuilder.set(SDK_PORT, String.valueOf(val.getUintVal())); return; case "oper-status": builder.isEnabled(parseOperStatus(val.getStringVal()));