示例#1
0
    def test_suspend_resume_individual_mpath(self):
        '''
        suspending the mpathX and Resume it Back
        '''
        err_mpaths = []
        self.log.info("Suspending mpaths and resuming them Back")
        for dic_mpath in self.mpath_list:
            if multipath.suspend_mpath(dic_mpath["name"]) is False:
                self.log.info("couldn't suspend : %s", dic_mpath['name'])
                err_mpaths.append(dic_mpath["name"])

            time.sleep(self.op_shot_sleep_time)
            if multipath.resume_mpath(dic_mpath["name"]) is False:
                self.log.info("couldn't resume: %s", dic_mpath["name"])
                err_mpaths.append(dic_mpath["name"])
        if err_mpaths:
            self.fail("error mpaths in suspnd indvdl mpaths: %s" % err_mpaths)
示例#2
0
    def test_suspend_resume_all_mpath(self):
        '''
        suspending all the mpathX and then Resume it Back at once
        '''
        err_mpaths = []
        self.log.info("Suspending mpaths and resuming them Back")
        for dic_mpath in self.mpath_list:
            if multipath.suspend_mpath(dic_mpath["name"]) is False:
                self.log.info("couldn't suspend %s", dic_mpath["name"])
                err_mpaths.append(dic_mpath['name'])

        time.sleep(self.op_long_sleep_time)

        for dic_mpath in self.mpath_list:
            if multipath.resume_mpath(dic_mpath["name"]) is False:
                self.log.info("couldn't resume %s ", dic_mpath["name"])
                err_mpaths.append(dic_mpath['name'])
        if err_mpaths:
            self.fail("error mpaths in suspnd all mpaths: %s" % err_mpaths)