commit | e48c599b0b8aaa159fda2eff8a9a06ae10e8c134 | [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:35 2022 +0000 |
tree | 829b0b55a5640fb73372eb2a28315399743d1d77 | |
parent | 6d557c075100496c261958c10b6906230a33b186 [diff] |
Add sdk-port annotation with discover port from Stratum Change-Id: I37f810767df9fb5adee815cd19e78c71a1aaa37c (cherry picked from commit ca5cfe77821b2a750570a80418be30a90af25d9b)
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()));