2137 Commits

Author SHA1 Message Date
Richard Theis
bac9fb18c1 Refactor security group set to use SDK
Refactored the 'os security group set' command to use the SDK
when neutron is enabled, but continue to use the nova client
when nova network is enabled.

This patch set also fixes a compute bug which ignores name
and description when set to an empty value.

Change-Id: I4225179dca4aedf799e1656ec49236bdedc5e9bd
Partial-Bug: #1519511
Implements: blueprint neutron-client
2016-03-03 06:33:15 -06:00
Jenkins
f9add0559c Merge "Devref: Options with Choices" 2016-03-01 23:51:21 +00:00
Jenkins
77f2e98466 Merge "Clean up unnecessary import of urlparse module" 2016-03-01 23:51:00 +00:00
Jenkins
594d98431c Merge "Fix regression in interactive client mode" 2016-03-01 16:13:42 +00:00
Richard Theis
fbe5dc657b Devref: Options with Choices
Add a developer reference for options with choices. This patch set
also includes RST doc formatting fixes.

Change-Id: I5fd6a699806edf1d2d95110f0b8a2b8a385028ab
2016-03-01 09:31:43 -06:00
Jenkins
15d3b6f317 Merge "Fix 'code-block' tag format issues" 2016-03-01 15:17:21 +00:00
Jenkins
2ae7072ea6 Merge "Trivial: Update image_list v2 docs" 2016-03-01 15:03:28 +00:00
Yang Hongyang
059f54eee4 Clean up unnecessary import of urlparse module
six.moves.urllib already covers the py2 and py3 compatibility issues
of urlparse module, use six.moves.urllib.parse.urlparse is enough.

Change-Id: I785f4f872850e5d770fdcf4c0d3392be3978cc4a
2016-03-01 22:06:53 +08:00
Jenkins
31ff21c511 Merge "add a checklist for creating a new plugin" 2016-03-01 13:16:21 +00:00
Yang Hongyang
8b17a1fa5b Trivial: Update image_list v2 docs
This api doc is clearly copied from v1, we should update it to reflact v2 API.
Added 'shared' param description.

Change-Id: I73d36e3a2a0448c28edab788a9340fd46177f8ef
2016-03-01 18:48:09 +08:00
Dina Belova
8a839ad8b8 Fix regression in interactive client mode
Fix typo introduced in OSprofiler intergation commit, that
leaded to non-working interactive mode of the CLI client.

Change-Id: If5dfc90dbbe64d4665c3e33e936f0cc674738351
Closes-Bug: 1551160
2016-03-01 13:45:19 +03:00
Jenkins
11490b79f4 Merge "TrivialOrder: Rearrange Class Names" 2016-03-01 10:09:07 +00:00
Rui Chen
c832e2a771 Fix 'code-block' tag format issues
Modify 'code-block' tag format so that the following python code
could be showed exactly, and reformat the more than 79 chars of lines.

Change-Id: Ic6721e4cc8f4c7a3e4a7c7dbd63d9089180cdc33
2016-03-01 08:48:47 +00:00
Jenkins
fa998d641d Merge "Fix return value of "image set" command" 2016-03-01 08:29:33 +00:00
Jenkins
d91e104670 Merge "Make SetAggregate inherit from cliff.Command" 2016-03-01 08:29:04 +00:00
Jenkins
53812170fe Merge "Trivial: Reorder flavor op order in flavor.py" 2016-03-01 07:40:48 +00:00
Jenkins
2ecbb738ef Merge "Refactor security group list to use SDK" 2016-03-01 07:18:10 +00:00
reedip
a1f2f4af58 TrivialOrder: Rearrange Class Names
As per the comment given by Steve Martinelli in
https://review.openstack.org/#/c/278209/ , the
following patch just rearranges the classes
as per the Alphabetical order.

TrivialFix

Change-Id: Ib8f0f703df4ef7d7ee6180ff8bd8a47062ae5b0f
2016-03-01 16:11:51 +09:00
Jenkins
0dfc50ea1c Merge "fix: Exception message includes unnecessary class args" 2016-03-01 07:03:17 +00:00
Jenkins
1299319b76 Merge "Subnet: Add "subnet delete" command using SDK" 2016-03-01 07:03:10 +00:00
Steve Martinelli
3f95e2dd05 add a checklist for creating a new plugin
includes steps for both infra and osc changes.

Change-Id: I35ae2eb29cff87f5c971e64badd2927fc9a59bf4
2016-03-01 06:06:59 +00:00
Jenkins
7039cd3447 Merge "Make SetAgent inherit from cliff.Command" 2016-03-01 04:30:34 +00:00
Jenkins
3af46b1308 Merge "Trivial: Reorder unit tests in test_type.py" 2016-03-01 03:41:01 +00:00
Yang Hongyang
37c0e57d11 Trivial: Reorder flavor op order in flavor.py
Classes should be in alphabetical order.

Change-Id: I7a35c3a2dd6d36c49f0d54dec5c14609a9168bd0
2016-03-01 11:21:47 +08:00
reedip
88c92bf71a Subnet: Add "subnet delete" command using SDK
This patch adds "subnet delete" command to osc using sdk.

Change-Id: I6be27406b16909c6db2b95417355be302e218a8d
Implements: blueprint neutron-client
Closes-bug: #1542362
2016-03-01 11:26:27 +09:00
Jenkins
3372de6f3b Merge "take_action() method from command.Command shouldn't return" 2016-02-29 23:28:40 +00:00
Jas
b8d72cee27 fix: Exception message includes unnecessary class args
Fix misusages of ArgumentTypeError which causes a tuple of
class instance and error message string to be printed rather than just the
error message string itsself.

Change-Id: I0e997f86bb6603930cc92e90efcb48155f62ffb5
Closes-bug: #1551426
2016-02-29 16:06:05 -06:00
Richard Theis
842882f3cb Refactor security group list to use SDK
Refactored the 'os security group list' command to use the SDK
when neutron is enabled, but continue to use the nova client
when nova network is enabled.

This refactor also removes the logic for displaying project names
instead of project IDs when the --all-projects option is specified.
This logic was removed because it is inconsistent with the other
network commands.

Since neutron will always display security groups across all
projects for an admin, the --all-projects option is now hidden
when neutron is enabled and the Project column is always
displayed.

Change-Id: I934a1f5084ef3c5f929d0ffd38ebf5064d799941
Partial-Bug: #1519511
Related-to: blueprint neutron-client
2016-02-29 14:46:57 -06:00
Jenkins
5310cfb8b7 Merge "Make SetSecurityGroup inherit from cliff.Command" 2016-02-29 18:38:38 +00:00
Jenkins
8a3fc6c343 Merge "Make SetFlavor and UnsetFlavor inherit from cliff.Command" 2016-02-29 18:37:44 +00:00
Jenkins
60345b7933 Merge "[Compute] Check return value is None in compute unit tests." 2016-02-29 18:37:36 +00:00
Mohan Muppidi
3d7430463c take_action() method from command.Command shouldn't return
command.Command and command.Showone are base classes implemented
in cliff framework. Showone extends Command to allow take_action()
to return data to be formatted using a user-selectable formatter.
Most of the classes which are extended from Command in
openstackclient/identity/v3/ in some cases return data or return
nothing where it is not necessary, this commit fixes most of them.

Change-Id: I84c72ea4d6680f8bdbef5449316dd9a8af8c8286
Closes-Bug: 1550892
2016-02-29 17:23:29 +00:00
Tang Chen
a253217fc2 Trivial: Reorder unit tests in test_type.py
Unit test classes should be in alphabetical order.

Change-Id: Ie741e1c170d8cc361d95d036115d0952e5108088
2016-02-29 16:58:14 +08:00
Tang Chen
61c1d985c7 Fix return value of "image set" command
"image set" command should return None. But in one path,
it returns ({}, {}). This patch fixes this.

Change-Id: I3847e661cb7e89863921a3f0a859d9b1a8077ede
2016-02-29 16:18:55 +08:00
Tang Chen
058232b999 [Compute] Check return value is None in compute unit tests.
take_action() in commands inheriting from Command returns nothing.
So we should assert the return is None in the unit tests of
these commands.

Change-Id: I953480ecff3b5beb12255d866d0e1df45f130efd
Partial-Bug: #1550636
2016-02-27 15:38:04 +08:00
Tang Chen
01c19ef0bc Router: Add --route and --clear-routes options to "router set" command
--route option is used to set routes to the router.

It is used like this:

    --route destination=subnet,gateway=ip-address

destination: destination subnet CIDR
gateway: nexthop IP address

--clear-routes is used to clear all routes on the router.

Change-Id: I97ce4871113c684b29c98cdad4dec9cc80ed20f7
Implements: blueprint neutron-client
Partial-bug: #1519503
2016-02-27 04:53:10 +08:00
Tang Chen
ada06f4dc3 Add MultiKeyValueAction to custom parser action
Class MultiKeyValueAction will be used to parse arguments like this:

--route destination=xxx,gateway=xxx --route destination=yyy,gateway=yyy

The result is a list like this:

[{destination:xxx, gateway:xxx}, {destination:yyy, gateway:yyy}]

This action also contain validation of the parameters.

Change-Id: Ie3aa8635c6a13fc2e429fe6922acd681dc7244cf
2016-02-27 03:53:32 +08:00
Tang Chen
ba826fa04f Make SetAggregate inherit from cliff.Command
set/unset comamnd classes should inherit from cliff.Command class.

Also, this patch adds functional tests for aggregate.

And also, use utils.format_dict() to format the output of the
properties dict.

Change-Id: Idb50bef8990da95666960e2414dfd7c9be234bba
Partial-bug: #1519503
Closes-Bug: 1546065
2016-02-27 03:50:47 +08:00
Jenkins
2819450be5 Merge "Add shell --profile option to trigger osprofiler from CLI" 2016-02-26 19:49:21 +00:00
Tang Chen
9c91c1df41 Make SetAgent inherit from cliff.Command
set/unset command classes should inherit from cliff.Command class.

Also, this patch adds functional tests for compute agent.

Change-Id: I25eafffd1167f82aa0d430628c22dee7516b1e19
Partial-Bug: 1546065
2016-02-27 03:48:11 +08:00
Tang Chen
859bfaf875 Make SetSecurityGroup inherit from cliff.Command
set/unset comamnd classes should inherit from cliff.Command class.

Change-Id: Ie28711ac8823dc9eb13cf83877864ca436b928bc
Partial-Bug: 1546065
2016-02-27 03:47:57 +08:00
Tang Chen
f37eda3a27 Make SetFlavor and UnsetFlavor inherit from cliff.Command
set/unset comamnd classes should inherit from cliff.Command class.

Change-Id: I54e5608ac0768d7d94b7f7d516ea1948daefdc1b
Partial-Bug: 1546065
2016-02-27 03:46:30 +08:00
Jenkins
b5b5fdd78a Merge "Add missing command/configuration object" 2016-02-26 10:37:45 +00:00
Rui Chen
b733ecf3dd Add missing command/configuration object
Add missing 'command' and 'configuration' object into
command object list, add command, module, host commands
describe in command-objects, and add 'mask' and 'unmask'
options in configuration command details, fix some format
issues by the way.

Change-Id: Iea80c7b1e413e02e49b9090b9d3cb9c59aab4c38
2016-02-26 15:20:44 +08:00
OpenStack Proposal Bot
45d6c1fb1f Updated from global requirements
Change-Id: I582644850642651c61d259e4a53f670b421dce95
2016-02-26 02:01:44 +00:00
Jenkins
277c16c8b7 Merge "Defaults are ignored with flake8" 2016-02-26 01:59:47 +00:00
Jenkins
fbc03104f6 Merge "Floating IP: Neutron support for "ip floating show" command" 2016-02-25 21:15:47 +00:00
Jenkins
6176e802b3 Merge "Fixed a bunch of spacing" 2016-02-25 20:54:25 +00:00
Dina Belova
16f00833a7 Add shell --profile option to trigger osprofiler from CLI
This will allow to trigger profiling of various services that
allow it currently and which APIs support is added to openstackclient.
Cinder and Glance have osprofiler support already, Nova and Keystone
are in progress.

To use this functionality osprofiler (and its storage backend) needs
to be installed in the environment. If so, you will be able to trigger
profiling via the following command, for example:

$ openstack --profile SECRET_KEY user list

At the end of output there will be message with <trace_id>, and
to plot nice HTML graphs the following command should be used:

$ osprofiler trace show <trace_id> --html --out result.html

Related Keystone change: https://review.openstack.org/#/c/103368/
Related Nova change: https://review.openstack.org/#/c/254703/

The similar change to the keystoneclient
(https://review.openstack.org/#/c/255308/) was abandoned as new
CLI extenstions are not more accepted to python-keystoneclient.

Change-Id: I3d6ac613e5da70619d0a4781e5d066fde073b407
2016-02-25 20:13:27 +00:00
Jenkins
43957d602b Merge "Add python-searchlightclient to list of adopters." 2016-02-25 19:49:00 +00:00