/** * Cache a rendered logical router * @param oFabricId - fabric identifier * @param renderedLr - the corresponding rendered logical router on a fabric. */ public void addRenderedRouterOnFabric(NodeId oFabricId, NodeId renderedLr) { this.renderedRouters.put(oFabricId.getValue(), renderedLr); }
public void releaseL2Resource(NodeId vfabricId) { if (this.vfabricDataMgrStore == null || this.vfabricDataMgrStore.isEmpty() == true) { LOG.error("FABMGR: ERROR: releaseL2Resource: vfabricDataMgrStore is null"); return; } VFabricConfigDataMgr vfabDataMgr = this.vfabricDataMgrStore.get(vfabricId.getValue()); if (vfabDataMgr == null) { LOG.error("FABMGR: ERROR: releaseL2Resource: vfabDataMgr is null"); return; } vfabDataMgr.releaseL2Resource(); }
@Override public void onSuccess(final Void result) { LOG.trace("{}: Transaction({}) {} SUCCESSFUL", id.getValue(), txType, transaction.getIdentifier()); }
@Override public void update(@Nonnull NodeId id, @Nonnull Node operationalDataNode) { LOG.warn("Update recieved"); LOG.warn("NodeId: {}", id.getValue()); LOG.warn("Node: {}", operationalDataNode); for (final NodeWriter delegate : delegates) { delegate.update(id, operationalDataNode); } }
@Nonnull @Override public ListenableFuture<Node> getCurrentStatusForNode(@Nonnull NodeId nodeId) { LOG.debug("Getting current status for node: {}", nodeId.getValue()); return delegate.getCurrentStatusForNode(nodeId); }
private void programIpRewriteExclusionStage1(Node node, Long dpid, String providerSegmentationId, String cidr, Action actionForRewriteExclusion) { if (actionForRewriteExclusion == DELETE ) { LOG.trace("Deleting Flow : programIpRewriteExclusionStage1 node {} providerId {} cidr {} action {}", node.getNodeId().getValue(), providerSegmentationId, cidr, actionForRewriteExclusion); } if (actionForRewriteExclusion == ADD) { LOG.trace("Adding Flow : programIpRewriteExclusionStage1 node {} providerId {} cidr {} action {}", node.getNodeId().getValue(), providerSegmentationId, cidr, actionForRewriteExclusion); } this.programIpRewriteExclusionStage2(node, dpid, providerSegmentationId, cidr,actionForRewriteExclusion); }
private void programIpRewriteExclusionStage1(Node node, Long dpid, String providerSegmentationId, String cidr, Action actionForRewriteExclusion) { if (actionForRewriteExclusion == Action.DELETE ) { LOG.trace("Deleting Flow : programIpRewriteExclusionStage1 node {} providerId {} cidr {} action {}", node.getNodeId().getValue(), providerSegmentationId, cidr, actionForRewriteExclusion); } if (actionForRewriteExclusion == Action.ADD) { LOG.trace("Adding Flow : programIpRewriteExclusionStage1 node {} providerId {} cidr {} action {}", node.getNodeId().getValue(), providerSegmentationId, cidr, actionForRewriteExclusion); } this.programIpRewriteExclusionStage2(node, dpid, providerSegmentationId, cidr,actionForRewriteExclusion); }
public static Ipv4AddressNoZone getIpv4Address(FcPort port) { String hostname = port.getNode().getValue(); String loopback = loopbackMap.get(hostname); if (loopback == null) { LOG.warn("No loopback address found for {}", hostname); loopback = DEFAULT_LOOPBACK; } return new Ipv4AddressNoZone(loopback); } }
private String getDpid(Node node) { long dpid = southbound.getDataPathId(node); if (dpid == 0) { LOG.warn("getDpid: DPID could not be found for node: {}", node.getNodeId().getValue()); } return String.valueOf(dpid); }
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 static Node toADNode(final NodeId nodeId) throws ConstructionException { checkNotNull(nodeId); String nodeIdStripped = toADNodeId(nodeId); if (NUMBERS_ONLY.matcher(nodeIdStripped).matches()) { return new Node(NodeIDType.OPENFLOW, Long.valueOf(nodeIdStripped)); } LOG.debug("NodeId does not match openflow id type, using " + NodeMapping.MD_SAL_TYPE + "instead"); NodeIDType.registerIDType(NodeMapping.MD_SAL_TYPE, String.class); return new Node(NodeMapping.MD_SAL_TYPE, nodeId.getValue()); } }
@Override public String getDefaultGatewayMacAddress(Node node) { String l3gatewayForNode = null; if (node != null) { l3gatewayForNode = ConfigProperties.getProperty(this.getClass(), "ovsdb.l3gateway.mac." + node.getNodeId().getValue()); } if (l3gatewayForNode == null) { l3gatewayForNode = ConfigProperties.getProperty(this.getClass(), "ovsdb.l3gateway.mac"); } return l3gatewayForNode; }
@Override public String getDefaultGatewayMacAddress(Node node) { String l3gatewayForNode = null; if (node != null) { l3gatewayForNode = ConfigProperties.getProperty(this.getClass(), "ovsdb.l3gateway.mac." + node.getNodeId().getValue()); } if (l3gatewayForNode == null) { l3gatewayForNode = ConfigProperties.getProperty(this.getClass(), "ovsdb.l3gateway.mac"); } return l3gatewayForNode; }
@Override public void deactivate() { long mtu = 1500; String aEndNodeName = aEnd.getNode().getValue(); activator.deactivate(aEndNodeName, GROUP_NAME, GROUP_NAME, aEnd, zEnd, mtu); }
/** * Gets the managed by node id. * * @param globalRef * the global ref * @return the managed by node id */ private String getManagedByNodeId(HwvtepGlobalRef globalRef) { InstanceIdentifier<?> instId = globalRef.getValue(); return instId.firstKeyOf(Node.class).getNodeId().getValue(); }
void updateStatus() { ConnectionStatus netconfConnStatus = getNetconfNode().getConnectionStatus(); LOG.info("Change status on node {}, new status is {}", this.node.getNodeId().getValue(), netconfConnStatus); if (netconfConnStatus.equals(currentNetconfConnStatus)) { return; } changeStatus(netconfConnStatus); }
@Override public void deactivate() { String id = ctx.getUuid(); long mtu = 1500; String outerName = namingProvider.getOuterName(id); String innerName = namingProvider.getInnerName(id); String aEndNodeName = aEnd.getNode().getValue(); edgeAssureActivator.deactivate(aEndNodeName, outerName, innerName, aEnd, zEnd, mtu); }
public static InstanceIdentifier<Node> createInstanceIdentifier( OvsdbConnectionInstance client, String bridgeName) { String nodeString = client.getNodeKey().getNodeId().getValue() + "/bridge/" + bridgeName; NodeId nodeId = new NodeId(new Uri(nodeString)); return createInstanceIdentifier(nodeId); }
private void insert(final KeyedInstanceIdentifier<Node, NodeKey> sourcePath) { final NodeKey nodeKey = sourcePath.getKey(); final InstanceIdentifier<Node1> augmentPath = sourcePath.augmentation(Node1.class); final Node1 nodeAgument = new Node1Builder().setEventSourceNode(new NodeId(nodeKey.getNodeId().getValue())).build(); putData(OPERATIONAL, augmentPath, nodeAgument); }
private NodeManager createNodeManager(NodeId nodeId) { return new BaseNodeManagerBuilder().setNodeId(nodeId.getValue()) .setActorContext(TypedActor.context()) .setDelegateFactory(nodeHandlerFactory) .setRoleChangeStrategy(new NoopRoleChangeStrategy()) .setTopologyId(topologyId) .build(); }