@Configuration
public Option[] config() {
return new Option[] {
- // Provision and launch a container based on a distribution of Karaf (Apache ServiceMix).
- // FIXME: need to *NOT* hardcode the version here - it breaks on
- // version bumps
- karafDistributionConfiguration()
- .frameworkUrl(
- maven()
- .groupId("org.opendaylight.neutron")
- .artifactId("neutron-karaf")
- .type("zip")
- .versionAsInProject())
- .karafVersion("3.0.3")
- .name("Neutron")
- .unpackDirectory(new File("target/pax"))
- .useDeployFolder(false),
- // It is really nice if the container sticks around after the test so you can check the contents
- // of the data directory when things go wrong.
- vmOption("-javaagent:../jars/org.jacoco.agent.jar=destfile=jacoco-it.exec"),
- keepRuntimeFolder(),
- // Don't bother with local console output as it just ends up cluttering the logs
- configureConsole().ignoreLocalConsole(),
- // Force the log level to INFO so we have more details during the test. It defaults to WARN.
- logLevel(LogLevel.INFO),
- // provision the needed features for this test
- // features("mvn:org.opendaylight.neutron/features-test/0.5.0-SNAPSHOT/xml/features",
- // "features-neutron-test"),
- // Remember that the test executes in another process. If you want to debug it, you need
- // to tell Pax Exam to launch that process with debugging enabled. Launching the test class itself with
- // debugging enabled (for example in Eclipse) will not get you the desired results.
- when(Boolean.getBoolean(KARAF_DEBUG_PROP))
- .useOptions(KarafDistributionOption.debugConfiguration(KARAF_DEBUG_PORT, true)),
- };
+ // Provision and launch a container based on a distribution of Karaf (Apache ServiceMix).
+ // FIXME: need to *NOT* hardcode the version here - it breaks on
+ // version bumps
+ karafDistributionConfiguration()
+ .frameworkUrl(maven().groupId("org.opendaylight.neutron").artifactId("neutron-karaf")
+ .type("zip").versionAsInProject())
+ .karafVersion("3.0.3").name("Neutron").unpackDirectory(new File("target/pax"))
+ .useDeployFolder(false),
+ // It is really nice if the container sticks around after the test so you can check the contents
+ // of the data directory when things go wrong.
+ vmOption("-javaagent:../jars/org.jacoco.agent.jar=destfile=jacoco-it.exec"), keepRuntimeFolder(),
+ // Don't bother with local console output as it just ends up cluttering the logs
+ configureConsole().ignoreLocalConsole(),
+ // Force the log level to INFO so we have more details during the test. It defaults to WARN.
+ logLevel(LogLevel.INFO),
+ // provision the needed features for this test
+ // features("mvn:org.opendaylight.neutron/features-test/0.5.0-SNAPSHOT/xml/features",
+ // "features-neutron-test"),
+ // Remember that the test executes in another process. If you want to debug it, you need
+ // to tell Pax Exam to launch that process with debugging enabled. Launching the test class itself with
+ // debugging enabled (for example in Eclipse) will not get you the desired results.
+ when(Boolean.getBoolean(KARAF_DEBUG_PROP))
+ .useOptions(KarafDistributionOption.debugConfiguration(KARAF_DEBUG_PORT, true)), };
}
final String base = "http://127.0.0.1:8080/controller/nb/v2/neutron";
NeutronL2GatewayConnectionTests.runTests(base);
NeutronQosPolicyTests.runTests(base);
- // tests related to bugs
+ // tests related to bugs
Neutron_Bug3812_Tests.runTests(base);
Tempest_PortsIpV6TestJSON.runTests(base);
Neutron_Bug4027_Tests.runTests(base);
httpConn.setRequestMethod("GET");
httpConn.setRequestProperty("Content-Type", "application/json");
httpConn.setRequestProperty("Authorization", "Basic YWRtaW46YWRtaW4=");
- return(httpConn);
+ return httpConn;
}
static HttpURLConnection HttpURLConnectionFactoryDelete(URL url) throws Exception {
httpConn.setRequestMethod("DELETE");
httpConn.setRequestProperty("Content-Type", "application/json");
httpConn.setRequestProperty("Authorization", "Basic YWRtaW46YWRtaW4=");
- return(httpConn);
+ return httpConn;
}
static HttpURLConnection HttpURLConnectionFactoryPost(URL url, String content) throws Exception {
httpConn.setRequestProperty("Content-Type", "application/json");
httpConn.setRequestProperty("Authorization", "Basic YWRtaW46YWRtaW4=");
httpConn.setDoOutput(true);
- OutputStreamWriter out = new OutputStreamWriter(
- httpConn.getOutputStream());
+ OutputStreamWriter out = new OutputStreamWriter(httpConn.getOutputStream());
out.write(content);
out.close();
- return(httpConn);
+ return httpConn;
}
static HttpURLConnection HttpURLConnectionFactoryPut(URL url, String content) throws Exception {
httpConn.setRequestProperty("Content-Type", "application/json");
httpConn.setRequestProperty("Authorization", "Basic YWRtaW46YWRtaW4=");
httpConn.setDoOutput(true);
- OutputStreamWriter out = new OutputStreamWriter(
- httpConn.getOutputStream());
+ OutputStreamWriter out = new OutputStreamWriter(httpConn.getOutputStream());
out.write(content);
out.close();
- return(httpConn);
+ return httpConn;
}
static void test_create(String url_s, String content, String context) {
JsonObject jsonObjectInput = gson.fromJson(content, JsonObject.class);
Set<Map.Entry<String, JsonElement>> entrySet = jsonObjectInput.entrySet();
JsonObject jsonObjectOutput = entrySet.iterator().next().getValue().getAsJsonObject();
- for (Map.Entry<String, JsonElement> element: jsonObjectOutput.entrySet()) {
+ for (Map.Entry<String, JsonElement> element : jsonObjectOutput.entrySet()) {
String key = element.getKey();
JsonElement jsonElementValue = element.getValue();
// Query only values that are non null Primitives - Integer,Strings,character and boolean
if (jsonElementValue.isJsonPrimitive() && (!jsonElementValue.isJsonNull())) {
String valueStr = jsonElementValue.getAsString();
valueStr = valueStr.replaceAll("\\s+", "+");
- String queryUrl = url_s + "?" + key + "=" + valueStr;
+ String queryUrl = url_s + "?" + key + "=" + valueStr;
String context = collectionName + " " + key + "=" + jsonElementValue.toString() + " Get Failed";
test_fetch_collection_response(queryUrl, collectionName, context);
}
//TODO handle SB check
public String singleton_bgpvpn_create_test() {
String url = base + "/bgpvpns";
- String content = "{ \"bgpvpn\": {" +
- " \"status\": \"ACTIVE\", \"type\": \"l3\", " +
- " \"name\": \"vpn1\", \"admin_state_up\": true, " +
- " \"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " +
- " \"route_targets\": \"64512:1\", " +
- " \"networks\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", " +
- " \"auto_aggregate\": true, \"id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\" " +
- " } }";
+ String content = "{ \"bgpvpn\": {" + " \"status\": \"ACTIVE\", \"type\": \"l3\", "
+ + " \"name\": \"vpn1\", \"admin_state_up\": true, "
+ + " \"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " + " \"route_targets\": \"64512:1\", "
+ + " \"networks\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", "
+ + " \"auto_aggregate\": true, \"id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\" " + " } }";
ITNeutronE2E.test_create(url, content, "Singleton Bgpvpn Post Failed NB");
return content;
}
//TODO handle SB check
public void bulk_bgpvpn_create_test() {
String url = base + "/bgpvpns";
- String content = "{ \"bgpvpns\": [ { " +
- "\"status\": \"ACTIVE\", " +
- "\"name\": \"sample_bgpvpn1\", " +
- "\"admin_state_up\": true, " +
- "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", " +
- "\"id\": \"bc1a76cb-8767-4c3a-bb95-018b822f2130\", " +
- "\"route_targets\": \"64512:1\", " +
- "\"auto_aggregate\": true, " +
- "\"type\": \"l3\" }, { " +
- "\"status\": \"ACTIVE\", " +
- "\"name\": \"sample_bgpvpn2\", " +
- "\"admin_state_up\": true, " +
- "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", " +
- "\"id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", " +
- "\"route_targets\": \"64512:2\", " +
- "\"auto_aggregate\": false, " +
- "\"type\": \"l3\" } ] } ";
- ITNeutronE2E.test_create(url, content,"Bulk Bgpvpn Post Failed");
+ String content = "{ \"bgpvpns\": [ { " + "\"status\": \"ACTIVE\", " + "\"name\": \"sample_bgpvpn1\", "
+ + "\"admin_state_up\": true, " + "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
+ + "\"id\": \"bc1a76cb-8767-4c3a-bb95-018b822f2130\", " + "\"route_targets\": \"64512:1\", "
+ + "\"auto_aggregate\": true, " + "\"type\": \"l3\" }, { " + "\"status\": \"ACTIVE\", "
+ + "\"name\": \"sample_bgpvpn2\", " + "\"admin_state_up\": true, "
+ + "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
+ + "\"id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", " + "\"route_targets\": \"64512:2\", "
+ + "\"auto_aggregate\": false, " + "\"type\": \"l3\" } ] } ";
+ ITNeutronE2E.test_create(url, content, "Bulk Bgpvpn Post Failed");
}
//TODO handle SB check
public void bgpvpn_update_test() {
String url = base + "/bgpvpns/bc1a76cb-8767-4c3a-bb95-018b822f2130";
- String content = " { \"bgpvpn\": { " +
- "\"status\": \"ACTIVE\", " +
- "\"name\": \"sample_bgpvpn_updated\", " +
- "\"admin_state_up\": true, " +
- "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", " +
- "\"auto_aggregate\": true, " +
- "\"type\": \"l3\" } } ";
- ITNeutronE2E.test_modify(url, content,"Bgpvpn Put Failed");
+ String content = " { \"bgpvpn\": { " + "\"status\": \"ACTIVE\", " + "\"name\": \"sample_bgpvpn_updated\", "
+ + "\"admin_state_up\": true, " + "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
+ + "\"auto_aggregate\": true, " + "\"type\": \"l3\" } } ";
+ ITNeutronE2E.test_modify(url, content, "Bgpvpn Put Failed");
}
public void bgpvpn_element_get_test() {
}
public void bgpvpn_element_get_test_with_added_query() {
- String url = base + "/bgpvpns/bc1a76cb-8767-4c3a-bb95-018b822f2130" +
- "?fields=id&fields=tenant_id&fields=name&fields=type" +
- "fields=route_targets&fields=status&fields=admin_state_up" +
- "&fields=tenant_id&fields=auto_aggregate";
+ String url = base + "/bgpvpns/bc1a76cb-8767-4c3a-bb95-018b822f2130"
+ + "?fields=id&fields=tenant_id&fields=name&fields=type"
+ + "fields=route_targets&fields=status&fields=admin_state_up"
+ + "&fields=tenant_id&fields=auto_aggregate";
ITNeutronE2E.test_fetch(url, true, "Bgpvpn Element Get Failed");
}
public String singleton_fw_policy_create_test() {
String url = base + "/fw/firewall_policies";
- String content = " { \"firewall_policy\": { \"audited\": false," +
- "\"description\": \"\", \"firewall_rules\": [" +
- "\"8722e0e0-9cc9-4490-9660-8c9a5732fbb0\" ]," +
- "\"id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\"," +
- "\"name\": \"test-policy\", \"shared\": false," +
- "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
+ String content = " { \"firewall_policy\": { \"audited\": false,"
+ + "\"description\": \"\", \"firewall_rules\": [" + "\"8722e0e0-9cc9-4490-9660-8c9a5732fbb0\" ],"
+ + "\"id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\"," + "\"name\": \"test-policy\", \"shared\": false,"
+ + "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
ITNeutronE2E.test_create(url, content, "Firewall Policy Singleton Post Failed");
return content;
}
public void fw_policy_modify_test() {
String url = base + "/fw/firewall_policies/c69933c1-b472-44f9-8226-30dc4ffd454c";
- String content = " { \"firewall_policy\": { \"audited\": false," +
- "\"description\": \"\", \"firewall_rules\": [" +
- "\"a08ef905-0ff6-4784-8374-175fffe7dade\"," +
- "\"8722e0e0-9cc9-4490-9660-8c9a5732fbb0\" ]," +
- "\"id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\"," +
- "\"name\": \"test-policy\", \"shared\": false," +
- "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
+ String content = " { \"firewall_policy\": { \"audited\": false,"
+ + "\"description\": \"\", \"firewall_rules\": [" + "\"a08ef905-0ff6-4784-8374-175fffe7dade\","
+ + "\"8722e0e0-9cc9-4490-9660-8c9a5732fbb0\" ]," + "\"id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\","
+ + "\"name\": \"test-policy\", \"shared\": false,"
+ + "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
ITNeutronE2E.test_modify(url, content, "Firewall Policy Singleton Post Failed");
}
}
public void fw_policy_element_get_with_query_test() {
- String url = base + "/fw/firewall_policies/c69933c1-b472-44f9-8226-30dc4ffd454c" +
- "?fields=tenant_id&field=id&fields=name&fields=description" +
- "&fields=shared&fields=firewall_rules&fields=audited" +
- "&fields=limit&fields=marker&fields=page_reverse";
- ;
+ String url = base + "/fw/firewall_policies/c69933c1-b472-44f9-8226-30dc4ffd454c"
+ + "?fields=tenant_id&field=id&fields=name&fields=description"
+ + "&fields=shared&fields=firewall_rules&fields=audited"
+ + "&fields=limit&fields=marker&fields=page_reverse";
+ ;
ITNeutronE2E.test_fetch(url, true, "Firewall Policy Element Get with Query Failed");
}
public String singleton_fw_rule_create_test() {
String url = base + "/fw/firewall_rules";
- String content = "{ \"firewall_rule\": { \"action\": \"allow\"," +
- "\"destination_ip_address\": null," +
- "\"destination_port_min\": \"80\", \"destination_port_max\": \"80\"," +
- "\"enabled\": true," +
- "\"firewall_policy_id\": null," +
- "\"id\": \"8722e0e0-9cc9-4490-9660-8c9a5732fbb0\"," +
- "\"ip_version\": 4, \"name\": \"ALLOW_HTTP\"," +
- "\"position\": null, \"protocol\": \"tcp\"," +
- "\"shared\": false, \"source_ip_address\": null," +
- "\"source_port_min\": null, \"source_port_max\": null," +
- "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
+ String content = "{ \"firewall_rule\": { \"action\": \"allow\"," + "\"destination_ip_address\": null,"
+ + "\"destination_port_min\": \"80\", \"destination_port_max\": \"80\"," + "\"enabled\": true,"
+ + "\"firewall_policy_id\": null," + "\"id\": \"8722e0e0-9cc9-4490-9660-8c9a5732fbb0\","
+ + "\"ip_version\": 4, \"name\": \"ALLOW_HTTP\"," + "\"position\": null, \"protocol\": \"tcp\","
+ + "\"shared\": false, \"source_ip_address\": null,"
+ + "\"source_port_min\": null, \"source_port_max\": null,"
+ + "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
ITNeutronE2E.test_create(url, content, "Firewall Rule Singleton Post Failed");
return content;
}
public void fw_rule_modify_test() {
String url = base + "/fw/firewall_rules/8722e0e0-9cc9-4490-9660-8c9a5732fbb0";
- String content = "{ \"firewall_rule\": { \"action\": \"allow\"," +
- "\"destination_ip_address\": null," +
- "\"destination_port_min\": \"80\", \"destination_port_max\": \"80\"," +
- "\"enabled\": true," +
- "\"firewall_policy_id\": null," +
- "\"id\": \"8722e0e0-9cc9-4490-9660-8c9a5732fbb0\"," +
- "\"ip_version\": 4, \"name\": \"ALLOW_HTTP\"," +
- "\"position\": null, \"protocol\": \"tcp\"," +
- "\"shared\": true, \"source_ip_address\": null," +
- "\"source_port_min\": null, \"source_port_max\": null," +
- "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
+ String content = "{ \"firewall_rule\": { \"action\": \"allow\"," + "\"destination_ip_address\": null,"
+ + "\"destination_port_min\": \"80\", \"destination_port_max\": \"80\"," + "\"enabled\": true,"
+ + "\"firewall_policy_id\": null," + "\"id\": \"8722e0e0-9cc9-4490-9660-8c9a5732fbb0\","
+ + "\"ip_version\": 4, \"name\": \"ALLOW_HTTP\"," + "\"position\": null, \"protocol\": \"tcp\","
+ + "\"shared\": true, \"source_ip_address\": null,"
+ + "\"source_port_min\": null, \"source_port_max\": null,"
+ + "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
ITNeutronE2E.test_modify(url, content, "Firewall Rule Singleton Put Failed");
}
}
public void fw_rule_element_get_with_query_test() {
- String url = base + "/fw/firewall_rules/8722e0e0-9cc9-4490-9660-8c9a5732fbb0" +
- "?fields=id&fields=tenant_id&fields=name" +
- "&fields=shared&fields=firewall_policy_id&fields=protocol&fields=enabled" +
- "&fields=source_ip_address&fields=destination_ip_address" +
- "&fields=destination_port_min&fields=destination_port_max&fields=position" +
- "&fields=action&fields=source_port_min&fields=source_port_max" +
- "&fields=limit&fields=marker&fields=page_reverse";
+ String url = base + "/fw/firewall_rules/8722e0e0-9cc9-4490-9660-8c9a5732fbb0"
+ + "?fields=id&fields=tenant_id&fields=name"
+ + "&fields=shared&fields=firewall_policy_id&fields=protocol&fields=enabled"
+ + "&fields=source_ip_address&fields=destination_ip_address"
+ + "&fields=destination_port_min&fields=destination_port_max&fields=position"
+ + "&fields=action&fields=source_port_min&fields=source_port_max"
+ + "&fields=limit&fields=marker&fields=page_reverse";
ITNeutronE2E.test_fetch(url, true, "Firewall Rule Element Get With Query Failed");
}
public String singleton_fw_create_test() {
String url = base + "/fw/firewalls";
- String content = " { \"firewall\": { \"admin_state_up\": true," +
- "\"description\": \"\"," +
- "\"firewall_policy_id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\"," +
- "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\"," +
- "\"name\": \"\", \"status\": \"PENDING_CREATE\"," +
- "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
+ String content = " { \"firewall\": { \"admin_state_up\": true," + "\"description\": \"\","
+ + "\"firewall_policy_id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\","
+ + "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\","
+ + "\"name\": \"\", \"status\": \"PENDING_CREATE\","
+ + "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
ITNeutronE2E.test_create(url, content, "Firewall Singleton Post Failed");
return content;
}
public void fw_modify_test() {
String url = base + "/fw/firewalls/3b0ef8f4-82c7-44d4-a4fb-6177f9a21977";
- String content = " { \"firewall\": { \"admin_state_up\": false," +
- "\"description\": \"\"," +
- "\"firewall_policy_id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\"," +
- "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\"," +
- "\"name\": \"\", \"status\": \"PENDING_CREATE\"," +
- "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
+ String content = " { \"firewall\": { \"admin_state_up\": false," + "\"description\": \"\","
+ + "\"firewall_policy_id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\","
+ + "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\","
+ + "\"name\": \"\", \"status\": \"PENDING_CREATE\","
+ + "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
ITNeutronE2E.test_modify(url, content, "Firewall Singleton Post Failed");
}
}
public void fw_element_get_with_query_test() {
- String url = base + "/fw/firewalls/3b0ef8f4-82c7-44d4-a4fb-6177f9a21977" +
- "?fields=tenant_id&fields=id&fields=name&fields=description&fields=shared" +
- "&fields=admin_state_up&fields=status&fields=firewall_policy_id" +
- "&fields=limit&fields=marker&fields=page_reverse";
+ String url = base + "/fw/firewalls/3b0ef8f4-82c7-44d4-a4fb-6177f9a21977"
+ + "?fields=tenant_id&fields=id&fields=name&fields=description&fields=shared"
+ + "&fields=admin_state_up&fields=status&fields=firewall_policy_id"
+ + "&fields=limit&fields=marker&fields=page_reverse";
ITNeutronE2E.test_fetch(url, true, "Firewall Element Get With Query Failed");
}
public void fw_collection_bug4944_test() {
String url = base + "/fw/firewalls";
- String content = " { \"firewall\": { \"admin_state_up\": true,\"shared\": false," +
- "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\" } }";
+ String content = " { \"firewall\": { \"admin_state_up\": true,\"shared\": false,"
+ + "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\" } }";
ITNeutronE2E.test_create(url, content, "Firewall Singleton Post Failed");
url = base + "/fw/firewalls?shared=false";
ITNeutronE2E.test_fetch_collection_response(url, "firewalls", "Firewall Collection Get Response Failed");
public void floatingIP_collection_get_test() {
String url = base + "/floatingips";
- ITNeutronE2E.test_fetch(url,"FloatingIP Collection GET failed");
+ ITNeutronE2E.test_fetch(url, "FloatingIP Collection GET failed");
}
public String singleton_floatingIP_create_test() {
String url = base + "/floatingips";
- String content = "{ \"floatingip\": { " +
- "\"fixed_ip_address\": \"10.0.0.3\"," +
- "\"floating_ip_address\": \"172.24.4.228\"," +
- "\"floating_network_id\": \"376da547-b977-4cfe-9cba-275c80debf57\"," +
- "\"id\": \"2f245a7b-796b-4f26-9cf9-9e82d248fda7\"," +
- "\"port_id\": \"ce705c24-c1ef-408a-bda3-7bbd946164ab\"," +
- "\"router_id\": \"d23abc8d-2991-4a55-ba98-2aaea84cc72f\"," +
- "\"status\": \"ACTIVE\"," +
- "\"tenant_id\": \"4969c491a3c74ee4af974e6d800c62de\" } }";
+ String content = "{ \"floatingip\": { " + "\"fixed_ip_address\": \"10.0.0.3\","
+ + "\"floating_ip_address\": \"172.24.4.228\","
+ + "\"floating_network_id\": \"376da547-b977-4cfe-9cba-275c80debf57\","
+ + "\"id\": \"2f245a7b-796b-4f26-9cf9-9e82d248fda7\","
+ + "\"port_id\": \"ce705c24-c1ef-408a-bda3-7bbd946164ab\","
+ + "\"router_id\": \"d23abc8d-2991-4a55-ba98-2aaea84cc72f\"," + "\"status\": \"ACTIVE\","
+ + "\"tenant_id\": \"4969c491a3c74ee4af974e6d800c62de\" } }";
ITNeutronE2E.test_create(url, content, "Singleton Floating IP Post Failed NB");
return content;
}
public void update_floatingIP_test() {
String url = base + "/floatingips/2f245a7b-796b-4f26-9cf9-9e82d248fda7";
- String content1 = "{ \"floatingip\": {" +
- "\"floating_network_id\": \"376da547-b977-4cfe-9cba-275c80debf57\"," +
- "\"router_id\": \"d23abc8d-2991-4a55-ba98-2aaea84cc72f\"," +
- "\"fixed_ip_address\": \"10.0.0.4\"," +
- "\"floating_ip_address\": \"172.24.4.228\"," +
- "\"tenant_id\": \"4969c491a3c74ee4af974e6d800c62de\"," +
- "\"status\": \"ACTIVE\"," +
- "\"port_id\": \"fc861431-0e6c-4842-a0ed-e2363f9bc3a8\"," +
- "\"id\": \"2f245a7b-796b-4f26-9cf9-9e82d248fda7\" } }";
+ String content1 = "{ \"floatingip\": {" + "\"floating_network_id\": \"376da547-b977-4cfe-9cba-275c80debf57\","
+ + "\"router_id\": \"d23abc8d-2991-4a55-ba98-2aaea84cc72f\"," + "\"fixed_ip_address\": \"10.0.0.4\","
+ + "\"floating_ip_address\": \"172.24.4.228\"," + "\"tenant_id\": \"4969c491a3c74ee4af974e6d800c62de\","
+ + "\"status\": \"ACTIVE\"," + "\"port_id\": \"fc861431-0e6c-4842-a0ed-e2363f9bc3a8\","
+ + "\"id\": \"2f245a7b-796b-4f26-9cf9-9e82d248fda7\" } }";
ITNeutronE2E.test_modify(url, content1, "Singleton Floating IP Put 1 Failed NB");
- String content2= " { \"floatingip\": {" +
- "\"floating_network_id\": \"376da547-b977-4cfe-9cba-275c80debf57\"," +
- "\"router_id\": \"d23abc8d-2991-4a55-ba98-2aaea84cc72f\"," +
- "\"fixed_ip_address\": null," +
- "\"floating_ip_address\": \"172.24.4.228\"," +
- "\"tenant_id\": \"4969c491a3c74ee4af974e6d800c62de\"," +
- "\"status\": \"ACTIVE\"," +
- "\"port_id\": null," +
- "\"id\": \"2f245a7b-796b-4f26-9cf9-9e82d248fda7\" } }";
+ String content2 = " { \"floatingip\": {" + "\"floating_network_id\": \"376da547-b977-4cfe-9cba-275c80debf57\","
+ + "\"router_id\": \"d23abc8d-2991-4a55-ba98-2aaea84cc72f\"," + "\"fixed_ip_address\": null,"
+ + "\"floating_ip_address\": \"172.24.4.228\"," + "\"tenant_id\": \"4969c491a3c74ee4af974e6d800c62de\","
+ + "\"status\": \"ACTIVE\"," + "\"port_id\": null,"
+ + "\"id\": \"2f245a7b-796b-4f26-9cf9-9e82d248fda7\" } }";
ITNeutronE2E.test_modify(url, content2, "Singleton Floating IP Put 2 Failed NB");
}
}
public void floatingIP_element_get_with_query_test() {
- String url = base + "/floatingips/2f245a7b-796b-4f26-9cf9-9e82d248fda7" +
- "?fields=id&fields=floating_network_id&fields=port_id&fields=status" +
- "&fields=fixed_ip_address&fields=floating_ip_address&fields=tenant_id" +
- "&fields=router_id&fields=limit&fields=marker&fields=page_reverse";
+ String url = base + "/floatingips/2f245a7b-796b-4f26-9cf9-9e82d248fda7"
+ + "?fields=id&fields=floating_network_id&fields=port_id&fields=status"
+ + "&fields=fixed_ip_address&fields=floating_ip_address&fields=tenant_id"
+ + "&fields=router_id&fields=limit&fields=marker&fields=page_reverse";
ITNeutronE2E.test_fetch(url, true, "Floating IP Element Get Query Test");
}
public String singleton_ikePolicy_create_test() {
String url = base + "/vpn/ikepolicies";
- String content = " { \"ikepolicy\": { \"name\": \"ikepolicy1\"," +
- "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\"," +
- "\"auth_algorithm\": \"sha1\"," +
- "\"encryption_algorithm\": \"aes-128\"," +
- "\"pfs\": \"group5\"," +
- "\"phase1_negotiation_mode\": \"main\"," +
- "\"lifetime\": { \"units\": \"seconds\"," +
- "\"value\": 7200}," +
- "\"ike_version\": \"v1\"," +
- "\"id\": \"5522aff7-1b3c-48dd-9c3c-b50f016b73db\"," +
- "\"description\": \"\" } }";
+ String content = " { \"ikepolicy\": { \"name\": \"ikepolicy1\","
+ + "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\"," + "\"auth_algorithm\": \"sha1\","
+ + "\"encryption_algorithm\": \"aes-128\"," + "\"pfs\": \"group5\","
+ + "\"phase1_negotiation_mode\": \"main\"," + "\"lifetime\": { \"units\": \"seconds\","
+ + "\"value\": 7200}," + "\"ike_version\": \"v1\"," + "\"id\": \"5522aff7-1b3c-48dd-9c3c-b50f016b73db\","
+ + "\"description\": \"\" } }";
ITNeutronE2E.test_create(url, content, "IKE Policy POST failed");
return content;
}
public void ikePolicy_update_test() {
String url = base + "/vpn/ikepolicies/5522aff7-1b3c-48dd-9c3c-b50f016b73db";
- String content = " { \"ikepolicy\": { \"name\": \"ikepolicy1\"," +
- "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\"," +
- "\"auth_algorithm\": \"sha1\"," +
- "\"encryption_algorithm\": \"aes-256\"," +
- "\"pfs\": \"group5\"," +
- "\"phase1_negotiation_mode\": \"main\"," +
- "\"lifetime\": { \"units\": \"seconds\", \"value\": 3600 }," +
- "\"ike_version\": \"v1\"," +
- "\"id\": \"5522aff7-1b3c-48dd-9c3c-b50f016b73db\"," +
- "\"description\": \"\" } }";
+ String content = " { \"ikepolicy\": { \"name\": \"ikepolicy1\","
+ + "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\"," + "\"auth_algorithm\": \"sha1\","
+ + "\"encryption_algorithm\": \"aes-256\"," + "\"pfs\": \"group5\","
+ + "\"phase1_negotiation_mode\": \"main\","
+ + "\"lifetime\": { \"units\": \"seconds\", \"value\": 3600 }," + "\"ike_version\": \"v1\","
+ + "\"id\": \"5522aff7-1b3c-48dd-9c3c-b50f016b73db\"," + "\"description\": \"\" } }";
ITNeutronE2E.test_modify(url, content, "IKE Policy PUT failed");
}
}
public void ikePolicy_element_get_with_query_test() {
- String url = base + "/vpn/ikepolicies/5522aff7-1b3c-48dd-9c3c-b50f016b73db" +
- "?fields=id&fields=tenant_id&fields=name&fields=description&fields=pfs" +
- "&fields=auth_algorithm&fields=phase1_negotiation_mode" +
- "&fields=ike_version&fields=encryption_algorithm";
+ String url = base + "/vpn/ikepolicies/5522aff7-1b3c-48dd-9c3c-b50f016b73db"
+ + "?fields=id&fields=tenant_id&fields=name&fields=description&fields=pfs"
+ + "&fields=auth_algorithm&fields=phase1_negotiation_mode"
+ + "&fields=ike_version&fields=encryption_algorithm";
ITNeutronE2E.test_fetch(url, true, "IKE Policy Element GET With Query failed");
}
ike_policy_tester.ikePolicy_element_negative_get_test();
}
}
-
public String singleton_ipsecPolicy_create_test() {
String url = base + "/vpn/ipsecpolicies";
- String content = " { \"ipsecpolicy\": { \"name\": \"ipsecpolicy1\"," +
- "\"transform_protocol\": \"esp\"," +
- "\"auth_algorithm\": \"sha1\"," +
- "\"encapsulation_mode\": \"tunnel\"," +
- "\"encryption_algorithm\": \"aes-128\"," +
- "\"pfs\": \"group5\"," +
- "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\"," +
- "\"lifetime\": { \"units\": \"seconds\", \"value\": 7200 }," +
- "\"id\": \"5291b189-fd84-46e5-84bd-78f40c05d69c\"," +
- "\"description\": \"\" } }";
+ String content = " { \"ipsecpolicy\": { \"name\": \"ipsecpolicy1\"," + "\"transform_protocol\": \"esp\","
+ + "\"auth_algorithm\": \"sha1\"," + "\"encapsulation_mode\": \"tunnel\","
+ + "\"encryption_algorithm\": \"aes-128\"," + "\"pfs\": \"group5\","
+ + "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\","
+ + "\"lifetime\": { \"units\": \"seconds\", \"value\": 7200 },"
+ + "\"id\": \"5291b189-fd84-46e5-84bd-78f40c05d69c\"," + "\"description\": \"\" } }";
ITNeutronE2E.test_create(url, content, "IPSEC Policy POST failed");
return content;
}
public void ipsecPolicy_update_test() {
String url = base + "/vpn/ipsecpolicies/5291b189-fd84-46e5-84bd-78f40c05d69c";
- String content = " { \"ipsecpolicy\": { \"name\": \"ipsecpolicy1\"," +
- "\"transform_protocol\": \"esp\"," +
- "\"auth_algorithm\": \"sha1\"," +
- "\"encapsulation_mode\": \"tunnel\"," +
- "\"encryption_algorithm\": \"aes-128\"," +
- "\"pfs\": \"group14\"," +
- "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\"," +
- "\"lifetime\": { \"units\": \"seconds\", \"value\": 3600 }," +
- "\"id\": \"5291b189-fd84-46e5-84bd-78f40c05d69c\"," +
- "\"description\": \"\" } }";
+ String content = " { \"ipsecpolicy\": { \"name\": \"ipsecpolicy1\"," + "\"transform_protocol\": \"esp\","
+ + "\"auth_algorithm\": \"sha1\"," + "\"encapsulation_mode\": \"tunnel\","
+ + "\"encryption_algorithm\": \"aes-128\"," + "\"pfs\": \"group14\","
+ + "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\","
+ + "\"lifetime\": { \"units\": \"seconds\", \"value\": 3600 },"
+ + "\"id\": \"5291b189-fd84-46e5-84bd-78f40c05d69c\"," + "\"description\": \"\" } }";
ITNeutronE2E.test_modify(url, content, "IPSEC Policy PUT failed");
}
}
public void ipsecPolicy_element_get_with_query_test() {
- String url = base + "/vpn/ipsecpolicies/5291b189-fd84-46e5-84bd-78f40c05d69c" +
- "?fields=id&fields=tenant_id&fields=name&fields=description&fields=pfs" +
- "&fields=encapsulation_mode&fields=transform_protocol" +
- "&fields=auth_algorithm&fields=encryption_algorithm";
+ String url = base + "/vpn/ipsecpolicies/5291b189-fd84-46e5-84bd-78f40c05d69c"
+ + "?fields=id&fields=tenant_id&fields=name&fields=description&fields=pfs"
+ + "&fields=encapsulation_mode&fields=transform_protocol"
+ + "&fields=auth_algorithm&fields=encryption_algorithm";
ITNeutronE2E.test_fetch(url, true, "IPSEC Policy Element GET With Query failed");
}
ipsec_policy_tester.ipsecPolicy_element_negative_get_test();
}
}
-
public String singleton_ipsecSiteConnection_create_test() {
String url = base + "/vpn/ipsecsiteconnections";
- String content = " { \"ipsec_site_connection\": {" +
- "\"status\": \"PENDING_CREATE\"," +
- "\"psk\": \"secret\"," +
- "\"initiator\": \"bi-directional\"," +
- "\"name\": \"vpnconnection1\"," +
- "\"admin_state_up\": true," +
- "\"tenant_id\": \"b6887d0b45b54a249b2ce3dee01caa47\"," +
- "\"description\": \"\"," +
- "\"auth_mode\": \"psk\"," +
- "\"peer_cidrs\": [ \"10.2.0.0/24\" ]," +
- "\"mtu\": 1500," +
- "\"ikepolicy_id\": \"d3f373dc-0708-4224-b6f8-676adf27dab8\"," +
- "\"dpd\": { \"action\": \"disabled\", \"interval\": 60," +
- "\"timeout\": 240 }," +
- "\"route_mode\": \"static\"," +
- "\"vpnservice_id\": \"7b347d20-6fa3-4e22-b744-c49ee235ae4f\"," +
- "\"peer_address\": \"172.24.4.233\"," +
- "\"peer_id\": \"172.24.4.233\"," +
- "\"id\": \"af44dfd7-cf91-4451-be57-cd4fdd96b5dc\"," +
- "\"ipsecpolicy_id\": \"22b8abdc-e822-45b3-90dd-f2c8512acfa5\" } }";
+ String content = " { \"ipsec_site_connection\": {" + "\"status\": \"PENDING_CREATE\"," + "\"psk\": \"secret\","
+ + "\"initiator\": \"bi-directional\"," + "\"name\": \"vpnconnection1\"," + "\"admin_state_up\": true,"
+ + "\"tenant_id\": \"b6887d0b45b54a249b2ce3dee01caa47\"," + "\"description\": \"\","
+ + "\"auth_mode\": \"psk\"," + "\"peer_cidrs\": [ \"10.2.0.0/24\" ]," + "\"mtu\": 1500,"
+ + "\"ikepolicy_id\": \"d3f373dc-0708-4224-b6f8-676adf27dab8\","
+ + "\"dpd\": { \"action\": \"disabled\", \"interval\": 60," + "\"timeout\": 240 },"
+ + "\"route_mode\": \"static\"," + "\"vpnservice_id\": \"7b347d20-6fa3-4e22-b744-c49ee235ae4f\","
+ + "\"peer_address\": \"172.24.4.233\"," + "\"peer_id\": \"172.24.4.233\","
+ + "\"id\": \"af44dfd7-cf91-4451-be57-cd4fdd96b5dc\","
+ + "\"ipsecpolicy_id\": \"22b8abdc-e822-45b3-90dd-f2c8512acfa5\" } }";
ITNeutronE2E.test_create(url, content, "IPSEC Site Connection POST failed");
return content;
}
public void ipsecSiteConnection_update_test() {
String url = base + "/vpn/ipsecsiteconnections/af44dfd7-cf91-4451-be57-cd4fdd96b5dc";
- String content = " { \"ipsec_site_connection\": {" +
- "\"status\": \"DOWN\"," +
- "\"psk\": \"secret\"," +
- "\"initiator\": \"bi-directional\"," +
- "\"name\": \"vpnconnection1\"," +
- "\"admin_state_up\": true," +
- "\"tenant_id\": \"26de9cd6cae94c8cb9f79d660d628e1f\"," +
- "\"description\": \"\"," +
- "\"auth_mode\": \"psk\"," +
- "\"peer_cidrs\": [ \"10.2.0.0/24\" ]," +
- "\"mtu\": 2000," +
- "\"ikepolicy_id\": \"771f081c-5ec8-4f9a-b041-015dfb7fbbe2\"," +
- "\"dpd\": { \"action\": \"hold\", \"interval\": 30, \"timeout\": 120 }," +
- "\"route_mode\": \"static\"," +
- "\"vpnservice_id\": \"41bfef97-af4e-4f6b-a5d3-4678859d2485\"," +
- "\"peer_address\": \"172.24.4.233\"," +
- "\"peer_id\": \"172.24.4.233\"," +
- "\"id\": \"af44dfd7-cf91-4451-be57-cd4fdd96b5dc\"," +
- "\"ipsecpolicy_id\": \"9958d4fe-3719-4e8c-84e7-9893895b76b4\" } }";
+ String content = " { \"ipsec_site_connection\": {" + "\"status\": \"DOWN\"," + "\"psk\": \"secret\","
+ + "\"initiator\": \"bi-directional\"," + "\"name\": \"vpnconnection1\"," + "\"admin_state_up\": true,"
+ + "\"tenant_id\": \"26de9cd6cae94c8cb9f79d660d628e1f\"," + "\"description\": \"\","
+ + "\"auth_mode\": \"psk\"," + "\"peer_cidrs\": [ \"10.2.0.0/24\" ]," + "\"mtu\": 2000,"
+ + "\"ikepolicy_id\": \"771f081c-5ec8-4f9a-b041-015dfb7fbbe2\","
+ + "\"dpd\": { \"action\": \"hold\", \"interval\": 30, \"timeout\": 120 },"
+ + "\"route_mode\": \"static\"," + "\"vpnservice_id\": \"41bfef97-af4e-4f6b-a5d3-4678859d2485\","
+ + "\"peer_address\": \"172.24.4.233\"," + "\"peer_id\": \"172.24.4.233\","
+ + "\"id\": \"af44dfd7-cf91-4451-be57-cd4fdd96b5dc\","
+ + "\"ipsecpolicy_id\": \"9958d4fe-3719-4e8c-84e7-9893895b76b4\" } }";
ITNeutronE2E.test_modify(url, content, "IPSEC Site Connection PUT failed");
}
}
public void ipsecSiteConnection_element_get_with_query_test() {
- String url = base + "/vpn/ipsecsiteconnections/af44dfd7-cf91-4451-be57-cd4fdd96b5dc" +
- "?fields=id&fields=tenant_id&fields=name&fields=description&fields=peer_address" +
- "&fields=peer_id&fields=route_mode&fields=auth_mode&fields=initiator" +
- "&fields=mtu&fields=psk&fields=admin_state_up&fields=status&fields=ikepolicy_id" +
- "&fields=ipsecpolicy_id&fields=vpnservice_id";
+ String url = base + "/vpn/ipsecsiteconnections/af44dfd7-cf91-4451-be57-cd4fdd96b5dc"
+ + "?fields=id&fields=tenant_id&fields=name&fields=description&fields=peer_address"
+ + "&fields=peer_id&fields=route_mode&fields=auth_mode&fields=initiator"
+ + "&fields=mtu&fields=psk&fields=admin_state_up&fields=status&fields=ikepolicy_id"
+ + "&fields=ipsecpolicy_id&fields=vpnservice_id";
ITNeutronE2E.test_fetch(url, true, "IPSEC Site Connection Element GET With Query failed");
}
ipsec_siteConnection_tester.ipsecSiteConnection_element_negative_get_test();
}
}
-
public String singleton_l2gateway_connection_create_test() {
String url = base + "/l2gateway-connections";
- String content = " { \"l2gateway_connection\": { \"port_id\": \"9ea656c7-c9b8-4474-94f3-3b0bc741d9a9\"," +
- "\"gateway_id\": \"d3590f37-b072-4358-9719-71964d84a31c\", \"segmentation_id\": 100," +
- "\"network_id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\"," +
- "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\"," +
- "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
+ String content = " { \"l2gateway_connection\": { \"port_id\": \"9ea656c7-c9b8-4474-94f3-3b0bc741d9a9\","
+ + "\"gateway_id\": \"d3590f37-b072-4358-9719-71964d84a31c\", \"segmentation_id\": 100,"
+ + "\"network_id\": \"c69933c1-b472-44f9-8226-30dc4ffd454c\","
+ + "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\","
+ + "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\" } }";
ITNeutronE2E.test_create(url, content, "L2 Gateway Connection Singleton Post Failed");
return content;
}
}
public void l2gateway_connection_element_get_with_query_test() {
- String url = base + "/l2gateway-connections/3b0ef8f4-82c7-44d4-a4fb-6177f9a21977" +
- "?fields=tenant_id&fields=connection_id&fields=gateway_id" +
- "&fields=network_id&fields=port_id&fields=segmentation_id";
+ String url = base + "/l2gateway-connections/3b0ef8f4-82c7-44d4-a4fb-6177f9a21977"
+ + "?fields=tenant_id&fields=connection_id&fields=gateway_id"
+ + "&fields=network_id&fields=port_id&fields=segmentation_id";
ITNeutronE2E.test_fetch(url, true, "L2 Gateway Connection Element Get With Query Failed");
}
public void l2gateway_connection_create_without_port_test() {
String url = base + "/l2gateway-connections";
- String content = " { \"l2gateway_connection\": { " +
- "\"gateway_id\": \"5227c228-6bba-4bbe-bdb8-6942768ff0f1\", " +
- "\"segmentation_id\": 100," +
- "\"network_id\": \"9227c228-6bba-4bbe-bdb8-6942768ff0f1\"," +
- "\"id\": \"5227c228-6bba-4bbe-bdb8-6942768ff0e1\"," +
- "\"tenant_id\": \"de0a7495-05c4-4be0-b796-1412835c6820\" } }";
+ String content = " { \"l2gateway_connection\": { "
+ + "\"gateway_id\": \"5227c228-6bba-4bbe-bdb8-6942768ff0f1\", " + "\"segmentation_id\": 100,"
+ + "\"network_id\": \"9227c228-6bba-4bbe-bdb8-6942768ff0f1\","
+ + "\"id\": \"5227c228-6bba-4bbe-bdb8-6942768ff0e1\","
+ + "\"tenant_id\": \"de0a7495-05c4-4be0-b796-1412835c6820\" } }";
ITNeutronE2E.test_create(url, content, "L2 Gateway Connection with No PortId - Singleton Post Failed");
}
public String singleton_l2gateway_create_test() {
String url = base + "/l2-gateways";
- String content = "{ \"l2_gateway\": { \"name\": \"gateway1\"," +
- "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\"," +
- "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\"," +
- "\"devices\": [{ \"device_name\": \"device1\"," +
- "\"id\": \"0a24b09a-88a1-4f2c-94e9-92515972a704\"," +
- "\"interfaces\": [{\"name\": \"interface1\", \"segmentation_id\": [100] }] }]" +
- "} }";
+ String content = "{ \"l2_gateway\": { \"name\": \"gateway1\","
+ + "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\","
+ + "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\","
+ + "\"devices\": [{ \"device_name\": \"device1\"," + "\"id\": \"0a24b09a-88a1-4f2c-94e9-92515972a704\","
+ + "\"interfaces\": [{\"name\": \"interface1\", \"segmentation_id\": [100] }] }]" + "} }";
ITNeutronE2E.test_create(url, content, "L2 Gateway Singleton Post Failed");
return content;
}
public void l2gateway_modify_test() {
String url = base + "/l2-gateways/3b0ef8f4-82c7-44d4-a4fb-6177f9a21977";
- String content = "{ \"l2_gateway\": { \"name\": \"gateway1\"," +
- "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\"," +
- "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\"," +
- "\"devices\": [{ \"device_name\": \"device1\"," +
- "\"id\": \"0a24b09a-88a1-4f2c-94e9-92515972a704\"," +
- "\"interfaces\": [{\"name\": \"interface1\", \"segmentation_id\": [100, 50] }] }]" +
- "} }";
+ String content = "{ \"l2_gateway\": { \"name\": \"gateway1\","
+ + "\"id\": \"3b0ef8f4-82c7-44d4-a4fb-6177f9a21977\","
+ + "\"tenant_id\": \"45977fa2dbd7482098dd68d0d8970117\","
+ + "\"devices\": [{ \"device_name\": \"device1\"," + "\"id\": \"0a24b09a-88a1-4f2c-94e9-92515972a704\","
+ + "\"interfaces\": [{\"name\": \"interface1\", \"segmentation_id\": [100, 50] }] }]" + "} }";
ITNeutronE2E.test_modify(url, content, "L2 Gateway Singleton Put Failed");
}
}
public void l2gateway_element_get_with_query_test() {
- String url = base + "/l2-gateways/3b0ef8f4-82c7-44d4-a4fb-6177f9a21977" +
- "?fields=tenant_id&fields=id&fields=name" +
- "&fields=devices";
+ String url = base + "/l2-gateways/3b0ef8f4-82c7-44d4-a4fb-6177f9a21977"
+ + "?fields=tenant_id&fields=id&fields=name" + "&fields=devices";
ITNeutronE2E.test_fetch(url, true, "L2 Gateway Element Get With Query Failed");
}
public String singleton_lb_healthMonitor_create_test() {
String url = base + "/lbaas/healthmonitors";
- String content = " { \"healthmonitor\": { \"admin_state_up\": true," +
- "\"delay\": 1, \"expected_codes\": \"200,201,202\"," +
- "\"http_method\": \"GET\"," +
- "\"id\": \"0a9ac99d-0a09-4b18-8499-a0796850279a\"," +
- "\"max_retries\": 5," +
- "\"pools\": [ { \"id\": \"74aa2010-a59f-4d35-a436-60a6da882819\" } ]," +
- "\"tenant_id\": \"6f3584d5754048a18e30685362b88411\"," +
- "\"timeout\": 1, \"type\": \"HTTP\"," +
- "\"url_path\": \"/index.html\" } }";
+ String content = " { \"healthmonitor\": { \"admin_state_up\": true,"
+ + "\"delay\": 1, \"expected_codes\": \"200,201,202\"," + "\"http_method\": \"GET\","
+ + "\"id\": \"0a9ac99d-0a09-4b18-8499-a0796850279a\"," + "\"max_retries\": 5,"
+ + "\"pools\": [ { \"id\": \"74aa2010-a59f-4d35-a436-60a6da882819\" } ],"
+ + "\"tenant_id\": \"6f3584d5754048a18e30685362b88411\"," + "\"timeout\": 1, \"type\": \"HTTP\","
+ + "\"url_path\": \"/index.html\" } }";
ITNeutronE2E.test_create(url, content, "Singleton LB Health Monitor Post Failed NB");
return content;
}
public void healthMonitor_update_test() {
String url = base + "/lbaas/healthmonitors/0a9ac99d-0a09-4b18-8499-a0796850279a";
- String content = " { \"healthmonitor\": { \"admin_state_up\": false," +
- "\"delay\": 2, \"expected_codes\": \"200\"," +
- "\"http_method\": \"POST\"," +
- "\"id\": \"0a9ac99d-0a09-4b18-8499-a0796850279a\"," +
- "\"max_retries\": 2," +
- "\"pools\": [ { \"id\": \"74aa2010-a59f-4d35-a436-60a6da882819\" } ]," +
- "\"tenant_id\": \"6f3584d5754048a18e30685362b88411\"," +
- "\"timeout\": 2, \"type\": \"HTTP\"," +
- "\"url_path\": \"/page.html\" } }";
- ITNeutronE2E.test_modify(url, content,"LB Health Monitor Put Failed");
+ String content = " { \"healthmonitor\": { \"admin_state_up\": false,"
+ + "\"delay\": 2, \"expected_codes\": \"200\"," + "\"http_method\": \"POST\","
+ + "\"id\": \"0a9ac99d-0a09-4b18-8499-a0796850279a\"," + "\"max_retries\": 2,"
+ + "\"pools\": [ { \"id\": \"74aa2010-a59f-4d35-a436-60a6da882819\" } ],"
+ + "\"tenant_id\": \"6f3584d5754048a18e30685362b88411\"," + "\"timeout\": 2, \"type\": \"HTTP\","
+ + "\"url_path\": \"/page.html\" } }";
+ ITNeutronE2E.test_modify(url, content, "LB Health Monitor Put Failed");
}
-
+
public void healthMonitor_element_get_test() {
String url = base + "/lbaas/healthmonitors/0a9ac99d-0a09-4b18-8499-a0796850279a";
- ITNeutronE2E.test_fetch(url, true ,"LB Health Monitor Element Get Failed");
+ ITNeutronE2E.test_fetch(url, true, "LB Health Monitor Element Get Failed");
}
public void healthMonitor_element_get_with_query_test() {
- String url = base + "/lbaas/healthmonitors/0a9ac99d-0a09-4b18-8499-a0796850279a" +
- "?fields=id&fields=tenant_id&fields=type&fields=delay&fields=timeout" +
- "&fields=max_retries&fields=http_method&fields=url_path&fields=admin_state_up" +
- "&fields=expected_codes&fields=limit&fields=marker&fields=page_reverse";
- ITNeutronE2E.test_fetch(url, true ,"LB Health Monitor Element Get Failed");
+ String url = base + "/lbaas/healthmonitors/0a9ac99d-0a09-4b18-8499-a0796850279a"
+ + "?fields=id&fields=tenant_id&fields=type&fields=delay&fields=timeout"
+ + "&fields=max_retries&fields=http_method&fields=url_path&fields=admin_state_up"
+ + "&fields=expected_codes&fields=limit&fields=marker&fields=page_reverse";
+ ITNeutronE2E.test_fetch(url, true, "LB Health Monitor Element Get Failed");
}
public void healthMonitor_element_negative_get_test() {
String url = base + "/lbaas/healthmonitors/0a9ac99d-0a09-4b18-8499-a0796850279a";
- ITNeutronE2E.test_fetch(url, false ,"LB Health Monitor Element Negative Get Failed");
+ ITNeutronE2E.test_fetch(url, false, "LB Health Monitor Element Negative Get Failed");
}
public void healthMonitor_delete_test() {
//TODO handle SB check
public String singleton_lb_listener_create_test() {
String url = base + "/lbaas/listeners";
- String content = "{ \"listener\": { " +
- "\"admin_state_up\": true, " +
- "\"connection_limit\": 100, " +
- "\"default_pool_id\": null, " +
- "\"description\": \"listener one\", " +
- "\"id\": \"39de4d56-d663-46e5-85a1-5b9d5fa17829\", " +
- "\"loadbalancers\": [ { " +
- "\"id\": \"a36c20d0-18e9-42ce-88fd-82a35977ee8c\" } ], " +
- "\"name\": \"listener1\", " +
- "\"protocol\": \"HTTP\", " +
- "\"protocol_port\": 80, " +
- "\"tenant_id\": \"b7c1a69e88bf4b21a8148f787aef2081\" } }";
+ String content = "{ \"listener\": { " + "\"admin_state_up\": true, " + "\"connection_limit\": 100, "
+ + "\"default_pool_id\": null, " + "\"description\": \"listener one\", "
+ + "\"id\": \"39de4d56-d663-46e5-85a1-5b9d5fa17829\", " + "\"loadbalancers\": [ { "
+ + "\"id\": \"a36c20d0-18e9-42ce-88fd-82a35977ee8c\" } ], " + "\"name\": \"listener1\", "
+ + "\"protocol\": \"HTTP\", " + "\"protocol_port\": 80, "
+ + "\"tenant_id\": \"b7c1a69e88bf4b21a8148f787aef2081\" } }";
ITNeutronE2E.test_create(url, content, "Singleton LB Listener Post Failed NB");
return content;
}
public void listener_update_test() {
String url = base + "/lbaas/listeners/39de4d56-d663-46e5-85a1-5b9d5fa17829";
- String content = " { \"listener\": { \"admin_state_up\": false," +
- "\"connection_limit\": 200," +
- "\"default_pool_id\": null," +
- "\"description\": \"listener two\"," +
- "\"id\": \"39de4d56-d663-46e5-85a1-5b9d5fa17829\"," +
- "\"loadbalancers\": [ {" +
- "\"id\": \"a36c20d0-18e9-42ce-88fd-82a35977ee8c\" } ]," +
- "\"name\": \"listener2\"," +
- "\"protocol\": \"HTTP\"," +
- "\"protocol_port\": 80," +
- "\"tenant_id\": \"1a3e005cf9ce40308c900bcb08e5320c\" } }";
- ITNeutronE2E.test_modify(url, content,"LB Listener Put Failed");
+ String content = " { \"listener\": { \"admin_state_up\": false," + "\"connection_limit\": 200,"
+ + "\"default_pool_id\": null," + "\"description\": \"listener two\","
+ + "\"id\": \"39de4d56-d663-46e5-85a1-5b9d5fa17829\"," + "\"loadbalancers\": [ {"
+ + "\"id\": \"a36c20d0-18e9-42ce-88fd-82a35977ee8c\" } ]," + "\"name\": \"listener2\","
+ + "\"protocol\": \"HTTP\"," + "\"protocol_port\": 80,"
+ + "\"tenant_id\": \"1a3e005cf9ce40308c900bcb08e5320c\" } }";
+ ITNeutronE2E.test_modify(url, content, "LB Listener Put Failed");
}
-
+
public void listener_element_get_test() {
String url = base + "/lbaas/listeners/39de4d56-d663-46e5-85a1-5b9d5fa17829";
- ITNeutronE2E.test_fetch(url, true ,"LB Listener Element Get Failed");
+ ITNeutronE2E.test_fetch(url, true, "LB Listener Element Get Failed");
}
public void listener_element_get_with_query_test() {
- String url = base + "/lbaas/listeners/39de4d56-d663-46e5-85a1-5b9d5fa17829" +
- "?fields=id&fields=tenant_id&fields=name&fields=description" +
- "&fields=default_pool_id&fields=protocol&fields=protocol_port" +
- "&fields=admin_state_up&fields=limit&fields=marker&fields=page_reverse";
- ITNeutronE2E.test_fetch(url, true ,"LB Listener Element Get With Query Failed");
+ String url = base + "/lbaas/listeners/39de4d56-d663-46e5-85a1-5b9d5fa17829"
+ + "?fields=id&fields=tenant_id&fields=name&fields=description"
+ + "&fields=default_pool_id&fields=protocol&fields=protocol_port"
+ + "&fields=admin_state_up&fields=limit&fields=marker&fields=page_reverse";
+ ITNeutronE2E.test_fetch(url, true, "LB Listener Element Get With Query Failed");
}
public void listener_element_negative_get_test() {
String url = base + "/lbaas/listeners/39de4d56-d663-46e5-85a1-5b9d5fa17829";
- ITNeutronE2E.test_fetch(url, false ,"LB Listener Element Negative Get Failed");
+ ITNeutronE2E.test_fetch(url, false, "LB Listener Element Negative Get Failed");
}
public void listener_delete_test() {
//TODO handle SB check
public String singleton_lb_pool_member_create_test() {
String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members";
- String content = " { \"member\": { \"address\": \"10.0.0.8\"," +
- "\"admin_state_up\": true," +
- "\"id\": \"9a7aff27-fd41-4ec1-ba4c-3eb92c629313\"," +
- "\"protocol_port\": 80," +
- "\"subnet_id\": \"013d3059-87a4-45a5-91e9-d721068ae0b2\"," +
- "\"tenant_id\": \"1a3e005cf9ce40308c900bcb08e5320c\"," +
- "\"weight\": 1 } }";
+ String content = " { \"member\": { \"address\": \"10.0.0.8\"," + "\"admin_state_up\": true,"
+ + "\"id\": \"9a7aff27-fd41-4ec1-ba4c-3eb92c629313\"," + "\"protocol_port\": 80,"
+ + "\"subnet_id\": \"013d3059-87a4-45a5-91e9-d721068ae0b2\","
+ + "\"tenant_id\": \"1a3e005cf9ce40308c900bcb08e5320c\"," + "\"weight\": 1 } }";
ITNeutronE2E.test_create(url, content, "Singleton LB Pool Member Post Failed NB");
return content;
}
}
public void pool_member_update_test() {
- String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313";
- String content = " { \"member\": { \"address\": \"10.0.0.8\"," +
- "\"admin_state_up\": false," +
- "\"id\": \"9a7aff27-fd41-4ec1-ba4c-3eb92c629313\"," +
- "\"protocol_port\": 80," +
- "\"subnet_id\": \"013d3059-87a4-45a5-91e9-d721068ae0b2\"," +
- "\"tenant_id\": \"1a3e005cf9ce40308c900bcb08e5320c\"," +
- "\"weight\": 5 } }";
- ITNeutronE2E.test_modify(url, content,"LB Pool Member Put Failed");
+ String url = base
+ + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313";
+ String content = " { \"member\": { \"address\": \"10.0.0.8\"," + "\"admin_state_up\": false,"
+ + "\"id\": \"9a7aff27-fd41-4ec1-ba4c-3eb92c629313\"," + "\"protocol_port\": 80,"
+ + "\"subnet_id\": \"013d3059-87a4-45a5-91e9-d721068ae0b2\","
+ + "\"tenant_id\": \"1a3e005cf9ce40308c900bcb08e5320c\"," + "\"weight\": 5 } }";
+ ITNeutronE2E.test_modify(url, content, "LB Pool Member Put Failed");
}
-
+
public void pool_member_element_get_test() {
- String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313";
- ITNeutronE2E.test_fetch(url, true ,"LB Pool Member Element Get Failed");
+ String url = base
+ + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313";
+ ITNeutronE2E.test_fetch(url, true, "LB Pool Member Element Get Failed");
}
public void pool_member_element_get_with_query_test() {
- String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313" +
- "?fields=id&fields=tenant_id&fields=address&fields=protocol_port" +
- "&fields=weight&fields=subnet_id&fields=admin_state_up" +
- "&fields=limit&fields=marker&fields=page_reverse"; ;
- ITNeutronE2E.test_fetch(url, true ,"LB Pool Member Element Get With Query Failed");
+ String url = base
+ + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313"
+ + "?fields=id&fields=tenant_id&fields=address&fields=protocol_port"
+ + "&fields=weight&fields=subnet_id&fields=admin_state_up"
+ + "&fields=limit&fields=marker&fields=page_reverse";
+ ;
+ ITNeutronE2E.test_fetch(url, true, "LB Pool Member Element Get With Query Failed");
}
public void pool_member_element_negative_get_test() {
- String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313";
- ITNeutronE2E.test_fetch(url, false ,"LB Pool Member Element Negative Get Failed");
+ String url = base
+ + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313";
+ ITNeutronE2E.test_fetch(url, false, "LB Pool Member Element Negative Get Failed");
}
public void pool_member_delete_test() {
- String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313";
+ String url = base
+ + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe/members/9a7aff27-fd41-4ec1-ba4c-3eb92c629313";
ITNeutronE2E.test_delete(url, "LB Pool Member Element Delete Failed");
}
//TODO handle SB check
public String singleton_lb_pool_create_test() {
String url = base + "/lbaas/pools";
- String content = "{ \"pool\": { " +
- "\"admin_state_up\": true, " +
- "\"description\": \"simple pool\", " +
- "\"healthmonitor_id\": null, " +
- "\"id\": \"12ff63af-4127-4074-a251-bcb2ecc53ebe\", " +
- "\"lb_algorithm\": \"ROUND_ROBIN\", " +
- "\"listeners\": [ { " +
- "\"id\": \"39de4d56-d663-46e5-85a1-5b9d5fa17829\" } ], " +
- "\"members\": [], " +
- "\"name\": \"pool1\", " +
- "\"protocol\": \"HTTP\", " +
- "\"session_persistence\": { " +
- "\"cookie_name\": \"my_cookie\", " +
- "\"type\": \"APP_COOKIE\" }, " +
- "\"tenant_id\": \"b7c1a69e88bf4b21a8148f787aef2081\" } }";
+ String content = "{ \"pool\": { " + "\"admin_state_up\": true, " + "\"description\": \"simple pool\", "
+ + "\"healthmonitor_id\": null, " + "\"id\": \"12ff63af-4127-4074-a251-bcb2ecc53ebe\", "
+ + "\"lb_algorithm\": \"ROUND_ROBIN\", " + "\"listeners\": [ { "
+ + "\"id\": \"39de4d56-d663-46e5-85a1-5b9d5fa17829\" } ], " + "\"members\": [], "
+ + "\"name\": \"pool1\", " + "\"protocol\": \"HTTP\", " + "\"session_persistence\": { "
+ + "\"cookie_name\": \"my_cookie\", " + "\"type\": \"APP_COOKIE\" }, "
+ + "\"tenant_id\": \"b7c1a69e88bf4b21a8148f787aef2081\" } }";
ITNeutronE2E.test_create(url, content, "Singleton LB Pool Post Failed NB");
return content;
}
public void pool_update_test() {
String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe";
- String content = " { \"pool\": { \"admin_state_up\": false," +
- "\"description\": \"pool two\"," +
- "\"healthmonitor_id\": null," +
- "\"id\": \"12ff63af-4127-4074-a251-bcb2ecc53ebe\"," +
- "\"lb_algorithm\": \"LEAST_CONNECTIONS\"," +
- "\"listeners\": [ {" +
- "\"id\": \"39de4d56-d663-46e5-85a1-5b9d5fa17829\" } ]," +
- "\"members\": []," +
- "\"name\": \"pool2\"," +
- "\"protocol\": \"HTTP\"," +
- "\"session_persistence\": { \"cookie_name\": null," +
- "\"type\": \"HTTP_COOKIE\" }," +
- "\"tenant_id\": \"1a3e005cf9ce40308c900bcb08e5320c\" } }";
- ITNeutronE2E.test_modify(url, content,"LB Pool Put Failed");
+ String content = " { \"pool\": { \"admin_state_up\": false," + "\"description\": \"pool two\","
+ + "\"healthmonitor_id\": null," + "\"id\": \"12ff63af-4127-4074-a251-bcb2ecc53ebe\","
+ + "\"lb_algorithm\": \"LEAST_CONNECTIONS\"," + "\"listeners\": [ {"
+ + "\"id\": \"39de4d56-d663-46e5-85a1-5b9d5fa17829\" } ]," + "\"members\": []," + "\"name\": \"pool2\","
+ + "\"protocol\": \"HTTP\"," + "\"session_persistence\": { \"cookie_name\": null,"
+ + "\"type\": \"HTTP_COOKIE\" }," + "\"tenant_id\": \"1a3e005cf9ce40308c900bcb08e5320c\" } }";
+ ITNeutronE2E.test_modify(url, content, "LB Pool Put Failed");
}
-
+
public void pool_element_get_test() {
String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe";
- ITNeutronE2E.test_fetch(url, true ,"LB Pool Element Get Failed");
+ ITNeutronE2E.test_fetch(url, true, "LB Pool Element Get Failed");
}
public void pool_element_get_with_query_test() {
- String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe" +
- "?fields=id&fields=tenant_id&fields=name&fields=description" +
- "&fields=lb_algorithm&fields=protocol&fields=healthmonitor_id" +
- "&fields=members&fields=admin_state_up&fields=limit&fields=marker" +
- "&fields=page_reverse";
- ITNeutronE2E.test_fetch(url, true ,"LB Pool Element Get With Query Failed");
+ String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe"
+ + "?fields=id&fields=tenant_id&fields=name&fields=description"
+ + "&fields=lb_algorithm&fields=protocol&fields=healthmonitor_id"
+ + "&fields=members&fields=admin_state_up&fields=limit&fields=marker" + "&fields=page_reverse";
+ ITNeutronE2E.test_fetch(url, true, "LB Pool Element Get With Query Failed");
}
public void pool_element_negative_get_test() {
String url = base + "/lbaas/pools/12ff63af-4127-4074-a251-bcb2ecc53ebe";
- ITNeutronE2E.test_fetch(url, false ,"LB Pool Element Negative Get Failed");
+ ITNeutronE2E.test_fetch(url, false, "LB Pool Element Negative Get Failed");
}
public void pool_delete_test() {
//TODO handle SB check
public String singleton_loadbalancer_create_test() {
String url = base + "/lbaas/loadbalancers";
- String content = "{ \"loadbalancer\": { " +
- "\"admin_state_up\": true, " +
- "\"description\": \"simple lb\", " +
- "\"id\": \"a36c20d0-18e9-42ce-88fd-82a35977ee8c\", " +
- "\"listeners\": [], " +
- "\"name\": \"loadbalancer1\", " +
- "\"operating_status\": \"ONLINE\", " +
- "\"provisioning_status\": \"ACTIVE\", " +
- "\"tenant_id\": \"b7c1a69e88bf4b21a8148f787aef2081\", " +
- "\"vip_address\": \"10.0.0.4\", " +
- "\"vip_subnet_id\": \"013d3059-87a4-45a5-91e9-d721068ae0b2\" } }";
+ String content = "{ \"loadbalancer\": { " + "\"admin_state_up\": true, " + "\"description\": \"simple lb\", "
+ + "\"id\": \"a36c20d0-18e9-42ce-88fd-82a35977ee8c\", " + "\"listeners\": [], "
+ + "\"name\": \"loadbalancer1\", " + "\"operating_status\": \"ONLINE\", "
+ + "\"provisioning_status\": \"ACTIVE\", " + "\"tenant_id\": \"b7c1a69e88bf4b21a8148f787aef2081\", "
+ + "\"vip_address\": \"10.0.0.4\", " + "\"vip_subnet_id\": \"013d3059-87a4-45a5-91e9-d721068ae0b2\" } }";
ITNeutronE2E.test_create(url, content, "Singleton Load Balancer Post Failed NB");
return content;
}
public void loadBalancer_update_test() {
String url = base + "/lbaas/loadbalancers/a36c20d0-18e9-42ce-88fd-82a35977ee8c";
- String content = " { \"loadbalancer\": { \"admin_state_up\": false," +
- "\"description\": \"simple lb2\"," +
- "\"id\": \"a36c20d0-18e9-42ce-88fd-82a35977ee8c\"," +
- "\"listeners\": []," +
- "\"name\": \"loadbalancer2\"," +
- "\"operating_status\": \"ONLINE\"," +
- "\"provisioning_status\": \"PENDING_UPDATE\"," +
- "\"tenant_id\": \"b7c1a69e88bf4b21a8148f787aef2081\"," +
- "\"vip_address\": \"10.0.0.4\"," +
- "\"vip_subnet_id\": \"013d3059-87a4-45a5-91e9-d721068ae0b2\" } }";
- ITNeutronE2E.test_modify(url, content,"Load Balancer Put Failed");
+ String content = " { \"loadbalancer\": { \"admin_state_up\": false," + "\"description\": \"simple lb2\","
+ + "\"id\": \"a36c20d0-18e9-42ce-88fd-82a35977ee8c\"," + "\"listeners\": [],"
+ + "\"name\": \"loadbalancer2\"," + "\"operating_status\": \"ONLINE\","
+ + "\"provisioning_status\": \"PENDING_UPDATE\","
+ + "\"tenant_id\": \"b7c1a69e88bf4b21a8148f787aef2081\"," + "\"vip_address\": \"10.0.0.4\","
+ + "\"vip_subnet_id\": \"013d3059-87a4-45a5-91e9-d721068ae0b2\" } }";
+ ITNeutronE2E.test_modify(url, content, "Load Balancer Put Failed");
}
public void loadBalancer_element_get_test() {
String url = base + "/lbaas/loadbalancers/a36c20d0-18e9-42ce-88fd-82a35977ee8c";
- ITNeutronE2E.test_fetch(url, true ,"Load Balancer Element Get Failed");
+ ITNeutronE2E.test_fetch(url, true, "Load Balancer Element Get Failed");
}
public void loadBalancer_element_get_with_query_test() {
- String url = base + "/lbaas/loadbalancers/a36c20d0-18e9-42ce-88fd-82a35977ee8c"+
- "?fields=id&fields=listeners&fields=name&fields=operating_status&"+
- "&fields=provisioning_status&fields=tenant_id&fields=vip_address"+
- "&fields=vip_subnet_id";
- ITNeutronE2E.test_fetch(url, true ,"Load Balancer Element Get Failed");
+ String url = base + "/lbaas/loadbalancers/a36c20d0-18e9-42ce-88fd-82a35977ee8c"
+ + "?fields=id&fields=listeners&fields=name&fields=operating_status&"
+ + "&fields=provisioning_status&fields=tenant_id&fields=vip_address" + "&fields=vip_subnet_id";
+ ITNeutronE2E.test_fetch(url, true, "Load Balancer Element Get Failed");
}
public void loadBalancer_element_negative_get_test() {
String url = base + "/lbaas/loadbalancers/a36c20d0-18e9-42ce-88fd-82a35977ee8c";
- ITNeutronE2E.test_fetch(url, false ,"Load Balancer Element Negative Get Failed");
+ ITNeutronE2E.test_fetch(url, false, "Load Balancer Element Negative Get Failed");
}
public void loadBalancer_delete_test() {
//TODO handle SB check
public void singleton_meteringLabel_create_test() {
String url = base + "/metering/metering-labels";
- String content = "{ \"metering_label\": { " +
- "\"tenant_id\": \"45345b0ee1ea477fac0f541b2cb79cd4\", " +
- "\"description\": \"description of label1\", " +
- "\"name\": \"label1\", " +
- "\"id\": \"bc91b832-8465-40a7-a5d8-ba87de442266\" } }";
+ String content = "{ \"metering_label\": { " + "\"tenant_id\": \"45345b0ee1ea477fac0f541b2cb79cd4\", "
+ + "\"description\": \"description of label1\", " + "\"name\": \"label1\", "
+ + "\"id\": \"bc91b832-8465-40a7-a5d8-ba87de442266\" } }";
ITNeutronE2E.test_create(url, content, "Singleton Metering Label Post Failed NB");
}
public void meteringLabel_element_get_test() {
String url = base + "/metering/metering-labels/bc91b832-8465-40a7-a5d8-ba87de442266";
- ITNeutronE2E.test_fetch(url, true ,"Metering Label Element Get Failed");
+ ITNeutronE2E.test_fetch(url, true, "Metering Label Element Get Failed");
}
public void meteringLabel_element_get_with_query_test() {
- String url = base + "/metering/metering-labels/bc91b832-8465-40a7-a5d8-ba87de442266" +
- "?fields=id&fields=tenant_id&fields=name&fields=description";
- ITNeutronE2E.test_fetch(url, true ,"Metering Label Element Get Failed");
+ String url = base + "/metering/metering-labels/bc91b832-8465-40a7-a5d8-ba87de442266"
+ + "?fields=id&fields=tenant_id&fields=name&fields=description";
+ ITNeutronE2E.test_fetch(url, true, "Metering Label Element Get Failed");
}
public void meteringLabel_delete_test() {
public void meteringLabel_element_negative_get_test() {
String url = base + "/metering/metering-labels/bc91b832-8465-40a7-a5d8-ba87de442266";
- ITNeutronE2E.test_fetch(url, false ,"Metering Label Element Negative Get Failed");
+ ITNeutronE2E.test_fetch(url, false, "Metering Label Element Negative Get Failed");
}
public static void runTests(String base) {
//TODO handle SB check
public void singleton_meteringRule_create_test() {
String url = base + "/metering/metering-label-rules";
- String content = "{ \"metering_label_rule\": { " +
- "\"remote_ip_prefix\": \"10.0.1.0/24\", " +
- "\"direction\": \"ingress\", " +
- "\"metering_label_id\": \"bc91b832-8465-40a7-a5d8-ba87de442266\", " +
- "\"id\": \"00e13b58-b4f2-4579-9c9c-7ac94615f9ae\", " +
- "\"excluded\": false } }";
+ String content = "{ \"metering_label_rule\": { " + "\"remote_ip_prefix\": \"10.0.1.0/24\", "
+ + "\"direction\": \"ingress\", " + "\"metering_label_id\": \"bc91b832-8465-40a7-a5d8-ba87de442266\", "
+ + "\"id\": \"00e13b58-b4f2-4579-9c9c-7ac94615f9ae\", " + "\"excluded\": false } }";
ITNeutronE2E.test_create(url, content, "Singleton Metering Rule Post Failed NB");
}
public void meteringRule_element_get_test() {
String url = base + "/metering/metering-label-rules/00e13b58-b4f2-4579-9c9c-7ac94615f9ae";
- ITNeutronE2E.test_fetch(url, true ,"Metering Rule Element Get Failed");
+ ITNeutronE2E.test_fetch(url, true, "Metering Rule Element Get Failed");
}
public void meteringRule_element_get_with_query_test() {
- String url = base + "/metering/metering-label-rules/00e13b58-b4f2-4579-9c9c-7ac94615f9ae" +
- "?fields=id&fields=direction&fields=remote_ip_prefix&fields=metering_label_id";
- ITNeutronE2E.test_fetch(url, true ,"Metering Rule Element Get Failed");
+ String url = base + "/metering/metering-label-rules/00e13b58-b4f2-4579-9c9c-7ac94615f9ae"
+ + "?fields=id&fields=direction&fields=remote_ip_prefix&fields=metering_label_id";
+ ITNeutronE2E.test_fetch(url, true, "Metering Rule Element Get Failed");
}
public void meteringRule_delete_test() {
public void meteringRule_element_negative_get_test() {
String url = base + "/metering/metering-label-rules/00e13b58-b4f2-4579-9c9c-7ac94615f9ae";
- ITNeutronE2E.test_fetch(url, false ,"Metering Rule Element Negative Get Failed");
+ ITNeutronE2E.test_fetch(url, false, "Metering Rule Element Negative Get Failed");
}
public void bug4224_ipv6_test() {
String url = base + "/metering/metering-label-rules";
- String content = "{ \"metering_label_rule\": { " +
- "\"remote_ip_prefix\": \"fe80::1/10\", " +
- "\"direction\": \"ingress\", " +
- "\"metering_label_id\": \"bc91b832-8465-40a7-a5d8-ba87de442266\", " +
- "\"id\": \"00e13b58-b4f2-4579-9c9c-7ac94615f9ae\", " +
- "\"excluded\": false } }";
+ String content = "{ \"metering_label_rule\": { " + "\"remote_ip_prefix\": \"fe80::1/10\", "
+ + "\"direction\": \"ingress\", " + "\"metering_label_id\": \"bc91b832-8465-40a7-a5d8-ba87de442266\", "
+ + "\"id\": \"00e13b58-b4f2-4579-9c9c-7ac94615f9ae\", " + "\"excluded\": false } }";
ITNeutronE2E.test_create(url, content, "Metering Rule Bug4224 IPv6 Failed NB");
url = url + "/00e13b58-b4f2-4579-9c9c-7ac94615f9ae";
ITNeutronE2E.test_delete(url, "Metering Rule Element Delete Failed");
URL url = new URL(url_s);
HttpURLConnection httpConn = ITNeutronE2E.HttpURLConnectionFactoryGet(url);
if (httpConn.getResponseCode() != 200) {
- System.out.println("trial "+Integer.toString(i)+": failed with: " +
- Integer.toString(httpConn.getResponseCode()));
+ System.out.println("trial " + Integer.toString(i) + ": failed with: "
+ + Integer.toString(httpConn.getResponseCode()));
Thread.sleep(1000);
- i+=1;
+ i += 1;
} else {
- Assert.assertEquals("Network Collection GET failed",
- 200, httpConn.getResponseCode());
+ Assert.assertEquals("Network Collection GET failed", 200, httpConn.getResponseCode());
return;
}
}
//TODO handle SB check
public String singleton_network_create_test() {
String url = base + "/networks";
- String content = "{ \"network\": {" +
- " \"status\": \"ACTIVE\", \"subnets\": [], " +
- " \"name\": \"net1\", \"admin_state_up\": true, " +
- " \"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " +
- " \"router:external\": false, \"segments\": [ " +
- " { \"provider:segmentation_id\": 2, " +
- " \"provider:physical_network\": \"8bab8453-1bc9-45af-8c70-f83aa9b50453\", " +
- " \"provider:network_type\": \"vlan\" }, { " +
- " \"provider:segmentation_id\": null, " +
- " \"provider:physical_network\": \"8bab8453-1bc9-45af-8c70-f83aa9b50453\", " +
- " \"provider:network_type\": \"stt\" } ], " +
- " \"shared\": false, \"id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\" " +
- " } } ";
- ITNeutronE2E.test_create(url, content,"Singleton Network Post Failed NB");
+ String content = "{ \"network\": {" + " \"status\": \"ACTIVE\", \"subnets\": [], "
+ + " \"name\": \"net1\", \"admin_state_up\": true, "
+ + " \"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "
+ + " \"router:external\": false, \"segments\": [ " + " { \"provider:segmentation_id\": 2, "
+ + " \"provider:physical_network\": \"8bab8453-1bc9-45af-8c70-f83aa9b50453\", "
+ + " \"provider:network_type\": \"vlan\" }, { " + " \"provider:segmentation_id\": null, "
+ + " \"provider:physical_network\": \"8bab8453-1bc9-45af-8c70-f83aa9b50453\", "
+ + " \"provider:network_type\": \"stt\" } ], "
+ + " \"shared\": false, \"id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\" " + " } } ";
+ ITNeutronE2E.test_create(url, content, "Singleton Network Post Failed NB");
return content;
}
//TODO handle SB check
public void external_network_create_test() {
String url = base + "/networks";
- String content = "{ \"network\": {" +
- " \"status\": \"ACTIVE\", \"subnets\": [], " +
- " \"name\": \"external1\", \"admin_state_up\": true, " +
- " \"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " +
- " \"router:external\": true, \"shared\": false, " +
- " \"id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\" } } ";
- ITNeutronE2E.test_create(url, content,"External Network Post Failed NB");
+ String content = "{ \"network\": {" + " \"status\": \"ACTIVE\", \"subnets\": [], "
+ + " \"name\": \"external1\", \"admin_state_up\": true, "
+ + " \"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "
+ + " \"router:external\": true, \"shared\": false, "
+ + " \"id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\" } } ";
+ ITNeutronE2E.test_create(url, content, "External Network Post Failed NB");
}
//TODO handle SB check
public void bulk_network_create_test() {
String url = base + "/networks";
- String content = "{ \"networks\": [ { "
- + "\"status\": \"ACTIVE\", \"subnets\": [], "
- + "\"name\": \"sample_network3\", "
- + "\"provider:physical_network\": null, "
- + "\"admin_state_up\": true, "
- + "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
- + "\"provider:network_type\": \"local\", "
- + "\"shared\": false, "
- + "\"id\": \"bc1a76cb-8767-4c3a-bb95-018b822f2130\", "
- + "\"provider:segmentation_id\": null }, { "
- + "\"status\": \"ACTIVE\", "
- + "\"subnets\": [], "
- + "\"name\": \"sample_network4\", "
- + "\"provider:physical_network\": null, "
- + "\"admin_state_up\": true, "
- + "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
- + "\"provider:network_type\": \"local\", "
- + "\"shared\": false, "
- + "\"id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", "
- + "\"provider:segmentation_id\": null } ] } ";
- ITNeutronE2E.test_create(url, content,"Bulk Network Post Failed");
+ String content = "{ \"networks\": [ { " + "\"status\": \"ACTIVE\", \"subnets\": [], "
+ + "\"name\": \"sample_network3\", " + "\"provider:physical_network\": null, "
+ + "\"admin_state_up\": true, " + "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
+ + "\"provider:network_type\": \"local\", " + "\"shared\": false, "
+ + "\"id\": \"bc1a76cb-8767-4c3a-bb95-018b822f2130\", " + "\"provider:segmentation_id\": null }, { "
+ + "\"status\": \"ACTIVE\", " + "\"subnets\": [], " + "\"name\": \"sample_network4\", "
+ + "\"provider:physical_network\": null, " + "\"admin_state_up\": true, "
+ + "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", " + "\"provider:network_type\": \"local\", "
+ + "\"shared\": false, " + "\"id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", "
+ + "\"provider:segmentation_id\": null } ] } ";
+ ITNeutronE2E.test_create(url, content, "Bulk Network Post Failed");
}
//TODO handle SB check
public void network_update_test() {
String url = base + "/networks/bc1a76cb-8767-4c3a-bb95-018b822f2130";
- String content = " { \"network\": { "
- +"\"status\": \"ACTIVE\", "
- +"\"subnets\": [], "
- +"\"name\": \"sample_network_5_updated\", "
- +"\"provider:physical_network\": null, "
- +"\"admin_state_up\": true, "
- +"\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
- +"\"provider:network_type\": \"local\", "
- +"\"router:external\": false, "
- +"\"shared\": false, "
- +"\"provider:segmentation_id\": null } } ";
- ITNeutronE2E.test_modify(url, content,"Network Put Failed");
+ String content = " { \"network\": { " + "\"status\": \"ACTIVE\", " + "\"subnets\": [], "
+ + "\"name\": \"sample_network_5_updated\", " + "\"provider:physical_network\": null, "
+ + "\"admin_state_up\": true, " + "\"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
+ + "\"provider:network_type\": \"local\", " + "\"router:external\": false, " + "\"shared\": false, "
+ + "\"provider:segmentation_id\": null } } ";
+ ITNeutronE2E.test_modify(url, content, "Network Put Failed");
}
- public void network_collection_get_test(){
- String url_s=base + "/networks";
- ITNeutronE2E.test_fetch(url_s, true ,"Network collection Get Failed");
+ public void network_collection_get_test() {
+ String url_s = base + "/networks";
+ ITNeutronE2E.test_fetch(url_s, true, "Network collection Get Failed");
}
public void network_element_get_test() {
String url = base + "/networks/bc1a76cb-8767-4c3a-bb95-018b822f2130";
- ITNeutronE2E.test_fetch(url, true ,"Network Element Get Failed");
+ ITNeutronE2E.test_fetch(url, true, "Network Element Get Failed");
}
- public void network_element_get_test_with_query(){
- String url = base + "/networks/bc1a76cb-8767-4c3a-bb95-018b822f2130"+
- "?fields=status&fields=subnets&fields=name"+
- "&fields=provider:physical_network&fields=admin_state_up"+
- "&fields=tenant_id&fields=provides:network_type"+
- "&fields=router:external&fields=shared&fields=provider:segmentation_id";
- ITNeutronE2E.test_fetch(url, true ,"Network Element with query Get Failed");
+ public void network_element_get_test_with_query() {
+ String url = base + "/networks/bc1a76cb-8767-4c3a-bb95-018b822f2130"
+ + "?fields=status&fields=subnets&fields=name"
+ + "&fields=provider:physical_network&fields=admin_state_up"
+ + "&fields=tenant_id&fields=provides:network_type"
+ + "&fields=router:external&fields=shared&fields=provider:segmentation_id";
+ ITNeutronE2E.test_fetch(url, true, "Network Element with query Get Failed");
}
public void network_element_negative_get_test() {
String url = base + "/networks/bc1a76cb-8767-4c3a-bb95-018b822f2130";
- ITNeutronE2E.test_fetch(url, false ,"Network Element Negative Get Failed");
+ ITNeutronE2E.test_fetch(url, false, "Network Element Negative Get Failed");
}
public void network_delete_test() {
//TODO handle SB check
public String singleton_port_create_test() {
String url = base + "/ports";
- String content = "{ \"port\": { \"status\": \"DOWN\","+
- "\"binding:host_id\": \"\","+
- "\"name\": \"private-port\","+
- "\"allowed_address_pairs\": [],"+
- "\"admin_state_up\": true,"+
- "\"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\","+
- "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\","+
- "\"binding:vif_details\": {},"+
- "\"binding:vnic_type\": \"normal\","+
- "\"binding:vif_type\": \"unbound\","+
- "\"device_owner\": \"\","+
- "\"mac_address\": \"fa:16:3e:c9:cb:f0\","+
- "\"binding:profile\": {},"+
- "\"fixed_ips\": [ {"+
- "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\","+
- "\"ip_address\": \"10.0.0.2\" } ],"+
- "\"id\": \"65c0ee9f-d634-4522-8954-51021b570b0d\","+
- "\"security_groups\": [] ,"+
- "\"device_id\": \"\" } }";
- ITNeutronE2E.test_create(url, content,"Singleton Port Post Failed NB");
+ String content = "{ \"port\": { \"status\": \"DOWN\"," + "\"binding:host_id\": \"\","
+ + "\"name\": \"private-port\"," + "\"allowed_address_pairs\": []," + "\"admin_state_up\": true,"
+ + "\"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\","
+ + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\"," + "\"binding:vif_details\": {},"
+ + "\"binding:vnic_type\": \"normal\"," + "\"binding:vif_type\": \"unbound\","
+ + "\"device_owner\": \"\"," + "\"mac_address\": \"fa:16:3e:c9:cb:f0\"," + "\"binding:profile\": {},"
+ + "\"fixed_ips\": [ {" + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\","
+ + "\"ip_address\": \"10.0.0.2\" } ]," + "\"id\": \"65c0ee9f-d634-4522-8954-51021b570b0d\","
+ + "\"security_groups\": [] ," + "\"device_id\": \"\" } }";
+ ITNeutronE2E.test_create(url, content, "Singleton Port Post Failed NB");
return content;
}
//TODO handle SB check
public void router_interface_port_create_test() {
String url = base + "/ports";
- String content = "{\"ports\": [ {\"status\": \"DOWN\", \"binding:host_id\": \"\", \"allowed_address_pairs\": [], \"device_owner\": \"network:router_gateway\", \"binding:profile\": {}, \"fixed_ips\": [{\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", \"ip_address\": \"10.0.0.1\"}], \"id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51e\", \"security_groups\": [], \"device_id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e\", \"name\": \"\", \"admin_state_up\": true, \"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", \"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", \"binding:vif_details\": {}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"unbound\", \"mac_address\": \"fa:16:3e:dc:1d:8d\"}, "
- + " {\"status\": \"DOWN\", \"binding:host_id\": \"\", \"allowed_address_pairs\": [], \"device_owner\": \"network:router_gateway\", \"binding:profile\": {}, \"fixed_ips\": [{\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", \"ip_address\": \"10.0.0.2\"}], \"id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51f\", \"security_groups\": [], \"device_id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2f\", \"name\": \"\", \"admin_state_up\": true, \"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", \"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", \"binding:vif_details\": {}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"unbound\", \"mac_address\": \"fa:16:3e:dc:1d:8e\"} ] }";
+ String content = "{\"ports\": [ {\"status\": \"DOWN\", \"binding:host_id\": \"\", "
+ + "\"allowed_address_pairs\": [], \"device_owner\": \"network:router_gateway\", "
+ + "\"binding:profile\": {}, \"fixed_ips\": "
+ + "[{\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", "
+ + "\"ip_address\": \"10.0.0.1\"}], \"id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51e\", "
+ + "\"security_groups\": [], \"device_id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e\", "
+ + "\"name\": \"\", \"admin_state_up\": true, "
+ + "\"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "
+ + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", \"binding:vif_details\": {},"
+ + " \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"unbound\", "
+ + "\"mac_address\": \"fa:16:3e:dc:1d:8d\"}, "
+ + " {\"status\": \"DOWN\", \"binding:host_id\": \"\", "
+ + "\"allowed_address_pairs\": [], \"device_owner\": \"network:router_gateway\", "
+ + "\"binding:profile\": {}, \"fixed_ips\": [{\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", "
+ + "\"ip_address\": \"10.0.0.2\"}], \"id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51f\", "
+ + "\"security_groups\": [], \"device_id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2f\", "
+ + "\"name\": \"\", \"admin_state_up\": true, "
+ + "\"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "
+ + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "
+ + "\"binding:vif_details\": {}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"unbound\","
+ + " \"mac_address\": \"fa:16:3e:dc:1d:8e\"} ] }";
ITNeutronE2E.test_create(url, content, "Router Interface Port Post Failed NB");
}
public void bulk_port_create_test() {
String url = base + "/ports";
- String content = "{ \"ports\": [ { "
- + " \"status\": \"DOWN\", "
- + " \"name\": \"sample_port_1\", "
- + " \"allowed_address_pairs\": [], "
- + " \"admin_state_up\": false, "
- + " \"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "
- + " \"tenant_id\": \"d6700c0c9ffa4f1cb322cd4a1f3906fa\", "
- + " \"device_owner\": \"\", "
- + " \"mac_address\": \"fa:16:3e:48:b8:9f\", "
- + " \"fixed_ips\": [ { "
- + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\","
- + " \"ip_address\": \"10.0.0.5\" } ], "
- + " \"id\": \"94225baa-9d3f-4b93-bf12-b41e7ce49cdb\", "
- + " \"security_groups\": [], "
- + " \"device_id\": \"\" }, { "
- + " \"status\": \"DOWN\", "
- + " \"name\": \"sample_port_2\", "
- + " \"allowed_address_pairs\": [], "
- + " \"admin_state_up\": false, "
- + " \"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "
- + " \"tenant_id\": \"d6700c0c9ffa4f1cb322cd4a1f3906fa\", "
- + " \"device_owner\": \"\", "
- + " \"mac_address\": \"fa:16:3e:f4:73:df\", "
- + " \"fixed_ips\": [ { "
- + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\","
- + " \"ip_address\": \"10.0.0.6\" } ], "
- + " \"id\": \"43c831e0-19ce-4a76-9a49-57b57e69428b\", "
- + " \"security_groups\": [], "
- + " \"device_id\": \"\" } ] } ";
+ String content = "{ \"ports\": [ { " + " \"status\": \"DOWN\", " + " \"name\": \"sample_port_1\", "
+ + " \"allowed_address_pairs\": [], " + " \"admin_state_up\": false, "
+ + " \"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "
+ + " \"tenant_id\": \"d6700c0c9ffa4f1cb322cd4a1f3906fa\", " + " \"device_owner\": \"\", "
+ + " \"mac_address\": \"fa:16:3e:48:b8:9f\", " + " \"fixed_ips\": [ { "
+ + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\"," + " \"ip_address\": \"10.0.0.5\" } ], "
+ + " \"id\": \"94225baa-9d3f-4b93-bf12-b41e7ce49cdb\", " + " \"security_groups\": [], "
+ + " \"device_id\": \"\" }, { " + " \"status\": \"DOWN\", " + " \"name\": \"sample_port_2\", "
+ + " \"allowed_address_pairs\": [], " + " \"admin_state_up\": false, "
+ + " \"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "
+ + " \"tenant_id\": \"d6700c0c9ffa4f1cb322cd4a1f3906fa\", " + " \"device_owner\": \"\", "
+ + " \"mac_address\": \"fa:16:3e:f4:73:df\", " + " \"fixed_ips\": [ { "
+ + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\"," + " \"ip_address\": \"10.0.0.6\" } ], "
+ + " \"id\": \"43c831e0-19ce-4a76-9a49-57b57e69428b\", " + " \"security_groups\": [], "
+ + " \"device_id\": \"\" } ] } ";
ITNeutronE2E.test_create(url, content, "Bulk Port Post Failed");
}
public void port_update_test() {
String url = base + "/ports/43c831e0-19ce-4a76-9a49-57b57e69428b";
- String content = " { \"port\": { "
- + " \"status\": \"DOWN\", "
- + " \"binding:host_id\": \"00000000-1111-2222-3333-444444444444\", "
- + " \"allowed_address_pairs\": [], "
- + " \"extra_dhcp_opts\": [], "
- + " \"device_owner\": \"compute:nova\", "
- + " \"binding:profile\": {}, "
- + " \"fixed_ips\": [ { "
- + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\","
- + " \"ip_address\": \"10.0.0.7\" } ], "
- + " \"id\": \"43c831e0-19ce-4a76-9a49-57b57e69428b\", "
- + " \"security_groups\": [], "
- + " \"device_id\": \"\", "
- + " \"name\": \"test-for-port-update\", "
- + " \"admin_state_up\": true, "
- + " \"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "
- + " \"tenant_id\": \"522eda8d23124b25bf03fe44f1986b74\", "
- + " \"binding:vif_details\": {}, "
- + " \"binding:vnic_type\": \"normal\", "
- + " \"binding:vif_type\": \"binding_failed\", "
- + " \"mac_address\": \"fa:16:3e:11:11:5e\" } } ";
- ITNeutronE2E.test_modify(url, content,"Port Put Failed");
+ String content = " { \"port\": { " + " \"status\": \"DOWN\", "
+ + " \"binding:host_id\": \"00000000-1111-2222-3333-444444444444\", "
+ + " \"allowed_address_pairs\": [], " + " \"extra_dhcp_opts\": [], "
+ + " \"device_owner\": \"compute:nova\", " + " \"binding:profile\": {}, " + " \"fixed_ips\": [ { "
+ + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\"," + " \"ip_address\": \"10.0.0.7\" } ], "
+ + " \"id\": \"43c831e0-19ce-4a76-9a49-57b57e69428b\", " + " \"security_groups\": [], "
+ + " \"device_id\": \"\", " + " \"name\": \"test-for-port-update\", " + " \"admin_state_up\": true, "
+ + " \"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "
+ + " \"tenant_id\": \"522eda8d23124b25bf03fe44f1986b74\", " + " \"binding:vif_details\": {}, "
+ + " \"binding:vnic_type\": \"normal\", " + " \"binding:vif_type\": \"binding_failed\", "
+ + " \"mac_address\": \"fa:16:3e:11:11:5e\" } } ";
+ ITNeutronE2E.test_modify(url, content, "Port Put Failed");
}
public void port_element_get_test() {
}
public void port_element_get_with_query_test() {
- String url = base + "/ports/43c831e0-19ce-4a76-9a49-57b57e69428b" +
- "?fields=id&fields=network_id&fields=name&fields=admin_state_up" +
- "&fields=status&fields=mac_address&fields=device_id&fields=tenant_id" +
- "&fields=device_owner&fields=limit&fields=marker&fields=page_reverse";
+ String url = base + "/ports/43c831e0-19ce-4a76-9a49-57b57e69428b"
+ + "?fields=id&fields=network_id&fields=name&fields=admin_state_up"
+ + "&fields=status&fields=mac_address&fields=device_id&fields=tenant_id"
+ + "&fields=device_owner&fields=limit&fields=marker&fields=page_reverse";
ITNeutronE2E.test_fetch(url, true, "Port Element Get With Query Failed");
}
public String singleton_qos_policy_create_test() {
String url = base + "/qos/policies";
- String content = "{\"policy\": {\"id\": \"d6220bbb-35f3-48ab-8eae-69c60aef3546\"," +
- "\"tenant_id\": \"aa902936679e4ea29bfe1158e3450a13\"," + "\"name\": \"jaxb-test\", " +
- "\"shared\": false }}";
+ String content = "{\"policy\": {\"id\": \"d6220bbb-35f3-48ab-8eae-69c60aef3546\","
+ + "\"tenant_id\": \"aa902936679e4ea29bfe1158e3450a13\"," + "\"name\": \"jaxb-test\", "
+ + "\"shared\": false }}";
ITNeutronE2E.test_create(url, content, "Qos Policy Singleton POST Failed");
return content;
}
public void qos_policy_modify_test() {
String url = base + "/qos/policies/d6220bbb-35f3-48ab-8eae-69c60aef3546";
- String content = "{\"policy\": {\"id\": \"d6220bbb-35f3-48ab-8eae-69c60aef3546\"," +
- "\"tenant_id\": \"aa902936679e4ea29bfe1158e3450a13\"," + "\"name\": \"jaxb-test\", " +
- "\"shared\": false," +
- "\"bandwidth_limit_rules\": [ {\"id\": \"d6220bbb-35f3-48ab-8eae-69c60aef3547\"," +
- "\"tenant_id\": \"aa902936679e4ea29bfe1158e3450a14\",\"max_kbps\": 25," +
- "\"max_burst_kbps\": 100 } ] ," +
- "\"dscp_marking_rules\": [ {\"id\": \"d6220bbb-35f3-48ab-8eae-69c60aef3547\"," +
- "\"tenant_id\": \"aa902936679e4ea29bfe1158e3450a14\", " +
- "\"dscp_mark\": 8 } ] }}";
+ String content = "{\"policy\": {\"id\": \"d6220bbb-35f3-48ab-8eae-69c60aef3546\","
+ + "\"tenant_id\": \"aa902936679e4ea29bfe1158e3450a13\"," + "\"name\": \"jaxb-test\", "
+ + "\"shared\": false,"
+ + "\"bandwidth_limit_rules\": [ {\"id\": \"d6220bbb-35f3-48ab-8eae-69c60aef3547\","
+ + "\"tenant_id\": \"aa902936679e4ea29bfe1158e3450a14\",\"max_kbps\": 25,"
+ + "\"max_burst_kbps\": 100 } ] ,"
+ + "\"dscp_marking_rules\": [ {\"id\": \"d6220bbb-35f3-48ab-8eae-69c60aef3547\","
+ + "\"tenant_id\": \"aa902936679e4ea29bfe1158e3450a14\", " + "\"dscp_mark\": 8 } ] }}";
ITNeutronE2E.test_modify(url, content, "Qos Policy Singleton Put failed");
}
}
public void qos_policy_element_get_with_query_test() {
- String url = base + "/qos/policies/d6220bbb-35f3-48ab-8eae-69c60aef3546" +
- "?fields=tenant_id&fields=id&fields=name&fields=description" +
- "&fields=shared&fields=limits" +
- "&fields=marker&fields=page_reverse";
+ String url = base + "/qos/policies/d6220bbb-35f3-48ab-8eae-69c60aef3546"
+ + "?fields=tenant_id&fields=id&fields=name&fields=description" + "&fields=shared&fields=limits"
+ + "&fields=marker&fields=page_reverse";
ITNeutronE2E.test_fetch(url, true, "Qos Firewall Element Get with Query Failed");
}
//TODO handle SB check
public String singleton_router_create_test() {
String url = base + "/routers";
- String content = "{ \"router\": { " +
- "\"status\": \"ACTIVE\", " +
- "\"external_gateway_info\": { " +
- "\"network_id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\" }, " +
- "\"name\": \"another_router\", " +
- "\"admin_state_up\": true, " +
- "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " +
- "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e\" } } ";
+ String content = "{ \"router\": { " + "\"status\": \"ACTIVE\", " + "\"external_gateway_info\": { "
+ + "\"network_id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\" }, " + "\"name\": \"another_router\", "
+ + "\"admin_state_up\": true, " + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "
+ + "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e\" } } ";
ITNeutronE2E.test_create(url, content, "Singleton Router Post Failed NB");
return content;
}
//TODO handle SB check
public void create_router() {
String url = base + "/routers";
- String content = "{ \"router\": { " +
- "\"status\": \"ACTIVE\", " +
- "\"external_gateway_info\": { " +
- "\"network_id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\" }, " +
- "\"name\": \"another_router\", " +
- "\"admin_state_up\": true, " +
- "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " +
- "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2f\" } } ";
+ String content = "{ \"router\": { " + "\"status\": \"ACTIVE\", " + "\"external_gateway_info\": { "
+ + "\"network_id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\" }, " + "\"name\": \"another_router\", "
+ + "\"admin_state_up\": true, " + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "
+ + "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2f\" } } ";
ITNeutronE2E.test_create(url, content, "Singleton Router Post Failed NB");
}
//TODO handle SB check
public void update_router_test() {
String url = base + "/routers/8604a0de-7f6b-409a-a47c-a1cc7bc77b2e";
- String content = "{ \"router\": { " +
- "\"status\": \"ACTIVE\", " +
- "\"external_gateway_info\": { " +
- "\"network_id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\" }, " +
- "\"name\": \"new_name\", " +
- "\"admin_state_up\": true, " +
- "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " +
- "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e\" } } ";
+ String content = "{ \"router\": { " + "\"status\": \"ACTIVE\", " + "\"external_gateway_info\": { "
+ + "\"network_id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\" }, " + "\"name\": \"new_name\", "
+ + "\"admin_state_up\": true, " + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "
+ + "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e\" } } ";
ITNeutronE2E.test_modify(url, content, "Singleton Router Put Failed NB");
}
//TODO handle SB check
public void router_add_interface_test() {
String url = base + "/routers/8604a0de-7f6b-409a-a47c-a1cc7bc77b2e/add_router_interface";
- String content = "{ " +
- "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", " +
- "\"port_id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51e\", " +
- "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " +
- "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e\"}";
+ String content = "{ " + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", "
+ + "\"port_id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51e\", "
+ + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "
+ + "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e\"}";
ITNeutronE2E.test_modify(url, content, "Add Interface to Router Put Failed NB");
}
//TODO handle SB check
public void router_add_interface() {
String url = base + "/routers/8604a0de-7f6b-409a-a47c-a1cc7bc77b2f/add_router_interface";
- String content = "{ " +
- "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", " +
- "\"port_id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51f\", " +
- "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " +
- "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2f\"}";
+ String content = "{ " + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", "
+ + "\"port_id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51f\", "
+ + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "
+ + "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2f\"}";
ITNeutronE2E.test_modify(url, content, "Router Prep Interface Add Failed");
}
//TODO handle SB check
public void router_remove_interface_test() {
String url = base + "/routers/8604a0de-7f6b-409a-a47c-a1cc7bc77b2f/remove_router_interface";
- String content = "{ " +
- "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", " +
- "\"port_id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51f\", " +
- "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " +
- "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2f\"}";
+ String content = "{ " + "\"subnet_id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\", "
+ + "\"port_id\": \"d8a4cc85-ad78-46ac-b5a1-8e04f16fa51f\", "
+ + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "
+ + "\"id\": \"8604a0de-7f6b-409a-a47c-a1cc7bc77b2f\"}";
ITNeutronE2E.test_modify(url, content, "Remove Interface to Router Put Failed NB");
}
}
public void router_element_get_with_query_test() {
- String url = base + "/routers/8604a0de-7f6b-409a-a47c-a1cc7bc77b2f"+
- "?fields=id&fields=admin_state_up&fields=name&fields=status" +
- "&fields=tenant_id&fields=external_gateway_info" +
- "&fields=limit&fields=marker&fields=page_reverse";;
+ String url = base + "/routers/8604a0de-7f6b-409a-a47c-a1cc7bc77b2f"
+ + "?fields=id&fields=admin_state_up&fields=name&fields=status"
+ + "&fields=tenant_id&fields=external_gateway_info" + "&fields=limit&fields=marker&fields=page_reverse";
+ ;
ITNeutronE2E.test_fetch(url, true, "Router Element Get With Query Test");
}
router_tester.router_element_negative_get_test();
}
}
-
public String singleton_sg_create_test() {
String url = base + "/security-groups";
- String content = "{\"security_group\": {\"tenant_id\": " +
- "\"1dfe7dffa0624ae882cdbda397d1d276\", \"description\": \"\", " +
- "\"id\": \"521e29d6-67b8-4b3c-8633-027d21195333\", " +
- "\"security_group_rules\": [{\"remote_group_id\": null, " +
- "\"direction\": \"egress\", \"remote_ip_prefix\": null, " +
- "\"protocol\": null, \"ethertype\": \"IPv4\", " +
- "\"tenant_id\": \"1dfe7dffa0624ae882cdbda397d1d276\", " +
- "\"port_range_max\": null, \"port_range_min\": null, " +
- "\"id\": \"823faaf7-175d-4f01-a271-0bf56fb1e7e6\", " +
- "\"security_group_id\": \"d3329053-bae5-4bf4-a2d1-7330f11ba5db\"}, " +
- "{\"remote_group_id\": null, \"direction\": \"egress\", " +
- "\"remote_ip_prefix\": null, \"protocol\": null, " +
- "\"ethertype\": \"IPv6\", \"tenant_id\": " +
- "\"1dfe7dffa0624ae882cdbda397d1d276\", \"port_range_max\": null, " +
- "\"port_range_min\": null, \"id\": " +
- "\"d3329053-bae5-4bf4-a2d1-7330f11ba5db\", " +
- "\"security_group_id\": \"d3329053-bae5-4bf4-a2d1-7330f11ba5db\"}], " +
- "\"name\": \"tempest-secgroup-1272206251\"}}";
+ String content = "{\"security_group\": {\"tenant_id\": "
+ + "\"1dfe7dffa0624ae882cdbda397d1d276\", \"description\": \"\", "
+ + "\"id\": \"521e29d6-67b8-4b3c-8633-027d21195333\", "
+ + "\"security_group_rules\": [{\"remote_group_id\": null, "
+ + "\"direction\": \"egress\", \"remote_ip_prefix\": null, "
+ + "\"protocol\": null, \"ethertype\": \"IPv4\", "
+ + "\"tenant_id\": \"1dfe7dffa0624ae882cdbda397d1d276\", "
+ + "\"port_range_max\": null, \"port_range_min\": null, "
+ + "\"id\": \"823faaf7-175d-4f01-a271-0bf56fb1e7e6\", "
+ + "\"security_group_id\": \"d3329053-bae5-4bf4-a2d1-7330f11ba5db\"}, "
+ + "{\"remote_group_id\": null, \"direction\": \"egress\", "
+ + "\"remote_ip_prefix\": null, \"protocol\": null, " + "\"ethertype\": \"IPv6\", \"tenant_id\": "
+ + "\"1dfe7dffa0624ae882cdbda397d1d276\", \"port_range_max\": null, "
+ + "\"port_range_min\": null, \"id\": " + "\"d3329053-bae5-4bf4-a2d1-7330f11ba5db\", "
+ + "\"security_group_id\": \"d3329053-bae5-4bf4-a2d1-7330f11ba5db\"}], "
+ + "\"name\": \"tempest-secgroup-1272206251\"}}";
ITNeutronE2E.test_create(url, content, "Security Group Singleton Post Failed");
return content;
}
public void sg_update_test() {
String url = base + "/security-groups/521e29d6-67b8-4b3c-8633-027d21195333";
- String content = "{\"security_group\": {\"tenant_id\": " +
- "\"00f340c7c3b34ab7be1fc690c05a0275\", \"description\": " +
- "\"tempest-security-description-897433715\", \"id\": " +
- "\"521e29d6-67b8-4b3c-8633-027d21195333\", " +
- "\"security_group_rules\": [{\"remote_group_id\": null, " +
- "\"direction\": \"egress\", \"remote_ip_prefix\": null, " +
- "\"protocol\": null, \"ethertype\": \"IPv4\", \"tenant_id\": " +
- "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": null, " +
- "\"port_range_min\": null, \"id\": " +
- "\"808bcefb-9917-4640-be68-14157bf33288\", \"security_group_id\": " +
- "\"521e29d6-67b8-4b3c-8633-027d21195333\"}, {\"remote_group_id\": " +
- "null, \"direction\": \"egress\", \"remote_ip_prefix\": null, " +
- "\"protocol\": null, \"ethertype\": \"IPv6\", \"tenant_id\": " +
- "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": null, " +
- "\"port_range_min\": null, \"id\": " +
- "\"c376f7b5-a281-40e0-a703-5c832c03aeb3\", " +
- "\"security_group_id\": " +
- "\"521e29d6-67b8-4b3c-8633-027d21195333\"}], \"name\": " +
- "\"tempest-security--1135434738\"}}";
+ String content = "{\"security_group\": {\"tenant_id\": "
+ + "\"00f340c7c3b34ab7be1fc690c05a0275\", \"description\": "
+ + "\"tempest-security-description-897433715\", \"id\": " + "\"521e29d6-67b8-4b3c-8633-027d21195333\", "
+ + "\"security_group_rules\": [{\"remote_group_id\": null, "
+ + "\"direction\": \"egress\", \"remote_ip_prefix\": null, "
+ + "\"protocol\": null, \"ethertype\": \"IPv4\", \"tenant_id\": "
+ + "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": null, "
+ + "\"port_range_min\": null, \"id\": "
+ + "\"808bcefb-9917-4640-be68-14157bf33288\", \"security_group_id\": "
+ + "\"521e29d6-67b8-4b3c-8633-027d21195333\"}, {\"remote_group_id\": "
+ + "null, \"direction\": \"egress\", \"remote_ip_prefix\": null, "
+ + "\"protocol\": null, \"ethertype\": \"IPv6\", \"tenant_id\": "
+ + "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": null, "
+ + "\"port_range_min\": null, \"id\": " + "\"c376f7b5-a281-40e0-a703-5c832c03aeb3\", "
+ + "\"security_group_id\": " + "\"521e29d6-67b8-4b3c-8633-027d21195333\"}], \"name\": "
+ + "\"tempest-security--1135434738\"}}";
ITNeutronE2E.test_modify(url, content, "Security Group Put Failed");
}
}
public void sg_element_get_with_query_test() {
- String url = base + "/security-groups/521e29d6-67b8-4b3c-8633-027d21195333" +
- "?fields=id&fields=name&fields=description&fields=tenant_id" +
- "&fields=limit&fields=marker&fields=page_reverse";
+ String url = base + "/security-groups/521e29d6-67b8-4b3c-8633-027d21195333"
+ + "?fields=id&fields=name&fields=description&fields=tenant_id"
+ + "&fields=limit&fields=marker&fields=page_reverse";
ITNeutronE2E.test_fetch(url, true, "Security Group Element Get Failed");
}
public String singleton_sr_create_test() {
String url = base + "/security-group-rules";
- String content = " {\"security_group_rule\": " +
- "{\"remote_group_id\": null, \"direction\": \"ingress\", " +
- "\"remote_ip_prefix\": null, \"protocol\": \"tcp\", " +
- "\"ethertype\": \"IPv6\", \"tenant_id\": " +
- "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": 77, " +
- "\"port_range_min\": 77, " +
- "\"id\": \"9b4be7fa-e56e-40fb-9516-1f0fa9185669\", " +
- "\"security_group_id\": " +
- "\"b60490fe-60a5-40be-af63-1d641381b784\"}}";
+ String content = " {\"security_group_rule\": " + "{\"remote_group_id\": null, \"direction\": \"ingress\", "
+ + "\"remote_ip_prefix\": null, \"protocol\": \"tcp\", " + "\"ethertype\": \"IPv6\", \"tenant_id\": "
+ + "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": 77, " + "\"port_range_min\": 77, "
+ + "\"id\": \"9b4be7fa-e56e-40fb-9516-1f0fa9185669\", " + "\"security_group_id\": "
+ + "\"b60490fe-60a5-40be-af63-1d641381b784\"}}";
ITNeutronE2E.test_create(url, content, "Security Rule Singleton Post Failed");
return content;
}
public void multiple_sr_create_test() {
String url = base + "/security-group-rules";
- String content = " {\"security_group_rules\": [" +
- "{" +
- " \"id\": \"35fb0f34-c8d3-416d-a205-a2c75f7b8e22\"," +
- " \"direction\": \"egress\"," +
- " \"ethertype\": \"IPv6\"," +
- " \"protocol\": \"tcp\"," +
- " \"security_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\"," +
- " \"tenant_id\": \"2640ee2ac2474bf3906e482047204fcb\"" +
- "}," +
- "{" +
- " \"id\": \"63814eed-bc12-4fe4-8b17-2af178224c71\"," +
- " \"direction\": \"egress\"," +
- " \"ethertype\": \"IPv4\"," +
- " \"protocol\": \"6\"," +
- " \"security_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\"," +
- " \"tenant_id\": \"2640ee2ac2474bf3906e482047204fcb\"" +
- "}," +
- "{" +
- " \"id\": \"ccb9823e-559b-4d84-b656-2739f8e56d89\"," +
- " \"direction\": \"ingress\"," +
- " \"ethertype\": \"IPv6\"," +
- " \"protocol\": 6," +
- " \"remote_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\"," +
- " \"security_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\"," +
- " \"tenant_id\": \"2640ee2ac2474bf3906e482047204fcb\"" +
- "}," +
- "{" +
- " \"id\": \"fbc3f809-7378-40a4-822f-7a70f6ccba98\"," +
- " \"direction\": \"ingress\"," +
- " \"ethertype\": \"IPv4\"," +
- " \"protocol\": \"udp\"," +
- " \"remote_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\"," +
- " \"security_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\"," +
- " \"tenant_id\": \"2640ee2ac2474bf3906e482047204fcb\"" +
- "}" +
- "]}";
+ String content = " {\"security_group_rules\": [" + "{" + " \"id\": \"35fb0f34-c8d3-416d-a205-a2c75f7b8e22\","
+ + " \"direction\": \"egress\"," + " \"ethertype\": \"IPv6\"," + " \"protocol\": \"tcp\","
+ + " \"security_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\","
+ + " \"tenant_id\": \"2640ee2ac2474bf3906e482047204fcb\"" + "}," + "{"
+ + " \"id\": \"63814eed-bc12-4fe4-8b17-2af178224c71\"," + " \"direction\": \"egress\","
+ + " \"ethertype\": \"IPv4\"," + " \"protocol\": \"6\","
+ + " \"security_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\","
+ + " \"tenant_id\": \"2640ee2ac2474bf3906e482047204fcb\"" + "}," + "{"
+ + " \"id\": \"ccb9823e-559b-4d84-b656-2739f8e56d89\"," + " \"direction\": \"ingress\","
+ + " \"ethertype\": \"IPv6\"," + " \"protocol\": 6,"
+ + " \"remote_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\","
+ + " \"security_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\","
+ + " \"tenant_id\": \"2640ee2ac2474bf3906e482047204fcb\"" + "}," + "{"
+ + " \"id\": \"fbc3f809-7378-40a4-822f-7a70f6ccba98\"," + " \"direction\": \"ingress\","
+ + " \"ethertype\": \"IPv4\"," + " \"protocol\": \"udp\","
+ + " \"remote_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\","
+ + " \"security_group_id\": \"70f1b157-e79b-44dc-85a8-7de0fc9f2aab\","
+ + " \"tenant_id\": \"2640ee2ac2474bf3906e482047204fcb\"" + "}" + "]}";
ITNeutronE2E.test_create(url, content, "Security Rule Multiple Post Failed");
}
public void singleton_sr_modify_test() {
String url = base + "/security-group-rules/9b4be7fa-e56e-40fb-9516-1f0fa9185669";
- String content = " {\"security_group_rule\": " +
- "{\"remote_group_id\": null, \"direction\": \"egress\", " +
- "\"remote_ip_prefix\": null, \"protocol\": \"tcp\", " +
- "\"ethertype\": \"IPv6\", \"tenant_id\": " +
- "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": 77, " +
- "\"port_range_min\": 77, " +
- "\"id\": \"9b4be7fa-e56e-40fb-9516-1f0fa9185669\", " +
- "\"security_group_id\": " +
- "\"b60490fe-60a5-40be-af63-1d641381b784\"}}";
+ String content = " {\"security_group_rule\": " + "{\"remote_group_id\": null, \"direction\": \"egress\", "
+ + "\"remote_ip_prefix\": null, \"protocol\": \"tcp\", " + "\"ethertype\": \"IPv6\", \"tenant_id\": "
+ + "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": 77, " + "\"port_range_min\": 77, "
+ + "\"id\": \"9b4be7fa-e56e-40fb-9516-1f0fa9185669\", " + "\"security_group_id\": "
+ + "\"b60490fe-60a5-40be-af63-1d641381b784\"}}";
ITNeutronE2E.test_modify(url, content, "Security Rule Singleton Put Failed");
}
}
public void sr_element_get_with_query_test() {
- String url = base + "/security-group-rules/9b4be7fa-e56e-40fb-9516-1f0fa9185669" +
- "?fields=id&fields=direction&fields=protocol&fields=port_range_min" +
- "&fields=port_range_max&fields=ethertype&fields=remote_ip_prefix" +
- "&fields=remote_group_id&fields=security_group_id&fields=tenant_id" +
- "&fields=limit&fields=marker&fields=page_reverse";
+ String url = base + "/security-group-rules/9b4be7fa-e56e-40fb-9516-1f0fa9185669"
+ + "?fields=id&fields=direction&fields=protocol&fields=port_range_min"
+ + "&fields=port_range_max&fields=ethertype&fields=remote_ip_prefix"
+ + "&fields=remote_group_id&fields=security_group_id&fields=tenant_id"
+ + "&fields=limit&fields=marker&fields=page_reverse";
ITNeutronE2E.test_fetch(url, true, "Security Rule Element Get With Query Failed");
}
public void bug4043_ipv4_test() {
String url = base + "/security-group-rules";
- String content = " {\"security_group_rule\": " +
- "{\"remote_group_id\": null, \"direction\": \"ingress\", " +
- "\"remote_ip_prefix\": \"10.10.10.10/16\", \"protocol\": \"tcp\", " +
- "\"ethertype\": \"IPv4\", \"tenant_id\": " +
- "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": 77, " +
- "\"port_range_min\": 77, " +
- "\"id\": \"01234567-0123-0123-0123-01234567890a\", " +
- "\"security_group_id\": " +
- "\"b60490fe-60a5-40be-af63-1d641381b784\"}}";
+ String content = " {\"security_group_rule\": " + "{\"remote_group_id\": null, \"direction\": \"ingress\", "
+ + "\"remote_ip_prefix\": \"10.10.10.10/16\", \"protocol\": \"tcp\", "
+ + "\"ethertype\": \"IPv4\", \"tenant_id\": "
+ + "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": 77, " + "\"port_range_min\": 77, "
+ + "\"id\": \"01234567-0123-0123-0123-01234567890a\", " + "\"security_group_id\": "
+ + "\"b60490fe-60a5-40be-af63-1d641381b784\"}}";
ITNeutronE2E.test_create(url, content, "Security Rule bug4043 IPv4 Failed");
url = url + "/01234567-0123-0123-0123-01234567890a";
public void bug4043_ipv6_test() {
String url = base + "/security-group-rules";
- String content = " {\"security_group_rule\": " +
- "{\"remote_group_id\": null, \"direction\": \"ingress\", " +
- "\"remote_ip_prefix\": \"fe80::1/10\", \"protocol\": \"tcp\", " +
- "\"ethertype\": \"IPv6\", \"tenant_id\": " +
- "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": 77, " +
- "\"port_range_min\": 77, " +
- "\"id\": \"01234567-0123-0123-0123-01234567890a\", " +
- "\"security_group_id\": " +
- "\"b60490fe-60a5-40be-af63-1d641381b784\"}}";
+ String content = " {\"security_group_rule\": " + "{\"remote_group_id\": null, \"direction\": \"ingress\", "
+ + "\"remote_ip_prefix\": \"fe80::1/10\", \"protocol\": \"tcp\", "
+ + "\"ethertype\": \"IPv6\", \"tenant_id\": "
+ + "\"00f340c7c3b34ab7be1fc690c05a0275\", \"port_range_max\": 77, " + "\"port_range_min\": 77, "
+ + "\"id\": \"01234567-0123-0123-0123-01234567890a\", " + "\"security_group_id\": "
+ + "\"b60490fe-60a5-40be-af63-1d641381b784\"}}";
ITNeutronE2E.test_create(url, content, "Security Rule Bug4043 IPv6 Failed");
url = url + "/01234567-0123-0123-0123-01234567890a";
//TODO handle SB check
public String singleton_subnet_create_test() {
String url = base + "/subnets";
- String content = " { \"subnet\": { "+
- "\"name\": \"\", "+
- "\"enable_dhcp\": true, "+
- "\"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "+
- "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "+
- "\"dns_nameservers\": [\"8.8.8.8\"], "+
- "\"allocation_pools\": [ { "+
- "\"start\": \"10.0.0.2\", "+
- "\"end\": \"10.0.0.254\" } ], "+
- "\"host_routes\":[ { \"destination\":\"0.0.0.0/0\", " +
- " \"nexthop\":\"10.0.0.1\" }, " +
- " { \"destination\":\"192.168.0.0/24\", " +
- " \"nexthop\":\"10.0.0.2\" } ], " +
- "\"ip_version\": 4, "+
- "\"gateway_ip\": \"10.0.0.1\", "+
- "\"cidr\": \"10.0.0.0/24\", "+
- "\"id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\" } } ";
+ String content = " { \"subnet\": { " + "\"name\": \"\", " + "\"enable_dhcp\": true, "
+ + "\"network_id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\", "
+ + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " + "\"dns_nameservers\": [\"8.8.8.8\"], "
+ + "\"allocation_pools\": [ { " + "\"start\": \"10.0.0.2\", " + "\"end\": \"10.0.0.254\" } ], "
+ + "\"host_routes\":[ { \"destination\":\"0.0.0.0/0\", " + " \"nexthop\":\"10.0.0.1\" }, "
+ + " { \"destination\":\"192.168.0.0/24\", " + " \"nexthop\":\"10.0.0.2\" } ], " + "\"ip_version\": 4, "
+ + "\"gateway_ip\": \"10.0.0.1\", " + "\"cidr\": \"10.0.0.0/24\", "
+ + "\"id\": \"3b80198d-4f7b-4f77-9ef5-774d54e17126\" } } ";
ITNeutronE2E.test_create(url, content, "Singleton Subnet Post Failed NB");
return content;
}
//TODO handle SB check
public void external_subnet_create_test() {
String url = base + "/subnets";
- String content = " { \"subnet\": { "+
- "\"name\": \"\", "+
- "\"enable_dhcp\": true, "+
- "\"network_id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\", "+
- "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", "+
- "\"dns_nameservers\": [], "+
- "\"allocation_pools\": [ { "+
- "\"start\": \"10.1.0.2\", "+
- "\"end\": \"10.1.0.254\" } ], "+
- "\"host_routes\": [], "+
- "\"ip_version\": 4, "+
- "\"gateway_ip\": \"10.1.0.1\", "+
- "\"cidr\": \"10.1.0.0/24\", "+
- "\"id\": \"f13b537f-1268-455f-b5fa-1e6817a9c204\" } } ";
+ String content = " { \"subnet\": { " + "\"name\": \"\", " + "\"enable_dhcp\": true, "
+ + "\"network_id\": \"8ca37218-28ff-41cb-9b10-039601ea7e6b\", "
+ + "\"tenant_id\": \"9bacb3c5d39d41a79512987f338cf177\", " + "\"dns_nameservers\": [], "
+ + "\"allocation_pools\": [ { " + "\"start\": \"10.1.0.2\", " + "\"end\": \"10.1.0.254\" } ], "
+ + "\"host_routes\": [], " + "\"ip_version\": 4, " + "\"gateway_ip\": \"10.1.0.1\", "
+ + "\"cidr\": \"10.1.0.0/24\", " + "\"id\": \"f13b537f-1268-455f-b5fa-1e6817a9c204\" } } ";
ITNeutronE2E.test_create(url, content, "External Subnet Post Failed NB");
}
public void bulk_subnet_create_test() {
String url = base + "/subnets";
- String content = " { \"subnets\": [ "
- + " { \"allocation_pools\": [ "
- + " { \"end\": \"192.168.199.254\", \"start\": \"192.168.199.2\" } ], "
- + " \"cidr\": \"192.168.199.0/24\", "
- + " \"dns_nameservers\": [\"8.8.8.8\"], "
- + " \"enable_dhcp\": true, "
- + " \"gateway_ip\": \"192.168.199.1\", "
- + " \"host_routes\":[ { \"destination\":\"0.0.0.0/0\", "
- + " \"nexthop\":\"192.168.199.3\" }, "
- + " { \"destination\":\"192.168.0.0/24\", "
- + " \"nexthop\":\"192.168.199.4\" } ], "
- + " \"id\": \"0468a7a7-290d-4127-aedd-6c9449775a24\", "
- + " \"ip_version\": 4, "
- + " \"name\": \"\", "
- + " \"network_id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", "
- + " \"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\" }, { "
- + " \"allocation_pools\": [ { \"end\": \"10.56.7.254\", \"start\": \"10.56.4.2\" } ], "
- + " \"cidr\": \"10.56.4.0/22\", "
- + " \"dns_nameservers\": [\"8.8.8.8\", \"8.8.8.4\"], "
- + " \"enable_dhcp\": true, "
- + " \"gateway_ip\": \"10.56.4.1\", "
- + " \"host_routes\":[ { \"destination\":\"0.0.0.0/0\", "
- + " \"nexthop\":\"10.56.4.3\" }, "
- + " { \"destination\":\"192.168.0.0/24\", "
- + " \"nexthop\":\"10.56.4.4\" } ], "
- + " \"id\": \"b0e7435c-1512-45fb-aa9e-9a7c5932fb30\", "
- + " \"ip_version\": 4, "
- + " \"name\": \"\", "
- + " \"network_id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", "
- + " \"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\" } ] }";
+ String content = " { \"subnets\": [ " + " { \"allocation_pools\": [ "
+ + " { \"end\": \"192.168.199.254\", \"start\": \"192.168.199.2\" } ], "
+ + " \"cidr\": \"192.168.199.0/24\", " + " \"dns_nameservers\": [\"8.8.8.8\"], "
+ + " \"enable_dhcp\": true, " + " \"gateway_ip\": \"192.168.199.1\", "
+ + " \"host_routes\":[ { \"destination\":\"0.0.0.0/0\", " + " \"nexthop\":\"192.168.199.3\" }, "
+ + " { \"destination\":\"192.168.0.0/24\", " + " \"nexthop\":\"192.168.199.4\" } ], "
+ + " \"id\": \"0468a7a7-290d-4127-aedd-6c9449775a24\", " + " \"ip_version\": 4, " + " \"name\": \"\", "
+ + " \"network_id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", "
+ + " \"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\" }, { "
+ + " \"allocation_pools\": [ { \"end\": \"10.56.7.254\", \"start\": \"10.56.4.2\" } ], "
+ + " \"cidr\": \"10.56.4.0/22\", " + " \"dns_nameservers\": [\"8.8.8.8\", \"8.8.8.4\"], "
+ + " \"enable_dhcp\": true, " + " \"gateway_ip\": \"10.56.4.1\", "
+ + " \"host_routes\":[ { \"destination\":\"0.0.0.0/0\", " + " \"nexthop\":\"10.56.4.3\" }, "
+ + " { \"destination\":\"192.168.0.0/24\", " + " \"nexthop\":\"10.56.4.4\" } ], "
+ + " \"id\": \"b0e7435c-1512-45fb-aa9e-9a7c5932fb30\", " + " \"ip_version\": 4, " + " \"name\": \"\", "
+ + " \"network_id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", "
+ + " \"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\" } ] }";
ITNeutronE2E.test_create(url, content, "Bulk Subnet Post Failed");
}
public void subnet_update_test() {
String url = base + "/subnets/b0e7435c-1512-45fb-aa9e-9a7c5932fb30";
- String content = " { \"subnet\": { "
- + " \"name\": \"my_subnet\", "
- + " \"enable_dhcp\": true, "
- + " \"network_id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", "
- + " \"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
- + " \"dns_nameservers\": [\"8.8.8.8\", \"8.8.8.4\"], "
- + " \"allocation_pools\": [ { \"start\": \"10.0.0.2\", \"end\": \"10.0.0.254\" } ], "
- + " \"host_routes\": [{ \"destination\":\"192.168.0.0/24\", "
- + " \"nexthop\":\"10.0.0.11\" } ], "
- + " \"ip_version\": 4, "
- + " \"gateway_ip\": \"10.0.0.1\", "
- + " \"cidr\": \"10.0.0.0/24\", "
- + " \"id\": \"b0e7435c-1512-45fb-aa9e-9a7c5932fb30\" } }";
- ITNeutronE2E.test_modify(url, content,"Subnet Put Failed");
+ String content = " { \"subnet\": { " + " \"name\": \"my_subnet\", " + " \"enable_dhcp\": true, "
+ + " \"network_id\": \"af374017-c9ae-4a1d-b799-ab73111476e2\", "
+ + " \"tenant_id\": \"4fd44f30292945e481c7b8a0c8908869\", "
+ + " \"dns_nameservers\": [\"8.8.8.8\", \"8.8.8.4\"], "
+ + " \"allocation_pools\": [ { \"start\": \"10.0.0.2\", \"end\": \"10.0.0.254\" } ], "
+ + " \"host_routes\": [{ \"destination\":\"192.168.0.0/24\", " + " \"nexthop\":\"10.0.0.11\" } ], "
+ + " \"ip_version\": 4, " + " \"gateway_ip\": \"10.0.0.1\", " + " \"cidr\": \"10.0.0.0/24\", "
+ + " \"id\": \"b0e7435c-1512-45fb-aa9e-9a7c5932fb30\" } }";
+ ITNeutronE2E.test_modify(url, content, "Subnet Put Failed");
}
public void subnet_element_get_test() {
}
public void subnet_element_get_with_query_test() {
- String url = base + "/subnets/b0e7435c-1512-45fb-aa9e-9a7c5932fb30" +
- "?fields=id&fields=network_id&fields=name&fields=ip_version" +
- "&fields=cidr&fields=gateway_ip&fields=enable_dhcp" +
- "&fields=tenant_id&fields=ipv6_address_mode&fields=ipv6_ra_mode" +
- "&fields=limit&fields=marker&fields=page_reverse";
+ String url = base + "/subnets/b0e7435c-1512-45fb-aa9e-9a7c5932fb30"
+ + "?fields=id&fields=network_id&fields=name&fields=ip_version"
+ + "&fields=cidr&fields=gateway_ip&fields=enable_dhcp"
+ + "&fields=tenant_id&fields=ipv6_address_mode&fields=ipv6_ra_mode"
+ + "&fields=limit&fields=marker&fields=page_reverse";
ITNeutronE2E.test_fetch(url, true, "Subnet Element Get with Query Failed");
}
public String singleton_vpnservice_create_test() {
String url = base + "/vpn/vpnservices";
- String content = " { \"vpnservice\": {" +
- "\"router_id\": \"ec8619be-0ba8-4955-8835-3b49ddb76f89\"," +
- "\"status\": \"PENDING_CREATE\"," +
- "\"name\": \"myservice\"," +
- "\"admin_state_up\": true," +
- "\"subnet_id\": \"f4fb4528-ed93-467c-a57b-11c7ea9f963e\"," +
- "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\"," +
- "\"id\": \"9faaf49f-dd89-4e39-a8c6-101839aa49bc\"," +
- "\"description\": \"\" } }";
+ String content = " { \"vpnservice\": {" + "\"router_id\": \"ec8619be-0ba8-4955-8835-3b49ddb76f89\","
+ + "\"status\": \"PENDING_CREATE\"," + "\"name\": \"myservice\"," + "\"admin_state_up\": true,"
+ + "\"subnet_id\": \"f4fb4528-ed93-467c-a57b-11c7ea9f963e\","
+ + "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\","
+ + "\"id\": \"9faaf49f-dd89-4e39-a8c6-101839aa49bc\"," + "\"description\": \"\" } }";
ITNeutronE2E.test_create(url, content, "VPN Services POST failed");
return content;
}
public void vpnservice_update_test() {
String url = base + "/vpn/vpnservices/9faaf49f-dd89-4e39-a8c6-101839aa49bc";
- String content = " { \"vpnservice\": {" +
- "\"router_id\": \"881b7b30-4efb-407e-a162-5630a7af3595\"," +
- "\"status\": \"ACTIVE\"," +
- "\"name\": \"myvpn\"," +
- "\"admin_state_up\": true," +
- "\"subnet_id\": \"25f8a35c-82d5-4f55-a45b-6965936b33f6\"," +
- "\"tenant_id\": \"26de9cd6cae94c8cb9f79d660d628e1f\"," +
- "\"id\": \"41bfef97-af4e-4f6b-a5d3-4678859d2485\"," +
- "\"description\": \"Updated description\" } }";
+ String content = " { \"vpnservice\": {" + "\"router_id\": \"881b7b30-4efb-407e-a162-5630a7af3595\","
+ + "\"status\": \"ACTIVE\"," + "\"name\": \"myvpn\"," + "\"admin_state_up\": true,"
+ + "\"subnet_id\": \"25f8a35c-82d5-4f55-a45b-6965936b33f6\","
+ + "\"tenant_id\": \"26de9cd6cae94c8cb9f79d660d628e1f\","
+ + "\"id\": \"41bfef97-af4e-4f6b-a5d3-4678859d2485\"," + "\"description\": \"Updated description\" } }";
ITNeutronE2E.test_modify(url, content, "VPN Services PUT failed");
}
}
public void vpnservice_element_get_with_query_test() {
- String url = base + "/vpn/vpnservices/9faaf49f-dd89-4e39-a8c6-101839aa49bc" +
- "?fields=id&fields=tenant_id&fields=name&fields=admin_state_up" +
- "&fields=router_id&fields=status&fields=subnet_id" +
- "&fields=limit&fields=marker&fields=page_reverse";
+ String url = base + "/vpn/vpnservices/9faaf49f-dd89-4e39-a8c6-101839aa49bc"
+ + "?fields=id&fields=tenant_id&fields=name&fields=admin_state_up"
+ + "&fields=router_id&fields=status&fields=subnet_id"
+ + "&fields=limit&fields=marker&fields=page_reverse";
ITNeutronE2E.test_fetch(url, true, "VPN Services Element GET failed");
}
public void check_bug3812() {
// create network
String url_n = base + "/networks";
- String content_n = "{\"network\": {\"name\": \"test\", \"provider:physical_network\": \"\", \"router:external\": false, \"tenant_id\": \"04684ce029a6415ca8a9293a24f884b9\", \"admin_state_up\": true, \"shared\": false, \"provider:network_type\": \"vxlan\", \"id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"provider:segmentation_id\": 2550}}";
+ String content_n = "{\"network\": {\"name\": \"test\", \"provider:physical_network\": \"\", "
+ + "\"router:external\": false, \"tenant_id\": \"04684ce029a6415ca8a9293a24f884b9\", "
+ + "\"admin_state_up\": true, \"shared\": false, \"provider:network_type\": \"vxlan\", "
+ + "\"id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"provider:segmentation_id\": 2550}}";
ITNeutronE2E.test_create(url_n, content_n, "Bug 3812 Network Post Failed");
// create first subnet
String url_s = base + "/subnets";
- String content_s1 = "{\"subnet\": {\"name\": \"s1\", \"enable_dhcp\": true, \"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"tenant_id\": \"04684ce029a6415ca8a9293a24f884b9\", \"dns_nameservers\": [], \"gateway_ip\": \"10.0.0.1\", \"ipv6_ra_mode\": \"\", \"allocation_pools\": [{\"start\": \"10.0.0.2\", \"end\": \"10.0.3.254\"}], \"host_routes\": [], \"shared\": false, \"ip_version\": 4, \"ipv6_address_mode\": \"\", \"cidr\": \"10.0.0.0/22\", \"id\": \"64605c41-688d-4548-97da-0f895943f840\", \"subnetpool_id\": \"\"}}";
+ String content_s1 = "{\"subnet\": {\"name\": \"s1\", \"enable_dhcp\": true, "
+ + "\"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\","
+ + " \"tenant_id\": \"04684ce029a6415ca8a9293a24f884b9\", \"dns_nameservers\": [], "
+ + "\"gateway_ip\": \"10.0.0.1\", \"ipv6_ra_mode\": \"\", \"allocation_pools\": "
+ + "[{\"start\": \"10.0.0.2\", \"end\": \"10.0.3.254\"}], \"host_routes\": [], \"shared\": false,"
+ + " \"ip_version\": 4, \"ipv6_address_mode\": \"\", \"cidr\": \"10.0.0.0/22\", "
+ + "\"id\": \"64605c41-688d-4548-97da-0f895943f840\", \"subnetpool_id\": \"\"}}";
ITNeutronE2E.test_create(url_s, content_s1, "Bug 3812 Subnet 1 Post Failed");
String url_p = base + "/ports";
- String content_p1 = "{\"port\": {\"binding:host_id\": \"00000000-1111-2222-3333-444444444444\", \"allowed_address_pairs\": [], \"device_owner\": \"network:dhcp\", \"binding:profile\": {}, \"fixed_ips\": [{\"subnet_id\": \"64605c41-688d-4548-97da-0f895943f840\", \"ip_address\": \"10.0.0.2\"}], \"id\": \"fcd1d7ab-8486-42a0-8f60-9d1a682aa00e\", \"security_groups\": [], \"device_id\": \"dhcp1c8f692f-b8db-5449-80ea-c9243b652e59-ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"name\": \"\", \"admin_state_up\": true, \"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"tenant_id\": \"04684ce029a6415ca8a9293a24f884b9\", \"binding:vif_details\": {}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"unbound\", \"mac_address\": \"FA:16:3E:02:CB:DE\"}}";
+ String content_p1 = "{\"port\": {\"binding:host_id\": \"00000000-1111-2222-3333-444444444444\", "
+ + "\"allowed_address_pairs\": [], \"device_owner\": \"network:dhcp\", "
+ + "\"binding:profile\": {}, \"fixed_ips\": [{\"subnet_id\": \"64605c41-688d-4548-97da-0f895943f840\","
+ + " \"ip_address\": \"10.0.0.2\"}], \"id\": \"fcd1d7ab-8486-42a0-8f60-9d1a682aa00e\", "
+ + "\"security_groups\": [], "
+ + "\"device_id\": \"dhcp1c8f692f-b8db-5449-80ea-c9243b652e59-ec36ae5a-ff7f-4441-8229-179e5d5207a7\","
+ + " \"name\": \"\", \"admin_state_up\": true, "
+ + "\"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\","
+ + " \"tenant_id\": \"04684ce029a6415ca8a9293a24f884b9\", \"binding:vif_details\": {}, "
+ + "\"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"unbound\","
+ + " \"mac_address\": \"FA:16:3E:02:CB:DE\"}}";
ITNeutronE2E.test_create(url_p, content_p1, "Bug 3812 DHCP Port 1 Post Failed");
String url_p1 = url_p + "/fcd1d7ab-8486-42a0-8f60-9d1a682aa00e";
- String content_p1m1 = "{\"port\": {\"binding:host_id\": \"00000000-1111-2222-3333-444444444444\", \"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"network:dhcp\", \"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"binding:profile\": {}, \"security_groups\": [], \"device_id\": \"dhcp1c8f692f-b8db-5449-80ea-c9243b652e59-ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"name\": \"\", \"admin_state_up\": true, \"binding:vif_details\": {\"port_filter\": \"true\"}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\"}}";
+ String content_p1m1 = "{\"port\": {\"binding:host_id\": \"00000000-1111-2222-3333-444444444444\", "
+ + "\"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"network:dhcp\","
+ + " \"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"binding:profile\": {},"
+ + " \"security_groups\": [], "
+ + "\"device_id\": \"dhcp1c8f692f-b8db-5449-80ea-c9243b652e59-ec36ae5a-ff7f-4441-8229-179e5d5207a7\","
+ + " \"name\": \"\", \"admin_state_up\": true, \"binding:vif_details\": "
+ + "{\"port_filter\": \"true\"}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\"}}";
ITNeutronE2E.test_modify(url_p1, content_p1m1, "Bug 3812 DHCP Port 1 Put 1 Failed");
// subnet 2 create
- String content_s2 = "{\"subnet\": {\"name\": \"s2\", \"enable_dhcp\": true, \"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"tenant_id\": \"04684ce029a6415ca8a9293a24f884b9\", \"dns_nameservers\": [], \"gateway_ip\": \"20.0.0.1\", \"ipv6_ra_mode\": \"\", \"allocation_pools\": [{\"start\": \"20.0.0.2\", \"end\": \"20.0.3.254\"}], \"host_routes\": [], \"shared\": false, \"ip_version\": 4, \"ipv6_address_mode\": \"\", \"cidr\": \"20.0.0.0/22\", \"id\": \"dd9b62eb-d9a3-42b5-b2f1-bffa43475614\", \"subnetpool_id\": \"\"}}";
+ String content_s2 = "{\"subnet\": {\"name\": \"s2\", \"enable_dhcp\": true, "
+ + "\"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", "
+ + "\"tenant_id\": \"04684ce029a6415ca8a9293a24f884b9\", "
+ + "\"dns_nameservers\": [], \"gateway_ip\": \"20.0.0.1\", "
+ + "\"ipv6_ra_mode\": \"\", \"allocation_pools\": "
+ + "[{\"start\": \"20.0.0.2\", \"end\": \"20.0.3.254\"}], "
+ + "\"host_routes\": [], \"shared\": false, \"ip_version\": 4, "
+ + "\"ipv6_address_mode\": \"\", \"cidr\": \"20.0.0.0/22\", "
+ + "\"id\": \"dd9b62eb-d9a3-42b5-b2f1-bffa43475614\", \"subnetpool_id\": \"\"}}";
ITNeutronE2E.test_create(url_s, content_s2, "Bug 3812 Subnet 2 Post Failed");
- String content_p1m2 = "{\"port\": {\"binding:host_id\": \"00000000-1111-2222-3333-444444444444\", \"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"network:dhcp\", \"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"binding:profile\": {}, \"security_groups\": [], \"device_id\": \"dhcp1c8f692f-b8db-5449-80ea-c9243b652e59-ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"name\": \"\", \"admin_state_up\": true, \"binding:vif_details\": {\"port_filter\": \"true\"}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\"}}";
+ String content_p1m2 = "{\"port\": {\"binding:host_id\": \"00000000-1111-2222-3333-444444444444\", "
+ + "\"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"network:dhcp\", "
+ + "\"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"binding:profile\": {}, "
+ + "\"security_groups\": [], "
+ + "\"device_id\": \"dhcp1c8f692f-b8db-5449-80ea-c9243b652e59-ec36ae5a-ff7f-4441-8229-179e5d5207a7\","
+ + " \"name\": \"\", \"admin_state_up\": true, \"binding:vif_details\": "
+ + "{\"port_filter\": \"true\"}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\"}}";
ITNeutronE2E.test_modify(url_p1, content_p1m2, "Bug 3812 DHCP Port Put 2 Failed");
// delete first subnet
- String content_p1m3 = "{\"port\": {\"binding:host_id\": \"00000000-1111-2222-3333-444444444444\", \"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"network:dhcp\", \"binding:profile\": {}, \"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"security_groups\": [], \"device_id\": \"dhcp1c8f692f-b8db-5449-80ea-c9243b652e59-ec36ae5a-ff7f-4441-8229-179e5d5207a7\", \"name\": \"\", \"admin_state_up\": true, \"binding:vif_details\": {\"port_filter\": \"true\"}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\"}}";
+ String content_p1m3 = "{\"port\": {\"binding:host_id\": \"00000000-1111-2222-3333-444444444444\","
+ + " \"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"network:dhcp\", "
+ + "\"binding:profile\": {}, \"network_id\": \"ec36ae5a-ff7f-4441-8229-179e5d5207a7\", "
+ + "\"security_groups\": [], "
+ + "\"device_id\": \"dhcp1c8f692f-b8db-5449-80ea-c9243b652e59-ec36ae5a-ff7f-4441-8229-179e5d5207a7\", "
+ + "\"name\": \"\", \"admin_state_up\": true, \"binding:vif_details\": "
+ + "{\"port_filter\": \"true\"}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\"}}";
ITNeutronE2E.test_modify(url_p1, content_p1m3, "Bug 3812 DHCP Port Put 3 Failed");
String url_s1 = url_s + "/64605c41-688d-4548-97da-0f895943f840";
}
public static void runTests(String base) {
- Neutron_Bug3812_Tests bugTest = new Neutron_Bug3812_Tests(base);
- bugTest.check_bug3812();
+ Neutron_Bug3812_Tests bugTest = new Neutron_Bug3812_Tests(base);
+ bugTest.check_bug3812();
}
}
public void check_bug4027() {
// create network
String url_n = base + "/ports";
- String content_n = "{ \"port\" : {" +
- "\"id\" : \"ea2ac142-8454-4990-8bfb-7a218479864b\"," +
- "\"network_id\" : \"e44cdc39-2d43-4775-82e8-b18da318da61\"," +
- "\"name\" : \"\"," +
- "\"admin_state_up\" : true," +
- "\"mac_address\" : \"FA:16:3E:A2:44:3F\"," +
- "\"fixed_ips\" : [ {" +
- "\"ip_address\" : \"10.1.0.2\"," +
- "\"subnet_id\" : \"6aba69a3-a541-4b93-b724-7bf822e4986b\" } ]," +
- "\"device_id\" : \"dhcp58155ae3-f2e7-51ca-9978-71c513ab02ee-e44cdc39-2d43-4775-82e8-b18da318da61\"," +
- "\"device_owner\" : \"network:dhcp\"," +
- "\"tenant_id\" : \"52e413cd075d47e4808f1845c7d8a2c8\"," +
- "\"security_groups\" : [ ]," +
- "\"allowed_address_pairs\" : [ ]," +
- "\"binding:host_id\" : \"devstack-control\"," +
- "\"binding:vnic_type\" : \"normal\"," +
- "\"binding:vif_type\" : \"unbound\"," +
- "\"binding:vif_details\" : { } } }";
+ String content_n = "{ \"port\" : {" + "\"id\" : \"ea2ac142-8454-4990-8bfb-7a218479864b\","
+ + "\"network_id\" : \"e44cdc39-2d43-4775-82e8-b18da318da61\"," + "\"name\" : \"\","
+ + "\"admin_state_up\" : true," + "\"mac_address\" : \"FA:16:3E:A2:44:3F\"," + "\"fixed_ips\" : [ {"
+ + "\"ip_address\" : \"10.1.0.2\"," + "\"subnet_id\" : \"6aba69a3-a541-4b93-b724-7bf822e4986b\" } ],"
+ + "\"device_id\" : \"dhcp58155ae3-f2e7-51ca-9978-71c513ab02ee-e44cdc39-2d43-4775-82e8-b18da318da61\","
+ + "\"device_owner\" : \"network:dhcp\"," + "\"tenant_id\" : \"52e413cd075d47e4808f1845c7d8a2c8\","
+ + "\"security_groups\" : [ ]," + "\"allowed_address_pairs\" : [ ],"
+ + "\"binding:host_id\" : \"devstack-control\"," + "\"binding:vnic_type\" : \"normal\","
+ + "\"binding:vif_type\" : \"unbound\"," + "\"binding:vif_details\" : { } } }";
ITNeutronE2E.test_create(url_n, content_n, "Bug 4027 Port Post Failed");
String url_2 = base + "/ports/ea2ac142-8454-4990-8bfb-7a218479864b";
- String content_2 = " { \"port\" : {" +
- "\"id\" : \"ea2ac142-8454-4990-8bfb-7a218479864b\"," +
- "\"name\" : \"\"," +
- "\"admin_state_up\" : true," +
- "\"device_id\" : \"dhcp58155ae3-f2e7-51ca-9978-71c513ab02ee-e44cdc39-2d43-4775-82e8-b18da318da61\"," +
- "\"device_owner\" : \"network:dhcp\"," +
- "\"security_groups\" : [ ]," +
- "\"allowed_address_pairs\" : [ ]," +
- "\"binding:host_id\" : \"devstack-control\"," +
- "\"binding:vnic_type\" : \"normal\"," +
- "\"binding:vif_type\" : \"ovs\"," +
- "\"binding:vif_details\" : { \"port_filter\" : \"true\" }," +
- "\"extra_dhcp_opts\" : [ ] } } }";
+ String content_2 = " { \"port\" : {" + "\"id\" : \"ea2ac142-8454-4990-8bfb-7a218479864b\"," + "\"name\" : \"\","
+ + "\"admin_state_up\" : true,"
+ + "\"device_id\" : \"dhcp58155ae3-f2e7-51ca-9978-71c513ab02ee-e44cdc39-2d43-4775-82e8-b18da318da61\","
+ + "\"device_owner\" : \"network:dhcp\"," + "\"security_groups\" : [ ],"
+ + "\"allowed_address_pairs\" : [ ]," + "\"binding:host_id\" : \"devstack-control\","
+ + "\"binding:vnic_type\" : \"normal\"," + "\"binding:vif_type\" : \"ovs\","
+ + "\"binding:vif_details\" : { \"port_filter\" : \"true\" }," + "\"extra_dhcp_opts\" : [ ] } } }";
ITNeutronE2E.test_modify(url_2, content_2, "Bug 4027 Port Modify Failed");
}
public static void runTests(String base) {
- Neutron_Bug4027_Tests bugTest = new Neutron_Bug4027_Tests(base);
- bugTest.check_bug4027();
+ Neutron_Bug4027_Tests bugTest = new Neutron_Bug4027_Tests(base);
+ bugTest.check_bug4027();
}
}
public void test_create_port_in_allowed_allocation_pools() {
// create network
String url_n = base + "/networks";
- String content_n = " {\"network\": {\"status\": \"ACTIVE\", \"subnets\": [], \"name\": \"test-network--1850822235\", \"router:external\": false, \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"admin_state_up\": true, \"mtu\": 0, \"shared\": false, \"port_security_enabled\": true, \"id\": \"114ddf69-8ccd-46bb-92fb-bc3e921318d4\"}}";
+ String content_n = " {\"network\": {\"status\": \"ACTIVE\", \"subnets\": [], \"name\":"
+ + " \"test-network--1850822235\", \"router:external\": false, "
+ + "\"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"admin_state_up\": true,"
+ + " \"mtu\": 0, \"shared\": false, \"port_security_enabled\": true, "
+ + "\"id\": \"114ddf69-8ccd-46bb-92fb-bc3e921318d4\"}}";
ITNeutronE2E.test_create(url_n, content_n, "test_create_port_in_allowed_allocation_pools Network Post Failed");
// create subnet
String url_s = base + "/subnets";
- String content_s1 = "{\"subnet\": {\"name\": \"\", \"enable_dhcp\": true, \"network_id\": \"114ddf69-8ccd-46bb-92fb-bc3e921318d4\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"dns_nameservers\": [], \"gateway_ip\": \"2003::1\", \"ipv6_ra_mode\": null, \"allocation_pools\": [{\"start\": \"2003::4\", \"end\": \"2003::6\"}], \"host_routes\": [], \"ip_version\": 6, \"ipv6_address_mode\": null, \"cidr\": \"2003::/64\", \"id\": \"77c68c25-72a6-415b-a6f0-886fe26f1b02\", \"subnetpool_id\": null}}";
+ String content_s1 = "{\"subnet\": {\"name\": \"\", \"enable_dhcp\": true, "
+ + "\"network_id\": \"114ddf69-8ccd-46bb-92fb-bc3e921318d4\", "
+ + "\"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"dns_nameservers\": [], "
+ + "\"gateway_ip\": \"2003::1\", \"ipv6_ra_mode\": null, "
+ + "\"allocation_pools\": [{\"start\": \"2003::4\", \"end\": \"2003::6\"}], \"host_routes\": [], "
+ + "\"ip_version\": 6, \"ipv6_address_mode\": null, \"cidr\": \"2003::/64\", "
+ + "\"id\": \"77c68c25-72a6-415b-a6f0-886fe26f1b02\", \"subnetpool_id\": null}}";
ITNeutronE2E.test_create(url_s, content_s1, "test_create_port_in_allowed_allocation_pools Subnet Post Failed");
String url_p = base + "/ports";
- String content_p1 = "{ \"port\": {\"status\": \"ACTIVE\", \"binding:host_id\": \"odl-devstack\", \"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"network:dhcp\", \"port_security_enabled\": false, \"binding:profile\": {}, \"fixed_ips\": [{\"subnet_id\": \"77c68c25-72a6-415b-a6f0-886fe26f1b02\", \"ip_address\": \"2003::5\"}], \"id\": \"7d8f5c18-fcde-471e-8a64-3dfd249cae92\", \"security_groups\": [], \"device_id\": \"dhcpff2867ff-b137-5086-a214-70bb12c3ea19-114ddf69-8ccd-46bb-92fb-bc3e921318d4\", \"name\": \"\", \"admin_state_up\": true, \"network_id\": \"114ddf69-8ccd-46bb-92fb-bc3e921318d4\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"binding:vif_details\": {\"port_filter\": \"true\"}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\", \"mac_address\": \"fa:16:3e:09:db:75\"}}";
+ String content_p1 = "{ \"port\": {\"status\": \"ACTIVE\", \"binding:host_id\": \"odl-devstack\","
+ + " \"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"network:dhcp\","
+ + " \"port_security_enabled\": false, \"binding:profile\": {}, \"fixed_ips\": "
+ + "[{\"subnet_id\": \"77c68c25-72a6-415b-a6f0-886fe26f1b02\", \"ip_address\": \"2003::5\"}], "
+ + "\"id\": \"7d8f5c18-fcde-471e-8a64-3dfd249cae92\", \"security_groups\": [], "
+ + "\"device_id\": \"dhcpff2867ff-b137-5086-a214-70bb12c3ea19-114ddf69-8ccd-46bb-92fb-bc3e921318d4\", "
+ + "\"name\": \"\", \"admin_state_up\": true, \"network_id\": \"114ddf69-8ccd-46bb-92fb-bc3e921318d4\", "
+ + "\"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"binding:vif_details\": "
+ + "{\"port_filter\": \"true\"}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\", "
+ + "\"mac_address\": \"fa:16:3e:09:db:75\"}}";
ITNeutronE2E.test_create(url_p, content_p1, "test_create_port_in_allowed_allocation_pools Port Post Failed");
- String content_p2 = "{\"port\": {\"binding:host_id\": \"\", \"allowed_address_pairs\": [], \"device_owner\": \"\", \"port_security_enabled\": true, \"binding:profile\": {}, \"fixed_ips\": [{\"subnet_id\": \"77c68c25-72a6-415b-a6f0-886fe26f1b02\", \"ip_address\": \"2003::4\"}], \"id\": \"856c48ea-fd3a-4ee2-b0c6-bf86f8813888\", \"security_groups\": [{\"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"description\": \"Default security group\", \"id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\", \"security_group_rules\": [{\"remote_group_id\": \"\", \"direction\": \"egress\", \"remote_ip_prefix\": \"\", \"protocol\": \"\", \"ethertype\": \"IPv6\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"port_range_max\": \"\", \"port_range_min\": \"\", \"id\": \"7b506947-9f16-444e-b027-33a11aaed6bb\", \"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}, {\"remote_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\", \"direction\": \"ingress\", \"remote_ip_prefix\": \"\", \"protocol\": \"\", \"ethertype\": \"IPv6\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"port_range_max\": \"\", \"port_range_min\": \"\", \"id\": \"7ba1a85b-3e05-44b5-90dd-0c50fe01ac46\", \"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}, {\"remote_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\", \"direction\": \"ingress\", \"remote_ip_prefix\": \"\", \"protocol\": \"\", \"ethertype\": \"IPv4\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"port_range_max\": \"\", \"port_range_min\": \"\", \"id\": \"7f1ad334-7588-4ab5-ab02-d1080d401f66\", \"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}, {\"remote_group_id\": \"\", \"direction\": \"egress\", \"remote_ip_prefix\": \"\", \"protocol\": \"\", \"ethertype\": \"IPv4\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"port_range_max\": \"\", \"port_range_min\": \"\", \"id\": \"862f79a2-f96c-4b64-8fbe-50a77b38bd77\", \"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}], \"name\": \"default\"}], \"device_id\": \"\", \"name\": \"\", \"admin_state_up\": true, \"network_id\": \"114ddf69-8ccd-46bb-92fb-bc3e921318d4\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"binding:vif_details\": {}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"unbound\", \"mac_address\": \"FA:16:3E:66:B1:38\"}}";
+ String content_p2 = "{\"port\": {\"binding:host_id\": \"\", \"allowed_address_pairs\": [], "
+ + "\"device_owner\": \"\", \"port_security_enabled\": true, \"binding:profile\": {}, "
+ + "\"fixed_ips\": [{\"subnet_id\": \"77c68c25-72a6-415b-a6f0-886fe26f1b02\", "
+ + "\"ip_address\": \"2003::4\"}], \"id\": \"856c48ea-fd3a-4ee2-b0c6-bf86f8813888\", "
+ + "\"security_groups\": [{\"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", "
+ + "\"description\": \"Default security group\", \"id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\","
+ + " \"security_group_rules\": [{\"remote_group_id\": \"\", \"direction\": \"egress\", "
+ + "\"remote_ip_prefix\": \"\", \"protocol\": \"\", \"ethertype\": \"IPv6\", "
+ + "\"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"port_range_max\": \"\", "
+ + "\"port_range_min\": \"\", \"id\": \"7b506947-9f16-444e-b027-33a11aaed6bb\", "
+ + "\"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}, "
+ + "{\"remote_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\", "
+ + "\"direction\": \"ingress\", \"remote_ip_prefix\": \"\", \"protocol\": \"\", "
+ + "\"ethertype\": \"IPv6\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", "
+ + "\"port_range_max\": \"\", \"port_range_min\": \"\", \"id\": \"7ba1a85b-3e05-44b5-90dd-0c50fe01ac46\", "
+ + "\"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}, {\"remote_group_id\": "
+ + "\"111f2d2d-4fe3-4679-b43a-17857ce91cab\", \"direction\": \"ingress\", "
+ + "\"remote_ip_prefix\": \"\", \"protocol\": \"\", \"ethertype\": \"IPv4\", "
+ + "\"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"port_range_max\": \"\", "
+ + "\"port_range_min\": \"\", \"id\": \"7f1ad334-7588-4ab5-ab02-d1080d401f66\", "
+ + "\"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}, {\"remote_group_id\": \"\", "
+ + "\"direction\": \"egress\", \"remote_ip_prefix\": \"\", \"protocol\": \"\", \"ethertype\": \"IPv4\", "
+ + "\"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"port_range_max\": \"\", "
+ + "\"port_range_min\": \"\", \"id\": \"862f79a2-f96c-4b64-8fbe-50a77b38bd77\", "
+ + "\"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}], \"name\": \"default\"}], "
+ + "\"device_id\": \"\", \"name\": \"\", \"admin_state_up\": true, "
+ + "\"network_id\": \"114ddf69-8ccd-46bb-92fb-bc3e921318d4\", "
+ + "\"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", \"binding:vif_details\": {}, "
+ + "\"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"unbound\","
+ + " \"mac_address\": \"FA:16:3E:66:B1:38\"}}";
ITNeutronE2E.test_create(url_p, content_p2, "test_create_port_in_allowed_allocation_pools Port Post 2 Failed");
}
public static void runTests(String base) {
- Tempest_PortsIpV6TestJSON tpv6runner = new Tempest_PortsIpV6TestJSON(base);
- tpv6runner.test_create_port_in_allowed_allocation_pools();
+ Tempest_PortsIpV6TestJSON tpv6runner = new Tempest_PortsIpV6TestJSON(base);
+ tpv6runner.test_create_port_in_allowed_allocation_pools();
}
}