How to use vg_reactivate method in avocado

Best Python code snippet using avocado_python

lv_utils.py

Source:lv_utils.py Github

copy

Full Screen

...548 process.run("mount /dev/%s/%s %s" %549 (vg_name, lv_name, mount_loc), sudo=True)550 except process.CmdError as ex:551 raise LVException("Fail to mount logical volume: %s" % ex)552def vg_reactivate(vg_name, timeout=10, export=False):553 """554 In case of unclean shutdowns some of the vgs is still active and merging555 is postponed. Use this function to attempt to deactivate and reactivate556 all of them to cause the merge to happen.557 :param str vg_name: name of the volume group558 :param int timeout: timeout between operations559 :raises: :py:class:`LVException` if the logical volume is still active560 """561 try:562 process.run("vgchange -an %s" % vg_name, sudo=True)563 time.sleep(timeout)564 if export:565 process.run("vgexport %s" % vg_name, sudo=True)566 time.sleep(timeout)...

Full Screen

Full Screen

lvsetup.py

Source:lvsetup.py Github

copy

Full Screen

...147 create_filesystem=self.fs_name)148 lv_utils.lv_umount(self.vg_name, self.lv_name)149 self.mount_unmount_lv()150 @avocado.fail_on(lv_utils.LVException)151 def test_vg_reactivate(self):152 """153 Deactivate, export, import and activate a volume group.154 """155 self.create_lv()156 lv_utils.lv_mount(self.vg_name, self.lv_name, self.mount_loc,157 create_filesystem=self.fs_name)158 lv_utils.lv_umount(self.vg_name, self.lv_name)159 lv_utils.vg_reactivate(self.vg_name, export=True)160 self.mount_unmount_lv()161 @avocado.fail_on(lv_utils.LVException)162 def test_lv_snapshot(self):163 """164 Takes a snapshot from the logical and merges snapshot with the165 logical volume.166 """167 self.create_lv()168 lv_utils.lv_mount(self.vg_name, self.lv_name, self.mount_loc,169 create_filesystem=self.fs_name)170 lv_utils.lv_umount(self.vg_name, self.lv_name)171 lv_utils.lv_take_snapshot(self.vg_name, self.lv_name,172 self.lv_snap_name,173 self.lv_snapshot_size)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run avocado automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful