private LinkRemoved makeRemoveLink(Edge edge){ String headNodeIdStr = null, tailNodeIdStr = null, headNcIdStr = null, tailNcIdStr = null; boolean bool = TopologyServiceUtil.getNodeAndNcIdString(edge, headNodeIdStr, tailNodeIdStr, headNcIdStr, tailNcIdStr); if(bool == false){ logger.debug("ERROR: makeAddLink(): given Edge {}, call TopologyServiceUtil.getNodeAndNcIdString() fail", edge); return null; } NodeId localNodeId = new NodeId(headNodeIdStr); NodeConnectorId localNodeConnectorId = new NodeConnectorId(headNcIdStr); InstanceIdentifier<NodeConnector> localInstanceIdentifier = InstanceIdentifier.builder(Nodes.class) .child(Node.class, new NodeKey(localNodeId)) .child(NodeConnector.class, new NodeConnectorKey(localNodeConnectorId)).toInstance(); NodeConnectorRef localNodeConnectorRef = new NodeConnectorRef(localInstanceIdentifier); NodeId remoteNodeId = new NodeId(tailNodeIdStr); NodeConnectorId remoteNodeConnectorId = new NodeConnectorId(tailNcIdStr); InstanceIdentifier<NodeConnector> remoteInstanceIdentifier = InstanceIdentifier.builder(Nodes.class) .child(Node.class, new NodeKey(remoteNodeId)) .child(NodeConnector.class, new NodeConnectorKey(remoteNodeConnectorId)).toInstance(); NodeConnectorRef remoteNodeConnectorRef = new NodeConnectorRef(remoteInstanceIdentifier); LinkRemovedBuilder ldb = new LinkRemovedBuilder(); ldb.setSource(remoteNodeConnectorRef); ldb.setDestination(localNodeConnectorRef); return((ldb.build())); }