From d58280a27989ab781cbf2598a6f7c263cb2275e8 Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Mon, 9 May 2016 14:59:39 +0800 Subject: 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 --- openstackclient/compute/v2/server.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'openstackclient/compute/v2') 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 -- cgit v1.2.1