Add SolidFire Data Store
To add a SolidFire data store, use the following request:
POST /settings/data_stores.xml
POST /settings/data_stores.json
XML Request Example
curl -i -X POST -u user:userpass --url http://onapp.test/settings/data_stores.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<data_store><label>API_SF_test_xml</label><ip>10.98.0.101</ip><data_store_type>solidfire</data_store_type><enabled>1</enabled><data_store_size>40</data_store_size><local_hypervisor_id></local_hypervisor_id><data_store_group_id>5</data_store_group_id><iscsi_ip>10.99.99.101</iscsi_ip><admin_attributes><username>onapp</username><password>password</password></admin_attributes><account_attributes><username>onapp</username><initiator_secret>ttttt123456790</initiator_secret><target_secret>ttttt123456780</target_secret></account_attributes></data_store>'
JSON Request Example
curl -i -X POST -u user:userpass --url http://onapp.test/settings/data_stores.json -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"data_store":{"label":"API_SF_test_json","ip":"10.98.0.101","data_store_type":"solidfire","enabled":"1","data_store_size":"40","local_hypervisor_id":"","data_store_group_id":"5","iscsi_ip":"10.99.99.101", "admin_attributes":{"username":"onapp", "password":"password"}, "account_attributes":{"username":"onapp", "initiator_secret":"ttttt123456790", "target_secret":"ttttt123456780"}}}'
Where:
label* - the data store name
data_store_group* - the group to which this DS is assigned
ip* - the data store IP
enabled* - set 1 if data store is enabled, otherwise set 0
data_store_size* - set size in GB
data_store_type - set solidfire data store type
local_hypervisor_id - ID of a local compute resource
iscsi_ip - iSCSI IP address
admin_attributes - an array of cluster admin attributes:
- username - username for cluster authorization
- password - password for cluster authorization
account_attributes - an array of SolidFire account attributes:
- username - specify SolidFire account username
- initiator_secret - iSCSI initiator secret (optional)
- target_secret - iSCSI target secret (optional)
XML Output Example
<data_store> <created_at type="datetime">2012-11-16T11:47:18+00:00</created_at> <data_store_group_id type="integer">5</data_store_group_id> <data_store_size type="integer">40</data_store_size> <data_store_type>solidfire</data_store_type> <enabled type="boolean">true</enabled> <id type="integer">12</id> <identifier>onapp-ndnminre4r4r9h</identifier> <ip>10.98.0.101</ip> <iscsi_ip nil="true"/> <label>API_SF_test_xml</label> <local_hypervisor_id nil="true"/> <updated_at type="datetime">2012-11-16T11:47:18+00:00</updated_at> <zombie_disks_size type="integer">0</zombie_disks_size> <usage type="integer">40</usage> </data_store>