aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-network-adapter
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-network-adapter')
-rw-r--r--adapters/mso-network-adapter/pom.xml14
-rw-r--r--adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java32
2 files changed, 23 insertions, 23 deletions
diff --git a/adapters/mso-network-adapter/pom.xml b/adapters/mso-network-adapter/pom.xml
index 48b5b3ebd4..48a19bda6e 100644
--- a/adapters/mso-network-adapter/pom.xml
+++ b/adapters/mso-network-adapter/pom.xml
@@ -2,11 +2,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
- <groupId>org.openecomp.so.adapters</groupId>
+ <groupId>org.onap.so.adapters</groupId>
<artifactId>mso-network-adapter</artifactId>
<packaging>war</packaging>
<name>mso-network-adapter</name>
@@ -53,7 +53,7 @@
<version>2.2.7</version>
</dependency>
<dependency>
- <groupId>org.openecomp.so.adapters</groupId>
+ <groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapter-utils</artifactId>
<version>${project.version}</version>
</dependency>
@@ -106,17 +106,17 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.openecomp.so.adapters</groupId>
+ <groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapter-utils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.so.adapters</groupId>
+ <groupId>org.onap.so.adapters</groupId>
<artifactId>mso-network-adapter-async-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.so.adapters</groupId>
+ <groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapters-rest-interface</artifactId>
<version>${project.version}</version>
</dependency>
@@ -145,7 +145,7 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>status-control</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java
index 2c04ae9d6b..82684bd43e 100644
--- a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java
@@ -1747,20 +1747,20 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
stackParams.put (VLANS, csl);
}
if (routeTargets != null && !routeTargets.isEmpty()) {
- StringBuilder buf = new StringBuilder ();
+ StringBuilder sb = new StringBuilder ();
String sep = "";
for (String rt : routeTargets) {
if (!isNullOrEmpty(rt))
{
if (aic3template)
- buf.append (sep).append ("target:" + rt);
+ sb.append(sep).append("target:").append(rt);
else
- buf.append (sep).append (rt);
+ sb.append (sep).append (rt);
sep = ",";
}
}
- String csl = buf.toString ();
+ String csl = sb.toString ();
stackParams.put ("route_targets", csl);
}
@@ -1985,16 +1985,16 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
String outputTempl = " subnet_id_%subnetId%:\n" + " description: Openstack subnet identifier\n"
+ " value: {get_resource: subnet_%subnetId%}\n";
- String curR;
+ StringBuilder curR;
String curO;
StringBuilder resourcesBuf = new StringBuilder ();
StringBuilder outputsBuf = new StringBuilder ();
for (Subnet subnet : subnets) {
// build template for each subnet
- curR = resourceTempl;
+ curR = new StringBuilder(resourceTempl);
if (subnet.getSubnetId () != null) {
- curR = curR.replace ("%subnetId%", subnet.getSubnetId ());
+ curR = new StringBuilder(curR.toString().replace("%subnetId%", subnet.getSubnetId()));
} else {
String error = "Missing Required AAI SubnetId for subnet in HEAT Template";
LOGGER.error (MessageEnum.RA_MISSING_PARAM, error, "Openstack", "", MsoLogger.ErrorCode.DataError, "Missing Required AAI ID for subnet in HEAT Template");
@@ -2002,13 +2002,13 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
}
if (subnet.getSubnetName () != null) {
- curR = curR.replace ("%name%", subnet.getSubnetName ());
+ curR = new StringBuilder(curR.toString().replace("%name%", subnet.getSubnetName()));
} else {
- curR = curR.replace ("%name%", subnet.getSubnetId ());
+ curR = new StringBuilder(curR.toString().replace("%name%", subnet.getSubnetId()));
}
if (subnet.getCidr () != null) {
- curR = curR.replace ("%cidr%", subnet.getCidr ());
+ curR = new StringBuilder(curR.toString().replace("%cidr%", subnet.getCidr()));
} else {
String error = "Missing Required cidr for subnet in HEAT Template";
LOGGER.error (MessageEnum.RA_MISSING_PARAM, error, "Openstack", "", MsoLogger.ErrorCode.DataError, "Missing Required cidr for subnet in HEAT Template");
@@ -2016,23 +2016,23 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
}
if (subnet.getIpVersion () != null) {
- curR = curR + " ip_version: " + subnet.getIpVersion () + "\n";
+ curR.append(" ip_version: " + subnet.getIpVersion() + "\n");
}
if (subnet.getEnableDHCP () != null) {
- curR = curR + " enable_dhcp: " + Boolean.toString (subnet.getEnableDHCP ()) + "\n";
+ curR.append(" enable_dhcp: ").append(Boolean.toString(subnet.getEnableDHCP())).append("\n");
}
if (subnet.getGatewayIp () != null && !subnet.getGatewayIp ().isEmpty() ) {
- curR = curR + " gateway_ip: " + subnet.getGatewayIp () + "\n";
+ curR.append(" gateway_ip: " + subnet.getGatewayIp() + "\n");
}
if (subnet.getAllocationPools() != null) {
- curR = curR + " allocation_pools:\n";
+ curR.append(" allocation_pools:\n");
for (Pool pool : subnet.getAllocationPools())
{
if (!isNullOrEmpty(pool.getStart()) && !isNullOrEmpty(pool.getEnd()))
{
- curR = curR + " - start: " + pool.getStart () + "\n";
- curR = curR + " end: " + pool.getEnd () + "\n";
+ curR.append(" - start: " + pool.getStart() + "\n");
+ curR.append(" end: " + pool.getEnd() + "\n");
}
}
}