Add Nova version log

We could not see log of Nova versions on the gate.
This patch adds the log to know each version status on the development.

Change-Id: I438754ad78cd07780b21874c9ee9685b549e3652
This commit is contained in:
Ken'ichi Ohmichi 2017-03-02 13:45:05 -08:00
parent d01fde620b
commit e2325f03bf

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import time
from oslo_serialization import jsonutils as json
from tempest.lib.api_schema.response.compute.v2_1 import versions as schema
@ -23,7 +25,13 @@ class VersionsClient(base_compute_client.BaseComputeClient):
def list_versions(self):
version_url = self._get_base_version_url()
start = time.time()
resp, body = self.raw_request(version_url, 'GET')
end = time.time()
self._log_request('GET', version_url, resp, secs=(end - start),
resp_body=body)
self._error_checker(resp, body)
body = json.loads(body)
self.validate_response(schema.list_versions, resp, body)