Add api refs for volume snapshots client and network agents client
This patch is to add some api refs for volume snapshots client and network agents client. Change-Id: I501cd143b760a2c0d8491f2b4ca241c0cdfccda4
This commit is contained in:
parent
96dedaca0b
commit
23adcc147a
@ -87,9 +87,11 @@ class AgentsClient(base.BaseNetworkClient):
|
||||
return self.delete_resource(uri)
|
||||
|
||||
def add_dhcp_agent_to_network(self, agent_id, **kwargs):
|
||||
# TODO(piyush): Current api-site doesn't contain this API description.
|
||||
# After fixing the api-site, we need to fix here also for putting the
|
||||
# link to api-site.
|
||||
# LP: https://bugs.launchpad.net/openstack-api-site/+bug/1526212
|
||||
"""Schedule a network to a DHCP agent.
|
||||
|
||||
For a full list of available parameters, please refer to the official
|
||||
API reference:
|
||||
https://developer.openstack.org/api-ref/network/v2/#schedule-a-network-to-a-dhcp-agent
|
||||
"""
|
||||
uri = '/agents/%s/dhcp-networks' % agent_id
|
||||
return self.create_resource(uri, kwargs, expect_empty_body=True)
|
||||
|
@ -114,12 +114,12 @@ class SnapshotsClient(rest_client.RestClient):
|
||||
return rest_client.ResponseBody(resp, body)
|
||||
|
||||
def update_snapshot_status(self, snapshot_id, **kwargs):
|
||||
"""Update the specified snapshot's status."""
|
||||
# TODO(gmann): api-site doesn't contain doc ref
|
||||
# for this API. After fixing the api-site, we need to
|
||||
# add the link here.
|
||||
# Bug https://bugs.launchpad.net/openstack-api-site/+bug/1532645
|
||||
"""Update status of a snapshot.
|
||||
|
||||
For a full list of available parameters, please refer to the official
|
||||
API reference:
|
||||
https://developer.openstack.org/api-ref/block-storage/v3/#update-status-of-a-snapshot
|
||||
"""
|
||||
post_body = json.dumps({'os-update_snapshot_status': kwargs})
|
||||
url = 'snapshots/%s/action' % snapshot_id
|
||||
resp, body = self.post(url, post_body)
|
||||
|
Loading…
x
Reference in New Issue
Block a user