hpe-storage / python-lefthandclient

A Python REST Client to talk to the HPE StoreVirtual / LeftHand OS REST Service
Apache License 2.0
4 stars 4 forks source link

Create volume should use clusterId not clusterID #3

Closed aorourkehp closed 9 years ago

aorourkehp commented 9 years ago

The JSON posted from createVolume is not in the proper format the LeftHand API expects it. It should be clusterId instead of clusterID. When using just clusterID, the following error is thrown: "Cluster ID or name MUST be specified when creating a volume and more than one cluster is defined in the managment group."

In createVolume the following is posted: info = {'name': name, 'clusterID': cluster_id, 'size': size}

The LeftHand API expects: info = {'name': name, 'clusterId': cluster_id, 'size': size}

clusterName is an optional parameter, that when provided to the LeftHand API, will look for the cluster via its name rather than ID. In the LeftHand driver, clusterName is provided which allows for the proper finding of the cluster. But if you call createVolume directly while providing only the mandatory parameters and not the optional ones, it fails.

hp-storage commented 9 years ago

Released in version 1.0.6