@Override public Status saveConfiguration() { ObjectWriter objWriter = new ObjectWriter(); objWriter.write(metaCache, topologyWebFileName); return new Status(StatusCode.SUCCESS, null); }
@Override public String toString() { return type + "[address = " + HexEncode.bytesToHexString(address) + "]"; } }
@Override public String toString() { return "Switch [dataLayerAddress=" + HexEncode.bytesToHexStringFormat(dataLayerAddress) + ", nodeConnectors=" + nodeConnectors + ", spanPorts=" + spanPorts + ", node=" + node + "]"; } }
public static String getNodeDesc(Node node, Object bundle) { ISwitchManager switchManager = (ISwitchManager) ServiceHelper .getInstance(ISwitchManager.class, GlobalConstants.DEFAULT.toString(), bundle); if (switchManager == null) { return null; } return getNodeDesc(node, switchManager); }
private <E> E getService(Class<E> clazz) { E service = (E)ServiceHelper.getGlobalInstance(clazz, this); if (service == null) { service = (E)ServiceHelper.getGlobalInstance(AltoService.class, this); } return service; }
/** * Asynchronously add a flow to the network node * * @param node * @param flow * @param rid */ public Status addFlowAsync(Node node, Flow flow, long rid){ return new Status(StatusCode.SUCCESS); }
public String getContainerName() { if (containerName == null) { return GlobalConstants.DEFAULT.toString(); } return containerName; }
/** * @return the node MAC address in byte array format */ public byte[] getMacAddress() { return HexEncode.bytesFromHexString(this.address); }
/** * Checks if the passed IP address in string form is a valid v4 or v6 * address. The address may specify a mask at the end as "/MMM" * * @param cidr * the v4 or v6 address as IP/MMM * @return */ public static boolean isIPAddressValid(String cidr) { return NetUtils.isIPv4AddressValid(cidr) || NetUtils.isIPv6AddressValid(cidr); }
@Override public boolean isValid() { int intProtocol = NetUtils.getUnsignedByte(protocol); return intProtocol >= 0 && intProtocol <= MAX; }
/** * Construct a new action instance which represents OF 1.3 PUSH_VLAN. * * @param tag An {@link EtherTypes} instance. */ public PushVlan(EtherTypes tag) { this(tag.intValue()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((code == null) ? 0 : code.calculateConsistentHashCode()); return result; }
/** * Retrieve global instance of a class via OSGI registry, if * there are many only the first is returned. * * @param clazz The target class * @param bundle The caller */ public static Object getGlobalInstance(Class<?> clazz, Object bundle) { return getGlobalInstance(clazz, bundle, null); }
/** * Asynchronously modify existing flow on the switch * * @param node * @param flow * @param rid */ public Status modifyFlowAsync(Node node, Flow oldFlow, Flow newFlow, long rid){ return new Status(StatusCode.SUCCESS); }
@Override public String toString() { return type + "[address = " + HexEncode.bytesToHexString(address) + "]"; } }
@Override public String toString() { return "EthernetAddress [macAddress=" + HexEncode.bytesToHexStringFormat(macAddress) + "]"; }
public OpenDoveGC() { openDoveBidirectionalInterfaces = (OpenDoveBidirectionalInterfaces) ServiceHelper.getGlobalInstance( OpenDoveBidirectionalInterfaces.class, this); openDoveSBInterfaces = (OpenDoveSBInterfaces) ServiceHelper.getGlobalInstance( OpenDoveSBInterfaces.class, this); }
/** * Send Barrier message synchronously. The caller will be blocked until the * Barrier reply arrives. * * @param node */ public Status syncSendBarrierMessage(Node node){ return new Status(StatusCode.SUCCESS); }
public static INeutronLoadBalancerPoolMemberCRUD getINeutronLoadBalancerPoolMemberCRUD(Object o) { INeutronLoadBalancerPoolMemberCRUD answer = (INeutronLoadBalancerPoolMemberCRUD) ServiceHelper.getGlobalInstance(INeutronLoadBalancerPoolMemberCRUD.class, o); return answer; } }
/** * Send Barrier message asynchronously. The caller is not blocked. * * @param node */ public Status asyncSendBarrierMessage(Node node){ return new Status(StatusCode.SUCCESS); } }