summaryrefslogtreecommitdiffstats
path: root/quantum-model/src/test
diff options
context:
space:
mode:
authorRamesh Parthasarathy <ramesh.parthasarathy@att.com>2019-09-24 10:11:35 -0700
committerRamesh Parthasarathy <ramesh.parthasarathy@att.com>2019-09-24 10:13:40 -0700
commite0b745eb060db35bb3da1a24ee778b622da9295b (patch)
treeda2f7456a3ebbd0a83b50bb31f7b54db76253572 /quantum-model/src/test
parentcef365681191dd67ae790ba9553efd2776890a11 (diff)
Addressed the error in retrieving subnets
Addressed the error in retrieving subnets with SO Libs repository openstack SDK project Issue-ID: SO-2361 Signed-off-by: Ramesh Parthasarathy(rp6768)<ramesh.parthasarathy@att.com> Change-Id: If54a8097ca16a266b075d3e5bfcf09157947087d
Diffstat (limited to 'quantum-model/src/test')
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java6
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java8
2 files changed, 10 insertions, 4 deletions
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java
index 11c178b..9973ec0 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java
@@ -41,7 +41,9 @@ public class SubnetTest {
+ " \"dns_nameservers\" : [ \"dnsnames-v1\", \"dnsnames-v2\" ]," + EOL + " \"allocation_pools\" : [ {"
+ EOL + " \"start\" : \"start\"," + EOL + " \"end\" : \"end\"" + EOL + " }, {" + EOL
+ " \"start\" : \"start\"," + EOL + " \"end\" : \"end\"" + EOL + " } ]," + EOL
- + " \"host_routes\" : [ \"hostroutes-v1\", \"hostroutes-v2\" ]," + EOL + " \"ip_version\" : 4," + EOL
+ + " \"host_routes\" : [ {" + EOL + " \"destination\" : \"destination\"," + EOL
+ + " \"nexthop\" : \"nexthop\"" + EOL + " }, {" + EOL + " \"destination\" : \"destination\","
+ + EOL + " \"nexthop\" : \"nexthop\"" + EOL + " } ]," + EOL + " \"ip_version\" : 4," + EOL
+ " \"gateway_ip\" : \"gw\"" + EOL + " }" + EOL + "}";
private ObjectMapper objectMapper = new ObjectMapper().setSerializationInclusion(Include.NON_NULL)
@@ -73,7 +75,7 @@ public class SubnetTest {
Assert.assertEquals(2, dnsNames.size());
subnet.setDnsNames(dnsNames);
- List<String> hostRoutes = subnet.getHostRoutes();
+ List<Routes> hostRoutes = subnet.getHostRoutes();
Assert.assertNotNull(hostRoutes);
Assert.assertEquals(2, hostRoutes.size());
subnet.setHostRoutes(hostRoutes);
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java
index 02f4c75..cfab9fe 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java
@@ -40,14 +40,18 @@ public class SubnetsTest {
+ " \"dns_nameservers\" : [ \"dnsnames-v1\", \"dnsnames-v2\" ]," + EOL + " \"allocation_pools\" : [ {"
+ EOL + " \"start\" : \"start\"," + EOL + " \"end\" : \"end\"" + EOL + " }, {" + EOL
+ " \"start\" : \"start\"," + EOL + " \"end\" : \"end\"" + EOL + " } ]," + EOL
- + " \"host_routes\" : [ \"hostroutes-v1\", \"hostroutes-v2\" ]," + EOL + " \"ip_version\" : 4," + EOL
+ + " \"host_routes\" : [ {" + EOL + " \"destination\" : \"destination\"," + EOL
+ + " \"nexthop\" : \"nexthop\"" + EOL + " }, {" + EOL + " \"destination\" : \"destination\","
+ + EOL + " \"nexthop\" : \"nexthop\"" + EOL + " } ]," + EOL + " \"ip_version\" : 4," + EOL
+ " \"gateway_ip\" : \"gw\"" + EOL + " }, {" + EOL + " \"name\" : \"name\"," + EOL
+ " \"cidr\" : \"cidr\"," + EOL + " \"enable_dhcp\" : true," + EOL
+ " \"network_id\" : \"networkid\"," + EOL + " \"tenant_id\" : \"tenantid\"," + EOL
+ " \"dns_nameservers\" : [ \"dnsnames-v1\", \"dnsnames-v2\" ]," + EOL + " \"allocation_pools\" : [ {"
+ EOL + " \"start\" : \"start\"," + EOL + " \"end\" : \"end\"" + EOL + " }, {" + EOL
+ " \"start\" : \"start\"," + EOL + " \"end\" : \"end\"" + EOL + " } ]," + EOL
- + " \"host_routes\" : [ \"hostroutes-v1\", \"hostroutes-v2\" ]," + EOL + " \"ip_version\" : 4," + EOL
+ + " \"host_routes\" : [ {" + EOL + " \"destination\" : \"destination\"," + EOL
+ + " \"nexthop\" : \"nexthop\"" + EOL + " }, {" + EOL + " \"destination\" : \"destination\","
+ + EOL + " \"nexthop\" : \"nexthop\"" + EOL + " } ]," + EOL + " \"ip_version\" : 4," + EOL
+ " \"gateway_ip\" : \"gw\"" + EOL + " } ]" + EOL + "}";
private ObjectMapper objectMapper = new ObjectMapper().setSerializationInclusion(Include.NON_NULL)