summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorTang Chen <chen.tang@easystack.cn>2016-02-17 14:39:57 +0800
committerTang Chen <chen.tang@easystack.cn>2016-02-27 03:48:11 +0800
commit9c91c1df4147cbd277c3384b0c648a6069c5f723 (patch)
tree8c118f32304470c3e9856f26eb0c42739f36dae4 /openstackclient
parent859bfaf8757086c8607c1520c8018ab20e91a3ac (diff)
downloadpython-openstackclient-9c91c1df4147cbd277c3384b0c648a6069c5f723.tar.gz
Make SetAgent inherit from cliff.Command
set/unset command classes should inherit from cliff.Command class. Also, this patch adds functional tests for compute agent. Change-Id: I25eafffd1167f82aa0d430628c22dee7516b1e19 Partial-Bug: 1546065
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/compute/v2/agent.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/openstackclient/compute/v2/agent.py b/openstackclient/compute/v2/agent.py
index 59d7dc66..d5e86033 100644
--- a/openstackclient/compute/v2/agent.py
+++ b/openstackclient/compute/v2/agent.py
@@ -112,7 +112,7 @@ class ListAgent(command.Lister):
) for s in data))
-class SetAgent(command.ShowOne):
+class SetAgent(command.Command):
"""Set compute agent command"""
def get_parser(self, prog_name):
@@ -143,5 +143,4 @@ class SetAgent(command.ShowOne):
parsed_args.url,
parsed_args.md5hash
)
- agent = compute_client.agents.update(*args)._info.copy()
- return zip(*sorted(six.iteritems(agent)))
+ compute_client.agents.update(*args)