Add available params in subnets client's comment

Some interfaces in subnets client have **kwargs parameter, but no api
reference links are given. so this is to add "Available params" in their
comments.

Change-Id: I770cf5cce2c532b914db74742bc86629db43ae60
This commit is contained in:
Lv Fumei 2016-07-06 13:42:27 +08:00
parent 6afd72d074
commit fbfe20f5c0

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)