31 Commits

Author SHA1 Message Date
Jenkins
6329c04297 Merge "OSC Quota List" 2017-03-21 03:56:05 +00:00
Jenkins
49e866174f Merge "Enable to specify which vm fixed-ip to publish" 2017-03-21 01:55:51 +00:00
Cedric Brandily
f5527877bb Enable to specify which vm fixed-ip to publish
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
2017-03-20 22:33:51 +01:00
Jenkins
495d013431 Merge "Adds missing flavor information in the server list long command" 2017-03-20 17:57:38 +00:00
Jenkins
6cae88fa2b Merge "Add a validation about options for server migrate command" 2017-03-16 15:52:50 +00:00
Jose Castro Leon
429b43a331 Adds missing flavor information in the server list long command
Closes-Bug: #1672396

Change-Id: Ie2a664fd1c3db1b8269ea079df181f87afc702a7
2017-03-13 16:32:15 +01:00
Sindhu Devale
58591d3c37 OSC Quota List
Implement Neutron feature of Quota List into
OpenStack Client.

Change-Id: Idf941acf8d00b136776b7381b877c56d82622f57
Partially-Implements: blueprint neutron-client-quota
2017-03-10 14:59:47 +00:00
Jenkins
dcb2de9db2 Merge "Add "--private-key" option for "keypair create"" 2017-03-08 02:51:48 +00:00
Rui Chen
c03b9a871c Add server event list and show commands
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
2017-03-07 15:25:43 +08:00
Rui Chen
dee22d8faa Add "--private-key" option for "keypair create"
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
2017-03-06 08:34:28 +00:00
Rikimaru Honjo
7063ffb3ca Add a validation about options for server migrate command
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
2017-03-01 17:37:39 +09:00
Jenkins
477694db49 Merge "Use public and unified method get_console_url()" 2017-02-20 19:46:15 +00:00
Rui Chen
c051c5f090 Fix "server create" command failed when --nic auto or none
"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
2017-02-15 14:25:37 +08:00
huangtianhua
f891b6862f Use public and unified method get_console_url()
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
2017-02-14 03:22:03 +00:00
Jenkins
655e73683a Merge "Overwrite/Clear Flavor property" 2017-02-13 18:19:26 +00:00
Reedip
6a3c7c2a68 Overwrite/Clear Flavor property
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
2017-02-13 15:16:09 +00:00
Jenkins
d189e807fd Merge "Add options to "server list" command" 2017-01-26 06:38:27 +00:00
Nikita Gerasimov
95c8661f86 Switch server create to block_device_mapping_v2
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
2017-01-26 02:02:30 +00:00
jiahui.qiang
c46f9dc501 Add options to "server list" command
Add "--deleted" and "--changes-since" options to "server list" command.

Change-Id: Id94f6e5831a60b172b6cfcfca29b1d89de8db621
Closes-Bug:#1647242
2017-01-25 21:31:45 +00:00
Artom Lifshitz
98f803e0f0 Use image client for images instead of compute
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
2017-01-24 16:56:35 +00:00
Jens Rosenboom
d8749f9148 Fix creating a private flavor with ID auto
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
2017-01-05 15:58:47 +01:00
jiahui.qiang
7b1febf47f Add unit tests for usage commands in compute v2
Add unit tests and fakes for command below in compute v2:
usage list
usage show

Change-Id: Ie533e23375ca6b8ba4cb7e865d39fac652cc0195
2016-12-26 03:05:37 +00:00
jiahui.qiang
747ec5b897 Add unit tests for server create in computev2
Unit tests for server create is not completed. Some of the code in
take_action has not been tested.

Change-Id: Ifd3f42400408d3437e0bc6cd42acbb6db861b1f3
2016-11-28 23:24:22 +08:00
zhiyong.dai
26a74d4596 Add choices for option '--policy'
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
2016-11-27 15:32:28 +08:00
Yan Xing'an
8ca1cc6370 Add --long option and more columns to the hypervisor list command
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
2016-10-27 04:33:47 -07:00
Anne Gentle
5055074db0 Adds information about private key generation for instance access
- Also updated the help text in the command itself.

Change-Id: Ib3d4f94ef415a3f12024d0d7c000d2de20de001b
Partial-Bug: 1549410
2016-10-25 08:51:20 +02:00
Rui Chen
6371556916 Support "--no" option in aggregate set
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
2016-09-24 15:59:13 +08:00
qtang
bc222e97b1 Replace 'MagicMock' with 'Mock'
Change-Id: I7aeceede6bd3cb88cf04f398454f9758dbee20f1
Closes-Bug: #1475722
2016-09-14 17:59:31 +08:00
Hironori Shiina
98bafda7e9 Display hypervisor information without uptime
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
2016-09-11 21:58:55 +09:00
Hironori Shiina
d6f99b721d Fix regular expression for uptime in hypervisor show
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
2016-09-11 21:48:23 +09:00
Steve Martinelli
39839def2e move unit tests to new "unit" test module
this will better isolate the unit tests from the functional tests.
unfortunately, the "integration" tests had to be lumped into the
"unit" tests since we need the separation in testr.conf

Change-Id: Ifd12198c1f90e4e3c951c73bfa1884ab300d8ded
2016-09-08 15:19:50 -07:00