The cinder.volume.drivers.hds.hnas_backend Module

Hitachi Unified Storage (HUS-HNAS) platform. Backend operations.

class HnasBackend(drv_configs)

Bases: object

Back end. Talks to HUS-HNAS.

add_iscsi_conn(cmd, ip0, user, pw, lun, hdp, port, iqn, initiator)

Setup the lun on on the specified target port

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
  • lun – id of the logical unit being extended
  • hdp – data pool of the logical unit
  • port – iSCSI port
  • iqn – iSCSI qualified name
  • initiator – initiator address
create_dup(cmd, ip0, user, pw, src_lun, hdp, size, name)

Clones a volume

Clone primitive used to support all iSCSI snapshot/cloning functions. Used for iSCSI only.

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
  • hdp – data Pool of the logical unit
  • src_lun – id of the logical unit being deleted
  • size – size of the LU being cloned. Only for logging purposes
Returns:

formated string

create_lu(cmd, ip0, user, pw, hdp, size, name)

Creates a new Logical Unit.

If the operation can not be performed for some reason, utils.execute() throws an error and aborts the operation. Used for iSCSI only

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
  • hdp – data Pool the logical unit will be created
  • size – Size (Mb) of the new logical unit
  • name – name of the logical unit
Returns:

formated string with ‘LUN %d HDP: %d size: %s MB, is successfully created’

del_iscsi_conn(cmd, ip0, user, pw, evsid, iqn, hlun)

Remove the lun on on the specified target port

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
  • evsid – EVSID for the file system
  • iqn – iSCSI qualified name
  • hlun – logical unit id
Returns:

formated string

delete_lu(cmd, ip0, user, pw, hdp, lun)

Delete an logical unit. Used for iSCSI only

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
  • hdp – data Pool of the logical unit
  • lun – id of the logical unit being deleted
Returns:

formated string ‘Logical unit deleted successfully.’

extend_vol(cmd, ip0, user, pw, hdp, lun, new_size, name)

Extend a iSCSI volume.

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
  • hdp – data Pool of the logical unit
  • lun – id of the logical unit being extended
  • new_size – new size of the LU
  • name – formated string
file_clone(cmd, ip0, user, pw, fslabel, src, name)

Clones NFS files to a new one named ‘name’

Clone primitive used to support all NFS snapshot/cloning functions.

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
  • fslabel – file system label of the new file
  • src – source file
  • name – target path of the new created file
Returns:

formated string

get_hdp_info(cmd, ip0, user, pw, fslabel=None)

Gets the list of filesystems and fsids.

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
  • fslabel – filesystem label we want to get info
Returns:

formated string with filesystems and fsids

get_iscsi_info(cmd, ip0, user, pw)

Gets IP addresses for EVSs, use EVSID as controller.

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
Returns:

formated string with iSCSI information

get_nfs_info(cmd, ip0, user, pw)

Gets information on each NFS export.

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
Returns:

formated string

get_targetiqn(cmd, ip0, user, pw, targetalias, hdp, secret)

Obtain the targets full iqn

Return the target’s full iqn rather than its alias.

Parameters:
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
  • targetalias – alias of the target
  • hdp – data pool of the logical unit
  • secret – CHAP secret of the target
Returns:

string with full IQN

get_targetsecret(cmd, ip0, user, pw, targetalias, hdp)

Returns the chap secret for the specified target. :param ip0: string IP address of controller :param user: string user authentication for array :param pw: string password authentication for array :param targetalias: alias of the target :param hdp: data pool of the logical unit :return secret: CHAP secret of the target

get_version(cmd, ver, ip0, user, pw)

Gets version information from the storage unit

Parameters:
  • ver – string driver version
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
Returns:

formated string with version information

run_cmd(cmd, ip0, user, pw, *args, **kwargs)

Run a command on SMU or using SSH

Parameters:
  • cmd – the command that will be run on SMU
  • ip0 – string IP address of controller
  • user – string user authentication for array
  • pw – string password authentication for array
Returns:

formated string with version information

set_targetsecret(cmd, ip0, user, pw, targetalias, hdp, secret)

Sets the chap secret for the specified target. :param ip0: string IP address of controller :param user: string user authentication for array :param pw: string password authentication for array :param targetalias: alias of the target :param hdp: data pool of the logical unit :param secret: CHAP secret of the target

Previous topic

The cinder.volume.drivers.hds.hds Module

Next topic

The cinder.volume.drivers.hds.hus_backend Module

This Page