Merge "White space after # in the tempest/services"
diff --git a/tempest/services/botoclients.py b/tempest/services/botoclients.py
index 32ec109..66fb7af 100644
--- a/tempest/services/botoclients.py
+++ b/tempest/services/botoclients.py
@@ -180,7 +180,7 @@
:return: Returns with the first available zone name
"""
for zone in self.get_all_zones():
- #NOTE(afazekas): zone.region_name was None
+ # NOTE(afazekas): zone.region_name was None
if (zone.state == "available" and
zone.region.name == self.connection_data["region"].name):
return zone.name
diff --git a/tempest/services/compute/json/flavors_client.py b/tempest/services/compute/json/flavors_client.py
index 1b965f3..5f58c43 100644
--- a/tempest/services/compute/json/flavors_client.py
+++ b/tempest/services/compute/json/flavors_client.py
@@ -79,9 +79,9 @@
return self.delete("flavors/%s" % str(flavor_id))
def is_resource_deleted(self, id):
- #Did not use get_flavor_details(id) for verification as it gives
- #200 ok even for deleted id. LP #981263
- #we can remove the loop here and use get by ID when bug gets sortedout
+ # Did not use get_flavor_details(id) for verification as it gives
+ # 200 ok even for deleted id. LP #981263
+ # we can remove the loop here and use get by ID when bug gets sortedout
resp, flavors = self.list_flavors_with_detail()
for flavor in flavors:
if flavor['id'] == id:
diff --git a/tempest/services/compute/json/keypairs_client.py b/tempest/services/compute/json/keypairs_client.py
index 90b2096..a464816 100644
--- a/tempest/services/compute/json/keypairs_client.py
+++ b/tempest/services/compute/json/keypairs_client.py
@@ -30,11 +30,11 @@
def list_keypairs(self):
resp, body = self.get("os-keypairs")
body = json.loads(body)
- #Each returned keypair is embedded within an unnecessary 'keypair'
- #element which is a deviation from other resources like floating-ips,
- #servers, etc. A bug?
- #For now we shall adhere to the spec, but the spec for keypairs
- #is yet to be found
+ # Each returned keypair is embedded within an unnecessary 'keypair'
+ # element which is a deviation from other resources like floating-ips,
+ # servers, etc. A bug?
+ # For now we shall adhere to the spec, but the spec for keypairs
+ # is yet to be found
return resp, body['keypairs']
def get_keypair(self, key_name):
diff --git a/tempest/services/compute/xml/flavors_client.py b/tempest/services/compute/xml/flavors_client.py
index a6451df..6ba31ea 100644
--- a/tempest/services/compute/xml/flavors_client.py
+++ b/tempest/services/compute/xml/flavors_client.py
@@ -117,9 +117,9 @@
return self.delete("flavors/%s" % str(flavor_id), self.headers)
def is_resource_deleted(self, id):
- #Did not use get_flavor_details(id) for verification as it gives
- #200 ok even for deleted id. LP #981263
- #we can remove the loop here and use get by ID when bug gets sortedout
+ # Did not use get_flavor_details(id) for verification as it gives
+ # 200 ok even for deleted id. LP #981263
+ # we can remove the loop here and use get by ID when bug gets sortedout
resp, flavors = self.list_flavors_with_detail()
for flavor in flavors:
if flavor['id'] == id:
diff --git a/tempest/services/image/v1/json/image_client.py b/tempest/services/image/v1/json/image_client.py
index bd48068..1921d78 100644
--- a/tempest/services/image/v1/json/image_client.py
+++ b/tempest/services/image/v1/json/image_client.py
@@ -247,13 +247,13 @@
data = json.loads(data)
return resp, data
- #NOTE(afazekas): just for the wait function
+ # NOTE(afazekas): just for the wait function
def _get_image_status(self, image_id):
resp, meta = self.get_image_meta(image_id)
status = meta['status']
return status
- #NOTE(afazkas): Wait reinvented again. It is not in the correct layer
+ # NOTE(afazkas): Wait reinvented again. It is not in the correct layer
def wait_for_image_status(self, image_id, status):
"""Waits for a Image to reach a given status."""
start_time = time.time()
diff --git a/tempest/services/object_storage/account_client.py b/tempest/services/object_storage/account_client.py
index ce4b127..8defbbb 100644
--- a/tempest/services/object_storage/account_client.py
+++ b/tempest/services/object_storage/account_client.py
@@ -102,7 +102,7 @@
super(AccountClientCustomizedHeader, self).__init__(config, username,
password, auth_url,
tenant_name)
- #Overwrites json-specific header encoding in RestClient
+ # Overwrites json-specific header encoding in RestClient
self.service = self.config.object_storage.catalog_type
self.format = 'json'
diff --git a/tempest/services/object_storage/container_client.py b/tempest/services/object_storage/container_client.py
index 93477fa..dd5f3ec 100644
--- a/tempest/services/object_storage/container_client.py
+++ b/tempest/services/object_storage/container_client.py
@@ -26,7 +26,7 @@
super(ContainerClient, self).__init__(config, username, password,
auth_url, tenant_name)
- #Overwrites json-specific header encoding in RestClient
+ # Overwrites json-specific header encoding in RestClient
self.headers = {}
self.service = self.config.object_storage.catalog_type
self.format = 'json'
@@ -94,8 +94,8 @@
item count is beyond 10,000 item listing limit.
Does not require any paramaters aside from container name.
"""
- #TODO(dwalleck): Rewite using json format to avoid newlines at end of
- #obj names. Set limit to API limit - 1 (max returned items = 9999)
+ # TODO(dwalleck): Rewite using json format to avoid newlines at end of
+ # obj names. Set limit to API limit - 1 (max returned items = 9999)
limit = 9999
if params is not None:
if 'limit' in params:
@@ -114,16 +114,16 @@
if len(objlist) >= limit:
- #Increment marker
+ # Increment marker
marker = objlist[len(objlist) - 1]
- #Get the next chunk of the list
+ # Get the next chunk of the list
objlist.extend(_list_all_container_objects(container,
params={'marker': marker,
'limit': limit}))
return objlist
else:
- #Return final, complete list
+ # Return final, complete list
return objlist"""
def list_container_contents(self, container, params=None):
diff --git a/tempest/services/object_storage/object_client.py b/tempest/services/object_storage/object_client.py
index c894612..181838e 100644
--- a/tempest/services/object_storage/object_client.py
+++ b/tempest/services/object_storage/object_client.py
@@ -155,7 +155,7 @@
super(ObjectClientCustomizedHeader, self).__init__(config, username,
password, auth_url,
tenant_name)
- #Overwrites json-specific header encoding in RestClient
+ # Overwrites json-specific header encoding in RestClient
self.service = self.config.object_storage.catalog_type
self.format = 'json'
diff --git a/tempest/services/volume/json/snapshots_client.py b/tempest/services/volume/json/snapshots_client.py
index 034b452..ce2da90 100644
--- a/tempest/services/volume/json/snapshots_client.py
+++ b/tempest/services/volume/json/snapshots_client.py
@@ -76,11 +76,11 @@
body = json.loads(body)
return resp, body['snapshot']
- #NOTE(afazekas): just for the wait function
+ # NOTE(afazekas): just for the wait function
def _get_snapshot_status(self, snapshot_id):
resp, body = self.get_snapshot(snapshot_id)
status = body['status']
- #NOTE(afazekas): snapshot can reach an "error"
+ # NOTE(afazekas): snapshot can reach an "error"
# state in a "normal" lifecycle
if (status == 'error'):
raise exceptions.SnapshotBuildErrorException(
@@ -88,7 +88,7 @@
return status
- #NOTE(afazkas): Wait reinvented again. It is not in the correct layer
+ # NOTE(afazkas): Wait reinvented again. It is not in the correct layer
def wait_for_snapshot_status(self, snapshot_id, status):
"""Waits for a Snapshot to reach a given status."""
start_time = time.time()
diff --git a/tempest/services/volume/xml/snapshots_client.py b/tempest/services/volume/xml/snapshots_client.py
index 017ca95..51c46da 100644
--- a/tempest/services/volume/xml/snapshots_client.py
+++ b/tempest/services/volume/xml/snapshots_client.py
@@ -81,7 +81,7 @@
display_name: Optional snapshot Name.
display_description: User friendly snapshot description.
"""
- #NOTE(afazekas): it should use the volume namaspace
+ # NOTE(afazekas): it should use the volume namaspace
snapshot = Element("snapshot", xmlns=XMLNS_11, volume_id=volume_id)
for key, value in kwargs.items():
snapshot.add_attr(key, value)
@@ -90,11 +90,11 @@
body = xml_to_json(etree.fromstring(body))
return resp, body
- #NOTE(afazekas): just for the wait function
+ # NOTE(afazekas): just for the wait function
def _get_snapshot_status(self, snapshot_id):
resp, body = self.get_snapshot(snapshot_id)
status = body['status']
- #NOTE(afazekas): snapshot can reach an "error"
+ # NOTE(afazekas): snapshot can reach an "error"
# state in a "normal" lifecycle
if (status == 'error'):
raise exceptions.SnapshotBuildErrorException(
@@ -102,7 +102,7 @@
return status
- #NOTE(afazkas): Wait reinvented again. It is not in the correct layer
+ # NOTE(afazkas): Wait reinvented again. It is not in the correct layer
def wait_for_snapshot_status(self, snapshot_id, status):
"""Waits for a Snapshot to reach a given status."""
start_time = time.time()
diff --git a/tempest/services/volume/xml/volumes_client.py b/tempest/services/volume/xml/volumes_client.py
index 8eda26b..eaa3ae0 100644
--- a/tempest/services/volume/xml/volumes_client.py
+++ b/tempest/services/volume/xml/volumes_client.py
@@ -103,7 +103,7 @@
:param imageRef: When specified the volume is created from this
image
"""
- #NOTE(afazekas): it should use a volume namespace
+ # NOTE(afazekas): it should use a volume namespace
volume = Element("volume", xmlns=XMLNS_11, size=size)
if 'metadata' in kwargs: