Merge "Fix get_versions string parsing"
diff --git a/tempest/api/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py
index 252f4be..3e13bf8 100644
--- a/tempest/api/compute/admin/test_flavors.py
+++ b/tempest/api/compute/admin/test_flavors.py
@@ -172,7 +172,6 @@
flag = True
self.assertTrue(flag)
- @test.skip_because(bug="1209101")
@test.attr(type='gate')
def test_list_non_public_flavor(self):
# Create a flavor with os-flavor-access:is_public false should
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index 08df616..1078847 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -172,7 +172,7 @@
# The server in error state should be rebuilt using the provided
# image and changed to ACTIVE state
- # resetting vm state require admin priviledge
+ # resetting vm state require admin privilege
resp, server = self.client.reset_state(self.s1_id, state='error')
self.assertEqual(202, resp.status)
resp, rebuilt_server = self.non_admin_client.rebuild(
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index e6ddf1c..72bb723 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -51,6 +51,7 @@
cls.servers = []
cls.images = []
cls.multi_user = cls.get_multi_user()
+ cls.security_groups = []
@classmethod
def get_multi_user(cls):
@@ -102,9 +103,25 @@
pass
@classmethod
+ def clear_security_groups(cls):
+ for sg in cls.security_groups:
+ try:
+ resp, body =\
+ cls.security_groups_client.delete_security_group(sg['id'])
+ except exceptions.NotFound:
+ # The security group may have already been deleted which is OK.
+ pass
+ except Exception as exc:
+ LOG.info('Exception raised deleting security group %s',
+ sg['id'])
+ LOG.exception(exc)
+ pass
+
+ @classmethod
def tearDownClass(cls):
cls.clear_images()
cls.clear_servers()
+ cls.clear_security_groups()
cls.clear_isolated_creds()
super(BaseComputeTest, cls).tearDownClass()
@@ -146,6 +163,19 @@
return resp, body
+ @classmethod
+ def create_security_group(cls, name=None, description=None):
+ if name is None:
+ name = data_utils.rand_name(cls.__name__ + "-securitygroup")
+ if description is None:
+ description = data_utils.rand_name('description-')
+ resp, body = \
+ cls.security_groups_client.create_security_group(name,
+ description)
+ cls.security_groups.append(body)
+
+ return resp, body
+
def wait_for(self, condition):
"""Repeatedly calls condition() until a timeout."""
start_time = int(time.time())
diff --git a/tempest/api/compute/security_groups/test_security_group_rules.py b/tempest/api/compute/security_groups/test_security_group_rules.py
index 375105e..17bb489 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules.py
@@ -14,9 +14,8 @@
# under the License.
from tempest.api.compute.security_groups import base
-from tempest.common.utils import data_utils
from tempest import config
-from tempest.test import attr
+from tempest import test
CONF = config.CONF
@@ -30,17 +29,13 @@
cls.client = cls.security_groups_client
cls.neutron_available = CONF.service_available.neutron
- @attr(type='smoke')
+ @test.attr(type='smoke')
def test_security_group_rules_create(self):
# Positive test: Creation of Security Group rule
# should be successful
# Creating a Security Group to add rules to it
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name, s_description)
- securitygroup_id = securitygroup['id']
- self.addCleanup(self.client.delete_security_group, securitygroup_id)
+ resp, security_group = self.create_security_group()
+ securitygroup_id = security_group['id']
# Adding rules to the created Security Group
ip_protocol = 'tcp'
from_port = 22
@@ -53,7 +48,7 @@
self.addCleanup(self.client.delete_security_group_rule, rule['id'])
self.assertEqual(200, resp.status)
- @attr(type='smoke')
+ @test.attr(type='smoke')
def test_security_group_rules_create_with_optional_arguments(self):
# Positive test: Creation of Security Group rule
# with optional arguments
@@ -62,19 +57,11 @@
secgroup1 = None
secgroup2 = None
# Creating a Security Group to add rules to it
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name, s_description)
- secgroup1 = securitygroup['id']
- self.addCleanup(self.client.delete_security_group, secgroup1)
+ resp, security_group = self.create_security_group()
+ secgroup1 = security_group['id']
# Creating a Security Group so as to assign group_id to the rule
- s_name2 = data_utils.rand_name('securitygroup-')
- s_description2 = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name2, s_description2)
- secgroup2 = securitygroup['id']
- self.addCleanup(self.client.delete_security_group, secgroup2)
+ resp, security_group = self.create_security_group()
+ secgroup2 = security_group['id']
# Adding rules to the created Security Group with optional arguments
parent_group_id = secgroup1
ip_protocol = 'tcp'
@@ -92,18 +79,13 @@
self.addCleanup(self.client.delete_security_group_rule, rule['id'])
self.assertEqual(200, resp.status)
- @attr(type='smoke')
+ @test.attr(type='smoke')
def test_security_group_rules_list(self):
# Positive test: Created Security Group rules should be
# in the list of all rules
# Creating a Security Group to add rules to it
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name, s_description)
- securitygroup_id = securitygroup['id']
- # Delete the Security Group at the end of this method
- self.addCleanup(self.client.delete_security_group, securitygroup_id)
+ resp, security_group = self.create_security_group()
+ securitygroup_id = security_group['id']
# Add a first rule to the created Security Group
ip_protocol1 = 'tcp'
@@ -135,29 +117,21 @@
self.assertTrue(any([i for i in rules if i['id'] == rule1_id]))
self.assertTrue(any([i for i in rules if i['id'] == rule2_id]))
- @attr(type='smoke')
+ @test.attr(type='smoke')
def test_security_group_rules_delete_when_peer_group_deleted(self):
# Positive test:rule will delete when peer group deleting
# Creating a Security Group to add rules to it
- s1_name = data_utils.rand_name('securitygroup1-')
- s1_description = data_utils.rand_name('description1-')
- resp, sg1 = \
- self.client.create_security_group(s1_name, s1_description)
- self.addCleanup(self.client.delete_security_group, sg1['id'])
- self.assertEqual(200, resp.status)
+ resp, security_group = self.create_security_group()
+ sg1_id = security_group['id']
# Creating other Security Group to access to group1
- s2_name = data_utils.rand_name('securitygroup2-')
- s2_description = data_utils.rand_name('description2-')
- resp, sg2 = \
- self.client.create_security_group(s2_name, s2_description)
- self.assertEqual(200, resp.status)
- sg2_id = sg2['id']
+ resp, security_group = self.create_security_group()
+ sg2_id = security_group['id']
# Adding rules to the Group1
ip_protocol = 'tcp'
from_port = 22
to_port = 22
resp, rule = \
- self.client.create_security_group_rule(sg1['id'],
+ self.client.create_security_group_rule(sg1_id,
ip_protocol,
from_port,
to_port,
@@ -169,7 +143,7 @@
self.assertEqual(202, resp.status)
# Get rules of the Group1
resp, rules = \
- self.client.list_security_group_rules(sg1['id'])
+ self.client.list_security_group_rules(sg1_id)
# The group1 has no rules because group2 has deleted
self.assertEqual(0, len(rules))
diff --git a/tempest/api/compute/security_groups/test_security_group_rules_negative.py b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
index 4831939..680bc2f 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules_negative.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
@@ -19,8 +19,7 @@
from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
-from tempest.test import attr
-from tempest.test import skip_because
+from tempest import test
CONF = config.CONF
@@ -33,9 +32,9 @@
super(SecurityGroupRulesNegativeTestJSON, cls).setUpClass()
cls.client = cls.security_groups_client
- @skip_because(bug="1182384",
- condition=CONF.service_available.neutron)
- @attr(type=['negative', 'smoke'])
+ @test.skip_because(bug="1182384",
+ condition=CONF.service_available.neutron)
+ @test.attr(type=['negative', 'smoke'])
def test_create_security_group_rule_with_non_existent_id(self):
# Negative test: Creation of Security Group rule should FAIL
# with non existent Parent group id
@@ -50,7 +49,7 @@
@testtools.skipIf(CONF.service_available.neutron,
"Neutron not check the security_group_id")
- @attr(type=['negative', 'smoke'])
+ @test.attr(type=['negative', 'smoke'])
def test_create_security_group_rule_with_invalid_id(self):
# Negative test: Creation of Security Group rule should FAIL
# with Parent group id which is not integer
@@ -63,21 +62,17 @@
self.client.create_security_group_rule,
parent_group_id, ip_protocol, from_port, to_port)
- @attr(type=['negative', 'smoke'])
+ @test.attr(type=['negative', 'smoke'])
def test_create_security_group_rule_duplicate(self):
# Negative test: Create Security Group rule duplicate should fail
# Creating a Security Group to add rule to it
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, sg = self.client.create_security_group(s_name, s_description)
- self.assertEqual(200, resp.status)
+ resp, sg = self.create_security_group()
# Adding rules to the created Security Group
parent_group_id = sg['id']
ip_protocol = 'tcp'
from_port = 22
to_port = 22
- self.addCleanup(self.client.delete_security_group, sg['id'])
resp, rule = \
self.client.create_security_group_rule(parent_group_id,
ip_protocol,
@@ -90,86 +85,70 @@
self.client.create_security_group_rule,
parent_group_id, ip_protocol, from_port, to_port)
- @attr(type=['negative', 'smoke'])
+ @test.attr(type=['negative', 'smoke'])
def test_create_security_group_rule_with_invalid_ip_protocol(self):
# Negative test: Creation of Security Group rule should FAIL
# with invalid ip_protocol
# Creating a Security Group to add rule to it
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = self.client.create_security_group(s_name,
- s_description)
+ resp, sg = self.create_security_group()
# Adding rules to the created Security Group
- parent_group_id = securitygroup['id']
+ parent_group_id = sg['id']
ip_protocol = data_utils.rand_name('999')
from_port = 22
to_port = 22
- self.addCleanup(self.client.delete_security_group, securitygroup['id'])
self.assertRaises(exceptions.BadRequest,
self.client.create_security_group_rule,
parent_group_id, ip_protocol, from_port, to_port)
- @attr(type=['negative', 'smoke'])
+ @test.attr(type=['negative', 'smoke'])
def test_create_security_group_rule_with_invalid_from_port(self):
# Negative test: Creation of Security Group rule should FAIL
# with invalid from_port
# Creating a Security Group to add rule to it
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = self.client.create_security_group(s_name,
- s_description)
+ resp, sg = self.create_security_group()
# Adding rules to the created Security Group
- parent_group_id = securitygroup['id']
+ parent_group_id = sg['id']
ip_protocol = 'tcp'
from_port = data_utils.rand_int_id(start=65536)
to_port = 22
- self.addCleanup(self.client.delete_security_group, securitygroup['id'])
self.assertRaises(exceptions.BadRequest,
self.client.create_security_group_rule,
parent_group_id, ip_protocol, from_port, to_port)
- @attr(type=['negative', 'smoke'])
+ @test.attr(type=['negative', 'smoke'])
def test_create_security_group_rule_with_invalid_to_port(self):
# Negative test: Creation of Security Group rule should FAIL
# with invalid to_port
# Creating a Security Group to add rule to it
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = self.client.create_security_group(s_name,
- s_description)
+ resp, sg = self.create_security_group()
# Adding rules to the created Security Group
- parent_group_id = securitygroup['id']
+ parent_group_id = sg['id']
ip_protocol = 'tcp'
from_port = 22
to_port = data_utils.rand_int_id(start=65536)
- self.addCleanup(self.client.delete_security_group, securitygroup['id'])
self.assertRaises(exceptions.BadRequest,
self.client.create_security_group_rule,
parent_group_id, ip_protocol, from_port, to_port)
- @attr(type=['negative', 'smoke'])
+ @test.attr(type=['negative', 'smoke'])
def test_create_security_group_rule_with_invalid_port_range(self):
# Negative test: Creation of Security Group rule should FAIL
# with invalid port range.
# Creating a Security Group to add rule to it.
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = self.client.create_security_group(s_name,
- s_description)
+ resp, sg = self.create_security_group()
# Adding a rule to the created Security Group
- secgroup_id = securitygroup['id']
+ secgroup_id = sg['id']
ip_protocol = 'tcp'
from_port = 22
to_port = 21
- self.addCleanup(self.client.delete_security_group, securitygroup['id'])
self.assertRaises(exceptions.BadRequest,
self.client.create_security_group_rule,
secgroup_id, ip_protocol, from_port, to_port)
- @skip_because(bug="1182384",
- condition=CONF.service_available.neutron)
- @attr(type=['negative', 'smoke'])
+ @test.skip_because(bug="1182384",
+ condition=CONF.service_available.neutron)
+ @test.attr(type=['negative', 'smoke'])
def test_delete_security_group_rule_with_non_existent_id(self):
# Negative test: Deletion of Security Group rule should be FAIL
# with non existent id
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 2c67581..b376edc 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -27,68 +27,43 @@
super(SecurityGroupsTestJSON, cls).setUpClass()
cls.client = cls.security_groups_client
- def _delete_security_group(self, securitygroup_id):
- resp, _ = self.client.delete_security_group(securitygroup_id)
- self.assertEqual(202, resp.status)
-
@test.attr(type='gate')
def test_security_groups_create_list_delete(self):
# Positive test:Should return the list of Security Groups
# Create 3 Security Groups
- security_group_list = list()
for i in range(3):
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name, s_description)
+ resp, securitygroup = self.create_security_group()
self.assertEqual(200, resp.status)
- self.addCleanup(self._delete_security_group,
- securitygroup['id'])
- security_group_list.append(securitygroup)
# Fetch all Security Groups and verify the list
# has all created Security Groups
resp, fetched_list = self.client.list_security_groups()
self.assertEqual(200, resp.status)
# Now check if all the created Security Groups are in fetched list
missing_sgs = \
- [sg for sg in security_group_list if sg not in fetched_list]
+ [sg for sg in self.security_groups if sg not in fetched_list]
self.assertFalse(missing_sgs,
"Failed to find Security Group %s in fetched "
"list" % ', '.join(m_group['name']
for m_group in missing_sgs))
-
- # TODO(afazekas): scheduled for delete,
- # test_security_group_create_get_delete covers it
- @test.attr(type='gate')
- def test_security_group_create_delete(self):
- # Security Group should be created, verified and deleted
- s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name, s_description)
- self.assertIn('id', securitygroup)
- securitygroup_id = securitygroup['id']
- self.addCleanup(self._delete_security_group,
- securitygroup_id)
- self.assertEqual(200, resp.status)
- self.assertFalse(securitygroup_id is None)
- self.assertIn('name', securitygroup)
- securitygroup_name = securitygroup['name']
- self.assertEqual(securitygroup_name, s_name,
- "The created Security Group name is "
- "not equal to the requested name")
+ # Delete all security groups
+ for sg in self.security_groups:
+ resp, _ = self.client.delete_security_group(sg['id'])
+ self.assertEqual(202, resp.status)
+ self.client.wait_for_resource_deletion(sg['id'])
+ # Now check if all the created Security Groups are deleted
+ resp, fetched_list = self.client.list_security_groups()
+ deleted_sgs = \
+ [sg for sg in self.security_groups if sg in fetched_list]
+ self.assertFalse(deleted_sgs,
+ "Failed to delete Security Group %s "
+ "list" % ', '.join(m_group['name']
+ for m_group in deleted_sgs))
@test.attr(type='gate')
def test_security_group_create_get_delete(self):
# Security Group should be created, fetched and deleted
s_name = data_utils.rand_name('securitygroup-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name, s_description)
- self.addCleanup(self._delete_security_group,
- securitygroup['id'])
-
- self.assertEqual(200, resp.status)
+ resp, securitygroup = self.create_security_group(name=s_name)
self.assertIn('name', securitygroup)
securitygroup_name = securitygroup['name']
self.assertEqual(securitygroup_name, s_name,
@@ -108,15 +83,8 @@
# 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 = data_utils.rand_name('sg')
- sg_desc = data_utils.rand_name('sg-desc')
- resp, sg = self.client.create_security_group(sg_name, sg_desc)
- sg_id = sg['id']
-
- sg2_name = data_utils.rand_name('sg')
- sg2_desc = data_utils.rand_name('sg-desc')
- resp, sg2 = self.client.create_security_group(sg2_name, sg2_desc)
- sg2_id = sg2['id']
+ resp, sg = self.create_security_group()
+ resp, sg2 = self.create_security_group()
# Create server and add the security group created
# above to the server we just created
@@ -125,50 +93,44 @@
server_id = server['id']
self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
resp, body = self.servers_client.add_security_group(server_id,
- sg_name)
+ sg['name'])
# Check that we are not able to delete the security
# group since it is in use by an active server
self.assertRaises(exceptions.BadRequest,
self.client.delete_security_group,
- sg_id)
+ sg['id'])
# Reboot and add the other security group
resp, body = self.servers_client.reboot(server_id, 'HARD')
self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
resp, body = self.servers_client.add_security_group(server_id,
- sg2_name)
+ sg2['name'])
# Check that we are not able to delete the other security
# group since it is in use by an active server
self.assertRaises(exceptions.BadRequest,
self.client.delete_security_group,
- sg2_id)
+ sg2['id'])
# Shutdown the server and then verify we can destroy the
# security groups, since no active server instance is using them
self.servers_client.delete_server(server_id)
self.servers_client.wait_for_server_termination(server_id)
- self.client.delete_security_group(sg_id)
+ self.client.delete_security_group(sg['id'])
self.assertEqual(202, resp.status)
-
- self.client.delete_security_group(sg2_id)
+ self.client.delete_security_group(sg2['id'])
self.assertEqual(202, resp.status)
@test.attr(type='gate')
def test_update_security_groups(self):
# Update security group name and description
# Create a security group
- s_name = data_utils.rand_name('sg-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name, s_description)
+ resp, securitygroup = self.create_security_group()
self.assertEqual(200, resp.status)
self.assertIn('id', securitygroup)
securitygroup_id = securitygroup['id']
- self.addCleanup(self._delete_security_group,
- securitygroup_id)
# Update the name and description
s_new_name = data_utils.rand_name('sg-hth-')
s_new_des = data_utils.rand_name('description-hth-')
diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py
index ce1eada..edf38e9 100644
--- a/tempest/api/compute/security_groups/test_security_groups_negative.py
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -33,10 +33,6 @@
cls.client = cls.security_groups_client
cls.neutron_available = CONF.service_available.neutron
- def _delete_security_group(self, securitygroup_id):
- resp, _ = self.client.delete_security_group(securitygroup_id)
- self.assertEqual(202, resp.status)
-
def _generate_a_non_existent_security_group_id(self):
security_group_id = []
resp, body = self.client.list_security_groups()
@@ -107,11 +103,8 @@
s_name = data_utils.rand_name('securitygroup-')
s_description = data_utils.rand_name('description-')
resp, security_group =\
- self.client.create_security_group(s_name, s_description)
+ self.create_security_group(s_name, s_description)
self.assertEqual(200, resp.status)
-
- self.addCleanup(self.client.delete_security_group,
- security_group['id'])
# Now try the Security Group with the same 'Name'
self.assertRaises(exceptions.BadRequest,
self.client.create_security_group, s_name,
@@ -163,15 +156,10 @@
@test.attr(type=['negative', 'gate'])
def test_update_security_group_with_invalid_sg_name(self):
# Update security_group with invalid sg_name should fail
- s_name = data_utils.rand_name('sg-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name, s_description)
+ resp, securitygroup = self.create_security_group()
self.assertEqual(200, resp.status)
self.assertIn('id', securitygroup)
securitygroup_id = securitygroup['id']
- self.addCleanup(self._delete_security_group,
- securitygroup_id)
# Update Security Group with group name longer than 255 chars
s_new_name = 'securitygroup-'.ljust(260, '0')
self.assertRaises(exceptions.BadRequest,
@@ -183,15 +171,10 @@
@test.attr(type=['negative', 'gate'])
def test_update_security_group_with_invalid_sg_des(self):
# Update security_group with invalid sg_des should fail
- s_name = data_utils.rand_name('sg-')
- s_description = data_utils.rand_name('description-')
- resp, securitygroup = \
- self.client.create_security_group(s_name, s_description)
+ resp, securitygroup = self.create_security_group()
self.assertEqual(200, resp.status)
self.assertIn('id', securitygroup)
securitygroup_id = securitygroup['id']
- self.addCleanup(self._delete_security_group,
- securitygroup_id)
# Update Security Group with group description longer than 255 chars
s_new_des = 'des-'.ljust(260, '0')
self.assertRaises(exceptions.BadRequest,
diff --git a/tempest/api/compute/servers/test_server_addresses.py b/tempest/api/compute/servers/test_server_addresses.py
index 8e432c4..d5528c4 100644
--- a/tempest/api/compute/servers/test_server_addresses.py
+++ b/tempest/api/compute/servers/test_server_addresses.py
@@ -14,8 +14,11 @@
# under the License.
from tempest.api.compute import base
+from tempest import config
from tempest import test
+CONF = config.CONF
+
class ServerAddressesTestJSON(base.BaseV2ComputeTest):
_interface = 'json'
@@ -29,6 +32,8 @@
resp, cls.server = cls.create_test_server(wait_until='ACTIVE')
+ @test.skip_because(bug="1210483",
+ condition=CONF.service_available.neutron)
@test.attr(type='smoke')
def test_list_server_addresses(self):
# All public and private addresses for
diff --git a/tempest/api/compute/v3/admin/test_servers.py b/tempest/api/compute/v3/admin/test_servers.py
index aaa4d7f..653eaf0 100644
--- a/tempest/api/compute/v3/admin/test_servers.py
+++ b/tempest/api/compute/v3/admin/test_servers.py
@@ -173,7 +173,7 @@
# The server in error state should be rebuilt using the provided
# image and changed to ACTIVE state
- # resetting vm state require admin priviledge
+ # resetting vm state require admin privilege
resp, server = self.client.reset_state(self.s1_id, state='error')
self.assertEqual(202, resp.status)
resp, rebuilt_server = self.non_admin_client.rebuild(
diff --git a/tempest/api/compute/v3/servers/test_server_addresses.py b/tempest/api/compute/v3/servers/test_server_addresses.py
index bffa7c4..038e254 100644
--- a/tempest/api/compute/v3/servers/test_server_addresses.py
+++ b/tempest/api/compute/v3/servers/test_server_addresses.py
@@ -14,8 +14,11 @@
# under the License.
from tempest.api.compute import base
+from tempest import config
from tempest import exceptions
-from tempest.test import attr
+from tempest import test
+
+CONF = config.CONF
class ServerAddressesV3Test(base.BaseV3ComputeTest):
@@ -30,20 +33,22 @@
resp, cls.server = cls.create_test_server(wait_until='ACTIVE')
- @attr(type=['negative', 'gate'])
+ @test.attr(type=['negative', 'gate'])
def test_list_server_addresses_invalid_server_id(self):
# List addresses request should fail if server id not in system
self.assertRaises(exceptions.NotFound, self.client.list_addresses,
'999')
- @attr(type=['negative', 'gate'])
+ @test.attr(type=['negative', 'gate'])
def test_list_server_addresses_by_network_neg(self):
# List addresses by network should fail if network name not valid
self.assertRaises(exceptions.NotFound,
self.client.list_addresses_by_network,
self.server['id'], 'invalid')
- @attr(type='smoke')
+ @test.skip_because(bug="1210483",
+ condition=CONF.service_available.neutron)
+ @test.attr(type='smoke')
def test_list_server_addresses(self):
# All public and private addresses for
# a server should be returned
@@ -60,7 +65,7 @@
self.assertTrue(address['addr'])
self.assertTrue(address['version'])
- @attr(type='smoke')
+ @test.attr(type='smoke')
def test_list_server_addresses_by_network(self):
# Providing a network type should filter
# the addresses return by that type
diff --git a/tempest/clients.py b/tempest/clients.py
index c262a20..d0eb1cc 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -439,8 +439,12 @@
"""
def __init__(self, interface='json', service=None):
base = super(OrchestrationManager, self)
+ # heat currently needs an admin user so that stacks can create users
+ # however the tests need the demo tenant so that the neutron
+ # private network is the default. DO NOT change this auth combination
+ # until heat can run with the demo user.
base.__init__(CONF.identity.admin_username,
CONF.identity.admin_password,
- CONF.identity.admin_tenant_name,
+ CONF.identity.tenant_name,
interface=interface,
service=service)
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index 2066d56..af5045a 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -63,11 +63,6 @@
# The version of the API this client implements
self.api_version = None
self._skip_path = False
- # NOTE(vponomaryov): self.headers is deprecated now.
- # should be removed after excluding it from all use places.
- # Insted of this should be used 'get_headers' method
- self.headers = {'Content-Type': 'application/%s' % self.TYPE,
- 'Accept': 'application/%s' % self.TYPE}
self.build_interval = CONF.compute.build_interval
self.build_timeout = CONF.compute.build_timeout
self.general_header_lc = set(('cache-control', 'connection',
@@ -86,8 +81,6 @@
return self.TYPE
def get_headers(self, accept_type=None, send_type=None):
- # This method should be used instead of
- # deprecated 'self.headers'
if accept_type is None:
accept_type = self._get_type()
if send_type is None:
diff --git a/tempest/common/ssh.py b/tempest/common/ssh.py
index c772ce9..b6fa0a0 100644
--- a/tempest/common/ssh.py
+++ b/tempest/common/ssh.py
@@ -72,7 +72,7 @@
look_for_keys=self.look_for_keys,
key_filename=self.key_filename,
timeout=self.channel_timeout, pkey=self.pkey)
- LOG.info("ssh connection to %s@%s sucessfuly created",
+ LOG.info("ssh connection to %s@%s successfuly created",
self.username, self.host)
return ssh
except (socket.error,
diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py
index 8d043ae..841f9e1 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -114,7 +114,7 @@
detach_volume_client(server.id, volume.id)
self._wait_for_volume_status(volume, 'available')
- def _wait_for_volume_availible_on_the_system(self, server_or_ip):
+ def _wait_for_volume_available_on_the_system(self, server_or_ip):
ssh = self.get_remote_client(server_or_ip)
def _func():
@@ -161,7 +161,7 @@
ip_for_server = server
self._attach_volume(server, volume)
- self._wait_for_volume_availible_on_the_system(ip_for_server)
+ self._wait_for_volume_available_on_the_system(ip_for_server)
self._create_timestamp(ip_for_server)
self._detach_volume(server, volume)
@@ -189,7 +189,7 @@
# attach volume2 to instance2
self._attach_volume(server_from_snapshot, volume_from_snapshot)
- self._wait_for_volume_availible_on_the_system(ip_for_snapshot)
+ self._wait_for_volume_available_on_the_system(ip_for_snapshot)
# check the existence of the timestamp file in the volume2
self._check_timestamp(ip_for_snapshot)
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
index aa52081..e26f570 100644
--- a/tempest/services/compute/json/aggregates_client.py
+++ b/tempest/services/compute/json/aggregates_client.py
@@ -43,7 +43,7 @@
def create_aggregate(self, **kwargs):
"""Creates a new aggregate."""
post_body = json.dumps({'aggregate': kwargs})
- resp, body = self.post('os-aggregates', post_body, self.headers)
+ resp, body = self.post('os-aggregates', post_body)
body = json.loads(body)
return resp, body['aggregate']
@@ -55,8 +55,7 @@
'availability_zone': availability_zone
}
put_body = json.dumps({'aggregate': put_body})
- resp, body = self.put('os-aggregates/%s' % str(aggregate_id),
- put_body, self.headers)
+ resp, body = self.put('os-aggregates/%s' % str(aggregate_id), put_body)
body = json.loads(body)
return resp, body['aggregate']
@@ -79,7 +78,7 @@
}
post_body = json.dumps({'add_host': post_body})
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['aggregate']
@@ -90,7 +89,7 @@
}
post_body = json.dumps({'remove_host': post_body})
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['aggregate']
@@ -101,6 +100,6 @@
}
post_body = json.dumps({'set_metadata': post_body})
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['aggregate']
diff --git a/tempest/services/compute/json/certificates_client.py b/tempest/services/compute/json/certificates_client.py
index b7135f6..de0f1a8 100644
--- a/tempest/services/compute/json/certificates_client.py
+++ b/tempest/services/compute/json/certificates_client.py
@@ -36,6 +36,6 @@
def create_certificate(self):
"""create certificates."""
url = "os-certificates"
- resp, body = self.post(url, None, self.headers)
+ resp, body = self.post(url, None)
body = json.loads(body)
return resp, body['certificate']
diff --git a/tempest/services/compute/json/fixed_ips_client.py b/tempest/services/compute/json/fixed_ips_client.py
index 144b7dc..af750a3 100644
--- a/tempest/services/compute/json/fixed_ips_client.py
+++ b/tempest/services/compute/json/fixed_ips_client.py
@@ -36,5 +36,5 @@
def reserve_fixed_ip(self, ip, body):
"""This reserves and unreserves fixed ips."""
url = "os-fixed-ips/%s/action" % (ip)
- resp, body = self.post(url, json.dumps(body), self.headers)
+ resp, body = self.post(url, json.dumps(body))
return resp, body
diff --git a/tempest/services/compute/json/flavors_client.py b/tempest/services/compute/json/flavors_client.py
index 96ab6d7..289b09e 100644
--- a/tempest/services/compute/json/flavors_client.py
+++ b/tempest/services/compute/json/flavors_client.py
@@ -69,7 +69,7 @@
if kwargs.get('is_public'):
post_body['os-flavor-access:is_public'] = kwargs.get('is_public')
post_body = json.dumps({'flavor': post_body})
- resp, body = self.post('flavors', post_body, self.headers)
+ resp, body = self.post('flavors', post_body)
body = json.loads(body)
return resp, body['flavor']
@@ -92,7 +92,7 @@
"""Sets extra Specs to the mentioned flavor."""
post_body = json.dumps({'extra_specs': specs})
resp, body = self.post('flavors/%s/os-extra_specs' % flavor_id,
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['extra_specs']
@@ -112,8 +112,7 @@
def update_flavor_extra_spec(self, flavor_id, key, **kwargs):
"""Update specified extra Specs of the mentioned flavor and key."""
resp, body = self.put('flavors/%s/os-extra_specs/%s' %
- (flavor_id, key),
- json.dumps(kwargs), self.headers)
+ (flavor_id, key), json.dumps(kwargs))
body = json.loads(body)
return resp, body
@@ -124,8 +123,7 @@
def list_flavor_access(self, flavor_id):
"""Gets flavor access information given the flavor id."""
- resp, body = self.get('flavors/%s/os-flavor-access' % flavor_id,
- self.headers)
+ resp, body = self.get('flavors/%s/os-flavor-access' % flavor_id)
body = json.loads(body)
return resp, body['flavor_access']
@@ -137,8 +135,7 @@
}
}
post_body = json.dumps(post_body)
- resp, body = self.post('flavors/%s/action' % flavor_id,
- post_body, self.headers)
+ resp, body = self.post('flavors/%s/action' % flavor_id, post_body)
body = json.loads(body)
return resp, body['flavor_access']
@@ -150,7 +147,6 @@
}
}
post_body = json.dumps(post_body)
- resp, body = self.post('flavors/%s/action' % flavor_id,
- post_body, self.headers)
+ resp, body = self.post('flavors/%s/action' % flavor_id, post_body)
body = json.loads(body)
return resp, body['flavor_access']
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
index 2bf5241..0385160 100644
--- a/tempest/services/compute/json/floating_ips_client.py
+++ b/tempest/services/compute/json/floating_ips_client.py
@@ -52,7 +52,7 @@
url = 'os-floating-ips'
post_body = {'pool': pool_name}
post_body = json.dumps(post_body)
- resp, body = self.post(url, post_body, self.headers)
+ resp, body = self.post(url, post_body)
body = json.loads(body)
return resp, body['floating_ip']
@@ -72,7 +72,7 @@
}
post_body = json.dumps(post_body)
- resp, body = self.post(url, post_body, self.headers)
+ resp, body = self.post(url, post_body)
return resp, body
def disassociate_floating_ip_from_server(self, floating_ip, server_id):
@@ -85,7 +85,7 @@
}
post_body = json.dumps(post_body)
- resp, body = self.post(url, post_body, self.headers)
+ resp, body = self.post(url, post_body)
return resp, body
def is_resource_deleted(self, id):
diff --git a/tempest/services/compute/json/hosts_client.py b/tempest/services/compute/json/hosts_client.py
index aa63927..d826a78 100644
--- a/tempest/services/compute/json/hosts_client.py
+++ b/tempest/services/compute/json/hosts_client.py
@@ -55,8 +55,7 @@
request_body.update(**kwargs)
request_body = json.dumps(request_body)
- resp, body = self.put("os-hosts/%s" % str(hostname), request_body,
- self.headers)
+ resp, body = self.put("os-hosts/%s" % str(hostname), request_body)
body = json.loads(body)
return resp, body
diff --git a/tempest/services/compute/json/images_client.py b/tempest/services/compute/json/images_client.py
index 7324d84..b3d8c35 100644
--- a/tempest/services/compute/json/images_client.py
+++ b/tempest/services/compute/json/images_client.py
@@ -46,7 +46,7 @@
post_body = json.dumps(post_body)
resp, body = self.post('servers/%s/action' % str(server_id),
- post_body, self.headers)
+ post_body)
return resp, body
def list_images(self, params=None):
@@ -93,16 +93,14 @@
def set_image_metadata(self, image_id, meta):
"""Sets the metadata for an image."""
post_body = json.dumps({'metadata': meta})
- resp, body = self.put('images/%s/metadata' % str(image_id),
- post_body, self.headers)
+ resp, body = self.put('images/%s/metadata' % str(image_id), post_body)
body = json.loads(body)
return resp, body['metadata']
def update_image_metadata(self, image_id, meta):
"""Updates the metadata for an image."""
post_body = json.dumps({'metadata': meta})
- resp, body = self.post('images/%s/metadata' % str(image_id),
- post_body, self.headers)
+ resp, body = self.post('images/%s/metadata' % str(image_id), post_body)
body = json.loads(body)
return resp, body['metadata']
@@ -116,7 +114,7 @@
"""Sets the value for a specific image metadata key."""
post_body = json.dumps({'meta': meta})
resp, body = self.put('images/%s/metadata/%s' % (str(image_id), key),
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['meta']
diff --git a/tempest/services/compute/json/interfaces_client.py b/tempest/services/compute/json/interfaces_client.py
index d9a2030..f4c4c64 100644
--- a/tempest/services/compute/json/interfaces_client.py
+++ b/tempest/services/compute/json/interfaces_client.py
@@ -46,7 +46,6 @@
post_body['interfaceAttachment']['fixed_ips'] = [fip]
post_body = json.dumps(post_body)
resp, body = self.post('servers/%s/os-interface' % server,
- headers=self.headers,
body=post_body)
body = json.loads(body)
return resp, body['interfaceAttachment']
diff --git a/tempest/services/compute/json/keypairs_client.py b/tempest/services/compute/json/keypairs_client.py
index 3e2d4a7..356c2e6 100644
--- a/tempest/services/compute/json/keypairs_client.py
+++ b/tempest/services/compute/json/keypairs_client.py
@@ -47,8 +47,7 @@
if pub_key:
post_body['keypair']['public_key'] = pub_key
post_body = json.dumps(post_body)
- resp, body = self.post("os-keypairs",
- headers=self.headers, body=post_body)
+ resp, body = self.post("os-keypairs", body=post_body)
body = json.loads(body)
return resp, body['keypair']
diff --git a/tempest/services/compute/json/quotas_client.py b/tempest/services/compute/json/quotas_client.py
index 2007d4e..7607cc0 100644
--- a/tempest/services/compute/json/quotas_client.py
+++ b/tempest/services/compute/json/quotas_client.py
@@ -96,8 +96,7 @@
post_body['security_groups'] = security_groups
post_body = json.dumps({'quota_set': post_body})
- resp, body = self.put('os-quota-sets/%s' % str(tenant_id), post_body,
- self.headers)
+ resp, body = self.put('os-quota-sets/%s' % str(tenant_id), post_body)
body = json.loads(body)
return resp, body['quota_set']
diff --git a/tempest/services/compute/json/security_groups_client.py b/tempest/services/compute/json/security_groups_client.py
index edaf4a3..2cd2d2e 100644
--- a/tempest/services/compute/json/security_groups_client.py
+++ b/tempest/services/compute/json/security_groups_client.py
@@ -58,7 +58,7 @@
'description': description,
}
post_body = json.dumps({'security_group': post_body})
- resp, body = self.post('os-security-groups', post_body, self.headers)
+ resp, body = self.post('os-security-groups', post_body)
body = json.loads(body)
return resp, body['security_group']
@@ -77,7 +77,7 @@
post_body['description'] = description
post_body = json.dumps({'security_group': post_body})
resp, body = self.put('os-security-groups/%s' % str(security_group_id),
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['security_group']
@@ -107,7 +107,7 @@
}
post_body = json.dumps({'security_group_rule': post_body})
url = 'os-security-group-rules'
- resp, body = self.post(url, post_body, self.headers)
+ resp, body = self.post(url, post_body)
body = json.loads(body)
return resp, body['security_group_rule']
@@ -123,3 +123,10 @@
if sg['id'] == security_group_id:
return resp, sg['rules']
raise exceptions.NotFound('No such Security Group')
+
+ def is_resource_deleted(self, id):
+ try:
+ self.get_security_group(id)
+ except exceptions.NotFound:
+ return True
+ return False
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index 371a59c..025c4e5 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -78,7 +78,7 @@
if value is not None:
post_body[post_param] = value
post_body = json.dumps({'server': post_body})
- resp, body = self.post('servers', post_body, self.headers)
+ resp, body = self.post('servers', post_body)
body = json.loads(body)
# NOTE(maurosr): this deals with the case of multiple server create
@@ -116,8 +116,7 @@
post_body['OS-DCF:diskConfig'] = disk_config
post_body = json.dumps({'server': post_body})
- resp, body = self.put("servers/%s" % str(server_id),
- post_body, self.headers)
+ resp, body = self.put("servers/%s" % str(server_id), post_body)
body = json.loads(body)
return resp, body['server']
@@ -194,7 +193,7 @@
def action(self, server_id, action_name, response_key, **kwargs):
post_body = json.dumps({action_name: kwargs})
resp, body = self.post('servers/%s/action' % str(server_id),
- post_body, self.headers)
+ post_body)
if response_key is not None:
body = json.loads(body)[response_key]
return resp, body
@@ -269,14 +268,14 @@
else:
post_body = json.dumps({'metadata': meta})
resp, body = self.put('servers/%s/metadata' % str(server_id),
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['metadata']
def update_server_metadata(self, server_id, meta):
post_body = json.dumps({'metadata': meta})
resp, body = self.post('servers/%s/metadata' % str(server_id),
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['metadata']
@@ -288,7 +287,7 @@
def set_server_metadata_item(self, server_id, key, meta):
post_body = json.dumps({'meta': meta})
resp, body = self.put('servers/%s/metadata/%s' % (str(server_id), key),
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['meta']
@@ -312,7 +311,7 @@
}
})
resp, body = self.post('servers/%s/os-volume_attachments' % server_id,
- post_body, self.headers)
+ post_body)
return resp, body
def detach_volume(self, server_id, volume_id):
@@ -340,8 +339,7 @@
req_body = json.dumps({'os-migrateLive': migrate_params})
- resp, body = self.post("servers/%s/action" % str(server_id),
- req_body, self.headers)
+ resp, body = self.post("servers/%s/action" % str(server_id), req_body)
return resp, body
def migrate_server(self, server_id, **kwargs):
diff --git a/tempest/services/compute/json/services_client.py b/tempest/services/compute/json/services_client.py
index 4abee47..8380dc2 100644
--- a/tempest/services/compute/json/services_client.py
+++ b/tempest/services/compute/json/services_client.py
@@ -45,7 +45,7 @@
binary: Service binary
"""
post_body = json.dumps({'binary': binary, 'host': host_name})
- resp, body = self.put('os-services/enable', post_body, self.headers)
+ resp, body = self.put('os-services/enable', post_body)
body = json.loads(body)
return resp, body['service']
@@ -56,6 +56,6 @@
binary: Service binary
"""
post_body = json.dumps({'binary': binary, 'host': host_name})
- resp, body = self.put('os-services/disable', post_body, self.headers)
+ resp, body = self.put('os-services/disable', post_body)
body = json.loads(body)
return resp, body['service']
diff --git a/tempest/services/compute/json/volumes_extensions_client.py b/tempest/services/compute/json/volumes_extensions_client.py
index ba7b5df..4b9dc0b 100644
--- a/tempest/services/compute/json/volumes_extensions_client.py
+++ b/tempest/services/compute/json/volumes_extensions_client.py
@@ -75,7 +75,7 @@
}
post_body = json.dumps({'volume': post_body})
- resp, body = self.post('os-volumes', post_body, self.headers)
+ resp, body = self.post('os-volumes', post_body)
body = json.loads(body)
return resp, body['volume']
diff --git a/tempest/services/compute/v3/json/aggregates_client.py b/tempest/services/compute/v3/json/aggregates_client.py
index 6bc758c..20ce87b 100644
--- a/tempest/services/compute/v3/json/aggregates_client.py
+++ b/tempest/services/compute/v3/json/aggregates_client.py
@@ -43,7 +43,7 @@
def create_aggregate(self, **kwargs):
"""Creates a new aggregate."""
post_body = json.dumps({'aggregate': kwargs})
- resp, body = self.post('os-aggregates', post_body, self.headers)
+ resp, body = self.post('os-aggregates', post_body)
body = json.loads(body)
return resp, body['aggregate']
@@ -55,8 +55,7 @@
'availability_zone': availability_zone
}
put_body = json.dumps({'aggregate': put_body})
- resp, body = self.put('os-aggregates/%s' % str(aggregate_id),
- put_body, self.headers)
+ resp, body = self.put('os-aggregates/%s' % str(aggregate_id), put_body)
body = json.loads(body)
return resp, body['aggregate']
@@ -79,7 +78,7 @@
}
post_body = json.dumps({'add_host': post_body})
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['aggregate']
@@ -90,7 +89,7 @@
}
post_body = json.dumps({'remove_host': post_body})
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['aggregate']
@@ -101,6 +100,6 @@
}
post_body = json.dumps({'set_metadata': post_body})
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['aggregate']
diff --git a/tempest/services/compute/v3/json/certificates_client.py b/tempest/services/compute/v3/json/certificates_client.py
index 0c9f9ac..620eedf 100644
--- a/tempest/services/compute/v3/json/certificates_client.py
+++ b/tempest/services/compute/v3/json/certificates_client.py
@@ -36,6 +36,6 @@
def create_certificate(self):
"""create certificates."""
url = "os-certificates"
- resp, body = self.post(url, None, self.headers)
+ resp, body = self.post(url, None)
body = json.loads(body)
return resp, body['certificate']
diff --git a/tempest/services/compute/v3/json/flavors_client.py b/tempest/services/compute/v3/json/flavors_client.py
index df3d0c1..f9df2b8 100644
--- a/tempest/services/compute/v3/json/flavors_client.py
+++ b/tempest/services/compute/v3/json/flavors_client.py
@@ -69,7 +69,7 @@
if kwargs.get('is_public'):
post_body['flavor-access:is_public'] = kwargs.get('is_public')
post_body = json.dumps({'flavor': post_body})
- resp, body = self.post('flavors', post_body, self.headers)
+ resp, body = self.post('flavors', post_body)
body = json.loads(body)
return resp, body['flavor']
@@ -92,7 +92,7 @@
"""Sets extra Specs to the mentioned flavor."""
post_body = json.dumps({'extra_specs': specs})
resp, body = self.post('flavors/%s/flavor-extra-specs' % flavor_id,
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['extra_specs']
@@ -112,8 +112,7 @@
def update_flavor_extra_spec(self, flavor_id, key, **kwargs):
"""Update specified extra Specs of the mentioned flavor and key."""
resp, body = self.put('flavors/%s/flavor-extra-specs/%s' %
- (flavor_id, key),
- json.dumps(kwargs), self.headers)
+ (flavor_id, key), json.dumps(kwargs))
body = json.loads(body)
return resp, body
@@ -124,8 +123,7 @@
def list_flavor_access(self, flavor_id):
"""Gets flavor access information given the flavor id."""
- resp, body = self.get('flavors/%s/flavor-access' % flavor_id,
- self.headers)
+ resp, body = self.get('flavors/%s/flavor-access' % flavor_id)
body = json.loads(body)
return resp, body['flavor_access']
@@ -137,8 +135,7 @@
}
}
post_body = json.dumps(post_body)
- resp, body = self.post('flavors/%s/action' % flavor_id,
- post_body, self.headers)
+ resp, body = self.post('flavors/%s/action' % flavor_id, post_body)
body = json.loads(body)
return resp, body['flavor_access']
@@ -150,7 +147,6 @@
}
}
post_body = json.dumps(post_body)
- resp, body = self.post('flavors/%s/action' % flavor_id,
- post_body, self.headers)
+ resp, body = self.post('flavors/%s/action' % flavor_id, post_body)
body = json.loads(body)
return resp, body['flavor_access']
diff --git a/tempest/services/compute/v3/json/hosts_client.py b/tempest/services/compute/v3/json/hosts_client.py
index e33dd5f..76af626 100644
--- a/tempest/services/compute/v3/json/hosts_client.py
+++ b/tempest/services/compute/v3/json/hosts_client.py
@@ -55,8 +55,7 @@
request_body.update(**kwargs)
request_body = json.dumps({'host': request_body})
- resp, body = self.put("os-hosts/%s" % str(hostname), request_body,
- self.headers)
+ resp, body = self.put("os-hosts/%s" % str(hostname), request_body)
body = json.loads(body)
return resp, body
diff --git a/tempest/services/compute/v3/json/interfaces_client.py b/tempest/services/compute/v3/json/interfaces_client.py
index 053b9af..c167520 100644
--- a/tempest/services/compute/v3/json/interfaces_client.py
+++ b/tempest/services/compute/v3/json/interfaces_client.py
@@ -45,7 +45,6 @@
post_body['fixed_ips'] = [dict(ip_address=fixed_ip)]
post_body = json.dumps({'interface_attachment': post_body})
resp, body = self.post('servers/%s/os-attach-interfaces' % server,
- headers=self.headers,
body=post_body)
body = json.loads(body)
return resp, body['interface_attachment']
diff --git a/tempest/services/compute/v3/json/keypairs_client.py b/tempest/services/compute/v3/json/keypairs_client.py
index 05dbe25..821b86f 100644
--- a/tempest/services/compute/v3/json/keypairs_client.py
+++ b/tempest/services/compute/v3/json/keypairs_client.py
@@ -47,8 +47,7 @@
if pub_key:
post_body['keypair']['public_key'] = pub_key
post_body = json.dumps(post_body)
- resp, body = self.post("keypairs",
- headers=self.headers, body=post_body)
+ resp, body = self.post("keypairs", body=post_body)
body = json.loads(body)
return resp, body['keypair']
diff --git a/tempest/services/compute/v3/json/quotas_client.py b/tempest/services/compute/v3/json/quotas_client.py
index 1ec8651..a01b9d2 100644
--- a/tempest/services/compute/v3/json/quotas_client.py
+++ b/tempest/services/compute/v3/json/quotas_client.py
@@ -84,8 +84,7 @@
post_body['security_groups'] = security_groups
post_body = json.dumps({'quota_set': post_body})
- resp, body = self.put('os-quota-sets/%s' % str(tenant_id), post_body,
- self.headers)
+ resp, body = self.put('os-quota-sets/%s' % str(tenant_id), post_body)
body = json.loads(body)
return resp, body['quota_set']
diff --git a/tempest/services/compute/v3/json/servers_client.py b/tempest/services/compute/v3/json/servers_client.py
index 56459d4..840e914 100644
--- a/tempest/services/compute/v3/json/servers_client.py
+++ b/tempest/services/compute/v3/json/servers_client.py
@@ -84,7 +84,7 @@
if value is not None:
post_body[post_param] = value
post_body = json.dumps({'server': post_body})
- resp, body = self.post('servers', post_body, self.headers)
+ resp, body = self.post('servers', post_body)
body = json.loads(body)
# NOTE(maurosr): this deals with the case of multiple server create
@@ -121,8 +121,7 @@
post_body['os-disk-config:disk_config'] = disk_config
post_body = json.dumps({'server': post_body})
- resp, body = self.put("servers/%s" % str(server_id),
- post_body, self.headers)
+ resp, body = self.put("servers/%s" % str(server_id), post_body)
body = json.loads(body)
return resp, body['server']
@@ -199,7 +198,7 @@
def action(self, server_id, action_name, response_key, **kwargs):
post_body = json.dumps({action_name: kwargs})
resp, body = self.post('servers/%s/action' % str(server_id),
- post_body, self.headers)
+ post_body)
if response_key is not None:
body = json.loads(body)[response_key]
return resp, body
@@ -273,7 +272,7 @@
post_body = json.dumps(post_body)
resp, body = self.post('servers/%s/action' % str(server_id),
- post_body, self.headers)
+ post_body)
return resp, body
def list_server_metadata(self, server_id):
@@ -287,14 +286,14 @@
else:
post_body = json.dumps({'metadata': meta})
resp, body = self.put('servers/%s/metadata' % str(server_id),
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['metadata']
def update_server_metadata(self, server_id, meta):
post_body = json.dumps({'metadata': meta})
resp, body = self.post('servers/%s/metadata' % str(server_id),
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['metadata']
@@ -306,7 +305,7 @@
def set_server_metadata_item(self, server_id, key, meta):
post_body = json.dumps({'metadata': meta})
resp, body = self.put('servers/%s/metadata/%s' % (str(server_id), key),
- post_body, self.headers)
+ post_body)
body = json.loads(body)
return resp, body['metadata']
@@ -342,7 +341,7 @@
req_body = json.dumps({'migrate_live': migrate_params})
resp, body = self.post("servers/%s/action" % str(server_id),
- req_body, self.headers)
+ req_body)
return resp, body
def migrate_server(self, server_id, **kwargs):
diff --git a/tempest/services/compute/v3/json/services_client.py b/tempest/services/compute/v3/json/services_client.py
index 1082ea9..e20dfde 100644
--- a/tempest/services/compute/v3/json/services_client.py
+++ b/tempest/services/compute/v3/json/services_client.py
@@ -50,7 +50,7 @@
'host': host_name
}
})
- resp, body = self.put('os-services/enable', post_body, self.headers)
+ resp, body = self.put('os-services/enable', post_body)
body = json.loads(body)
return resp, body['service']
@@ -66,6 +66,6 @@
'host': host_name
}
})
- resp, body = self.put('os-services/disable', post_body, self.headers)
+ resp, body = self.put('os-services/disable', post_body)
body = json.loads(body)
return resp, body['service']
diff --git a/tempest/services/compute/xml/aggregates_client.py b/tempest/services/compute/xml/aggregates_client.py
index ba08f58..cf853ba 100644
--- a/tempest/services/compute/xml/aggregates_client.py
+++ b/tempest/services/compute/xml/aggregates_client.py
@@ -51,14 +51,13 @@
def list_aggregates(self):
"""Get aggregate list."""
- resp, body = self.get("os-aggregates", self.headers)
+ resp, body = self.get("os-aggregates")
aggregates = self._parse_array(etree.fromstring(body))
return resp, aggregates
def get_aggregate(self, aggregate_id):
"""Get details of the given aggregate."""
- resp, body = self.get("os-aggregates/%s" % str(aggregate_id),
- self.headers)
+ resp, body = self.get("os-aggregates/%s" % str(aggregate_id))
aggregate = self._format_aggregate(etree.fromstring(body))
return resp, aggregate
@@ -68,8 +67,7 @@
name=name,
availability_zone=availability_zone)
resp, body = self.post('os-aggregates',
- str(Document(post_body)),
- self.headers)
+ str(Document(post_body)))
aggregate = self._format_aggregate(etree.fromstring(body))
return resp, aggregate
@@ -79,15 +77,13 @@
name=name,
availability_zone=availability_zone)
resp, body = self.put('os-aggregates/%s' % str(aggregate_id),
- str(Document(put_body)),
- self.headers)
+ str(Document(put_body)))
aggregate = self._format_aggregate(etree.fromstring(body))
return resp, aggregate
def delete_aggregate(self, aggregate_id):
"""Deletes the given aggregate."""
- return self.delete("os-aggregates/%s" % str(aggregate_id),
- self.headers)
+ return self.delete("os-aggregates/%s" % str(aggregate_id))
def is_resource_deleted(self, id):
try:
@@ -100,8 +96,7 @@
"""Adds a host to the given aggregate."""
post_body = Element("add_host", host=host)
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
- str(Document(post_body)),
- self.headers)
+ str(Document(post_body)))
aggregate = self._format_aggregate(etree.fromstring(body))
return resp, aggregate
@@ -109,8 +104,7 @@
"""Removes a host from the given aggregate."""
post_body = Element("remove_host", host=host)
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
- str(Document(post_body)),
- self.headers)
+ str(Document(post_body)))
aggregate = self._format_aggregate(etree.fromstring(body))
return resp, aggregate
@@ -124,7 +118,6 @@
meta.append(Text(v))
metadata.append(meta)
resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
- str(Document(post_body)),
- self.headers)
+ str(Document(post_body)))
aggregate = self._format_aggregate(etree.fromstring(body))
return resp, aggregate
diff --git a/tempest/services/compute/xml/availability_zone_client.py b/tempest/services/compute/xml/availability_zone_client.py
index 38280b5..3d8ac8a 100644
--- a/tempest/services/compute/xml/availability_zone_client.py
+++ b/tempest/services/compute/xml/availability_zone_client.py
@@ -33,11 +33,11 @@
return [xml_to_json(x) for x in node]
def get_availability_zone_list(self):
- resp, body = self.get('os-availability-zone', self.headers)
+ resp, body = self.get('os-availability-zone')
availability_zone = self._parse_array(etree.fromstring(body))
return resp, availability_zone
def get_availability_zone_list_detail(self):
- resp, body = self.get('os-availability-zone/detail', self.headers)
+ resp, body = self.get('os-availability-zone/detail')
availability_zone = self._parse_array(etree.fromstring(body))
return resp, availability_zone
diff --git a/tempest/services/compute/xml/certificates_client.py b/tempest/services/compute/xml/certificates_client.py
index aad20a4..4ee10c4 100644
--- a/tempest/services/compute/xml/certificates_client.py
+++ b/tempest/services/compute/xml/certificates_client.py
@@ -28,13 +28,13 @@
def get_certificate(self, id):
url = "os-certificates/%s" % (id)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_resp(body)
return resp, body
def create_certificate(self):
"""create certificates."""
url = "os-certificates"
- resp, body = self.post(url, None, self.headers)
+ resp, body = self.post(url, None)
body = self._parse_resp(body)
return resp, body
diff --git a/tempest/services/compute/xml/extensions_client.py b/tempest/services/compute/xml/extensions_client.py
index 9753ca8..f97b64d 100644
--- a/tempest/services/compute/xml/extensions_client.py
+++ b/tempest/services/compute/xml/extensions_client.py
@@ -36,7 +36,7 @@
def list_extensions(self):
url = 'extensions'
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_array(etree.fromstring(body))
return resp, body
@@ -46,6 +46,6 @@
return any([e for e in exts if e['name'] == extension])
def get_extension(self, extension_alias):
- resp, body = self.get('extensions/%s' % extension_alias, self.headers)
+ resp, body = self.get('extensions/%s' % extension_alias)
body = xml_to_json(etree.fromstring(body))
return resp, body
diff --git a/tempest/services/compute/xml/fixed_ips_client.py b/tempest/services/compute/xml/fixed_ips_client.py
index 599e168..b89e096 100644
--- a/tempest/services/compute/xml/fixed_ips_client.py
+++ b/tempest/services/compute/xml/fixed_ips_client.py
@@ -31,7 +31,7 @@
def get_fixed_ip_details(self, fixed_ip):
url = "os-fixed-ips/%s" % (fixed_ip)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_resp(body)
return resp, body
@@ -44,5 +44,5 @@
key, value = body.popitem()
xml_body = Element(key)
xml_body.append(Text(value))
- resp, body = self.post(url, str(Document(xml_body)), self.headers)
+ resp, body = self.post(url, str(Document(xml_body)))
return resp, body
diff --git a/tempest/services/compute/xml/flavors_client.py b/tempest/services/compute/xml/flavors_client.py
index fb16d20..554b253 100644
--- a/tempest/services/compute/xml/flavors_client.py
+++ b/tempest/services/compute/xml/flavors_client.py
@@ -81,7 +81,7 @@
if params:
url += "?%s" % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
flavors = self._parse_array(etree.fromstring(body))
return resp, flavors
@@ -94,7 +94,7 @@
return self._list_flavors(url, params)
def get_flavor_details(self, flavor_id):
- resp, body = self.get("flavors/%s" % str(flavor_id), self.headers)
+ resp, body = self.get("flavors/%s" % str(flavor_id))
body = xml_to_json(etree.fromstring(body))
flavor = self._format_flavor(body)
return resp, flavor
@@ -120,14 +120,14 @@
kwargs.get('is_public'))
flavor.add_attr('xmlns:OS-FLV-EXT-DATA', XMLNS_OS_FLV_EXT_DATA)
flavor.add_attr('xmlns:os-flavor-access', XMLNS_OS_FLV_ACCESS)
- resp, body = self.post('flavors', str(Document(flavor)), self.headers)
+ resp, body = self.post('flavors', str(Document(flavor)))
body = xml_to_json(etree.fromstring(body))
flavor = self._format_flavor(body)
return resp, flavor
def delete_flavor(self, flavor_id):
"""Deletes the given flavor."""
- return self.delete("flavors/%s" % str(flavor_id), self.headers)
+ return self.delete("flavors/%s" % str(flavor_id))
def is_resource_deleted(self, id):
# Did not use get_flavor_details(id) for verification as it gives
@@ -145,21 +145,20 @@
for key in specs.keys():
extra_specs.add_attr(key, specs[key])
resp, body = self.post('flavors/%s/os-extra_specs' % flavor_id,
- str(Document(extra_specs)), self.headers)
+ str(Document(extra_specs)))
body = xml_to_json(etree.fromstring(body))
return resp, body
def get_flavor_extra_spec(self, flavor_id):
"""Gets extra Specs of the mentioned flavor."""
- resp, body = self.get('flavors/%s/os-extra_specs' % flavor_id,
- self.headers)
+ resp, body = self.get('flavors/%s/os-extra_specs' % flavor_id)
body = xml_to_json(etree.fromstring(body))
return resp, body
def get_flavor_extra_spec_with_key(self, flavor_id, key):
"""Gets extra Specs key-value of the mentioned flavor and key."""
resp, xml_body = self.get('flavors/%s/os-extra_specs/%s' %
- (str(flavor_id), key), self.headers)
+ (str(flavor_id), key))
body = {}
element = etree.fromstring(xml_body)
key = element.get('key')
@@ -176,8 +175,7 @@
element.append(value)
resp, body = self.put('flavors/%s/os-extra_specs/%s' %
- (flavor_id, key),
- str(doc), self.headers)
+ (flavor_id, key), str(doc))
body = xml_to_json(etree.fromstring(body))
return resp, {key: body}
@@ -191,8 +189,7 @@
def list_flavor_access(self, flavor_id):
"""Gets flavor access information given the flavor id."""
- resp, body = self.get('flavors/%s/os-flavor-access' % str(flavor_id),
- self.headers)
+ resp, body = self.get('flavors/%s/os-flavor-access' % str(flavor_id))
body = self._parse_array(etree.fromstring(body))
return resp, body
@@ -202,8 +199,7 @@
server = Element("addTenantAccess")
doc.append(server)
server.add_attr("tenant", tenant_id)
- resp, body = self.post('flavors/%s/action' % str(flavor_id),
- str(doc), self.headers)
+ resp, body = self.post('flavors/%s/action' % str(flavor_id), str(doc))
body = self._parse_array_access(etree.fromstring(body))
return resp, body
@@ -213,7 +209,6 @@
server = Element("removeTenantAccess")
doc.append(server)
server.add_attr("tenant", tenant_id)
- resp, body = self.post('flavors/%s/action' % str(flavor_id),
- str(doc), self.headers)
+ resp, body = self.post('flavors/%s/action' % str(flavor_id), str(doc))
body = self._parse_array_access(etree.fromstring(body))
return resp, body
diff --git a/tempest/services/compute/xml/floating_ips_client.py b/tempest/services/compute/xml/floating_ips_client.py
index 0119d8a..d6decf3 100644
--- a/tempest/services/compute/xml/floating_ips_client.py
+++ b/tempest/services/compute/xml/floating_ips_client.py
@@ -48,14 +48,14 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_array(etree.fromstring(body))
return resp, body
def get_floating_ip_details(self, floating_ip_id):
"""Get the details of a floating IP."""
url = "os-floating-ips/%s" % str(floating_ip_id)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_floating_ip(etree.fromstring(body))
if resp.status == 404:
raise exceptions.NotFound(body)
@@ -69,16 +69,16 @@
pool = Element("pool")
pool.append(Text(pool_name))
doc.append(pool)
- resp, body = self.post(url, str(doc), self.headers)
+ resp, body = self.post(url, str(doc))
else:
- resp, body = self.post(url, None, self.headers)
+ resp, body = self.post(url, None)
body = self._parse_floating_ip(etree.fromstring(body))
return resp, body
def delete_floating_ip(self, floating_ip_id):
"""Deletes the provided floating IP from the project."""
url = "os-floating-ips/%s" % str(floating_ip_id)
- resp, body = self.delete(url, self.headers)
+ resp, body = self.delete(url)
return resp, body
def associate_floating_ip_to_server(self, floating_ip, server_id):
@@ -88,7 +88,7 @@
server = Element("addFloatingIp")
doc.append(server)
server.add_attr("address", floating_ip)
- resp, body = self.post(url, str(doc), self.headers)
+ resp, body = self.post(url, str(doc))
return resp, body
def disassociate_floating_ip_from_server(self, floating_ip, server_id):
@@ -98,7 +98,7 @@
server = Element("removeFloatingIp")
doc.append(server)
server.add_attr("address", floating_ip)
- resp, body = self.post(url, str(doc), self.headers)
+ resp, body = self.post(url, str(doc))
return resp, body
def is_resource_deleted(self, id):
@@ -114,6 +114,6 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_array(etree.fromstring(body))
return resp, body
diff --git a/tempest/services/compute/xml/hosts_client.py b/tempest/services/compute/xml/hosts_client.py
index daa83c9..13abe18 100644
--- a/tempest/services/compute/xml/hosts_client.py
+++ b/tempest/services/compute/xml/hosts_client.py
@@ -37,7 +37,7 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
node = etree.fromstring(body)
body = [xml_to_json(x) for x in node.getchildren()]
return resp, body
@@ -45,7 +45,7 @@
def show_host_detail(self, hostname):
"""Show detail information for the host."""
- resp, body = self.get("os-hosts/%s" % str(hostname), self.headers)
+ resp, body = self.get("os-hosts/%s" % str(hostname))
node = etree.fromstring(body)
body = [xml_to_json(node)]
return resp, body
@@ -58,8 +58,7 @@
for k, v in kwargs.iteritems():
request_body.append(Element(k, v))
resp, body = self.put("os-hosts/%s" % str(hostname),
- str(Document(request_body)),
- self.headers)
+ str(Document(request_body)))
node = etree.fromstring(body)
body = [xml_to_json(x) for x in node.getchildren()]
return resp, body
@@ -67,8 +66,7 @@
def startup_host(self, hostname):
"""Startup a host."""
- resp, body = self.get("os-hosts/%s/startup" % str(hostname),
- self.headers)
+ resp, body = self.get("os-hosts/%s/startup" % str(hostname))
node = etree.fromstring(body)
body = [xml_to_json(x) for x in node.getchildren()]
return resp, body
@@ -76,8 +74,7 @@
def shutdown_host(self, hostname):
"""Shutdown a host."""
- resp, body = self.get("os-hosts/%s/shutdown" % str(hostname),
- self.headers)
+ resp, body = self.get("os-hosts/%s/shutdown" % str(hostname))
node = etree.fromstring(body)
body = [xml_to_json(x) for x in node.getchildren()]
return resp, body
@@ -85,8 +82,7 @@
def reboot_host(self, hostname):
"""Reboot a host."""
- resp, body = self.get("os-hosts/%s/reboot" % str(hostname),
- self.headers)
+ resp, body = self.get("os-hosts/%s/reboot" % str(hostname))
node = etree.fromstring(body)
body = [xml_to_json(x) for x in node.getchildren()]
return resp, body
diff --git a/tempest/services/compute/xml/hypervisor_client.py b/tempest/services/compute/xml/hypervisor_client.py
index 5abaad8..3c1ef08 100644
--- a/tempest/services/compute/xml/hypervisor_client.py
+++ b/tempest/services/compute/xml/hypervisor_client.py
@@ -33,46 +33,42 @@
def get_hypervisor_list(self):
"""List hypervisors information."""
- resp, body = self.get('os-hypervisors', self.headers)
+ resp, body = self.get('os-hypervisors')
hypervisors = self._parse_array(etree.fromstring(body))
return resp, hypervisors
def get_hypervisor_list_details(self):
"""Show detailed hypervisors information."""
- resp, body = self.get('os-hypervisors/detail', self.headers)
+ resp, body = self.get('os-hypervisors/detail')
hypervisors = self._parse_array(etree.fromstring(body))
return resp, hypervisors
def get_hypervisor_show_details(self, hyper_id):
"""Display the details of the specified hypervisor."""
- resp, body = self.get('os-hypervisors/%s' % hyper_id,
- self.headers)
+ resp, body = self.get('os-hypervisors/%s' % hyper_id)
hypervisor = xml_to_json(etree.fromstring(body))
return resp, hypervisor
def get_hypervisor_servers(self, hyper_name):
"""List instances belonging to the specified hypervisor."""
- resp, body = self.get('os-hypervisors/%s/servers' % hyper_name,
- self.headers)
+ resp, body = self.get('os-hypervisors/%s/servers' % hyper_name)
hypervisors = self._parse_array(etree.fromstring(body))
return resp, hypervisors
def get_hypervisor_stats(self):
"""Get hypervisor statistics over all compute nodes."""
- resp, body = self.get('os-hypervisors/statistics', self.headers)
+ resp, body = self.get('os-hypervisors/statistics')
stats = xml_to_json(etree.fromstring(body))
return resp, stats
def get_hypervisor_uptime(self, hyper_id):
"""Display the uptime of the specified hypervisor."""
- resp, body = self.get('os-hypervisors/%s/uptime' % hyper_id,
- self.headers)
+ resp, body = self.get('os-hypervisors/%s/uptime' % hyper_id)
uptime = xml_to_json(etree.fromstring(body))
return resp, uptime
def search_hypervisor(self, hyper_name):
"""Search specified hypervisor."""
- resp, body = self.get('os-hypervisors/%s/search' % hyper_name,
- self.headers)
+ resp, body = self.get('os-hypervisors/%s/search' % hyper_name)
hypervisors = self._parse_array(etree.fromstring(body))
return resp, hypervisors
diff --git a/tempest/services/compute/xml/images_client.py b/tempest/services/compute/xml/images_client.py
index d90a7d8..9f80c55 100644
--- a/tempest/services/compute/xml/images_client.py
+++ b/tempest/services/compute/xml/images_client.py
@@ -102,7 +102,7 @@
data.append(Text(v))
metadata.append(data)
resp, body = self.post('servers/%s/action' % str(server_id),
- str(Document(post_body)), self.headers)
+ str(Document(post_body)))
return resp, body
def list_images(self, params=None):
@@ -111,7 +111,7 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_images(etree.fromstring(body))
return resp, body['images']
@@ -123,20 +123,20 @@
url = "images/detail?" + param_list
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_images(etree.fromstring(body))
return resp, body['images']
def get_image(self, image_id):
"""Returns the details of a single image."""
- resp, body = self.get("images/%s" % str(image_id), self.headers)
+ resp, body = self.get("images/%s" % str(image_id))
self.expected_success(200, resp)
body = self._parse_image(etree.fromstring(body))
return resp, body
def delete_image(self, image_id):
"""Deletes the provided image."""
- return self.delete("images/%s" % str(image_id), self.headers)
+ return self.delete("images/%s" % str(image_id))
def wait_for_image_status(self, image_id, status):
"""Waits for an image to reach a given status."""
@@ -152,8 +152,7 @@
def list_image_metadata(self, image_id):
"""Lists all metadata items for an image."""
- resp, body = self.get("images/%s/metadata" % str(image_id),
- self.headers)
+ resp, body = self.get("images/%s/metadata" % str(image_id))
body = self._parse_key_value(etree.fromstring(body))
return resp, body
@@ -161,7 +160,7 @@
"""Sets the metadata for an image."""
post_body = self._metadata_body(meta)
resp, body = self.put('images/%s/metadata' % image_id,
- str(Document(post_body)), self.headers)
+ str(Document(post_body)))
body = self._parse_key_value(etree.fromstring(body))
return resp, body
@@ -169,14 +168,14 @@
"""Updates the metadata for an image."""
post_body = self._metadata_body(meta)
resp, body = self.post('images/%s/metadata' % str(image_id),
- str(Document(post_body)), self.headers)
+ str(Document(post_body)))
body = self._parse_key_value(etree.fromstring(body))
return resp, body
def get_image_metadata_item(self, image_id, key):
"""Returns the value for a specific image metadata key."""
resp, body = self.get("images/%s/metadata/%s.xml" %
- (str(image_id), key), self.headers)
+ (str(image_id), key))
body = self._parse_metadata(etree.fromstring(body))
return resp, body
@@ -186,7 +185,7 @@
post_body = Element('meta', key=key)
post_body.append(Text(v))
resp, body = self.put('images/%s/metadata/%s' % (str(image_id), key),
- str(Document(post_body)), self.headers)
+ str(Document(post_body)))
body = xml_to_json(etree.fromstring(body))
return resp, body
@@ -194,14 +193,13 @@
"""Sets the value for a specific image metadata key."""
post_body = Document('meta', Text(meta), key=key)
resp, body = self.put('images/%s/metadata/%s' % (str(image_id), key),
- post_body, self.headers)
+ post_body)
body = xml_to_json(etree.fromstring(body))
return resp, body['meta']
def delete_image_metadata_item(self, image_id, key):
"""Deletes a single image metadata key/value pair."""
- return self.delete("images/%s/metadata/%s" % (str(image_id), key),
- self.headers)
+ return self.delete("images/%s/metadata/%s" % (str(image_id), key))
def is_resource_deleted(self, id):
try:
diff --git a/tempest/services/compute/xml/instance_usage_audit_log_client.py b/tempest/services/compute/xml/instance_usage_audit_log_client.py
index 562774b..baa6966 100644
--- a/tempest/services/compute/xml/instance_usage_audit_log_client.py
+++ b/tempest/services/compute/xml/instance_usage_audit_log_client.py
@@ -31,12 +31,12 @@
def list_instance_usage_audit_logs(self):
url = 'os-instance_usage_audit_log'
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
instance_usage_audit_logs = xml_to_json(etree.fromstring(body))
return resp, instance_usage_audit_logs
def get_instance_usage_audit_log(self, time_before):
url = 'os-instance_usage_audit_log/%s' % time_before
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
instance_usage_audit_log = xml_to_json(etree.fromstring(body))
return resp, instance_usage_audit_log
diff --git a/tempest/services/compute/xml/interfaces_client.py b/tempest/services/compute/xml/interfaces_client.py
index 4194d7d..6155cd6 100644
--- a/tempest/services/compute/xml/interfaces_client.py
+++ b/tempest/services/compute/xml/interfaces_client.py
@@ -42,7 +42,7 @@
return iface
def list_interfaces(self, server):
- resp, body = self.get('servers/%s/os-interface' % server, self.headers)
+ resp, body = self.get('servers/%s/os-interface' % server)
node = etree.fromstring(body)
interfaces = [self._process_xml_interface(x)
for x in node.getchildren()]
@@ -70,14 +70,12 @@
iface.append(_fixed_ips)
doc.append(iface)
resp, body = self.post('servers/%s/os-interface' % server,
- headers=self.headers,
body=str(doc))
body = self._process_xml_interface(etree.fromstring(body))
return resp, body
def show_interface(self, server, port_id):
- resp, body = self.get('servers/%s/os-interface/%s' % (server, port_id),
- self.headers)
+ resp, body = self.get('servers/%s/os-interface/%s' % (server, port_id))
body = self._process_xml_interface(etree.fromstring(body))
return resp, body
diff --git a/tempest/services/compute/xml/keypairs_client.py b/tempest/services/compute/xml/keypairs_client.py
index 92fade4..5641251 100644
--- a/tempest/services/compute/xml/keypairs_client.py
+++ b/tempest/services/compute/xml/keypairs_client.py
@@ -33,13 +33,13 @@
self.service = CONF.compute.catalog_type
def list_keypairs(self):
- resp, body = self.get("os-keypairs", self.headers)
+ resp, body = self.get("os-keypairs")
node = etree.fromstring(body)
body = [{'keypair': xml_to_json(x)} for x in node.getchildren()]
return resp, body
def get_keypair(self, key_name):
- resp, body = self.get("os-keypairs/%s" % str(key_name), self.headers)
+ resp, body = self.get("os-keypairs/%s" % str(key_name))
body = xml_to_json(etree.fromstring(body))
return resp, body
@@ -61,8 +61,7 @@
doc.append(keypair_element)
- resp, body = self.post("os-keypairs",
- headers=self.headers, body=str(doc))
+ resp, body = self.post("os-keypairs", body=str(doc))
body = xml_to_json(etree.fromstring(body))
return resp, body
diff --git a/tempest/services/compute/xml/limits_client.py b/tempest/services/compute/xml/limits_client.py
index 2a8fbec..61c434c 100644
--- a/tempest/services/compute/xml/limits_client.py
+++ b/tempest/services/compute/xml/limits_client.py
@@ -30,7 +30,7 @@
self.service = CONF.compute.catalog_type
def get_absolute_limits(self):
- resp, body = self.get("limits", self.headers)
+ resp, body = self.get("limits")
body = objectify.fromstring(body)
lim = NS + 'absolute'
ret = {}
@@ -41,7 +41,7 @@
return resp, ret
def get_specific_absolute_limit(self, absolute_limit):
- resp, body = self.get("limits", self.headers)
+ resp, body = self.get("limits")
body = objectify.fromstring(body)
lim = NS + 'absolute'
ret = {}
diff --git a/tempest/services/compute/xml/quotas_client.py b/tempest/services/compute/xml/quotas_client.py
index f1041f0..00c3275 100644
--- a/tempest/services/compute/xml/quotas_client.py
+++ b/tempest/services/compute/xml/quotas_client.py
@@ -50,7 +50,7 @@
"""List the quota set for a tenant."""
url = 'os-quota-sets/%s' % str(tenant_id)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = xml_to_json(etree.fromstring(body))
body = self._format_quota(body)
return resp, body
@@ -59,7 +59,7 @@
"""List the default quota set for a tenant."""
url = 'os-quota-sets/%s/defaults' % str(tenant_id)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = xml_to_json(etree.fromstring(body))
body = self._format_quota(body)
return resp, body
@@ -119,8 +119,7 @@
post_body.add_attr('security_groups', security_groups)
resp, body = self.put('os-quota-sets/%s' % str(tenant_id),
- str(Document(post_body)),
- self.headers)
+ str(Document(post_body)))
body = xml_to_json(etree.fromstring(body))
body = self._format_quota(body)
return resp, body
diff --git a/tempest/services/compute/xml/security_groups_client.py b/tempest/services/compute/xml/security_groups_client.py
index 83072be..947f6da 100644
--- a/tempest/services/compute/xml/security_groups_client.py
+++ b/tempest/services/compute/xml/security_groups_client.py
@@ -51,14 +51,14 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_array(etree.fromstring(body))
return resp, body
def get_security_group(self, security_group_id):
"""Get the details of a Security Group."""
url = "os-security-groups/%s" % str(security_group_id)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = self._parse_body(etree.fromstring(body))
return resp, body
@@ -73,8 +73,7 @@
des.append(Text(content=description))
security_group.append(des)
resp, body = self.post('os-security-groups',
- str(Document(security_group)),
- self.headers)
+ str(Document(security_group)))
body = self._parse_body(etree.fromstring(body))
return resp, body
@@ -97,15 +96,13 @@
security_group.append(des)
resp, body = self.put('os-security-groups/%s' %
str(security_group_id),
- str(Document(security_group)),
- self.headers)
+ str(Document(security_group)))
body = self._parse_body(etree.fromstring(body))
return resp, body
def delete_security_group(self, security_group_id):
"""Deletes the provided Security Group."""
- return self.delete('os-security-groups/%s' %
- str(security_group_id), self.headers)
+ return self.delete('os-security-groups/%s' % str(security_group_id))
def create_security_group_rule(self, parent_group_id, ip_proto, from_port,
to_port, **kwargs):
@@ -136,19 +133,19 @@
group_rule.append(element)
url = 'os-security-group-rules'
- resp, body = self.post(url, str(Document(group_rule)), self.headers)
+ resp, body = self.post(url, str(Document(group_rule)))
body = self._parse_body(etree.fromstring(body))
return resp, body
def delete_security_group_rule(self, group_rule_id):
"""Deletes the provided Security Group rule."""
return self.delete('os-security-group-rules/%s' %
- str(group_rule_id), self.headers)
+ str(group_rule_id))
def list_security_group_rules(self, security_group_id):
"""List all rules for a security group."""
url = "os-security-groups"
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = etree.fromstring(body)
secgroups = body.getchildren()
for secgroup in secgroups:
@@ -157,3 +154,10 @@
rules = [xml_to_json(x) for x in node.getchildren()]
return resp, rules
raise exceptions.NotFound('No such Security Group')
+
+ def is_resource_deleted(self, id):
+ try:
+ self.get_security_group(id)
+ except exceptions.NotFound:
+ return True
+ return False
diff --git a/tempest/services/compute/xml/servers_client.py b/tempest/services/compute/xml/servers_client.py
index 37980c9..a182d35 100644
--- a/tempest/services/compute/xml/servers_client.py
+++ b/tempest/services/compute/xml/servers_client.py
@@ -186,7 +186,7 @@
def get_server(self, server_id):
"""Returns the details of an existing server."""
- resp, body = self.get("servers/%s" % str(server_id), self.headers)
+ resp, body = self.get("servers/%s" % str(server_id))
server = self._parse_server(etree.fromstring(body))
return resp, server
@@ -245,7 +245,7 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
servers = self._parse_array(etree.fromstring(body))
return resp, {"servers": servers}
@@ -254,7 +254,7 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
servers = self._parse_array(etree.fromstring(body))
return resp, {"servers": servers}
@@ -282,8 +282,7 @@
meta.append(Text(v))
metadata.append(meta)
- resp, body = self.put('servers/%s' % str(server_id),
- str(doc), self.headers)
+ resp, body = self.put('servers/%s' % str(server_id), str(doc))
return resp, xml_to_json(etree.fromstring(body))
def create_server(self, name, image_ref, flavor_ref, **kwargs):
@@ -356,7 +355,7 @@
temp.append(Text(k['contents']))
personality.append(temp)
- resp, body = self.post('servers', str(Document(server)), self.headers)
+ resp, body = self.post('servers', str(Document(server)))
server = self._parse_server(etree.fromstring(body))
return resp, server
@@ -394,7 +393,7 @@
def list_addresses(self, server_id):
"""Lists all addresses for a server."""
- resp, body = self.get("servers/%s/ips" % str(server_id), self.headers)
+ resp, body = self.get("servers/%s/ips" % str(server_id))
networks = {}
xml_list = etree.fromstring(body)
@@ -407,8 +406,7 @@
def list_addresses_by_network(self, server_id, network_id):
"""Lists all addresses of a specific network type for a server."""
resp, body = self.get("servers/%s/ips/%s" % (str(server_id),
- network_id),
- self.headers)
+ network_id))
network = self._parse_network(etree.fromstring(body))
return resp, network
@@ -417,8 +415,7 @@
if 'xmlns' not in kwargs:
kwargs['xmlns'] = XMLNS_11
doc = Document((Element(action_name, **kwargs)))
- resp, body = self.post("servers/%s/action" % server_id,
- str(doc), self.headers)
+ resp, body = self.post("servers/%s/action" % server_id, str(doc))
if response_key is not None:
body = xml_to_json(etree.fromstring(body))
return resp, body
@@ -435,8 +432,7 @@
adminPass=password)
def get_password(self, server_id):
- resp, body = self.get("servers/%s/os-server-password" %
- str(server_id), self.headers)
+ resp, body = self.get("servers/%s/os-server-password" % str(server_id))
body = xml_to_json(etree.fromstring(body))
return resp, body
@@ -446,8 +442,7 @@
Note that this does not actually change the instance server
password.
"""
- return self.delete("servers/%s/os-server-password" %
- str(server_id))
+ return self.delete("servers/%s/os-server-password" % str(server_id))
def reboot(self, server_id, reboot_type):
return self.action(server_id, "reboot", None, type=reboot_type)
@@ -478,7 +473,7 @@
metadata.append(meta)
resp, body = self.post('servers/%s/action' % server_id,
- str(Document(rebuild)), self.headers)
+ str(Document(rebuild)))
server = self._parse_server(etree.fromstring(body))
return resp, server
@@ -523,12 +518,11 @@
host=dest_host)
resp, body = self.post("servers/%s/action" % str(server_id),
- str(Document(req_body)), self.headers)
+ str(Document(req_body)))
return resp, body
def list_server_metadata(self, server_id):
- resp, body = self.get("servers/%s/metadata" % str(server_id),
- self.headers)
+ resp, body = self.get("servers/%s/metadata" % str(server_id))
body = self._parse_key_value(etree.fromstring(body))
return resp, body
@@ -541,8 +535,7 @@
meta_element = Element("meta", key=k)
meta_element.append(Text(v))
metadata.append(meta_element)
- resp, body = self.put('servers/%s/metadata' % str(server_id),
- str(doc), self.headers)
+ resp, body = self.put('servers/%s/metadata' % str(server_id), str(doc))
return resp, xml_to_json(etree.fromstring(body))
def update_server_metadata(self, server_id, meta):
@@ -554,13 +547,12 @@
meta_element.append(Text(v))
metadata.append(meta_element)
resp, body = self.post("/servers/%s/metadata" % str(server_id),
- str(doc), headers=self.headers)
+ str(doc))
body = xml_to_json(etree.fromstring(body))
return resp, body
def get_server_metadata_item(self, server_id, key):
- resp, body = self.get("servers/%s/metadata/%s" % (str(server_id), key),
- headers=self.headers)
+ resp, body = self.get("servers/%s/metadata/%s" % (str(server_id), key))
return resp, dict([(etree.fromstring(body).attrib['key'],
xml_to_json(etree.fromstring(body)))])
@@ -571,7 +563,7 @@
meta_element.append(Text(v))
doc.append(meta_element)
resp, body = self.put('servers/%s/metadata/%s' % (str(server_id), key),
- str(doc), self.headers)
+ str(doc))
return resp, xml_to_json(etree.fromstring(body))
def delete_server_metadata_item(self, server_id, key):
@@ -588,7 +580,7 @@
List the virtual interfaces used in an instance.
"""
resp, body = self.get('/'.join(['servers', server_id,
- 'os-virtual-interfaces']), self.headers)
+ 'os-virtual-interfaces']))
virt_int = self._parse_xml_virtual_interfaces(etree.fromstring(body))
return resp, virt_int
@@ -604,7 +596,7 @@
post_body = Element("volumeAttachment", volumeId=volume_id,
device=device)
resp, body = self.post('servers/%s/os-volume_attachments' % server_id,
- str(Document(post_body)), self.headers)
+ str(Document(post_body)))
return resp, body
def detach_volume(self, server_id, volume_id):
@@ -616,22 +608,20 @@
def get_server_diagnostics(self, server_id):
"""Get the usage data for a server."""
- resp, body = self.get("servers/%s/diagnostics" % server_id,
- self.headers)
+ resp, body = self.get("servers/%s/diagnostics" % server_id)
body = xml_to_json(etree.fromstring(body))
return resp, body
def list_instance_actions(self, server_id):
"""List the provided server action."""
- resp, body = self.get("servers/%s/os-instance-actions" % server_id,
- self.headers)
+ resp, body = self.get("servers/%s/os-instance-actions" % server_id)
body = self._parse_array(etree.fromstring(body))
return resp, body
def get_instance_action(self, server_id, request_id):
"""Returns the action details of the provided server."""
resp, body = self.get("servers/%s/os-instance-actions/%s" %
- (server_id, request_id), self.headers)
+ (server_id, request_id))
body = xml_to_json(etree.fromstring(body))
return resp, body
diff --git a/tempest/services/compute/xml/services_client.py b/tempest/services/compute/xml/services_client.py
index c28dc12..5943ea9 100644
--- a/tempest/services/compute/xml/services_client.py
+++ b/tempest/services/compute/xml/services_client.py
@@ -38,7 +38,7 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
node = etree.fromstring(body)
body = [xml_to_json(x) for x in node.getchildren()]
return resp, body
@@ -53,8 +53,7 @@
post_body.add_attr('binary', binary)
post_body.add_attr('host', host_name)
- resp, body = self.put('os-services/enable', str(Document(post_body)),
- self.headers)
+ resp, body = self.put('os-services/enable', str(Document(post_body)))
body = xml_to_json(etree.fromstring(body))
return resp, body
@@ -68,7 +67,6 @@
post_body.add_attr('binary', binary)
post_body.add_attr('host', host_name)
- resp, body = self.put('os-services/disable', str(Document(post_body)),
- self.headers)
+ resp, body = self.put('os-services/disable', str(Document(post_body)))
body = xml_to_json(etree.fromstring(body))
return resp, body
diff --git a/tempest/services/compute/xml/tenant_usages_client.py b/tempest/services/compute/xml/tenant_usages_client.py
index 93eeb00..96c3147 100644
--- a/tempest/services/compute/xml/tenant_usages_client.py
+++ b/tempest/services/compute/xml/tenant_usages_client.py
@@ -39,7 +39,7 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
tenant_usage = self._parse_array(etree.fromstring(body))
return resp, tenant_usage['tenant_usage']
@@ -48,6 +48,6 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
tenant_usage = self._parse_array(etree.fromstring(body))
return resp, tenant_usage
diff --git a/tempest/services/compute/xml/volumes_extensions_client.py b/tempest/services/compute/xml/volumes_extensions_client.py
index 941cd69..a43fc21 100644
--- a/tempest/services/compute/xml/volumes_extensions_client.py
+++ b/tempest/services/compute/xml/volumes_extensions_client.py
@@ -60,7 +60,7 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = etree.fromstring(body)
volumes = []
if body is not None:
@@ -74,7 +74,7 @@
if params:
url += '?%s' % urllib.urlencode(params)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = etree.fromstring(body)
volumes = []
if body is not None:
@@ -84,7 +84,7 @@
def get_volume(self, volume_id):
"""Returns the details of a single volume."""
url = "os-volumes/%s" % str(volume_id)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url)
body = etree.fromstring(body)
return resp, self._parse_volume(body)
@@ -110,8 +110,7 @@
meta.append(Text(value))
_metadata.append(meta)
- resp, body = self.post('os-volumes', str(Document(volume)),
- self.headers)
+ resp, body = self.post('os-volumes', str(Document(volume)))
body = xml_to_json(etree.fromstring(body))
return resp, body
diff --git a/tempest/services/identity/v3/json/service_client.py b/tempest/services/identity/v3/json/service_client.py
index 10d4f97..c1faebb 100644
--- a/tempest/services/identity/v3/json/service_client.py
+++ b/tempest/services/identity/v3/json/service_client.py
@@ -61,11 +61,11 @@
"description": description,
}
body = json.dumps({'service': body_dict})
- resp, body = self.post("services", body, self.headers)
+ resp, body = self.post("services", body)
body = json.loads(body)
return resp, body["service"]
def delete_service(self, serv_id):
url = "services/" + serv_id
- resp, body = self.delete(url, self.headers)
+ resp, body = self.delete(url)
return resp, body
diff --git a/tempest/services/identity/v3/xml/service_client.py b/tempest/services/identity/v3/xml/service_client.py
index a2a81d2..be6c443 100644
--- a/tempest/services/identity/v3/xml/service_client.py
+++ b/tempest/services/identity/v3/xml/service_client.py
@@ -74,12 +74,11 @@
name=name,
description=description,
type=serv_type)
- resp, body = self.post("services", str(Document(post_body)),
- self.headers)
+ resp, body = self.post("services", str(Document(post_body)))
body = self._parse_body(etree.fromstring(body))
return resp, body
def delete_service(self, serv_id):
url = "services/" + serv_id
- resp, body = self.delete(url, self.headers)
+ resp, body = self.delete(url)
return resp, body
diff --git a/tempest/services/network/network_client_base.py b/tempest/services/network/network_client_base.py
index f3f8d70..f1bf548 100644
--- a/tempest/services/network/network_client_base.py
+++ b/tempest/services/network/network_client_base.py
@@ -59,19 +59,15 @@
raise NotImplementedError
def post(self, uri, body, headers=None):
- headers = headers or self.rest_client.headers
return self.rest_client.post(uri, body, headers)
def put(self, uri, body, headers=None):
- headers = headers or self.rest_client.headers
return self.rest_client.put(uri, body, headers)
def get(self, uri, headers=None):
- headers = headers or self.rest_client.headers
return self.rest_client.get(uri, headers)
def delete(self, uri, headers=None):
- headers = headers or self.rest_client.headers
return self.rest_client.delete(uri, headers)
def deserialize_list(self, body):
diff --git a/tempest/thirdparty/boto/test_ec2_instance_run.py b/tempest/thirdparty/boto/test_ec2_instance_run.py
index a6932bc..399a3c8 100644
--- a/tempest/thirdparty/boto/test_ec2_instance_run.py
+++ b/tempest/thirdparty/boto/test_ec2_instance_run.py
@@ -278,7 +278,7 @@
# TODO(afazekas): ping test. dependecy/permission ?
self.assertVolumeStatusWait(volume, "available")
- # NOTE(afazekas): it may be reports availble before it is available
+ # NOTE(afazekas): it may be reports available before it is available
ssh = RemoteClient(address.public_ip,
CONF.compute.ssh_user,