[AETHER-1299] Implement SPINE pinning policy in SR.
Additionally introduces a new CLI command. Also this review addresses
comments coming from the previous patch [24393] and fixes some issue
seen in the previous patch.
Change-Id: I5362d95ebe1c237eb5bdb13ec34ab109d25f9f7a
diff --git a/impl/src/main/java/org/onosproject/segmentrouting/cli/TrafficMatchListCommand.java b/impl/src/main/java/org/onosproject/segmentrouting/cli/TrafficMatchListCommand.java
index c00d1fa..cb5008a 100644
--- a/impl/src/main/java/org/onosproject/segmentrouting/cli/TrafficMatchListCommand.java
+++ b/impl/src/main/java/org/onosproject/segmentrouting/cli/TrafficMatchListCommand.java
@@ -26,12 +26,12 @@
* Command to show the list of traffic matches.
*/
@Service
-@Command(scope = "onos", name = "sr-tmatch-list",
+@Command(scope = "onos", name = "sr-tm",
description = "Lists all traffic matches")
public class TrafficMatchListCommand extends AbstractShellCommand {
private static final String FORMAT_MAPPING_TRAFFIC_MATCH =
- " id=%s, state=%s";
+ " id=%s, state=%s, policyId=%s";
private static final String FORMAT_MAPPING_OPERATION =
" op=%s";
@@ -43,7 +43,7 @@
private void printTrafficMatch(TrafficMatchData trafficMatchData) {
print(FORMAT_MAPPING_TRAFFIC_MATCH, trafficMatchData.trafficMatch().trafficMatchId(),
- trafficMatchData.trafficMatchState());
+ trafficMatchData.trafficMatchState(), trafficMatchData.trafficMatch().policyId());
trafficMatchData.operations().forEach(operation -> print(FORMAT_MAPPING_OPERATION, operation));
}
}