aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapters-rest-interface
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-adapters-rest-interface')
-rw-r--r--adapters/mso-adapters-rest-interface/pom.xml2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java15
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java12
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java12
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/adapters/nwrest/NetworkRequestTest.java9
5 files changed, 19 insertions, 31 deletions
diff --git a/adapters/mso-adapters-rest-interface/pom.xml b/adapters/mso-adapters-rest-interface/pom.xml
index 7e341f0952..a23cb62e1e 100644
--- a/adapters/mso-adapters-rest-interface/pom.xml
+++ b/adapters/mso-adapters-rest-interface/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.4.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapters-rest-interface</artifactId>
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java
index 3e4d18cb1b..153ee78cb0 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java
@@ -54,7 +54,7 @@ public class CreateNetworkRequest extends NetworkRequestCommon {
private String networkType;
private String networkTypeVersion;
private String modelCustomizationUuid;
- private NetworkTechnology networkTechnology = NetworkTechnology.NEUTRON;
+ private String networkTechnology = "NEUTRON";
private List<Subnet> subnets;
private ProviderVlanNetwork providerVlanNetwork;
private ContrailNetwork contrailNetwork;
@@ -62,7 +62,6 @@ public class CreateNetworkRequest extends NetworkRequestCommon {
private Boolean backout = true;
private Map<String,String> networkParams = new HashMap<>();
private MsoRequest msoRequest = new MsoRequest();
- @JsonProperty
private boolean contrailRequest;
public CreateNetworkRequest() {
@@ -125,13 +124,12 @@ public class CreateNetworkRequest extends NetworkRequestCommon {
this.networkTypeVersion = networkTypeVersion;
}
- public NetworkTechnology getNetworkTechnology() {
+ public String getNetworkTechnology() {
return networkTechnology;
}
- public void setNetworkTechnology(NetworkTechnology networkTechnology) {
+ public void setNetworkTechnology(String networkTechnology) {
this.networkTechnology = networkTechnology;
- this.contrailRequest = determineContrail();
}
public List<Subnet> getSubnets() {
@@ -156,7 +154,6 @@ public class CreateNetworkRequest extends NetworkRequestCommon {
public void setContrailNetwork(ContrailNetwork contrailNetwork) {
this.contrailNetwork = contrailNetwork;
- this.contrailRequest = determineContrail();
}
public Boolean getFailIfExists() {
@@ -195,12 +192,8 @@ public class CreateNetworkRequest extends NetworkRequestCommon {
return this.contrailRequest;
}
- @JsonIgnore
- protected void setContrailRequest(boolean contrailRequest) {
+ public void setContrailRequest(boolean contrailRequest) {
this.contrailRequest = contrailRequest;
}
- private boolean determineContrail() {
- return (networkTechnology == NetworkTechnology.CONTRAIL && (contrailNetwork != null));
- }
}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java
index a7976840b7..595662251f 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java
@@ -52,7 +52,7 @@ public class UpdateNetworkRequest extends NetworkRequestCommon {
private String networkType;
private String networkTypeVersion;
private String modelCustomizationUuid;
- private NetworkTechnology networkTechnology = NetworkTechnology.NEUTRON;
+ private String networkTechnology = "NEUTRON";
private List<Subnet> subnets;
private ProviderVlanNetwork providerVlanNetwork;
private ContrailNetwork contrailNetwork;
@@ -130,13 +130,12 @@ public class UpdateNetworkRequest extends NetworkRequestCommon {
this.networkTypeVersion = networkTypeVersion;
}
- public NetworkTechnology getNetworkTechnology() {
+ public String getNetworkTechnology() {
return networkTechnology;
}
- public void setNetworkTechnology(NetworkTechnology networkTechnology) {
+ public void setNetworkTechnology(String networkTechnology) {
this.networkTechnology = networkTechnology;
- this.contrailRequest = determineContrail();
}
public List<Subnet> getSubnets() {
@@ -161,7 +160,6 @@ public class UpdateNetworkRequest extends NetworkRequestCommon {
public void setContrailNetwork(ContrailNetwork contrailNetwork) {
this.contrailNetwork = contrailNetwork;
- this.contrailRequest = determineContrail();
}
public Boolean getBackout() {
@@ -195,8 +193,4 @@ public class UpdateNetworkRequest extends NetworkRequestCommon {
return contrailRequest;
}
- private boolean determineContrail() {
- return (networkTechnology == NetworkTechnology.CONTRAIL && (contrailNetwork != null));
- }
-
}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java
index 3213323101..4fcf46975d 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java
@@ -55,8 +55,18 @@ public class Subnet implements Serializable {
private List<Pool> allocationPools;
private List<String> dnsNameServers;
+
+ private Integer subnetSequence;
+
+ public Integer getSubnetSequence() {
+ return subnetSequence;
+ }
+
+ public void setSubnetSequence(Integer subnetSequence) {
+ this.subnetSequence = subnetSequence;
+ }
- public Subnet () {
+ public Subnet () {
}
public String getSubnetName() {
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/adapters/nwrest/NetworkRequestTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/adapters/nwrest/NetworkRequestTest.java
index 08851c2ce9..5e04fc49ee 100644
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/adapters/nwrest/NetworkRequestTest.java
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/adapters/nwrest/NetworkRequestTest.java
@@ -38,13 +38,4 @@ public class NetworkRequestTest {
assertEquals(true, networkResponse.isSynchronous());
}
- @Test
- public void isContrailRequest() {
- CreateNetworkRequest networkResponse = new CreateNetworkRequest();
- assertEquals(false, networkResponse.isContrailRequest());
- networkResponse.setNetworkTechnology(NetworkTechnology.CONTRAIL);
- assertEquals(false, networkResponse.isContrailRequest());
- networkResponse.setContrailNetwork(new ContrailNetwork());
- assertEquals(true, networkResponse.isContrailRequest());
- }
}