use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRef in project genius by opendaylight.
the class MDSALManager method getNodeConnRef.
protected static NodeConnectorRef getNodeConnRef(final String nodeId, final String port) {
StringBuilder stringBuilder = new StringBuilder(nodeId);
StringBuilder append = stringBuilder.append(":");
StringBuilder build = append.append(port);
String string = build.toString();
NodeConnectorId nodeConnectorId = new NodeConnectorId(string);
NodeConnectorKey nodeConnectorKey = new NodeConnectorKey(nodeConnectorId);
NodeConnectorKey connectorKey = nodeConnectorKey;
InstanceIdentifierBuilder<Nodes> builder = InstanceIdentifier.builder(Nodes.class);
NodeKey nodeKey = new NodeKey(new NodeId(nodeId));
InstanceIdentifierBuilder<Node> child = builder.child(Node.class, nodeKey);
InstanceIdentifierBuilder<NodeConnector> anotherChild = child.child(NodeConnector.class, connectorKey);
InstanceIdentifier<NodeConnector> path = anotherChild.toInstance();
NodeConnectorRef nodeConnectorRef = new NodeConnectorRef(path);
return nodeConnectorRef;
}
Aggregations