Module OSCPlugin :: Class IStorageArrayPlugin
[hide private]
[frames] | no frames]

Class IStorageArrayPlugin

source code

object --+    
         |    
   IPlugin --+
             |
            IStorageArrayPlugin

Plugin interface for Storage Array management.

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
dict
getPluginInfo(klass)
Return all the required information to identify this plugin.
source code
    Inherited from IPlugin
 
getNamedTemporaryFile(klass, mode='w+b', bufsize=-1, suffix='', prefix='tmpfil', directory=None, delete=True)
This method is identical to the standard tempfile.NamedTemporaryFile() method.
source code
str
getPluginType(klass)
Return the plugin type.
source code
 
getTemporaryFile(klass, mode='w+b', bufsize=-1, suffix='', prefix='tmpfil', directory=None)
This method is identical to the standard tempfile.TemporaryFile() method.
source code
Static Methods [hide private]
 
validate(ss_record)
Validate the Storage Server record.
source code
dict
getCapabilities(ss_record)
Obtain the capabilities from the Storage Array.
source code
list
getStorageNames(ss_record)
Obtain a list of available storage names from which the user would choose the specific Storage Array to associate with this specific Storage Server record.
source code
dict
getInfo(ss_record, se_record=None)
Obtain information on either the Storage Array or the Storage Element.
source code
list
getAccessGroups(ss_record, se_record=None)
Get the access groups and access group entries for either the Storage Array or if specified the Storage Element.
source code
list
createAccessGroups(ss_record, access_grps)
Create the access groups on the Storage Array.
source code
list
renameAccessGroup(ss_record, access_grp_name, new_access_grp_name)
Rename an access group on the Storage Array.
source code
list
removeAccessGroups(ss_record, access_grps, forced_remove=False)
Remove the access groups from the Storage Array.
source code
dict
addToAccessGroup(ss_record, access_grp_name, grp_entries)
Get the access groups and access group entries for either the Storage Array or if specified the Storage Element.
source code
dict
removeFromAccessGroup(ss_record, access_grp_name, grp_entries)
Get the access groups and access group entries for either the Storage Array or if specified the Storage Element.
source code
dict
discover(ss_record)
Discover the targets that the Storage Array makes available.
source code
 
start(ss_record)
Start access to this Storage Array.
source code
 
stop(ss_record)
Stop access to this Storage Array.
source code
 
refresh(ss_record)
Initiate a rescan for newly added or removed LUNs.
source code
 
deviceTeardown(ss_record, se_record)
Tear down multipath device and associated slaves.
source code
list
list(ss_record, se_type=['LUN', 'SnapClone'])
Return the list of Storage Entities associated with the Storage Array.
source code
list
updateSERecords(ss_record, se_records, append_allowed=False)
Update the list of Storage Element records.
source code
str
getStatus(ss_record, se_record=None)
Return the status of the Storage Array or the Storage Element.
source code
 
online(ss_record, se_record)
Online the Storage Element on the Storage Array (if offline).
source code
 
offline(ss_record, se_record)
Offline the Storage Element on the Storage Array (if offline).
source code
dict
create(ss_record, se_record, thin_provision=True, qos=None)
Provision a new Storage Element on the Storage Array.
source code
dict
startPresent(ss_record, se_record, access_grp_names)
Present a Storage Element on Storage Array to the list of ports.
source code
dict
stopPresent(ss_record, se_record, access_grp_names)
Unpresent a Storage Element on Storage Array to the list of ports.
source code
dict
resize(ss_record, se_record, new_size)
Resize the Storage Element on the Storage Array.
source code
 
remove(ss_record, se_record)
Remove a Storage Element from the Storage Array.
source code
int
getCloneLimits(ss_record, se_record=None)
Return the maximum number of shallow (thin) clones allowed for a Storage Array or Storage Element.
source code
bool
isCloneable(ss_record, se_record)
Check if shallow (thin) clone creations is allowed for the Storage Element.
source code
dict
clone(ss_record, se_record, dest_se_record=None, qos=None)
Create a shallow (thin) clone of the Storage Element.
source code
bool
isSplittable(ss_record, se_record)
Determine if a deep clone can be made from a shallow (thin) clone (split the clones).
source code
 
