def test_startstop_client_custom_vars(self): """test command line start/stop client (custom vars)""" self.fs.new_target(self.srv1, 'mgt', 0, '/dev/root') # fs_name mtpt = '/action' client = self.fs.new_client(self.srv1, "/$fs_name") action = StartClient(client) self.check_cmd(action, 'mkdir -p "%s" && ' \ '/bin/mount -t lustre localhost@tcp:/action %s' % (mtpt, mtpt)) action = StopClient(client) self.check_cmd(action, 'umount %s' % mtpt) # label mtpt = '/action-client' client = self.fs.new_client(self.srv1, "/$label") action = StartClient(client) self.check_cmd(action, 'mkdir -p "%s" && ' \ '/bin/mount -t lustre localhost@tcp:/action %s' % (mtpt, mtpt)) action = StopClient(client) self.check_cmd(action, 'umount %s' % mtpt) # type mtpt = '/client' client = self.fs.new_client(self.srv1, "/client") action = StartClient(client) self.check_cmd(action, 'mkdir -p "%s" && ' \ '/bin/mount -t lustre localhost@tcp:/action %s' % (mtpt, mtpt)) action = StopClient(client) self.check_cmd(action, 'umount %s' % mtpt)
def test_stop_client_addopts(self): """test command line stop client (addl opts)""" self.fs.new_target(self.srv1, 'mgt', 0, '/dev/root') client = self.fs.new_client(self.srv1, "/foo") action = StopClient(client, addopts='-f') self.check_cmd(action, 'umount -f /foo')
def test_stop_client_simple(self): """test command line stop client (simple)""" self.fs.new_target(self.srv1, 'mgt', 0, '/dev/root') client = self.fs.new_client(self.srv1, "/foo") action = StopClient(client) self.check_cmd(action, 'umount /foo')
def umount(self, **kwargs): """Umount a Lustre client.""" return StopClient(self, **kwargs)