Merge "Add delete_agent to NetworkClientJSON"

This commit is contained in:
Zuul 2018-09-14 05:27:05 +00:00 committed by Gerrit Code Review
commit 5247e03ef3
2 changed files with 13 additions and 0 deletions

View File

@ -461,6 +461,12 @@ class NetworkClientJSON(service_client.RestClient):
body = jsonutils.loads(body)
return service_client.ResponseBody(resp, body)
def delete_agent(self, agent_id):
uri = '%s/agents/%s' % (self.uri_prefix, agent_id)
resp, body = self.delete(uri)
self.expected_success(204, resp.status)
return service_client.ResponseBody(resp, body)
def list_routers_on_l3_agent(self, agent_id):
uri = '%s/agents/%s/l3-routers' % (self.uri_prefix, agent_id)
resp, body = self.get(uri)

View File

@ -0,0 +1,7 @@
---
features:
- |
Added a new method ``delete_agent`` to the AgentsClient class that
implements agent deletion according to the neutron API.
https://developer.openstack.org/api-ref/network/v2/index.html#delete-agent