HPLeftHand REST Client
Author: | Kurt Martin |
---|---|
Description: | This is the LeftHand/StoreVirtual Client that talks to the |
LeftHand OS REST Service.
This client requires and works with version 11.5 of the LeftHand firmware
This is useful for debugging requests to LeftHand
Parameters: | flag (bool) – set to True to enable debugging |
---|
This authenticates against the LH OS REST server and creates a session.
Parameters: |
|
---|---|
Returns: | None |
Get information about a Cluster
Parameters: | cluster_id (str) – The id of the cluster to find |
---|---|
Returns: | cluster |
Get information about a cluster by name
Parameters: | name (str) – The name of the cluster to find |
---|---|
Returns: | cluster |
Raises: | HTTPNotFound - NON_EXISTENT_CLUSTER - cluster doesn’t exist |
Get information about a server
Parameters: | server_id (str) – The id of the server to find |
---|---|
Returns: | server |
Raises: | HTTPServerError |
Get information about a server by name
Parameters: | name (str) – The name of the server to find |
---|---|
Returns: | server |
Raises: | HTTPNotFound - NON_EXISTENT_SERVER - server doesn’t exist |
Create a server by name
Parameters: |
|
---|
optional = {
'description' : "some comment",
'iscsiEnabled' : True,
'chapName': "some chap name",
'chapAuthenticationRequired': False,
'chapInitiatorSecret': "initiator secret",
'chapTargetSecret': "target secret",
'iscsiLoadBalancingEnabled': True,
'controllingServerName': "server name",
'fibreChannelEnabled': False,
'inServerCluster": True
}
Returns: | server |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_SERVER - server doesn’t exist |
Delete a Server
Parameters: | server_id – the server ID to delete |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_SERVER - The server does not exist |
Get information about a Snapshot
Returns: | snapshot |
---|---|
Raises: | HTTPServerError |
Get information about a snapshot by name
Parameters: | name – The name of the snapshot to find |
---|---|
Returns: | volume |
Raises: | HTTPNotFound - NON_EXISTENT_SNAP - shapshot doesn’t exist |
Create a snapshot of an existing Volume
Parameters: |
|
---|
optional = {
'description' : "some comment",
'inheritAccess' : false
}
Delete a Snapshot
Parameters: | snapshot_id – the snapshot ID to delete |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_SNAPSHOT - The snapshot does not exist |
Create a clone of an existing Shapshot
Parameters: |
|
---|
optional = {
'description' : "some comment"
}
Get the list of Volumes
Parameters: |
|
---|---|
Returns: | list of Volumes |
Get information about a volume
Parameters: |
|
---|---|
Returns: | volume |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - volume doesn’t exist |
Get information about a volume by name
Parameters: | name (str) – The name of the volume to find |
---|---|
Returns: | volume |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - volume doesn’t exist |
Find volumes that are exported to a server.
Parameters: | server_name (str) – The name of the server to search. |
---|---|
Returns: | A list of volumes that are on the specified server. |
Create a new volume
Parameters: |
|
---|
optional = {
'description': 'some comment',
'isThinProvisioned': 'true',
'autogrowSeconds': 200,
'clusterName': 'somename',
'isAdaptiveOptimizationEnabled': 'true',
'dataProtectionLevel': 2,
}
Returns: | List of Volumes |
---|---|
Raises: | HTTPConflict - EXISTENT_SV - Volume Exists already |
Delete a volume
Parameters: | name (str) – the name of the volume |
---|---|
Raises: | HTTPNotFound - NON_EXISTENT_VOL - The volume does not exist |
Modify an existing volume.
Parameters: | volume_id (str) – The id of the volume to find |
---|---|
Returns: | volume |
Raises: | HTTPNotFound - NON_EXISTENT_VOL - volume doesn’t exist |
Create a clone of an existing Volume
Parameters: |
|
---|
optional = {
'description' : "some comment"
}