White space after # in thirdparty
Fixing a style issue realted to comments in thirdparty.
Change-Id: Ic2202069bced713bb23541a62404deedc42912f1
diff --git a/tempest/thirdparty/boto/test.py b/tempest/thirdparty/boto/test.py
index ba627e3..8812a10 100644
--- a/tempest/thirdparty/boto/test.py
+++ b/tempest/thirdparty/boto/test.py
@@ -170,7 +170,7 @@
add_cls = getattr(add_cls, part)
-#TODO(afazekas): classmethod handling
+# TODO(afazekas): classmethod handling
def friendly_function_name_simple(call_able):
name = ""
if hasattr(call_able, "im_class"):
@@ -224,7 +224,7 @@
"""Cancel Clean up request."""
del cls._resource_trash_bin[key]
- #TODO(afazekas): Add "with" context handling
+ # TODO(afazekas): Add "with" context handling
def assertBotoError(self, excMatcher, callableObj,
*args, **kwargs):
"""Example usage:
@@ -272,7 +272,7 @@
s3_error_code.server = ServerError()
s3_error_code.client = ClientError()
valid_image_state = set(('available', 'pending', 'failed'))
- #NOTE(afazekas): 'paused' is not valid status in EC2, but it does not have
+ # NOTE(afazekas): 'paused' is not valid status in EC2, but it does not have
# a good mapping, because it uses memory, but not really a running machine
valid_instance_state = set(('pending', 'running', 'shutting-down',
'terminated', 'stopping', 'stopped', 'paused'))
@@ -380,7 +380,7 @@
def assertAddressReleasedWait(self, address):
def _address_delete():
- #NOTE(afazekas): the filter gives back IP
+ # NOTE(afazekas): the filter gives back IP
# even if it is not associated to my tenant
if (address.public_ip not in map(lambda a: a.public_ip,
self.ec2_client.get_all_addresses())):
@@ -448,7 +448,7 @@
if cls.ec2_error_code.\
client.InvalidInstanceID.NotFound.match(exc):
return "_GONE"
- #NOTE(afazekas): incorrect code,
+ # NOTE(afazekas): incorrect code,
# but the resource must be destoreyd
if exc.error_code == "InstanceNotFound":
return "_GONE"
@@ -465,7 +465,7 @@
if exc_num:
raise exceptions.TearDownException(num=exc_num)
- #NOTE(afazekas): The incorrect ErrorCodes makes very, very difficult
+ # NOTE(afazekas): The incorrect ErrorCodes makes very, very difficult
# to write better teardown
@classmethod
@@ -473,7 +473,7 @@
"""Delete group.
Use just for teardown!
"""
- #NOTE(afazekas): should wait/try until all related instance terminates
+ # NOTE(afazekas): should wait/try until all related instance terminates
group.delete()
@classmethod
@@ -487,7 +487,7 @@
LOG.critical("%s Volume has %s snapshot(s)", volume.id,
map(snaps.id, snaps))
- #Note(afazekas): detaching/attching not valid EC2 status
+ # NOTE(afazekas): detaching/attching not valid EC2 status
def _volume_state():
volume.update(validate=True)
try:
@@ -495,7 +495,7 @@
volume.detach(force=True)
except BaseException as exc:
LOG.exception(exc)
- #exc_num += 1 "nonlocal" not in python2
+ # exc_num += 1 "nonlocal" not in python2
return volume.status
try:
diff --git a/tempest/thirdparty/boto/test_ec2_instance_run.py b/tempest/thirdparty/boto/test_ec2_instance_run.py
index df2ff6a..5007503 100644
--- a/tempest/thirdparty/boto/test_ec2_instance_run.py
+++ b/tempest/thirdparty/boto/test_ec2_instance_run.py
@@ -231,7 +231,7 @@
else:
self.assertNotEqual(instance.state, "running")
- #NOTE(afazekas): doctored test case,
+ # NOTE(afazekas): doctored test case,
# with normal validation it would fail
@testtools.skip("Until Bug #1182679 is fixed")
@attr(type='smoke')
@@ -277,10 +277,10 @@
self.assertTrue(address.associate(instance.id))
rcuk_da = self.addResourceCleanUp(address.disassociate)
- #TODO(afazekas): ping test. dependecy/permission ?
+ # TODO(afazekas): ping test. dependecy/permission ?
self.assertVolumeStatusWait(volume, "available")
- #NOTE(afazekas): it may be reports availble before it is available
+ # NOTE(afazekas): it may be reports availble before it is available
ssh = RemoteClient(address.public_ip,
self.os.config.compute.ssh_user,
@@ -304,7 +304,7 @@
self.assertVolumeStatusWait(_volume_state, "in-use")
re_search_wait(_volume_state, "in-use")
- #NOTE(afazekas): Different Hypervisor backends names
+ # NOTE(afazekas): Different Hypervisor backends names
# differently the devices,
# now we just test is the partition number increased/decrised
@@ -319,7 +319,7 @@
state_wait(_part_state, 'INCREASE')
part_lines = ssh.get_partitions().split('\n')
- #TODO(afazekas): Resource compare to the flavor settings
+ # TODO(afazekas): Resource compare to the flavor settings
volume.detach()
@@ -340,7 +340,7 @@
LOG.info("state: %s", instance.state)
if instance.state != "stopped":
self.assertInstanceStateWait(instance, "stopped")
- #TODO(afazekas): move steps from teardown to the test case
+ # TODO(afazekas): move steps from teardown to the test case
-#TODO(afazekas): Snapshot/volume read/write test case
+# TODO(afazekas): Snapshot/volume read/write test case
diff --git a/tempest/thirdparty/boto/test_ec2_keys.py b/tempest/thirdparty/boto/test_ec2_keys.py
index 1072356..1b4d7ec 100644
--- a/tempest/thirdparty/boto/test_ec2_keys.py
+++ b/tempest/thirdparty/boto/test_ec2_keys.py
@@ -37,7 +37,7 @@
cls.client = cls.os.ec2api_client
cls.ec = cls.ec2_error_code
-#TODO(afazekas): merge create, delete, get test cases
+# TODO(afazekas): merge create, delete, get test cases
@attr(type='smoke')
def test_create_ec2_keypair(self):
# EC2 create KeyPair
diff --git a/tempest/thirdparty/boto/test_ec2_network.py b/tempest/thirdparty/boto/test_ec2_network.py
index f4602d8..6226dbb 100644
--- a/tempest/thirdparty/boto/test_ec2_network.py
+++ b/tempest/thirdparty/boto/test_ec2_network.py
@@ -30,7 +30,7 @@
cls.os = clients.Manager()
cls.client = cls.os.ec2api_client
-#Note(afazekas): these tests for things duable without an instance
+# Note(afazekas): these tests for things duable without an instance
@testtools.skip("Skipped until the Bug #1080406 is resolved")
@attr(type='smoke')
def test_disassociate_not_associated_floating_ip(self):
diff --git a/tempest/thirdparty/boto/test_ec2_security_groups.py b/tempest/thirdparty/boto/test_ec2_security_groups.py
index 3db9a88..81ddcf6 100644
--- a/tempest/thirdparty/boto/test_ec2_security_groups.py
+++ b/tempest/thirdparty/boto/test_ec2_security_groups.py
@@ -43,7 +43,7 @@
group_get = groups_get[0]
self.assertEqual(group.name, group_get.name)
self.assertEqual(group.name, group_get.name)
- #ping (icmp_echo) and other icmp allowed from everywhere
+ # ping (icmp_echo) and other icmp allowed from everywhere
# from_port and to_port act as icmp type
success = self.client.authorize_security_group(group_name,
ip_protocol="icmp",
@@ -51,17 +51,17 @@
from_port=-1,
to_port=-1)
self.assertTrue(success)
- #allow standard ssh port from anywhere
+ # allow standard ssh port from anywhere
success = self.client.authorize_security_group(group_name,
ip_protocol="tcp",
cidr_ip="0.0.0.0/0",
from_port=22,
to_port=22)
self.assertTrue(success)
- #TODO(afazekas): Duplicate tests
+ # TODO(afazekas): Duplicate tests
group_get = self.client.get_all_security_groups(
groupnames=(group_name,))[0]
- #remove listed rules
+ # remove listed rules
for ip_permission in group_get.rules:
for cidr in ip_permission.grants:
self.assertTrue(self.client.revoke_security_group(group_name,
@@ -72,5 +72,5 @@
group_get = self.client.get_all_security_groups(
groupnames=(group_name,))[0]
- #all rules shuld be removed now
+ # all rules shuld be removed now
self.assertEqual(0, len(group_get.rules))
diff --git a/tempest/thirdparty/boto/test_s3_ec2_images.py b/tempest/thirdparty/boto/test_s3_ec2_images.py
index e2ca15f..26c2701 100644
--- a/tempest/thirdparty/boto/test_s3_ec2_images.py
+++ b/tempest/thirdparty/boto/test_s3_ec2_images.py
@@ -59,7 +59,7 @@
image["image_id"] = self.images_client.register_image(
name=image["name"],
image_location=image["location"])
- #Note(afazekas): delete_snapshot=True might trigger boto lib? bug
+ # NOTE(afazekas): delete_snapshot=True might trigger boto lib? bug
image["cleanUp"] = self.addResourceCleanUp(
self.images_client.deregister_image,
image["image_id"])
@@ -119,4 +119,4 @@
self.images_client.deregister_image(image["image_id"])
self.cancelResourceCleanUp(image["cleanUp"])
-#TODO(afazekas): less copy-paste style
+# TODO(afazekas): less copy-paste style
diff --git a/tempest/thirdparty/boto/utils/wait.py b/tempest/thirdparty/boto/utils/wait.py
index d8fca3b..1507deb 100644
--- a/tempest/thirdparty/boto/utils/wait.py
+++ b/tempest/thirdparty/boto/utils/wait.py
@@ -34,7 +34,7 @@
def state_wait(lfunction, final_set=set(), valid_set=None):
- #TODO(afazekas): evaluate using ABC here
+ # TODO(afazekas): evaluate using ABC here
if not isinstance(final_set, set):
final_set = set((final_set,))
if not isinstance(valid_set, set) and valid_set is not None:
@@ -112,7 +112,7 @@
time.sleep(default_check_interval)
-#NOTE(afazekas): EC2/boto normally raise exception instead of empty list
+# NOTE(afazekas): EC2/boto normally raise exception instead of empty list
def wait_exception(lfunction):
"""Returns with the exception or raises one."""
start_time = time.time()
@@ -129,4 +129,4 @@
dtime)
time.sleep(default_check_interval)
-#TODO(afazekas): consider strategy design pattern..
+# TODO(afazekas): consider strategy design pattern..