POST api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes HTTP/1.1
Accept: application/xml
Content-type: application/xml
<gluster_volume>
<name>data</name>
<volume_type>DISTRIBUTE</volume_type>
<bricks>
<brick>
<server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id>
<brick_dir>/export/data/brick1</brick_dir>
</brick>
<brick>
<server_id>de173e6a-fb05-11e1-a2fc-0050568c4349</server_id>
<brick_dir>/export/data/brick2</brick_dir>
</brick>
</bricks>
</gluster_volume>
POST api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes HTTP/1.1
Accept: application/xml
Content-type: application/xml
<gluster_volume>
<name>data</name>
<volume_type>DISTRIBUTE</volume_type>
<bricks>
<brick>
<server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id>
<brick_dir>/export/data/brick1</brick_dir>
</brick>
<brick>
<server_id>de173e6a-fb05-11e1-a2fc-0050568c4349</server_id>
<brick_dir>/export/data/brick2</brick_dir>
</brick>
</bricks>
</gluster_volume>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
cURL command:
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHSC HOST] /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95 /glustervolumes -d "<gluster_volume><name>data</name><volume_type>DISTRIBUTE </volume_type><bricks><brick><server_id>fcb46b88-f32e-11e1-918a-0050568c4349 </server_id><brick_dir>/export/data/brick1 </brick_dir></brick><brick><server_id>de173e6a-fb05-11e1-a2fc-0050568c4349 </server_id><brick_dir>/export/data/brick2 </brick_dir></brick></bricks></gluster_volume>
"
The API returns the following representation of the newly created volume resource:
HTTP/1.1 201 Created
Content-Type: application/xml
<gluster_volume href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb" id="6c657343-7a9d-46f1-b9f2-209cd1a8aafb">
<actions>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/setoption" rel="setoption"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/resetoption" rel="resetoption"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/resetalloptions" rel="resetalloptions"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/rebalance" rel="rebalance"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/stoprebalance" rel="stoprebalance"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/start" rel="start"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/stop" rel="stop"/>
</actions>
<name>vol1</name>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/bricks" rel="bricks"/>
<cluster href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32" id="02b2bd03-5e54-45f9-9302-33a4ba96eb32"/>
<volume_type>distribute</volume_type>
<transport_types>
<transport_type>tcp</transport_type>
</transport_types>
<replica_count>0</replica_count>
<stripe_count>0</stripe_count>
<options/>
<status>
<state>down</state>
</status>
</gluster_volume>
HTTP/1.1 201 Created
Content-Type: application/xml
<gluster_volume href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb" id="6c657343-7a9d-46f1-b9f2-209cd1a8aafb">
<actions>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/setoption" rel="setoption"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/resetoption" rel="resetoption"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/resetalloptions" rel="resetalloptions"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/rebalance" rel="rebalance"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/stoprebalance" rel="stoprebalance"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/start" rel="start"/>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/stop" rel="stop"/>
</actions>
<name>vol1</name>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/6c657343-7a9d-46f1-b9f2-209cd1a8aafb/bricks" rel="bricks"/>
<cluster href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32" id="02b2bd03-5e54-45f9-9302-33a4ba96eb32"/>
<volume_type>distribute</volume_type>
<transport_types>
<transport_type>tcp</transport_type>
</transport_types>
<replica_count>0</replica_count>
<stripe_count>0</stripe_count>
<options/>
<status>
<state>down</state>
</status>
</gluster_volume>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow