patternMinor
openstack instance metadata
Viewed 0 times
instancemetadataopenstack
Problem
With Openstack Nova CLI I could set or get instance metadata with
Is it possible to work with instance metadata with the openstack client?
PS: Someone with privileges to create tags could create
nova meta set/get ... but with the openstack "all-in-one" CLI that option does not exist. Is it possible to work with instance metadata with the openstack client?
PS: Someone with privileges to create tags could create
openstack , openstack-nova and openstack-cli ?Solution
Just browsing through the available options, it looks like the
E.g., if I run:
And then run:
I see:
nova meta actions may be available as openstack server set:$ openstack help server set
usage: openstack server set [-h] [--name ] [--root-password]
[--property ] [--state ]
Set server properties
positional arguments:
Server (name or ID)
optional arguments:
-h, --help show this help message and exit
--name New server name
--root-password Set new root password (interactive only)
--property
Property to add/change for this server (repeat option
to set multiple properties)
--state New server state (valid value: active, error)E.g., if I run:
openstack server set myserver --property foo=barAnd then run:
openstack server show myserverI see:
[...]
| properties | foo='bar' |
[...]Code Snippets
$ openstack help server set
usage: openstack server set [-h] [--name <new-name>] [--root-password]
[--property <key=value>] [--state <state>]
<server>
Set server properties
positional arguments:
<server> Server (name or ID)
optional arguments:
-h, --help show this help message and exit
--name <new-name> New server name
--root-password Set new root password (interactive only)
--property <key=value>
Property to add/change for this server (repeat option
to set multiple properties)
--state <state> New server state (valid value: active, error)openstack server set myserver --property foo=baropenstack server show myserver[...]
| properties | foo='bar' |
[...]Context
StackExchange DevOps Q#1769, answer score: 1
Revisions (0)
No revisions yet.