Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
10.7. Sub-Collections
10.7.1. Networks Sub-Collection Link kopierenLink in die Zwischenablage kopiert!
10.7.1.1. Networks Sub-Collection Link kopierenLink in die Zwischenablage kopiert!
networks sub-collection. Every host within a cluster connects to these associated networks.
network sub-collection is the same as a standard network resource except for the following additional elements:
| Element | Type | Description | Properties |
|---|---|---|---|
cluster id= | relationship | A reference to the cluster of which this network is a member. |
|
required | Boolean | Defines required or optional network status. | |
display | Boolean | Defines the display network status. Used for backward compatibility. | |
usages | complex | Defines a set of usage elements for the network. Users can define networks as VM and DISPLAY networks at this level. |
networks sub-collection with the standard REST methods. POSTing a network id or name reference to the networks sub-collection associates the network with the cluster.
Example 10.6. Associating a network resource with a cluster
PUT request.
Example 10.7. Setting the display network status
PUT request to specify the Boolean value (true or false) of the required element.
Example 10.8. Setting optional network status
DELETE request to the appropriate element in the collection.
Example 10.9. Removing a network association from a cluster
DELETE /ovirt-engine/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks/da05ac09-00be-45a1-b0b5-4a6a2438665f HTTP/1.1 HTTP/1.1 204 No Content
DELETE /ovirt-engine/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks/da05ac09-00be-45a1-b0b5-4a6a2438665f HTTP/1.1
HTTP/1.1 204 No Content
10.7.2. Storage Volumes Sub-Collection Link kopierenLink in die Zwischenablage kopiert!
10.7.2.1. Red Hat Gluster Storage Volumes Sub-Collection Link kopierenLink in die Zwischenablage kopiert!
glustervolumes sub-collection.
glustervolumes sub-collection is defined using the following elements:
| Element | Type | Description | Properties |
|---|---|---|---|
volume_type | enumerated | Defines the volume type. See the capabilities collection for a list of volume types. |
|
bricks | relationship | The sub-collection for the Red Hat Gluster Storage bricks. When creating a new volume, the request requires a set of brick elements to create and manage in this cluster. Requires the server_id of the Red Hat Gluster Storage server and a brick_dir element for the brick directory |
|
transport_types | complex | Defines a set of volume transport_type elements. See the capabilities collection for a list of available transport types. |
|
replica_count | integer | Defines the file replication count for a replicated volume. |
|
stripe_count | integer | Defines the stripe count for a striped volume |
|
options | complex | A set of additional Red Hat Gluster Storage option elements. Each option includes an option name and a value. |
|
Example 10.10. An XML representation of a Red Hat Gluster Storage volume
POST request with the required name, volume_type and bricks to the sub-collection.
Example 10.11. Creating a Red Hat Gluster Storage volume
DELETE request.
Example 10.12. Removing a Red Hat Gluster Storage volume
DELETE /ovirt-engine/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/e199f877-900a-4e30-8114-8e3177f47651 HTTP/1.1 HTTP/1.1 204 No Content
DELETE /ovirt-engine/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/e199f877-900a-4e30-8114-8e3177f47651 HTTP/1.1
HTTP/1.1 204 No Content
Important
glustervolumes sub-collection cannot be updated.
10.7.2.2. Bricks Sub-Collection Link kopierenLink in die Zwischenablage kopiert!
glustervolumes sub-collection contains its own bricks sub-collection to define individual bricks in a Red Hat Gluster Storage volume. Additional information can be retrieved for GET requests using the All-Content: true header.
bricks sub-collection is defined using the following elements:
| Element | Type | Description | Properties |
|---|---|---|---|
server_id | string | A reference to the Red Hat Gluster Storage server. |
|
brick_dir | string | Defines a brick directory on the Red Hat Gluster Storage server. |
|
replica_count | integer | Defines the file replication count for the brick in the volume. |
|
stripe_count | integer | Defines the stripe count for the brick in the volume |
|
POST request with the required server_id and brick_dir to the sub-collection.
Example 10.13. Adding a brick
DELETE request.
Example 10.14. Removing a brick
DELETE /ovirt-engine/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/e199f877-900a-4e30-8114-8e3177f47651/bricks/0a473ebe-01d2-444d-8f58-f565a436b8eb HTTP/1.1 HTTP/1.1 204 No Content
DELETE /ovirt-engine/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/e199f877-900a-4e30-8114-8e3177f47651/bricks/0a473ebe-01d2-444d-8f58-f565a436b8eb HTTP/1.1
HTTP/1.1 204 No Content
Important
bricks sub-collection cannot be updated.
10.7.2.3. Actions Link kopierenLink in die Zwischenablage kopiert!
10.7.2.3.1. Start Action Link kopierenLink in die Zwischenablage kopiert!
start action makes a Gluster volume available for use.
Example 10.15. Starting a Volume
force Boolean element to force the action for a running volume. This is useful for starting disabled brick processes in a running volume.
10.7.2.3.2. Stop Action Link kopierenLink in die Zwischenablage kopiert!
stop action deactivates a Gluster volume.
Example 10.16. Stopping a Volume
force Boolean element to brute force the stop action.
10.7.2.3.3. Set Option Action Link kopierenLink in die Zwischenablage kopiert!
setoption action sets a volume option.
Example 10.17. Set an option
10.7.2.3.4. Reset Option Action Link kopierenLink in die Zwischenablage kopiert!
resetoption action resets a volume option.
Example 10.18. Reset an option
10.7.2.3.5. Reset All Options Action Link kopierenLink in die Zwischenablage kopiert!
resetalloptions action resets all volume options.
Example 10.19. Reset all options
10.7.3. Affinity Groups Sub-Collection Link kopierenLink in die Zwischenablage kopiert!
10.7.3.1. Affinity Group Sub-Collection Link kopierenLink in die Zwischenablage kopiert!
affinitygroups sub-collection is defined using the following elements:
| Element | Type | Description | Properties |
|---|---|---|---|
name | string | A plain text, human readable name for the affinity group. |
|
cluster | relationship | A reference to the cluster to which the affinity group applies. | |
positive | Boolean: true or false | Specifies whether the affinity group applies positive affinity or negative affinity to virtual machines that are members of that affinity group. | |
enforcing | Boolean: true or false | Specifies whether the affinity group uses hard or soft enforcement of the affinity applied to virtual machines that are members of that affinity group. |
Example 10.20. An XML representation of a virtual machine affinity group
POST request with the required name attribute.
Example 10.21. Creating a virtual machine affinity group
DELETE request.
Example 10.22. Removing a virtual machine affinity group
DELETE https://XX.XX.XX.XX/ovirt-engine/api/clusters/00000000-0000-0000-0000-000000000000/affinitygroups/00000000-0000-0000-0000-000000000000 HTTP/1.1 HTTP/1.1 204 No Content
DELETE https://XX.XX.XX.XX/ovirt-engine/api/clusters/00000000-0000-0000-0000-000000000000/affinitygroups/00000000-0000-0000-0000-000000000000 HTTP/1.1
HTTP/1.1 204 No Content


