Esempio n. 1
0
    def delete_pair_based_on_svol(self, pvol, svol_info):
        """Disconnect all volume pairs to which the specified S-VOL belongs."""
        # If the pair status does not satisfy the execution condition,
        if not (svol_info['is_psus'] or
                _STATUS_TABLE.get(svol_info['status']) == SMPP):
            msg = utils.output_log(
                MSG.UNABLE_TO_DELETE_PAIR, pvol=pvol, svol=svol_info['ldev'])
            raise utils.HBSDBusy(msg)

        self._delete_pair_from_storage(pvol, svol_info['ldev'])
Esempio n. 2
0
 def delete_pair(self, ldev):
     """Disconnect all volume pairs to which the specified LDEV belongs."""
     pair_info = self.get_pair_info(ldev)
     if not pair_info:
         return
     if pair_info['pvol'] == ldev:
         utils.output_log(MSG.UNABLE_TO_DELETE_PAIR, pvol=pair_info['pvol'])
         raise utils.HBSDBusy()
     else:
         self.delete_pair_based_on_svol(pair_info['pvol'],
                                        pair_info['svol_info'][0])