The cinder.volume.drivers.huawei.huawei_driver Module

The cinder.volume.drivers.huawei.huawei_driver Module

class HuaweiBaseDriver(*args, **kwargs)

Bases: cinder.volume.driver.VolumeDriver

CI_WIKI_NAME = 'Huawei_volume_CI'
check_for_setup_error()
check_func_support(obj_name)
create_cloned_volume(volume, src_vref)

Clone a new volume from an existing volume.

create_export(context, volume, connector)

Export a volume.

create_export_snapshot(context, snapshot, connector)

Export a snapshot.

create_group(context, group, *args, **kwargs)
create_group_from_src(context, group, *args, **kwargs)
create_group_snapshot(context, group, *args, **kwargs)
create_snapshot(snapshot)

Creates a snapshot.

create_volume(volume)

Create a volume.

create_volume_from_snapshot(volume, snapshot)

Create a volume from a snapshot.

We use LUNcopy to copy a new volume from snapshot. The time needed increases as volume size does.

delete_group(context, group, *args, **kwargs)
delete_group_snapshot(context, group, *args, **kwargs)
delete_snapshot(snapshot)

Deletes a snapshot.

delete_volume(volume)

Delete a volume.

Three steps: Firstly, remove associate from lungroup. Secondly, remove associate from QoS policy. Thirdly, remove the lun.

determine_changes_when_retype(volume, new_type, host)
do_setup(context)

Instantiate common class and login storage system.

ensure_export(context, volume)

Synchronously recreate an export for a volume.

extend_volume(volume, new_size)

Extend a volume.

failover_host(context, volumes, secondary_id=None, groups=None)

Failover all volumes to secondary.

get_local_and_remote_client_conf()
get_local_and_remote_dev_conf()
get_lun_id_and_type(volume)
get_lun_specs(lun_id)
get_volume_stats(refresh=False)

Get volume status and reload huawei config file.

initialize_connection_snapshot(snapshot, connector, **kwargs)

Map a snapshot to a host and return target iSCSI information.

manage_existing(volume, external_ref)

Manage an existing volume on the backend storage.

manage_existing_get_size(volume, external_ref)

Get the size of the existing volume.

manage_existing_snapshot(snapshot, existing_ref)

Brings an existing backend storage object under Cinder management.

existing_ref is passed straight through from the API request’s manage_existing_ref value, and it is up to the driver how this should be interpreted. It should be sufficient to identify a storage object that the driver should somehow associate with the newly-created cinder snapshot structure.

There are two ways to do this:

  1. Rename the backend storage object so that it matches the snapshot[‘name’] which is how drivers traditionally map between a cinder snapshot and the associated backend storage object.
  2. Place some metadata on the snapshot, or somewhere in the backend, that allows other driver requests (e.g. delete) to locate the backend storage object when required.

If the existing_ref doesn’t make sense, or doesn’t refer to an existing backend storage object, raise a ManageExistingInvalidReference exception.

Parameters:
  • snapshot – Cinder volume snapshot to manage
  • existing_ref – Driver-specific information used to identify a volume snapshot
manage_existing_snapshot_get_size(snapshot, existing_ref)

Get the size of the existing snapshot.

migrate_volume(ctxt, volume, host, new_type=None)

Migrate a volume within the same array.

modify_lun(lun_id, change_opts)
remove_export(context, volume)

Remove an export for a volume.

remove_export_snapshot(context, snapshot)

Remove an export for a snapshot.

remove_host_with_check(host_id)
retype(ctxt, volume, new_type, diff, host)

Convert the volume to be of the new type.

terminate_connection_snapshot(snapshot, connector, **kwargs)

Delete map between a snapshot and a host.

unmanage(volume)

Export Huawei volume from Cinder.

unmanage_snapshot(snapshot)

Unmanage the specified snapshot from Cinder management.

update_group(context, group, *args, **kwargs)
update_migrated_volume(ctxt, volume, new_volume, original_volume_status=None)

Return model update for migrated volume.

Each driver implementing this method needs to be responsible for the values of _name_id and provider_location. If None is returned or either key is not set, it means the volume table does not need to change the value(s) for the key(s). The return format is {“_name_id”: value, “provider_location”: value}.

Parameters:
  • volume – The original volume that was migrated to this backend
  • new_volume – The migration volume object that was created on this backend as part of the migration process
  • original_volume_status – The status of the original volume
Returns:

model_update to update DB with any needed changes

update_support_capability(stats)
class HuaweiFCDriver(*args, **kwargs)

Bases: cinder.volume.drivers.huawei.huawei_driver.HuaweiBaseDriver, cinder.volume.driver.FibreChannelDriver

FC driver for Huawei OceanStor storage arrays.

Version history:

1.0.0 - Initial driver
1.1.0 - Provide Huawei OceanStor 18000 storage volume driver
1.1.1 - Code refactor
        Multiple pools support
        SmartX support
        Volume migration support
        Volume retype support
        FC zone enhancement
        Volume hypermetro support
2.0.0 - Rename to HuaweiFCDriver
2.0.1 - Manage/unmanage volume support
2.0.2 - Refactor HuaweiFCDriver
2.0.3 - Manage/unmanage snapshot support
2.0.4 - Balanced FC port selection
2.0.5 - Replication V2 support
2.0.7 - Hypermetro support
        Hypermetro consistency group support
        Consistency group support
        Cgsnapshot support
2.0.8 - Backup snapshot optimal path support
2.0.9 - Support reporting disk type of pool
VERSION = '2.0.9'
get_volume_stats(refresh=False)

Get volume status.

initialize_connection(*args, **kwargs)
terminate_connection(*args, **kwargs)
class HuaweiISCSIDriver(*args, **kwargs)

Bases: cinder.volume.drivers.huawei.huawei_driver.HuaweiBaseDriver, cinder.volume.driver.ISCSIDriver

ISCSI driver for Huawei storage arrays.

Version history:

1.0.0 - Initial driver
1.1.0 - Provide Huawei OceanStor storage 18000 driver
1.1.1 - Code refactor
        CHAP support
        Multiple pools support
        ISCSI multipath support
        SmartX support
        Volume migration support
        Volume retype support
2.0.0 - Rename to HuaweiISCSIDriver
2.0.1 - Manage/unmanage volume support
2.0.2 - Refactor HuaweiISCSIDriver
2.0.3 - Manage/unmanage snapshot support
2.0.5 - Replication V2 support
2.0.6 - Support iSCSI configuration in Replication
2.0.7 - Hypermetro support
        Hypermetro consistency group support
        Consistency group support
        Cgsnapshot support
2.0.8 - Backup snapshot optimal path support
2.0.9 - Support reporting disk type of pool
VERSION = '2.0.9'
get_volume_stats(refresh=False)

Get volume status.

initialize_connection(volume, connector)

Map a volume to a host and return target iSCSI information.

terminate_connection(volume, connector, **kwargs)

Delete map between a volume and a host.

class Snapshot(id, volume_id, volume, provider_location)

Bases: tuple

id

Alias for field number 0

provider_location

Alias for field number 3

volume

Alias for field number 2

volume_id

Alias for field number 1

class Volume(id, lun_type, provider_location, metadata)

Bases: tuple

id

Alias for field number 0

lun_type

Alias for field number 1

metadata

Alias for field number 3

provider_location

Alias for field number 2

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.