コード例 #1
0
ファイル: ssp.py プロジェクト: openstack/nova-powervm
 def rm_func(vios_w):
     LOG.info("Removing SSP disk connection to VIOS %(vios)s.",
              {'vios': vios_w.name},
              instance=instance)
     return tsk_map.remove_maps(vios_w,
                                lpar_uuid,
                                match_func=match_func)
コード例 #2
0
    def detach_disk(self, instance):
        """Detaches the storage adapters from the image disk.

        :param instance: Instance to disconnect the image for.
        :return: A list of all the backing storage elements that were
                 disconnected from the I/O Server and VM.
        """
        lpar_uuid = vm.get_pvm_uuid(instance)

        # Build the match function
        match_func = tsk_map.gen_match_func(pvm_stg.VDisk)

        vios_w = pvm_vios.VIOS.get(self._adapter,
                                   uuid=self._vios_uuid,
                                   xag=[pvm_const.XAG.VIO_SMAP])

        # Remove the mappings.
        mappings = tsk_map.remove_maps(vios_w,
                                       lpar_uuid,
                                       match_func=match_func)

        # Update the VIOS with the removed mappings.
        vios_w.update()

        return [x.backing_storage for x in mappings]
コード例 #3
0
 def rm_func(vios_w):
     LOG.info(
         _LI("Disconnecting instance %(inst)s from storage disks.") %
         {'inst': instance.name})
     return tsk_map.remove_maps(vios_w,
                                lpar_uuid,
                                match_func=match_func)
コード例 #4
0
 def rm_func(vios_w):
     LOG.info("Removing vSCSI mapping from physical volume %(dev)s "
              "on vios %(vios)s",
              {'dev': device_name, 'vios': vios_w.name},
              instance=self.instance)
     removed_maps = tsk_map.remove_maps(
         vios_w, vm_uuid,
         tsk_map.gen_match_func(pvm_stor.PV, names=[device_name]))
     return removed_maps
コード例 #5
0
ファイル: vscsi.py プロジェクト: adreznec/nova-powervm
 def rm_func(vios_w):
     LOG.info(_LI("Removing vSCSI mapping from Physical Volume %(dev)s "
                  "to VM %(vm)s") % {'dev': device_name, 'vm': vm_uuid})
     removed_maps = tsk_map.remove_maps(
         vios_w, vm_uuid,
         tsk_map.gen_match_func(pvm_stor.PV, names=[device_name]))
     for rm_map in removed_maps:
         slot_mgr.drop_vscsi_mapping(rm_map)
     return removed_maps
コード例 #6
0
ファイル: fcvscsi.py プロジェクト: arbrandes/nova
 def rm_func(vios_w):
     LOG.info("Removing vSCSI mapping from physical volume %(dev)s "
              "on vios %(vios)s",
              {'dev': device_name, 'vios': vios_w.name},
              instance=self.instance)
     removed_maps = tsk_map.remove_maps(
         vios_w, vm_uuid,
         tsk_map.gen_match_func(pvm_stor.PV, names=[device_name]))
     return removed_maps
コード例 #7
0
 def rm_func(vios_w):
     LOG.info("Removing vSCSI mapping from physical volume %(dev)s.",
              {'dev': device_name},
              instance=self.instance)
     removed_maps = tsk_map.remove_maps(
         vios_w, vm_uuid,
         tsk_map.gen_match_func(pvm_stor.PV, names=[device_name]))
     for rm_map in removed_maps:
         slot_mgr.drop_vscsi_mapping(rm_map)
     return removed_maps
コード例 #8
0
 def rm_func(vios_w):
     LOG.info(
         _LI("Removing SSP disk connection between VM %(vm)s and "
             "VIOS %(vios)s."), {
                 'vm': instance.name,
                 'vios': vios_w.name
             })
     return tsk_map.remove_maps(vios_w,
                                lpar_uuid,
                                match_func=match_func)
コード例 #9
0
ファイル: vscsi.py プロジェクト: pratgohi/nova-powervm
 def rm_func(vios_w):
     LOG.info(
         _LI("Removing vSCSI mapping from Physical Volume %(dev)s "
             "to VM %(vm)s") % {
                 'dev': device_name,
                 'vm': vm_uuid
             })
     return tsk_map.remove_maps(
         vios_w, vm_uuid,
         tsk_map.gen_match_func(pvm_stor.PV, names=[device_name]))
コード例 #10
0
        def rm_func(vios_w):
            # If the vios doesn't match, just return
            if vios_w.uuid != vios_uuid:
                return None

            LOG.info(_LI("Disconnecting instance %(inst)s from storage "
                         "disks."), {'inst': self.instance.name},
                     instance=self.instance)
            return tsk_map.remove_maps(vios_w,
                                       self.vm_uuid,
                                       match_func=match_func)
