diff options
| author | npraveen35 <npraveen35@gmail.com> | 2017-08-18 15:48:54 +0530 |
|---|---|---|
| committer | Julie Pichon <jpichon@redhat.com> | 2017-11-07 17:02:56 +0000 |
| commit | 11e2f54ea4b45e8e0813fc93765bc1c088aea842 (patch) | |
| tree | abd0d1a785e2a2fc3b3056b5ec567fd8a60ca576 /openstackclient/network/v2 | |
| parent | b9c5094ede503109955eb90fe0007e343f7bb903 (diff) | |
| download | python-openstackclient-11e2f54ea4b45e8e0813fc93765bc1c088aea842.tar.gz | |
Neutron agent delete: remove the wrong argument
The take_action() function was calling get_agent() with the wrong
attribute, causing agent deletion to fail. It turns out calling
get_agent() isn't necessary; this removes the call entirely and moves
the 'ignore_missing' argument to the delete_agent() function.
Change-Id: Iaa3754a3be0765112f396495fa5fb2e32e6eae4e
Closes-Bug: #1711301
(cherry picked from commit 6c8e5177bc54ba215aad310094b1eefd6ce709cf)
Diffstat (limited to 'openstackclient/network/v2')
| -rw-r--r-- | openstackclient/network/v2/network_agent.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openstackclient/network/v2/network_agent.py b/openstackclient/network/v2/network_agent.py index ed4970a4..ba2a2633 100644 --- a/openstackclient/network/v2/network_agent.py +++ b/openstackclient/network/v2/network_agent.py @@ -134,8 +134,7 @@ class DeleteNetworkAgent(command.Command): for agent in parsed_args.network_agent: try: - obj = client.get_agent(agent, ignore_missing=False) - client.delete_agent(obj) + client.delete_agent(agent, ignore_missing=False) except Exception as e: result += 1 LOG.error(_("Failed to delete network agent with " |
