Merge "Add available params in subnets client's comment"

This commit is contained in:
Jenkins 2016-07-06 14:18:25 +00:00 committed by Gerrit Code Review
commit d9266a13d3

10
tempest/lib/services/network/subnets_client.py Normal file → Executable file
View File

@ -16,11 +16,21 @@ from tempest.lib.services.network import base
class SubnetsClient(base.BaseNetworkClient):
def create_subnet(self, **kwargs):
"""Creates a subnet on a network.
Available params: see http://developer.openstack.org/
api-ref-networking-v2.html#createSubnet
"""
uri = '/subnets'
post_data = {'subnet': kwargs}
return self.create_resource(uri, post_data)
def update_subnet(self, subnet_id, **kwargs):
"""Updates a subnet.
Available params: see http://developer.openstack.org/
api-ref-networking-v2.html#updateSubnet
"""
uri = '/subnets/%s' % subnet_id
post_data = {'subnet': kwargs}
return self.update_resource(uri, post_data)