HPE 3PAR File Persona Client
Author: | Mark Sturdevant |
---|---|
Description: | Client for 3PAR File Persona. This module provides a client for File Persona functionality. The File Persona client requires 3PAR InForm 3.2.1 (MU3) with File Persona capability. This client extends the regular 3PAR client. |
The 3PAR File Persona Client.
The File Persona client requires 3PAR InForm 3.2.1 (MU3) with File Persona capability
Parameters: | api_url (str) – The url to the WSAPI service on 3PAR ie. http://<3par server>:8080/api/v1 |
---|
Get and parse TPD interfaces (and set for re-use).
The output is filtered to only include interfaces used by this client.
Returns: | Dictionary of TPD interfaces |
---|
Show information on File Services cluster.
The getfs command displays information on File Services nodes.
Returns: | dict with message, total and members |
---|
result = {
'message': None, # Error message, if any.
'total': 0 # Number of members returned.
'members': [], # List containing dict of FS settings.
}
Create a file provisioning group.
The createfpg command creates a file provisioning group of the given name and size within the specified cpg.
For this command MB = 1048576 bytes, GB = 1024MB, and TB = 1024GB.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Grow a file provisioning group.
The growfpg command grows a file provisioning group of the given name by the size specified, within the CPG associated with the base file provisioning group.
For each grow undertaken, at least one additional VV of name <fpgname>.n is created.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Show file provisioning group information
The getfpg command displays information on file provisioning groups
Parameters: | fpgs – Limit output to the specified file provisioning group. |
---|---|
Returns: | dict with message, total and members |
result = {
'message': None, # Error message, if any.
'total': 0 # Number of members returned.
'members': [], # List containing dict of FPGs
}
Modify the properties of a File Provisioning Group.
The setfpg command allows the user to enable and disable various properties associated with a File Provisioning Group.
Access to all domains is required to run this command.
The -primarynode and -failover options are mutually exclusive.
When assigning primary nodes, the secondary node will be implicit as a couplet pair [0,1] [2,3] [4,5] [6,7]. This action will fail if the graceful failover is not possible.
The -failover and -primarynode options will result in temporary unavailability of the Virtual File Servers associated with the File Provisioning Group being migrated, and also the unavailability of any associated shares. An implicit -deactivate and -activate process is undertaken during a migration to the alternate node.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Remove a file provisioning group
The removefpg command removes a file provisioning group and its underlying components from the system.
It is necessary to remove any shares on the file provisioning group before removing the file provisioning group itself.
Parameters: |
|
---|---|
Kwargs: |
|
Returns: | List of strings. Lines of output from the CLI command. |
Create a Virtual File Server.
createvfs creates a Virtual File Server. It can optionally create the File Provisioning Group to which the VFS will belong.
If an fpg is created, it will be given the same name as the VFS. Both names must be available for creation for the command to succeed.
Either -fpg or the parameters to create a File Provisioning Group must be specified in order to create a VFS.
This command will spawn a task and return the taskid.
Grace times are specified in minutes.
Certificates must be in PEM format, containing both public and private keys.
Only one of the following certificate options can be specified: nocert, certfile, certdata.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Display Virtual File Server information.
The getvfs command displays information on Virtual File Servers.
VFS name is not globally unique, and the same VFS name may be in use in multiple File Provisioning Groups.
If no filter options are provided the system will traverse all File Provisioning Groups and display all associated VFSs.
Parameters: |
|
---|---|
Returns: | dict with message, total and members |
result = {
'message': None, # Error message, if any.
'total': 0 # Number of members returned.
'members': [], # List containing dict of VFSs.
}
Modify a Virtual File Server.
Allows modification of the specified Virtual File Server
Only one of the following certificate options can be specified: certfile, certdata, certgen, rmcert.
Certificates must be in PEM format, containing both public and private keys.
Grace times are specified in minutes.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Remove a Virtual File Server.
The removevfs command removes a Virtual File Server and its underlying components from the system.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Assigns an IP address to a Virtual File Server.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Modifies the network config of a Virtual File Server.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Shows the network config of a Virtual File Server.
Parameters: |
|
---|---|
Returns: | dict with message, total and members |
result = {
'message': None, # Error message, if any.
'total': 0 # Number of members returned.
'members': [], # List containing dict of FSIPs.
}
Removes the network config of a Virtual File Server.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Create a local group account associated with file services.
The -gid option can have any value between 1000 and 65535.
To access an SMB share, specify the group as “LOCAL_CLUSTER<groupname>”.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Modify a local group account associated with file services.
memberlist specifies user members of the group. It is a set of comma separated strings (memberlist=’<list>’).
If <list> has a prefix (for example, +user1):
+ add <list> to the existing user list. Users in <list> must not be in the existing list.
- remove <list> from the existing list. Users in <list> must be already in the existing list.
If specified, the prefix will be applied to the entire list. If <list> has no prefix, <list> will be used as the new user list.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Remove a local group account associated with file services.
Parameters: | groupname – Specifies the local group name using up to 31 characters. Valid characters are alphanumeric characters, periods, dashes (except first character), and underscores. |
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Create a local user account associated with file services.
If not specified -uid will be given a default value.
The -uid option can have any value between 1000 and 65535.
If the -enabled option is not supplied the user will be enabled by default. Valid values are strings ‘false’ or ‘true’ (default). These values are strings – not Python booleans.
To access an SMB share, specify the user as “LOCAL_CLUSTER<username>”.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Modify a local user account associated with file services.
Valid values for enabled are strings ‘false’ or ‘true’ (or None). These values are strings – not Python booleans.
grplist specifies a list of additional groups which the user is to be a member. It is a set of comma separated strings (grplist=’<list>’).
If <list> has a prefix (for example, +group1):
+ add <list> to the existing group list. Groups in <list> must not be in the existing list.
- remove <list> from the existing list. Groups in <list> must be already in the existing list.
If specified, the prefix will be applied to the entire list. If <list> has no prefix, <list> will be used as the new group list.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Remove a local user account associated with file services.
Parameters: | username – Specifies the local user name using up to 31 characters. Valid characters are alphanumeric characters, periods, dashes (except first character), and underscores. |
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Create a file store.
The createfstore command creates a new fstore with the specified name for the specified storage pool and the virtual file system.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Display File Store information.
The showfstore command displays information on the file stores. To specify VFS or fstore filters, the parent components must be specified.
Parameters: |
|
---|---|
Returns: | dict with message, total and members |
result = {
'message': None, # Error message, if any.
'total': 0 # Number of members returned.
'members': [], # List containing dict of fstores.
}
Modify a File Store.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Remove a File Store
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Create a file share.
The createfshare command creates file shares for supported protocols.
PROTOCOLS
OPTIONS
The following parameters are for all protocols:
fpg <fpgname> fstore <fstore> sharedir <sharedir> comment <comment>
The following options are specific to each subcommand:
The file provisioning group and its underneath virtual file server must be created before creating file shares.
For SMB permissions, the same user cannot be specified with the same permission in both “allowperm” and “denyperm”.
To access an SMB share: for users configured locally, specify “LOCAL_CLUSTER<user>”, for users configured on Active Directory, specify “<domain><user>” or “<ad-netbios><user>”, for users configured on the LDAP server, specify “<ldap-netbios><user>”.
For NFS shares, it is not allowed to create two shares which have identical clients (i.e. specified by -clientip) and share directory (i.e. specified by -sharedir). If you create NFS shares without specifying different -clientip and -sharedir options, the second “createfshare” will fail.
To create Object share, the virtual file server specified by <vfs> must have an associated IP address.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Set/modify file share properties.
The setfshare command modifies file share properties for supported protocols.
For setting SMB permissions, the same user cannot be specified with the same permission in both “allowperm” and “denyperm”.
PROTOCOLS
OPTIONS
The following options are for all protocols:
fpg <fpgname> fstore <fstore> comment <comment>
The following options are specific to each protocol:
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Show file shares information.
The getfshare command displays file share information for supported protocols.
PROTOCOLS
Parameters: |
|
---|---|
Kwargs: |
|
Returns: | dict with message, total and members |
result = {
'message': None, # Error message, if any.
'total': 0 # Number of members returned.
'members': [], # List containing dict of fshares.
}
Remove a file share from File Services cluster.
PROTOCOLS
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Create a snapshot for File Services.
If option -retain is specified and the file store already has the maximum number of snapshots taken, the oldest snapshot will be deleted first before the new snapshot is created. If the command fails to create the new snapshot, the deleted snapshot will not be restored.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Show snapshot information for File Services.
Parameters: |
|
---|---|
Kwargs: |
|
Returns: | dict with message, total and members |
result = {
'message': None, # Error message, if any.
'total': 0 # Number of members returned.
'members': [], # List containing dict of fsnaps.
}
Remove file store snapshots from File Services.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Start or resume an on-demand reclamation task.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
List details of snapshot reclamation tasks.
The showfsnapclean command displays the details of an on-demand snapshot reclamation task active on a file provisioning group.
Parameters: | fpgname – Specifies the name of the file provisioning group. |
---|---|
Returns: | dict with message, total and members |
result = {
'message': None, # Error message, if any.
'total': 0 # Number of members returned.
'members': [], # List containing dict of fsnapcleans.
}
Stop or pause an on-demand reclamation task.
The stopfsnapclean command stops or pauses an on-demand reclamation task on a file provisioning group.
There can be only one reclamation task running on a file provisioning group. If we pause reclamation task, it will still be counted.
If the task is not running, the following output is displayed: No reclamation task running on Storage Pool samplepool (Server error: 400)
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Set the quotas for a specific virtual file server.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Show the quotas for File Services.
Parameters: |
|
---|---|
Returns: | dict with message, total and members |
result = {
'message': None, # Error message, if any.
'total': 0 # Number of members returned.
'members': [], # List containing dict of fsquotas.
}