White space after # in the tempest/services

Fixing a style issue related to comments in services.

Change-Id: I0fc019ce9fe6ddb8037cdc6187df6015c160a9d7
This commit is contained in:
Attila Fazekas
2013-08-01 16:59:06 +02:00
parent 355b89fbb7
commit a8b5fe7b48
11 changed files with 30 additions and 30 deletions

View File

@@ -180,7 +180,7 @@ class APIClientEC2(BotoClientBase):
: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

View File

@@ -79,9 +79,9 @@ class FlavorsClientJSON(RestClient):
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:

View File

@@ -30,11 +30,11 @@ class KeyPairsClientJSON(RestClient):
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):

View File

@@ -117,9 +117,9 @@ class FlavorsClientXML(RestClientXML):
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:

View File

@@ -247,13 +247,13 @@ class ImageClientJSON(RestClient):
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()

View File

@@ -99,7 +99,7 @@ class AccountClientCustomizedHeader(RestClient):
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'

View File

@@ -26,7 +26,7 @@ class ContainerClient(RestClient):
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 @@ class ContainerClient(RestClient):
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 @@ class ContainerClient(RestClient):
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):

View File

@@ -155,7 +155,7 @@ class ObjectClientCustomizedHeader(RestClient):
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'

View File

@@ -76,11 +76,11 @@ class SnapshotsClientJSON(RestClient):
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 @@ class SnapshotsClientJSON(RestClient):
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()

View File

@@ -81,7 +81,7 @@ class SnapshotsClientXML(RestClientXML):
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 @@ class SnapshotsClientXML(RestClientXML):
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 @@ class SnapshotsClientXML(RestClientXML):
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()

View File

@@ -103,7 +103,7 @@ class VolumesClientXML(RestClientXML):
: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: