def add_image(self, mirror_name, sp_ip, secondary_lun_id): mv = self.vnx.get_mirror_view(mirror_name) mv.add_image(sp_ip, secondary_lun_id) # Secondary image info usually did not appear, so # here add a poll to update. utils.update_res_with_poll(mv) utils.wait_until(Condition.is_mirror_synced, mirror=mv)
def register_initiator(self, storage_group, host, initiator_port_map): """Registers the initiators of `host` to the `storage_group`. :param storage_group: the storage group object. :param host: the ip and name information of the initiator. :param initiator_port_map: the dict specifying which initiators are bound to which ports. """ for (initiator_id, ports_to_bind) in initiator_port_map.items(): for port in ports_to_bind: try: storage_group.connect_hba(port, initiator_id, host.name, host_ip=host.ip) except storops_ex.VNXStorageGroupError as ex: LOG.warning( _LW('Failed to set path to port %(port)s for ' 'initiator %(hba_id)s. Message: %(msg)s'), { 'port': port, 'hba_id': initiator_id, 'msg': ex.message }) if any(initiator_port_map.values()): LOG.debug( 'New path set for initiator %(hba_id)s, so update ' 'storage group with poll.', {'hba_id': initiator_id}) utils.update_res_with_poll(storage_group)
def add_image(self, mirror_name, sp_ip, secondary_lun_id): mv = self.vnx.get_mirror_view(mirror_name) mv.add_image(sp_ip, secondary_lun_id) # Secondary image info usually did not appear, so # here add a poll to update. utils.update_res_with_poll(mv) utils.wait_until(Condition.is_mirror_synced, mirror=mv)
def register_initiator(self, storage_group, host, initiator_port_map): """Registers the initiators of `host` to the `storage_group`. :param storage_group: the storage group object. :param host: the ip and name information of the initiator. :param initiator_port_map: the dict specifying which initiators are bound to which ports. """ for (initiator_id, ports_to_bind) in initiator_port_map.items(): for port in ports_to_bind: try: storage_group.connect_hba(port, initiator_id, host.name, host_ip=host.ip) except storops_ex.VNXStorageGroupError as ex: LOG.warning(_LW('Failed to set path to port %(port)s for ' 'initiator %(hba_id)s. Message: %(msg)s'), {'port': port, 'hba_id': initiator_id, 'msg': ex.message}) if initiator_port_map: utils.update_res_with_poll(storage_group)
def register_initiator(self, storage_group, host, initiator_port_map): """Registers the initiators of `host` to the `storage_group`. :param storage_group: the storage group object. :param host: the ip and name information of the initiator. :param initiator_port_map: the dict specifying which initiators are bound to which ports. """ for (initiator_id, ports_to_bind) in initiator_port_map.items(): for port in ports_to_bind: try: storage_group.connect_hba(port, initiator_id, host.name, host_ip=host.ip) except storops_ex.VNXStorageGroupError as ex: LOG.warning( _LW("Failed to set path to port %(port)s for " "initiator %(hba_id)s. Message: %(msg)s"), {"port": port, "hba_id": initiator_id, "msg": ex.message}, ) if any(initiator_port_map.values()): LOG.debug( "New path set for initiator %(hba_id)s, so update " "storage group with poll.", {"hba_id": initiator_id} ) utils.update_res_with_poll(storage_group)