}
public static InstanceIdentifier<Node> createInstanceIdentifier(NodeId nodeId) {
- InstanceIdentifier<Node> nodePath = InstanceIdentifier
+ return InstanceIdentifier
.create(NetworkTopology.class)
.child(Topology.class, new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID))
.child(Node.class,new NodeKey(nodeId));
- return nodePath;
}
public static InstanceIdentifier<Node> createInstanceIdentifier(ConnectionInfo key,OvsdbBridgeName bridgeName) {
String uriString = SouthboundConstants.OVSDB_URI_PREFIX + "://"
+ new String(ip.getValue()) + ":" + port.getValue();
Uri uri = new Uri(uriString);
- NodeId nodeId = new NodeId(uri);
- return nodeId;
+ return new NodeId(uri);
}
public static InetAddress createInetAddress(IpAddress ip) throws UnknownHostException {
}
public static String createDatapathType(OvsdbBridgeAugmentation mdsalbridge) {
- String datapathtype = new String(SouthboundConstants.DATAPATH_TYPE_MAP.get(DatapathTypeSystem.class));
+ String datapathtype = SouthboundConstants.DATAPATH_TYPE_MAP.get(DatapathTypeSystem.class);
if (mdsalbridge.getDatapathType() != null) {
if (SouthboundConstants.DATAPATH_TYPE_MAP.get(mdsalbridge.getDatapathType()) != null) {
}
private NodeConnectorId createNodeConnectorId(String connectorId, NodeId nodeId) {
- StringBuilder stringId = new StringBuilder(nodeId.getValue()).append(":").append(connectorId);
- return new NodeConnectorId(stringId.toString());
+ return new NodeConnectorId(nodeId.getValue() + ":" + connectorId);
}
/**
}
public static InstanceIdentifier<Topology> createInstanceIdentifier() {
- InstanceIdentifier<Topology> path = InstanceIdentifier
+ return InstanceIdentifier
.create(NetworkTopology.class)
.child(Topology.class, new TopologyKey(OVSDB_TOPOLOGY_ID));
- return path;
}
public static InstanceIdentifier<Node> createInstanceIdentifier(NodeId nodeId) {
- InstanceIdentifier<Node> nodePath = InstanceIdentifier
+ return InstanceIdentifier
.create(NetworkTopology.class)
.child(Topology.class, new TopologyKey(OVSDB_TOPOLOGY_ID))
.child(Node.class,new NodeKey(nodeId));
- return nodePath;
}
public static InstanceIdentifier<Node> createInstanceIdentifier(NodeKey ovsdbNodeKey, String bridgeName) {
}
public static Set<String> createOvsdbBridgeProtocols(OvsdbBridgeAugmentation ovsdbBridgeNode) {
- Set<String> protocols = new HashSet<String>();
+ Set<String> protocols = new HashSet<>();
if (ovsdbBridgeNode.getProtocolEntry() != null && ovsdbBridgeNode.getProtocolEntry().size() > 0) {
for (ProtocolEntry protocol : ovsdbBridgeNode.getProtocolEntry()) {
if (SouthboundConstants.OVSDB_PROTOCOL_MAP.get(protocol.getProtocol()) != null) {
public static Map<UUID, Controller> createOvsdbController(OvsdbBridgeAugmentation omn,DatabaseSchema dbSchema) {
List<ControllerEntry> controllerEntries = omn.getControllerEntry();
- Map<UUID,Controller> controllerMap = new HashMap<UUID,Controller>();
+ Map<UUID,Controller> controllerMap = new HashMap<>();
if (controllerEntries != null && !controllerEntries.isEmpty()) {
for (ControllerEntry controllerEntry : controllerEntries) {
String controllerNamedUUID = "Controller_" + getRandomUUID();
InstanceIdentifier<Node> bridgeIid, Bridge bridge) {
Preconditions.checkNotNull(bridgeIid);
Preconditions.checkNotNull(bridge);
- List<InstanceIdentifier<BridgeOtherConfigs>> result =
- new ArrayList<InstanceIdentifier<BridgeOtherConfigs>>();
+ List<InstanceIdentifier<BridgeOtherConfigs>> result = new ArrayList<>();
Bridge oldBridge = oldBridgeRows.get(bridge.getUuid());
InstanceIdentifier<Node> bridgeIid, Bridge bridge) {
Preconditions.checkNotNull(bridgeIid);
Preconditions.checkNotNull(bridge);
- List<InstanceIdentifier<BridgeExternalIds>> result =
- new ArrayList<InstanceIdentifier<BridgeExternalIds>>();
+ List<InstanceIdentifier<BridgeExternalIds>> result = new ArrayList<>();
Bridge oldBridge = oldBridgeRows.get(bridge.getUuid());
InstanceIdentifier<Node> bridgeIid, Bridge bridge) {
Preconditions.checkNotNull(bridgeIid);
Preconditions.checkNotNull(bridge);
- List<InstanceIdentifier<ProtocolEntry>> result =
- new ArrayList<InstanceIdentifier<ProtocolEntry>>();
+ List<InstanceIdentifier<ProtocolEntry>> result = new ArrayList<>();
Bridge oldBridge = oldBridgeRows.get(bridge.getUuid());
try {
connectionNode.setNodeId(getOvsdbConnectionInstance().getNodeId());
OvsdbNodeAugmentationBuilder ovsdbConnectionAugmentationBuilder = new OvsdbNodeAugmentationBuilder();
- List<ManagedNodeEntry> managedBridges = new ArrayList<ManagedNodeEntry>();
+ List<ManagedNodeEntry> managedBridges = new ArrayList<>();
InstanceIdentifier<Node> bridgeIid = SouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(),
bridge);
ManagedNodeEntry managedBridge = new ManagedNodeEntryBuilder().setBridgeRef(
.getOtherConfigColumn().getData();
if (otherConfigs != null && !otherConfigs.isEmpty()) {
Set<String> otherConfigKeys = otherConfigs.keySet();
- List<BridgeOtherConfigs> otherConfigList = new ArrayList<BridgeOtherConfigs>();
+ List<BridgeOtherConfigs> otherConfigList = new ArrayList<>();
String otherConfigValue;
for (String otherConfigKey : otherConfigKeys) {
otherConfigValue = otherConfigs.get(otherConfigKey);
.getData();
if (externalIds != null && !externalIds.isEmpty()) {
Set<String> externalIdKeys = externalIds.keySet();
- List<BridgeExternalIds> externalIdsList = new ArrayList<BridgeExternalIds>();
+ List<BridgeExternalIds> externalIdsList = new ArrayList<>();
String externalIdValue;
for (String externalIdKey : externalIdKeys) {
externalIdValue = externalIds.get(externalIdKey);