Changed from modeling port-state from an enum to a
group of boolean leafs in a container.
Change-Id: I532fff5806fd60823d47bdc255881b2f7ef6a76b
Signed-off-by: Ed Warnicke <eaw@cisco.com>
val ret = new HashSet<NodeConnector>();
for (nc : data.nodeConnector) {
val flowConn = nc.getAugmentation(FlowCapableNodeConnector);
- if (flowConn != null && flowConn.state == PortState.Live) {
+ if (flowConn != null && flowConn.state != null && !flowConn.state.linkDown) {
ret.add(new NodeConnector(MD_SAL_TYPE, nc.key, node));
}
}
}
}
- typedef port-state {
- type enumeration {
- enum link-down;
- enum blocked;
- enum live;
+ grouping port-state {
+ leaf link-down {
+ type boolean;
+ }
+ leaf blocked {
+ type boolean;
+ }
+ leaf live {
+ type boolean;
}
}
description "Human readable name of the port";
}
- leaf state {
- type port-state;
- description "Bit map of OFPPS-* flags";
+ container state {
+ uses port-state;
+ description "Description of state of port";
}
leaf current-feature {