Merge "Add new exception InvalidAPIVersionRange for microversion"
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 6d19ca7..0856983 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -23,6 +23,7 @@
from tempest.common.utils import data_utils
from tempest.common import waiters
from tempest import config
+from tempest import exceptions
import tempest.test
CONF = config.CONF
@@ -356,16 +357,19 @@
def get_server_ip(cls, server):
"""Get the server fixed or floating IP.
- For the floating IP, the address created by the validation resources
- is returned.
- For the fixed IP, the server is returned and the current mechanism of
- address extraction in the remote_client is followed.
+ Based on the configuration we're in, return a correct ip
+ address for validating that a guest is up.
"""
if CONF.validation.connect_method == 'floating':
- ip_or_server = cls.validation_resources['floating_ip']['ip']
+ return cls.validation_resources['floating_ip']['ip']
elif CONF.validation.connect_method == 'fixed':
- ip_or_server = server
- return ip_or_server
+ addresses = server['addresses'][CONF.validation.network_for_ssh]
+ for address in addresses:
+ if address['version'] == CONF.validation.ip_version_for_ssh:
+ return address['addr']
+ raise exceptions.ServerUnreachable()
+ else:
+ raise exceptions.InvalidConfiguration()
class BaseV2ComputeAdminTest(BaseV2ComputeTest):
diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
index d1ec064..37f322f 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
@@ -290,6 +291,7 @@
self.assertNotIn(self.s2_name, map(lambda x: x['name'], servers))
self.assertNotIn(self.s3_name, map(lambda x: x['name'], servers))
+ @decorators.skip_because(bug="1540645")
@test.idempotent_id('a905e287-c35e-42f2-b132-d02b09f3654a')
def test_list_servers_filtered_by_ip_regex(self):
# Filter servers by regex ip
diff --git a/tempest/api/identity/admin/v2/test_roles.py b/tempest/api/identity/admin/v2/test_roles.py
index 3f3d16e..5847129 100644
--- a/tempest/api/identity/admin/v2/test_roles.py
+++ b/tempest/api/identity/admin/v2/test_roles.py
@@ -33,9 +33,9 @@
def _get_role_params(self):
self.data.setup_test_user()
self.data.setup_test_role()
- user = self.get_user_by_name(self.data.test_user)
- tenant = self.get_tenant_by_name(self.data.test_tenant)
- role = self.get_role_by_name(self.data.test_role)
+ user = self.get_user_by_name(self.data.user['name'])
+ tenant = self.get_tenant_by_name(self.data.tenant['name'])
+ role = self.get_role_by_name(self.data.role['name'])
return (user, tenant, role)
def assert_role_in_role_list(self, role, roles):
diff --git a/tempest/api/identity/admin/v2/test_roles_negative.py b/tempest/api/identity/admin/v2/test_roles_negative.py
index c9af7c6..23a1958 100644
--- a/tempest/api/identity/admin/v2/test_roles_negative.py
+++ b/tempest/api/identity/admin/v2/test_roles_negative.py
@@ -27,9 +27,9 @@
def _get_role_params(self):
self.data.setup_test_user()
self.data.setup_test_role()
- user = self.get_user_by_name(self.data.test_user)
- tenant = self.get_tenant_by_name(self.data.test_tenant)
- role = self.get_role_by_name(self.data.test_role)
+ user = self.get_user_by_name(self.data.user['name'])
+ tenant = self.get_tenant_by_name(self.data.tenant['name'])
+ role = self.get_role_by_name(self.data.role['name'])
return (user, tenant, role)
@test.attr(type=['negative'])
diff --git a/tempest/api/identity/admin/v2/test_users.py b/tempest/api/identity/admin/v2/test_users.py
index 4497575..60c4e97 100644
--- a/tempest/api/identity/admin/v2/test_users.py
+++ b/tempest/api/identity/admin/v2/test_users.py
@@ -95,27 +95,29 @@
# Valid user's token is authenticated
self.data.setup_test_user()
# Get a token
- self.token_client.auth(self.data.test_user, self.data.test_password,
- self.data.test_tenant)
+ self.token_client.auth(self.data.user['name'],
+ self.data.user_password,
+ self.data.tenant['name'])
# Re-auth
- self.token_client.auth(self.data.test_user,
- self.data.test_password,
- self.data.test_tenant)
+ self.token_client.auth(self.data.user['name'],
+ self.data.user_password,
+ self.data.tenant['name'])
@test.idempotent_id('5d1fa498-4c2d-4732-a8fe-2b054598cfdd')
def test_authentication_request_without_token(self):
# Request for token authentication with a valid token in header
self.data.setup_test_user()
- self.token_client.auth(self.data.test_user, self.data.test_password,
- self.data.test_tenant)
+ self.token_client.auth(self.data.user['name'],
+ self.data.user_password,
+ self.data.tenant['name'])
# Get the token of the current client
token = self.client.auth_provider.get_token()
# Delete the token from database
self.client.delete_token(token)
# Re-auth
- self.token_client.auth(self.data.test_user,
- self.data.test_password,
- self.data.test_tenant)
+ self.token_client.auth(self.data.user['name'],
+ self.data.user_password,
+ self.data.tenant['name'])
self.client.auth_provider.clear_auth()
@test.idempotent_id('a149c02e-e5e0-4b89-809e-7e8faf33ccda')
@@ -124,8 +126,8 @@
self.data.setup_test_user()
users = self.users_client.list_users()['users']
self.assertThat([u['name'] for u in users],
- matchers.Contains(self.data.test_user),
- "Could not find %s" % self.data.test_user)
+ matchers.Contains(self.data.user['name']),
+ "Could not find %s" % self.data.user['name'])
@test.idempotent_id('6e317209-383a-4bed-9f10-075b7c82c79a')
def test_list_users_for_tenant(self):
@@ -164,9 +166,9 @@
# Return list of users on tenant when roles are assigned to users
self.data.setup_test_user()
self.data.setup_test_role()
- user = self.get_user_by_name(self.data.test_user)
- tenant = self.get_tenant_by_name(self.data.test_tenant)
- role = self.get_role_by_name(self.data.test_role)
+ user = self.get_user_by_name(self.data.user['name'])
+ tenant = self.get_tenant_by_name(self.data.tenant['name'])
+ role = self.get_role_by_name(self.data.role['name'])
# Assigning roles to two users
user_ids = list()
fetched_user_ids = list()
@@ -208,6 +210,6 @@
# Validate the updated password
# Get a token
- body = self.token_client.auth(self.data.test_user, new_pass,
- self.data.test_tenant)
+ body = self.token_client.auth(self.data.user['name'], new_pass,
+ self.data.tenant['name'])
self.assertTrue('id' in body['token'])
diff --git a/tempest/api/identity/admin/v2/test_users_negative.py b/tempest/api/identity/admin/v2/test_users_negative.py
index c5248fd..0a5d0c9 100644
--- a/tempest/api/identity/admin/v2/test_users_negative.py
+++ b/tempest/api/identity/admin/v2/test_users_negative.py
@@ -66,8 +66,8 @@
# Duplicate user should not be created
self.data.setup_test_user()
self.assertRaises(lib_exc.Conflict, self.users_client.create_user,
- self.data.test_user, self.data.test_password,
- self.data.tenant['id'], self.data.test_email)
+ self.data.user['name'], self.data.user_password,
+ self.data.tenant['id'], self.data.user['email'])
@test.attr(type=['negative'])
@test.idempotent_id('0132cc22-7c4f-42e1-9e50-ac6aad31d59a')
@@ -173,22 +173,22 @@
def test_authentication_for_disabled_user(self):
# Disabled user's token should not get authenticated
self.data.setup_test_user()
- self.disable_user(self.data.test_user)
+ self.disable_user(self.data.user['name'])
self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
- self.data.test_user,
- self.data.test_password,
- self.data.test_tenant)
+ self.data.user['name'],
+ self.data.user_password,
+ self.data.tenant['name'])
@test.attr(type=['negative'])
@test.idempotent_id('440a7a8d-9328-4b7b-83e0-d717010495e4')
def test_authentication_when_tenant_is_disabled(self):
# User's token for a disabled tenant should not be authenticated
self.data.setup_test_user()
- self.disable_tenant(self.data.test_tenant)
+ self.disable_tenant(self.data.tenant['name'])
self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
- self.data.test_user,
- self.data.test_password,
- self.data.test_tenant)
+ self.data.user['name'],
+ self.data.user_password,
+ self.data.tenant['name'])
@test.attr(type=['negative'])
@test.idempotent_id('921f1ad6-7907-40b8-853f-637e7ee52178')
@@ -196,8 +196,8 @@
# User's token for an invalid tenant should not be authenticated
self.data.setup_test_user()
self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
- self.data.test_user,
- self.data.test_password,
+ self.data.user['name'],
+ self.data.user_password,
'junktenant1234')
@test.attr(type=['negative'])
@@ -206,8 +206,8 @@
# Non-existent user's token should not get authenticated
self.data.setup_test_user()
self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
- 'junkuser123', self.data.test_password,
- self.data.test_tenant)
+ 'junkuser123', self.data.user_password,
+ self.data.tenant['name'])
@test.attr(type=['negative'])
@test.idempotent_id('d5308b33-3574-43c3-8d87-1c090c5e1eca')
@@ -215,8 +215,8 @@
# User's token with invalid password should not be authenticated
self.data.setup_test_user()
self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
- self.data.test_user, 'junkpass1234',
- self.data.test_tenant)
+ self.data.user['name'], 'junkpass1234',
+ self.data.tenant['name'])
@test.attr(type=['negative'])
@test.idempotent_id('284192ce-fb7c-4909-a63b-9a502e0ddd11')
diff --git a/tempest/api/identity/admin/v3/test_users_negative.py b/tempest/api/identity/admin/v3/test_users_negative.py
index b2fb6e0..39c89a5 100644
--- a/tempest/api/identity/admin/v3/test_users_negative.py
+++ b/tempest/api/identity/admin/v3/test_users_negative.py
@@ -39,8 +39,8 @@
def test_authentication_for_disabled_user(self):
# Attempt to authenticate for disabled user should fail
self.data.setup_test_user()
- self.disable_user(self.data.test_user)
+ self.disable_user(self.data.user['name'])
self.assertRaises(lib_exc.Unauthorized, self.token.auth,
- username=self.data.test_user,
- password=self.data.test_password,
+ username=self.data.user['name'],
+ password=self.data.user_password,
user_domain_id='default')
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index 7d1f593..91d620c 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -205,13 +205,7 @@
self.users_client = users_client or client
self.roles_client = roles_client or client
- self.test_user = ''
- self.test_password = ''
- self.test_tenant = ''
- self.test_project = ''
- self.test_role = ''
- self.test_email = ''
-
+ self.user_password = None
self.user = None
self.tenant = None
self.project = None
@@ -225,18 +219,17 @@
self.domains = []
def _create_test_user(self, **kwargs):
- self.test_user = data_utils.rand_name('test_user')
- self.test_password = data_utils.rand_password()
- self.test_email = self.test_user + '@testmail.tm'
+ username = data_utils.rand_name('test_user')
+ self.user_password = data_utils.rand_password()
self.user = self.users_client.create_user(
- self.test_user, password=self.test_password,
- email=self.test_email, **kwargs)['user']
+ username, password=self.user_password,
+ email=username + '@testmail.tm', **kwargs)['user']
self.users.append(self.user)
def setup_test_role(self):
"""Set up a test role."""
- self.test_role = data_utils.rand_name('role')
- self.role = self.roles_client.create_role(name=self.test_role)['role']
+ self.role = self.roles_client.create_role(
+ name=data_utils.rand_name('test_role'))['role']
self.roles.append(self.role)
@staticmethod
@@ -272,9 +265,8 @@
def setup_test_tenant(self):
"""Set up a test tenant."""
- self.test_tenant = data_utils.rand_name('test_tenant')
self.tenant = self.projects_client.create_tenant(
- name=self.test_tenant,
+ name=data_utils.rand_name('test_tenant'),
description=data_utils.rand_name('desc'))['tenant']
self.tenants.append(self.tenant)
@@ -288,9 +280,8 @@
def setup_test_project(self):
"""Set up a test project."""
- self.test_project = data_utils.rand_name('test_project')
self.project = self.projects_client.create_project(
- name=self.test_project,
+ name=data_utils.rand_name('test_project'),
description=data_utils.rand_name('desc'))['project']
self.projects.append(self.project)
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index b76c356..2e233c5 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -15,7 +15,6 @@
import time
from oslo_log import log as logging
-import six
from tempest_lib.common import ssh
from tempest import config
@@ -28,22 +27,10 @@
class RemoteClient(object):
- # NOTE(afazekas): It should always get an address instead of server
- def __init__(self, server, username, password=None, pkey=None):
+ def __init__(self, ip_address, username, password=None, pkey=None):
ssh_timeout = CONF.validation.ssh_timeout
- network = CONF.validation.network_for_ssh
- ip_version = CONF.validation.ip_version_for_ssh
connect_timeout = CONF.validation.connect_timeout
- if isinstance(server, six.string_types):
- ip_address = server
- else:
- addresses = server['addresses'][network]
- for address in addresses:
- if address['version'] == ip_version:
- ip_address = address['addr']
- break
- else:
- raise exceptions.ServerUnreachable()
+
self.ssh_client = ssh.Client(ip_address, username, password,
ssh_timeout, pkey=pkey,
channel_timeout=connect_timeout)
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 6776220..cd36f38 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -352,25 +352,15 @@
return secgroup
- def get_remote_client(self, server_or_ip, username=None, private_key=None):
+ def get_remote_client(self, ip_address, username=None, private_key=None):
"""Get a SSH client to a remote server
- @param server_or_ip a server object as returned by Tempest compute
- client or an IP address to connect to
+ @param ip_address the server floating or fixed IP address to use
+ for ssh validation
@param username name of the Linux account on the remote server
@param private_key the SSH private key to use
@return a RemoteClient object
"""
- if isinstance(server_or_ip, six.string_types):
- ip = server_or_ip
- else:
- addrs = server_or_ip['addresses'][CONF.validation.network_for_ssh]
- try:
- ip = (addr['addr'] for addr in addrs if
- netaddr.valid_ipv4(addr['addr'])).next()
- except StopIteration:
- raise lib_exc.NotFound("No IPv4 addresses to use for SSH to "
- "remote server.")
if username is None:
username = CONF.validation.image_ssh_user
@@ -383,14 +373,15 @@
else:
password = CONF.validation.image_ssh_password
private_key = None
- linux_client = remote_client.RemoteClient(ip, username,
+ linux_client = remote_client.RemoteClient(ip_address, username,
pkey=private_key,
password=password)
try:
linux_client.validate_authentication()
except Exception as e:
message = ('Initializing SSH connection to %(ip)s failed. '
- 'Error: %(error)s' % {'ip': ip, 'error': e})
+ 'Error: %(error)s' % {'ip_address': ip_address,
+ 'error': e})
caller = misc_utils.find_test_caller()
if caller:
message = '(%s) %s' % (caller, message)
@@ -628,9 +619,9 @@
floating_ip['ip'], thing['id'])
return floating_ip
- def create_timestamp(self, server_or_ip, dev_name=None, mount_path='/mnt',
+ def create_timestamp(self, ip_address, dev_name=None, mount_path='/mnt',
private_key=None):
- ssh_client = self.get_remote_client(server_or_ip,
+ ssh_client = self.get_remote_client(ip_address,
private_key=private_key)
if dev_name is not None:
ssh_client.make_fs(dev_name)
@@ -643,9 +634,9 @@
ssh_client.umount(mount_path)
return timestamp
- def get_timestamp(self, server_or_ip, dev_name=None, mount_path='/mnt',
+ def get_timestamp(self, ip_address, dev_name=None, mount_path='/mnt',
private_key=None):
- ssh_client = self.get_remote_client(server_or_ip,
+ ssh_client = self.get_remote_client(ip_address,
private_key=private_key)
if dev_name is not None:
ssh_client.mount(dev_name, mount_path)
@@ -655,12 +646,25 @@
ssh_client.umount(mount_path)
return timestamp
- def get_server_or_ip(self, server):
+ def get_server_ip(self, server):
+ """Get the server fixed or floating IP.
+
+ Based on the configuration we're in, return a correct ip
+ address for validating that a guest is up.
+ """
if CONF.validation.connect_method == 'floating':
- ip = self.create_floating_ip(server)['ip']
+ # The tests calling this method don't have a floating IP
+ # and can't make use of the validattion resources. So the
+ # method is creating the floating IP there.
+ return self.create_floating_ip(server)['ip']
+ elif CONF.validation.connect_method == 'fixed':
+ addresses = server['addresses'][CONF.validation.network_for_ssh]
+ for address in addresses:
+ if address['version'] == CONF.validation.ip_version_for_ssh:
+ return address['addr']
+ raise exceptions.ServerUnreachable()
else:
- ip = server
- return ip
+ raise exceptions.InvalidConfiguration()
class NetworkScenarioTest(ScenarioTest):
@@ -1316,13 +1320,6 @@
def add_keypair(self):
self.keypair = self.create_keypair()
- def verify_connectivity(self, ip=None):
- if ip:
- dest = self.get_remote_client(ip)
- else:
- dest = self.get_remote_client(self.instance)
- dest.validate_authentication()
-
def boot_instance(self):
self.instance = self.create_server(
key_name=self.keypair['name'])
diff --git a/tempest/scenario/test_baremetal_basic_ops.py b/tempest/scenario/test_baremetal_basic_ops.py
index 93b32f7..15d9b66 100644
--- a/tempest/scenario/test_baremetal_basic_ops.py
+++ b/tempest/scenario/test_baremetal_basic_ops.py
@@ -112,12 +112,9 @@
self.add_keypair()
self.boot_instance()
self.validate_ports()
- self.verify_connectivity()
- if CONF.validation.connect_method == 'floating':
- floating_ip = self.create_floating_ip(self.instance)['ip']
- self.verify_connectivity(ip=floating_ip)
-
- vm_client = self.get_remote_client(self.instance)
+ ip_address = self.get_server_ip(self.instance)
+ self.get_remote_client(ip_address).validate_authentication()
+ vm_client = self.get_remote_client(ip_address)
# We expect the ephemeral partition to be mounted on /mnt and to have
# the same size as our flavor definition.
@@ -126,6 +123,6 @@
self.verify_partition(vm_client, 'ephemeral0', '/mnt', eph_size)
# Create the test file
self.create_timestamp(
- floating_ip, private_key=self.keypair['private_key'])
+ ip_address, private_key=self.keypair['private_key'])
self.terminate_instance()
diff --git a/tempest/scenario/test_network_v6.py b/tempest/scenario/test_network_v6.py
index cc28873..fc33dd9 100644
--- a/tempest/scenario/test_network_v6.py
+++ b/tempest/scenario/test_network_v6.py
@@ -124,7 +124,7 @@
fip = self.create_floating_ip(thing=srv)
ips = self.define_server_ips(srv=srv)
ssh = self.get_remote_client(
- server_or_ip=fip.floating_ip_address,
+ ip_address=fip.floating_ip_address,
username=username)
return ssh, ips, srv["id"]
@@ -203,31 +203,37 @@
(dest, source.ssh_client.host)
)
+ @test.attr(type='slow')
@test.idempotent_id('2c92df61-29f0-4eaa-bee3-7c65bef62a43')
@test.services('compute', 'network')
def test_slaac_from_os(self):
self._prepare_and_test(address6_mode='slaac')
+ @test.attr(type='slow')
@test.idempotent_id('d7e1f858-187c-45a6-89c9-bdafde619a9f')
@test.services('compute', 'network')
def test_dhcp6_stateless_from_os(self):
self._prepare_and_test(address6_mode='dhcpv6-stateless')
+ @test.attr(type='slow')
@test.idempotent_id('7ab23f41-833b-4a16-a7c9-5b42fe6d4123')
@test.services('compute', 'network')
def test_multi_prefix_dhcpv6_stateless(self):
self._prepare_and_test(address6_mode='dhcpv6-stateless', n_subnets6=2)
+ @test.attr(type='slow')
@test.idempotent_id('dec222b1-180c-4098-b8c5-cc1b8342d611')
@test.services('compute', 'network')
def test_multi_prefix_slaac(self):
self._prepare_and_test(address6_mode='slaac', n_subnets6=2)
+ @test.attr(type='slow')
@test.idempotent_id('b6399d76-4438-4658-bcf5-0d6c8584fde2')
@test.services('compute', 'network')
def test_dualnet_slaac_from_os(self):
self._prepare_and_test(address6_mode='slaac', dualnet=True)
+ @test.attr(type='slow')
@test.idempotent_id('76f26acd-9688-42b4-bc3e-cd134c4cb09e')
@test.services('compute', 'network')
def test_dualnet_dhcp6_stateless_from_os(self):
diff --git a/tempest/scenario/test_server_basic_ops.py b/tempest/scenario/test_server_basic_ops.py
index 6c24d04..dcb095b 100644
--- a/tempest/scenario/test_server_basic_ops.py
+++ b/tempest/scenario/test_server_basic_ops.py
@@ -75,7 +75,7 @@
self.fip = self.create_floating_ip(self.instance)['ip']
# Check ssh
self.ssh_client = self.get_remote_client(
- server_or_ip=self.fip,
+ ip_address=self.fip,
username=self.image_utils.ssh_user(self.image_ref),
private_key=keypair['private_key'])
diff --git a/tempest/scenario/test_shelve_instance.py b/tempest/scenario/test_shelve_instance.py
index 378ae9d..a91f9c5 100644
--- a/tempest/scenario/test_shelve_instance.py
+++ b/tempest/scenario/test_shelve_instance.py
@@ -80,7 +80,7 @@
security_groups=security_groups,
wait_until='ACTIVE')
- instance_ip = self.get_server_or_ip(server)
+ instance_ip = self.get_server_ip(server)
timestamp = self.create_timestamp(instance_ip,
private_key=keypair['private_key'])
diff --git a/tempest/scenario/test_snapshot_pattern.py b/tempest/scenario/test_snapshot_pattern.py
index f3b6558..f4cc4e3 100644
--- a/tempest/scenario/test_snapshot_pattern.py
+++ b/tempest/scenario/test_snapshot_pattern.py
@@ -52,7 +52,7 @@
security_groups=[{'name': security_group['name']}],
wait_until='ACTIVE')
- instance_ip = self.get_server_or_ip(server)
+ instance_ip = self.get_server_ip(server)
timestamp = self.create_timestamp(instance_ip,
private_key=keypair['private_key'])
@@ -67,7 +67,7 @@
wait_until='ACTIVE')
# check the existence of the timestamp file in the second instance
- server_from_snapshot_ip = self.get_server_or_ip(server_from_snapshot)
+ server_from_snapshot_ip = self.get_server_ip(server_from_snapshot)
timestamp2 = self.get_timestamp(server_from_snapshot_ip,
private_key=keypair['private_key'])
self.assertEqual(timestamp, timestamp2)
diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py
index f88fb14..799e049 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -80,9 +80,9 @@
self.assertEqual(snapshot_name, snapshot['display_name'])
return snapshot
- def _wait_for_volume_available_on_the_system(self, server_or_ip,
+ def _wait_for_volume_available_on_the_system(self, ip_address,
private_key):
- ssh = self.get_remote_client(server_or_ip, private_key=private_key)
+ ssh = self.get_remote_client(ip_address, private_key=private_key)
def _func():
part = ssh.get_partitions()
@@ -113,7 +113,7 @@
wait_until='ACTIVE')
# create and add floating IP to server1
- ip_for_server = self.get_server_or_ip(server)
+ ip_for_server = self.get_server_ip(server)
self.nova_volume_attach(server, volume)
self._wait_for_volume_available_on_the_system(ip_for_server,
@@ -140,7 +140,7 @@
security_groups=security_group)
# create and add floating IP to server_from_snapshot
- ip_for_snapshot = self.get_server_or_ip(server_from_snapshot)
+ ip_for_snapshot = self.get_server_ip(server_from_snapshot)
# attach volume2 to instance2
self.nova_volume_attach(server_from_snapshot, volume_from_snapshot)
diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py
index 7b88025..39351f8 100644
--- a/tempest/scenario/test_volume_boot_pattern.py
+++ b/tempest/scenario/test_volume_boot_pattern.py
@@ -114,7 +114,7 @@
keypair, security_group)
# write content to volume on instance
- ip_instance_1st = self.get_server_or_ip(instance_1st)
+ ip_instance_1st = self.get_server_ip(instance_1st)
timestamp = self.create_timestamp(ip_instance_1st,
private_key=keypair['private_key'])
@@ -126,7 +126,7 @@
keypair, security_group)
# check the content of written file
- ip_instance_2nd = self.get_server_or_ip(instance_2nd)
+ ip_instance_2nd = self.get_server_ip(instance_2nd)
timestamp2 = self.get_timestamp(ip_instance_2nd,
private_key=keypair['private_key'])
self.assertEqual(timestamp, timestamp2)
@@ -141,7 +141,7 @@
keypair, security_group))
# check the content of written file
- server_from_snapshot_ip = self.get_server_or_ip(server_from_snapshot)
+ server_from_snapshot_ip = self.get_server_ip(server_from_snapshot)
timestamp3 = self.get_timestamp(server_from_snapshot_ip,
private_key=keypair['private_key'])
self.assertEqual(timestamp, timestamp3)