public OvsdbBridgeAugmentation extractBridgeAugmentation(Node node) { if (node == null) { return null; } return node.getAugmentation(OvsdbBridgeAugmentation.class); }
public OvsdbBridgeAugmentation extractBridgeAugmentation(Node node) { if (node == null) { return null; } return node.getAugmentation(OvsdbBridgeAugmentation.class); }
public NodeOperEvent(InstanceIdentifier<Node> iid, Node before, Node after) { super(iid, before, after); if (before != null) { Preconditions.checkArgument(before.getAugmentation(NetconfNode.class) != null); } if (after != null) { Preconditions.checkArgument(after.getAugmentation(NetconfNode.class) != null); } }
public String getOvsdbNodeUUID(Node node) { String nodeUUID = null; OvsdbNodeAugmentation ovsdbNodeAugmentation = node.getAugmentation(OvsdbNodeAugmentation.class); if (ovsdbNodeAugmentation != null) { // TODO replace with proper uuid and not the system-id nodeUUID = getOsdbNodeExternalIdsValue(ovsdbNodeAugmentation, "system-id"); } return nodeUUID; }
public Optional<OvsdbBridgeAugmentation> getOvsdbBridgeAugmentation(InstanceIdentifier<?> iid) { Optional<Node> nodeOptional = getBridgeNode(iid); if (nodeOptional.isPresent()) { return Optional.fromNullable(nodeOptional.get().getAugmentation(OvsdbBridgeAugmentation.class)); } return Optional.absent(); }
public List<TerminationPoint> extractTerminationPoints(Node node) { List<TerminationPoint> terminationPoints = new ArrayList<>(); OvsdbBridgeAugmentation ovsdbBridgeAugmentation = node.getAugmentation(OvsdbBridgeAugmentation.class); if (ovsdbBridgeAugmentation != null) { terminationPoints.addAll(node.getTerminationPoint()); } return terminationPoints; }
public List<TerminationPoint> extractTerminationPoints(Node node) { List<TerminationPoint> terminationPoints = new ArrayList<>(); OvsdbBridgeAugmentation ovsdbBridgeAugmentation = node.getAugmentation(OvsdbBridgeAugmentation.class); if (ovsdbBridgeAugmentation != null) { terminationPoints.addAll(node.getTerminationPoint()); } return terminationPoints; }
public OvsdbTerminationPointAugmentation extractTerminationPointAugmentation(Node bridgeNode, String portName) { if (bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class) != null) { List<OvsdbTerminationPointAugmentation> tpAugmentations = extractTerminationPointAugmentations(bridgeNode); for (OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation : tpAugmentations) { if (ovsdbTerminationPointAugmentation.getName().equals(portName)) { return ovsdbTerminationPointAugmentation; } } } return null; }
public OvsdbBridgeAugmentation getBridge(Node node, String name) { OvsdbBridgeAugmentation bridge = node.getAugmentation(OvsdbBridgeAugmentation.class); if ((bridge != null) && (!bridge.getBridgeName().getValue().equals(name))) { bridge = null; } return bridge; }
private NetconfNode getNodeAugmentation(Node node) { NetconfNode netconfNode = node.getAugmentation(NetconfNode.class); if (netconfNode == null) { LOG.warn("Node {} is not a netconf device", node.getNodeId().getValue()); return null; } return netconfNode; }
public OvsdbTerminationPointAugmentation extractTerminationPointAugmentation(Node bridgeNode, String portName) { if (bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class) != null) { List<OvsdbTerminationPointAugmentation> tpAugmentations = extractTerminationPointAugmentations(bridgeNode); for (OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation : tpAugmentations) { if (ovsdbTerminationPointAugmentation.getName().equals(portName)) { return ovsdbTerminationPointAugmentation; } } } return null; }
@Override public void triggerUpdates() { List<Node> ovsdbNodes = southbound.readOvsdbTopologyNodes(); for (Node node : ovsdbNodes) { ovsdbUpdate(node, node.getAugmentation(OvsdbNodeAugmentation.class), OvsdbInventoryListener.OvsdbType.NODE, Action.ADD); } }
@Override public void triggerUpdates() { List<Node> ovsdbNodes = southbound.readOvsdbTopologyNodes(); for (Node node : ovsdbNodes) { ovsdbUpdate(node, node.getAugmentation(OvsdbNodeAugmentation.class), OvsdbInventoryListener.OvsdbType.NODE, Action.ADD); } }
private static PortNumber getRemotePort(DataBroker dataBroker, UniAugmentation uni) { PortNumber remotePort = null; final Optional<Node> optionalNode = findOvsdbNode(dataBroker, uni); if (optionalNode.isPresent()) { remotePort = optionalNode.get() .getAugmentation(OvsdbNodeAugmentation.class) .getConnectionInfo().getRemotePort(); } return remotePort; }
public List<Node> getAllBridgesOnOvsdbNode(Node node) { List<Node> nodes = new ArrayList<>(); List<ManagedNodeEntry> managedNodes = node.getAugmentation(OvsdbNodeAugmentation.class).getManagedNodeEntry(); for (ManagedNodeEntry managedNode : managedNodes) { InstanceIdentifier<?> bridgeIid = managedNode.getBridgeRef().getValue(); Node bridgeNode = (Node) mdsalUtils.read(LogicalDatastoreType.OPERATIONAL, bridgeIid); if (bridgeNode != null) { nodes.add(bridgeNode); } } return nodes; }
public OvsdbBridgeAugmentation getBridgeFromConfig(Node node, String bridge) { OvsdbBridgeAugmentation ovsdbBridgeAugmentation = null; InstanceIdentifier<Node> bridgeIid = MdsalHelper.createInstanceIdentifier(node.getKey(), bridge); Node bridgeNode = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, bridgeIid); if (bridgeNode != null) { ovsdbBridgeAugmentation = bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class); } return ovsdbBridgeAugmentation; }
@Override public void logicRouterCreated(NodeId nodeId, Node lr) { long vrfctx = lr.getAugmentation(LogicalRouterAugment.class).getLrAttribute().getVrfCtx(); fabricCtx.addLogicRouter(nodeId, (int) vrfctx); }
private void createDefaultAutoNetworkMap(Topology topology, final WriteTransaction wx) { for (Node node : topology.getNode()) { HostNode hostNode = node.getAugmentation(HostNode.class); if (hostNode != null) { List<Addresses> addressesList = hostNode.getAddresses(); mergeAddressesListToDefaultNetworkMap(addressesList, wx); } } }
public OvsdbBridgeAugmentation getBridgeFromConfig(Node node, String bridge) { OvsdbBridgeAugmentation ovsdbBridgeAugmentation = null; InstanceIdentifier<Node> bridgeIid = createInstanceIdentifier(node.getKey(), bridge); Node bridgeNode = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, bridgeIid); if (bridgeNode != null) { ovsdbBridgeAugmentation = bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class); } return ovsdbBridgeAugmentation; }
public OvsdbBridgeAugmentation getBridgeFromConfig(Node node, String bridge) { OvsdbBridgeAugmentation ovsdbBridgeAugmentation = null; InstanceIdentifier<Node> bridgeIid = MdsalHelper.createInstanceIdentifier(node.getKey(), bridge); Node bridgeNode = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, bridgeIid); if (bridgeNode != null) { ovsdbBridgeAugmentation = bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class); } return ovsdbBridgeAugmentation; }