summaryrefslogtreecommitdiff
path: root/tempest/common/utils/linux/remote_client.py
diff options
context:
space:
mode:
authorAlexander Gubanov <ogubanov@mirantis.com>2015-09-23 23:24:06 +0300
committerAlexander Gubanov <ogubanov@mirantis.com>2015-09-29 23:24:10 +0300
commitabd154c87a75bd4100bfe72c2ed3f5d31d5cf0a2 (patch)
treeff9efe50b6b80fc1d95680df94518c8bd7d02825 /tempest/common/utils/linux/remote_client.py
parentb25603c2c9c4329edf7852f6930ab90638865f4c (diff)
downloadtempest-abd154c87a75bd4100bfe72c2ed3f5d31d5cf0a2.tar.gz
Refactor tempest scenarios tests
Moved methods "write_timestamp" and "get_timestamp", which are duplicated in few scenarios, to the common class. Change-Id: I527557a3cf3618ffa6589dbd1dbc92f2268ed50e
Diffstat (limited to 'tempest/common/utils/linux/remote_client.py')
-rw-r--r--tempest/common/utils/linux/remote_client.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index 930839030..3bead88ff 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -171,3 +171,14 @@ class RemoteClient(object):
if dhcp_client == 'udhcpc' and not fixed_ip:
raise ValueError("need to set 'fixed_ip' for udhcpc client")
return getattr(self, '_renew_lease_' + dhcp_client)(fixed_ip=fixed_ip)
+
+ def mount(self, dev_name, mount_path='/mnt'):
+ cmd_mount = 'sudo mount /dev/%s %s' % (dev_name, mount_path)
+ self.exec_command(cmd_mount)
+
+ def umount(self, mount_path='/mnt'):
+ self.exec_command('sudo umount %s' % mount_path)
+
+ def make_fs(self, dev_name, fs='ext4'):
+ cmd_mkfs = 'sudo /usr/sbin/mke2fs -t %s /dev/%s' % (fs, dev_name)
+ self.exec_command(cmd_mkfs)