def __init__(self, adapter, host_uuid):
        super(LocalStorage, self).__init__(adapter, host_uuid)

        self.capabilities = {
            'shared_storage': False,
            'has_imagecache': False,
            # NOTE(efried): 'snapshot' capability set dynamically below.
        }

        # Query to get the Volume Group UUID
        if not CONF.powervm.volume_group_name:
            raise exception.OptRequiredIfOtherOptValue(
                if_opt='disk_driver',
                if_value='localdisk',
                then_opt='volume_group_name')
        self.vg_name = CONF.powervm.volume_group_name
        vios_w, vg_w = tsk_stg.find_vg(adapter, self.vg_name)
        self._vios_uuid = vios_w.uuid
        self.vg_uuid = vg_w.uuid
        # Set the 'snapshot' capability dynamically. If we're hosting I/O on
        # the management partition, we can snapshot. If we're hosting I/O on
        # traditional VIOS, we are limited by the fact that a VSCSI device
        # can't be mapped to two partitions (the VIOS and the management) at
        # once.
        self.capabilities['snapshot'] = self.mp_uuid == self._vios_uuid
        LOG.info("Local Storage driver initialized: volume group: '%s'",
                 self.vg_name)
Exemplo n.º 2
0
    def __init__(self, adapter, host_uuid):
        super(LocalStorage, self).__init__(adapter, host_uuid)

        self.capabilities = {
            'shared_storage': False,
            'has_imagecache': False,
            # NOTE(efried): 'snapshot' capability set dynamically below.
        }

        # Query to get the Volume Group UUID
        if not CONF.powervm.volume_group_name:
            raise exception.OptRequiredIfOtherOptValue(
                if_opt='disk_driver', if_value='localdisk',
                then_opt='volume_group_name')
        self.vg_name = CONF.powervm.volume_group_name
        vios_w, vg_w = tsk_stg.find_vg(adapter, self.vg_name)
        self._vios_uuid = vios_w.uuid
        self.vg_uuid = vg_w.uuid
        # Set the 'snapshot' capability dynamically. If we're hosting I/O on
        # the management partition, we can snapshot. If we're hosting I/O on
        # traditional VIOS, we are limited by the fact that a VSCSI device
        # can't be mapped to two partitions (the VIOS and the management) at
        # once.
        self.capabilities['snapshot'] = self.mp_uuid == self._vios_uuid
        LOG.info("Local Storage driver initialized: volume group: '%s'",
                 self.vg_name)
Exemplo n.º 3
0
    def __init__(self, adapter, host_uuid):
        super(LocalStorage, self).__init__(adapter, host_uuid)

        # Query to get the Volume Group UUID
        if not CONF.powervm.volume_group_name:
            raise npvmex.OptRequiredIfOtherOptValue(
                if_opt='disk_driver', if_value='localdisk',
                then_opt='volume_group_name')
        self.vg_name = CONF.powervm.volume_group_name
        self._vios_uuid, self.vg_uuid = tsk_stg.find_vg(self.vg_name)
        self.image_cache_mgr = imagecache.ImageManager(self._vios_uuid,
                                                       self.vg_uuid, adapter)
        self.cache_lock = lockutils.ReaderWriterLock()
        LOG.info(_LI("Local Storage driver initialized: volume group: '%s'"),
                 self.vg_name)
Exemplo n.º 4
0
    def __init__(self, adapter, host_uuid):
        super(LocalStorage, self).__init__(adapter, host_uuid)

        # Query to get the Volume Group UUID
        if not CONF.powervm.volume_group_name:
            raise npvmex.OptRequiredIfOtherOptValue(
                if_opt='disk_driver',
                if_value='localdisk',
                then_opt='volume_group_name')
        self.vg_name = CONF.powervm.volume_group_name
        vios_w, vg_w = tsk_stg.find_vg(adapter, self.vg_name)
        self._vios_uuid = vios_w.uuid
        self.vg_uuid = vg_w.uuid
        self.image_cache_mgr = imagecache.ImageManager(self._vios_uuid,
                                                       self.vg_uuid, adapter)
        self.cache_lock = lockutils.ReaderWriterLock()
        # Set the 'snapshot' capability dynamically.  If we're hosting I/O on
        # the management partition, we can snapshot.  If we're hosting I/O on
        # traditional VIOS, we are limited by the fact that a VSCSI device
        # can't be mapped to two partitions (the VIOS and the management) at
        # once.
        self.capabilities['snapshot'] = self.mp_uuid == self._vios_uuid
        LOG.info("Local Storage driver initialized: volume group: '%s'",
                 self.vg_name)