diff options
| author | Tang Chen <chen.tang@easystack.cn> | 2016-05-09 14:59:39 +0800 |
|---|---|---|
| committer | Tang Chen <chen.tang@easystack.cn> | 2016-05-09 14:59:39 +0800 |
| commit | d58280a27989ab781cbf2598a6f7c263cb2275e8 (patch) | |
| tree | b8e7ec2a97feca19b1ccacf4d0cb9971bbc248b9 /openstackclient/compute | |
| parent | 4cd702c3610e4e6b40695ff9ea8eecf7c0735c68 (diff) | |
| download | python-openstackclient-d58280a27989ab781cbf2598a6f7c263cb2275e8.tar.gz | |
Use find_resource() instead of get() in _prep_server_detail()
There is such a comment in test_server.py:
# Call .get() to retrieve all of the server information
# as findall(name=blah) and REST /details are not the same
# and do not return flavor and image information.
This is an out of date comment. There is no function named
findall() in OSC now. So use find_resource() instead of get(),
and remove this comment.
Change-Id: I8d79afc5f341fb5caf771d905506b7f1c7a41ae8
Diffstat (limited to 'openstackclient/compute')
| -rw-r--r-- | openstackclient/compute/v2/server.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index bf9f0985..d32f7ade 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -117,10 +117,7 @@ def _prep_server_detail(compute_client, server): """ info = server._info.copy() - # Call .get() to retrieve all of the server information - # as findall(name=blah) and REST /details are not the same - # and do not return flavor and image information. - server = compute_client.servers.get(info['id']) + server = utils.find_resource(compute_client.servers, info['id']) info.update(server._info) # Convert the image blob to a name |
