diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/change_nic_networkadapter_response.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/change_nic_networkadapter_response.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/change_nic_networkadapter_response.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/change_nic_networkadapter_response.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/deploy_customised_server.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/deploy_customised_server.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/deploy_customised_server.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/deploy_customised_server.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/exchange_nic_vlans_response.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/exchange_nic_vlans_response.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/exchange_nic_vlans_response.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/exchange_nic_vlans_response.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/image_customerImage.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/image_customerImage.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/image_customerImage.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/image_customerImage.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/image_customerImage_2ffa36c8_1848_49eb_b4fa_9d908775f68c.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/image_customerImage_2ffa36c8_1848_49eb_b4fa_9d908775f68c.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/image_customerImage_2ffa36c8_1848_49eb_b4fa_9d908775f68c.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/image_customerImage_2ffa36c8_1848_49eb_b4fa_9d908775f68c.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/image_customerImage_5234e5c7_01de_4411_8b6e_baeb8d91cf5d.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/image_customerImage_5234e5c7_01de_4411_8b6e_baeb8d91cf5d.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/image_customerImage_5234e5c7_01de_4411_8b6e_baeb8d91cf5d.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/image_customerImage_5234e5c7_01de_4411_8b6e_baeb8d91cf5d.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/image_osImage.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/image_osImage.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/image_osImage.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/image_osImage.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/image_osImage_6b4fb0c7_a57b_4f58_b59c_9958f94f971a.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/image_osImage_6b4fb0c7_a57b_4f58_b59c_9958f94f971a.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/image_osImage_6b4fb0c7_a57b_4f58_b59c_9958f94f971a.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/image_osImage_6b4fb0c7_a57b_4f58_b59c_9958f94f971a.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/image_osImage_c14b1a46_2428_44c1_9c1a_b20e6418d08c.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/image_osImage_c14b1a46_2428_44c1_9c1a_b20e6418d08c.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/image_osImage_c14b1a46_2428_44c1_9c1a_b20e6418d08c.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/image_osImage_c14b1a46_2428_44c1_9c1a_b20e6418d08c.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/import_image_response.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/import_image_response.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/import_image_response.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/import_image_response.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/server_GetServer.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/server_GetServer.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/server_GetServer.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/server_GetServer.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/server_cleanServer.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/server_cleanServer.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/server_cleanServer.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/server_cleanServer.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/server_clone_response.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/server_clone_response.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/server_clone_response.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/server_clone_response.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/server_server.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/server_server.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/server_server.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/server_server.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/server_server_NA3.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/server_server_NA3.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/server_server_NA3.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/server_server_NA3.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/server_server_e75ead52_692f_4314_8725_c8a4f4d13a87.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/server_server_e75ead52_692f_4314_8725_c8a4f4d13a87.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/server_server_e75ead52_692f_4314_8725_c8a4f4d13a87.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/server_server_e75ead52_692f_4314_8725_c8a4f4d13a87.xml diff --git a/libcloud/test/compute/fixtures/dimensiondata/2.4/server_server_paginated.xml b/libcloud/test/compute/fixtures/dimensiondata/2_4/server_server_paginated.xml similarity index 100% rename from libcloud/test/compute/fixtures/dimensiondata/2.4/server_server_paginated.xml rename to libcloud/test/compute/fixtures/dimensiondata/2_4/server_server_paginated.xml diff --git a/libcloud/test/compute/test_dimensiondata_v2_4.py b/libcloud/test/compute/test_dimensiondata_v2_4.py index ec4c2b3f81..031d0805f1 100644 --- a/libcloud/test/compute/test_dimensiondata_v2_4.py +++ b/libcloud/test/compute/test_dimensiondata_v2_4.py @@ -117,6 +117,7 @@ def test_paginated_mcp2_call_EMPTY(self): "server/server" ) empty_node_list = [] + for node_list in node_list_generator: empty_node_list.extend(node_list) self.assertTrue(len(empty_node_list) == 0) @@ -129,6 +130,7 @@ def test_paginated_mcp2_call_PAGED_THEN_EMPTY(self): "server/server" ) final_node_list = [] + for node_list in node_list_generator: final_node_list.extend(node_list) self.assertTrue(len(final_node_list) == 2) @@ -180,12 +182,14 @@ def test_list_nodes_response_LOCATION(self): ret = self.driver.list_locations() first_loc = ret[0] ret = self.driver.list_nodes(ex_location=first_loc) + for node in ret: self.assertEqual(node.extra["datacenterId"], "NA3") def test_list_nodes_response_LOCATION_STR(self): DimensionDataMockHttp.type = None ret = self.driver.list_nodes(ex_location="NA3") + for node in ret: self.assertEqual(node.extra["datacenterId"], "NA3") @@ -1271,6 +1275,7 @@ def test_ex_create_firewall_rule_port(self): def test_ex_create_firewall_rule_ALL_VALUES(self): net = self.driver.ex_get_network_domain("8cdfd607-f429-4df6-9352-162cfc0891be") rules = self.driver.ex_list_firewall_rules(net) + for rule in rules: self.driver.ex_create_firewall_rule(net, rule, "LAST") @@ -2300,16 +2305,19 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_report_usage( self, method, url, body, headers ): body = self.fixtures.load("summary_usage_report.csv") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_report_usageDetailed( self, method, url, body, headers ): body = self.fixtures.load("detailed_usage_report.csv") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_auditlog(self, method, url, body, headers): body = self.fixtures.load("audit_log.csv") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_myaccount_UNAUTHORIZED(self, method, url, body, headers): @@ -2317,26 +2325,32 @@ def _oec_0_9_myaccount_UNAUTHORIZED(self, method, url, body, headers): def _oec_0_9_myaccount(self, method, url, body, headers): body = self.fixtures.load("oec_0_9_myaccount.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_myaccount_INPROGRESS(self, method, url, body, headers): body = self.fixtures.load("oec_0_9_myaccount.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_myaccount_PAGINATED(self, method, url, body, headers): body = self.fixtures.load("oec_0_9_myaccount.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_myaccount_ALLFILTERS(self, method, url, body, headers): body = self.fixtures.load("oec_0_9_myaccount.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_base_image(self, method, url, body, headers): body = self.fixtures.load("oec_0_9_base_image.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_base_imageWithDiskSpeed(self, method, url, body, headers): body = self.fixtures.load("oec_0_9_base_imageWithDiskSpeed.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployed( @@ -2345,6 +2359,7 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployed( body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployed.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_pendingDeploy( @@ -2353,10 +2368,12 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_pendingDeploy( body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_pendingDeploy.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_datacenter(self, method, url, body, headers): body = self.fixtures.load("oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_datacenter.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_11(self, method, url, body, headers): @@ -2417,6 +2434,7 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_11_INPROGRESS( def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server(self, method, url, body, headers): body = self.fixtures.load("_oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation( @@ -2424,11 +2442,13 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation( ): if method == "POST": request = ET.fromstring(body) + if request.tag != "{http://oec.api.opsource.net/schemas/network}NewNetworkWithLocation": raise InvalidRequestError(request.tag) body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation_NA9( @@ -2437,6 +2457,7 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation_NA9( body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_4bba37be_506f_11e3_b29c_001517c4643e( @@ -2445,6 +2466,7 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_4bba37be_506f_11e3_b29 body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_4bba37be_506f_11e3_b29c_001517c4643e.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725_c8a4f4d13a87_disk_1_changeSize( @@ -2453,6 +2475,7 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725 body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725_c8a4f4d13a87_disk_1_changeSize.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725_c8a4f4d13a87_disk_1_changeSpeed( @@ -2461,16 +2484,19 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725 body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725_c8a4f4d13a87_disk_1_changeSpeed.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725_c8a4f4d13a87_disk_1( self, method, url, body, headers ): action = url.split("?")[-1] + if action == "delete": body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725_c8a4f4d13a87_disk_1.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725_c8a4f4d13a87( @@ -2480,11 +2506,14 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725 body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725_c8a4f4d13a87.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) + if method == "POST": body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_e75ead52_692f_4314_8725_c8a4f4d13a87_POST.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule( @@ -2493,6 +2522,7 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule( body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_create.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_FAIL_EXISTING( @@ -2501,6 +2531,7 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_FAIL_EXISTING body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_create_FAIL.xml" ) + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_07e3621a_a920_4a9a_943c_d8021f27f418( @@ -2509,6 +2540,7 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_07e3621a_a920 body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_delete.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_07e3621a_a920_4a9a_943c_d8021f27f418_FAIL( @@ -2517,56 +2549,68 @@ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_07e3621a_a920 body = self.fixtures.load( "oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_antiAffinityRule_delete_FAIL.xml" ) + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server(self, method, url, body, headers): body = self.fixtures.load("server.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deleteServer( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deleteServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_deleteServer.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deleteServer_INPROGRESS( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deleteServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_deleteServer_RESOURCEBUSY.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_rebootServer( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}rebootServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_rebootServer.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_rebootServer_INPROGRESS( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}rebootServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_rebootServer_RESOURCEBUSY.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server( self, method, url, body, headers ): if url.endswith("datacenterId=NA3"): - body = self.fixtures.load("2.4/server_server_NA3.xml") + body = self.fixtures.load("2_4/server_server_NA3.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) - body = self.fixtures.load("2.4/server_server.xml") + body = self.fixtures.load("2_4/server_server.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_PAGESIZE50( @@ -2574,13 +2618,15 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_PAGESIZE50( ): if not url.endswith("pageSize=50"): raise ValueError("pageSize is not set as expected") - body = self.fixtures.load("2.4/server_server.xml") + body = self.fixtures.load("2_4/server_server.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_EMPTY( self, method, url, body, headers ): body = self.fixtures.load("server_server_paginated_empty.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_PAGED_THEN_EMPTY( @@ -2588,25 +2634,30 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_PAGED_THEN_EMPT ): if "pageNumber=2" in url: body = self.fixtures.load("server_server_paginated_empty.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) else: - body = self.fixtures.load("2.4/server_server_paginated.xml") + body = self.fixtures.load("2_4/server_server_paginated.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_PAGINATED( self, method, url, body, headers ): if "pageNumber=2" in url: - body = self.fixtures.load("2.4/server_server.xml") + body = self.fixtures.load("2_4/server_server.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) else: - body = self.fixtures.load("2.4/server_server_paginated.xml") + body = self.fixtures.load("2_4/server_server_paginated.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_PAGINATEDEMPTY( self, method, url, body, headers ): body = self.fixtures.load("server_server_paginated_empty.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_ALLFILTERS( @@ -2614,8 +2665,10 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_ALLFILTERS( ): (_, params) = url.split("?") parameters = params.split("&") + for parameter in parameters: (key, value) = parameter.split("=") + if key == "datacenterId": assert value == "fake_loc" elif key == "networkId": @@ -2640,13 +2693,15 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_ALLFILTERS( assert value == "fake_image" else: raise ValueError("Could not find in url parameters {}:{}".format(key, value)) - body = self.fixtures.load("2.4/server_server.xml") + body = self.fixtures.load("2_4/server_server.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_antiAffinityRule( self, method, url, body, headers ): body = self.fixtures.load("server_antiAffinityRule_list.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_antiAffinityRule_ALLFILTERS( @@ -2654,8 +2709,10 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_antiAffinityRule_ALLFI ): (_, params) = url.split("?") parameters = params.split("&") + for parameter in parameters: (key, value) = parameter.split("=") + if key == "id": assert value == "FAKE_ID" elif key == "state": @@ -2667,6 +2724,7 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_antiAffinityRule_ALLFI else: raise ValueError("Could not find in url parameters {}:{}".format(key, value)) body = self.fixtures.load("server_antiAffinityRule_list.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_antiAffinityRule_PAGINATED( @@ -2674,9 +2732,11 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_antiAffinityRule_PAGIN ): if "pageNumber=2" in url: body = self.fixtures.load("server_antiAffinityRule_list.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) else: body = self.fixtures.load("server_antiAffinityRule_list_PAGINATED.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_infrastructure_datacenter( @@ -2684,9 +2744,11 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_infrastructure_datacenter( ): if url.endswith("id=NA9"): body = self.fixtures.load("infrastructure_datacenter_NA9.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) body = self.fixtures.load("infrastructure_datacenter.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_infrastructure_datacenter_ALLFILTERS( @@ -2694,93 +2756,113 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_infrastructure_datacenter_ALL ): if url.endswith("id=NA9"): body = self.fixtures.load("infrastructure_datacenter_NA9.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) body = self.fixtures.load("infrastructure_datacenter.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_updateVmwareTools( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}updateVmwareTools": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_updateVmwareTools.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_startServer( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}startServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_startServer.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_startServer_INPROGRESS( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}startServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_startServer_INPROGRESS.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_shutdownServer( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}shutdownServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_shutdownServer.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_shutdownServer_INPROGRESS( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}shutdownServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_shutdownServer_INPROGRESS.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_resetServer( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}resetServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_resetServer.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_powerOffServer( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}powerOffServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_powerOffServer.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_powerOffServer_INPROGRESS( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}powerOffServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_powerOffServer_INPROGRESS.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_11_INPROGRESS( self, method, url, body, headers ): - body = self.fixtures.load("2.4/server_GetServer.xml") + body = self.fixtures.load("2_4/server_GetServer.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_networkDomain( self, method, url, body, headers ): body = self.fixtures.load("network_networkDomain.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_networkDomain_ALLFILTERS( @@ -2788,8 +2870,10 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_networkDomain_ALLFILT ): (_, params) = url.split("?") parameters = params.split("&") + for parameter in parameters: (key, value) = parameter.split("=") + if key == "datacenterId": assert value == "fake_location" elif key == "type": @@ -2801,12 +2885,14 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_networkDomain_ALLFILT else: raise ValueError("Could not find in url parameters {}:{}".format(key, value)) body = self.fixtures.load("network_networkDomain.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_vlan( self, method, url, body, headers ): body = self.fixtures.load("network_vlan.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_vlan_ALLFILTERS( @@ -2814,8 +2900,10 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_vlan_ALLFILTERS( ): (_, params) = url.split("?") parameters = params.split("&") + for parameter in parameters: (key, value) = parameter.split("=") + if key == "datacenterId": assert value == "fake_location" elif key == "networkDomainId": @@ -2831,12 +2919,14 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_vlan_ALLFILTERS( else: raise ValueError("Could not find in url parameters {}:{}".format(key, value)) body = self.fixtures.load("network_vlan.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployServer( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deployServer": raise InvalidRequestError(request.tag) @@ -2844,11 +2934,13 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployServer( # Or Network info with a primary nic that has privateip or vlanid network = request.find(fixxpath("network", TYPES_URN)) network_info = request.find(fixxpath("networkInfo", TYPES_URN)) + if network is not None: if network_info is not None: raise InvalidRequestError("Request has both MCP1 and MCP2 values") ipv4 = findtext(network, "privateIpv4", TYPES_URN) networkId = findtext(network, "networkId", TYPES_URN) + if ipv4 is None and networkId is None: raise InvalidRequestError( "Invalid request MCP1 requests need privateIpv4 or networkId" @@ -2859,6 +2951,7 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployServer( primary_nic = network_info.find(fixxpath("primaryNic", TYPES_URN)) ipv4 = findtext(primary_nic, "privateIpv4", TYPES_URN) vlanId = findtext(primary_nic, "vlanId", TYPES_URN) + if ipv4 is None and vlanId is None: raise InvalidRequestError( "Invalid request MCP2 requests need privateIpv4 or vlanId" @@ -2869,394 +2962,474 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployServer( ) body = self.fixtures.load("server_deployServer.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_e75ead52_692f_4314_8725_c8a4f4d13a87( self, method, url, body, headers ): - body = self.fixtures.load("2.4/server_server_e75ead52_692f_4314_8725_c8a4f4d13a87.xml") + body = self.fixtures.load("2_4/server_server_e75ead52_692f_4314_8725_c8a4f4d13a87.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_deployNetworkDomain( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deployNetworkDomain": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_deployNetworkDomain.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_networkDomain_8cdfd607_f429_4df6_9352_162cfc0891be( self, method, url, body, headers ): body = self.fixtures.load("network_networkDomain_8cdfd607_f429_4df6_9352_162cfc0891be.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_networkDomain_8cdfd607_f429_4df6_9352_162cfc0891be_ALLFILTERS( self, method, url, body, headers ): body = self.fixtures.load("network_networkDomain_8cdfd607_f429_4df6_9352_162cfc0891be.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_editNetworkDomain( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}editNetworkDomain": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_editNetworkDomain.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_deleteNetworkDomain( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deleteNetworkDomain": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_deleteNetworkDomain.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_deployVlan( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deployVlan": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_deployVlan.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_vlan_0e56433f_d808_4669_821d_812769517ff8( self, method, url, body, headers ): body = self.fixtures.load("network_vlan_0e56433f_d808_4669_821d_812769517ff8.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_editVlan( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}editVlan": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_editVlan.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_deleteVlan( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deleteVlan": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_deleteVlan.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_expandVlan( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}expandVlan": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_expandVlan.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_addPublicIpBlock( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}addPublicIpBlock": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_addPublicIpBlock.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_publicIpBlock_4487241a_f0ca_11e3_9315_d4bed9b167ba( self, method, url, body, headers ): body = self.fixtures.load("network_publicIpBlock_4487241a_f0ca_11e3_9315_d4bed9b167ba.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_publicIpBlock( self, method, url, body, headers ): body = self.fixtures.load("network_publicIpBlock.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_publicIpBlock_9945dc4a_bdce_11e4_8c14_b8ca3a5d9ef8( self, method, url, body, headers ): body = self.fixtures.load("network_publicIpBlock_9945dc4a_bdce_11e4_8c14_b8ca3a5d9ef8.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_removePublicIpBlock( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}removePublicIpBlock": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_removePublicIpBlock.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_firewallRule( self, method, url, body, headers ): body = self.fixtures.load("network_firewallRule.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_createFirewallRule( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}createFirewallRule": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_createFirewallRule.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_firewallRule_d0a20f59_77b9_4f28_a63b_e58496b73a6c( self, method, url, body, headers ): body = self.fixtures.load("network_firewallRule_d0a20f59_77b9_4f28_a63b_e58496b73a6c.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_editFirewallRule( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}editFirewallRule": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_editFirewallRule.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_deleteFirewallRule( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deleteFirewallRule": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_deleteFirewallRule.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_createNatRule( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}createNatRule": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_createNatRule.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_natRule( self, method, url, body, headers ): body = self.fixtures.load("network_natRule.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_natRule_2187a636_7ebb_49a1_a2ff_5d617f496dce( self, method, url, body, headers ): body = self.fixtures.load("network_natRule_2187a636_7ebb_49a1_a2ff_5d617f496dce.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_deleteNatRule( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deleteNatRule": raise InvalidRequestError(request.tag) body = self.fixtures.load("network_deleteNatRule.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_addNic( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}addNic": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_addNic.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_removeNic( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}removeNic": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_removeNic.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_disableServerMonitoring( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}disableServerMonitoring": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_disableServerMonitoring.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_enableServerMonitoring( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}enableServerMonitoring": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_enableServerMonitoring.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeServerMonitoringPlan( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}changeServerMonitoringPlan": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_changeServerMonitoringPlan.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_osImage( self, method, url, body, headers ): - body = self.fixtures.load("2.4/image_osImage.xml") + body = self.fixtures.load("2_4/image_osImage.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_osImage_c14b1a46_2428_44c1_9c1a_b20e6418d08c( self, method, url, body, headers ): - body = self.fixtures.load("2.4/image_osImage_c14b1a46_2428_44c1_9c1a_b20e6418d08c.xml") + body = self.fixtures.load("2_4/image_osImage_c14b1a46_2428_44c1_9c1a_b20e6418d08c.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_osImage_6b4fb0c7_a57b_4f58_b59c_9958f94f971a( self, method, url, body, headers ): - body = self.fixtures.load("2.4/image_osImage_6b4fb0c7_a57b_4f58_b59c_9958f94f971a.xml") + body = self.fixtures.load("2_4/image_osImage_6b4fb0c7_a57b_4f58_b59c_9958f94f971a.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_osImage_5234e5c7_01de_4411_8b6e_baeb8d91cf5d( self, method, url, body, headers ): body = self.fixtures.load("image_osImage_BAD_REQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_osImage_2ffa36c8_1848_49eb_b4fa_9d908775f68c( self, method, url, body, headers ): body = self.fixtures.load("image_osImage_BAD_REQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_osImage_FAKE_IMAGE_ID( self, method, url, body, headers ): body = self.fixtures.load("image_osImage_BAD_REQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_customerImage( self, method, url, body, headers ): - body = self.fixtures.load("2.4/image_customerImage.xml") + body = self.fixtures.load("2_4/image_customerImage.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_customerImage_5234e5c7_01de_4411_8b6e_baeb8d91cf5d( self, method, url, body, headers ): body = self.fixtures.load( - "2.4/image_customerImage_5234e5c7_01de_4411_8b6e_baeb8d91cf5d.xml" + "2_4/image_customerImage_5234e5c7_01de_4411_8b6e_baeb8d91cf5d.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_customerImage_2ffa36c8_1848_49eb_b4fa_9d908775f68c( self, method, url, body, headers ): body = self.fixtures.load( - "2.4/image_customerImage_2ffa36c8_1848_49eb_b4fa_9d908775f68c.xml" + "2_4/image_customerImage_2ffa36c8_1848_49eb_b4fa_9d908775f68c.xml" ) + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_customerImage_FAKE_IMAGE_ID( self, method, url, body, headers ): body = self.fixtures.load("image_customerImage_BAD_REQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_reconfigureServer( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}reconfigureServer": raise InvalidRequestError(request.tag) body = self.fixtures.load("server_reconfigureServer.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_cleanServer( self, method, url, body, headers ): body = self.fixtures.load("server_cleanServer.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_addDisk( self, method, url, body, headers ): body = self.fixtures.load("server_addDisk.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_removeDisk( self, method, url, body, headers ): body = self.fixtures.load("server_removeDisk.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_createTagKey( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}createTagKey": raise InvalidRequestError(request.tag) name = findtext(request, "name", TYPES_URN) description = findtext(request, "description", TYPES_URN) value_required = findtext(request, "valueRequired", TYPES_URN) display_on_report = findtext(request, "displayOnReport", TYPES_URN) + if name is None: raise ValueError("Name must have a value in the request") + if description is not None: raise ValueError("Default description for a tag should be blank") + if value_required is None or value_required != "true": raise ValueError("Default valueRequired should be true") + if display_on_report is None or display_on_report != "true": raise ValueError("Default displayOnReport should be true") body = self.fixtures.load("tag_createTagKey.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_createTagKey_ALLPARAMS( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}createTagKey": raise InvalidRequestError(request.tag) name = findtext(request, "name", TYPES_URN) description = findtext(request, "description", TYPES_URN) value_required = findtext(request, "valueRequired", TYPES_URN) display_on_report = findtext(request, "displayOnReport", TYPES_URN) + if name is None: raise ValueError("Name must have a value in the request") + if description is None: raise ValueError("Description should have a value") + if value_required is None or value_required != "false": raise ValueError("valueRequired should be false") + if display_on_report is None or display_on_report != "false": raise ValueError("displayOnReport should be false") body = self.fixtures.load("tag_createTagKey.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_createTagKey_BADREQUEST( self, method, url, body, headers ): body = self.fixtures.load("tag_createTagKey_BADREQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tagKey(self, method, url, body, headers): body = self.fixtures.load("tag_tagKey_list.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tagKey_SINGLE( self, method, url, body, headers ): body = self.fixtures.load("tag_tagKey_list_SINGLE.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tagKey_ALLFILTERS( @@ -3264,8 +3437,10 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tagKey_ALLFILTERS( ): (_, params) = url.split("?") parameters = params.split("&") + for parameter in parameters: (key, value) = parameter.split("=") + if key == "id": assert value == "fake_id" elif key == "name": @@ -3279,87 +3454,107 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tagKey_ALLFILTERS( else: raise ValueError("Could not find in url parameters {}:{}".format(key, value)) body = self.fixtures.load("tag_tagKey_list.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tagKey_d047c609_93d7_4bc5_8fc9_732c85840075( self, method, url, body, headers ): body = self.fixtures.load("tag_tagKey_5ab77f5f_5aa9_426f_8459_4eab34e03d54.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tagKey_d047c609_93d7_4bc5_8fc9_732c85840075_NOEXIST( self, method, url, body, headers ): body = self.fixtures.load("tag_tagKey_5ab77f5f_5aa9_426f_8459_4eab34e03d54_BADREQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_editTagKey_NAME( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}editTagKey": raise InvalidRequestError(request.tag) name = findtext(request, "name", TYPES_URN) description = findtext(request, "description", TYPES_URN) value_required = findtext(request, "valueRequired", TYPES_URN) display_on_report = findtext(request, "displayOnReport", TYPES_URN) + if name is None: raise ValueError("Name must have a value in the request") + if description is not None: raise ValueError("Description should be empty") + if value_required is not None: raise ValueError("valueRequired should be empty") + if display_on_report is not None: raise ValueError("displayOnReport should be empty") body = self.fixtures.load("tag_editTagKey.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_editTagKey_NOTNAME( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}editTagKey": raise InvalidRequestError(request.tag) name = findtext(request, "name", TYPES_URN) description = findtext(request, "description", TYPES_URN) value_required = findtext(request, "valueRequired", TYPES_URN) display_on_report = findtext(request, "displayOnReport", TYPES_URN) + if name is not None: raise ValueError("Name should be empty") + if description is None: raise ValueError("Description should not be empty") + if value_required is None: raise ValueError("valueRequired should not be empty") + if display_on_report is None: raise ValueError("displayOnReport should not be empty") body = self.fixtures.load("tag_editTagKey.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_editTagKey_NOCHANGE( self, method, url, body, headers ): body = self.fixtures.load("tag_editTagKey_BADREQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_deleteTagKey( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}deleteTagKey": raise InvalidRequestError(request.tag) body = self.fixtures.load("tag_deleteTagKey.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_deleteTagKey_NOEXIST( self, method, url, body, headers ): body = self.fixtures.load("tag_deleteTagKey_BADREQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_applyTags( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}applyTags": raise InvalidRequestError(request.tag) asset_type = findtext(request, "assetType", TYPES_URN) @@ -3367,22 +3562,28 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_applyTags( tag = request.find(fixxpath("tag", TYPES_URN)) tag_key_name = findtext(tag, "tagKeyName", TYPES_URN) value = findtext(tag, "value", TYPES_URN) + if asset_type is None: raise ValueError("assetType should not be empty") + if asset_id is None: raise ValueError("assetId should not be empty") + if tag_key_name is None: raise ValueError("tagKeyName should not be empty") + if value is None: raise ValueError("value should not be empty") body = self.fixtures.load("tag_applyTags.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_applyTags_NOVALUE( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}applyTags": raise InvalidRequestError(request.tag) asset_type = findtext(request, "assetType", TYPES_URN) @@ -3390,41 +3591,51 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_applyTags_NOVALUE( tag = request.find(fixxpath("tag", TYPES_URN)) tag_key_name = findtext(tag, "tagKeyName", TYPES_URN) value = findtext(tag, "value", TYPES_URN) + if asset_type is None: raise ValueError("assetType should not be empty") + if asset_id is None: raise ValueError("assetId should not be empty") + if tag_key_name is None: raise ValueError("tagKeyName should not be empty") + if value is not None: raise ValueError("value should be empty") body = self.fixtures.load("tag_applyTags.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_applyTags_NOTAGKEY( self, method, url, body, headers ): body = self.fixtures.load("tag_applyTags_BADREQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_removeTags( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}removeTags": raise InvalidRequestError(request.tag) body = self.fixtures.load("tag_removeTag.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_removeTags_NOTAG( self, method, url, body, headers ): body = self.fixtures.load("tag_removeTag_BADREQUEST.xml") + return (httplib.BAD_REQUEST, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tag(self, method, url, body, headers): body = self.fixtures.load("tag_tag_list.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tag_ALLPARAMS( @@ -3432,8 +3643,10 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tag_ALLPARAMS( ): (_, params) = url.split("?") parameters = params.split("&") + for parameter in parameters: (key, value) = parameter.split("=") + if key == "assetId": assert value == "fake_asset_id" elif key == "assetType": @@ -3455,36 +3668,43 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_tag_tag_ALLPARAMS( else: raise ValueError("Could not find in url parameters {}:{}".format(key, value)) body = self.fixtures.load("tag_tag_list.xml") + return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_ipAddressList( self, method, url, body, headers ): body = self.fixtures.load("ip_address_lists.xml") + return httplib.OK, body, {}, httplib.responses[httplib.OK] def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_ipAddressList_FILTERBYNAME( self, method, url, body, headers ): body = self.fixtures.load("ip_address_lists_FILTERBYNAME.xml") + return httplib.OK, body, {}, httplib.responses[httplib.OK] def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_createIpAddressList( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}" "createIpAddressList": raise InvalidRequestError(request.tag) net_domain = findtext(request, "networkDomainId", TYPES_URN) + if net_domain is None: raise ValueError("Network Domain should not be empty") name = findtext(request, "name", TYPES_URN) + if name is None: raise ValueError("Name should not be empty") ip_version = findtext(request, "ipVersion", TYPES_URN) + if ip_version is None: raise ValueError("IP Version should not be empty") @@ -3502,24 +3722,29 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_createIpAddressList( raise ValueError("IP Address should not be empty") body = self.fixtures.load("ip_address_list_create.xml") + return httplib.OK, body, {}, httplib.responses[httplib.OK] def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_editIpAddressList( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}" "editIpAddressList": raise InvalidRequestError(request.tag) ip_address_list = request.get("id") + if ip_address_list is None: raise ValueError("IpAddressList ID should not be empty") name = findtext(request, "name", TYPES_URN) + if name is not None: raise ValueError("Name should not exists in request") ip_version = findtext(request, "ipVersion", TYPES_URN) + if ip_version is not None: raise ValueError("IP Version should not exists in request") @@ -3537,16 +3762,19 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_editIpAddressList( raise ValueError("IP Address should not be empty") body = self.fixtures.load("ip_address_list_edit.xml") + return httplib.OK, body, {}, httplib.responses[httplib.OK] def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_deleteIpAddressList( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}" "deleteIpAddressList": raise InvalidRequestError(request.tag) ip_address_list = request.get("id") + if ip_address_list is None: raise ValueError("IpAddressList ID should not be empty") @@ -3572,10 +3800,12 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_createPortList( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}" "createPortList": raise InvalidRequestError(request.tag) net_domain = findtext(request, "networkDomainId", TYPES_URN) + if net_domain is None: raise ValueError("Network Domain should not be empty") @@ -3598,6 +3828,7 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_editPortList( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}" "editPortList": raise InvalidRequestError(request.tag) @@ -3620,10 +3851,12 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_deletePortList( self, method, url, body, headers ): request = ET.fromstring(body) + if request.tag != "{urn:didata.com:api:cloud:types}" "deletePortList": raise InvalidRequestError(request.tag) port_list = request.get("id") + if port_list is None: raise ValueError("Port List ID should not be empty") @@ -3634,31 +3867,36 @@ def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_deletePortList( def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_cloneServer( self, method, url, body, headers ): - body = self.fixtures.load("2.4/server_clone_response.xml") + body = self.fixtures.load("2_4/server_clone_response.xml") + return httplib.OK, body, {}, httplib.responses[httplib.OK] def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_image_importImage( self, method, url, body, headers ): - body = self.fixtures.load("2.4/import_image_response.xml") + body = self.fixtures.load("2_4/import_image_response.xml") + return httplib.OK, body, {}, httplib.responses[httplib.OK] def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_exchangeNicVlans( self, method, url, body, headers ): - body = self.fixtures.load("2.4/exchange_nic_vlans_response.xml") + body = self.fixtures.load("2_4/exchange_nic_vlans_response.xml") + return httplib.OK, body, {}, httplib.responses[httplib.OK] def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeNetworkAdapter( self, method, url, body, headers ): - body = self.fixtures.load("2.4/change_nic_networkadapter_response.xml") + body = self.fixtures.load("2_4/change_nic_networkadapter_response.xml") + return httplib.OK, body, {}, httplib.responses[httplib.OK] def _caas_2_4_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployUncustomizedServer( self, method, url, body, headers ): - body = self.fixtures.load("2.4/deploy_customised_server.xml") + body = self.fixtures.load("2_4/deploy_customised_server.xml") + return httplib.OK, body, {}, httplib.responses[httplib.OK]