이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 8. Clusters
The
clusters
collection provides information about clusters in a Red Hat Gluster Storage environment. An API user accesses this information through the rel="clusters"
link obtained from the entry point URI (see Chapter 5, Entry Point).
The following table shows specific elements contained in a cluster resource representation.
Element | Type | Description | Properties |
---|---|---|---|
link rel="networks" | relationship | A link to the sub-collection for networks associated with this cluster. | |
link rel="permissions" | relationship | A link to the sub-collection for cluster permissions. See Section 7.3.7, “Permissions”. | |
version major= minor= | complex | The compatibility level of the cluster. | ![]() |
supported_versions | complex | A list of possible version levels for the cluster. | ![]() |
gluster_service | boolean | defines whether gluster services are enabled on the cluster. Is always true in Red Hat Gluster Storage Console | |
virt_service | boolean | defines whether virtualization services are enabled on the cluster. Is always false in Red Hat Gluster Storage Console. |
Example 8.1. An XML representation of a cluster
Creation of a new cluster requires the
name
and server
elements. Identify the server
with id
attribute and name
element. name
element is mandatory. See Section 7.2.4, “Creating a Resource in a Collection” for more information.
Example 8.2. Creating a cluster
Example 8.3. Updating a cluster
Removal of a cluster requires a
DELETE
request.
Example 8.4. Removing a cluster
DELETE /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95 HTTP/1.1 HTTP/1.1 204 No Content
DELETE /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95 HTTP/1.1
HTTP/1.1 204 No Content
8.1. Networks Sub-Collection 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Networks associated with a cluster are represented with the
networks
sub-collection. Every host within a cluster connects to these associated networks.
The representation of a cluster's
network
sub-collection is the same as a standard network
resource with an additional cluster id=
to signify a relationship to the cluster and a display
element to represent the display network status in the cluster.
An API user manipulates the
networks
sub-collection as described in Chapter 7, Common Features. POST
ing a network id
or name
reference to the networks
sub-collection associates the network with the cluster.
Example 8.5. Associating a network resource with a cluster
The display network status is set using a
PUT
request to specify the Boolean value (true or false) of the display
element.
Example 8.6. Setting the display network status
An association is removed with a
DELETE
request to the appropriate element in the collection.
Example 8.7. Removing a network association from a cluster
DELETE /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks/da05ac09-00be-45a1-b0b5-4a6a2438665f HTTP/1.1
DELETE /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks/da05ac09-00be-45a1-b0b5-4a6a2438665f HTTP/1.1