340 Commits

Author SHA1 Message Date
Jenkins
ca06a09d4d Merge "Fix volume transfers request commands" 2017-03-28 17:33:25 +00:00
Jenkins
dd81ca0692 Merge "Simplify logic around option lists in port set" 2017-03-27 17:33:23 +00:00
Dean Troyer
709eac73fb Fix volume transfers request commands
* Fix volume transfer request accept to actually not crash when
  trying to call Volume API.
* Fix volume transfer request accept syntax to have only one
  positional argument, which is the ID of the resource in the command
* Change the output column order in volume transfer request list to
  have ID followed by Name then the remaining columns.

Closes-bug: 1633582
Change-Id: I5cc005f039d171cc70859f60e7fe649b09ead229
2017-03-27 12:31:42 -05:00
Jenkins
2a64a64046 Merge "OSC Extension Show" 2017-03-23 20:30:15 +00:00
Sindhu Devale
832b2591cf OSC Extension Show
Implement Neutron feature of Extension Show into
OpenStack Client.

Change-Id: Ifecb794838cb3bf8c2466d178345349db3cd4003
Implements: blueprint extension-show
2017-03-22 16:39:19 +00:00
Jenkins
b5d707eb7b Merge "Support to add/remove multi users for "group add/remove user"" 2017-03-21 17:20:48 +00:00
Jenkins
6329c04297 Merge "OSC Quota List" 2017-03-21 03:56:05 +00:00
Jenkins
efc570dae2 Merge "OSC Network Flavor Profile" 2017-03-21 03:32:47 +00:00
Huanxuan Ao
ef5a7caf85 Support to add/remove multi users for "group add/remove user"
Similar delete commands in OSC, we can also support add/remove
multi users for one specified group, this review implement it.

Change-Id: I8ccf99d4ee83a18778fa3ff5c0a42bc7c6ff21fb
Implements: bp support-multi-add-remove
2017-03-21 10:39:42 +08:00
Jenkins
49e866174f Merge "Enable to specify which vm fixed-ip to publish" 2017-03-21 01:55:51 +00:00
Dean Troyer
82a86d2d58 Simplify logic around option lists in port set
Use a common pattern to handle option pairs --XYZ and --no-XYZ for managing
lists of attributes. This pattern looks at the presence of the option
in parsed_args first and branches as necessary.

Some specific steps are included for the SDK Network resources to reliably
set the 'dirty' flag for changed attributes via one or both of the following:
* iterate over lists of original resource attributes to force the creation
  of a new list object
* use [].extend() rather than += to add to the existing list (substitute
  {}.update() for dicts)

Change-Id: I0c3f9a52ffe1ae2b5b230cb13d6376dd9131aaf9
2017-03-20 16:55:48 -05: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
3e621c9a9c Merge "Introduce Neutron DHCP agent commands to OSC" 2017-03-20 21:31:53 +00:00
Jenkins
f16513aaf2 Merge "Make MAC address of port updatable" 2017-03-20 20:53:22 +00:00
Shashank Kumar Shankar
f4fd8f6e31 Introduce Neutron DHCP agent commands to OSC
This patch introduces neutron dhcp-agent related commands to OpenStack
client.

The equivalent neutron commands implemented in OSC:

neutron: dhcp-agent-list-hosting-net
OSC: network agent list --network

neutron: dhcp-agent-network-add
OSC: network agent add network

neutron: dhcp-agent-network-remove
OSC: network agent remove network

neutron: net-list-on-dhcp-agent
OSC: network list --agent

Change-Id: I77a933f4b3ce875c63cef5b6a32aee78fd844b03
2017-03-20 15:02:09 -04:00
Jenkins
9a1efd41c8 Merge "Non-Admin can't list own projects" 2017-03-20 17:58:38 +00:00
Jenkins
97a4ac471a Merge "Add extra filtering options to qos policy list" 2017-03-20 17:58:32 +00:00
Jenkins
495d013431 Merge "Adds missing flavor information in the server list long command" 2017-03-20 17:57:38 +00:00
Nakul Dahiwade
7ef1e9ea96 OSC Network Flavor Profile
Implement Neutron feature of Network Flavor Profile
into OpenstackClient
This patch implements the following commands:
network flavor profile create
network flavor profile delete
network flavor profile list
network flavor profile show
network flavor profile set

