This change enables to add/remove a specific port to/from a server using
the new commands:
openstack server add port <vm> <port>
openstack server remove port <vm> <port>
Closes-Bug: #1678137
Change-Id: I6ee57df089235ccc1fb9d38316bd484956b1134d
The Nova API responds with an validation error when a bdm is submitted
containing an empty volume_size. So instead omit that attribute when it
is empty.
Change-Id: Iba905fca8c440a03e828c20922f3b813bba3fa3a
Closes-Bug: 1677236
- Fix option-describe typos
- Correct option and envvar markup, for commands that are using the
reference form instead of the definition form or are marking up
option arguments as options
- Avoid duplicate commands
- Fix some invalid docstrings
- Fix some invalid indentation
- Disable the murano plugin, which has invalid docs
- Correct issues with- and track the network-topology spec
- Include API modules in docs
Change-Id: I3d5ed5e872540fe13f3e4bd5e9335829dc9a5226
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.
Change-Id: I504de69b2e64250740ebcab432042a16f966fdbe
Closes-Bug: #1674584
This change enables to specify which vm fixed-ip will be associated to a
floating ip using:
openstack server add floating ip <vm> <fip> --fixed-ip-address <ip>
Closes-Bug: #1624524
Change-Id: I2ddb68c5873bfed7293b0e661d1adbe111681136
OSC server event is similar to nova's instance action commands.
Server event is the event record that had been done on a server,
include: event type(create, delete, reboot and so on),
event result(success, error), start time, finish time and so on.
These are important information for server maintains.
Change-Id: I8111091f46a0d2755728d8f9d43cc0dfe8842d13
Closes-Bug: #1642030
Aim to specify the private key file to save when keypair
is created. That is a convenient way to save private key
in OSC interactive mode, avoid to copy CLI output, then
paste it into file.
Change-Id: I119d2f2a3323d17ecbe3de4e27f35e1ceef6e0a5
Closes-Bug: #1549410
The behavior of server migrate command are different depending on
whether user specify --live option or not.
server migrate command will call live migration API if user specify
--live option.
Ohterwise server migrate command will call migration(cold migration)
API.
Now then, "--block-migraiton" option and "--disk-overcommit" option
only affect live-migration.
But, openstackclient doesn't warn user if user specify these options
without "--live".
But, user can't recognize that specifying options are ignored.
This patch adds a validation that checks whether or not user specify
these options without "--live".
Change-Id: Ifa278abb23ecdba4b13f3742998359ac74eb7ad4
Closes-bug: #1662755
"auto" and "none" options was added into --nic argument of server create
command in patch https://review.openstack.org/#/c/412698/ , but that
don't work and raise internal error when execute command. The patch
fix that issue and add unit and functional tests.
Change-Id: Ia718c3bac0a5172a0cdbe9f0d97972a9346c1172
Co-Authored-By: Kevin_Zheng <zhengzhenyu@huawei.com>
Closes-Bug: #1663520
Novaclient has provided a public and unified method
get_console_url() to get console urls of server.
This change switches to use it.
Change-Id: Ie6b9d8cfc57a6943b5d64a4064e4bdd372cd8cd3
Depends-on: I36c6209b17ef453e1c2e47841daf41f81af471dc
Closes-Bug: #1654913
This patch adds support to overwrite/clear the flavor's
property using the new ``--no-property`` option in the
``flavor set`` command.
Change-Id: I873c96fcf223bbd638a19b908766d904a84e8431
Implements: blueprint allow-overwrite-set-options
Co-Authored By: zhiyong.dai@easystack.cn
Current compute_client.servers.create() relies on block_device_mapping
arg which is legacy[1]. "block_device_mapping" format require
device_name which is leads to hard-coded hack in --volume key handler
to KVM specific. "block_device_mapping_v2" format is more friendly
to hypervisiors.
Support of block_device_mapping_v2 appear in python-novaclient 2.16.0,
openstackclient require at least 2.29.0
Makes options --volume and --block-device-mapping work simultaneously.
Appends --block-device-mapping data even if --volume used.
After bug 1383338 only --volume was taken when both are used.
[1]http://docs.openstack.org/developer/nova/block_device_mapping.html
NOTE(dtroyer): I moved the new test_boot_from_volume() functional
test to Ie51b1c375c5940856ec76a5770df3c6bd18a3eba to test our
previous behaviour. The only changes required to support the new
behaviour should be that the empty_volume is now attached in that test.
Change-Id: I7bac3d870dd9ca404093142f8bce22a62e49180d
Closes-Bug: 1647406
Closes-Bug: 1497845
With the deprecation of the Nova proxy APIs in microversion 2.36 [1],
any operation that uses a microversion higher than 2.36 and works with
images will fail because the /images endpoint will return 404. This
patch updates openstackclient to query images using the image client
in places where previously the compute client was used.
[1] http://docs.openstack.org/developer/nova/api_microversion_history.html#id33
Change-Id: Ia66e44e530799ce6531922dcf6a84e38528c8725
Closes-bug: 1630161
The raw output in the command 'openstack server create'(also in show) is
used in display table directily. the item like
os-extended-volumes:volumes_attached and security_groups needs to convert.
the worry output:
os-extended-volumes:volumes_attached | [{u'id': u'c3525de9-1cbf-4ac8-8b7a-ca295c46633b'}]
security_groups | [{u'name': u'default'}]
Change-Id: Id9db251c315f989e1dc5b1b6231ab328014213e3
nova actually expects and uses swap size in MB, while in openstackclient
currently help states that swap must be specified in GB and passes this
value to nova without changes.
Fix the help string.
Change-Id: I95f46246c072961ce77f818d80d75e6a51f728d0
Closes-Bug: #1656018
When a private flavor is created with ID auto (=default) and a project
is specified for it, instead of trying to add the project to the flavor
called "auto" the ID of the newly created project should be used.
Change-Id: I19f7a0ec26bd5d147f00ecba3312240e3601567e
Closes-Bug: 1654221
When creating server group, the '--policy' option is required, but
valid choice is 'affinity' or 'anti-affinity', adding multiple
policies will produce an error. This patch add choices and default
value for option '--policy', and remove the former help message.
Change-Id: I312680af384363b3e9a7de9aa1f0946643e193e2
Closes-Bug: #1662771
Leverage the new cliff command class attribute (_description)
to get the help of a command, this allows us to mark strings
for translation. We could not do this before since the help
was grabbed from the docstring.
This also depends on a new release of cliff and a bump to the
minimum level in osc's requirements.
Closes-Bug: 1636209
Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da
Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f
Support --long option and more columns in output of hypervisor
list command, including 'Hypervisor Type', 'Host IP', 'State',
and 'vCPU Used', 'vCPUs', 'Memory MB Used', 'Memory MB' with
--long option.
Change-Id: I0c790c7835309dded03e230cf497168e19404537
Closes-Bug: #1637074
Currently, --shared-migration and --block-migration options effects are
reversed: --block-migration requests a migration with share,
--shared-migration a block-migration.
This change corrects OSC implementation and clarifies arguments passed
to novaclient (the root cause of the bug).
Change-Id: Ib682cff0c44d3b1304670f8606907b1762d8b1e7
Closes-Bug: #1518059
Ref:https://review.openstack.org/#/c/311653/
We should use 2.1 as the default nova version now
The API_MIN_VERSION of novaclient has already changed to 2.1
Change-Id: I9ff16cf052556e5d3756f81e02a8e76e8f315df5
Closes-bug: #1588171
Supporting "--no-property" option will apply user a convenience
way to clean all properties of aggregate in a short command,
and this kind of behavior is the recommended way to devref.
The patch add "--no-property" option in "aggregate set" command,
and update related test cases and devref document.
Change-Id: I7614a23c0db05144562330dc600dbab7d003d5d8
Implements: blueprint support-no-property-in-aggregate
Currently SshServer ("server ssh" command) raises an AttributeError if
no explicit login is provided because it uses an attribute which no more
exists.
Change-Id: I86f68230037d51efb41aca62e07e058733ecd67a
Closes-Bug: #1624085
Some virt drivers such as ironic virt driver doesn't implement a
method to get host uptime. For such drivers, hypervisor show command
displays no information although these drivers provides other host
information.
This patch fixes the command to display hypervisor information in case
where a virt driver doesn't provide host uptime by ignoring a
HTTPNotImplemented exception.
Change-Id: I7bcca5862cd9c05aadaf6192cb80aa651cd77cad
Closes-Bug: 1612065
Hypervisor show command has a few bugs as follows.
- It doesn't trim an extra whitespace in the head of uptime
information.
- It doesn't display uptime information when the number of user is 1.
This patch fixes the regular expression to match uptime information.
Change-Id: Ic2f7fd9a9274466717084a0886f95f78e98a9007
Closes-Bug: 1611809
Convert to using ClientManager and OpenStackShell from osc-lib.
* Change all internal uses of ClientManager private attributes that are
now public in osc-lib's ClientManager. Leave back-compat copies in
place in OSC's clientManager so we don't break plugins.
* Put some work-arounds in place for changes in osc-lib that we need until
a new release makes it through the g-r and u-c change process.
* Add a test for Unicode decoding of argv in shell.main() to parallel
the one in osc-lib.
Change-Id: I85289740d4ca081f2aca8c9b40ec422ad25d302c
group to server
In AddServerSecurityGroup, we currently pass the security group
name to novaclient. If multiple security groups with same name
exist, then even while passing secuity group using id to
command 'openstack server add security group <server> <group>'
it results in error 'Multiple security_group matches found'.
Added unit test case to test the command.
Change-Id: I6097eb36e1545c85209cfd767c477e10f82c6999
Closes-Bug: 1604076