final ReentrantLock lock = lockForUuid(subnetId);
lock.lock();
try {
- LOG.info("createSubnetmapNode: subnet ID {}", subnetId.toString());
+ LOG.info("createSubnetmapNode: subnet ID {}", subnetId.getValue());
Optional<Subnetmap> sn = SingleTransactionDataBroker.syncReadOptional(dataBroker,
LogicalDatastoreType.CONFIGURATION, subnetMapIdentifier);
if (sn.isPresent()) {
Optional<Subnetmap> sn =
SingleTransactionDataBroker.syncReadOptional(dataBroker, LogicalDatastoreType.CONFIGURATION, id);
if (!sn.isPresent()) {
- LOG.error("WithRouterFixedIP: subnetmap node for subnet {} does not exist, returning ",
+ LOG.error("updateSubnetNodeWithFixedIp: subnetmap node for subnet {} does not exist, returning ",
subnetId.getValue());
return;
}
- LOG.debug("WithRouterFixedIP: Updating existing subnetmap node for subnet ID {}",
+ LOG.debug("updateSubnetNodeWithFixedIp: Updating existing subnetmap node for subnet ID {}",
subnetId.getValue());
SubnetmapBuilder builder = new SubnetmapBuilder(sn.get());
builder.setRouterId(routerId);
subnetId.getValue());
SingleTransactionDataBroker.syncWrite(dataBroker, LogicalDatastoreType.CONFIGURATION, id, subnetmap);
} catch (ReadFailedException | TransactionCommitFailedException e) {
- LOG.error("WithRouterFixedIP: subnet map for Router FixedIp failed for node {}",
+ LOG.error("updateSubnetNodeWithFixedIp: subnet map for Router FixedIp failed for node {}",
subnetId.getValue(), e);
} finally {
lock.unlock();
Subnetmap subnetmap = null;
InstanceIdentifier<Subnetmap> id = InstanceIdentifier.builder(Subnetmaps.class).child(Subnetmap.class,
new SubnetmapKey(subnetId)).build();
- LOG.info("updateSubnetmapNodeWithPorts : subnetId {}, subnetMapId {}", subnetId.toString(), id.toString());
+ LOG.info("updateSubnetmapNodeWithPorts: Updating subnetMap with portList for subnetId {}", subnetId.getValue());
final ReentrantLock lock = lockForUuid(subnetId);
lock.lock();
try {
subnetId.getValue(), portId.getValue());
}
if (null != directPortId) {
- List<Uuid> directPortList = builder.getDirectPortList();
- if (null == directPortList) {
- directPortList = new ArrayList<>();
+ List<Uuid> existingDirectPortList = builder.getDirectPortList();
+ List<Uuid> directPortList = new ArrayList<>();
+ if (null != existingDirectPortList) {
+ directPortList.addAll(existingDirectPortList);
}
directPortList.add(directPortId);
builder.setDirectPortList(directPortList);
List<String> failStrings = associateNetworksToVpn(vpnId, networkList);
if (!failStrings.isEmpty()) {
LOG.error("VPN {} association to networks failed for networks: {}. ",
- vpnId.getValue(), failStrings.toString());
+ vpnId.getValue(), failStrings);
throw new Exception(failStrings.toString());
}
}
try {
LOG.debug("L3VPN add RPC: VpnID {}, name {}, tenantID {}, RDList {}, iRTList {}, eRTList{}, "
+ "routerIdList {}, networksList {}", vpn.getId().getValue(), vpn.getName(),
- vpn.getTenantId(), vpn.getRouteDistinguisher().toString(), vpn.getImportRT().toString(),
- vpn.getExportRT().toString(), rtrIdsList, vpn.getNetworkIds());
+ vpn.getTenantId(), vpn.getRouteDistinguisher(), vpn.getImportRT(),
+ vpn.getExportRT(), rtrIdsList, vpn.getNetworkIds());
List<String> rdList = vpn.getRouteDistinguisher() != null
? new ArrayList<>(vpn.getRouteDistinguisher()) : new ArrayList<>();
return;
}
final VpnInstance vpnInstance = VpnHelper.getVpnInstance(dataBroker, vpnId.getValue());
- LOG.debug("addSubnetToVpn: VpnInstance {}", vpnInstance.toString());
+ LOG.debug("addSubnetToVpn: VpnInstance {}", vpnInstance);
if (isVpnOfTypeL2(vpnInstance)) {
neutronEvpnUtils.updateElanAndVpn(vpnInstance, sn.getNetworkId().getValue(),
NeutronEvpnUtils.Operation.ADD);
if (!isExternalNetwork) {
updateVpnMaps(vpnId, null, null, null, new ArrayList<>(passedNwList));
}
- LOG.info("Network(s) {} associated to L3VPN {} successfully", passedNwList.toString(), vpnId.getValue());
+ LOG.info("Network(s) {} associated to L3VPN {} successfully", passedNwList, vpnId.getValue());
return failedNwList;
}
}
clearFromVpnMaps(vpnId, null, new ArrayList<>(passedNwList));
LOG.info("dissociateNetworksFromVpn: Network(s) {} disassociated from L3VPN {} successfully",
- passedNwList.toString(), vpnId.getValue());
+ passedNwList, vpnId.getValue());
return failedNwList;
}
try {
if (neutronvpnUtils.getVpnMap(vpnId) != null) {
LOG.debug("associateNetworks RPC: VpnId {}, networkList {}", vpnId.getValue(),
- input.getNetworkId().toString());
+ input.getNetworkId());
List<Uuid> netIds = input.getNetworkId();
if (netIds != null && !netIds.isEmpty()) {
List<String> failed = associateNetworksToVpn(vpnId, netIds);
try {
if (neutronvpnUtils.getVpnMap(vpnId) != null) {
LOG.debug("dissociateNetworks RPC: VpnId {}, networkList {}", vpnId.getValue(),
- input.getNetworkId().toString());
+ input.getNetworkId());
List<Uuid> netIds = input.getNetworkId();
if (netIds != null && !netIds.isEmpty()) {
List<String> failed = dissociateNetworksFromVpn(vpnId, netIds);