splitClone(ss_record, se_record)
Create a deep clone from a shallow (thin) clone (split the clones).
source code
dict
cloneFromSnap(ss_record, se_record, snap_se_record, dest_se_record=None, qos=None)
Create a shallow (thin) clone using a snapshot.
source code
list
getCurrentClones(ss_record, se_record=None)
Return a list of the current clones for a Storage Array or Storage Element.
source code
int
getSnapLimits(ss_record, se_record=None)
Return the maximum number of snapshots allowed for a Storage Array or Storage Element.
source code
bool
isSnapable(ss_record, se_record=None)
Check if a snapshots can be created on the Storage Array or if specified for the specific Storage Element.
source code
dict
createSnap(ss_record, se_record, snap_se_record=None)
Create a snapshot of the Storage Element.
source code
dict
createMultiSnap(ss_record, se_records, snap_se_record=None)
Create a snapshot of all the listed Storage Entities together.
source code
bool
isRestorable(ss_record, snap_se_record, se_record=None)
Check if the Storage Array or Storage Element can be rolled back to the named snapshot.
source code
 
snapRestore(ss_record, snap_se_record, se_record=None)
Roll the Storage Array or Storage Element back to the named snapshot.
source code
 
snapRemove(ss_record, snap_se_record)
Destroy the named snapshot.
source code
list
getCurrentSnaps(ss_record, se_record=None)
Return a list of the current snapshots for a Storage Array or Storage Element.
source code
list
getQoSList(ss_record)
Return a list of possible QoS values for the Storage Array.
source code
 
setQoS(ss_record, se_record, qos)
Set the QoS for the Storage Element to the QoS supplied.
source code
dict
getAsyncProgress(ss_record, some_record)
Obtain Async Progress.
source code
    Inherited from IPlugin
dict
__get_key_value_pairs__(key_val_s, result_dict={})
Create a dict from a string in the form of attr=value[,...].
source code
a new object with type S, a subtype of T
__new__(cls, *args, **kwargs)
Override the method to enforce that no Storage Connect classes be instantiated.
source code
str
__set_key_value_pairs__(key_val_d)
This method will create a string in the form of key=value[,...] from a dict.
source code
 
copy(src, dst)
This will do a block copy from the source to the destination
source code
Class Variables [hide private]
str name = 'IStorageArrayPlugin'
Class name.
list of str sa_api_version = ['1', '2', '7']
Storage Array Plugin API version.
str plugin_type = 'isa'
Oracle Storage Connect plugin type.
dict __required_methods__ = {'addToAccessGroup': True, 'clone': Tru...
List of required methods for this Version of the API
    Inherited from IPlugin
str BlkDevType = 'BlockDevice'
Used to designate that the FR record represent a block device.
str CharDevType = 'CharDevice'
Used to designate that the FR record represent a character device.
str DirType = 'Directory'
Used to designate that the FR record represent a directory.
str FifoType = 'FIFOFile'
Used to designate that the FR record represent a FIFO file.
str FileSysStorage = 'FileSys'
Used to designate that the plugin handle File System storage.
str FileType = 'File'
Used to designate that the FR record represent a file.
str GhostLUNType = 'GhostLUN'
Used to designate that the SE record represent a Ghost LUN.
str LUNType = 'LUN'
Used to designate that the SE record represent a LUN.
str LocalFileSystem = 'LocalFS'
Used to designate that the plugin is for a local file system.
str NetworkFileSystem = 'NetworkFS'
Used to designate that the plugin is for a network file system.
str SANStorage = 'SAN'
Used to designate that the plugin can handle all types of SCSI storage (FC, FCoE, SAS, SATA, etc.) except iSCSI.
str SnapCloneType = 'SnapClone'
Used to designate that the SE record represent a clone from a snapshot.
str SnapType = 'Snapshot'
Used to designate that the SE record represent a Snapshot.
str SockFileType = 'SocketFile'
Used to designate that the FR record represent a socket file.
str SymLinkType = 'SymbolicLink'
Used to designate that the FR record represent a symbolic link.
dict __BackingDeviceRecord__ = {'description': '', 'free_sz': 0, 'n...
Backing device record.
dict __BackingDeviceRecord_fields__ = {'description': (<type 'str'>...
Field list for the backing device records.
list __FRTypes__ = ['File', 'Directory', 'SymbolicLink', 'CharDevic...
Known File record types.
dict __FSRecord__ = {'access_grp_names': [''], 'access_path': '', '...
File System record.
dict __FSRecord_fields__ = {'access_grp_names': (<type 'list'>, Tru...
Field list for the File System record.
dict __FileRecord__ = {'extra_info': '', 'file_path': '', 'file_sz'...
File record.
dict __FileRecord_fields__ = {'extra_info': (<type 'str'>, False), ...
Field list for the File System record.
dict __MountRecord__ = {'extra_info': '', 'fs_uuid': '', 'mount_poi...
Mount point record.
dict __MountRecord_fields__ = {'extra_info': (<type 'str'>, False),...
Field list for the Mount point records.
dict __SERecord__ = {'access_grp_names': [''], 'array_path': '', 'e...
Storage Element record.
dict __SERecord_fields__ = {'access_grp_names': (<type 'list'>, Tru...
Field list for the Storage Element record.
list __SETypes__ = ['LUN', 'GhostLUN', 'Snapshot', 'SnapClone']
Known Storage Element types.
dict __SSRecord__ = {'access_grps': [{'grp_entries': [''], 'grp_mod...
Storage Server record.
dict __SSRecord_fields__ = {'access_grps': (<type 'list'>, True), '...
Field list for the Storage Server record.
dict __access_grp_fields__ = {'grp_entries': (<type 'list'>, True),...
Field list for the access group.
bool __cluster_required__ = False
Flag if this Plugin requires the cluster to be up - Vendor implemented plugins should NOT change this!
bool __generic_plugin__ = False
Flag if this is a generic Plugin - Vendor implemented plugins should NOT change this!
str __osc_install_dir__ = '/opt/storage-connect'
The Oracle Storage Connect installation directory.
str __plugin_temp_dir__ = '/var/tmp/storage-connect'
Directory where temporrary files woud be created under.
str __plugin_top_dir__ = '/opt/storage-connect/plugins'
Top directory under which all Storage Connect plugins will be installed.
list __plugin_types__ = ['isa', 'ifs']
Known Oracle Storage Connect plugin types.
dict __qos_vals_fields__ = {'priority': (<type 'int'>, True), 'valu...
Field list for the qos_vals.
dict __vol_group_fields__ = {'vol_alloc_sz': (<type 'int'>, False),...
Field list for the volume group.
cache object cache = OSCCache.OSCDefaultCache()
Caching that can be used by the plugin.
str dev_name_regex = '^[0-9a-zA-Z]+'
This is the device name regex that plug-ins should use when scanning through the devices to fill in the path in SERecord.
str dev_path_prefix = '/dev/mapper'
This is the device path prefix that plug-ins should use when filling in the path in the SERecord.
str file_extra_info_help = 'None'
The help text that will be displayed for the extra info to the user when creating a File.
str fs_extra_info_help = 'None'
The help text that will be displayed for the extra info to the user when creating a File System.
str iSCSIStorage = 'iSCSI'
Used to designate that the plugin can handle iSCSI storage.
str iscsiadm = '/sbin/iscsiadm'
Location of the iscsiadm executable.
logging object logger = None
Logging instance to be used by the plugin.
dict plugin_ability = {'access_control': 255, 'backing_device_type'...
Capabilities that this specific plugin support.
list of str plugin_api_version = ['1', '2', '7']
The over arching API version for the plugin interface.
str plugin_name = ''
The name of the plugin - Name used to populate the user interface drop down list.
str plugin_version = ''
Version of the plugin.
list of str required_api_vers = None
The minimum API version required by the plugin.
str se_extra_info_help = 'None'
The help text that will be displayed for the extra info to the user when creating a Storage Element.
str ss_extra_info_help = 'None'
The help text that will be displayed for the extra info to the user when creating the Storage Server.
str vendor_name = ''
Name of the Vendor supplying the plugin.
Instance Variables [hide private]
list storage_types = []
Storage types this plugin can handle, see SANStorage and iSCSIStorage
    Inherited from IPlugin
dict __access_grp__ = {'grp_entries': [''], 'grp_modes': [''], 'grp...
Access group.
dict __qos_vals__ = {'priority': 0, 'value': ''}
Quality-of-Service.
dict __vol_group__ = {'vol_alloc_sz': 0, 'vol_desc': '', 'vol_free_...
Volume group.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getPluginInfo(klass)
Class Method

source code 

Return all the required information to identify this plugin.

Returns: dict
{"plugin_type", "plugin_name", "vendor_name", "plugin_version", "plugin_desc", "storage_types", "ss_extra_info_help", "se_extra_info_help", "required_api_vers", "sa_api_version", "plugin_ability", "generic_plugin"}

validate(ss_record)
Static Method

source code 

Validate the Storage Server record.

Parameters:
Raises:

getCapabilities(ss_record)
Static Method

source code 

Obtain the capabilities from the Storage Array.

Parameters:
Returns: dict
Storage Server Capabilities
Raises:

getStorageNames(ss_record)
Static Method

source code 

Obtain a list of available storage names from which the user would choose the specific Storage Array to associate with this specific Storage Server record.

Parameters:
Returns: list
list of available storage names OR if not required or supported an empty list.
Raises:

getInfo(ss_record, se_record=None)
Static Method

source code 

Obtain information on either the Storage Array or the Storage Element.

Parameters:
Returns: dict
updated Storage Server record OR updated Storage Element record
Raises:

getAccessGroups(ss_record, se_record=None)
Static Method

source code 

Get the access groups and access group entries for either the Storage Array or if specified the Storage Element.

Parameters:
Returns: list
list of Access groups
Raises:

createAccessGroups(ss_record, access_grps)
Static Method

source code 

Create the access groups on the Storage Array.

Parameters:
Returns: list
list of Access groups
Raises:

renameAccessGroup(ss_record, access_grp_name, new_access_grp_name)
Static Method

source code 

Rename an access group on the Storage Array.

Parameters:
Returns: list
list of Access groups
Raises:

removeAccessGroups(ss_record, access_grps, forced_remove=False)
Static Method

source code 

Remove the access groups from the Storage Array.

Parameters:
  • ss_record (dict) - Storage Server record
  • access_grps (list) - List of Access Groups to remove from the Storage Array.
  • forced_remove (bool) - Flag if the access group should force fully be removed from the Storage Array.
Returns: list
list of Access groups
Raises:

addToAccessGroup(ss_record, access_grp_name, grp_entries)
Static Method

source code 

Get the access groups and access group entries for either the Storage Array or if specified the Storage Element.

Parameters:
  • ss_record (dict) - Storage Server record
  • access_grp_name (str) - Access group that the access control entries should be added to.
  • grp_entries (list) - List of access control entries to add to the access group.
Returns: dict
Access group
Raises:

removeFromAccessGroup(ss_record, access_grp_name, grp_entries)
Static Method

source code 

Get the access groups and access group entries for either the Storage Array or if specified the Storage Element.

Parameters:
  • ss_record (dict) - Storage Server record
  • access_grp_name (str) - Access group that the access control entries should be removed from.
  • grp_entries (list) - List of access control entries to add to the access group.
Returns: dict
Access group
Raises:

discover(ss_record)
Static Method

source code 

Discover the targets that the Storage Array makes available.

Parameters:
Returns: dict
updated Storage Server record with the storage_id field filled in.
Raises:

Note: The is is only applicable to an iSCSI Storage Array

start(ss_record)
Static Method

source code 

Start access to this Storage Array.

Parameters:
Raises:

Note: The is is only applicable to an iSCSI Storage Array

stop(ss_record)
Static Method

source code 

Stop access to this Storage Array.

Parameters:
Raises:

Note: The is is only applicable to an iSCSI Storage Array

refresh(ss_record)
Static Method

source code 

Initiate a rescan for newly added or removed LUNs.

Parameters:
Raises:

Note: This does not return a list of the new or or removed LUNs, it just initiate a rescan.

deviceTeardown(ss_record, se_record)
Static Method

source code 

Tear down multipath device and associated slaves.

Parameters:
Raises:

list(ss_record, se_type=['LUN', 'SnapClone'])
Static Method

source code 

Return the list of Storage Entities associated with the Storage Array.

Parameters:
  • ss_record (dict) - Storage Server record
  • se_type (list) - List of Storage Element types to be returned.
Returns: list
list of Storage Element records
Raises:

updateSERecords(ss_record, se_records, append_allowed=False)
Static Method

source code 

Update the list of Storage Element records. The method should complete the each of the Storage Element records, including the device path if the Storage Element is visible on the server where the method is executing. NOTE: The plug-in should use the dev_path_prefix value to determine the device path (if any) for each of the Storage Elements.

Parameters:
  • ss_record (dict) - Storage Server record
  • se_records (list) - List of Storage Element records to examine and update with all the required information, this includes the local device path, if it is available on the server.
  • append_allowed (bool) - By default the method is not allowed to add new Storage Element records to the list passed in, if this flag is set the method is allowed to add Storage Element records to the list for newly discovered Storage Elements.
Returns: list
list of updated Storage Element records
Raises:

getStatus(ss_record, se_record=None)
Static Method

source code 

Return the status of the Storage Array or the Storage Element.

Parameters:
Returns: str
Status of the Storage Array or the Storage Element
Raises:

online(ss_record, se_record)
Static Method

source code 

Online the Storage Element on the Storage Array (if offline).

Parameters:
Raises:

offline(ss_record, se_record)
Static Method

source code 

Offline the Storage Element on the Storage Array (if offline).

Parameters:
Raises:

create(ss_record, se_record, thin_provision=True, qos=None)
Static Method

source code 

Provision a new Storage Element on the Storage Array.

Parameters:
  • ss_record (dict) - Storage Server record
  • se_record (dict) - Storage Element record
  • thin_provision (bool) - Indicate if the Storage Element should be thin provisioned (if the Storage Array support thin provisioning) or fully provisioned.
  • qos (str) - Desired Quality-of-Service for the new Storage Element
Returns: dict
updated Storage Element record
Raises:

startPresent(ss_record, se_record, access_grp_names)
Static Method

source code 

Present a Storage Element on Storage Array to the list of ports.

Parameters:
Returns: dict
updated Storage Element record
Raises:

stopPresent(ss_record, se_record, access_grp_names)
Static Method

source code 

Unpresent a Storage Element on Storage Array to the list of ports.

Parameters:
Returns: dict
updated Storage Element record
Raises:

resize(ss_record, se_record, new_size)
Static Method

source code 

Resize the Storage Element on the Storage Array.

Parameters:
Returns: dict
updated Storage Element record
Raises:

remove(ss_record, se_record)
Static Method

source code 

Remove a Storage Element from the Storage Array.

Parameters:
Raises:

getCloneLimits(ss_record, se_record=None)
Static Method

source code 

Return the maximum number of shallow (thin) clones allowed for a Storage Array or Storage Element.

Parameters:
Returns: int
Maximum number (-1 for unlimited) of shallow clones allowed for the Storage Array or the specific type of Storage Element if supplied.
Raises:

isCloneable(ss_record, se_record)
Static Method

source code 

Check if shallow (thin) clone creations is allowed for the Storage Element.

Parameters:
Returns: bool
True if a shallow clone can be created for the Storage Element.
Raises:

clone(ss_record, se_record, dest_se_record=None, qos=None)
Static Method

source code 

Create a shallow (thin) clone of the Storage Element.

Parameters:
Returns: dict
Newly created Storage Element record for the cloned Storage Element.
Raises:

isSplittable(ss_record, se_record)
Static Method

source code 

Determine if a deep clone can be made from a shallow (thin) clone (split the clones).

Parameters:
Returns: bool
True if the clones can be split.
Raises:

splitClone(ss_record, se_record)
Static Method

source code 

Create a deep clone from a shallow (thin) clone (split the clones).

Parameters:
Raises:

cloneFromSnap(ss_record, se_record, snap_se_record, dest_se_record=None, qos=None)
Static Method

source code 

Create a shallow (thin) clone using a snapshot.

Parameters:
Returns: dict
created Storage Element record
Raises:

getCurrentClones(ss_record, se_record=None)
Static Method

source code 

Return a list of the current clones for a Storage Array or Storage Element.

Parameters:
Returns: list
List of current known clones on the Storage Array or Storage Element if supplied.
Raises:

getSnapLimits(ss_record, se_record=None)
Static Method

source code 

Return the maximum number of snapshots allowed for a Storage Array or Storage Element.

Parameters:
Returns: int
Maximum number (-1 for unlimited) of snapshots allowed for the Storage Array or the specific type of Storage Element if supplied.
Raises:

isSnapable(ss_record, se_record=None)
Static Method

source code 

Check if a snapshots can be created on the Storage Array or if specified for the specific Storage Element.

Parameters:
Returns: bool
True if a snapshots can be created on the Storage Array or if specified for the specific Storage Element.
Raises:

createSnap(ss_record, se_record, snap_se_record=None)
Static Method

source code 

Create a snapshot of the Storage Element.

Parameters:
Returns: dict
created Storage Element record for the snapshot
Raises:

createMultiSnap(ss_record, se_records, snap_se_record=None)
Static Method

source code 

Create a snapshot of all the listed Storage Entities together.

Parameters:
Returns: dict
Created Storage Element record for the snapshot.
Raises:

isRestorable(ss_record, snap_se_record, se_record=None)
Static Method

source code 

Check if the Storage Array or Storage Element can be rolled back to the named snapshot.

Parameters:
Returns: bool
True if a snapshot can be rolled back to the snapshot, otherwise return False.
Raises:

snapRestore(ss_record, snap_se_record, se_record=None)
Static Method

source code 

Roll the Storage Array or Storage Element back to the named snapshot.

Parameters:
Raises:

snapRemove(ss_record, snap_se_record)
Static Method

source code 

Destroy the named snapshot.

Parameters:
Raises:

getCurrentSnaps(ss_record, se_record=None)
Static Method

source code 

Return a list of the current snapshots for a Storage Array or Storage Element.

Parameters:
Returns: list
List of Storage Element records for all known snapshots on the Storage Array or Storage Element if supplied.
Raises:

getQoSList(ss_record)
Static Method

source code 

Return a list of possible QoS values for the Storage Array.

Parameters:
Returns: list
List of qos_vals dicts for all the possible QoS values on the Storage Array.
Raises:

setQoS(ss_record, se_record, qos)
Static Method

source code 

Set the QoS for the Storage Element to the QoS supplied.

Parameters:
Raises:

getAsyncProgress(ss_record, some_record)
Static Method

source code 

Obtain Async Progress. This should never be called as the plugin should overide this method if it is in asynch mode.

Parameters:
  • ss_record (dict) - Storage Server record
  • some_record (dict) - Record previously returned from the call that started the asynchronous operation with the async_progress and if required the async_handle fields added (and not set to None).
Returns: dict
Fully completed record that would have been returned if the initial call completed synchronously except it have the async_progress field.
Raises:

Class Variable Details [hide private]

__required_methods__

List of required methods for this Version of the API
Type:
dict
Value:
{'addToAccessGroup': True,
 'clone': True,
 'cloneFromSnap': True,
 'create': True,
 'createAccessGroups': True,
 'createMultiSnap': True,
 'createSnap': True,
 'deviceTeardown': False,
...