Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

You mean, like this?

Node node = ...
List<NodeConnector> nodeConnectors = node.getNodeConnector();
for (NodeConnector nodeConnector : nodeConnectors) {
    nodeConnector.getId();
}

NodeConnectors are mapped to switch ports, so they are the same.

Later versions of ODL use TerminationPoint instead of NodeConnectors, but they are interchangeable (you can refer to a NodeConnector with a TerminationPoint's id, and vice versa).

You can even refer to OpenFlow's special ports in the following way (these ports exist for all switches, except for the optional ports which may not be supported by your openflow hardware):

// reserved ports (openflow 1.1+)
public final static NodeConnectorId INGRESS_PORT = new NodeConnectorId("0xfffffff8");
public final static NodeConnectorId TABLE_PORT = new NodeConnectorId("0xfffffff9");
public final static NodeConnectorId NORMAL_PORT = new NodeConnectorId("0xfffffffa"); // optional
public final static NodeConnectorId FLOOD_PORT = new NodeConnectorId("0xfffffffb"); // optional
public final static NodeConnectorId ALL_PORT = new NodeConnectorId("0xfffffffc");
public final static NodeConnectorId CONTROLLER_PORT = new NodeConnectorId("0xfffffffd");
public final static NodeConnectorId LOCAL_PORT = new NodeConnectorId("0xfffffffe");
public final static NodeConnectorId ANY_PORT = new NodeConnectorId("0xffffffff");

You mean, like this?

Node node = ...
List<NodeConnector> nodeConnectors = node.getNodeConnector();
for (NodeConnector nodeConnector : nodeConnectors) {
    nodeConnector.getId();
}

NodeConnectors are mapped to switch ports, so they are essentially the same.

Later versions of ODL use TerminationPoint instead of NodeConnectors, but they are interchangeable (you can refer to a NodeConnector with a TerminationPoint's id, and vice versa).

You can even refer to OpenFlow's special ports in the following way (these ports exist for all switches, except for the optional ports which may not be supported by your openflow hardware):

// reserved ports (openflow 1.1+)
public final static NodeConnectorId INGRESS_PORT = new NodeConnectorId("0xfffffff8");
public final static NodeConnectorId TABLE_PORT = new NodeConnectorId("0xfffffff9");
public final static NodeConnectorId NORMAL_PORT = new NodeConnectorId("0xfffffffa"); // optional
public final static NodeConnectorId FLOOD_PORT = new NodeConnectorId("0xfffffffb"); // optional
public final static NodeConnectorId ALL_PORT = new NodeConnectorId("0xfffffffc");
public final static NodeConnectorId CONTROLLER_PORT = new NodeConnectorId("0xfffffffd");
public final static NodeConnectorId LOCAL_PORT = new NodeConnectorId("0xfffffffe");
public final static NodeConnectorId ANY_PORT = new NodeConnectorId("0xffffffff");

You mean, like this?

Node node = ...
List<NodeConnector> nodeConnectors = node.getNodeConnector();
for (NodeConnector nodeConnector : nodeConnectors) {
    nodeConnector.getId();
}

NodeConnectors are mapped to switch ports, so they are essentially the same.

Later versions of ODL use TerminationPoint instead of NodeConnectors, NodeConnector, but they are interchangeable (you can refer to a NodeConnector with a TerminationPoint's id, and vice versa).

You can even refer to OpenFlow's special ports in the following way (these ports exist for all switches, except for the optional ports which may not be supported by your openflow hardware):

// reserved ports (openflow 1.1+)
public final static NodeConnectorId INGRESS_PORT = new NodeConnectorId("0xfffffff8");
public final static NodeConnectorId TABLE_PORT = new NodeConnectorId("0xfffffff9");
public final static NodeConnectorId NORMAL_PORT = new NodeConnectorId("0xfffffffa"); // optional
public final static NodeConnectorId FLOOD_PORT = new NodeConnectorId("0xfffffffb"); // optional
public final static NodeConnectorId ALL_PORT = new NodeConnectorId("0xfffffffc");
public final static NodeConnectorId CONTROLLER_PORT = new NodeConnectorId("0xfffffffd");
public final static NodeConnectorId LOCAL_PORT = new NodeConnectorId("0xfffffffe");
public final static NodeConnectorId ANY_PORT = new NodeConnectorId("0xffffffff");