Cloud Server Tags
Tags are labels that can be added to cloud servers. With tags you can:
- add additional information about the server: image, configuration, purpose of the server, the environment in which the server is used, and other attributes;
- filter the servers in the list.
You can add a tag to to an existing cloud server or at server creation.
Limitations
The maximum number of tags for one cloud server is 10.
You can't change an added tag — you have to tag and add a new one.
Add a tag to an existing cloud server
Control panel
OpenStack CLI
-
In control panel from the top menu, press Products and select Cloud servers.
-
Open the tab Servers.
-
If tags have not yet been added to the server, in the menu of the server select Add tags.
-
If tags are added, in the menu of the server select Change tags.
-
Enter the name of the tag. The maximum length of the tag is 60 characters. You can use Latin or Cyrillic characters, numbers and hyphens.
-
Click .
-
Click Save.
-
Add a tag to the server:
openstack server set --tag <tag_name> --os-compute-api-version 2.26 <server>
Specify:
<tag_name>
— tag name;<server>
— ID or server name. The list of servers can be viewed using the commandopenstack server list
.
Filter servers by tag
Control panel
OpenStack CLI
-
В control panels from the top menu, press Products and select Cloud servers.
-
Open the tab Servers.
-
To see a list of servers with a tag, click on the tag in the list. You can filter the list of servers by multiple tags.
-
Filter the servers:
- check out the list of servers with the tag:
openstack server list --tags <tag_name> --os-compute-api-version 2.26
- or look at the list of servers without the tag:
openstack server list --not-tags <tag_name> --os-compute-api-version 2.26
Specify
<tag_name>
— tag name.
Delete tag
Control panel
OpenStack CLI
You can delete any tag except the service tag Прерываемый
. If you need to make the server uninterruptible, change the server type.
-
В control panels from the top menu, press Products and select Cloud servers.
-
Open the tab Servers.
-
On the menu. of the server select Change tags.
-
In the tag list, tap .
-
Click Save.
-
Remove the tag:
openstack server unset --tag <tag_name> --os-compute-api-version 2.26 <server>
Specify:
<tag_name>
— tag name;<server>
— ID or server name. The list of servers can be viewed using the commandopenstack server list
.