The cinder.volume.drivers.ibm.storwize_svc.helpers Module

class StorwizeHelpers(run_ssh)

Bases: object

add_chap_secret_to_host(host_name)

Generate and store a randomly-generated CHAP secret for the host.

add_fc_wwpns(storage_nodes)

Add FC WWPNs to system node information.

add_iscsi_ip_addrs(storage_nodes)

Add iSCSI IP addresses to system node information.

add_vdisk_copy(vdisk, dest_pool, volume_type, state, config)

Add a vdisk copy in the given pool.

add_vdisk_qos(vdisk, qos)

Add the QoS configuration to the volume.

static build_default_opts(config)
static can_migrate_to_host(host, state)
change_vdisk_iogrp(vdisk, state, iogrp)
change_vdisk_options(vdisk, changes, opts, state)
change_vdisk_primary_copy(vdisk, copy_id)
check_host_mapped_vols(host_name)
static check_vdisk_opts(state, opts)
compression_enabled()

Return whether or not compression is enabled for this system.

create_copy(src, tgt, src_id, config, opts, full_copy, pool=None)

Create a new snapshot using FlashCopy.

create_fc_consistgrp(fc_consistgrp)
create_flashcopy_to_consistgrp(source, target, consistgrp, config, opts, full_copy=False, pool=None)

Create a FlashCopy mapping and add to consistent group.

create_host(connector)

Create a new host on the storage system.

We create a host name and associate it with the given connection information. The host name will be a cleaned up version of the given host name (at most 55 characters), plus a random 8-character suffix to avoid collisions. The total length should be at most 63 characters.

create_vdisk(name, size, units, pool, opts)
delete_consistgrp_snapshots(fc_consistgrp, snapshots)

Delete flashcopy maps and consistent group.

delete_fc_consistgrp(fc_consistgrp)
delete_host(host_name)
delete_vdisk(vdisk, force)

Ensures that vdisk is not part of FC mapping and deletes it.

disable_vdisk_qos(vdisk, qos)

Disable the QoS.

ensure_vdisk_no_fc_mappings(name, allow_snaps=True)

Ensure vdisk has no flashcopy mappings.

extend_vdisk(vdisk, amount)
find_vdisk_copy_id(vdisk, pool)
get_available_io_groups()

Return list of available IO groups.

get_chap_secret_for_host(host_name)

Generate and store a randomly-generated CHAP secret for the host.

get_conn_fc_wwpns(host)
get_host_from_connector(connector)

Return the Storwize host described by the connector.

get_node_info()

Return dictionary containing information on system’s nodes.

get_pool_attrs(pool)

Return attributes for the specified pool.

get_system_info()

Return system’s name, ID, and code level.

get_vdisk_attributes(vdisk)
get_vdisk_copies(vdisk)
get_vdisk_copy_attrs(vdisk, copy_id)
get_vdisk_params(config, state, type_id, volume_type=None, volume_metadata=None)

Return the parameters for creating the vdisk.

Takes volume type and defaults from config options into account.

static handle_keyerror(cmd, out)
is_vdisk_copy_synced(vdisk, copy_id)
is_vdisk_defined(vdisk_name)

Check if vdisk is defined.

is_vdisk_in_use(vdisk)

Returns True if the specified vdisk is mapped to at least 1 host.

map_vol_to_host(volume_name, host_name, multihostmap)

Create a mapping between a volume to a host.

prepare_fc_consistgrp(fc_consistgrp, timeout)

Prepare FC Consistency Group.

rename_vdisk(vdisk, new_name)
rm_vdisk_copy(vdisk, copy_id)
run_consistgrp_snapshots(fc_consistgrp, snapshots, state, config, timeout)
run_flashcopy(source, target, timeout, full_copy=True)

Create a FlashCopy mapping from the source to the target.

start_fc_consistgrp(fc_consistgrp)
stop_fc_consistgrp(fc_consistgrp)
svc_qos_keys = {'IOThrottling': {'default': '0', 'type': <type 'int'>, 'param': 'rate'}}
unmap_vol_from_host(volume_name, host_name)

Unmap the volume and delete the host if it has no more mappings.

update_vdisk_qos(vdisk, qos)

Update all the QoS in terms of a key and value.

svc_qos_keys saves all the supported QoS parameters. Going through this dict, we set the new values to all the parameters. If QoS is available in the QoS configuration, the value is taken from it; if not, the value will be set to default.

vdisk_by_uid(vdisk_uid)

Returns the properties of the vdisk with the specified UID.

Returns None if no such disk exists.

Previous topic

The cinder.volume.drivers.ibm.ibmnas Module

Next topic

The cinder.volume.drivers.ibm.storwize_svc.replication Module

Project Source

This Page