summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <ken-oomichi@wx.jp.nec.com>2016-02-02 11:37:09 +0000
committerKen'ichi Ohmichi <ken-oomichi@wx.jp.nec.com>2016-02-03 07:51:12 +0000
commitd598f35ad909b2f29af76846ea71337b77131de9 (patch)
treee35de8d2421bf39112364d40a4b2f25a107110ba
parent5e02b7844b0ec92b41491a873fc2909a205f4426 (diff)
downloadtempest-lib-d598f35ad909b2f29af76846ea71337b77131de9.tar.gz
Add bulk methods to network service clients
The tempest network_client still contains some bulk methods, but they should be implemented on each resource client. This patch addes them into each client. After this patch and a new tempest-lib release, we can remove these bulk methods from Tempest. Partially implements blueprint consistent-service-method-names Change-Id: Iea34620ae8785cc593d9c68bf3c31840f3e79bd7
-rw-r--r--tempest_lib/services/network/networks_client.py9
-rw-r--r--tempest_lib/services/network/ports_client.py9
-rw-r--r--tempest_lib/services/network/subnets_client.py9
3 files changed, 27 insertions, 0 deletions
diff --git a/tempest_lib/services/network/networks_client.py b/tempest_lib/services/network/networks_client.py
index 71699db..541cdab 100644
--- a/tempest_lib/services/network/networks_client.py
+++ b/tempest_lib/services/network/networks_client.py
@@ -36,3 +36,12 @@ class NetworksClient(base.BaseNetworkClient):
def list_networks(self, **filters):
uri = '/networks'
return self.list_resources(uri, **filters)
+
+ def create_bulk_networks(self, **kwargs):
+ """Create multiple networks in a single request.
+
+ Available params: see http://developer.openstack.org/
+ api-ref-networking-v2.html#bulkCreateNetwork
+ """
+ uri = '/networks'
+ return self.create_resource(uri, kwargs)
diff --git a/tempest_lib/services/network/ports_client.py b/tempest_lib/services/network/ports_client.py
index 92bf07b..9afbb9c 100644
--- a/tempest_lib/services/network/ports_client.py
+++ b/tempest_lib/services/network/ports_client.py
@@ -36,3 +36,12 @@ class PortsClient(base.BaseNetworkClient):
def list_ports(self, **filters):
uri = '/ports'
return self.list_resources(uri, **filters)
+
+ def create_bulk_ports(self, **kwargs):
+ """Create multiple ports in a single request.
+
+ Available params: see http://developer.openstack.org/
+ api-ref-networking-v2.html#bulkCreatePorts
+ """
+ uri = '/ports'
+ return self.create_resource(uri, kwargs)
diff --git a/tempest_lib/services/network/subnets_client.py b/tempest_lib/services/network/subnets_client.py
index f824d48..4b50047 100644
--- a/tempest_lib/services/network/subnets_client.py
+++ b/tempest_lib/services/network/subnets_client.py
@@ -36,3 +36,12 @@ class SubnetsClient(base.BaseNetworkClient):
def list_subnets(self, **filters):
uri = '/subnets'
return self.list_resources(uri, **filters)
+
+ def create_bulk_subnets(self, **kwargs):
+ """Create multiple subnets in a single request.
+
+ Available params: see http://developer.openstack.org/
+ api-ref-networking-v2.html#bulkCreateSubnet
+ """
+ uri = '/subnets'
+ return self.create_resource(uri, kwargs)