2

With Openstack Nova CLI I could set or get instance metadata with 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 ?

Dan Cornilescu
  • 6,780
  • 2
  • 21
  • 45
RuBiCK
  • 305
  • 1
  • 13

1 Answers1

1

Just browsing through the available options, it looks like the nova meta actions may be available as openstack server set:

$ 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)

E.g., if I run:

openstack server set myserver --property foo=bar

And then run:

openstack server show myserver

I see:

[...]
| properties                           | foo='bar'                                                |
[...]
larsks
  • 823
  • 5
  • 8