The cinder.volume.drivers.datacore.api Module

The cinder.volume.drivers.datacore.api Module

Classes to invoke DataCore SANsymphony API.

class DataCoreClient(host, username, password, timeout)

Bases: object

DataCore SANsymphony client.

API_RETRY_INTERVAL = 10
DATACORE_EXECUTIVE_PORT = '3794'
EXECUTIVE_SERVICE = 'IExecutiveServiceEx'
EXECUTIVE_SERVICE_BINDING = 'CustomBinding_IExecutiveServiceEx'
MUST_UNDERSTAND = attr (prefix=SOAP-ENV, name=mustUnderstand, value=(1))
NS_DATACORE_EXECUTIVE = 'http://schemas.datacontract.org/2004/07/DataCore.Executive'
NS_DATACORE_EXECUTIVE_ISCSI = 'http://schemas.datacontract.org/2004/07/DataCore.Executive.iSCSI'
NS_DATACORE_EXECUTIVE_SCSI = 'http://schemas.datacontract.org/2004/07/DataCore.Executive.Scsi'
NS_SERIALIZATION_ARRAYS = 'http://schemas.microsoft.com/2003/10/Serialization/Arrays'
NS_WSA = ('wsa', 'http://www.w3.org/2005/08/addressing')
O_ACCESS_TOKEN = '{http://schemas.datacontract.org/2004/07/DataCore.Executive.iSCSI}AccessToken'
O_ARRAY_OF_PERFORMANCE_TYPE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}ArrayOfPerformanceType'
O_ARRAY_OF_STRING = '{http://schemas.microsoft.com/2003/10/Serialization/Arrays}ArrayOfstring'
O_CLIENT_MACHINE_TYPE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}ClientMachineType'
O_DATA_SIZE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}DataSize'
O_LOGICAL_DISK_ROLE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}LogicalDiskRole'
O_LOGICAL_UNIT_TYPE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}LogicalUnitType'
O_MIRROR_RECOVERY_PRIORITY = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}MirrorRecoveryPriority'
O_PATH_POLICY = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}PathPolicy'
O_PERFORMANCE_TYPE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}PerformanceType'
O_POOL_VOLUME_TYPE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}PoolVolumeType'
O_SCSI_MODE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive.Scsi}ScsiMode'
O_SCSI_PORT_DATA = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}ScsiPortData'
O_SCSI_PORT_NEXUS_DATA = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}ScsiPortNexusData'
O_SCSI_PORT_TYPE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive.Scsi}ScsiPortType'
O_SNAPSHOT_TYPE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}SnapshotType'
O_VIRTUAL_DISK_DATA = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}VirtualDiskData'
O_VIRTUAL_DISK_STATUS = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}VirtualDiskStatus'
O_VIRTUAL_DISK_SUB_TYPE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}VirtualDiskSubType'
O_VIRTUAL_DISK_TYPE = '{http://schemas.datacontract.org/2004/07/DataCore.Executive}VirtualDiskType'
STORAGE_SERVICES = 'IStorageServices'
STORAGE_SERVICES_BINDING = 'CustomBinding_IStorageServices'
WSA_ANONYMOUS = 'http://www.w3.org/2005/08/addressing/anonymous'
assign_port(client_id, port_id)

Assign a port to a client.

Parameters:
  • client_id – Client id
  • port_id – Port id
Returns:

Updated port data, which will now have its host id set to the client id

bind_logical_disk(virtual_disk_id, logical_disk_id, role, create_mirror_mappings, create_client_mappings, add_redundancy)

Bind (add) a logical disk to a virtual disk.

Parameters:
  • virtual_disk_id – Id of the virtual disk to bind to
  • logical_disk_id – Id of the logical disk being bound
  • role – logical disk’s role
  • create_mirror_mappings – If True, automatically create the mirror mappings to this disk, assuming there is already another logical disk bound
  • create_client_mappings – If True, automatically create mappings from mapped hosts to the new disk
  • add_redundancy – If True, the mirror has redundant mirror paths
Returns:

Updated virtual disk data

build_access_token(initiator_node_name, initiator_username, initiator_password, mutual_authentication, target_username, target_password)

Create an AccessToken object.

Parameters:
  • initiator_node_name – Initiator node name
  • initiator_username – Initiator user name
  • initiator_password – Initiator password
  • mutual_authentication – If True the target and the initiator authenticate each other. A separate secret is set for each target and for each initiator in the storage area network (SAN).
  • target_username – Target user name
  • target_password – Target password
Returns:

AccessToken object

build_scsi_port_data(host_id, port_name, port_mode, port_type)

Create ScsiPortData object that represents SCSI port, of any type.

Parameters:
  • host_id – Id of the port’s host computer
  • port_name – Unique name of the port.
  • port_mode – Mode of port: initiator or target
  • port_type – Type of port, Fc, iSCSI or loopback
Returns:

ScsiPortData object

build_scsi_port_nexus_data(initiator_port_id, target_port_id)

Create a ScsiPortNexusData object.

Nexus is a pair of ports that can communicate, one being the initiator, the other the target

Parameters:
  • initiator_port_id – Id of the initiator port
  • target_port_id – Id of the target port
Returns:

ScsiPortNexusData object

build_virtual_disk_data(virtual_disk_alias, virtual_disk_type, size, description, storage_profile_id)

Create VirtualDiskData object.

Parameters:
  • virtual_disk_alias – User-visible alias of the virtual disk, which must be unique
  • virtual_disk_type – Virtual disk type
  • size – Virtual disk size
  • description – A user-readable description of the virtual disk
  • storage_profile_id – Virtual disk storage profile
Returns:

VirtualDiskData object

create_pool_logical_disk(pool_id, pool_volume_type, size, min_quota=None, max_quota=None)

Create the pool logical disk.

Parameters:
  • pool_id – Pool id
  • pool_volume_type – Type, either striped or spanned
  • size – Size
  • min_quota – Min quota
  • max_quota – Max quota
Returns:

New logical disk data

create_snapshot(virtual_disk_id, name, description, destination_pool_id, snapshot_type, duplicate_disk_id, storage_profile_id)

Create a snapshot relationship.

Parameters:
  • virtual_disk_id – Virtual disk id
  • name – Name of snapshot
  • description – Description
  • destination_pool_id – Destination pool id
  • snapshot_type – Type of snapshot
  • duplicate_disk_id – If set to True then the destination virtual disk’s SCSI id will be a duplicate of the source’s
  • storage_profile_id – Specifies the destination virtual disk’s storage profile
Returns:

New snapshot data

create_target_device(target_domain_id, nexus)

Create a target device, given a target domain and a nexus.

Parameters:
  • target_domain_id – Target domain id
  • nexus – Nexus, or pair of ports
Returns:

New target device

create_target_domain(initiator_host_id, target_host_id)

Create a target domain given a pair of hosts, target and initiator.

Parameters:
  • initiator_host_id – Id of the initiator host machine
  • target_host_id – Id of the target host server
Returns:

New target domain

create_virtual_disk_ex2(virtual_disk_data, first_logical_disk_id, second_logical_disk_id, add_redundancy)

Create a virtual disk specifying the both logical disks.

Parameters:
  • virtual_disk_data – Virtual disk’s properties
  • first_logical_disk_id – Id of the logical disk to use
  • second_logical_disk_id – Id of the second logical disk to use
  • add_redundancy – If True, the mirror has redundant mirror paths
Returns:

New virtual disk’s data

delete_logical_disk(logical_disk_id)

Delete the logical disk.

Parameters:logical_disk_id – Logical disk id
delete_snapshot(snapshot_id)

Delete the snapshot.

Parameters:snapshot_id – Snapshot id
delete_target_device(target_device_id)

Delete a target device.

Parameters:target_device_id – Target device id
delete_target_domain(target_domain_id)

Delete a target domain.

Parameters:target_domain_id – Target domain id
delete_virtual_disk(virtual_disk_id, delete_logical_disks)

Delete a virtual disk.

Parameters:
  • virtual_disk_id – Id of the virtual disk
  • delete_logical_disks – If True, delete the associated logical disks
designate_map_store(pool_id)

Designate which pool the snapshot mapstore will be allocated from.

Parameters:pool_id – Pool id
Returns:Updated server host data, which includes the mapstore pool id
get_clients()

Get all the clients in the configuration.

Returns:A list of client data
get_disk_pools()

Get all the pools in the server group.

Returns:A list of disk pool data
get_logical_disk_chunk_allocation_map(logical_disk_id)

Get the logical disk chunk allocation map.

The logical disk allocation map details all the physical disk chunks that are currently allocated to this logical disk.

Parameters:logical_disk_id – Logical disk id
Returns:A list of member allocation maps, restricted to chunks allocated on to this logical disk
get_logical_disks()

