POST /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks HTTP/1.1
Accept: application/xml
Content-type: application/xml
<bricks>
<brick>
<server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id>
<brick_dir>/export/data/brick3</brick_dir>
</brick>
</bricks>
POST /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks HTTP/1.1
Accept: application/xml
Content-type: application/xml
<bricks>
<brick>
<server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id>
<brick_dir>/export/data/brick3</brick_dir>
</brick>
</bricks>
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] https://[RHSC HOST] /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95 /glustervolumes/83101900-2f12-4855-838e-36b8a9e04554 /bricks -d "<bricks><brick><server_id>fcb46b88-f32e-11e1-918a-0050568c4349 </server_id><brick_dir>/export/data/brick3 </brick_dir></brick></bricks>"
The API returns the following representation:
HTTP/1.1 201 Created
Content-Type: application/xml
<bricks>
<brick href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/0635fb7e-0da8-48ca-ae9c-72be85c36afa/bricks/5241646b-f7aa-4484-9c4a-be33ebf4f51d" id="5241646b-f7aa-4484-9c4a-be33ebf4f51d">
<actions>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/0635fb7e-0da8-48ca-ae9c-72be85c36afa/bricks/5241646b-f7aa-4484-9c4a-be33ebf4f51d/replace" rel="replace"/>
</actions>
<name>vm12.lab.eng.blr.redhat.com:/home/3</name>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/0635fb7e-0da8-48ca-ae9c-72be85c36afa/bricks/5241646b-f7aa-4484-9c4a-be33ebf4f51d/statistics" rel="statistics"/>
<port>49154</port>
<pid>26691</pid>
<device>/dev/mapper/vg_vm12-lv_root</device>
<mnt_options>rw</mnt_options>
<fs_name>ext4</fs_name>
<gluster_clients>
<gluster_client>
<host_name>10.70.36.84</host_name>
<client_port>1019</client_port>
<bytes_read>1260</bytes_read>
<bytes_written>900</bytes_written>
</gluster_client>
</gluster_clients>
<memory_pools>
<memory_pool>
<name>test-server:fd_t</name>
<hot_count>0</hot_count>
<cold_count>1024</cold_count>
<padded_size>108</padded_size>
<alloc_count>0</alloc_count>
<max_alloc>0</max_alloc>
<pool_misses>0</pool_misses>
<max_stdalloc>0</max_stdalloc>
</memory_pool>
...
</memory_pools>
<gluster_volume href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/0635fb7e-0da8-48ca-ae9c-72be85c36afa" id="0635fb7e-0da8-48ca-ae9c-72be85c36afa"/>
<server_id>411fd862-1469-4dff-ad5a-a7be364d83a6</server_id>
<brick_dir>/home/3</brick_dir>
<status>
<state>up</state>
</status>
</brick>
</bricks>
HTTP/1.1 201 Created
Content-Type: application/xml
<bricks>
<brick href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/0635fb7e-0da8-48ca-ae9c-72be85c36afa/bricks/5241646b-f7aa-4484-9c4a-be33ebf4f51d" id="5241646b-f7aa-4484-9c4a-be33ebf4f51d">
<actions>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/0635fb7e-0da8-48ca-ae9c-72be85c36afa/bricks/5241646b-f7aa-4484-9c4a-be33ebf4f51d/replace" rel="replace"/>
</actions>
<name>vm12.lab.eng.blr.redhat.com:/home/3</name>
<link href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/0635fb7e-0da8-48ca-ae9c-72be85c36afa/bricks/5241646b-f7aa-4484-9c4a-be33ebf4f51d/statistics" rel="statistics"/>
<port>49154</port>
<pid>26691</pid>
<device>/dev/mapper/vg_vm12-lv_root</device>
<mnt_options>rw</mnt_options>
<fs_name>ext4</fs_name>
<gluster_clients>
<gluster_client>
<host_name>10.70.36.84</host_name>
<client_port>1019</client_port>
<bytes_read>1260</bytes_read>
<bytes_written>900</bytes_written>
</gluster_client>
</gluster_clients>
<memory_pools>
<memory_pool>
<name>test-server:fd_t</name>
<hot_count>0</hot_count>
<cold_count>1024</cold_count>
<padded_size>108</padded_size>
<alloc_count>0</alloc_count>
<max_alloc>0</max_alloc>
<pool_misses>0</pool_misses>
<max_stdalloc>0</max_stdalloc>
</memory_pool>
...
</memory_pools>
<gluster_volume href="/api/clusters/02b2bd03-5e54-45f9-9302-33a4ba96eb32/glustervolumes/0635fb7e-0da8-48ca-ae9c-72be85c36afa" id="0635fb7e-0da8-48ca-ae9c-72be85c36afa"/>
<server_id>411fd862-1469-4dff-ad5a-a7be364d83a6</server_id>
<brick_dir>/home/3</brick_dir>
<status>
<state>up</state>
</status>
</brick>
</bricks>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow