convert docstrings to comments
Convert docstrings to comments so that it's easier
to track down what tests are running under nose
Change-Id: Iab2c303a54983700c7ab25437c8324b95b341754
diff --git a/tempest/tests/compute/admin/test_flavors.py b/tempest/tests/compute/admin/test_flavors.py
index e5de0cb..b5ee13a 100644
--- a/tempest/tests/compute/admin/test_flavors.py
+++ b/tempest/tests/compute/admin/test_flavors.py
@@ -47,8 +47,8 @@
@attr(type='positive')
def test_create_flavor(self):
- """Create a flavor and ensure it is listed
- This operation requires the user to have 'admin' role"""
+ # Create a flavor and ensure it is listed
+ # This operation requires the user to have 'admin' role
#Create the flavor
resp, flavor = self.client.create_flavor(self.flavor_name,
self.ram, self.vcpus,
@@ -77,8 +77,8 @@
@attr(type='positive')
def test_create_flavor_verify_entry_in_list_details(self):
- """Create a flavor and ensure it's details are listed
- This operation requires the user to have 'admin' role"""
+ # Create a flavor and ensure it's details are listed
+ # This operation requires the user to have 'admin' role
#Create the flavor
resp, flavor = self.client.create_flavor(self.flavor_name,
self.ram, self.vcpus,
@@ -101,7 +101,7 @@
@attr(type='negative')
def test_get_flavor_details_for_deleted_flavor(self):
- """Delete a flavor and ensure it is not listed"""
+ # Delete a flavor and ensure it is not listed
# Create a test flavor
resp, flavor = self.client.create_flavor(self.flavor_name,
self.ram,
diff --git a/tempest/tests/compute/admin/test_quotas.py b/tempest/tests/compute/admin/test_quotas.py
index b9474e5..452de80 100644
--- a/tempest/tests/compute/admin/test_quotas.py
+++ b/tempest/tests/compute/admin/test_quotas.py
@@ -66,7 +66,7 @@
@attr(type='smoke')
def test_get_default_quotas(self):
- """Admin can get the default resource quota set for a tenant"""
+ # Admin can get the default resource quota set for a tenant
expected_quota_set = self.default_quota_set.copy()
expected_quota_set['id'] = self.demo_tenant_id
try:
@@ -77,7 +77,7 @@
self.fail("Admin could not get the default quota set for a tenant")
def test_update_all_quota_resources_for_tenant(self):
- """Admin can update all the resource quota limits for a tenant"""
+ # Admin can update all the resource quota limits for a tenant
new_quota_set = {'injected_file_content_bytes': 20480,
'metadata_items': 256, 'injected_files': 10,
'ram': 10240, 'floating_ips': 20, 'key_pairs': 200,
@@ -102,7 +102,7 @@
"defaults")
def test_get_updated_quotas(self):
- """Verify that GET shows the updated quota set"""
+ # Verify that GET shows the updated quota set
self.adm_client.update_quota_set(self.demo_tenant_id,
ram='5120')
try:
@@ -120,7 +120,7 @@
"defaults")
def test_create_server_when_cpu_quota_is_full(self):
- """Disallow server creation when tenant's vcpu quota is full"""
+ # Disallow server creation when tenant's vcpu quota is full
resp, quota_set = self.client.get_quota_set(self.demo_tenant_id)
default_vcpu_quota = quota_set['cores']
vcpu_quota = 0 # Set the quota to zero to conserve resources
@@ -138,7 +138,7 @@
cores=default_vcpu_quota)
def test_create_server_when_memory_quota_is_full(self):
- """Disallow server creation when tenant's memory quota is full"""
+ # Disallow server creation when tenant's memory quota is full
resp, quota_set = self.client.get_quota_set(self.demo_tenant_id)
default_mem_quota = quota_set['ram']
mem_quota = 0 # Set the quota to zero to conserve resources
diff --git a/tempest/tests/compute/flavors/test_flavors.py b/tempest/tests/compute/flavors/test_flavors.py
index 6423075..53cad65 100644
--- a/tempest/tests/compute/flavors/test_flavors.py
+++ b/tempest/tests/compute/flavors/test_flavors.py
@@ -24,7 +24,7 @@
@attr(type='smoke')
def test_list_flavors(self):
- """List of all flavors should contain the expected flavor"""
+ # List of all flavors should contain the expected flavor
resp, flavors = self.client.list_flavors()
resp, flavor = self.client.get_flavor_details(self.flavor_ref)
flavor_min_detail = {'id': flavor['id'], 'links': flavor['links'],
@@ -33,40 +33,40 @@
@attr(type='smoke')
def test_list_flavors_with_detail(self):
- """Detailed list of all flavors should contain the expected flavor"""
+ # Detailed list of all flavors should contain the expected flavor
resp, flavors = self.client.list_flavors_with_detail()
resp, flavor = self.client.get_flavor_details(self.flavor_ref)
self.assertTrue(flavor in flavors)
@attr(type='smoke')
def test_get_flavor(self):
- """The expected flavor details should be returned"""
+ # The expected flavor details should be returned
resp, flavor = self.client.get_flavor_details(self.flavor_ref)
self.assertEqual(self.flavor_ref, int(flavor['id']))
@attr(type='negative')
def test_get_non_existant_flavor(self):
- """flavor details are not returned for non existant flavors"""
+ # flavor details are not returned for non existant flavors
self.assertRaises(exceptions.NotFound, self.client.get_flavor_details,
999)
@attr(type='positive', bug='lp912922')
def test_list_flavors_limit_results(self):
- """Only the expected number of flavors should be returned"""
+ # Only the expected number of flavors should be returned
params = {'limit': 1}
resp, flavors = self.client.list_flavors(params)
self.assertEqual(1, len(flavors))
@attr(type='positive', bug='lp912922')
def test_list_flavors_detailed_limit_results(self):
- """Only the expected number of flavors (detailed) should be returned"""
+ # Only the expected number of flavors (detailed) should be returned
params = {'limit': 1}
resp, flavors = self.client.list_flavors_with_detail(params)
self.assertEqual(1, len(flavors))
@attr(type='positive')
def test_list_flavors_using_marker(self):
- """The list of flavors should start from the provided marker"""
+ # The list of flavors should start from the provided marker
resp, flavors = self.client.list_flavors()
flavor_id = flavors[0]['id']
@@ -77,7 +77,7 @@
@attr(type='positive')
def test_list_flavors_detailed_using_marker(self):
- """The list of flavors should start from the provided marker"""
+ # The list of flavors should start from the provided marker
resp, flavors = self.client.list_flavors_with_detail()
flavor_id = flavors[0]['id']
@@ -88,7 +88,7 @@
@attr(type='positive')
def test_list_flavors_detailed_filter_by_min_disk(self):
- """The detailed list of flavors should be filtered by disk space"""
+ # The detailed list of flavors should be filtered by disk space
resp, flavors = self.client.list_flavors_with_detail()
flavors = sorted(flavors, key=lambda k: k['disk'])
flavor_id = flavors[0]['id']
@@ -99,7 +99,7 @@
@attr(type='positive')
def test_list_flavors_detailed_filter_by_min_ram(self):
- """The detailed list of flavors should be filtered by RAM"""
+ # The detailed list of flavors should be filtered by RAM
resp, flavors = self.client.list_flavors_with_detail()
flavors = sorted(flavors, key=lambda k: k['ram'])
flavor_id = flavors[0]['id']
@@ -110,7 +110,7 @@
@attr(type='positive')
def test_list_flavors_filter_by_min_disk(self):
- """The list of flavors should be filtered by disk space"""
+ # The list of flavors should be filtered by disk space
resp, flavors = self.client.list_flavors_with_detail()
flavors = sorted(flavors, key=lambda k: k['disk'])
flavor_id = flavors[0]['id']
@@ -121,7 +121,7 @@
@attr(type='positive')
def test_list_flavors_filter_by_min_ram(self):
- """The list of flavors should be filtered by RAM"""
+ # The list of flavors should be filtered by RAM
resp, flavors = self.client.list_flavors_with_detail()
flavors = sorted(flavors, key=lambda k: k['ram'])
flavor_id = flavors[0]['id']
@@ -132,7 +132,7 @@
@attr(type='negative')
def test_get_flavor_details_for_invalid_flavor_id(self):
- """Ensure 404 returned for non-existant flavor ID"""
+ # Ensure 404 returned for non-existant flavor ID
self.assertRaises(exceptions.NotFound, self.client.get_flavor_details,
9999)
diff --git a/tempest/tests/compute/floating_ips/test_floating_ips_actions.py b/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
index 4e0efaa..e5b4e0d 100644
--- a/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
+++ b/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
@@ -63,10 +63,8 @@
@attr(type='positive')
def test_allocate_floating_ip(self):
- """
- Positive test:Allocation of a new floating IP to a project
- should be successful
- """
+ # Positive test:Allocation of a new floating IP to a project
+ # should be successful
try:
resp, body = self.client.create_floating_ip()
self.assertEqual(200, resp.status)
@@ -82,10 +80,8 @@
@attr(type='positive')
def test_delete_floating_ip(self):
- """
- Positive test:Deletion of valid floating IP from project
- should be successful
- """
+ # Positive test:Deletion of valid floating IP from project
+ # should be successful
#Creating the floating IP that is to be deleted in this method
resp, floating_ip_body = self.client.create_floating_ip()
#Storing the details of floating IP before deleting it
@@ -99,10 +95,9 @@
@attr(type='positive')
def test_associate_disassociate_floating_ip(self):
- """
- Positive test:Associate and disassociate the provided floating IP to a
- specific server should be successful
- """
+ # Positive test:Associate and disassociate the provided floating IP
+ # to a specific server should be successful
+
#Association of floating IP to fixed IP address
resp, body =\
self.client.associate_floating_ip_to_server(self.floating_ip,
@@ -131,10 +126,8 @@
@attr(type='negative')
def test_associate_nonexistant_floating_ip(self):
- """
- Negative test:Association of a non existent floating IP
- to specific server should fail
- """
+ # Negative test:Association of a non existent floating IP
+ # to specific server should fail
#Associating non existent floating IP
try:
resp, body = \
@@ -148,9 +141,7 @@
@attr(type='negative')
def test_dissociate_nonexistant_floating_ip(self):
- """
- Negative test:Dissociation of a non existent floating IP should fail
- """
+ # Negative test:Dissociation of a non existent floating IP should fail
#Dissociating non existent floating IP
try:
resp, body = \
@@ -164,10 +155,8 @@
@attr(type='positive')
def test_associate_already_associated_floating_ip(self):
- """
- positive test:Association of an already associated floating IP
- to specific server should change the association of the Floating IP
- """
+ # positive test:Association of an already associated floating IP
+ # to specific server should change the association of the Floating IP
#Create server so as to use for Multiple association
resp, body = self.servers_client.create_server('floating-server2',
self.image_ref,
@@ -205,10 +194,8 @@
@attr(type='negative')
def test_associate_ip_to_server_without_passing_floating_ip(self):
- """
- Negative test:Association of empty floating IP to specific server
- should raise NotFound exception
- """
+ # Negative test:Association of empty floating IP to specific server
+ # should raise NotFound exception
try:
resp, body =\
self.client.associate_floating_ip_to_server('',
diff --git a/tempest/tests/compute/floating_ips/test_list_floating_ips.py b/tempest/tests/compute/floating_ips/test_list_floating_ips.py
index 6f74f74..9eec27c 100644
--- a/tempest/tests/compute/floating_ips/test_list_floating_ips.py
+++ b/tempest/tests/compute/floating_ips/test_list_floating_ips.py
@@ -43,7 +43,7 @@
@attr(type='positive')
def test_list_floating_ips(self):
- """Positive test:Should return the list of floating IPs"""
+ # Positive test:Should return the list of floating IPs
resp, body = self.client.list_floating_ips()
self.assertEqual(200, resp.status)
floating_ips = body
@@ -54,7 +54,7 @@
@attr(type='positive')
def test_get_floating_ip_details(self):
- """Positive test:Should be able to GET the details of floatingIP"""
+ # Positive test:Should be able to GET the details of floatingIP
#Creating a floating IP for which details are to be checked
try:
resp, body = self.client.create_floating_ip()
@@ -78,10 +78,8 @@
@attr(type='negative')
def test_get_nonexistant_floating_ip_details(self):
- """
- Negative test:Should not be able to GET the details
- of nonexistant floating IP
- """
+ # Negative test:Should not be able to GET the details
+ # of nonexistant floating IP
floating_ip_id = []
resp, body = self.client.list_floating_ips()
for i in range(len(body)):
diff --git a/tempest/tests/compute/images/test_image_metadata.py b/tempest/tests/compute/images/test_image_metadata.py
index 1ac7de7..cdf4249 100644
--- a/tempest/tests/compute/images/test_image_metadata.py
+++ b/tempest/tests/compute/images/test_image_metadata.py
@@ -58,13 +58,13 @@
self.assertEqual(resp.status, 200)
def test_list_image_metadata(self):
- """All metadata key/value pairs for an image should be returned"""
+ # All metadata key/value pairs for an image should be returned
resp, resp_metadata = self.client.list_image_metadata(self.image_id)
expected = {'key1': 'value1', 'key2': 'value2'}
self.assertEqual(expected, resp_metadata)
def test_set_image_metadata(self):
- """The metadata for the image should match the new values"""
+ # The metadata for the image should match the new values
req_metadata = {'meta2': 'value2', 'meta3': 'value3'}
resp, body = self.client.set_image_metadata(self.image_id,
req_metadata)
@@ -73,7 +73,7 @@
self.assertEqual(req_metadata, resp_metadata)
def test_update_image_metadata(self):
- """The metadata for the image should match the updated values"""
+ # The metadata for the image should match the updated values
req_metadata = {'key1': 'alt1', 'key3': 'value3'}
resp, metadata = self.client.update_image_metadata(self.image_id,
req_metadata)
@@ -83,15 +83,14 @@
self.assertEqual(expected, resp_metadata)
def test_get_image_metadata_item(self):
- """The value for a specific metadata key should be returned"""
+ # The value for a specific metadata key should be returned
resp, meta = self.client.get_image_metadata_item(self.image_id,
'key2')
self.assertTrue('value2', meta['key2'])
def test_set_image_metadata_item(self):
- """
- The value provided for the given meta item should be set for the image
- """
+ # The value provided for the given meta item should be set for
+ # the image
meta = {'key1': 'alt'}
resp, body = self.client.set_image_metadata_item(self.image_id,
'key1', meta)
@@ -100,7 +99,7 @@
self.assertEqual(expected, resp_metadata)
def test_delete_image_metadata_item(self):
- """The metadata value/key pair should be deleted from the image"""
+ # The metadata value/key pair should be deleted from the image
resp, body = self.client.delete_image_metadata_item(self.image_id,
'key1')
resp, resp_metadata = self.client.list_image_metadata(self.image_id)
@@ -109,8 +108,8 @@
@attr(type='negative')
def test_list_nonexistant_image_metadata(self):
- """Negative test: List on nonexistant image
- metadata should not happen"""
+ # Negative test: List on nonexistant image
+ # metadata should not happen
try:
resp, resp_metadata = self.client.list_image_metadata(999)
except exceptions.NotFound:
@@ -121,7 +120,7 @@
@attr(type='negative')
def test_update_nonexistant_image_metadata(self):
- """Negative test:An update should not happen for a nonexistant image"""
+ # Negative test:An update should not happen for a nonexistant image
meta = {'key1': 'alt1', 'key2': 'alt2'}
try:
resp, metadata = self.client.update_image_metadata(999, meta)
@@ -132,7 +131,7 @@
@attr(type='negative')
def test_get_nonexistant_image_metadata_item(self):
- """Negative test: Get on nonexistant image should not happen"""
+ # Negative test: Get on nonexistant image should not happen
try:
resp, metadata = self.client.get_image_metadata_item(999, 'key2')
except exceptions.NotFound:
@@ -142,7 +141,7 @@
@attr(type='negative')
def test_set_nonexistant_image_metadata(self):
- """Negative test: Metadata should not be set to a nonexistant image"""
+ # Negative test: Metadata should not be set to a nonexistant image
meta = {'key1': 'alt1', 'key2': 'alt2'}
try:
resp, meta = self.client.set_image_metadata(999, meta)
@@ -153,8 +152,8 @@
@attr(type='negative')
def test_set_nonexistant_image_metadata_item(self):
- """Negative test: Metadata item should not be set to a
- nonexistant image"""
+ # Negative test: Metadata item should not be set to a
+ # nonexistant image
meta = {'key1': 'alt'}
try:
resp, body = self.client.set_image_metadata_item(999, 'key1', meta)
@@ -166,8 +165,8 @@
@attr(type='negative')
def test_delete_nonexistant_image_metadata_item(self):
- """Negative test: Shouldnt be able to delete metadata
- item from nonexistant image"""
+ # Negative test: Shouldnt be able to delete metadata
+ # item from nonexistant image
try:
resp, body = self.client.delete_image_metadata_item(999, 'key1')
resp, metadata = self.client.list_image_metadata(999)
diff --git a/tempest/tests/compute/images/test_images.py b/tempest/tests/compute/images/test_images.py
index 5c07626..46c8eee 100644
--- a/tempest/tests/compute/images/test_images.py
+++ b/tempest/tests/compute/images/test_images.py
@@ -46,7 +46,7 @@
@unittest.skipUnless(compute.CREATE_IMAGE_ENABLED,
'Environment unable to create images.')
def test_create_delete_image(self):
- """An image for the provided server should be created"""
+ # An image for the provided server should be created
server_name = rand_name('server')
resp, server = self.servers_client.create_server(server_name,
self.image_ref,
@@ -77,7 +77,7 @@
@attr(type='negative')
def test_create_image_from_deleted_server(self):
- """An image should not be created if the server instance is removed """
+ # An image should not be created if the server instance is removed
server_name = rand_name('server')
resp, server = self.servers_client.create_server(server_name,
self.image_ref,
@@ -105,7 +105,7 @@
@attr(type='negative')
def test_create_image_from_invalid_server(self):
- """An image should not be created with invalid server id"""
+ # An image should not be created with invalid server id
try:
# Create a new image with invalid server id
name = rand_name('image')
@@ -127,7 +127,7 @@
@attr(type='negative')
@unittest.skipUnless(compute.MULTI_USER, 'Second user not configured')
def test_create_image_for_server_in_another_tenant(self):
- """Creating image of another tenant's server should be return error"""
+ # Creating image of another tenant's server should be return error
server = self.create_server()
snapshot_name = rand_name('test-snap-')
@@ -136,7 +136,7 @@
@attr(type='negative')
def test_create_image_when_server_is_building(self):
- """Return error when creating an image of a server that is building"""
+ # Return error when creating an image of a server that is building
server_name = rand_name('test-vm-')
resp, server = self.servers_client.create_server(server_name,
self.image_ref,
@@ -149,7 +149,7 @@
@unittest.skip("Until Bug 1039739 is fixed")
@attr(type='negative')
def test_create_image_when_server_is_rebooting(self):
- """Return error when creating an image of server that is rebooting"""
+ # Return error when creating an image of server that is rebooting
server = self.create_server()
self.servers_client.reboot(server['id'], 'HARD')
@@ -159,7 +159,7 @@
@attr(type='negative')
def test_create_image_when_server_is_terminating(self):
- """Return an error when creating image of server that is terminating"""
+ # Return an error when creating image of server that is terminating
server = self.create_server()
self.servers_client.delete_server(server['id'])
@@ -169,7 +169,7 @@
@attr(type='negative')
def test_create_second_image_when_first_image_is_being_saved(self):
- """Disallow creating another image when first image is being saved"""
+ # Disallow creating another image when first image is being saved
server = self.create_server()
try:
@@ -192,7 +192,7 @@
@attr(type='negative')
@unittest.skip("Until Bug 1004564 is fixed")
def test_create_image_specify_name_over_256_chars(self):
- """Return an error if snapshot name over 256 characters is passed"""
+ # Return an error if snapshot name over 256 characters is passed
server = self.create_server()
try:
@@ -205,7 +205,7 @@
@attr(type='negative')
def test_create_image_specify_uuid_35_characters_or_less(self):
- """Return an error if Image ID passed is 35 characters or less"""
+ # Return an error if Image ID passed is 35 characters or less
try:
snapshot_name = rand_name('test-snap-')
test_uuid = ('a' * 35)
@@ -217,7 +217,7 @@
@attr(type='negative')
def test_create_image_specify_uuid_37_characters_or_more(self):
- """Return an error if Image ID passed is 37 characters or more"""
+ # Return an error if Image ID passed is 37 characters or more
try:
snapshot_name = rand_name('test-snap-')
test_uuid = ('a' * 37)
@@ -230,7 +230,7 @@
@attr(type='negative')
@unittest.skip("Until Bug 1006725 is fixed")
def test_create_image_specify_multibyte_character_image_name(self):
- """Return an error if the image name has multi-byte characters"""
+ # Return an error if the image name has multi-byte characters
server = self.create_server()
try:
@@ -245,7 +245,7 @@
@attr(type='negative')
@unittest.skip("Until Bug 1005423 is fixed")
def test_create_image_specify_invalid_metadata(self):
- """Return an error when creating image with invalid metadata"""
+ # Return an error when creating image with invalid metadata
server = self.create_server()
try:
@@ -260,7 +260,7 @@
@attr(type='negative')
@unittest.skip("Until Bug 1005423 is fixed")
def test_create_image_specify_metadata_over_limits(self):
- """Return an error when creating image with meta data over 256 chars"""
+ # Return an error when creating image with meta data over 256 chars
server = self.create_server()
try:
@@ -274,7 +274,7 @@
@attr(type='negative')
def test_delete_image_with_invalid_image_id(self):
- """An image should not be deleted with invalid image id"""
+ # An image should not be deleted with invalid image id
try:
# Delete an image with invalid image id
resp, _ = self.client.delete_image('!@$%^&*()')
@@ -288,7 +288,7 @@
@attr(type='negative')
def test_delete_non_existent_image(self):
- """Return an error while trying to delete a non-existent image"""
+ # Return an error while trying to delete a non-existent image
non_existent_image_id = '11a22b9-12a9-5555-cc11-00ab112223fa'
self.assertRaises(exceptions.NotFound, self.client.delete_image,
@@ -296,7 +296,7 @@
@attr(type='negative')
def test_delete_image_blank_id(self):
- """Return an error while trying to delete an image with blank Id"""
+ # Return an error while trying to delete an image with blank Id
try:
self.assertRaises(exceptions.NotFound, self.client.delete_image,
@@ -306,7 +306,7 @@
@attr(type='negative')
def test_delete_image_non_hex_string_id(self):
- """Return an error while trying to delete an image with non hex id"""
+ # Return an error while trying to delete an image with non hex id
image_id = '11a22b9-120q-5555-cc11-00ab112223gj'
try:
@@ -317,7 +317,7 @@
@attr(type='negative')
def test_delete_image_negative_image_id(self):
- """Return an error while trying to delete an image with negative id"""
+ # Return an error while trying to delete an image with negative id
try:
self.assertRaises(exceptions.NotFound, self.client.delete_image,
@@ -327,7 +327,7 @@
@attr(type='negative')
def test_delete_image_id_is_over_35_character_limit(self):
- """Return an error while trying to delete image with id over limit"""
+ # Return an error while trying to delete image with id over limit
try:
self.assertRaises(exceptions.NotFound, self.client.delete_image,
@@ -339,7 +339,7 @@
@attr(type='negative')
@unittest.skipUnless(compute.MULTI_USER, 'Second user not configured')
def test_delete_image_of_another_tenant(self):
- """Return an error while trying to delete another tenant's image"""
+ # Return an error while trying to delete another tenant's image
server = self.create_server()
@@ -356,7 +356,7 @@
@attr(type='negative')
def test_delete_image_that_is_not_yet_active(self):
- """Return an error while trying to delete an active that is creating"""
+ # Return an error while trying to delete an active that is creating
server = self.create_server()
diff --git a/tempest/tests/compute/images/test_images_whitebox.py b/tempest/tests/compute/images/test_images_whitebox.py
index c2a5b05..f409970 100644
--- a/tempest/tests/compute/images/test_images_whitebox.py
+++ b/tempest/tests/compute/images/test_images_whitebox.py
@@ -80,89 +80,89 @@
self.update_state(self.shared_server['id'], 'active', None)
def test_create_image_when_vm_eq_building_task_eq_scheduling(self):
- """409 error when instance states are building,scheduling"""
+ # 409 error when instance states are building,scheduling
self._test_create_image_409_base("building", "scheduling")
def test_create_image_when_vm_eq_building_task_eq_networking(self):
- """409 error when instance states are building,networking"""
+ # 409 error when instance states are building,networking
self._test_create_image_409_base("building", "networking")
def test_create_image_when_vm_eq_building_task_eq_bdm(self):
- """409 error when instance states are building,block_device_mapping"""
+ # 409 error when instance states are building,block_device_mapping
self._test_create_image_409_base("building", "block_device_mapping")
def test_create_image_when_vm_eq_building_task_eq_spawning(self):
- """409 error when instance states are building,spawning"""
+ # 409 error when instance states are building,spawning
self._test_create_image_409_base("building", "spawning")
def test_create_image_when_vm_eq_active_task_eq_image_backup(self):
- """409 error when instance states are active,image_backup"""
+ # 409 error when instance states are active,image_backup
self._test_create_image_409_base("active", "image_backup")
def test_create_image_when_vm_eq_resized_task_eq_resize_prep(self):
- """409 error when instance states are resized,resize_prep"""
+ # 409 error when instance states are resized,resize_prep
self._test_create_image_409_base("resized", "resize_prep")
def test_create_image_when_vm_eq_resized_task_eq_resize_migrating(self):
- """409 error when instance states are resized,resize_migrating"""
+ # 409 error when instance states are resized,resize_migrating
self._test_create_image_409_base("resized", "resize_migrating")
def test_create_image_when_vm_eq_resized_task_eq_resize_migrated(self):
- """409 error when instance states are resized,resize_migrated"""
+ # 409 error when instance states are resized,resize_migrated
self._test_create_image_409_base("resized", "resize_migrated")
def test_create_image_when_vm_eq_resized_task_eq_resize_finish(self):
- """409 error when instance states are resized,resize_finish"""
+ # 409 error when instance states are resized,resize_finish
self._test_create_image_409_base("resized", "resize_finish")
def test_create_image_when_vm_eq_resized_task_eq_resize_reverting(self):
- """409 error when instance states are resized,resize_reverting"""
+ # 409 error when instance states are resized,resize_reverting
self._test_create_image_409_base("resized", "resize_reverting")
def test_create_image_when_vm_eq_resized_task_eq_resize_confirming(self):
- """409 error when instance states are resized,resize_confirming"""
+ # 409 error when instance states are resized,resize_confirming
self._test_create_image_409_base("resized", "resize_confirming")
def test_create_image_when_vm_eq_active_task_eq_resize_verify(self):
- """409 error when instance states are active,resize_verify"""
+ # 409 error when instance states are active,resize_verify
self._test_create_image_409_base("active", "resize_verify")
def test_create_image_when_vm_eq_active_task_eq_updating_password(self):
- """409 error when instance states are active,updating_password"""
+ # 409 error when instance states are active,updating_password
self._test_create_image_409_base("active", "updating_password")
def test_create_image_when_vm_eq_active_task_eq_rebuilding(self):
- """409 error when instance states are active,rebuilding"""
+ # 409 error when instance states are active,rebuilding
self._test_create_image_409_base("active", "rebuilding")
def test_create_image_when_vm_eq_active_task_eq_rebooting(self):
- """409 error when instance states are active,rebooting"""
+ # 409 error when instance states are active,rebooting
self._test_create_image_409_base("active", "rebooting")
def test_create_image_when_vm_eq_building_task_eq_deleting(self):
- """409 error when instance states are building,deleting"""
+ # 409 error when instance states are building,deleting
self._test_create_image_409_base("building", "deleting")
def test_create_image_when_vm_eq_active_task_eq_deleting(self):
- """409 error when instance states are active,deleting"""
+ # 409 error when instance states are active,deleting
self._test_create_image_409_base("active", "deleting")
def test_create_image_when_vm_eq_error_task_eq_building(self):
- """409 error when instance states are error,building"""
+ # 409 error when instance states are error,building
self._test_create_image_409_base("error", "building")
def test_create_image_when_vm_eq_error_task_eq_none(self):
- """409 error when instance states are error,None"""
+ # 409 error when instance states are error,None
self._test_create_image_409_base("error", None)
def test_create_image_when_vm_eq_deleted_task_eq_none(self):
- """409 error when instance states are deleted,None"""
+ # 409 error when instance states are deleted,None
self._test_create_image_409_base("deleted", None)
def test_create_image_when_vm_eq_resized_task_eq_none(self):
- """409 error when instance states are resized,None"""
+ # 409 error when instance states are resized,None
self._test_create_image_409_base("resized", None)
def test_create_image_when_vm_eq_error_task_eq_resize_prep(self):
- """409 error when instance states are error,resize_prep"""
+ # 409 error when instance states are error,resize_prep
self._test_create_image_409_base("error", "resize_prep")
diff --git a/tempest/tests/compute/images/test_list_image_filters.py b/tempest/tests/compute/images/test_list_image_filters.py
index fd19369..26119e3 100644
--- a/tempest/tests/compute/images/test_list_image_filters.py
+++ b/tempest/tests/compute/images/test_list_image_filters.py
@@ -77,15 +77,14 @@
@attr(type='negative')
def test_get_image_not_existing(self):
- """Check raises a NotFound"""
+ # Check raises a NotFound
self.assertRaises(exceptions.NotFound, self.client.get_image,
"nonexistingimageid")
@attr(type='positive')
def test_list_images_filter_by_status(self):
- """
- The list of images should contain only images with the provided status
- """
+ # The list of images should contain only images with the
+ # provided status
params = {'status': 'ACTIVE'}
resp, images = self.client.list_images(params)
@@ -95,9 +94,8 @@
@attr(type='positive')
def test_list_images_filter_by_name(self):
- """
- List of all images should contain the expected images filtered by name
- """
+ # List of all images should contain the expected images filtered
+ # by name
params = {'name': self.image1['name']}
resp, images = self.client.list_images(params)
@@ -107,7 +105,7 @@
@attr(type='positive')
def test_list_images_filter_by_server_id(self):
- """The images should contain images filtered by server id"""
+ # The images should contain images filtered by server id
params = {'server': self.server1['id']}
resp, images = self.client.list_images(params)
@@ -119,7 +117,7 @@
@attr(type='positive')
def test_list_images_filter_by_server_ref(self):
- """The list of servers should be filtered by server ref"""
+ # The list of servers should be filtered by server ref
server_links = self.server2['links']
# Try all server link types
@@ -136,7 +134,7 @@
@attr(type='positive')
def test_list_images_filter_by_type(self):
- """The list of servers should be filtered by image type"""
+ # The list of servers should be filtered by image type
params = {'type': 'snapshot'}
resp, images = self.client.list_images(params)
@@ -147,14 +145,14 @@
@attr(type='positive')
def test_list_images_limit_results(self):
- """Verify only the expected number of results are returned"""
+ # Verify only the expected number of results are returned
params = {'limit': '1'}
resp, images = self.client.list_images(params)
self.assertEqual(1, len(images))
@attr(type='positive')
def test_list_images_filter_by_changes_since(self):
- """Verify only updated images are returned in the detailed list"""
+ # Verify only updated images are returned in the detailed list
#Becoming ACTIVE will modify the updated time
#Filter by the image's created time
@@ -165,10 +163,8 @@
@attr(type='positive')
def test_list_images_with_detail_filter_by_status(self):
- """
- Detailed list of all images should only contain images
- with the provided status
- """
+ # Detailed list of all images should only contain images
+ # with the provided status
params = {'status': 'ACTIVE'}
resp, images = self.client.list_images_with_detail(params)
@@ -178,10 +174,8 @@
@attr(type='positive')
def test_list_images_with_detail_filter_by_name(self):
- """
- Detailed list of all images should contain the expected
- images filtered by name
- """
+ # Detailed list of all images should contain the expected
+ # images filtered by name
params = {'name': self.image1['name']}
resp, images = self.client.list_images_with_detail(params)
@@ -191,17 +185,15 @@
@attr(type='positive')
def test_list_images_with_detail_limit_results(self):
- """
- Verify only the expected number of results (with full details)
- are returned
- """
+ # Verify only the expected number of results (with full details)
+ # are returned
params = {'limit': '1'}
resp, images = self.client.list_images_with_detail(params)
self.assertEqual(1, len(images))
@attr(type='positive')
def test_list_images_with_detail_filter_by_server_ref(self):
- """Detailed list of servers should be filtered by server ref"""
+ # Detailed list of servers should be filtered by server ref
server_links = self.server2['links']
# Try all server link types
@@ -218,7 +210,7 @@
@attr(type='positive')
def test_list_images_with_detail_filter_by_type(self):
- """The detailed list of servers should be filtered by image type"""
+ # The detailed list of servers should be filtered by image type
params = {'type': 'snapshot'}
resp, images = self.client.list_images_with_detail(params)
resp, image4 = self.client.get_image(self.image_ref)
@@ -230,7 +222,7 @@
@attr(type='positive')
def test_list_images_with_detail_filter_by_changes_since(self):
- """Verify an update image is returned"""
+ # Verify an update image is returned
#Becoming ACTIVE will modify the updated time
#Filter by the image's created time
@@ -240,7 +232,7 @@
@attr(type='negative')
def test_get_nonexistant_image(self):
- """Negative test: GET on non existant image should fail"""
+ # Negative test: GET on non existant image should fail
try:
resp, image = self.client.get_image(999)
except Exception:
diff --git a/tempest/tests/compute/images/test_list_images.py b/tempest/tests/compute/images/test_list_images.py
index 838c3a3..da92ca8 100644
--- a/tempest/tests/compute/images/test_list_images.py
+++ b/tempest/tests/compute/images/test_list_images.py
@@ -36,20 +36,20 @@
@attr(type='smoke')
def test_get_image(self):
- """Returns the correct details for a single image"""
+ # Returns the correct details for a single image
resp, image = self.client.get_image(self.image_ref)
self.assertEqual(self.image_ref, image['id'])
@attr(type='smoke')
def test_list_images(self):
- """The list of all images should contain the image"""
+ # The list of all images should contain the image
resp, images = self.client.list_images()
found = any([i for i in images if i['id'] == self.image_ref])
self.assertTrue(found)
@attr(type='smoke')
def test_list_images_with_detail(self):
- """Detailed list of all images should contain the expected images"""
+ # Detailed list of all images should contain the expected images
resp, images = self.client.list_images_with_detail()
found = any([i for i in images if i['id'] == self.image_ref])
self.assertTrue(found)
diff --git a/tempest/tests/compute/keypairs/test_keypairs.py b/tempest/tests/compute/keypairs/test_keypairs.py
index 447d965..7d95a9b 100644
--- a/tempest/tests/compute/keypairs/test_keypairs.py
+++ b/tempest/tests/compute/keypairs/test_keypairs.py
@@ -28,7 +28,7 @@
@attr(type='positive')
def test_keypairs_create_list_delete(self):
- """Keypairs created should be available in the response list"""
+ # Keypairs created should be available in the response list
#Create 3 keypairs
key_list = list()
for i in range(3):
@@ -62,7 +62,7 @@
@attr(type='positive')
def test_keypair_create_delete(self):
- """Keypair should be created, verified and deleted"""
+ # Keypair should be created, verified and deleted
k_name = rand_name('keypair-')
resp, keypair = self.client.create_keypair(k_name)
self.assertEqual(200, resp.status)
@@ -79,7 +79,7 @@
@attr(type='positive')
@unittest.skip("Skipped until the Bug #980688 is resolved")
def test_get_keypair_detail(self):
- """Keypair should be created, Got details by name and deleted"""
+ # Keypair should be created, Got details by name and deleted
k_name = rand_name('keypair-')
resp, keypair = self.client.create_keypair(k_name)
try:
@@ -102,7 +102,7 @@
@attr(type='positive')
def test_keypair_create_with_pub_key(self):
- """Keypair should be created with a given public key"""
+ # Keypair should be created with a given public key
k_name = rand_name('keypair-')
pub_key = ("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs"
"Ne3/1ILNCqFyfYWDeTKLD6jEXC2OQHLmietMWW+/vd"
@@ -126,7 +126,7 @@
@attr(type='negative')
def test_keypair_create_with_invalid_pub_key(self):
- """Keypair should not be created with a non RSA public key"""
+ # Keypair should not be created with a non RSA public key
k_name = rand_name('keypair-')
pub_key = "ssh-rsa JUNK nova@ubuntu"
try:
@@ -139,7 +139,7 @@
@attr(type='negative')
@unittest.skip("Skipped until the Bug #1086980 is resolved")
def test_keypair_delete_nonexistant_key(self):
- """Non-existant key deletion should throw a proper error"""
+ # Non-existant key deletion should throw a proper error
k_name = rand_name("keypair-non-existant-")
try:
resp, _ = self.client.delete_keypair(k_name)
@@ -150,7 +150,7 @@
@attr(type='negative')
def test_create_keypair_with_empty_public_key(self):
- """Keypair should not be created with an empty public key"""
+ # Keypair should not be created with an empty public key
k_name = rand_name("keypair-")
pub_key = ' '
try:
@@ -162,7 +162,7 @@
@attr(type='negative')
def test_create_keypair_when_public_key_bits_exceeds_maximum(self):
- """Keypair should not be created when public key bits are too long"""
+ # Keypair should not be created when public key bits are too long
k_name = rand_name("keypair-")
pub_key = 'ssh-rsa ' + 'A' * 2048 + ' openstack@ubuntu'
try:
@@ -174,7 +174,7 @@
@attr(type='negative')
def test_create_keypair_with_duplicate_name(self):
- """Keypairs with duplicate names should not be created"""
+ # Keypairs with duplicate names should not be created
k_name = rand_name('keypair-')
resp, _ = self.client.create_keypair(k_name)
self.assertEqual(200, resp.status)
@@ -191,7 +191,7 @@
@attr(type='negative')
def test_create_keypair_with_empty_name_string(self):
- """Keypairs with name being an empty string should not be created"""
+ # Keypairs with name being an empty string should not be created
try:
resp, _ = self.client.create_keypair('')
except exceptions.BadRequest:
@@ -201,7 +201,7 @@
@attr(type='negative')
def test_create_keypair_with_long_keynames(self):
- """Keypairs with name longer than 255 chars should not be created"""
+ # Keypairs with name longer than 255 chars should not be created
k_name = 'keypair-'.ljust(260, '0')
try:
resp, _ = self.client.create_keypair(k_name)
@@ -212,7 +212,7 @@
@attr(type='negative')
def test_create_keypair_invalid_name(self):
- """Keypairs with name being an invalid name should not be created"""
+ # Keypairs with name being an invalid name should not be created
k_name = 'key_/.\@:'
try:
resp, _ = self.client.create_keypair(k_name)
diff --git a/tempest/tests/compute/limits/test_absolute_limits.py b/tempest/tests/compute/limits/test_absolute_limits.py
index ede0dc2..89c5b25 100644
--- a/tempest/tests/compute/limits/test_absolute_limits.py
+++ b/tempest/tests/compute/limits/test_absolute_limits.py
@@ -28,9 +28,7 @@
@unittest.skip("Skipped until the Bug #1025294 is resolved")
def test_absLimits_get(self):
- """
- To check if all limits are present in the response
- """
+ # To check if all limits are present in the response
resp, absolute_limits = self.client.get_absolute_limits()
expected_elements = ['maxImageMeta', 'maxPersonality',
'maxPersonalitySize',
diff --git a/tempest/tests/compute/security_groups/test_security_group_rules.py b/tempest/tests/compute/security_groups/test_security_group_rules.py
index ab5af92..fdf2892 100644
--- a/tempest/tests/compute/security_groups/test_security_group_rules.py
+++ b/tempest/tests/compute/security_groups/test_security_group_rules.py
@@ -30,10 +30,8 @@
@attr(type='positive')
def test_security_group_rules_create(self):
- """
- Positive test: Creation of Security Group rule
- should be successfull
- """
+ # Positive test: Creation of Security Group rule
+ # should be successfull
try:
#Creating a Security Group to add rules to it
s_name = rand_name('securitygroup-')
@@ -108,10 +106,8 @@
@attr(type='positive')
def test_security_group_rules_create_delete(self):
- """
- Positive test: Deletion of Security Group rule
- should be successfull
- """
+ # Positive test: Deletion of Security Group rule
+ # should be successfull
try:
#Creating a Security Group to add rule to it
s_name = rand_name('securitygroup-')
@@ -137,10 +133,8 @@
@attr(type='negative')
def test_security_group_rules_create_with_invalid_id(self):
- """
- Negative test: Creation of Security Group rule should FAIL
- with invalid Parent group id
- """
+ # Negative test: Creation of Security Group rule should FAIL
+ # with invalid Parent group id
#Adding rules to the invalid Security Group id
parent_group_id = rand_name('999')
ip_protocol = 'tcp'
@@ -159,10 +153,8 @@
@attr(type='negative')
def test_security_group_rules_create_with_invalid_ip_protocol(self):
- """
- Negative test: Creation of Security Group rule should FAIL
- with invalid ip_protocol
- """
+ # Negative test: Creation of Security Group rule should FAIL
+ # with invalid ip_protocol
#Creating a Security Group to add rule to it
s_name = rand_name('securitygroup-')
s_description = rand_name('description-')
@@ -188,10 +180,8 @@
@attr(type='negative')
def test_security_group_rules_create_with_invalid_from_port(self):
- """
- Negative test: Creation of Security Group rule should FAIL
- with invalid from_port
- """
+ # Negative test: Creation of Security Group rule should FAIL
+ # with invalid from_port
#Creating a Security Group to add rule to it
s_name = rand_name('securitygroup-')
s_description = rand_name('description-')
@@ -217,10 +207,8 @@
@attr(type='negative')
def test_security_group_rules_create_with_invalid_to_port(self):
- """
- Negative test: Creation of Security Group rule should FAIL
- with invalid from_port
- """
+ # Negative test: Creation of Security Group rule should FAIL
+ # with invalid from_port
#Creating a Security Group to add rule to it
s_name = rand_name('securitygroup-')
s_description = rand_name('description-')
@@ -246,10 +234,8 @@
@attr(type='negative')
def test_security_group_rules_delete_with_invalid_id(self):
- """
- Negative test: Deletion of Security Group rule should be FAIL
- with invalid rule id
- """
+ # Negative test: Deletion of Security Group rule should be FAIL
+ # with invalid rule id
try:
self.client.delete_security_group_rule(rand_name('999'))
except exceptions.NotFound:
diff --git a/tempest/tests/compute/security_groups/test_security_groups.py b/tempest/tests/compute/security_groups/test_security_groups.py
index 1c0cc94..5c0bd82 100644
--- a/tempest/tests/compute/security_groups/test_security_groups.py
+++ b/tempest/tests/compute/security_groups/test_security_groups.py
@@ -30,7 +30,7 @@
@attr(type='positive')
def test_security_groups_create_list_delete(self):
- """Positive test:Should return the list of Security Groups"""
+ # Positive test:Should return the list of Security Groups
try:
#Create 3 Security Groups
security_group_list = list()
@@ -61,7 +61,7 @@
@attr(type='positive')
def test_security_group_create_delete(self):
- """Security Group should be created, verified and deleted"""
+ # Security Group should be created, verified and deleted
try:
s_name = rand_name('securitygroup-')
s_description = rand_name('description-')
@@ -83,7 +83,7 @@
@attr(type='positive')
def test_security_group_create_get_delete(self):
- """Security Group should be created, fetched and deleted"""
+ # Security Group should be created, fetched and deleted
try:
s_name = rand_name('securitygroup-')
s_description = rand_name('description-')
@@ -104,10 +104,8 @@
@attr(type='negative')
def test_security_group_get_nonexistant_group(self):
- """
- Negative test:Should not be able to GET the details
- of nonexistant Security Group
- """
+ # Negative test:Should not be able to GET the details
+ # of nonexistant Security Group
security_group_id = []
resp, body = self.client.list_security_groups()
for i in range(len(body)):
@@ -128,10 +126,8 @@
@attr(type='negative')
def test_security_group_create_with_invalid_group_name(self):
- """
- Negative test: Security Group should not be created with group name as
- an empty string/with white spaces/chars more than 255
- """
+ # Negative test: Security Group should not be created with group name
+ # as an empty string/with white spaces/chars more than 255
s_description = rand_name('description-')
#Create Security Group with empty string as group name
try:
@@ -161,10 +157,8 @@
@attr(type='negative')
def test_security_group_create_with_invalid_group_description(self):
- """
- Negative test:Security Group should not be created with description as
- an empty string/with white spaces/chars more than 255
- """
+ # Negative test:Security Group should not be created with description
+ # as an empty string/with white spaces/chars more than 255
s_name = rand_name('securitygroup-')
#Create Security Group with empty string as description
try:
@@ -194,10 +188,8 @@
@attr(type='negative')
def test_security_group_create_with_duplicate_name(self):
- """
- Negative test:Security Group with duplicate name should not
- be created
- """
+ # Negative test:Security Group with duplicate name should not
+ # be created
try:
s_name = rand_name('securitygroup-')
s_description = rand_name('description-')
@@ -220,9 +212,7 @@
@attr(type='negative')
def test_delete_nonexistant_security_group(self):
- """
- Negative test:Deletion of a nonexistant Security Group should Fail
- """
+ # Negative test:Deletion of a nonexistant Security Group should Fail
security_group_id = []
resp, body = self.client.list_security_groups()
for i in range(len(body)):
@@ -242,10 +232,8 @@
@attr(type='negative')
def test_delete_security_group_without_passing_id(self):
- """
- Negative test:Deletion of a Security Group with out passing ID
- should Fail
- """
+ # Negative test:Deletion of a Security Group with out passing ID
+ # should Fail
try:
resp, body = self.client.delete_security_group('')
except exceptions.NotFound:
@@ -255,10 +243,8 @@
'with out passing ID')
def test_server_security_groups(self):
- """
- Checks that security groups may be added and linked to a server
- and not deleted if the server is active.
- """
+ # Checks that security groups may be added and linked to a server
+ # and not deleted if the server is active.
# Create a couple security groups that we will use
# for the server resource this test creates
sg_name = rand_name('sg')
diff --git a/tempest/tests/compute/servers/test_console_output.py b/tempest/tests/compute/servers/test_console_output.py
index ce1047f..3ad29a1 100644
--- a/tempest/tests/compute/servers/test_console_output.py
+++ b/tempest/tests/compute/servers/test_console_output.py
@@ -43,10 +43,8 @@
@attr(type='positive')
def test_get_console_output(self):
- """
- Positive test:Should be able to GET the console output
- for a given server_id and number of lines
- """
+ # Positive test:Should be able to GET the console output
+ # for a given server_id and number of lines
def get_output():
resp, output = self.client.get_console_output(self.server_id, 10)
self.assertEqual(200, resp.status)
@@ -57,10 +55,8 @@
@attr(type='negative')
def test_get_console_output_invalid_server_id(self):
- """
- Negative test: Should not be able to get the console output
- for an invalid server_id
- """
+ # Negative test: Should not be able to get the console output
+ # for an invalid server_id
try:
resp, output = self.client.get_console_output('!@#$%^&*()', 10)
except exceptions.NotFound:
@@ -69,10 +65,8 @@
@attr(type='positive')
@unittest.skip('Until tempest bug 1014683 is fixed.')
def test_get_console_output_server_id_in_reboot_status(self):
- """
- Positive test:Should be able to GET the console output
- for a given server_id in reboot status
- """
+ # Positive test:Should be able to GET the console output
+ # for a given server_id in reboot status
try:
resp, output = self.servers_client.reboot(self.server_id, 'SOFT')
self.servers_client.wait_for_server_status(self.server_id,
diff --git a/tempest/tests/compute/servers/test_create_server.py b/tempest/tests/compute/servers/test_create_server.py
index 4fe4284..88ace2d 100644
--- a/tempest/tests/compute/servers/test_create_server.py
+++ b/tempest/tests/compute/servers/test_create_server.py
@@ -65,14 +65,14 @@
@attr(type='smoke')
def test_create_server_response(self):
- """Check that the required fields are returned with values"""
+ # Check that the required fields are returned with values
self.assertEqual(202, self.resp.status)
self.assertTrue(self.server_initial['id'] is not None)
self.assertTrue(self.server_initial['adminPass'] is not None)
@attr(type='smoke')
def test_verify_server_details(self):
- """Verify the specified server attributes are set correctly"""
+ # Verify the specified server attributes are set correctly
self.assertEqual(self.accessIPv4, self.server['accessIPv4'])
self.assertIn(self.server['accessIPv6'],
[self.accessIPv6, self.accessIPv6canon])
@@ -83,7 +83,7 @@
@attr(type='smoke')
def test_list_servers(self):
- """The created server should be in the list of all servers"""
+ # The created server should be in the list of all servers
resp, body = self.client.list_servers()
servers = body['servers']
found = any([i for i in servers if i['id'] == self.server['id']])
@@ -91,7 +91,7 @@
@attr(type='smoke')
def test_list_servers_with_detail(self):
- """The created server should be in the detailed list of all servers"""
+ # The created server should be in the detailed list of all servers
resp, body = self.client.list_servers_with_detail()
servers = body['servers']
found = any([i for i in servers if i['id'] == self.server['id']])
@@ -100,17 +100,15 @@
@attr(type='positive')
@unittest.skipIf(not run_ssh, 'Instance validation tests are disabled.')
def test_can_log_into_created_server(self):
- """Check that the user can authenticate with the generated password"""
+ # Check that the user can authenticate with the generated password
linux_client = RemoteClient(self.server, self.ssh_user, self.password)
self.assertTrue(linux_client.can_authenticate())
@attr(type='positive')
@unittest.skipIf(not run_ssh, 'Instance validation tests are disabled.')
def test_verify_created_server_vcpus(self):
- """
- Verify that the number of vcpus reported by the instance matches
- the amount stated by the flavor
- """
+ # Verify that the number of vcpus reported by the instance matches
+ # the amount stated by the flavor
resp, flavor = self.flavors_client.get_flavor_details(self.flavor_ref)
linux_client = RemoteClient(self.server, self.ssh_user, self.password)
self.assertEqual(flavor['vcpus'], linux_client.get_number_of_vcpus())
@@ -118,7 +116,7 @@
@attr(type='positive')
@unittest.skipIf(not run_ssh, 'Instance validation tests are disabled.')
def test_host_name_is_same_as_server_name(self):
- """Verify the instance host name is the same as the server name"""
+ # Verify the instance host name is the same as the server name
linux_client = RemoteClient(self.server, self.ssh_user, self.password)
self.assertTrue(linux_client.hostname_equals_servername(self.name))
diff --git a/tempest/tests/compute/servers/test_disk_config.py b/tempest/tests/compute/servers/test_disk_config.py
index 7ff666f..490156b 100644
--- a/tempest/tests/compute/servers/test_disk_config.py
+++ b/tempest/tests/compute/servers/test_disk_config.py
@@ -37,7 +37,7 @@
@attr(type='positive')
def test_rebuild_server_with_manual_disk_config(self):
- """A server should be rebuilt using the manual disk config option"""
+ # A server should be rebuilt using the manual disk config option
name = rand_name('server')
resp, server = self.create_server_with_extras(name,
self.image_ref,
@@ -67,7 +67,7 @@
@attr(type='positive')
def test_rebuild_server_with_auto_disk_config(self):
- """A server should be rebuilt using the auto disk config option"""
+ # A server should be rebuilt using the auto disk config option
name = rand_name('server')
resp, server = self.create_server_with_extras(name,
self.image_ref,
@@ -98,7 +98,7 @@
@attr(type='positive')
@unittest.skipUnless(compute.RESIZE_AVAILABLE, 'Resize not available.')
def test_resize_server_from_manual_to_auto(self):
- """A server should be resized from manual to auto disk config"""
+ # A server should be resized from manual to auto disk config
name = rand_name('server')
resp, server = self.create_server_with_extras(name,
self.image_ref,
@@ -124,7 +124,7 @@
@attr(type='positive')
@unittest.skipUnless(compute.RESIZE_AVAILABLE, 'Resize not available.')
def test_resize_server_from_auto_to_manual(self):
- """A server should be resized from auto to manual disk config"""
+ # A server should be resized from auto to manual disk config
name = rand_name('server')
resp, server = self.create_server_with_extras(name,
self.image_ref,
diff --git a/tempest/tests/compute/servers/test_list_server_filters.py b/tempest/tests/compute/servers/test_list_server_filters.py
index 3aeb8e8..5eea24f 100644
--- a/tempest/tests/compute/servers/test_list_server_filters.py
+++ b/tempest/tests/compute/servers/test_list_server_filters.py
@@ -94,7 +94,7 @@
@utils.skip_unless_attr('multiple_images', 'Only one image found')
@attr(type='positive')
def test_list_servers_filter_by_image(self):
- """Filter the list of servers by image"""
+ # Filter the list of servers by image
params = {'image': self.image_ref}
resp, body = self.client.list_servers(params)
servers = body['servers']
@@ -105,7 +105,7 @@
@attr(type='positive')
def test_list_servers_filter_by_flavor(self):
- """Filter the list of servers by flavor"""
+ # Filter the list of servers by flavor
params = {'flavor': self.flavor_ref_alt}
resp, body = self.client.list_servers(params)
servers = body['servers']
@@ -116,7 +116,7 @@
@attr(type='positive')
def test_list_servers_filter_by_server_name(self):
- """Filter the list of servers by server name"""
+ # Filter the list of servers by server name
params = {'name': self.s1_name}
resp, body = self.client.list_servers(params)
servers = body['servers']
@@ -127,7 +127,7 @@
@attr(type='positive')
def test_list_servers_filter_by_server_status(self):
- """Filter the list of servers by server status"""
+ # Filter the list of servers by server status
params = {'status': 'active'}
resp, body = self.client.list_servers(params)
servers = body['servers']
@@ -138,7 +138,7 @@
@attr(type='positive')
def test_list_servers_limit_results(self):
- """Verify only the expected number of servers are returned"""
+ # Verify only the expected number of servers are returned
params = {'limit': 1}
resp, servers = self.client.list_servers_with_detail(params)
self.assertEqual(1, len(servers['servers']))
@@ -146,7 +146,7 @@
@utils.skip_unless_attr('multiple_images', 'Only one image found')
@attr(type='positive')
def test_list_servers_detailed_filter_by_image(self):
- """Filter the detailed list of servers by image"""
+ # Filter the detailed list of servers by image
params = {'image': self.image_ref}
resp, body = self.client.list_servers_with_detail(params)
servers = body['servers']
@@ -157,7 +157,7 @@
@attr(type='positive')
def test_list_servers_detailed_filter_by_flavor(self):
- """Filter the detailed list of servers by flavor"""
+ # Filter the detailed list of servers by flavor
params = {'flavor': self.flavor_ref_alt}
resp, body = self.client.list_servers_with_detail(params)
servers = body['servers']
@@ -168,7 +168,7 @@
@attr(type='positive')
def test_list_servers_detailed_filter_by_server_name(self):
- """Filter the detailed list of servers by server name"""
+ # Filter the detailed list of servers by server name
params = {'name': self.s1_name}
resp, body = self.client.list_servers_with_detail(params)
servers = body['servers']
@@ -179,7 +179,7 @@
@attr(type='positive')
def test_list_servers_detailed_filter_by_server_status(self):
- """Filter the detailed list of servers by server status"""
+ # Filter the detailed list of servers by server status
params = {'status': 'active'}
resp, body = self.client.list_servers_with_detail(params)
servers = body['servers']
@@ -190,7 +190,7 @@
@attr(type='positive')
def test_list_servers_detailed_limit_results(self):
- """Verify only the expected number of detailed results are returned"""
+ # Verify only the expected number of detailed results are returned
params = {'limit': 1}
resp, servers = self.client.list_servers_with_detail(params)
self.assertEqual(1, len(servers['servers']))
diff --git a/tempest/tests/compute/servers/test_list_servers_negative.py b/tempest/tests/compute/servers/test_list_servers_negative.py
index dc6e339..e98d8f0 100644
--- a/tempest/tests/compute/servers/test_list_servers_negative.py
+++ b/tempest/tests/compute/servers/test_list_servers_negative.py
@@ -97,7 +97,7 @@
cls.deleted_fixtures.append(srv)
def test_list_servers_with_a_deleted_server(self):
- """Verify deleted servers do not show by default in list servers"""
+ # Verify deleted servers do not show by default in list servers
# List servers and verify server not returned
resp, body = self.client.list_servers()
servers = body['servers']
@@ -108,7 +108,7 @@
self.assertEqual([], actual)
def test_list_servers_by_non_existing_image(self):
- """Listing servers for a non existing image returns empty list"""
+ # Listing servers for a non existing image returns empty list
non_existing_image = '1234abcd-zzz0-aaa9-ppp3-0987654abcde'
resp, body = self.client.list_servers(dict(image=non_existing_image))
servers = body['servers']
@@ -116,7 +116,7 @@
self.assertEqual([], servers)
def test_list_servers_by_non_existing_flavor(self):
- """Listing servers by non existing flavor returns empty list"""
+ # Listing servers by non existing flavor returns empty list
non_existing_flavor = 1234
resp, body = self.client.list_servers(dict(flavor=non_existing_flavor))
servers = body['servers']
@@ -124,7 +124,7 @@
self.assertEqual([], servers)
def test_list_servers_by_non_existing_server_name(self):
- """Listing servers for a non existent server name returns empty list"""
+ # Listing servers for a non existent server name returns empty list
non_existing_name = 'junk_server_1234'
resp, body = self.client.list_servers(dict(name=non_existing_name))
servers = body['servers']
@@ -133,7 +133,7 @@
@unittest.skip("Skip until bug 1061712 is resolved")
def test_list_servers_status_non_existing(self):
- """Return an empty list when invalid status is specified"""
+ # Return an empty list when invalid status is specified
non_existing_status = 'BALONEY'
resp, body = self.client.list_servers(dict(status=non_existing_status))
servers = body['servers']
@@ -141,29 +141,29 @@
self.assertEqual([], servers)
def test_list_servers_by_limits(self):
- """List servers by specifying limits"""
+ # List servers by specifying limits
resp, body = self.client.list_servers({'limit': 1})
self.assertEqual('200', resp['status'])
self.assertEqual(1, len(body['servers']))
def test_list_servers_by_limits_greater_than_actual_count(self):
- """List servers by specifying a greater value for limit"""
+ # List servers by specifying a greater value for limit
resp, body = self.client.list_servers({'limit': 100})
self.assertEqual('200', resp['status'])
self.assertEqual(len(self.existing_fixtures), len(body['servers']))
def test_list_servers_by_limits_pass_string(self):
- """Return an error if a string value is passed for limit"""
+ # Return an error if a string value is passed for limit
self.assertRaises(exceptions.BadRequest, self.client.list_servers,
{'limit': 'testing'})
def test_list_servers_by_limits_pass_negative_value(self):
- """Return an error if a negative value for limit is passed"""
+ # Return an error if a negative value for limit is passed
self.assertRaises(exceptions.BadRequest, self.client.list_servers,
{'limit': -1})
def test_list_servers_by_changes_since(self):
- """Servers are listed by specifying changes-since date"""
+ # Servers are listed by specifying changes-since date
changes_since = {'changes-since': '2011-01-01T12:34:00Z'}
resp, body = self.client.list_servers(changes_since)
self.assertEqual('200', resp['status'])
@@ -173,19 +173,19 @@
self.assertEqual(num_expected, len(body['servers']))
def test_list_servers_by_changes_since_invalid_date(self):
- """Return an error when invalid date format is passed"""
+ # Return an error when invalid date format is passed
self.assertRaises(exceptions.BadRequest, self.client.list_servers,
{'changes-since': '2011/01/01'})
def test_list_servers_by_changes_since_future_date(self):
- """Return an empty list when a date in the future is passed"""
+ # Return an empty list when a date in the future is passed
changes_since = {'changes-since': '2051-01-01T12:34:00Z'}
resp, body = self.client.list_servers(changes_since)
self.assertEqual('200', resp['status'])
self.assertEqual(0, len(body['servers']))
def test_list_servers_detail_server_is_deleted(self):
- """Server details are not listed for a deleted server"""
+ # Server details are not listed for a deleted server
deleted_ids = [s['id'] for s in self.deleted_fixtures]
resp, body = self.client.list_servers_with_detail()
servers = body['servers']
diff --git a/tempest/tests/compute/servers/test_server_actions.py b/tempest/tests/compute/servers/test_server_actions.py
index df971e9..f4e62b1 100644
--- a/tempest/tests/compute/servers/test_server_actions.py
+++ b/tempest/tests/compute/servers/test_server_actions.py
@@ -50,7 +50,7 @@
@unittest.skipUnless(compute.CHANGE_PASSWORD_AVAILABLE,
'Change password not available.')
def test_change_server_password(self):
- """The server's password should be set to the provided password"""
+ # The server's password should be set to the provided password
new_password = 'Newpass1234'
resp, body = self.client.change_password(self.server_id, new_password)
self.assertEqual(202, resp.status)
@@ -64,7 +64,7 @@
@attr(type='smoke')
def test_reboot_server_hard(self):
- """ The server should be power cycled """
+ # The server should be power cycled
if self.run_ssh:
# Get the time the server was last rebooted,
# waiting for one minute as who doesn't have seconds precision
@@ -86,7 +86,7 @@
@attr(type='smoke')
@unittest.skip('Until bug 1014647 is dealt with.')
def test_reboot_server_soft(self):
- """The server should be signaled to reboot gracefully"""
+ # The server should be signaled to reboot gracefully
if self.run_ssh:
# Get the time the server was last rebooted,
# waiting for one minute as who doesn't have seconds precision
@@ -107,7 +107,7 @@
@attr(type='smoke')
def test_rebuild_server(self):
- """ The server should be rebuilt using the provided image and data """
+ # The server should be rebuilt using the provided image and data
meta = {'rebuild': 'server'}
new_name = rand_name('server')
file_contents = 'Test server rebuild.'
@@ -141,10 +141,8 @@
@attr(type='smoke')
@unittest.skipIf(not resize_available, 'Resize not available.')
def test_resize_server_confirm(self):
- """
- The server's RAM and disk space should be modified to that of
- the provided flavor
- """
+ # The server's RAM and disk space should be modified to that of
+ # the provided flavor
resp, server = self.client.resize(self.server_id, self.flavor_ref_alt)
self.assertEqual(202, resp.status)
@@ -159,10 +157,8 @@
@attr(type='positive')
@unittest.skipIf(not resize_available, 'Resize not available.')
def test_resize_server_revert(self):
- """
- The server's RAM and disk space should return to its original
- values after a resize is reverted
- """
+ # The server's RAM and disk space should return to its original
+ # values after a resize is reverted
resp, server = self.client.resize(self.server_id, self.flavor_ref_alt)
self.assertEqual(202, resp.status)
@@ -186,18 +182,14 @@
@attr(type='negative')
def test_reboot_nonexistent_server_soft(self):
- """
- Negative Test: The server reboot on non existent server should return
- an error
- """
+ # Negative Test: The server reboot on non existent server should return
+ # an error
self.assertRaises(exceptions.NotFound, self.client.reboot, 999, 'SOFT')
@attr(type='negative')
def test_rebuild_nonexistent_server(self):
- """
- Negative test: The server rebuild for a non existing server should not
- be allowed
- """
+ # Negative test: The server rebuild for a non existing server
+ # should not be allowed
meta = {'rebuild': 'server'}
new_name = rand_name('server')
file_contents = 'Test server rebuild.'
diff --git a/tempest/tests/compute/servers/test_server_addresses.py b/tempest/tests/compute/servers/test_server_addresses.py
index 745a9d8..6e819a2 100644
--- a/tempest/tests/compute/servers/test_server_addresses.py
+++ b/tempest/tests/compute/servers/test_server_addresses.py
@@ -42,7 +42,7 @@
@attr(type='negative', category='server-addresses')
def test_list_server_addresses_invalid_server_id(self):
- """List addresses request should fail if server id not in system"""
+ # List addresses request should fail if server id not in system
try:
self.client.list_addresses('999')
@@ -54,7 +54,7 @@
@attr(type='negative', category='server-addresses')
def test_list_server_addresses_by_network_neg(self):
- """List addresses by network should fail if network name not valid"""
+ # List addresses by network should fail if network name not valid
try:
self.client.list_addresses_by_network(self.server['id'], 'invalid')
@@ -66,8 +66,8 @@
@attr(type='smoke', category='server-addresses')
def test_list_server_addresses(self):
- """All public and private addresses for
- a server should be returned"""
+ # All public and private addresses for
+ # a server should be returned
resp, addresses = self.client.list_addresses(self.server['id'])
self.assertEqual('200', resp['status'])
@@ -83,8 +83,8 @@
@attr(type='smoke', category='server-addresses')
def test_list_server_addresses_by_network(self):
- """Providing a network type should filter
- the addresses return by that type"""
+ # Providing a network type should filter
+ # the addresses return by that type
resp, addresses = self.client.list_addresses(self.server['id'])
diff --git a/tempest/tests/compute/servers/test_server_metadata.py b/tempest/tests/compute/servers/test_server_metadata.py
index 0198e4e..6c44c3c 100644
--- a/tempest/tests/compute/servers/test_server_metadata.py
+++ b/tempest/tests/compute/servers/test_server_metadata.py
@@ -49,7 +49,7 @@
self.assertEqual(resp.status, 200)
def test_list_server_metadata(self):
- """All metadata key/value pairs for a server should be returned"""
+ # All metadata key/value pairs for a server should be returned
resp, resp_metadata = self.client.list_server_metadata(self.server_id)
#Verify the expected metadata items are in the list
@@ -58,7 +58,7 @@
self.assertEqual(expected, resp_metadata)
def test_set_server_metadata(self):
- """The server's metadata should be replaced with the provided values"""
+ # The server's metadata should be replaced with the provided values
#Create a new set of metadata for the server
req_metadata = {'meta2': 'data2', 'meta3': 'data3'}
resp, metadata = self.client.set_server_metadata(self.server_id,
@@ -71,10 +71,10 @@
self.assertEqual(resp_metadata, req_metadata)
def test_server_create_metadata_key_too_long(self):
- """
- Attempt to start a server with a meta-data key that is > 255 characters
- Try a few values
- """
+ # Attempt to start a server with a meta-data key that is > 255
+ # characters
+
+ # Try a few values
for sz in [256, 257, 511, 1023]:
key = "k" * sz
meta = {key: 'data1'}
@@ -87,10 +87,8 @@
# no teardown - all creates should fail
def test_update_server_metadata(self):
- """
- The server's metadata values should be updated to the
- provided values
- """
+ # The server's metadata values should be updated to the
+ # provided values
meta = {'key1': 'alt1', 'key3': 'value3'}
resp, metadata = self.client.update_server_metadata(self.server_id,
meta)
@@ -102,13 +100,13 @@
self.assertEqual(expected, resp_metadata)
def test_get_server_metadata_item(self):
- """ The value for a specic metadata key should be returned """
+ # The value for a specic metadata key should be returned
resp, meta = self.client.get_server_metadata_item(self.server_id,
'key2')
self.assertTrue('value2', meta['key2'])
def test_set_server_metadata_item(self):
- """The item's value should be updated to the provided value"""
+ # The item's value should be updated to the provided value
#Update the metadata value
meta = {'nova': 'alt'}
resp, body = self.client.set_server_metadata_item(self.server_id,
@@ -121,7 +119,7 @@
self.assertEqual(expected, resp_metadata)
def test_delete_server_metadata_item(self):
- """The metadata value/key pair should be deleted from the server"""
+ # The metadata value/key pair should be deleted from the server
resp, meta = self.client.delete_server_metadata_item(self.server_id,
'key1')
self.assertEqual(204, resp.status)
@@ -133,7 +131,7 @@
@attr(type='negative')
def test_get_nonexistant_server_metadata_item(self):
- """Negative test: GET on nonexistant server should not succeed"""
+ # Negative test: GET on nonexistant server should not succeed
try:
resp, meta = self.client.get_server_metadata_item(999, 'test2')
except Exception:
@@ -143,9 +141,8 @@
@attr(type='negative')
def test_list_nonexistant_server_metadata(self):
- """
- Negative test:List metadata on a non existant server should not succeed
- """
+ # Negative test:List metadata on a non existant server should
+ # not succeed
try:
resp, metadata = self.client.list_server_metadata(999)
except Exception:
@@ -156,9 +153,8 @@
@attr(type='negative')
def test_set_nonexistant_server_metadata(self):
- """
- Negative test: Set metadata on a non existant server should not succeed
- """
+ # Negative test: Set metadata on a non existant server should not
+ # succeed
meta = {'meta1': 'data1'}
try:
resp, metadata = self.client.set_server_metadata(999, meta)
@@ -170,9 +166,7 @@
@attr(type='negative')
def test_update_nonexistant_server_metadata(self):
- """
- Negative test: An update should not happen for a nonexistant image
- """
+ # Negative test: An update should not happen for a nonexistant image
meta = {'key1': 'value1', 'key2': 'value2'}
try:
resp, metadata = self.client.update_server_metadata(999, meta)
@@ -183,10 +177,8 @@
@attr(type='negative')
def test_delete_nonexistant_server_metadata_item(self):
- """
- Negative test: Should not be able to delete metadata item from a
- nonexistant server
- """
+ # Negative test: Should not be able to delete metadata item from a
+ # nonexistant server
meta = {'d': 'delvalue'}
#Delete the metadata item
diff --git a/tempest/tests/compute/servers/test_server_personality.py b/tempest/tests/compute/servers/test_server_personality.py
index 320bac4..6ea0959 100644
--- a/tempest/tests/compute/servers/test_server_personality.py
+++ b/tempest/tests/compute/servers/test_server_personality.py
@@ -27,10 +27,8 @@
class ServerPersonalityTestBase(object):
def test_personality_files_exceed_limit(self):
- """
- Server creation should fail if greater than the maximum allowed
- number of files are injected into the server.
- """
+ # Server creation should fail if greater than the maximum allowed
+ # number of files are injected into the server.
name = rand_name('server')
file_contents = 'This is a test file.'
personality = []
@@ -51,10 +49,8 @@
@attr(type='positive')
def test_can_create_server_with_max_number_personality_files(self):
- """
- Server should be created successfully if maximum allowed number of
- files is injected into the server during creation.
- """
+ # Server should be created successfully if maximum allowed number of
+ # files is injected into the server during creation.
try:
name = rand_name('server')
file_contents = 'This is a test file.'
diff --git a/tempest/tests/compute/servers/test_servers.py b/tempest/tests/compute/servers/test_servers.py
index fcf9975..3566ef4 100644
--- a/tempest/tests/compute/servers/test_servers.py
+++ b/tempest/tests/compute/servers/test_servers.py
@@ -25,10 +25,8 @@
@attr(type='positive')
def test_create_server_with_admin_password(self):
- """
- If an admin password is provided on server creation, the server's root
- password should be set to that password.
- """
+ # If an admin password is provided on server creation, the server's
+ # root password should be set to that password.
try:
server = None
@@ -47,7 +45,7 @@
self.client.delete_server(server['id'])
def test_create_with_existing_server_name(self):
- """Creating a server with a name that already exists is allowed"""
+ # Creating a server with a name that already exists is allowed
try:
id1 = None
@@ -76,7 +74,7 @@
@attr(type='positive')
def test_create_specify_keypair(self):
- """Specify a keypair while creating a server"""
+ # Specify a keypair while creating a server
try:
server = None
@@ -98,7 +96,7 @@
@attr(type='positive')
def test_update_server_name(self):
- """The server name should be changed to the the provided value"""
+ # The server name should be changed to the the provided value
try:
server = None
name = rand_name('server')
@@ -123,9 +121,7 @@
@attr(type='positive')
def test_update_access_server_address(self):
- """
- The server's access addresses should reflect the provided values
- """
+ # The server's access addresses should reflect the provided values
try:
server = None
name = rand_name('server')
@@ -151,7 +147,7 @@
self.client.delete_server(server['id'])
def test_delete_server_while_in_building_state(self):
- """Delete a server while it's VM state is Building"""
+ # Delete a server while it's VM state is Building
name = rand_name('server')
resp, server = self.create_server_with_extras(name, self.image_ref,
self.flavor_ref)
diff --git a/tempest/tests/compute/servers/test_servers_negative.py b/tempest/tests/compute/servers/test_servers_negative.py
index fd067cd..970f6bc 100644
--- a/tempest/tests/compute/servers/test_servers_negative.py
+++ b/tempest/tests/compute/servers/test_servers_negative.py
@@ -40,7 +40,7 @@
@attr(type='negative')
def test_server_name_blank(self):
- """Create a server with name parameter empty"""
+ # Create a server with name parameter empty
try:
resp, server = self.create_server_with_extras('',
self.image_ref,
@@ -52,7 +52,7 @@
@attr(type='negative')
def test_personality_file_contents_not_encoded(self):
- """Use an unencoded file when creating a server with personality"""
+ # Use an unencoded file when creating a server with personality
file_contents = 'This is a test file.'
person = [{'path': '/etc/testfile.txt',
'contents': file_contents}]
@@ -69,7 +69,7 @@
@attr(type='negative')
def test_create_with_invalid_image(self):
- """Create a server with an unknown image"""
+ # Create a server with an unknown image
try:
resp, server = self.create_server_with_extras('fail', -1,
self.flavor_ref)
@@ -80,7 +80,7 @@
@attr(type='negative')
def test_create_with_invalid_flavor(self):
- """Create a server with an unknown flavor"""
+ # Create a server with an unknown flavor
try:
self.create_server_with_extras('fail', self.image_ref, -1)
except exceptions.BadRequest:
@@ -90,7 +90,7 @@
@attr(type='negative')
def test_invalid_access_ip_v4_address(self):
- """An access IPv4 address must match a valid address pattern"""
+ # An access IPv4 address must match a valid address pattern
IPv4 = '1.1.1.1.1.1'
name = rand_name('server')
try:
@@ -105,7 +105,7 @@
@attr(type='negative')
def test_invalid_ip_v6_address(self):
- """An access IPv6 address must match a valid address pattern"""
+ # An access IPv6 address must match a valid address pattern
IPv6 = 'notvalid'
name = rand_name('server')
try:
@@ -120,7 +120,7 @@
@attr(type='negative')
def test_reboot_deleted_server(self):
- """Reboot a deleted server"""
+ # Reboot a deleted server
self.name = rand_name('server')
resp, create_server = self.create_server_with_extras(self.name,
self.image_ref,
@@ -137,7 +137,7 @@
@attr(type='negative')
def test_rebuild_deleted_server(self):
- """Rebuild a deleted server"""
+ # Rebuild a deleted server
self.name = rand_name('server')
resp, create_server = self.create_server_with_extras(self.name,
self.image_ref,
@@ -155,7 +155,7 @@
@attr(type='negative')
def test_create_numeric_server_name(self):
- """Create a server with a numeric name"""
+ # Create a server with a numeric name
server_name = 12345
self.assertRaises(exceptions.BadRequest,
@@ -164,7 +164,7 @@
@attr(type='negative')
def test_create_server_name_length_exceeds_256(self):
- """Create a server with name length exceeding 256 characters"""
+ # Create a server with name length exceeding 256 characters
server_name = 'a' * 256
self.assertRaises(exceptions.BadRequest,
@@ -173,7 +173,7 @@
@attr(type='negative')
def test_create_with_invalid_network_uuid(self):
- """Pass invalid network uuid while creating a server"""
+ # Pass invalid network uuid while creating a server
server_name = rand_name('server')
networks = [{'fixed_ip': '10.0.1.1', 'uuid':'a-b-c-d-e-f-g-h-i-j'}]
@@ -185,7 +185,7 @@
@attr(type='negative')
def test_create_with_non_existant_keypair(self):
- """Pass a non existant keypair while creating a server"""
+ # Pass a non existant keypair while creating a server
key_name = rand_name('key')
server_name = rand_name('server')
@@ -197,7 +197,7 @@
@unittest.skip("Until Bug 1004007 is fixed")
@attr(type='negative')
def test_create_server_metadata_exceeds_length_limit(self):
- """Pass really long metadata while creating a server"""
+ # Pass really long metadata while creating a server
server_name = rand_name('server')
metadata = {'a': 'b' * 260}
@@ -208,7 +208,7 @@
@attr(type='negative')
def test_update_name_of_non_existent_server(self):
- """Update name of a non-existent server"""
+ # Update name of a non-existent server
server_name = rand_name('server')
new_name = rand_name('server') + '_updated'
@@ -218,7 +218,7 @@
@attr(type='negative')
def test_update_server_set_empty_name(self):
- """Update name of the server to an empty string"""
+ # Update name of the server to an empty string
server_name = rand_name('server')
new_name = ''
@@ -228,7 +228,7 @@
@attr(type='negative')
def test_update_server_of_another_tenant(self):
- """Update name of a server that belongs to another tenant"""
+ # Update name of a server that belongs to another tenant
server = self.create_server()
new_name = server['id'] + '_new'
@@ -238,7 +238,7 @@
@attr(type='negative')
def test_update_server_name_length_exceeds_256(self):
- """Update name of server exceed the name length limit"""
+ # Update name of server exceed the name length limit
server = self.create_server()
new_name = 'a' * 256
@@ -249,14 +249,14 @@
@attr(type='negative')
def test_delete_non_existent_server(self):
- """Delete a non existent server"""
+ # Delete a non existent server
self.assertRaises(exceptions.NotFound, self.client.delete_server,
'999erra43')
@attr(type='negative')
def test_delete_a_server_of_another_tenant(self):
- """Delete a server that belongs to another tenant"""
+ # Delete a server that belongs to another tenant
try:
server = self.create_server()
self.assertRaises(exceptions.NotFound,
@@ -267,13 +267,13 @@
@attr(type='negative')
def test_delete_server_pass_negative_id(self):
- """Pass an invalid string parameter to delete server"""
+ # Pass an invalid string parameter to delete server
self.assertRaises(exceptions.NotFound, self.client.delete_server, -1)
@attr(type='negative')
def test_delete_server_pass_id_exceeding_length_limit(self):
- """Pass a server ID that exceeds length limit to delete server"""
+ # Pass a server ID that exceeds length limit to delete server
self.assertRaises(exceptions.NotFound, self.client.delete_server,
sys.maxint + 1)
diff --git a/tempest/tests/compute/servers/test_servers_whitebox.py b/tempest/tests/compute/servers/test_servers_whitebox.py
index 16254e7..8aca745 100644
--- a/tempest/tests/compute/servers/test_servers_whitebox.py
+++ b/tempest/tests/compute/servers/test_servers_whitebox.py
@@ -53,7 +53,7 @@
continue
def test_create_server_vcpu_quota_full(self):
- """Disallow server creation when tenant's vcpu quota is full"""
+ # Disallow server creation when tenant's vcpu quota is full
quotas = self.meta.tables['quotas']
stmt = quotas.select().where(
quotas.c.project_id == self.tenant_id).where(
@@ -85,7 +85,7 @@
self.connection.execute(stmt, autocommit=True)
def test_create_server_memory_quota_full(self):
- """Disallow server creation when tenant's memory quota is full"""
+ # Disallow server creation when tenant's memory quota is full
quotas = self.meta.tables['quotas']
stmt = quotas.select().where(
quotas.c.project_id == self.tenant_id).where(
@@ -171,83 +171,81 @@
self.update_state(self.shared_server['id'], 'active', None)
def test_delete_server_when_vm_eq_building_task_eq_networking(self):
- """Delete server when instance states are building,networking"""
+ # Delete server when instance states are building,networking
self._test_delete_server_base('building', 'networking')
def test_delete_server_when_vm_eq_building_task_eq_bdm(self):
- """
- Delete server when instance states are building,block device mapping
- """
+ # Delete server when instance states are building,block device mapping
self._test_delete_server_base('building', 'block_device_mapping')
def test_delete_server_when_vm_eq_building_task_eq_spawning(self):
- """Delete server when instance states are building,spawning"""
+ # Delete server when instance states are building,spawning
self._test_delete_server_base('building', 'spawning')
def test_delete_server_when_vm_eq_active_task_eq_image_backup(self):
- """Delete server when instance states are active,image_backup"""
+ # Delete server when instance states are active,image_backup
self._test_delete_server_base('active', 'image_backup')
def test_delete_server_when_vm_eq_active_task_eq_rebuilding(self):
- """Delete server when instance states are active,rebuilding"""
+ # Delete server when instance states are active,rebuilding
self._test_delete_server_base('active', 'rebuilding')
def test_delete_server_when_vm_eq_error_task_eq_spawning(self):
- """Delete server when instance states are error,spawning"""
+ # Delete server when instance states are error,spawning
self._test_delete_server_base('error', 'spawning')
def test_delete_server_when_vm_eq_resized_task_eq_resize_prep(self):
- """Delete server when instance states are resized,resize_prep"""
+ # Delete server when instance states are resized,resize_prep
self._test_delete_server_403_base('resized', 'resize_prep')
def test_delete_server_when_vm_eq_resized_task_eq_resize_migrating(self):
- """Delete server when instance states are resized,resize_migrating"""
+ # Delete server when instance states are resized,resize_migrating
self._test_delete_server_403_base('resized', 'resize_migrating')
def test_delete_server_when_vm_eq_resized_task_eq_resize_migrated(self):
- """Delete server when instance states are resized,resize_migrated"""
+ # Delete server when instance states are resized,resize_migrated
self._test_delete_server_403_base('resized', 'resize_migrated')
def test_delete_server_when_vm_eq_resized_task_eq_resize_finish(self):
- """Delete server when instance states are resized,resize_finish"""
+ # Delete server when instance states are resized,resize_finish
self._test_delete_server_403_base('resized', 'resize_finish')
def test_delete_server_when_vm_eq_resized_task_eq_resize_reverting(self):
- """Delete server when instance states are resized,resize_reverting"""
+ # Delete server when instance states are resized,resize_reverting
self._test_delete_server_403_base('resized', 'resize_reverting')
def test_delete_server_when_vm_eq_resized_task_eq_resize_confirming(self):
- """Delete server when instance states are resized,resize_confirming"""
+ # Delete server when instance states are resized,resize_confirming
self._test_delete_server_403_base('resized', 'resize_confirming')
def test_delete_server_when_vm_eq_active_task_eq_resize_verify(self):
- """Delete server when instance states are active,resize_verify"""
+ # Delete server when instance states are active,resize_verify
self._test_delete_server_base('active', 'resize_verify')
def test_delete_server_when_vm_eq_active_task_eq_rebooting(self):
- """Delete server when instance states are active,rebooting"""
+ # Delete server when instance states are active,rebooting
self._test_delete_server_base('active', 'rebooting')
def test_delete_server_when_vm_eq_building_task_eq_deleting(self):
- """Delete server when instance states are building,deleting"""
+ # Delete server when instance states are building,deleting
self._test_delete_server_base('building', 'deleting')
def test_delete_server_when_vm_eq_active_task_eq_deleting(self):
- """Delete server when instance states are active,deleting"""
+ # Delete server when instance states are active,deleting
self._test_delete_server_base('active', 'deleting')
def test_delete_server_when_vm_eq_error_task_eq_none(self):
- """Delete server when instance states are error,None"""
+ # Delete server when instance states are error,None
self._test_delete_server_base('error', None)
def test_delete_server_when_vm_eq_resized_task_eq_none(self):
- """Delete server when instance states are resized,None"""
+ # Delete server when instance states are resized,None
self._test_delete_server_403_base('resized', None)
def test_delete_server_when_vm_eq_error_task_eq_resize_prep(self):
- """Delete server when instance states are error,resize_prep"""
+ # Delete server when instance states are error,resize_prep
self._test_delete_server_base('error', 'resize_prep')
def test_delete_server_when_vm_eq_error_task_eq_error(self):
- """Delete server when instance states are error,error"""
+ # Delete server when instance states are error,error
self._test_delete_server_base('error', 'error')
diff --git a/tempest/tests/compute/test_authorization.py b/tempest/tests/compute/test_authorization.py
index 64f6464..78661d1 100644
--- a/tempest/tests/compute/test_authorization.py
+++ b/tempest/tests/compute/test_authorization.py
@@ -105,41 +105,37 @@
@raises(exceptions.NotFound)
@attr(type='negative')
def test_get_server_for_alt_account_fails(self):
- """A GET request for a server on another user's account should fail"""
+ # A GET request for a server on another user's account should fail
self.alt_client.get_server(self.server['id'])
@raises(exceptions.NotFound)
@attr(type='negative')
def test_delete_server_for_alt_account_fails(self):
- """A DELETE request for another user's server should fail"""
+ # A DELETE request for another user's server should fail
self.alt_client.delete_server(self.server['id'])
@raises(exceptions.NotFound)
@attr(type='negative')
def test_update_server_for_alt_account_fails(self):
- """An update server request for another user's server should fail"""
+ # An update server request for another user's server should fail
self.alt_client.update_server(self.server['id'], name='test')
@raises(exceptions.NotFound)
@attr(type='negative')
def test_list_server_addresses_for_alt_account_fails(self):
- """A list addresses request for another user's server should fail"""
+ # A list addresses request for another user's server should fail
self.alt_client.list_addresses(self.server['id'])
@raises(exceptions.NotFound)
@attr(type='negative')
def test_list_server_addresses_by_network_for_alt_account_fails(self):
- """
- A list address/network request for another user's server should fail
- """
+ # A list address/network request for another user's server should fail
server_id = self.server['id']
self.alt_client.list_addresses_by_network(server_id, 'public')
def test_list_servers_with_alternate_tenant(self):
- """
- A list on servers from one tenant should not
- show on alternate tenant
- """
+ # A list on servers from one tenant should not
+ # show on alternate tenant
#Listing servers from alternate tenant
alt_server_ids = []
resp, body = self.alt_client.list_servers()
@@ -149,47 +145,45 @@
@raises(exceptions.NotFound)
@attr(type='negative')
def test_change_password_for_alt_account_fails(self):
- """A change password request for another user's server should fail"""
+ # A change password request for another user's server should fail
self.alt_client.change_password(self.server['id'], 'newpass')
@raises(exceptions.NotFound)
@attr(type='negative')
def test_reboot_server_for_alt_account_fails(self):
- """A reboot request for another user's server should fail"""
+ # A reboot request for another user's server should fail
self.alt_client.reboot(self.server['id'], 'HARD')
@raises(exceptions.NotFound)
@attr(type='negative')
def test_rebuild_server_for_alt_account_fails(self):
- """A rebuild request for another user's server should fail"""
+ # A rebuild request for another user's server should fail
self.alt_client.rebuild(self.server['id'], self.image_ref_alt)
@raises(exceptions.NotFound)
@attr(type='negative')
def test_resize_server_for_alt_account_fails(self):
- """A resize request for another user's server should fail"""
+ # A resize request for another user's server should fail
self.alt_client.resize(self.server['id'], self.flavor_ref_alt)
@raises(exceptions.NotFound)
@attr(type='negative')
def test_create_image_for_alt_account_fails(self):
- """A create image request for another user's server should fail"""
+ # A create image request for another user's server should fail
self.alt_images_client.create_image(self.server['id'], 'testImage')
@raises(exceptions.BadRequest)
@attr(type='negative')
def test_create_server_with_unauthorized_image(self):
- """Server creation with another user's image should fail"""
+ # Server creation with another user's image should fail
self.alt_client.create_server('test', self.image['id'],
self.flavor_ref)
@raises(exceptions.BadRequest)
@attr(type='negative')
def test_create_server_fails_when_tenant_incorrect(self):
- """
- A create server request should fail if the tenant id does not match
- the current user
- """
+ # A create server request should fail if the tenant id does not match
+ # the current user
saved_base_url = self.alt_client.base_url
try:
# Change the base URL to impersonate another user
@@ -203,10 +197,8 @@
@raises(exceptions.BadRequest)
@attr(type='negative')
def test_create_keypair_in_analt_user_tenant(self):
- """
- A create keypair request should fail if the tenant id does not match
- the current user
- """
+ # A create keypair request should fail if the tenant id does not match
+ # the current user
#POST keypair with other user tenant
k_name = rand_name('keypair-')
self.alt_keypairs_client._set_auth()
@@ -228,35 +220,33 @@
@raises(exceptions.NotFound)
@attr(type='negative')
def test_get_keypair_of_alt_account_fails(self):
- """A GET request for another user's keypair should fail"""
+ # A GET request for another user's keypair should fail
self.alt_keypairs_client.get_keypair(self.keypairname)
@raises(exceptions.NotFound)
@attr(type='negative')
@unittest.skip("Skipped until the Bug #1086980 is resolved")
def test_delete_keypair_of_alt_account_fails(self):
- """A DELETE request for another user's keypair should fail"""
+ # A DELETE request for another user's keypair should fail
self.alt_keypairs_client.delete_keypair(self.keypairname)
@raises(exceptions.NotFound)
@attr(type='negative')
def test_get_image_for_alt_account_fails(self):
- """A GET request for an image on another user's account should fail"""
+ # A GET request for an image on another user's account should fail
self.alt_images_client.get_image(self.image['id'])
@raises(exceptions.NotFound)
@attr(type='negative')
def test_delete_image_for_alt_account_fails(self):
- """A DELETE request for another user's image should fail"""
+ # A DELETE request for another user's image should fail
self.alt_images_client.delete_image(self.image['id'])
@raises(exceptions.BadRequest)
@attr(type='negative')
def test_create_security_group_in_analt_user_tenant(self):
- """
- A create security group request should fail if the tenant id does not
- match the current user
- """
+ # A create security group request should fail if the tenant id does not
+ # match the current user
#POST security group with other user tenant
s_name = rand_name('security-')
s_description = rand_name('security')
@@ -281,23 +271,21 @@
@raises(exceptions.NotFound)
@attr(type='negative')
def test_get_security_group_of_alt_account_fails(self):
- """A GET request for another user's security group should fail"""
+ # A GET request for another user's security group should fail
self.alt_security_client.get_security_group(self.security_group['id'])
@raises(exceptions.NotFound)
@attr(type='negative')
def test_delete_security_group_of_alt_account_fails(self):
- """A DELETE request for another user's security group should fail"""
+ # A DELETE request for another user's security group should fail
self.alt_security_client.delete_security_group(
self.security_group['id'])
@raises(exceptions.BadRequest)
@attr(type='negative')
def test_create_security_group_rule_in_analt_user_tenant(self):
- """
- A create security group rule request should fail if the tenant id
- does not match the current user
- """
+ # A create security group rule request should fail if the tenant id
+ # does not match the current user
#POST security group rule with other user tenant
parent_group_id = self.security_group['id']
ip_protocol = 'icmp'
@@ -328,30 +316,28 @@
@raises(exceptions.NotFound)
@attr(type='negative')
def test_delete_security_group_rule_of_alt_account_fails(self):
- """
- A DELETE request for another user's security group rule
- should fail
- """
+ # A DELETE request for another user's security group rule
+ # should fail
self.alt_security_client.delete_security_group_rule(self.rule['id'])
@raises(exceptions.NotFound)
@attr(type='negative')
def test_set_metadata_of_alt_account_server_fails(self):
- """ A set metadata for another user's server should fail """
+ # A set metadata for another user's server should fail
req_metadata = {'meta1': 'data1', 'meta2': 'data2'}
self.alt_client.set_server_metadata(self.server['id'], req_metadata)
@raises(exceptions.NotFound)
@attr(type='negative')
def test_set_metadata_of_alt_account_image_fails(self):
- """ A set metadata for another user's image should fail """
+ # A set metadata for another user's image should fail
req_metadata = {'meta1': 'value1', 'meta2': 'value2'}
self.alt_images_client.set_image_metadata(self.image['id'],
req_metadata)
@attr(type='negative')
def test_get_metadata_of_alt_account_server_fails(self):
- """ A get metadata for another user's server should fail """
+ # A get metadata for another user's server should fail
req_metadata = {'meta1': 'data1'}
self.client.set_server_metadata(self.server['id'], req_metadata)
try:
@@ -366,7 +352,7 @@
@attr(type='negative')
def test_get_metadata_of_alt_account_image_fails(self):
- """ A get metadata for another user's image should fail """
+ # A get metadata for another user's image should fail
req_metadata = {'meta1': 'value1'}
self.images_client.set_image_metadata(self.image['id'],
req_metadata)
@@ -382,7 +368,7 @@
@attr(type='negative')
def test_delete_metadata_of_alt_account_server_fails(self):
- """ A delete metadata for another user's server should fail """
+ # A delete metadata for another user's server should fail
req_metadata = {'meta1': 'data1'}
self.client.set_server_metadata(self.server['id'], req_metadata)
try:
@@ -397,7 +383,7 @@
@attr(type='negative')
def test_delete_metadata_of_alt_account_image_fails(self):
- """ A delete metadata for another user's image should fail """
+ # A delete metadata for another user's image should fail
req_metadata = {'meta1': 'data1'}
self.images_client.set_image_metadata(self.image['id'],
req_metadata)
@@ -415,8 +401,6 @@
@raises(exceptions.NotFound)
@attr(type='negative')
def test_get_console_output_of_alt_account_server_fails(self):
- """
- A Get Console Output for another user's server should fail
- """
+ # A Get Console Output for another user's server should fail
self.alt_console_outputs_client.get_console_output(self.server['id'],
10)
diff --git a/tempest/tests/compute/test_extensions.py b/tempest/tests/compute/test_extensions.py
index 552c58c..829e295 100644
--- a/tempest/tests/compute/test_extensions.py
+++ b/tempest/tests/compute/test_extensions.py
@@ -24,7 +24,7 @@
@attr(type='positive')
def test_list_extensions(self):
- """List of all extensions"""
+ # List of all extensions
resp, extensions = self.client.list_extensions()
self.assertTrue("extensions" in extensions)
self.assertEqual(200, resp.status)
diff --git a/tempest/tests/compute/test_live_block_migration.py b/tempest/tests/compute/test_live_block_migration.py
index 48d374f..915868c 100644
--- a/tempest/tests/compute/test_live_block_migration.py
+++ b/tempest/tests/compute/test_live_block_migration.py
@@ -104,7 +104,7 @@
@unittest.skipIf(not live_migration_available,
'Block Live migration not available')
def test_001_live_block_migration(self):
- """Live block migrate an instance to another host"""
+ # Live block migrate an instance to another host
if len(self._get_compute_hostnames()) < 2:
raise nose.SkipTest(
"Less than 2 compute nodes, skipping migration test.")
@@ -120,7 +120,7 @@
@unittest.skipIf(not live_migration_available,
'Block Live migration not available')
def test_002_invalid_host_for_migration(self):
- """Migrating to an invalid host should not change the status"""
+ # Migrating to an invalid host should not change the status
server_id = self._get_an_active_server()
target_host = self._get_non_existing_host_name()
diff --git a/tempest/tests/compute/test_quotas.py b/tempest/tests/compute/test_quotas.py
index bf7d648..3dc2515 100644
--- a/tempest/tests/compute/test_quotas.py
+++ b/tempest/tests/compute/test_quotas.py
@@ -33,7 +33,7 @@
@attr(type='smoke')
def test_get_default_quotas(self):
- """User can get the default quota set for it's tenant"""
+ # User can get the default quota set for it's tenant
expected_quota_set = {'injected_file_content_bytes': 10240,
'metadata_items': 128, 'injected_files': 5,
'ram': 51200, 'floating_ips': 10,
diff --git a/tempest/tests/compute/volumes/test_attach_volume.py b/tempest/tests/compute/volumes/test_attach_volume.py
index 09b146b..9581026 100644
--- a/tempest/tests/compute/volumes/test_attach_volume.py
+++ b/tempest/tests/compute/volumes/test_attach_volume.py
@@ -70,10 +70,8 @@
@attr(type='positive')
@unittest.skipIf(not run_ssh, 'SSH required for this test')
def test_attach_detach_volume(self):
- """
- Stop and Start a server with an attached volume, ensuring that
- the volume remains attached.
- """
+ # Stop and Start a server with an attached volume, ensuring that
+ # the volume remains attached.
server, volume = self._create_and_attach()
attached = True
diff --git a/tempest/tests/compute/volumes/test_volumes_get.py b/tempest/tests/compute/volumes/test_volumes_get.py
index 0a207b9..afb00cd 100644
--- a/tempest/tests/compute/volumes/test_volumes_get.py
+++ b/tempest/tests/compute/volumes/test_volumes_get.py
@@ -25,7 +25,7 @@
@attr(type='smoke')
def test_volume_create_get_delete(self):
- """CREATE, GET, DELETE Volume"""
+ # CREATE, GET, DELETE Volume
volume = None
try:
v_name = rand_name('Volume-%s-') % self._interface
@@ -71,7 +71,7 @@
@attr(type='positive')
def test_volume_get_metadata_none(self):
- """CREATE, GET empty metadata dict"""
+ # CREATE, GET empty metadata dict
try:
v_name = rand_name('Volume-')
#Create volume
diff --git a/tempest/tests/compute/volumes/test_volumes_list.py b/tempest/tests/compute/volumes/test_volumes_list.py
index 5162a85..fef9c8d 100644
--- a/tempest/tests/compute/volumes/test_volumes_list.py
+++ b/tempest/tests/compute/volumes/test_volumes_list.py
@@ -32,7 +32,7 @@
"""
def test_volume_list(self):
- """Should return the list of Volumes"""
+ # Should return the list of Volumes
# Fetch all Volumes
resp, fetched_list = self.client.list_volumes()
self.assertEqual(200, resp.status)
@@ -47,7 +47,7 @@
for m_vol in missing_volumes))
def test_volume_list_with_details(self):
- """Should return the list of Volumes with details"""
+ # Should return the list of Volumes with details
#Fetch all Volumes
resp, fetched_list = self.client.list_volumes_with_detail()
self.assertEqual(200, resp.status)
diff --git a/tempest/tests/compute/volumes/test_volumes_negative.py b/tempest/tests/compute/volumes/test_volumes_negative.py
index 6994ab1..d2ad30e 100644
--- a/tempest/tests/compute/volumes/test_volumes_negative.py
+++ b/tempest/tests/compute/volumes/test_volumes_negative.py
@@ -27,7 +27,7 @@
@attr(type='negative')
def test_volume_get_nonexistant_volume_id(self):
- """Negative: Should not be able to get details of nonexistant volume"""
+ # Negative: Should not be able to get details of nonexistant volume
#Creating a nonexistant volume id
volume_id_list = list()
resp, body = self.client.list_volumes()
@@ -48,7 +48,7 @@
@attr(type='negative')
def test_volume_delete_nonexistant_volume_id(self):
- """Negative: Should not be able to delete nonexistant Volume"""
+ # Negative: Should not be able to delete nonexistant Volume
#Creating nonexistant volume id
volume_id_list = list()
resp, body = self.client.list_volumes()
@@ -69,10 +69,8 @@
@raises(exceptions.BadRequest)
@attr(type='negative')
def test_create_volume_with_invalid_size(self):
- """
- Negative: Should not be able to create volume with invalid size
- in request
- """
+ # Negative: Should not be able to create volume with invalid size
+ # in request
v_name = rand_name('Volume-')
metadata = {'Type': 'work'}
resp, volume = self.client.create_volume(size='#$%',
@@ -82,10 +80,8 @@
@raises(exceptions.BadRequest)
@attr(type='negative')
def test_create_volume_with_out_passing_size(self):
- """
- Negative: Should not be able to create volume without passing size
- in request
- """
+ # Negative: Should not be able to create volume without passing size
+ # in request
v_name = rand_name('Volume-')
metadata = {'Type': 'work'}
resp, volume = self.client.create_volume(size='',
@@ -95,9 +91,7 @@
@raises(exceptions.BadRequest)
@attr(type='negative')
def test_create_volume_with_size_zero(self):
- """
- Negative: Should not be able to create volume with size zero
- """
+ # Negative: Should not be able to create volume with size zero
v_name = rand_name('Volume-')
metadata = {'Type': 'work'}
resp, volume = self.client.create_volume(size='0',
@@ -107,33 +101,26 @@
@raises(exceptions.NotFound)
@attr(type='negative')
def test_get_invalid_volume_id(self):
- """
- Negative: Should not be able to get volume with invalid id
- """
+ # Negative: Should not be able to get volume with invalid id
resp, volume = self.client.get_volume('#$%%&^&^')
@raises(exceptions.NotFound)
@attr(type='negative')
def test_get_volume_without_passing_volume_id(self):
- """
- Negative: Should not be able to get volume when empty ID is passed
- """
+ # Negative: Should not be able to get volume when empty ID is passed
resp, volume = self.client.get_volume('')
@raises(exceptions.NotFound)
@attr(type='negative')
def test_delete_invalid_volume_id(self):
- """
- Negative: Should not be able to delete volume when invalid ID is passed
- """
+ # Negative: Should not be able to delete volume when invalid ID is
+ # passed
resp, volume = self.client.delete_volume('!@#$%^&*()')
@raises(exceptions.NotFound)
@attr(type='negative')
def test_delete_volume_without_passing_volume_id(self):
- """
- Negative: Should not be able to delete volume when empty ID is passed
- """
+ # Negative: Should not be able to delete volume when empty ID is passed
resp, volume = self.client.delete_volume('')