pyds8k.resources.ds8k.v1.common package¶
Submodules¶
pyds8k.resources.ds8k.v1.common.mixins module¶
- class pyds8k.resources.ds8k.v1.common.mixins.FCPortMixin[source]¶
Bases:
object- get_ioport(port_id)[source]¶
Get An IO Port for the Caller Object.
- Parameters
port_id (str) – Required. id of the IO Port.
- Returns
- Return type
object
- get_ioports(port_id=None)[source]¶
Get IO Ports for the Caller Object.
- Parameters
port_id (str) – id of the IO Port. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.ioports.IOPort.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.FlashCopyMixin[source]¶
Bases:
object- get_cs_flashcopies(fcid=None)[source]¶
Get Copy Service Flash Copies for the Caller Object.
- Parameters
fcid (str) – id of the flash copy. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.cs.flashcopies.FlashCopy.- Return type
list
- get_cs_flashcopy(fcid)[source]¶
Get A Copy Service Flash Copies for the Caller Object.
- Parameters
fcid (str) – Required. id of the flash copy.
- Returns
- Return type
object
- get_flashcopies(fcid=None)[source]¶
Get Flash Copies for the Caller Object.
- Parameters
fcid (str) – id of the flash copy. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.flashcopy.FlashCopy.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.HostPortMixin[source]¶
Bases:
object- get_host_port(port_id)[source]¶
Get An Host Ports for the Caller Object.
- Parameters
port_id (str) – id of the Host Port. Get all if None.
- Returns
- Return type
object
- get_host_ports(port_id=None)[source]¶
Get Host Ports for the Caller Object.
- Parameters
port_id (str) – id of the Host Port. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.host_ports.HostPort.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.PPRCMixin[source]¶
Bases:
object- get_cs_pprc(pprc_id)[source]¶
Get A Copy Service PPRC for the Caller Object.
- Parameters
pprc_id (str) – Required. id of the PPRC.
- Returns
- Return type
object
- get_cs_pprcs(pprc_id=None)[source]¶
Get Copy Service PPRC for the Caller Object.
- Parameters
pprc_id (str) – id of the PPRC. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.cs.pprcs.PPRC.- Return type
list
- get_pprc(pprc_id=None)[source]¶
Get PPRC for the Caller Object.
- Parameters
pprc_id (str) – id of the PPRC. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.pprc.PPRC.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootEncryptionGroupMixin[source]¶
Bases:
object- get_encryption_group(group_id)[source]¶
Get An Encryption Groups.
- Parameters
group_id (str) – Required. id of the target Encryption Group.
- Returns
- Return type
object
- get_encryption_groups(group_id=None)[source]¶
Get Encryption Groups.
- Parameters
group_id (str) – id of the target Encryption Group. Get all if none.
- Returns
A list of
pyds8k.resources.ds8k.v1.encryption_groups.EncryptionGroup.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootEventMixin[source]¶
Bases:
object- get_event(evt_id)[source]¶
Get An Event.
- Parameters
evt_id (str) – Required. id of the event.
- Returns
- Return type
object
- get_events(evt_id=None, evt_filter={})[source]¶
Get Events.
- Parameters
evt_id (str) – id of the event. Get all if None.
evt_filter (dict) – predefined filters.
- Returns
A list of
pyds8k.resources.ds8k.v1.events.Event.- Return type
list
- get_events_by_filter(warning=None, error=None, info=None, before=None, after=None)[source]¶
Get Events by filters.
- Parameters
warning (bool) – True or False
error (bool) – True or False
info (bool) – True or False
before (datetime) – timestamp of the end of the time window.
after (datetime) – timestamp of the start of the time window.
- Returns
A list of
pyds8k.resources.ds8k.v1.events.Event.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootFlashCopyMixin[source]¶
Bases:
object- create_cs_flashcopy(volume_pairs, options=[])[source]¶
Create Copy Service FlashCopy
- Parameters
volume_pairs (list) –
[{"source_volume" – 0000,”target_volume”: 1100},..]
options (list) – Options.
- Returns
- Return type
object
- delete_cs_flashcopy(flashcopy_id)[source]¶
Delete A Copy Service Flash Copy(R8).
- Parameters
flashcopy_id (str) – Required. id of the target flash copy.
- Returns
A tuple of DS8000 RESTAPI server response.
- Return type
tuple
- get_cs_flashcopies(fcid=None)[source]¶
Get Copy Service Flash Copies(R8). :param fcid: id of the flash copy. Get all if None. :type fcid: str
- Returns
A list of
pyds8k.resources.ds8k.v1.cs.flashcopies.FlashCopy.- Return type
list
- get_cs_flashcopy(fcid=None)[source]¶
Get A Copy Service Flash Copy(R8). :param fcid: Required. id of the flash copy. :type fcid: str
- Returns
- Return type
object
- get_flashcopies(fcid=None)[source]¶
Get Flash Copies.
- Parameters
fcid (str) – id of the flash copy. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.flashcopy.FlashCopy.- Return type
list
- get_flashcopies_by_volume(volume_id)[source]¶
Get Flash Copies by volume id.
- Parameters
volume_id (str) – Required. id of the target volume.
- Returns
A list of
pyds8k.resources.ds8k.v1.flashcopy.FlashCopy.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootHostMixin[source]¶
Bases:
object- create_host(host_name, hosttype)[source]¶
Create A Host.
- Parameters
host_name (str) – Required. name of the host.
hosttype (str) – Required. type of the host.
- Returns
- Return type
object
- delete_host(host_name)[source]¶
Delete a host by name.
- Parameters
host_name (str) – Required. name of the host.
- Returns
tuple of DS8000 Server Response.
- Return type
tuple
- get_host(host_name)[source]¶
Get A Host.
- Parameters
host_name (str) – Required. name of the target host.
- Returns
- Return type
object
- get_hosts(host_name=None)[source]¶
Get Hosts.
- Parameters
host_name (str) – name of the target host. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.hosts.Host.- Return type
list
- get_ioports_by_host(host_name)[source]¶
Get IO Ports by the name of the Host. :param host_name: Required. name of the host. :type host_name: str
- Returns
A list of
pyds8k.resources.ds8k.v1.ioports.IOPort.- Return type
list
- get_mapping_by_host(host_name, lunid)[source]¶
Get the Volume Mapping by the name of the host and the id of the volume.
- Parameters
host_name (str) – Required. name of the host.
lunid (str) – Required. id of the volume.
- Returns
- Return type
object
- get_mappings_by_host(host_name)[source]¶
Get Volume Mappings by the name fo the Host.
- Parameters
host_name (str) – Required. name of the host.
- Returns
A list of
pyds8k.resources.ds8k.v1.mappings.Volmap.- Return type
list
- get_volumes_by_host(host_name)[source]¶
Get Volumes by the name of the Host.
- Parameters
host_name (str) – Required. name of the host.
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootHostPortMixin[source]¶
Bases:
object- create_host_port(port_id, host_name)[source]¶
Create A Host Port.
- Parameters
port_id (str) – Required. wwpn of the port.
host_name (str) – Required. name of the host.
- Returns
- Return type
object
- delete_host_port(port_id)[source]¶
Delete A Host Port.
- Parameters
port_id (str) – Required. id of the target host port.
- Returns
A tuple of HTTP Response and DS8000 server message.
- Return type
tuple
- get_host_port(port_id)[source]¶
Get A Host Port. :param port_id: Required. id of the target host port. :type port_id: str
- Returns
- Return type
object
- get_host_ports(port_id=None)[source]¶
Get Host Ports.
- Parameters
port_id (str) – id of the target host port. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.host_ports.HostPort.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootIOEnclosureMixin[source]¶
Bases:
object- get_io_enclosure(enclosure_id)[source]¶
Get an IO Enclosure.
- Parameters
enclosure_id (str) – Required. id of the target IO Enclosure.
- Returns
- Return type
object
- get_io_enclosures(enclosure_id=None)[source]¶
Get IO Enclosures.
- Parameters
enclosure_id (str) – id of the target IO Enclosure. Get all if none.
- Returns
A list of
pyds8k.resources.ds8k.v1.io_enclosures.IOEnclosure.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootIOPortMixin[source]¶
Bases:
object- get_ioport(port_id)[source]¶
Get an IO Port.
- Parameters
port_id (str) – Required. id of the target IO port.
- Returns
- Return type
object
- get_ioports(port_id=None)[source]¶
Get IO Ports
- Parameters
port_id (str) – id of the target IO port. Get all if none.
- Returns
A list of
pyds8k.resources.ds8k.v1.ioports.IOPort.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootLSSMixin[source]¶
Bases:
object- create_lss_ckd(lss_id=None, lss_type='ckd', lcu_type='3990-6', ss_id=None)[source]¶
Create CKD LSS
- Parameters
lss_id (str) – Required. id of the lss to be created.
lss_type (str) – ‘ckd’, optional
lcu_type (str) – valid types are 3990-3, 3990-6, 3990-tpf, bs2000
ss_id (str) – associated subsystem id
- Returns
A list of
pyds8k.resources.ds8k.v1.lss.LSS.- Return type
list
- delete_lss_by_id(lss_id)[source]¶
Delete an LSS.
- Parameters
lss_id (str) – Require. id of lss to be deleted.
- Returns
tuple of HTTP Response and DS8000 server message.
- Return type
tuple
- get_lss(lss_id=None, lss_type='')[source]¶
Get LSS
- Parameters
lss_id (str) – id of the target LSS. Get all if None.
lss_type (str) – type of the target LSS.
- Returns
A list of
pyds8k.resources.ds8k.v1.lss.LSS.- Return type
list
- get_lss_by_id(lss_id)[source]¶
Get LSS by id
- Parameters
lss_id (str) – Required. id of the target LSS.
- Returns
- Return type
object
- get_volumes_by_lss(lss_id)[source]¶
Get Volumes by id of the LSS
- Parameters
lss_id (str) – Required. id of the LSS.
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootMarrayMixin[source]¶
Bases:
object- get_marray(marray_id)[source]¶
Get a managed array.
- Parameters
marray_id (str) – Required. id of the target managed array.
- Returns
- Return type
object
- get_marrays(marray_id=None)[source]¶
Get managed arrays
- Parameters
marray_id (str) – id of the target managed array, get all if none
- Returns
the list of
pyds8k.resources.ds8k.v1.marrays.Marray.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootNodeMixin[source]¶
Bases:
object- get_node(node_id)[source]¶
Get a node by id
- Parameters
node_id (str) – id of the node to get.
- Returns
- Return type
object
- get_nodes(node_id=None)[source]¶
Get nodes
- Parameters
node_id (str) – get the node by id or all nodes if no id specified.
- Returns
A list of
pyds8k.resources.ds8k.v1.nodes.Node.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootPPRCMixin[source]¶
Bases:
object- get_cs_pprc(pprc_id)[source]¶
Get A Copy Service PPRCs(R8).
- Parameters
pprc_id (str) – Required. id of the PPRC.
- Returns
- Return type
object
- get_cs_pprcs(pprc_id=None)[source]¶
Get Copy Service PPRCs(R8).
- Parameters
pprc_id (str) – id of the PPRC. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.cs.pprcs.PPRC.- Return type
list
- get_pprc(pprc_id=None)[source]¶
Get PPRC.
- Parameters
pprc_id (str) – id of the PPRC. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.pprc.PPRC.- Return type
list
- get_pprc_by_volume(volume_id)[source]¶
Get PPRC for a Volume by volume id.
- Parameters
volume_id (str) – Required. id of the target volume.
- Returns
A list of
pyds8k.resources.ds8k.v1.pprc.PPRC.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootPoolMixin[source]¶
Bases:
object- get_pool(pool_id)[source]¶
Get Extent Pool
- Parameters
pool_id (str) – Required. id of the target extent pool.
- Returns
- Return type
object
- get_pools(pool_id=None)[source]¶
Get Extent Pools
- Parameters
pool_id (str) – id of the target extent pool. Get all if none.
- Returns
A list of
pyds8k.resources.ds8k.v1.pools.Pool.- Return type
list
- get_volumes_by_pool(pool_id)[source]¶
Get volumes of a pool by the pool id.
- Parameters
pool_id (str) – id of the target extent pool.
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootResourceMixin[source]¶
Bases:
pyds8k.resources.ds8k.v1.common.mixins.RootSystemMixin,pyds8k.resources.ds8k.v1.common.mixins.RootFlashCopyMixin,pyds8k.resources.ds8k.v1.common.mixins.RootPPRCMixin,pyds8k.resources.ds8k.v1.common.mixins.RootNodeMixin,pyds8k.resources.ds8k.v1.common.mixins.RootMarrayMixin,pyds8k.resources.ds8k.v1.common.mixins.RootUserMixin,pyds8k.resources.ds8k.v1.common.mixins.RootIOEnclosureMixin,pyds8k.resources.ds8k.v1.common.mixins.RootEncryptionGroupMixin,pyds8k.resources.ds8k.v1.common.mixins.RootEventMixin,pyds8k.resources.ds8k.v1.common.mixins.RootPoolMixin,pyds8k.resources.ds8k.v1.common.mixins.RootVolumeMixin,pyds8k.resources.ds8k.v1.common.mixins.RootLSSMixin,pyds8k.resources.ds8k.v1.common.mixins.RootIOPortMixin,pyds8k.resources.ds8k.v1.common.mixins.RootHostPortMixin,pyds8k.resources.ds8k.v1.common.mixins.RootHostMixin,pyds8k.resources.ds8k.v1.common.mixins.RootBaseMixin
- class pyds8k.resources.ds8k.v1.common.mixins.RootSystemMixin[source]¶
Bases:
object- get_systems()[source]¶
Get DS8000 System Object
- Returns
A list of
pyds8k.resources.ds8k.v1.systems.System.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootUserMixin[source]¶
Bases:
object- get_user(user_name)[source]¶
Get a user.
- Parameters
user_name (str) – Required. the name of the target user.
- Returns
- Return type
object
- get_users(user_name=None)[source]¶
Get users.
- Parameters
user_name (str) – name of the target user. get all if none.
- Returns
A list of
pyds8k.resources.ds8k.v1.users.User.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.RootVolumeMixin[source]¶
Bases:
object- create_volume(name, cap, pool, stgtype='fb', captype='gib', lss='', tp='')[source]¶
Create One Volume
- Parameters
name (str) – Required. The name for the volume to be created
cap (str) – Required. The capacity, number in str
pool (str) – Required. The pool for the volume
stgtype (str) – select from types.DS8K_VOLUME_TYPES, Default to
'fb'captype (str) – select from types.DS8K_CAPTYPES, Default to
'gib'lss (str) – logical subsystem id
tp (str) – storage allocation method, valid options include none, ese, tse
- Returns
- Return type
object
- create_volume_ckd(name, cap, pool, captype='', lss='', tp='')[source]¶
Create One CKD Volume
- Parameters
name (str) – Required. The name for the volume to be created
cap (str) – Required. The capacity, number in str
pool (str) – Required. The pool for the volume
captype (str) – select from types.DS8K_CAPTYPES, Default to
'gib'lss (str) – logical subsystem id
tp (str) – storage allocation method, valid options include none, ese, tse
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- create_volume_fb(name, cap, pool, captype='', lss='', tp='')[source]¶
Create One FB Volume
- Parameters
name (str) – Required. The name for the volume to be created
cap (str) – Required. The capacity, number in str
pool (str) – Required. The pool for the volume
captype (str) – select from types.DS8K_CAPTYPES, Default to
'gib'lss (str) – logical subsystem id
tp (str) – storage allocation method, valid options include none, ese, tse
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- create_volumes(name_col, cap, pool, name='', quantity='', stgtype='fb', captype='gib', lss='', tp='')[source]¶
Create a group of volumes with different names
- Parameters
name_col (list) – [“name-1”, “name-2”,…, “name-N”]
cap (str) – the capacity, number in str
pool (str) – the pool for the volume
name (str) – Either 1) Name of the volume to be created, or 2) Prefix of the <quantity> volumes to be created
quantity (str) – number of volumes to create, number in str
stgtype (str) – select from types.DS8K_VOLUME_TYPES, default to
'fb'captype (str) – select from types.DS8K_CAPTYPES, default to
'gib'lss (str) – logical subsystem id
tp (str) – storage allocation method, in
none,ese,tse
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- create_volumes_with_names(names, cap, pool, stgtype='fb', captype='gib', lss='', tp='')[source]¶
Create a group of volumes with specified names
- Parameters
names (str) – [“name-1”, “name-2”,…, “name-N”]
cap (str) – the capacity, number in str
pool (str) – the pool for the volume
stgtype (str) – select from types.DS8K_VOLUME_TYPES, default to
'fb'captype (str) – select from types.DS8K_CAPTYPES, default to
'gib'lss (str) – logical subsystem id
tp (str) – storage allocation method, in none, ese, tse
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- create_volumes_with_same_prefix(name, cap, pool, quantity='', stgtype='fb', captype='gib', lss='', tp='')[source]¶
Create a volume with a name or a group of volumes with the same prefix
- Parameters
name (str) – 1, Name of the volume to be created, or 2. Prefix of the <quantity> volumes to be created
cap (str) – the capacity, number in str
pool (str) – the pool for the volume
quantity (str) – number of volumes to create, number in str
stgtype (str) – select from types.DS8K_VOLUME_TYPES, default to
'fb'captype (str) – select from types.DS8K_CAPTYPES, default to
'gib'lss (str) – logical subsystem id
tp (str) – storage allocation method, in none, ese, tse
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- create_volumes_without_same_prefix(name_col, cap, pool, stgtype='fb', captype='gib', lss='', tp='')[source]¶
Create a group of volumes with specified names
- Parameters
name_col (str) – [“name-1”, “name-2”,…, “name-N”]
cap (str) – the capacity, number in str
pool (str) – the pool for the volume
stgtype (str) – select from types.DS8K_VOLUME_TYPES, default to
'fb'captype (str) – select from types.DS8K_CAPTYPES, default to
'gib'lss (str) – logical subsystem id
tp (str) – storage allocation method, in none, ese, tse
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- delete_volume(volume_id)[source]¶
Delete A volume.
- Parameters
volume_id (str) – Required. id of the target volume.
- Returns
tuple of DS8000 Server Response.
- Return type
tuple
- get_volume(volume_id)[source]¶
Get A volume.
- Parameters
volume_id (str) – Required. id of the target volume.
- Returns
- Return type
object
- get_volumes(volume_id=None)[source]¶
Get Volumes
- Parameters
volume_id (str) – id of the target volume. Get all if none.
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list
- update_volume_extend(volume_id, new_size, captype='')[source]¶
- Parameters
volume_id (str) – Required. id of the target volume.
new_size (str) – Required. new size of the target volume.
captype (str) – Required. select from types.DS8K_CAPTYPES.
- Returns
- Return type
object
- update_volume_move(volume_id, new_pool)[source]¶
Move one volume to a new extent pool. :param volume_id: Required. id of the target volume. :type volume_id: str :param new_pool: Required. id of the new extent pool. :type new_pool: str
- Returns
- Return type
object
- class pyds8k.resources.ds8k.v1.common.mixins.VolmapMixin[source]¶
Bases:
object- create_mappings(volumes=[], mappings=[])[source]¶
Create the Mapping of the Volume by Volume id for the Caller Object.
- Parameters
volumes (list) – Require. volume ids.
mappings (list) – Required. mappings.
- Returns
A list of
pyds8k.resources.ds8k.v1.mappings.Volmap.- Return type
list
- delete_mapping(lunid)[source]¶
Delete the Mapping of the Volume by Volume id for the Caller Object.
- Parameters
lunid (str) – Require. id of the volume.
- Returns
tuple of DS8000 RESTAPI Server Response.
- Return type
tuple
- get_mapping(lunid)[source]¶
Get the Mapping of the Volume by Volume id for the Caller Object.
- Parameters
lunid (str) – Require. id of the volume.
- Returns
- Return type
object
- get_mappings(lunid=None)[source]¶
Get Mappings of the Volume by Volume id for the Caller Object.
- Parameters
lunid (str) – id of the volume. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.mappings.Volmap.- Return type
list
- class pyds8k.resources.ds8k.v1.common.mixins.VolumeMixin[source]¶
Bases:
object- get_volume(volume_id)[source]¶
Get A Volume for the Caller Object.
- Parameters
volume_id (str) – Required. id of the volume.
- Returns
list: A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
object
- get_volumes(volume_id=None)[source]¶
Get Volumes for the Caller Object.
- Parameters
volume_id (str) – id of the volume. Get all if None.
- Returns
A list of
pyds8k.resources.ds8k.v1.volumes.Volume.- Return type
list