1148 Commits

Author SHA1 Message Date
Jenkins
df235a00d1 Merge "Fix errors in `set/unset flavor` unit tests" 2016-06-14 19:18:21 +00:00
Dean Troyer
6357202971 Fix foundation copyrights
The OpenStack LLC copyrights date from before OpenStack was transferred
to the foundation.  These appear to be getting copy-pasted to new files
so at least should reflect the correct entity.

Change-Id: I02953d752cb24ead6aa4ad8bfe257a48317c9f13
2016-06-14 09:49:28 -05:00
Jenkins
b1bd427fcc Merge "osc-lib: timing" 2016-06-14 12:37:01 +00:00
Rui Chen
eccd943acc Support compute service force down/up
Aims to evacuate servers from compute host as soon as possible,
operators might set the compute service force down manually.
Novaclient support the behavior, this patch support it in OSC.

Change-Id: I22ff1c5d670c449771fdcb3f4f39cd82f428531a
Closes-Bug: #1589348
2016-06-14 17:40:09 +08:00
Tang Chen
c4b590748a Fix errors in `set/unset flavor` unit tests
1. We should assert flavor.set_keys() is called correctly
   or not called in ``set flavor`` unit tests.

2. Commit c7e6973ff50ff84af9ad55f7bdaeeea83ae40f0b from me
   removed test_flavor_unset_no_project which used to test
   if --project was specified as '', and assert CommandError
   was raised, which is incorrect. So I removed it. But after
   looking into the code, I think we should not remove it,
   but specify nothing after --project, and assert
   ParserException was raised. So in this patch, we fix it
   as so.

   ('--project', '') --> ('--project')
   assert CommandError --> assert ParserException

Change-Id: Ifd33c72d5b7581aaabffb09e9b5e38ecc67e18c0
2016-06-14 15:32:33 +08:00
Jenkins
5b36898b2b Merge "Fix image delete multiple arguments error" 2016-06-14 07:26:58 +00:00
Jenkins
2c92b60f45 Merge "osc-lib: command" 2016-06-14 06:45:17 +00:00
Jenkins
287fe3610a Merge "osc-lib: parseractions" 2016-06-14 04:22:03 +00:00
Jenkins
5c402c1da2 Merge "osc-lib: logs" 2016-06-14 04:21:56 +00:00
Jenkins
e5dd054be8 Merge "Fix errors in flavor unit tests" 2016-06-14 04:21:18 +00:00
Dean Troyer
a55eb915a0 osc-lib: timing
Change-Id: I3fe27d98efa5090e084c676f7f8e6dad0157ed21
2016-06-13 11:08:21 -05:00
Dean Troyer
9e2b8e6730 osc-lib: command
Leave command.py and test_command.py as a sanity check during the
deprecation period.

Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
2016-06-13 11:00:22 -05:00
Dean Troyer
be192676bd osc-lib: parseractions
Leave parseractions.py and test_parseractions.py as a sanity check during the
deprecation period.

Change-Id: I1a7469b6d872284e0276502a1a287bc0b87f8f83
2016-06-13 10:55:44 -05:00
Dean Troyer
59dffb9c62 osc-lib: logs
Change-Id: I2a4d40cd72cc22e97a600751ae29c2309ebed28b
2016-06-13 10:55:44 -05:00
Dean Troyer
e5e29a8fef osc-lib: utils
Use osc-lib directly for utils.

Leave openstackclient.common.utils for deprecation period.

Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
2016-06-13 10:50:44 -05:00
Dean Troyer
d20c863ebc osc-lib: exceptions
Use osc-lib directly for exceptions.

Leave openstackclient.common.exceptions for deprecation period.

Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
2016-06-13 10:50:01 -05:00
Richard Theis
6a6b192dde Add "--network-segment" option to "subnet create"
Add "--network-segment" option to the "subnet create" command.
This is a beta command option and subject to change. Use global
option "--os-beta-command" to enable this option.

This patch set also provides a devref update for beta command
options.

Change-Id: I4d0fbe079b2a873307364c41c22ce9ba88e632e6
Partially-Implements: blueprint routed-networks
2016-06-13 10:01:48 -05:00
Tang Chen
c7e6973ff5 Fix errors in flavor unit tests
This patch fixes the problems below:
1. flavor.unset_keys() is not checked in flavor unit tests.
   So check them in the tests.
2. test_flavor_unset_no_project makes no sense. It is OK to
   specify ``--project ''`` without raising any exception.
   It can pass because in the test, we set nither project
   nor property. So remove this test.

Change-Id: I04e537349936343b6d8c85b06bc6d0ba6bd41d6f
2016-06-13 19:19:19 +08:00
sunyajing
8c7e34d65c Fix image delete multiple arguments error
Fix image delete command, support processing multiple arguments
delete error.
Fix doc/source/command-errors.rst, make the msg format correct.

Change-Id: Icbe347fe077bc148bf71ea8f7399b0e934b7cdf9
Partially-Implements: blueprint multi-argument-image
2016-06-13 16:15:01 +08:00
Navid Pustchi
6ae0d2e8a5 Moving authentication from keystoneclient to keystoneauth
Currently OpenStackClient uses keystoneclient for authentication.
This change will update OpenStackClient to use keystoneauth for
authentication.

All dependant test have been updated.

Updating how auth_ref is set in the tests to use KSA fixtures had
some racy side-effects.  The user_role_list tests failed when they
picked up an auth_ref that was a fixture.  This exposed a weakness
in ListUserRole that needed to be fixed at the same time re
handling of unscoped tokens and options.

Change-Id: I4ddb2dbbb3bf2ab37494468eaf65cef9213a6e00
Closes-Bug: 1533369
2016-06-09 18:00:40 +02:00
Jenkins
ada6abb30e Merge "Make set/unset commands in network return normally when nothing specified" 2016-06-09 14:58:17 +00:00
Tang Chen
e3270cdfd8 Make set/unset commands in network return normally when nothing specified
set/unset commands should ends up normally instead of raising
an exception when nothing is specified to modify. The main
reason is: When nothing is specified, the command sets/unsets
nothing, which is a normal behavior, and ends up normally.
No API call fails. No error happens.

This patch also adds a releasenote for both network, and volume
commands that fix patch has been merged.

Change-Id: I78c348066078decd350417a431f3b8bea8fcf9ef
Partial-bug: #1588588
2016-06-08 14:31:17 +08:00
Huanxuan Ao
72d3ebd94c Clean up fakes.py in volumev2
All of volumev2 fake classes are completed.
Now the unit tests of volumev2 are using fake
classes so that the old codes are useless and
can be removed.

Change-Id: I502a8a0b0404975744d3b208af3e95c8692e6c47
2016-06-08 13:36:16 +08:00
Jenkins
c272476b7b Merge "Error handling for KeyValueAction class." 2016-06-08 04:30:58 +00:00
Jenkins
4c331bd5f9 Merge "Update unit test test_extension with fake class" 2016-06-08 04:12:48 +00:00
sunyajing
3c883e9755 Modify unit tests of compute agent delete
add no-input test to ``compute agent delete`` unit tests.

Change-Id: Iee22b75c9a9431e57cb634dc28a5efa9b43b7369
2016-06-08 11:03:44 +08:00
Huanxuan Ao
cf12239773 Error handling for KeyValueAction class.
The set --property command requires that the input match
the "key=value" type, but if the type don't match, the return
value will be None, and the command still can be implemented
successfully, this may confuse the users. I think we should
raise exception if the argument type don't match "key=value".
So I make some changes in KeyValueAction class in this patch.

Change-Id: I14e64922faa7e083bc8b5e7e1cac41ef8117c224
Closes-Bug: #1589935
2016-06-08 10:15:19 +08:00
Jenkins
26d7657f1f Merge "Support error handling for "port delete" command" 2016-06-07 10:33:40 +00:00
Huanxuan Ao
0fd3a8c787 Update unit test test_extension with fake class
Add FakeExtension class in networkv2, computev2, volumev2,
identityv2_0 and update unit test test/common/test_extension.py

Change-Id: I94815de7801860edb7fa91a7d146455cab946652
2016-06-07 16:17:42 +08:00
Huanxuan Ao
eb421f6dab Support error handling for "port delete" command
"Port delete" command supported deleting multi ports
before but didn't support error handing, This patch
add the error handling following the rules in
doc/source/command-errors.rst.

Change-Id: I4ea69f2279763626d6a27cad1ca0ee99822d016d
Partially-Implements: blueprint multi-argument-network
2016-06-07 16:00:54 +08:00
Jenkins
dd0fe3d94e Merge "Fix errors for "volume type unset" command" 2016-06-07 01:31:50 +00:00
Jenkins
19c54b61c1 Merge "Refactor SetService --enable/disable option" 2016-06-06 21:56:55 +00:00
Jenkins
376e3379ee Merge "Make set/unset commands in volume return normally when nothing specified" 2016-06-06 21:48:12 +00:00
Jenkins
50b27cc80d Merge "Add server set/unset unit test cases" 2016-06-06 13:36:51 +00:00
Huanxuan Ao
4bea5d37d9 Fix errors for "volume type unset" command
Normally, we can unset multi properties but the "volume type unset"
command could not, because the action "append" was missed. So I add
it and also fix the unit test and doc in this patch.

Change-Id: I20470f2b7bb2a8d7f292cea498826669c3418c77
2016-06-06 19:04:36 +08:00
Jenkins
9661354979 Merge "Add network availability for osc" 2016-06-06 08:20:15 +00:00
Rui Chen
08e7801ff4 Add server set/unset unit test cases
Unit test cases don't cover compute "server set/unset" commands,
the patch add some test cases for them.

Change-Id: I440c32968bd41b948352a9764a37c9af3e68803d
2016-06-06 09:57:55 +08:00
Jenkins
93db7f58ed Merge "Support multiple argument for compute agent delete command" 2016-06-05 04:36:26 +00:00
Jenkins
1c097b777c Merge "Add support for volume transfer request list" 2016-06-04 20:36:24 +00:00
Sheel Rana
2178cedef1 Add support for volume transfer request list
OSC does not support to list volume transfer from one user
to other user.
This patch will provide support for listning volume transfer
requests.

Closes-Bug:#1554886

Implements: bp cinder-command-support

Change-Id: Ie659bc39cb1d1e931cca7a40b2f126a067ee484c
2016-06-04 18:26:59 +00:00
Tang Chen
ac1d86c343 Refactor SetService --enable/disable option
This patch changes the following:

1. --enable/disable option should follow the rules
   in the doc below:
   http://docs.openstack.org/developer/python-openstackclient/command-options.html#boolean-options

2. "--disable-resion" is specified but not "--disable",
   an exception is raised instead of igoring
   "--disable-reason" option.

Change-Id: I92e9234111e661bfe7119a8e19389a87c874ab0c
2016-06-04 22:42:46 +08:00
Jenkins
81718beb8f Merge "Fix wrong test in flavor unit tests" 2016-06-04 14:31:49 +00:00
Jenkins
7fb10e74ba Merge "Check port name in set port tests" 2016-06-04 14:31:43 +00:00
Tang Chen
2672e37ee2 Make set/unset commands in volume return normally when nothing specified
set/unset commands should ends up normally instead of
logging an error when nothing is specified to modify.
The main reason is: When nothing is specified, the
command sets/unsets nothing, which is a normal behavior,
and ends up normally. No API call fails. No error happens.

Change-Id: Ib03a512650e5da90aa1ef38019772448383d0d33
Partial-bug: #1588588
2016-06-04 21:29:44 +08:00
Jenkins
55a7ba890d Merge "Fix --enable options on commands" 2016-06-04 13:05:30 +00:00
Manjeet Singh Bhatia
eab6cdebdc Add network availability for osc
This patch implements openstack client for network ip availability.

Implements: blueprint neutron-ip-capacity

Depends-On: I3b40d8edea87c068c4e8133e436511765064d5f8
Change-Id: Iffaa2e20ff495fbd205d3397e027e8141d04385e
2016-06-03 16:47:56 +00:00
Dean Troyer
eef2054109 Move server image create command to its own resource file.
Change-Id: If37e82072bd7a32b81bfb1a8bb048f018dd5b04f
2016-06-03 09:19:57 -05:00
zhouqi
6d1dd68076 Check port name in set port tests
Change-Id: I1bf11245b107f82fedee70dacc37c4c6dc5210ea
2016-06-03 16:12:22 +08:00
Tang Chen
c95c73f8e2 Fix wrong test in flavor unit tests
In test_flavor_set_no_project(), we aimed to test a
situation like this: User specifies "--project" option,
but didn't specifies the project name or ID.

But in the source code, it becomes "--project ''".

The test could past because if project and property
are both None, the command will raise an exception.

Change-Id: I39567306debb901e8bad420fa2492f1b207efddc
2016-06-03 15:53:49 +08:00
sunyajing
909bab1e07 Support multiple argument for compute agent delete command
Change-Id: I3b19e4914d475b86d7e8aa8d76e62a2ac811272f
Partially-Implements: blueprint multi-argument-compute
2016-06-03 02:14:36 +00:00