Este conteúdo não está disponível no idioma selecionado.

3.2. Resources


3.2.1. List Resources in a Collection using list

Use the list command to display all resources of a specific type. Lists also include optional search queries to filter results.
# list [collection][options]
Copy to Clipboard Toggle word wrap
Expand
Table 3.2. Options for list
Option Description
--show-all Displays all non-empty properties for each listed resource. Without this option, only the id, name and description properties display.
--query [QUERY] Filters the list using a server-side query based on Red Hat Storage Console's query language. For more information about search query language, refer to Appendix E.1. Search of the Red Hat Storage Console Administration Guide.
--kwargs [QUERY] Filters the list using a client-side query.
--case_sensitive true|false Toggle case sensitive searches for search queries.
--max Maximum number of results to display.

Note

Options specific to resource types are listed in the definition pages for each resource type.

Example 3.3. Examples for list

List clusters:
[RHSC shell (connected)]# list clusters
Copy to Clipboard Toggle word wrap
List clusters with all properties listed:
[RHSC shell (connected)]# list clusters --show-all
Copy to Clipboard Toggle word wrap
List clusters which are named default:
[RHSC shell (connected)]# list clusters --query name=Default
Copy to Clipboard Toggle word wrap

3.2.2. Show a Resource Using show

Use the show command to display resource properties as follows:
# show [resource][id|name][options]
Copy to Clipboard Toggle word wrap
Expand
Table 3.3. show standard options
Option Description
--id [UUID] Identify resource with the resource's UUID value.
--name [NAME] Identify resource with the name value.

Note

Options specific to resource types are listed in the definition pages for each resource type.

Example 3.4. Examples for show

Show clusters based on id:
[RHSC shell (connected)]# show cluster --id fcadfd5f-9a12-4a1e-bb9b-2b9d5c2e04c3
Copy to Clipboard Toggle word wrap
Show clusters based on name:
[RHSC shell (connected)]# show cluster --name TestCluster
Copy to Clipboard Toggle word wrap

3.2.3. Update a Resource Using update

Use the update command to modify an existing resource as follows:
# update [resource][id|name][options]
Copy to Clipboard Toggle word wrap

Note

Options specific to resource types are listed in the definition pages for each resource type.

Example 3.5. Examples for update

Update a cluster:
[RHSC shell (connected)]# update cluster TestCluster --name Cluster1
Copy to Clipboard Toggle word wrap

3.2.4. Remove a Resource Using remove

Use the remove command to remove a resource as follows:
# remove [resource][id|name] [options]
Copy to Clipboard Toggle word wrap
Expand
Table 3.4. Options for remove
Option Description
--async Perform an asynchronous removal of the resource.
--force Forcefully remove the resource. This removes all database entries and associations for a particular resource.

Note

Options specific to resource types are listed in the definition pages for each resource type.

Example 3.6. Examples for remove

Remove a cluster:
[RHSC shell (connected)]# remove cluster TestCluster
Copy to Clipboard Toggle word wrap
Asynchronous removal of a cluster:
[RHSC shell (connected)]# remove cluster TestCluster --async
Copy to Clipboard Toggle word wrap
Force remove host:
[RHSC shell (connected)]# remove host Node1 --force true
Copy to Clipboard Toggle word wrap

3.2.5. Perform Action on a Resource Using action

Certain actions can be performed on resources with CLI commands.

Example 3.7. Examples of Performing Actions on a Resource

Activate a host:
[RHSC shell (connected)]# action host Node1 activate
Copy to Clipboard Toggle word wrap
Deactivate a host:
[RHSC shell (connected)]# action host Node1 deactivate
Copy to Clipboard Toggle word wrap

3.2.6. Using Sub-Resources with --RESOURCE-identifier

Certain resources act as sub-resources of other resources. This means there is a dependent relationship between the sub-resource and its parent resource. Use the --RESOURCE-identifier [name] option, where RESOURCE is the parent resource type used to target its sub-resource.

Example 3.8. Examples of Creating Sub-resources with add

To create a distributed volume:
RHSC shell (connected)]# add glustervolume --cluster-name TestCluster --name vol1 --volume_type DISTRIBUTE --bricks-brick "brick.server_id=35cfcaa5-1b1e-4be7-
b87d-5a018ea98d98,brick.brick_dir=/home/brickInfo/b10" --bricks-brick "brick.server_id=35cfcaa5-1b1e-4be7b87d-5a018ea98d98,brick.brick_dir=/home/brickInfo/b20"
Copy to Clipboard Toggle word wrap
Note the use of the --cluster-name option. This adds a Red Hat Storage volume to the cluster called TestCluster.
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat