Commit Graph

976 Commits

Author SHA1 Message Date
ada6abb30e Merge "Make set/unset commands in network return normally when nothing specified" 2016-06-09 14:58:17 +00:00
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
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
c272476b7b Merge "Error handling for KeyValueAction class." 2016-06-08 04:30:58 +00:00
4c331bd5f9 Merge "Update unit test test_extension with fake class" 2016-06-08 04:12:48 +00:00
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
26d7657f1f Merge "Support error handling for "port delete" command" 2016-06-07 10:33:40 +00:00
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
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
dd0fe3d94e Merge "Fix errors for "volume type unset" command" 2016-06-07 01:31:50 +00:00
19c54b61c1 Merge "Refactor SetService --enable/disable option" 2016-06-06 21:56:55 +00:00
376e3379ee Merge "Make set/unset commands in volume return normally when nothing specified" 2016-06-06 21:48:12 +00:00
50b27cc80d Merge "Add server set/unset unit test cases" 2016-06-06 13:36:51 +00:00
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
9661354979 Merge "Add network availability for osc" 2016-06-06 08:20:15 +00:00
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
93db7f58ed Merge "Support multiple argument for compute agent delete command" 2016-06-05 04:36:26 +00:00
1c097b777c Merge "Add support for volume transfer request list" 2016-06-04 20:36:24 +00:00
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
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
81718beb8f Merge "Fix wrong test in flavor unit tests" 2016-06-04 14:31:49 +00:00
7fb10e74ba Merge "Check port name in set port tests" 2016-06-04 14:31:43 +00:00
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
55a7ba890d Merge "Fix --enable options on commands" 2016-06-04 13:05:30 +00:00
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
6d1dd68076 Check port name in set port tests
Change-Id: I1bf11245b107f82fedee70dacc37c4c6dc5210ea
2016-06-03 16:12:22 +08:00
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
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
9f65a9954c Merge "Add support for removing flavor-access" 2016-06-02 18:14:48 +00:00
6f2c1734e3 Fix --enable options on commands
The --enable option on commands is ignored when the arguments are parsed.
This is related to the --enable-beta-commands option. Renaming the option
to --os-beta-command fixes the problem.

There's no need to handle backwards compatibility for the option name
change because there hasn't been an OSC release yet with beta commands.

Change-Id: I0327ba8a2058858a83e9a42e231470ed733cc834
Closes-Bug: #1588384
2016-06-02 10:07:34 -05:00
6088d31ca9 Merge "Add FakeQos class and update unit test for qos_specs in VolumeV2" 2016-06-02 05:34:17 +00:00
22c60f3ac7 Add support for removing flavor-access
Add "--project" and "--project-domain" options in
"flavor unset" command to remove flavor access.

Change-Id: Ia5c5a80d9890d5af066b75b4e202647c18c7d915
Partial-Bug: #1575461
2016-06-02 12:40:43 +08:00
75f6a8e8bd Merge "Fix unit test for volume commands in volumev2" 2016-05-31 13:59:02 +00:00
677dfaa925 Fix unit test for volume commands in volumev2
There are some issues in test_volume.py in volumev2,
I make three changes in this patch:

1.modified some codes that not used FakeVolume class.
2.added a fake image by FakeImage class for this test.
3.added a fake snapshot by FakeSnapshot class for this test.

Change-Id: I02ba73d3aaee95624b0e2307b255e0e485b0c3a3
2016-05-31 17:36:02 +08:00
ca58ab9d09 Merge "add unit test for compute agent command" 2016-05-31 07:11:04 +00:00
a207fdfda6 add unit test for compute agent command
Change-Id: I966d5a3a307fcd7f4efb1267aa2896efd53be50d
2016-05-31 12:50:23 +08:00
dce3962ffd Add FakeQos class and update unit test for qos_specs in VolumeV2
Change-Id: I108c8d343678f3d19d1ca1f93d998c46c7c32eff
2016-05-31 11:54:49 +08:00
4e44f1206f Merge "Add support for setting flavor-access" 2016-05-30 20:00:11 +00:00
c46a5597be Add support for setting flavor-access
This patch adds "--project" option in "flavor set" command to support
for setting flavor access.

Change-Id: I75b473600080d8ab1dd6ad01561c4f989ed3c3bd
Partial-Bug: #1575461
2016-05-30 16:26:09 +08:00
37bc7bbf91 Merge "Add network segment command object" 2016-05-30 06:20:21 +00:00
d532e3b5f2 Merge "Add "image unset" command" 2016-05-30 04:39:34 +00:00
4822bf1f53 Merge "[compute] Add server backup function" 2016-05-30 04:28:07 +00:00
416550fd3d Merge "Support to set server state" 2016-05-30 03:48:37 +00:00
1a7284f63a Support to set server state
When a server is unexpected state, OSC don't support reset
the server to active or error state, that's supported by
novaclient, and it's an important command for operators, the
patch implement this function.

Change-Id: I3e7800feb192832b0719ef9a353945beb6bfd509
Implements: blueprint server-reset-state
2016-05-28 18:55:50 +08:00
3e11661074 Add "image unset" command
This patch add a command that supports
unsetting image tags and properties

Change-Id: I6f2cf45a61ff89da6664f3a34ae49fdd85d8c986
Closes-Bug:#1582968
2016-05-28 16:38:22 +08:00
537f5cbe8a Support deleting multi address scopes in networkv2
This patch adds support for deleting multi address scopes by
using "address scope delete" command.

Change-Id: Ic8d3ebc17db44ca5d42c336d2c4d5633f70d4e8b
Partially-Implements: blueprint multi-argument-network
2016-05-28 13:46:38 +08:00
6a55e05cbf Add network segment command object
Add network segment command object in support of routed networks.
This patch set includes documentation, unit tests and functional
tests (currently skipped until segments enabled in neutron by
default) for the following new commands:
  - "os network segment list"
  - "os network segment show"

These new commands are currently marked as beta commands.

Change-Id: I1a79b48dc6820fe2a39fcceb11c8cae3bda413a0
Partially-Implements: blueprint routed-networks
2016-05-27 12:58:25 -05:00
460846cef2 [compute] Add server backup function
Add server backup function

There is no return value for this command per following doc
http://developer.openstack.org/api-ref-compute-v2.1.html#createBackup,
also novaclient can't be updated now due to backward compatible issue
http://lists.openstack.org/pipermail/openstack-dev/2016-March/089376.html,
so we have to get the information ourselves.

The Image tests were not using warlock images, so that needed to be fixed
before we could completely test things like --wait.

Change-Id: I30159518c4d3fdec89f15963bda641a0b03962d1
2016-05-27 11:47:25 -05:00
0d8dab6288 Merge "keystone: fix catalog output when region is unset" 2016-05-25 18:56:14 +00:00
646f702958 Merge "Refactor service unit tests" 2016-05-25 15:19:58 +00:00