Merge "Remove timer and _log_request() calling"
This commit is contained in:
commit
e459e0d448
|
@ -12,8 +12,6 @@
|
|||
# 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
|
||||
|
@ -26,11 +24,7 @@ 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)
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import time
|
||||
|
||||
from oslo_serialization import jsonutils as json
|
||||
|
||||
from tempest.lib.common import rest_client
|
||||
|
@ -26,11 +24,7 @@ class VersionsClient(rest_client.RestClient):
|
|||
"""List API versions"""
|
||||
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)
|
||||
|
||||
self.expected_success(300, resp.status)
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import time
|
||||
|
||||
from oslo_serialization import jsonutils as json
|
||||
|
||||
from tempest.lib.common import rest_client
|
||||
|
@ -26,11 +24,7 @@ class VersionsClient(rest_client.RestClient):
|
|||
"""List API versions"""
|
||||
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)
|
||||
|
||||
self.expected_success(300, resp.status)
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import time
|
||||
|
||||
from six.moves.urllib.parse import urljoin
|
||||
|
||||
from oslo_serialization import jsonutils as json
|
||||
|
@ -34,14 +32,10 @@ class VersionsClient(base_client.BaseClient):
|
|||
"""
|
||||
version_url = self._get_base_version_url()
|
||||
|
||||
start = time.time()
|
||||
resp, body = self.raw_request(version_url, 'GET')
|
||||
end = time.time()
|
||||
# NOTE: We need a raw_request() here instead of request() call because
|
||||
# "list API versions" API doesn't require an authentication and we can
|
||||
# skip it with raw_request() call.
|
||||
self._log_request('GET', version_url, resp, secs=(end - start),
|
||||
resp_body=body)
|
||||
self._error_checker(resp, body)
|
||||
|
||||
body = json.loads(body)
|
||||
|
|
Loading…
Reference in New Issue