Get all the logical disks defined in the system.

Returns:A list of logical disks
get_logical_units()

Get all the mappings configured in the system.

Returns:A list of mappings
get_next_free_lun(target_device_id)

Find the next unused LUN number for a specified target device.

Parameters:target_device_id – Target device id
Returns:LUN number
get_next_virtual_disk_alias(base_alias)

Get the next available (unused) virtual disk alias.

Parameters:base_alias – Base string of the new alias
Returns:New alias
get_performance_by_type(performance_types)

Get performance data for specific types of performance counters.

Parameters:performance_types – A list of performance counter types
Returns:A list of performance data points
get_ports()

Get all ports in the configuration.

Returns:A list of SCSI ports
get_server_groups()

Get all the server groups in the configuration.

Returns:A list of server group data.
get_servers()

Get all the server hosts in the configuration.

Returns:A list of server host data
get_snapshots()

Get all the snapshots on all the servers in the region.

Returns:A list of snapshot data.
get_storage_profiles()

Get all the all the defined storage profiles.

Returns:A list of storage profiles
get_target_devices()

Get all the target devices in the configuration.

Returns:A list of target devices
get_target_domains()

Get all the target domains in the configuration.

Returns:A list of target domains
get_virtual_disks()

Get all the virtual disks in the configuration.

Returns:A list of virtual disk’s data
map_logical_disk(logical_disk_id, nexus, lun, initiator_host_id, mapping_type)

Map a logical disk to a host.

Parameters:
  • logical_disk_id – Id of the logical disk
  • nexus – Nexus, or pair of ports
  • lun – Logical Unit Number
  • initiator_host_id – Id of the initiator host machine
  • mapping_type – Type of mapping
Returns:

New mapping

register_client(host_name, description, machine_type, mode, preferred_server_ids)

Register the client, creating a client object in the configuration.

Parameters:
  • host_name – Name of the client
  • description – Description
  • machine_type – Type of client
  • mode – Path policy mode of the client
  • preferred_server_ids – Preferred server ids
Returns:

New client data

register_port(scsi_port_data)

Register a port in the configuration.

Parameters:scsi_port_data – Port data
Returns:Updated port data
serve_virtual_disks_to_host(host_id, virtual_disks)

Serve multiple virtual disks to a specified host.

Parameters:
  • host_id – Id of the host machine
  • virtual_disks – A list of virtual disks to serve
Returns:

A list of the virtual disks actually served to the host

set_access_token(iscsi_port_id, access_token)

Set the access token.

The access token allows access to a specific network node from a specific iSCSI port.

Parameters:
  • iscsi_port_id – Id of the initiator iSCSI port
  • access_token – Access token to be validated
Returns:

Port data

set_client_capabilities(client_id, mpio, alua)

Set the client capabilities for MPIO and ALUA.

Parameters:
  • client_id – Client id
  • mpio – If set to True then MPIO-capable
  • alua – If set to True then ALUA-capable
Returns:

Updated client data

set_server_port_properties(port_id, properties)

Set a server port’s properties.

Parameters:
  • port_id – Port id
  • properties – New properties
Returns:

Updated port data

set_virtual_disk_size(virtual_disk_id, size)

Change the size of a virtual disk.

Parameters:
  • virtual_disk_id – Id of the virtual disk
  • size – New size
Returns:

Virtual disk’s data

unmap_logical_disk(logical_disk_id, nexus)

Unmap a logical disk mapped with a specified nexus.

Parameters:
  • logical_disk_id – Id of the logical disk
  • nexus – Nexus, or pair of ports
unserve_virtual_disks_from_host(host_id, virtual_disks)

Unserve multiple virtual disks from a specified host.

Parameters:
  • host_id – Id of the host machine
  • virtual_disks – A list of virtual disks to unserve
unserve_virtual_disks_from_port(port_id, virtual_disks)

Unserve multiple virtual disks from a specified initiator port.

Parameters:
  • port_id – Id of the initiator port
  • virtual_disks – A list of virtual disks to unserve
class FaultDefinitionsFilter

Bases: suds.plugin.DocumentPlugin

Plugin to process the DataCore API WSDL document.

The document plugin removes fault definitions for callback operations from the DataCore API WSDL.

parsed(context)

Suds has parsed a WSDL/XSD document.

Provides the plugin with an opportunity to inspect/modify the parsed document. Called after each WSDL/XSD document is parsed.

@param context: The document context. @type context: L{DocumentContext}

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.