SDK Version needed: 0.9.9

Change-Id: Ie6fe5e53122cfb2eda8d326851d54562739a8386
Partially-Implements: blueprint neutron-client-flavors
2017-03-20 16:24:27 +00:00
Bence Romsics
f1345dc06f Make MAC address of port updatable
openstackclient does not allow the update of a port's MAC address.
However this is possible in neutron API (though by default policy
it is an admin-only operation). Allow it in openstackclient too.

Change-Id: Ibd9e0a6fbd1d0d461b8a8daee24dbb7c3f929df6
Closes-Bug: #1670707
2017-03-20 15:40:48 +00:00
adrian-turjak
49f6032b69 Non-Admin can't list own projects
Due to a default Keystone policy until Newtown,
and the use of resource_find, non-admins are unable
to list their own projects.

This patch bypasses this problem while also introducing better
UX for non-admins wishing to get their project list.

'openstack project list' retains the default of 'list all projects'
but on a forbidden error will default instead to 'list my projects'.
This way for non-admins 'list my projects' feels like the default
without breaking the expected admin default.

Adding the '--my-projects' option allows admins to easily list their
own projects or allows non-admins to be explicit and bypass the
forbidden error fallback.

Change-Id: I1021276f69fbbf28e13e17c4e567d932fce7ed8b
Closes-Bug: #1627555
2017-03-20 14:40:56 +13:00
Jenkins
6cae88fa2b Merge "Add a validation about options for server migrate command" 2017-03-16 15:52:50 +00:00
Jenkins
c1503492cd Merge "Fix "security group list" command to display project ID properly" 2017-03-16 13:02:17 +00:00
Jenkins
3d4750cdc8 Merge "Narrow expected responses for CheckUserInGroup" 2017-03-16 13:02:02 +00:00
Jenkins
9184e19288 Merge "Add sort support to project list" 2017-03-16 13:01:56 +00:00
Colleen Murphy
853ea5ab59 Narrow expected responses for CheckUserInGroup
When checking whether a given user is in a given group, keystone will
return a 404 Not Found if all went well but the user was not in the
group. It may also return a 403 if the user and the group are in
different backends, which would also mean that the user was not in the
group[1]. Any other 400 response is a client error and any 500 response
is a server error to which the user should be alerted.

Without this patch, openstackclient treats any exception as a valid "not
found" and may end up hiding server errors. This patch reduces the
caught exceptions to 403 and 404 responses and treats everything else as
an error.

[1] https://developer.openstack.org/api-ref/identity/v3/?expanded=check-whether-user-belongs-to-group-detail#check-whether-user-belongs-to-group

Closes-bug: #1672634

Change-Id: Id3f3b2409b7cee480ee3c19b6d6c3070599ffe8f
2017-03-14 09:23:19 +01:00
lvjiawei
9fd3dba11e Add extra filtering options to qos policy list
The patch adds filtering "--project", "--project-domain",
"--share", "--no-share" options to qos policy list.

Change-Id: I5c012fb27fb952f736ddc9fbc54ef6da4d0af5e0
Partially-Implements: blueprint network-commands-options
2017-03-14 13:04:47 +08: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
Huanxuan Ao
888022f8c0 Fix "security group list" command to display project ID properly
The "Project" column of the output of
"security group list" command is blank
since the new attribute name is "project_id"
not "tenant_id" in network resource, so change
it to display project IDs properly

Change-Id: Ie2a071afac3b5a8aaa2c6f1c50d44ae06905d916
Closes-bug: #1659967
2017-03-10 10:55:58 +08:00
Tom Jose Kalapura
6c1b03bf73 Add sort support to project list
Add sort support to project list by sorting items in the client side.
By default list will be sorted by name.

