Merge "Fix create/show/delete methods on subnetpools_client"
diff --git a/tempest/api/network/test_subnetpools_extensions.py b/tempest/api/network/test_subnetpools_extensions.py
index 29d1d89..e5d0462 100644
--- a/tempest/api/network/test_subnetpools_extensions.py
+++ b/tempest/api/network/test_subnetpools_extensions.py
@@ -50,28 +50,28 @@
subnetpool_name = data_utils.rand_name('subnetpools')
# create subnet pool
prefix = CONF.network.default_network
- body = self.subnetpools_client.create_subnetpools(name=subnetpool_name,
- prefixes=prefix)
+ body = self.subnetpools_client.create_subnetpool(name=subnetpool_name,
+ prefixes=prefix)
subnetpool_id = body["subnetpool"]["id"]
self.addCleanup(self._cleanup_subnetpools, subnetpool_id)
self.assertEqual(subnetpool_name, body["subnetpool"]["name"])
# get detail about subnet pool
- body = self.subnetpools_client.show_subnetpools(subnetpool_id)
+ body = self.subnetpools_client.show_subnetpool(subnetpool_id)
self.assertEqual(subnetpool_name, body["subnetpool"]["name"])
# update the subnet pool
subnetpool_name = data_utils.rand_name('subnetpools_update')
- body = self.subnetpools_client.update_subnetpools(subnetpool_id,
- name=subnetpool_name)
+ body = self.subnetpools_client.update_subnetpool(subnetpool_id,
+ name=subnetpool_name)
self.assertEqual(subnetpool_name, body["subnetpool"]["name"])
# delete subnet pool
- body = self.subnetpools_client.delete_subnetpools(subnetpool_id)
+ body = self.subnetpools_client.delete_subnetpool(subnetpool_id)
self.assertRaises(lib_exc.NotFound,
- self.subnetpools_client.show_subnetpools,
+ self.subnetpools_client.show_subnetpool,
subnetpool_id)
def _cleanup_subnetpools(self, subnetpool_id):
# this is used to cleanup the resources
try:
- self.subnetpools_client.delete_subnetpools(subnetpool_id)
+ self.subnetpools_client.delete_subnetpool(subnetpool_id)
except lib_exc.NotFound:
pass
diff --git a/tempest/services/network/json/subnetpools_client.py b/tempest/services/network/json/subnetpools_client.py
index b5aec47..f921bb0 100644
--- a/tempest/services/network/json/subnetpools_client.py
+++ b/tempest/services/network/json/subnetpools_client.py
@@ -21,20 +21,20 @@
uri = '/subnetpools'
return self.list_resources(uri, **filters)
- def create_subnetpools(self, **kwargs):
+ def create_subnetpool(self, **kwargs):
uri = '/subnetpools'
post_data = {'subnetpool': kwargs}
return self.create_resource(uri, post_data)
- def show_subnetpools(self, subnetpool_id, **fields):
+ def show_subnetpool(self, subnetpool_id, **fields):
uri = '/subnetpools/%s' % subnetpool_id
return self.show_resource(uri, **fields)
- def update_subnetpools(self, subnetpool_id, **kwargs):
+ def update_subnetpool(self, subnetpool_id, **kwargs):
uri = '/subnetpools/%s' % subnetpool_id
post_data = {'subnetpool': kwargs}
return self.update_resource(uri, post_data)
- def delete_subnetpools(self, subnetpool_id):
+ def delete_subnetpool(self, subnetpool_id):
uri = '/subnetpools/%s' % subnetpool_id
return self.delete_resource(uri)