Remove create_timestamp method
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins. Replaced methods: * create_timestamp Etherpad concerning this effort: https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup [1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0 Change-Id: Ic4bc853edf7283cbf1c4d2b17431a051f5309a02
This commit is contained in:
parent
6512049526
commit
0bbacde23b
|
@ -98,22 +98,6 @@ class ScenarioTest(tempest.scenario.manager.ScenarioTest):
|
|||
floating_ip['ip'], thing['id'])
|
||||
return floating_ip
|
||||
|
||||
def create_timestamp(self, ip_address, dev_name=None, mount_path='/mnt',
|
||||
private_key=None):
|
||||
ssh_client = self.get_remote_client(ip_address,
|
||||
private_key=private_key)
|
||||
if dev_name is not None:
|
||||
ssh_client.make_fs(dev_name)
|
||||
ssh_client.exec_command('sudo mount /dev/%s %s' % (dev_name,
|
||||
mount_path))
|
||||
cmd_timestamp = 'sudo sh -c "date > %s/timestamp; sync"' % mount_path
|
||||
ssh_client.exec_command(cmd_timestamp)
|
||||
timestamp = ssh_client.exec_command('sudo cat %s/timestamp'
|
||||
% mount_path)
|
||||
if dev_name is not None:
|
||||
ssh_client.exec_command('sudo umount %s' % mount_path)
|
||||
return timestamp
|
||||
|
||||
def get_server_ip(self, server):
|
||||
"""Get the server fixed or floating IP.
|
||||
|
||||
|
|
|
@ -223,8 +223,9 @@ class BaremetalBasicOps(baremetal_manager.BaremetalScenarioTest):
|
|||
if eph_size and not self.wholedisk_image:
|
||||
self.verify_partition(vm_client, 'ephemeral0', '/mnt', eph_size)
|
||||
# Create the test file
|
||||
self.create_timestamp(
|
||||
ip_address, private_key=self.keypair['private_key'])
|
||||
self.create_timestamp(ip_address,
|
||||
private_key=self.keypair['private_key'],
|
||||
server=self.instance)
|
||||
|
||||
if CONF.baremetal.boot_mode == "uefi":
|
||||
self.validate_uefi(vm_client)
|
||||
|
|
Loading…
Reference in New Issue