Change-Id: I00011406846b4003aff075eeeb88ac18fa5e2820
Closes-Bug: #1596818
2017-03-08 08:47:35 -08:00
Jenkins
37b5d0d45e Merge "command list: Move network meter appropriately" 2017-03-08 15:42:22 +00:00
Jenkins
dcb2de9db2 Merge "Add "--private-key" option for "keypair create"" 2017-03-08 02:51:48 +00:00
Akihiro Motoki
f4d3810c3e command list: Move network meter appropriately
'network meter' commands are not placed alphabetically
in the command list. It was due to the incorrect filename.

Trivial Fix

Change-Id: I7a76d3133915883cf41be8c7430def284d292d6e
2017-03-08 05:56:32 +09: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
Jenkins
69b7b9b059 Merge "Support --no-property in "volume set" command" 2017-03-06 03:47:49 +00:00
Jenkins
3ec0bc9179 Merge "Add Cinder v3 client support for volumes" 2017-03-01 19:10:48 +00:00
Jenkins
3816433b53 Merge "Auto allocated topology for OSC" 2017-03-01 18:03:19 +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
264f81f6fc Merge "Port set/unset SecGroup Bug Fix" 2017-02-27 17:18:00 +00:00
Jenkins
e5ee4b8ca3 Merge "Support list commands by group name keyword" 2017-02-27 03:47:11 +00:00
Ankur Gupta
9d946f0f45 Port set/unset SecGroup Bug Fix
Throwing error 'Port' object has no attribute 'security_groups'
Fix for set and unset.

Change-Id: I1a0625b5a432c7a91cf40249ce4f7c883f53d704
Closes-Bug: #1656788
2017-02-26 15:39:36 -05:00
Jens Rosenboom
f63a9f402d Fix output of ListSecurityGroupRule
The Ethertype column was always left empty because a wrong column name
was being used.

Change-Id: I7fc0f8d5eb7bac1efb234faba454dad0a45a7e6a
Closes-Bug: 1667699
2017-02-24 21:21:43 +01:00
zhiyong.dai
40ec7a9c96 Support --no-property in "volume set" command
Add "--no-property" option to "volume set" command in v1 and v2
and update the test cases.

Change-Id: Id5660f23b3b2d9aa72f4c16b19ce83f3f7ed2fa4
2017-02-23 21:49:11 +08:00
Huanxuan Ao
ef2a8f4d11 Revert unit tests for quota commands
quota set and quota show command have been fixed
by [1] [2], now can revert the unit test as well

[1] https://review.openstack.org/435574
[2] https://review.openstack.org/435735

Change-Id: I3d592df6ea4e96770dac4dba91819b5c4bcb0561
2017-02-23 20:44:28 +08:00
Rui Chen
0898ebacb8 Support list commands by group name keyword
The output of current "command list" is so long, it's
very difficult for users to find out the commands
they care about.

Add "--group <group-keyword>" option to filter the commands by group
name keyword, like: --group volume, list all openstack.volume.v2
(cinder) commands

That support the scenario that users need to know the current support
commands of some OpenStack services(nova, neutron, cinder and so on) in
OSC.

Change-Id: Id673042729ad36a0cac0b81fb31a3537c24f03fc
Closes-Bug: #1666780
2017-02-23 12:13:06 +08:00
Jenkins
c8435f2d5a Merge "Show openstacksdk version info in "module list"" 2017-02-22 22:51:28 +00:00
Ankur Gupta
1169434f42 Auto allocated topology for OSC
Implementation of Auto-allocated topology into OSC.
Dependency merged and released in SDK v. 0.9.11

Partially Implements: blueprint network-auto-allocated-topology

Change-Id: I16120910893b0b26b0f7f77a184b0378448458c5
2017-02-22 15:38:16 -05:00
Rui Chen
10f0300f70 Show openstacksdk version info in "module list"
openstacksdk bug/1588823 exist, no good way to add __version__ for
openstack module properly, fix the issue in osc side, make openstacksdk
module information be available.

Change-Id: I27ff61792443d1aa07f31598bed3aa32f924ff40
Partial-Bug: #1662058
2017-02-22 16:40:22 +08:00