コード例 #11
0
ファイル: fileio.py プロジェクト: esberglu/nova-powervm
        def rm_func(vios_w):
            # If the vios doesn't match, just return
            if vios_w.uuid not in self.vios_uuids:
                return None

            LOG.info("Disconnecting storage disks.", instance=self.instance)
            removed_maps = tsk_map.remove_maps(vios_w,
                                               self.vm_uuid,
                                               match_func=match_func)
            for rm_map in removed_maps:
                slot_mgr.drop_vscsi_mapping(rm_map)
            return removed_maps
コード例 #12
0
 def rm_func(vios_w):
     LOG.info(
         _LI("Removing vSCSI mapping from Physical Volume %(dev)s "
             "to VM %(vm)s"), {
                 'dev': device_name,
                 'vm': vm_uuid
             })
     removed_maps = tsk_map.remove_maps(
         vios_w, vm_uuid,
         tsk_map.gen_match_func(pvm_stor.PV, names=[device_name]))
     for rm_map in removed_maps:
         slot_mgr.drop_vscsi_mapping(rm_map)
     return removed_maps
コード例 #13
0
ファイル: localdisk.py プロジェクト: arbrandes/nova
    def detach_disk(self, instance):
        """Detaches the storage adapters from the image disk.

        :param instance: Instance to disconnect the image for.
        :return: A list of all the backing storage elements that were
                 disconnected from the I/O Server and VM.
        """
        lpar_uuid = vm.get_pvm_uuid(instance)

        # Build the match function
        match_func = tsk_map.gen_match_func(pvm_stg.VDisk)

        vios_w = pvm_vios.VIOS.get(
            self._adapter, uuid=self._vios_uuid, xag=[pvm_const.XAG.VIO_SMAP])

        # Remove the mappings.
        mappings = tsk_map.remove_maps(
            vios_w, lpar_uuid, match_func=match_func)

        # Update the VIOS with the removed mappings.
        vios_w.update()

        return [x.backing_storage for x in mappings]
コード例 #14
0
 def rm_func(vios_w):
     LOG.info("Disconnecting instance from storage disks.",
              instance=instance)
     return tsk_map.remove_maps(vios_w, lpar_uuid,
                                match_func=match_func)
コード例 #15
0
ファイル: localdisk.py プロジェクト: pkdevboxy/nova-powervm
 def rm_func(vios_w):
     LOG.info(_LI("Disconnecting instance %(inst)s from storage disks.")
              % {'inst': instance.name})
     return tsk_map.remove_maps(vios_w, lpar_uuid,
                                match_func=match_func)
コード例 #16
0
 def rm_func(vwrap):
     LOG.info("Removing SSP disk connection to VIOS %s.",
              vwrap.name,
              instance=instance)
     return tsk_map.remove_maps(vwrap, lpar_uuid, match_func=match_func)
コード例 #17
0
ファイル: ssp.py プロジェクト: Juniper/nova
 def rm_func(vwrap):
     LOG.info("Removing SSP disk connection to VIOS %s.",
              vwrap.name, instance=instance)
     return tsk_map.remove_maps(vwrap, lpar_uuid,
                                match_func=match_func)
コード例 #18
0
ファイル: media.py プロジェクト: pratgohi/nova-powervm
 def rm_vopt_mapping(vios_w):
     return tsk_map.remove_maps(vios_w, lpar_uuid,
                                match_func=match_func)
コード例 #19
0
 def rm_vopt_mapping(vios_w):
     return tsk_map.remove_maps(vios_w, lpar_uuid,
                                match_func=match_func)
コード例 #20
0
ファイル: ssp.py プロジェクト: saydulk/nova-powervm
 def rm_func(vios_w):
     LOG.info(_LI("Removing SSP disk connection between VM %(vm)s and "
                  "VIOS %(vios)s."),
              {'vm': instance.name, 'vios': vios_w.name})
     return tsk_map.remove_maps(vios_w, lpar_uuid,
                                match_func=match_func)
コード例 #21
0
ファイル: vscsi.py プロジェクト: kairoaraujo/nova-powervm
 def rm_func(vios_w):
     LOG.info(
         _LI("Removing vSCSI mapping from Physical Volume %(dev)s " "to VM %(vm)s")
         % {"dev": device_name, "vm": vm_uuid}
     )
     return tsk_map.remove_maps(vios_w, vm_uuid, tsk_map.gen_match_func(pvm_stor.PV, names=[device_name]))