HP 3PAR Client.
Author: | Walter A. Boring IV |
---|---|
Author: | Kurt Martin |
Copyright: | Copyright 2012-2016, Hewlett Packard Development Company, L.P. |
License: | Apache v2.0 |
HP3PAR REST Client.
Author: | Walter A. Boring IV |
---|---|
Description: | This is the 3PAR Client that talks to 3PAR’s REST WSAPI Service. |
It provides the ability to provision 3PAR volumes, VLUNs, CPGs. This version also supports running actions on the 3PAR that use SSH.
This client requires and works with 3PAR InForm 3.1.3 MU1 firmware
Bases: object
The 3PAR REST API Client.
Parameters: | api_url (str) – The url to the WSAPI service on 3PAR ie. http://<3par server>:8080/api/v1 |
---|
This adds a host to a host set.
Parameters: |
|
---|---|
Returns: | headers - dict of HTTP Response headers. Upon successful modification of a host set HTTP code 200 OK is returned and the URI of the updated host set will be returned in the location portion of the headers. |
Returns: | body - the body of the response. None if successful. |
This adds a volume to a volume set
Parameters: |
|
---|
Copy/Clone a volume.
Parameters: |
|
---|
optional = {
'online': False, # should physical copy be
# performed online?
'tpvv': False, # use thin provisioned space
# for destination
# (online copy only)
'snapCPG': 'OpenStack_SnapCPG', # snapshot CPG for the
# destination
# (online copy only)
'saveSnapshot': False, # save the snapshot of the
# source volume
'priority': 1 # taskPriorityEnum (does not
# apply to online copy)
}
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Invalid VV name or CPG name. |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_CPG - The CPG does not exists. |
Raises: | HTTPForbidden - CPG_NOT_IN SAME_DOMAIN - The CPG is not in the current domain. |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist |
Raises: | HTTPForbidden - VV_NOT_IN_SAME_DOMAIN - The volume is not in the same domain. |
Raises: | HTTPBadRequest - INV_INPUT_BAD_ENUM_VALUE - The priority value in not in the valid range(1-3). |
Raises: | HTTPConflict - EXISTENT_VOLUME - The volume already exists. |
Raises: | HTTPForbidden - INV_OPERATION_VV_SYS_VOLUME - The operation is not allowed on a system volume. |
Raises: | HTTPForbidden - INV_OPERATION_NON_BASE_VOLUME - The destination volume is not a base volume. |
Raises: | HTTPForbidden - INV_OPERATION_IN_REMOTE_COPY - The destination volume is involved in a remote copy. |
Raises: | HTTPForbidden - INV_OPERATION_VV_EXPORTED - The volume is exported. |
Raises: | HTTPForbidden - INV_OPERATION_VV_COPY_TO_SELF - The destination volume is the same as the parent. |
Raises: | HTTPForbidden - INV_OPERATION_VV_READONLY_SNAPSHOT - The parent volume is a read-only snapshot. |
Raises: | HTTPForbidden - INV_OPERATION_VV_COPY_TO_BASE - The destination volume is the base volume of a parent volume. |
Raises: | HTTPConflict - INV_OPERATION_VV_VOLUME_CONV_IN_PROGRESS - The volume is in a conversion operation. |
Raises: | HTTPForbidden - INV_OPERATION_VV_NO_SNAPSHOT_ALLOWED - The parent volume must allow snapshots. |
Raises: | HTTPConflict - INV_OPERATION_VV_ONLINE_COPY_IN_PROGRESS - The volume is the target of an online copy. |
Raises: | HTTPForbidden - INV_OPERATION_VV_CLEANUP_IN_PROGRESS - Cleanup of internal volume for the volume is in progress. |
Raises: | HTTPForbidden - INV_OPERATION_VV_CIRCULAR_COPY - The parent volume is a copy of the destination volume. |
Raises: | HTTPForbidden - INV_OPERATION_VV_PEER_VOLUME - The operation is not allowed on a peer volume. |
Raises: | HTTPForbidden - INV_OPERATION_VV_INTERNAL_VOLUME - The operation is not allowed on an internal volume. |
Raises: | HTTPForbidden - VV_IS_BEING_REMOVED - The volume is being removed. |
Raises: | HTTPForbidden - INV_OPERATION_VV_NOT_IN_NORMAL_STATE - The volume is not in the normal state. |
Raises: | HTTPForbidden - VV_IN_INCONSISTENT_STATE - The volume has an internal consistency error. |
Raises: | HTTPConflict - INV_OPERATION_VV_PCOPY_IN_PROGRESS - The destination volume has a physical copy in progress. |
Raises: | HTTPConflict - INV_OPERATION_VV_FAILED_ONLINE_COPY - Online copying of the destination volume has failed. |
Raises: | HTTPConflict - INV_OPERATION_VV_COPY_PARENT_TOO_BIG - The size of the parent volume is larger than the size of the destination volume. |
Raises: | HTTPForbidden - INV_OPERATION_VV_NO_PARENT - The volume has no physical parent. |
Raises: | HTTPConflict - IN_USE - The resynchronization snapshot is in a stale state. |
Raises: | HTTPForbidden - VV_IN_STALE_STATE - The volume is in a stale state. |
Raises: | HTTPNotFound - NON_EXISTENT_VVCOPY - Physical copy not found. |
Create a CPG.
Parameters: |
|
---|
optional = {
'growthIncrementMiB': 100, # Growth increment in MiB for
# each auto-grown operation
'growthLimitMiB': 1024, # Auto-grow operation is limited
# to specified storage amount
'usedLDWarningAlertMiB': 200, # Threshold to trigger warning
# of used logical disk space
'domain': 'MyDomain', # Name of the domain object
'LDLayout': {
'RAIDType': 1, # Disk Raid Type
'setSize': 100, # Size in number of chunklets
'HA': 0, # Layout supports failure of
# one port pair (1),
# one cage (2),
# or one magazine (3)
'chunkletPosPref': 2, # Chunklet location perference
# characteristics.
# Lowest Number/Fastest transfer
# = 1
# Higher Number/Slower transfer
# = 2
'diskPatterns': []} # Patterns for candidate disks
}
Raises: | HTTPBadRequest - INV_INPUT Invalid URI Syntax. |
---|---|
Raises: | HTTPBadRequest - NON_EXISTENT_DOMAIN - Domain doesn’t exist. |
Raises: | HTTPBadRequest - NO_SPACE - Not Enough space is available. |
Raises: | HTTPBadRequest - BAD_CPG_PATTERN A Pattern in a CPG specifies illegal values. |
Raises: | HTTPForbidden - PERM_DENIED - Permission denied |
Raises: | HTTPConflict - EXISTENT_CPG - CPG Exists already |
Create a new Host entry.
Parameters: |
|
---|
optional = {
'persona': 1, # ID of the persona to assign
# to the host.
# 3.1.3 default: Generic-ALUA
# 3.1.2 default: General
'domain': 'myDomain', # Create the host in the
# specified domain, or default
# domain if unspecified.
'forceTearDown': False, # If True, force to tear down
# low-priority VLUN exports.
'descriptors':
{'location': 'earth', # The host's location
'IPAddr': '10.10.10.10', # The host's IP address
'os': 'linux', # The operating system running
# on the host.
'model': 'ex', # The host's model
'contact': 'Smith', # The host's owner and contact
'comment': "Joe's box"} # Additional host information
}
Raises: | HTTPForbidden - PERM_DENIED - Permission denied |
---|---|
Raises: | HTTPBadRequest - INV_INPUT_MISSING_REQUIRED - Name not specified. |
Raises: | HTTPBadRequest - INV_INPUT_PARAM_CONFLICT - FCWWNs and iSCSINames are both specified. |
Raises: | HTTPBadRequest - INV_INPUT_EXCEEDS_LENGTH - Host name, domain name, or iSCSI name is too long. |
Raises: | HTTPBadRequest - INV_INPUT_EMPTY_STR - Input string (for domain name, iSCSI name, etc.) is empty. |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Any error from host-name or domain-name parsing. |
Raises: | HTTPBadRequest - INV_INPUT_TOO_MANY_WWN_OR_iSCSI - More than 1024 WWNs or iSCSI names are specified. |
Raises: | HTTPBadRequest - INV_INPUT_WRONG_TYPE - The length of WWN is not 16. WWN specification contains non-hexadecimal digit. |
Raises: | HTTPConflict - EXISTENT_PATH - host WWN/iSCSI name already used by another host |
Raises: | HTTPConflict - EXISTENT_HOST - host name is already used. |
Raises: | HTTPBadRequest - NO_SPACE - No space to create host. |
This creates a new host set
Parameters: |
|
---|
of the host will not be checked :type setmembers: list of str :returns: id of host set created :rtype: str
Raises: | HTTPBadRequest - EXISTENT_SET - The set already exits. |
---|---|
Raises: | HTTPConflict - MEMBER_IN_DOMAINSET - The host is in a domain set. |
Raises: | HTTPConflict - MEMBER_IN_SET - The object is already part of the set. |
Raises: | HTTPConflict - MEMBER_NOT_IN_SAME_DOMAIN - Objects must be in the same domain to perform this operation. |
Raises: | HTTPNotFound - NON_EXISTENT_HOST - The host does not exists. |
Raises: | HTTPBadRequest - INV_INPUT_DUP_NAME - Invalid input (duplicate name). |
Create QOS rules
The QoS rule can be applied to VV sets. By using sys:all_others, you can apply the rule to all volumes in the system for which no QoS rule has been defined.
ioMinGoal and ioMaxLimit must be used together to set I/O limits. Similarly, bwMinGoalKB and bwMaxLimitKB must be used together.
If ioMaxLimitOP is set to 2 (no limit), ioMinGoalOP must also be to set to 2 (zero), and vice versa. They cannot be set to ‘none’ individually. Similarly, if bwMaxLimitOP is set to 2 (no limit), then bwMinGoalOP must also be set to 2.
If ioMaxLimitOP is set to 1 (no limit), ioMinGoalOP must also be to set to 1 (zero) and vice versa. Similarly, if bwMaxLimitOP is set to 1 (zero), then bwMinGoalOP must also be set to 1.
The ioMinGoalOP and ioMaxLimitOP fields take precedence over the ioMinGoal and ioMaxLimit fields.
The bwMinGoalOP and bwMaxLimitOP fields take precedence over the bwMinGoalKB and bwMaxLimitKB fields
Parameters: |
|
---|
qosRules = {
'priority': 2, # priority enum
'bwMinGoalKB': 1024, # bandwidth rate minimum goal in
# kilobytes per second
'bwMaxLimitKB': 1024, # bandwidth rate maximum limit in
# kilobytes per second
'ioMinGoal': 10000, # I/O-per-second minimum goal
'ioMaxLimit': 2000000, # I/0-per-second maximum limit
'enable': True, # QoS rule for target enabled?
'bwMinGoalOP': 1, # zero none operation enum, when set to
# 1, bandwidth minimum goal is 0
# when set to 2, the bandwidth mimumum
# goal is none (NoLimit)
'bwMaxLimitOP': 1, # zero none operation enum, when set to
# 1, bandwidth maximum limit is 0
# when set to 2, the bandwidth maximum
# limit is none (NoLimit)
'ioMinGoalOP': 1, # zero none operation enum, when set to
# 1, I/O minimum goal is 0
# when set to 2, the I/O minimum goal is
# none (NoLimit)
'ioMaxLimitOP': 1, # zero none operation enum, when set to
# 1, I/O maximum limit is 0
# when set to 2, the I/O maximum limit
# is none (NoLimit)
'latencyGoal': 5000, # Latency goal in milliseconds
'defaultLatency': False # Use latencyGoal or defaultLatency?
}
Raises: | HTTPBadRequest - INV_INPUT_EXCEEDS_RANGE - Invalid input: number exceeds expected range. |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_QOS_RULE - QoS rule does not exists. |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Illegal character in the input. |
Raises: | HTTPBadRequest - EXISTENT_QOS_RULE - QoS rule already exists. |
Raises: | HTTPBadRequest - INV_INPUT_MIN_GOAL_GRT_MAX_LIMIT - I/O-per-second maximum limit should be greater than the minimum goal. |
Raises: | HTTPBadRequest - INV_INPUT_BW_MIN_GOAL_GRT_MAX_LIMIT - Bandwidth maximum limit should be greater than the mimimum goal. |
Raises: | HTTPBadRequest - INV_INPUT_BELOW_RANGE - I/O-per-second limit is below range. Bandwidth limit is below range. |
Raises: | HTTPBadRequest - UNLICENSED_FEATURE - The system is not licensed for QoS. |
Create a snapshot of an existing Volume.
Parameters: |
|
---|
optional = {
'id': 12, # Specifies the ID of the volume,
# next by default
'comment': "some comment",
'readOnly': True, # Read Only
'expirationHours': 36, # time from now to expire
'retentionHours': 12 # time from now to expire
}
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist |
---|---|
Raises: | HTTPForbidden - PERM_DENIED - Permission denied |
Create a snapshot of an existing Volume Set.
Parameters: |
|
---|
optional = {
'id': 12, # Specifies ID of the volume set
# set, next by default
'comment': "some comment",
'readOnly': True, # Read Only
'expirationHours': 36, # time from now to expire
'retentionHours': 12 # time from now to expire
}
Raises: | HTTPBadRequest - INVALID_INPUT_VV_PATTERN - Invalid volume pattern specified |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_SET - The set does not exist |
Raises: | HTTPNotFound - EMPTY_SET - The set is empty |
Raises: | HTTPServiceUnavailable - VV_LIMIT_REACHED - Maximum number of volumes reached |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The storage volume does not exist |
Raises: | HTTPForbidden - VV_IS_BEING_REMOVED - The volume is being removed |
Raises: | HTTPForbidden - INV_OPERATION_VV_READONLY_TO_READONLY_SNAP - Creating a read-only copy from a read-only volume is not permitted |
Raises: | HTTPConflict - NO_SNAP_CPG - No snapshot CPG has been configured for the volume |
Raises: | HTTPBadRequest - INV_INPUT_DUP_NAME - Invalid input (duplicate name). |
Raises: | HTTPForbidden - INV_OPERATION_VV_SNAP_PARENT_SAME_BASE - Two parent snapshots share thesame base volume |
Raises: | HTTPConflict - INV_OPERATION_VV_ONLINE_COPY_IN_PROGRESS - Invalid operation. Online copyis in progress |
Raises: | HTTPServiceUnavailable - VV_ID_LIMIT_REACHED - Max number of volumeIDs has been reached |
Raises: | HTTPNotFound - NON_EXISTENT_VOLUME - The volume does not exists |
Raises: | HTTPForbidden - VV_IN_STALE_STATE - The volume is in a stale state. |
Raises: | HTTPForbidden - VV_NOT_STARTED - Volume is not started |
Raises: | HTTPForbidden - VV_UNAVAILABLE - The volume is not accessible |
Raises: | HTTPServiceUnavailable - SNAPSHOT_LIMIT_REACHED - Max number of snapshots has been reached |
Raises: | HTTPServiceUnavailable - CPG_ALLOCATION_WARNING_REACHED - The CPG has reached the allocation warning |
Raises: | HTTPConflict - INV_OPERATION_VV_VOLUME_CONV_IN_PROGRESS - Invalid operation: VV conversion is in progress. |
Raises: | HTTPForbidden - INV_OPERATION_VV_CLEANUP_IN_PROGRESS - Internal volume cleanup is in progress. |
Raises: | HTTPForbidden - INV_OPERATION_VV_PEER_VOLUME - Cannot modify a peer volume. |
Raises: | HTTPConflict - INV_OPERATION_VV_ONLINE_COPY_IN_PROGRESS - The volume is the target of an online copy. |
Raises: | HTTPForbidden - INV_OPERATION_VV_INTERNAL_VOLUME - Illegal op on internal vol |
Raises: | HTTPConflict - EXISTENT_ID - An ID exists |
Raises: | HTTPForbidden - INV_OPERATION_VV_NOT_IN_NORMAL_STATE - Volume state is not normal |
Raises: | HTTPForbidden - VV_IN_INCONSISTENT_STATE - Internal inconsistency error in vol |
Raises: | HTTPBadRequest - INV_INPUT_RETAIN_GT_EXPIRE - Retention time is greater than expiration time. |
Raises: | HTTPBadRequest - INV_INPUT_TIME - Invalid time specified. |
Raises: | HTTPForbidden - INV_OPERATION_SNAPSHOT_NOT_SAME_TYPE - Some snapshots in the volume set are read-only, some are read-write |
Create a new VLUN.
When creating a VLUN, the volumeName is required. The lun member is not required if auto is set to True. Either hostname or portPos (or both in the case of matched sets) is also required. The noVcn and overrideLowerPriority members are optional.
Parameters: |
|
---|
portPos = {'node': 1, # System node (0-7)
'slot': 2, # PCI bus slot in the node (0-5)
'port': 1} # Port number on the FC card (0-4)
Parameters: |
|
---|---|
Returns: | the location of the VLUN |
Create a new volume.
Parameters: |
|
---|
optional = {
'id': 12, # Volume ID. If not specified, next
# available is chosen
'comment': 'some comment', # Additional information up to 511
# characters
'policies: { # Specifies VV policies
'staleSS': False, # True allows stale snapshots.
'oneHost': True, # True constrains volume export to
# single host or host cluster
'zeroDetect': True, # True requests Storage System to
# scan for zeros in incoming write
# data
'system': False, # True special volume used by system
# False is normal user volume
'caching': True}, # Read-only. True indicates write &
# read caching & read ahead enabled
'snapCPG': 'CPG name', # CPG Used for snapshots
'ssSpcAllocWarningPct': 12, # Snapshot space allocation warning
'ssSpcAllocLimitPct': 22, # Snapshot space allocation limit
'tpvv': True, # True: Create TPVV
# False (default) Create FPVV
'usrSpcAllocWarningPct': 22, # Enable user space allocation
# warning
'usrSpcAllocLimitPct': 22, # User space allocation limit
'expirationHours': 256, # Relative time from now to expire
# volume (max 43,800 hours)
'retentionHours': 256 # Relative time from now to retain
# volume (max 43,800 hours)
}
Returns: | List of Volumes |
---|---|
Raises: | HTTPBadRequest - INV_INPUT - Invalid Parameter |
Raises: | HTTPBadRequest - TOO_LARGE - Volume size above limit |
Raises: | HTTPBadRequest - NO_SPACE - Not Enough space is available |
Raises: | HTTPForbidden - PERM_DENIED - Permission denied |
Raises: | HTTPConflict - EXISTENT_SV - Volume Exists already |
This creates a new volume set
Parameters: |
|
---|
will not be checked :type setmembers: array
Raises: | HTTPBadRequest - EXISTENT_SET - The set already exits. |
---|---|
Raises: | HTTPConflict - MEMBER_IN_DOMAINSET - The host is in a domain set. |
Raises: | HTTPConflict - MEMBER_IN_SET - The object is already part of the set. |
Raises: | HTTPConflict - MEMBER_NOT_IN_SAME_DOMAIN - Objects must be in the same domain to perform this operation. |
Raises: | HTTPForbidden - VV_IN_INCONSISTENT_STATE - The volume has an internal inconsistency error. |
Raises: | HTTPForbidden - VV_IS_BEING_REMOVED - The volume is being removed. |
Raises: | HTTPNotFound - NON_EXISTENT_VOLUME - The volume does not exists. |
Raises: | HTTPNotFound - NON_EXISTENT_HOST - The host does not exists. |
Raises: | HTTPForbidden - INV_OPERATION_VV_SYS_VOLUME - The operation is not allowed on a system volume. |
Raises: | HTTPForbidden - INV_OPERATION_VV_INTERNAL_VOLUME - The operation is not allowed on an internal volume. |
Raises: | HTTPBadRequest - INV_INPUT_DUP_NAME - Invalid input (duplicate name). |
This is useful for debugging requests to 3PAR.
Parameters: | flag (bool) – set to True to enable debugging |
---|
Delete a CPG.
Parameters: | name (str) – CPG Name |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_CPG - CPG Not Found |
Raises: | HTTPForbidden - IN_USE - The CPG Cannot be removed because it’s in use. |
Raises: | HTTPForbidden - PERM_DENIED - Permission denied |
Delete a Host.
Parameters: | name (str) – Host Name |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_HOST - HOST Not Found |
Raises: | HTTPForbidden - IN_USE - The HOST Cannot be removed because it’s in use. |
Raises: | HTTPForbidden - PERM_DENIED - Permission denied |
This removes a host set.
Parameters: | name (str) – the host set to remove |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_SET - The set does not exists. |
Raises: | HTTPConflict - EXPORTED_VLUN - The host set has exported VLUNs. |
Clear and Delete QoS rules.
Parameters: |
|
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_QOS_RULE - QoS rule does not exist. |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Illegal character in the input |
Delete a VLUN.
Parameters: |
|
---|
port = {'node': 1, # System node (0-7)
'slot': 2, # PCI bus slot in the node (0-5)
'port': 1} # Port number on the FC card (0-4)
Raises: | HTTPBadRequest - INV_INPUT_MISSING_REQUIRED - Incomplete VLUN info. Missing volumeName or lun, or both hostname and port. |
---|---|
Raises: | HTTPBadRequest - INV_INPUT_PORT_SELECTION - Specified port is invalid. |
Raises: | HTTPBadRequest - INV_INPUT_EXCEEDS_RANGE - The LUN specified exceeds expected range. |
Raises: | HTTPNotFound - NON_EXISTENT_HOST - The host does not exist |
Raises: | HTTPNotFound - NON_EXISTENT_VLUN - The VLUN does not exist |
Raises: | HTTPNotFound - NON_EXISTENT_PORT - The port does not exist |
Raises: | HTTPForbidden - PERM_DENIED - Permission denied |
Delete a volume.
Parameters: | name (str) – the name of the volume |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist |
Raises: | HTTPForbidden - PERM_DENIED - Permission denied |
Raises: | HTTPForbidden - RETAINED - Volume retention time has not expired |
Raises: | HTTPForbidden - HAS_RO_CHILD - Volume has read-only child |
Raises: | HTTPConflict - HAS_CHILD - The volume has a child volume |
Raises: | HTTPConflict - IN_USE - The volume is in use by VV set, VLUN, etc |
This removes a volume set. You must clear all QOS rules before a volume set can be deleted.
Parameters: | name (str) – the volume set to remove |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_SET - The set does not exists. |
Raises: | HTTPConflict - EXPORTED_VLUN - The host set has exported VLUNs. The VV set was exported. |
Raises: | HTTPConflict - VVSET_QOS_TARGET - The object is already part of the set. |
Return a list of every Volume Set the given volume is a part of. The list can contain zero, one, or multiple items.
Parameters: | name (str) – the volume name |
---|---|
Returns: | a list of Volume Set dicts |
vvset_names = [{
'name': "volume_set_1", # The name of the volume set
'comment': 'Samplet VVSet', # The volume set's comment
'domain': 'my_domain', # The volume set's domain
'setmembers': ['V1', 'V2'] # List of strings containing
# the volumes that are members
# of this volume set
},
...
]
Raises: | HTTPForbidden - VV_IN_INCONSISTENT_STATE - Internal inconsistency error in vol |
---|---|
Raises: | HTTPForbidden - VV_IS_BEING_REMOVED - The volume is being removed |
Raises: | HTTPNotFound - NON_EXISTENT_VOLUME - The volume does not exists |
Raises: | HTTPForbidden - INV_OPERATION_VV_SYS_VOLUME - Illegal op on system vol |
Raises: | HTTPForbidden - INV_OPERATION_VV_INTERNAL_VOLUME - Illegal op on internal vol |
Find a host from an iSCSI initiator or FC WWN.
Parameters: |
|
---|
Determines whether a volume contains a specific key/value pair.
Parameters: |
|
---|---|
Returns: | bool |
Find the first Volume Set that contains a target volume. If a volume set other than the first one found is desired use findAllVolumeSets and search the results.
Parameters: | name (str) – the volume name |
---|---|
Returns: | The name of the first volume set that contains the target |
volume, otherwise None.
This is used to get all key/value pair metadata from a volume.
Parameters: | name (str) – the volume name |
---|---|
Returns: | dict with all keys and associated data. |
keys = {
'total': 2,
'members': [
{
# time of creation in seconds format
'creationTimeSec': 1406074222
# the date/time the key was added
'date_added': 'Mon Jul 14 16:09:36 PDT 2014',
'value': 'data' # the value associated with the key
'key': 'key_name' # the key name
# time of creation in date format
'creationTime8601': '2014-07-22T17:10:22-07:00'
},
{
# time of creation in seconds format
'creationTimeSec': 1406074222
# the date/time the key was added
'date_added': 'Mon Jul 14 16:09:36 PDT 2014',
'value': 'data' # the value associated with the key
'key': 'key_name_2' # the key name
# time of creation in date format
'creationTime8601': '2014-07-22T17:10:22-07:00'
}
]
}
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist |
---|
Get information about a CPG.
Parameters: | name (str) – The name of the CPG to find |
---|---|
Returns: | cpg dict |
Raises: | HTTPNotFound - NON_EXISTENT_CPG - CPG doesn’t exist |
Get available space information about a CPG.
Parameters: | name (str) – The name of the CPG to find |
---|---|
Returns: | Available space dict |
info = {
"rawFreeMiB": 1000000, # Raw free capacity in MiB
"usableFreeMiB": 5000 # LD free capacity in MiB
}
Raises: | HTTPNotFound - NON_EXISTENT_CPG - CPG Not Found |
---|
Requests CPG performance data at a sampling rate (interval) for a given length of time to sample (history)
Parameters: |
|
---|---|
Returns: | dict |
Raises: | SrstatldException - srstatld gives invalid output |
Get a list of Fibre Channel Ports.
Returns: | list of Fibre Channel Ports |
---|
Get information about a Host.
Parameters: | name (str) – The name of the Host to find |
---|---|
Returns: | host dict |
Raises: | HTTPNotFound - NON_EXISTENT_HOST - HOST doesn’t exist |
Get information about a Host Set
Parameters: | name (str) – The name of the Host Set to find |
---|---|
Returns: | host set dict |
Raises: | HTTPNotFound - NON_EXISTENT_SET - The set does not exist |
Get information about every Host Set on the 3Par array
Returns: | list of Host Sets |
---|
Get all of the VLUNs on a specific Host.
Parameters: | hostName – Host name |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_HOST - HOST Not Found |
Get the overall system capacity for the 3PAR server.
Returns: | Dictionary of system capacity information |
---|
capacity = {
"allCapacity": { # Overall system capacity
# includes FC, NL, SSD
# device types
"totalMiB": 20054016, # Total system capacity
# in MiB
"allocated": { # Allocated space info
"totalAllocatedMiB": 12535808, # Total allocated
# capacity
"volumes": { # Volume capacity info
"totalVolumesMiB": 10919936, # Total capacity
# allocated to volumes
"nonCPGsMiB": 0, # Total non-CPG capacity
"nonCPGUserMiB": 0, # The capacity allocated
# to non-CPG user space
"nonCPGSnapshotMiB": 0, # The capacity allocated
# to non-CPG snapshot
# volumes
"nonCPGAdminMiB": 0, # The capacity allocated
# to non-CPG
# administrative volumes
"CPGsMiB": 10919936, # Total capacity
# allocated to CPGs
"CPGUserMiB": 7205538, # User CPG space
"CPGUserUsedMiB": 7092550, # The CPG allocated to
# user space that is
# in use
"CPGUserUnusedMiB": 112988, # The CPG allocated to
# user space that is not
# in use
"CPGSnapshotMiB": 2411870, # Snapshot CPG space
"CPGSnapshotUsedMiB": 210256, # CPG allocated to
# snapshot that is in use
"CPGSnapshotUnusedMiB": 2201614, # CPG allocated to
# snapshot space that is
# not in use
"CPGAdminMiB": 1302528, # Administrative volume
# CPG space
"CPGAdminUsedMiB": 115200, # The CPG allocated to
# administrative space
# that is in use
"CPGAdminUnusedMiB": 1187328, # The CPG allocated to
# administrative space
# that is not in use
"unmappedMiB": 0 # Allocated volume space
# that is unmapped
},
"system": { # System capacity info
"totalSystemMiB": 1615872, # System space capacity
"internalMiB": 780288, # The system capacity
# allocated to internal
# resources
"spareMiB": 835584, # Total spare capacity
"spareUsedMiB": 0, # The system capacity
# allocated to spare resources
# in use
"spareUnusedMiB": 835584 # The system capacity
# allocated to spare resources
# that are unused
}
},
"freeMiB": 7518208, # Free capacity
"freeInitializedMiB": 7518208, # Free initialized capacity
"freeUninitializedMiB": 0, # Free uninitialized capacity
"unavailableCapacityMiB": 0, # Unavailable capacity in MiB
"failedCapacityMiB": 0 # Failed capacity in MiB
},
"FCCapacity": { # System capacity from FC devices only
... # Same structure as above
},
"NLCapacity": { # System capacity from NL devices only
... # Same structure as above
},
"SSDCapacity": { # System capacity from SSD devices only
... # Same structure as above
}
}
Parameters: | patch_id – The ID of the patch. |
---|---|
Returns: | list of str (raw lines of CLI output as strings) |
Get all the patches currently affecting the system.
Parameters: | history – Specify the history of all patches and updates applied to the system. |
---|---|
Returns: | dict with total and members (see convert_cli_output_to_collection_like_wsapi()) |
Get the Storage System Information
Returns: | Dictionary of Storage System Info |
---|
Get the status of a task.
Parameters: | taskId (int) – the task id |
---|---|
Returns: | the status of the task |
Raises: | HTTPBadRequest - INV_INPUT_BELOW_RANGE - Bad Request Task ID must be a positive value. |
Raises: | HTTPBadRequest - INV_INPUT_EXCEEDS_RANGE - Bad Request Task ID is too large. |
Raises: | HTTPNotFound - NON_EXISTENT_TASK - Task with the specified task ID does not exist. |
Raises: | HTTPBadRequest - INV_INPUT_WRONG_TYPE - Task ID is not an integer. |
Get information about a VLUN.
Parameters: | volumeName – The volume name of the VLUN to find |
---|---|
Returns: | VLUN |
Raises: | HTTPNotFound - NON_EXISTENT_VLUN - VLUN doesn’t exist |
Get information about a volume.
Parameters: | name (str) – The name of the volume to find |
---|---|
Returns: | volume |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - volume doesn’t exist |
This is used to get a key/value pair metadata from a volume.
Parameters: |
|
---|---|
Returns: | dict with the requested key’s data. |
data = {
# time of creation in seconds format
'creationTimeSec': 1406074222
# the date/time the key was added
'date_added': 'Mon Jul 14 16:09:36 PDT 2014',
'value': 'data' # the value associated with the key
'key': 'key_name' # the key name
# time of creation in date format
'creationTime8601': '2014-07-22T17:10:22-07:00'
}
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Illegal character in input |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist |
Raises: | HTTPNotFound - NON_EXISTENT_OBJECT_KEY - Object key does not exist |
Get information about a Volume Set
Parameters: | name (str) – The name of the Volume Set to find |
---|---|
Returns: | Volume Set |
Raises: | HTTPNotFound - NON_EXISTENT_SET - The set doesn’t exist |
Shows all snapshots associated with a given volume.
Parameters: | name (str) – The volume name |
---|---|
Returns: | List of snapshot names |
Get the WSAPI Configuration Information.
Returns: | Dictionary of WSAPI configurations |
---|
Grow an existing volume by ‘amount’ Mebibytes.
Parameters: |
|
---|---|
Raises: | HTTPForbidden - VV_NOT_IN_SAME_DOMAIN - The volume is not in the same domain. |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist. |
Raises: | HTTPForbidden - INV_OPERATION_UNSUPPORTED_VV_TYPE - Invalid operation: Cannot grow this type of volume. |
Raises: | HTTPConflict - INV_OPERATION_VV_TUNE_IN_PROGRESS - Invalid operation: Volume tuning is in progress. |
Raises: | HTTPBadRequest - INV_INPUT_EXCEEDS_LENGTH - Invalid input: String length exceeds limit. |
Raises: | HTTPBadRequest - INV_INPUT_VV_GROW_SIZE - Invalid grow size. |
Raises: | HTTPForbidden - VV_NEW_SIZE_EXCEEDS_CPG_LIMIT - New volume size exceeds CPG limit |
Raises: | HTTPForbidden - INV_OPERATION_VV_INTERNAL_VOLUME - This operation is not allowed on an internal volume. |
Raises: | HTTPConflict - INV_OPERATION_VV_VOLUME_CONV_IN_PROGRESS - Invalid operation: VV conversion is in progress. |
Raises: | HTTPConflict - INV_OPERATION_VV_VOLUME_COPY_IN_PROGRESS - Invalid operation: online copy is in progress. |
Raises: | HTTPForbidden - INV_OPERATION_VV_CLEANUP_IN_PROGRESS - Internal volume cleanup is in progress. |
Raises: | HTTPForbidden - VV_IS_BEING_REMOVED - The volume is being removed. |
Raises: | HTTPForbidden - VV_IN_INCONSISTENT_STATE - The volume has an internal consistency error. |
Raises: | HTTPForbidden - VV_SIZE_CANNOT_REDUCE - New volume size is smaller than the current size. |
Raises: | HTTPForbidden - VV_NEW_SIZE_EXCEEDS_LIMITS - New volume size exceeds the limit. |
Raises: | HTTPConflict - INV_OPERATION_VV_SA_SD_SPACE_REMOVED - Invalid operation: Volume SA/SD space is being removed. |
Raises: | HTTPConflict - INV_OPERATION_VV_IS_BUSY - Invalid operation: Volume is currently busy. |
Raises: | HTTPForbidden - VV_NOT_STARTED - Volume is not started. |
Raises: | HTTPConflict - INV_OPERATION_VV_IS_PCOPY - Invalid operation: Volume is a physical copy. |
Raises: | HTTPForbidden - INV_OPERATION_VV_NOT_IN_NORMAL_STATE - Volume state is not normal |
Raises: | HTTPConflict - INV_OPERATION_VV_PROMOTE_IN_PROGRESS - Invalid operation: Volume promotion is in progress. |
Raises: | HTTPConflict - INV_OPERATION_VV_PARENT_OF_PCOPY - Invalid operation: Volume is the parent of physical copy. |
Raises: | HTTPBadRequest - NO_SPACE - Insufficent space for requested operation. |
Is the volume being created by process of online copy?
Parameters: | name (str) – the name of the volume |
---|
Parameters: |
|
---|---|
Returns: | None |
Returns: | None |
---|
Modify an existing Host entry.
Parameters: |
|
---|
mod_request = {
'newName': 'myNewName', # New name of the host
'pathOperation': 1, # If adding, adds the WWN or
# iSCSI name to the existing
# host.
'FCWWNs': [], # One or more WWN to set for
# the host.
'iSCSINames': [], # One or more iSCSI names to
# set for the host.
'forcePathRemoval': False, # If True, remove SSN(s) or
# iSCSI(s) even if there are
# VLUNs exported to host
'persona': 1, # ID of the persona to modify
# the host's persona to.
'descriptors':
{'location': 'earth', # The host's location
'IPAddr': '10.10.10.10', # The host's IP address
'os': 'linux', # The operating system running
# on the host.
'model': 'ex', # The host's model
'contact': 'Smith', # The host's owner and contact
'comment': 'Joes box'} # Additional host information
'chapOperation': HOST_EDIT_ADD, # Add or remove
'chapOperationMode': CHAP_INITIATOR, # Initator or target
'chapName': 'MyChapName', # The chap name
'chapSecret': 'xyz', # The chap secret for the host
# or the target
'chapSecretHex': False, # If True, the chapSecret is
# treated as Hex.
'chapRemoveTargetOnly': True # If True, then remove target
# chap only
}
Raises: | HTTPBadRequest - INV_INPUT - Missing host name. |
---|---|
Raises: | HTTPBadRequest - INV_INPUT_PARAM_CONFLICT - Both iSCSINames & FCWWNs are specified. (lot of other possibilities) |
Raises: | HTTPBadRequest - INV_INPUT_ONE_REQUIRED - iSCSINames or FCWwns missing. |
Raises: | HTTPBadRequest - INV_INPUT_ONE_REQUIRED - No path operation specified. |
Raises: | HTTPBadRequest - INV_INPUT_BAD_ENUM_VALUE - Invalid enum value. |
Raises: | HTTPBadRequest - INV_INPUT_MISSING_REQUIRED - Required fields missing. |
Raises: | HTTPBadRequest - INV_INPUT_EXCEEDS_LENGTH - Host descriptor argument length, new host name, or iSCSI name is too long. |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Error parsing host or iSCSI name. |
Raises: | HTTPConflict - EXISTENT_HOST - New host name is already used. |
Raises: | HTTPNotFound - NON_EXISTENT_HOST - Host to be modified does not exist. |
Raises: | HTTPBadRequest - INV_INPUT_TOO_MANY_WWN_OR_iSCSI - More than 1024 WWNs or iSCSI names are specified. |
Raises: | HTTPBadRequest - INV_INPUT_WRONG_TYPE - Input value is of the wrong type. |
Raises: | HTTPConflict - EXISTENT_PATH - WWN or iSCSI name is already claimed by other host. |
Raises: | HTTPBadRequest - INV_INPUT_BAD_LENGTH - CHAP hex secret length is not 16 bytes, or chap ASCII secret length is not 12 to 16 characters. |
Raises: | HTTPNotFound - NO_INITIATOR_CHAP - Setting target CHAP without initiator CHAP. |
Raises: | HTTPNotFound - NON_EXISTENT_CHAP - Remove non-existing CHAP. |
Raises: | HTTPConflict - NON_UNIQUE_CHAP_SECRET - CHAP secret is not unique. |
Raises: | HTTPConflict - EXPORTED_VLUN - Setting persona with active export; remove a host path on an active export. |
Raises: | HTTPBadRequest - NON_EXISTENT_PATH - Remove a non-existing path. |
Raises: | HTTPConflict - LUN_HOSTPERSONA_CONFLICT - LUN number and persona capability conflict. |
Raises: | HTTPBadRequest - INV_INPUT_DUP_PATH - Duplicate path specified. |
This modifies a host set by adding or removing a hosts from the set. It’s action is based on the enums SET_MEM_ADD or SET_MEM_REMOVE.
Parameters: |
|
---|---|
Returns: | headers - dict of HTTP Response headers. Upon successful modification of a host set HTTP code 200 OK is returned and the URI of the updated host set will be returned in the location portion of the headers. |
Returns: | body - the body of the response. None if successful. |
Raises: | HTTPBadRequest - EXISTENT_SET - The set already exits. |
Raises: | HTTPNotFound - NON_EXISTENT_SET - The set does not exists. |
Raises: | HTTPConflict - MEMBER_IN_DOMAINSET - The host is in a domain set. |
Raises: | HTTPConflict - MEMBER_IN_SET - The object is already part of the set. |
Raises: | HTTPNotFound - MEMBER_NOT_IN_SET - The object is not part of the set. |
Raises: | HTTPConflict - MEMBER_NOT_IN_SAME_DOMAIN - Objects must be in the same domain to perform this operation. |
Raises: | HTTPBadRequest - INV_INPUT_DUP_NAME - Invalid input (duplicate name). |
Raises: | HTTPBadRequest - INV_INPUT_PARAM_CONFLICT - Invalid input (parameters cannot be present at the same time). |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Invalid contains one or more illegal characters. |
Modify an existing QOS rules
The QoS rule can be applied to VV sets. By using sys:all_others, you can apply the rule to all volumes in the system for which no QoS rule has been defined.
ioMinGoal and ioMaxLimit must be used together to set I/O limits. Similarly, bwMinGoalKB and bwMaxLimitKB must be used together.
If ioMaxLimitOP is set to 2 (no limit), ioMinGoalOP must also be to set to 2 (zero), and vice versa. They cannot be set to ‘none’ individually. Similarly, if bwMaxLimitOP is set to 2 (no limit), then bwMinGoalOP must also be set to 2.
If ioMaxLimitOP is set to 1 (no limit), ioMinGoalOP must also be to set to 1 (zero) and vice versa. Similarly, if bwMaxLimitOP is set to 1 (zero), then bwMinGoalOP must also be set to 1.
The ioMinGoalOP and ioMaxLimitOP fields take precedence over the ioMinGoal and ioMaxLimit fields.
The bwMinGoalOP and bwMaxLimitOP fields take precedence over the bwMinGoalKB and bwMaxLimitKB fields
Parameters: |
|
---|
qosRules = {
'priority': 2, # priority enum
'bwMinGoalKB': 1024, # bandwidth rate minimum goal in
# kilobytes per second
'bwMaxLimitKB': 1024, # bandwidth rate maximum limit in
# kilobytes per second
'ioMinGoal': 10000, # I/O-per-second minimum goal.
'ioMaxLimit': 2000000, # I/0-per-second maximum limit
'enable': True, # QoS rule for target enabled?
'bwMinGoalOP': 1, # zero none operation enum, when set to
# 1, bandwidth minimum goal is 0
# when set to 2, the bandwidth minimum
# goal is none (NoLimit)
'bwMaxLimitOP': 1, # zero none operation enum, when set to
# 1, bandwidth maximum limit is 0
# when set to 2, the bandwidth maximum
# limit is none (NoLimit)
'ioMinGoalOP': 1, # zero none operation enum, when set to
# 1, I/O minimum goal minimum goal is 0
# when set to 2, the I/O minimum goal is
# none (NoLimit)
'ioMaxLimitOP': 1, # zero none operation enum, when set to
# 1, I/O maximum limit is 0
# when set to 2, the I/O maximum limit
# is none (NoLimit)
'latencyGoal': 5000, # Latency goal in milliseconds
'defaultLatency': False # Use latencyGoal or defaultLatency?
}
Raises: | HTTPBadRequest INV_INPUT_EXCEEDS_RANGE - Invalid input: number exceeds expected range. |
---|---|
Raises: | HTTPNotFound NON_EXISTENT_QOS_RULE - QoS rule does not exists. |
Raises: | HTTPBadRequest INV_INPUT_ILLEGAL_CHAR - Illegal character in the input. |
Raises: | HTTPBadRequest EXISTENT_QOS_RULE - QoS rule already exists. |
Raises: | HTTPBadRequest INV_INPUT_IO_MIN_GOAL_GRT_MAX_LIMIT - I/O-per-second maximum limit should be greater than the minimum goal. |
Raises: | HTTPBadRequest INV_INPUT_BW_MIN_GOAL_GRT_MAX_LIMIT - Bandwidth maximum limit should be greater than the minimum goal. |
Raises: | HTTPBadRequest INV_INPUT_BELOW_RANGE - I/O-per-second limit is below range. Bandwidth limit is below range. |
Raises: | HTTPBadRequest UNLICENSED_FEATURE - The system is not licensed for QoS. |
Modify a volume.
Parameters: |
|
---|
volumeMods = {
'newName': 'newName', # New volume name
'comment': 'some comment', # New volume comment
'snapCPG': 'CPG name', # Snapshot CPG name
'policies: { # Specifies VV policies
'staleSS': False, # True allows stale snapshots.
'oneHost': True, # True constrains volume export to
# single host or host cluster
'zeroDetect': True, # True requests Storage System to
# scan for zeros in incoming write
# data
'system': False, # True special volume used by system
# False is normal user volume
'caching': True}, # Read-only. True indicates write &
# read caching & read ahead enabled
'ssSpcAllocWarningPct': 12, # Snapshot space allocation warning
'ssSpcAllocLimitPct': 22, # Snapshot space allocation limit
'tpvv': True, # True: Create TPVV
# False: (default) Create FPVV
'usrSpcAllocWarningPct': 22, # Enable user space allocation
# warning
'usrSpcAllocLimitPct': 22, # User space allocation limit
'userCPG': 'User CPG name', # User CPG name
'expirationHours': 256, # Relative time from now to expire
# volume (max 43,800 hours)
'retentionHours': 256, # Relative time from now to retain
# volume (max 43,800 hours)
'rmSsSpcAllocWarning': False, # True removes snapshot space
# allocation warning.
# False sets it when value > 0
'rmUsrSpcAllocWarwaning': False, # True removes user space
# allocation warning.
# False sets it when value > 0
'rmExpTime': False, # True resets expiration time to 0.
# False sets it when value > 0
'rmSsSpcAllocLimit': False, # True removes snapshot space
# allocation limit.
# False sets it when value > 0
'rmUsrSpcAllocLimit': False # True removes user space
# allocation limit.
# False sets it when value > 0
}
Raises: | HTTPBadRequest - INV_INPUT_WARN_GT_LIMIT - Allocation warning level is higher than the limit. |
---|---|
Raises: | HTTPBadRequest - INV_INPUT_USR_ALRT_NON_TPVV - User space allocation alerts are valid only with a TPVV. |
Raises: | HTTPBadRequest - INV_INPUT_RETAIN_GT_EXPIRE - Retention time is greater than expiration time. |
Raises: | HTTPBadRequest - INV_INPUT_VV_POLICY - Invalid policy specification (for example, caching or system is set to true). |
Raises: | HTTPBadRequest - INV_INPUT_EXCEEDS_LENGTH - Invalid input: string length exceeds limit. |
Raises: | HTTPBadRequest - INV_INPUT_TIME - Invalid time specified. |
Raises: | HTTPForbidden - INV_OPERATION_VV_MODIFY_USR_CPG_TPVV - usr_cpg cannot be modified on a TPVV. |
Raises: | HTTPBadRequest - UNLICENSED_FEATURE - Retention time cannot be modified on a system without the Virtual Lock license. |
Raises: | HTTPForbidden - CPG_NOT_IN_SAME_DOMAIN - Snap CPG is not in the same domain as the user CPG. |
Raises: | HTTPForbidden - INV_OPERATION_VV_PEER_VOLUME - Cannot modify a peer volume. |
Raises: | HTTPInternalServerError - INT_SERV_ERR - Metadata of the VV is corrupted. |
Raises: | HTTPForbidden - INV_OPERATION_VV_SYS_VOLUME - Cannot modify retention time on a system volume. |
Raises: | HTTPForbidden - INV_OPERATION_VV_INTERNAL_VOLUME - Cannot modify an internal volume |
Raises: | HTTPConflict - INV_OPERATION_VV_VOLUME_NOT_DEFINED_ALL_NODES - Cannot modify a volume until the volume is defined on all volumes. |
Raises: | HTTPConflict - INVALID_OPERATION_VV_ONLINE_COPY_IN_PROGRESS - Cannot modify a volume when an online copy for that volume is in progress. |
Raises: | HTTPConflict - INVALID_OPERATION_VV_VOLUME_CONV_IN_PROGRESS - Cannot modify a volume in the middle of a conversion operation. |
Raises: | HTTPConflict - INVALID_OPERATION_VV_SNAPSPACE_NOT_MOVED_TO_CPG - Snapshot space of a volume needs to be moved to a CPG before the user space. |
Raises: | HTTPConflict - INV_OPERATION_VV_VOLUME_ACCOUNTING_IN_PROGRESS - The volume cannot be renamed until snapshot accounting has finished. |
Raises: | HTTPForbidden - INV_OPERATION_VV_ZERO_DETECT_TPVV - The zero_detect policy can be used only on TPVVs. |
Raises: | HTTPConflict - INV_OPERATION_VV_CPG_ON_SNAPSHOT - CPG cannot be assigned to a snapshot. |
This modifies a volume set by adding or remove a volume from the volume set. It’s actions is based on the enums SET_MEM_ADD or SET_MEM_REMOVE.
Parameters: |
|
---|---|
Raises: | HTTPBadRequest - EXISTENT_SET - The set already exits. |
Raises: | HTTPNotFound - NON_EXISTENT_SET - The set does not exists. |
Raises: | HTTPConflict - MEMBER_IN_DOMAINSET - The host is in a domain set. |
Raises: | HTTPConflict - MEMBER_IN_SET - The object is already part of the set. |
Raises: | HTTPNotFound - MEMBER_NOT_IN_SET - The object is not part of the set. |
Raises: | HTTPConflict - MEMBER_NOT_IN_SAME_DOMAIN - Objects must be in the same domain to perform this operation. |
Raises: | HTTPForbidden - VV_IN_INCONSISTENT_STATE - The volume has an internal inconsistency error. |
Raises: | HTTPForbidden - VV_IS_BEING_REMOVED - The volume is being removed. |
Raises: | HTTPNotFound - NON_EXISTENT_VOLUME - The volume does not exists. |
Raises: | HTTPForbidden - INV_OPERATION_VV_SYS_VOLUME - The operation is not allowed on a system volume. |
Raises: | HTTPForbidden - INV_OPERATION_VV_INTERNAL_VOLUME - The operation is not allowed on an internal volume. |
Raises: | HTTPBadRequest - INV_INPUT_DUP_NAME - Invalid input (duplicate name). |
Raises: | HTTPBadRequest - INV_INPUT_PARAM_CONFLICT - Invalid input (parameters cannot be present at the same time). |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Invalid contains one or more illegal characters. |
Find a host from an iSCSI initiator or FC WWN.
Parameters: |
|
---|---|
Raises: | HTTPBadRequest - INV_INPUT - Invalid URI syntax. |
Raises: | HTTPNotFound - NON_EXISTENT_HOST - HOST Not Found |
Raises: | HTTPInternalServerError - INTERNAL_SERVER_ERR - Internal server error. |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Host name contains invalid character. |
Query a QoS rule
Parameters: |
|
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_QOS_RULE - QoS rule does not exist. |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Illegal character in the input. |
Remove a host from a host set.
Parameters: |
|
---|---|
Returns: | headers - dict of HTTP Response headers. Upon successful modification of a host set HTTP code 200 OK is returned and the URI of the updated host set will be returned in the location portion of the headers. |
Returns: | body - the body of the response. None if successful. |
Remove a host from its host set if it is a member of one.
Parameters: | name (str) – the host name to remove |
---|---|
Returns: | None if host has no host set, else (headers, body) |
Returns: | headers - dict of HTTP Response headers. Upon successful modification of a host set HTTP code 200 OK is returned and the URI of the updated host set will be returned in the location portion of the headers. |
Returns: | body - the body of the response. None if successful. |
Remove a volume from a volume set
Parameters: |
|
---|
This is used to remove a metadata key/value pair from a volume.
Parameters: |
|
---|---|
Returns: | None |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Illegal character in input |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist |
Raises: | HTTPNotFound - NON_EXISTENT_OBJECT_KEY - Object key does not exist |
Set a QOS Rule on a volume set
Parameters: |
|
---|
Set SSH Options for ssh calls.
This is used to set the SSH credentials for calls that use SSH instead of REST HTTP.
This is used to set a key/value pair metadata into a volume. If the key already exists on the volume the value will be updated.
Parameters: |
|
---|---|
Raises: | HTTPBadRequest - INV_INPUT_EXCEEDS_LENGTH - Invalid input: string length exceeds limit. |
Raises: | HTTPBadRequest - INV_INPUT_MISSING_REQUIRED - Required fields missing |
Raises: | HTTPBadRequest - INV_INPUT_UNREC_NAME - Unrecognized name |
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Illegal character in input |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist |
Stopping a offline physical copy operation.
Parameters: | name (str) – the name of the volume |
---|---|
Raises: | HTTPBadRequest - INV_INPUT_ILLEGAL_CHAR - Invalid VV name or CPG name. |
Raises: | HTTPNotFound - NON_EXISTENT_CPG - The CPG does not exists. |
Raises: | HTTPForbidden - CPG_NOT_IN SAME_DOMAIN - The CPG is not in the current domain. |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist |
Raises: | HTTPForbidden - VV_NOT_IN_SAME_DOMAIN - The volume is not in the same domain. |
Raises: | HTTPBadRequest - INV_INPUT_BAD_ENUM_VALUE - The priority value in not in the valid range(1-3). |
Raises: | HTTPConflict - EXISTENT_VOLUME - The volume already exists. |
Raises: | HTTPForbidden - INV_OPERATION_VV_SYS_VOLUME - The operation is not allowed on a system volume. |
Raises: | HTTPForbidden - INV_OPERATION_NON_BASE_VOLUME - The destination volume is not a base volume. |
Raises: | HTTPForbidden - INV_OPERATION_IN_REMOTE_COPY - The destination volume is involved in a remote copy. |
Raises: | HTTPForbidden - INV_OPERATION_VV_EXPORTED - The volume is exported. |
Raises: | HTTPForbidden - INV_OPERATION_VV_COPY_TO_SELF - The destination volume is the same as the parent. |
Raises: | HTTPForbidden - INV_OPERATION_VV_READONLY_SNAPSHOT - The parent volume is a read-only snapshot. |
Raises: | HTTPForbidden - INV_OPERATION_VV_COPY_TO_BASE - The destination volume is the base volume of a parent volume. |
Raises: | HTTPConflict - INV_OPERATION_VV_VOLUME_CONV_IN_PROGRESS - The volume is in a conversion operation. |
Raises: | HTTPForbidden - INV_OPERATION_VV_NO_SNAPSHOT_ALLOWED - The parent volume must allow snapshots. |
Raises: | HTTPConflict - INV_OPERATION_VV_ONLINE_COPY_IN_PROGRESS - The volume is the target of an online copy. |
Raises: | HTTPForbidden - INV_OPERATION_VV_CLEANUP_IN_PROGRESS - Cleanup of internal volume for the volume is in progress. |
Raises: | HTTPForbidden - INV_OPERATION_VV_CIRCULAR_COPY - The parent volume is a copy of the destination volume. |
Raises: | HTTPForbidden - INV_OPERATION_VV_PEER_VOLUME - The operation is not allowed on a peer volume. |
Raises: | HTTPForbidden - INV_OPERATION_VV_INTERNAL_VOLUME - The operation is not allowed on an internal volume. |
Raises: | HTTPForbidden - VV_IS_BEING_REMOVED - The volume is being removed. |
Raises: | HTTPForbidden - INV_OPERATION_VV_NOT_IN_NORMAL_STATE - The volume is not in the normal state. |
Raises: | HTTPForbidden - VV_IN_INCONSISTENT_STATE - The volume has an internal consistency error. |
Raises: | HTTPConflict - INV_OPERATION_VV_PCOPY_IN_PROGRESS - The destination volume has a physical copy in progress. |
Raises: | HTTPConflict - INV_OPERATION_VV_FAILED_ONLINE_COPY - Online copying of the destination volume has failed. |
Raises: | HTTPConflict - INV_OPERATION_VV_COPY_PARENT_TOO_BIG - The size of the parent volume is larger than the size of the destination volume. |
Raises: | HTTPForbidden - INV_OPERATION_VV_NO_PARENT - The volume has no physical parent. |
Raises: | HTTPConflict - IN_USE - The resynchronization snapshot is in a stale state. |
Raises: | HTTPForbidden - VV_IN_STALE_STATE - The volume is in a stale state. |
Raises: | HTTPNotFound - NON_EXISTENT_VVCOPY - Physical copy not found. |
Exceptions for the client
Author: | Walter A. Boring IV |
---|---|
Description: | This contains the HTTP exceptions that can come back from the REST calls to 3PAR |
Bases: exceptions.Exception
The base exception class for all exceptions this library raises.
Parameters: | error (array) – The error array |
---|
Bases: hp3parclient.exceptions.ClientException
There was an error connecting to the server
Bases: hp3parclient.exceptions.SSHException
Bases: hp3parclient.exceptions.SSHException
Bases: hp3parclient.exceptions.ClientException
Bases: hp3parclient.exceptions.ClientException
HTTP 400 - Bad request: you sent some malformed data.
Bases: hp3parclient.exceptions.ClientException
HTTP 409 - Conflict: A Conflict happened on the server
Bases: hp3parclient.exceptions.ClientException
An HTTP error occurred
Bases: hp3parclient.exceptions.ClientException
Bases: hp3parclient.exceptions.ClientException
HTTP 403 - Forbidden: your credentials don’t give you access to this resource.
Bases: hp3parclient.exceptions.ClientException
Bases: hp3parclient.exceptions.ClientException
Bases: hp3parclient.exceptions.ClientException
HTTP 500 - Internal Server Error: an internal error occured.
Bases: hp3parclient.exceptions.ClientException
Bases: hp3parclient.exceptions.ClientException
HTTP 405 - Method not Allowed
Bases: hp3parclient.exceptions.ClientException
HTTP 406 - Method not Acceptable
Bases: hp3parclient.exceptions.ClientException
HTTP 404 - Not found
Bases: hp3parclient.exceptions.ClientException
HTTP 501 - Not Implemented: the server does not support this operation.
Bases: hp3parclient.exceptions.ClientException
Bases: hp3parclient.exceptions.ClientException
HTTP 407 - The client must first authenticate itself with the proxy.
Bases: hp3parclient.exceptions.ClientException
Bases: hp3parclient.exceptions.ClientException
HTTP 408 - The server timed out waiting for the request.
Bases: hp3parclient.exceptions.ClientException
HTTP 414 - The URI provided was too long for the server to process.
Bases: hp3parclient.exceptions.ClientException
Bases: hp3parclient.exceptions.ClientException
HTTP 503 - The server is currently unavailable
Bases: hp3parclient.exceptions.ClientException
HTTP 418 - I’m a Tea Pot
Bases: hp3parclient.exceptions.ClientException
HTTP 401 - Unauthorized: bad credentials.
Bases: hp3parclient.exceptions.ClientException
Bases: hp3parclient.exceptions.ClientException
Bases: exceptions.Exception
Bases: hp3parclient.exceptions.ClientException
There was an ambiguous exception that occurred in Requests
Bases: exceptions.Exception
This is the basis for the SSH Exceptions.
Bases: hp3parclient.exceptions.SSHException
Bases: hp3parclient.exceptions.ClientException
The SSL certificate from the server could not be verified
Bases: hp3parclient.exceptions.SSHException
Bases: hp3parclient.exceptions.SSHException
Bases: hp3parclient.exceptions.ClientException
The request timed out
Bases: hp3parclient.exceptions.ClientException
Too many redirects
Bases: hp3parclient.exceptions.ClientException
A valid URL is required to make a request
HP3PAR 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. |
Bases: hp3parclient.client.HP3ParClient
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 |
---|
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. |
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. |
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. |
Assigns an IP address to a Virtual File Server.
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. |
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. |
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. |
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. |
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
}
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.
}
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.
}
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.
}
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.
}
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.
}
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.
}
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.
}
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 |
---|
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.
}
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. |
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. |
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. |
Remove a file share from File Services cluster.
PROTOCOLS
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Removes the network config of a Virtual File Server.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
Remove file store snapshots from File Services.
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. |
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. |
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. |
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. |
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. |
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. |
Modifies the network config of a Virtual File Server.
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. |
Modify a File Store.
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. |
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. |
Start or resume an on-demand reclamation task.
Parameters: |
|
---|---|
Returns: | List of strings. Lines of output from the CLI command. |
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. |
HTTPJSONRESTClient.
Author: | Walter A. Boring IV |
---|---|
Description: | This is the HTTP Client that is used to make the actual calls. It includes the authentication that knows the cookie name for 3PAR. |
Bases: object
An HTTP REST Client that sends and recieves JSON data as the body of the HTTP request.
Parameters: |
|
---|
This tries to create an authenticated session with the 3PAR server
Parameters: |
|
---|
Make an HTTP DELETE request to the server.
#example call
try {
headers, body = http.delete('/volumes/%s' % name)
} except exceptions.HTTPUnauthorized as ex:
print "Not logged in"
}
Parameters: | url (str) – The relative url from the 3PAR api_url |
---|---|
Returns: | headers - dict of HTTP Response headers |
Returns: | body - the body of the response. If the body was JSON, it will be an object |
Make an HTTP GET request to the server.
#example call
try {
headers, body = http.get('/volumes')
} except exceptions.HTTPUnauthorized as ex:
print "Not logged in"
}
Parameters: | url (str) – The relative url from the 3PAR api_url |
---|---|
Returns: | headers - dict of HTTP Response headers |
Returns: | body - the body of the response. If the body was JSON, it will be an object |
Make an HTTP POST request to the server.
#example call
try {
info = {'name': 'new volume name', 'cpg': 'MyCPG',
'sizeMiB': 300}
headers, body = http.post('/volumes', body=info)
} except exceptions.HTTPUnauthorized as ex:
print "Not logged in"
}
Parameters: | url (str) – The relative url from the 3PAR api_url |
---|---|
Returns: | headers - dict of HTTP Response headers |
Returns: | body - the body of the response. If the body was JSON, it will be an object |
Make an HTTP PUT request to the server.
#example call
try {
info = {'name': 'something'}
headers, body = http.put('/volumes', body=info)
} except exceptions.HTTPUnauthorized as ex:
print "Not logged in"
}
Parameters: | url (str) – The relative url from the 3PAR api_url |
---|---|
Returns: | headers - dict of HTTP Response headers |
Returns: | body - the body of the response. If the body was JSON, it will be an object |
This makes an HTTP Request to the 3Par server. You should use get, post, delete instead.
This turns on/off http request/response debugging output to console
Parameters: | flag (bool) – Set to True to enable debugging output |
---|