Remove timer and _log_request() calling

This commit removes timers and _log_request() function calling since
they are already moved to the raw_request() method.

Change-Id: I5ba2552bacfdfba6dbdc26857c39fb9b850d794a
This commit is contained in:
Masayuki Igawa
2019-09-30 15:13:18 +09:00
parent cb3cf038eb
commit aadc885801
4 changed files with 0 additions and 24 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)