Matt Riedemann 752a2db332 Optimize _prep_server_detail to avoid redundant find_resource
When showing a server or doing a rebuild, we already have
the latest version of the server so _prep_server_detail
getting the server again is an unnecessary performance hit.

ShowServer is pretty obvious here. For RebuildServer, the
compute API actually refreshes the server before returning
it in the response, so the client already gets the latest
when the rebuild call returns.

The only other usage of _prep_server_detail that does require
a refresh is CreateServer since the POST /servers response is
a minimal version of the server object.

This adds a new refresh kwarg, backward compatible by default,
to _prep_server_detail but changes ShowServer and RebuildServer
to no longer refresh.

Change-Id: Ib1c9c424ed1cafc2dfd8be90af8de8a774bdfbf0
2018-06-08 11:46:29 -04:00
..
2014-01-20 17:28:13 +04:00