class snapshot(unittest.TestCase): def setUp(self): self.configfile = sys.argv[1] self.utils = Utils() self.all_config = self.utils.init_allconfig(self.configfile) self.utils.deploy_usx(self.all_config) self.amc_ip = self.all_config['amc_ip'] self.tests = Ha(self.configfile) self.tools = Tools(self.amc_ip) def tearDown(self): clean_testbed_op = ["clean_testbed:"] self.tests._exec(clean_testbed_op) print("done!!!!!!!!!!!!") def snapshot(self): volume_type_list = self.tests._get_volume_type_list_from_config() for volume_type in volume_type_list: self.assertEqual(self.test_snapshot(volume_type), True) # self.assertEqual(self.test_snapshot('simplememory'), True) def test_snapshot(self, volume): daily_schedule_snapshot_op = ["create_daily_schedule_snapshot:'vols'[" + volume + "][0]:"] self.tests._exec(daily_schedule_snapshot_op) check_snapshot_by_lvs_op = ["check_snapshot_by_lvs:'vols'[" + volume + "][0]:"] self.tests._exec(check_snapshot_by_lvs_op) check_snapshot_number_op = ["check_snapshot_number:'vols'[" + volume + "][0]:1"] return self.tests._exec(check_snapshot_number_op)
def setUp(self): self.configfile = sys.argv[1] self.utils = Utils() self.all_config = self.utils.init_allconfig(self.configfile) self.utils.deploy_usx(self.all_config) self.amc_ip = self.all_config['amc_ip'] self.tests = Ha(self.configfile) self.tools = Tools(self.amc_ip)