1269 Commits

Author SHA1 Message Date
Jenkins
aa041c5269 Merge "Make --image parameter optional in "server rebuild"" 2016-01-15 17:44:01 +00:00
Jenkins
8654e3e366 Merge "Changed the abstract columns and datalists from test cases of common and Identity" 2016-01-14 16:33:16 +00:00
Jenkins
fa3077d51a Merge "Refactor network endpoint enablement checking" 2016-01-14 00:45:04 +00:00
SaiKiran
030aee6fbc Changed the abstract columns and datalists from test cases of common and Identity
columns and datalist has been set in each test case in compute,
which is not necessary. This patch abstract it out and remove
all redundant code.

Change-Id: I45a3582088161f12e60e7c933da8e7dcc0ae8e7b
Closes-Bug: #1532384
2016-01-12 17:25:33 +05:30
Jenkins
4a5a34d77c Merge "Support non-interactive user password update" 2016-01-11 19:50:00 +00:00
Guang Yee
5cbecc130e Support non-interactive user password update
Currently user password update require interactive prompting of user's
original password. This is problematic because we can't support
non-interactive applications and therefore hinders automation. This
patch make it possible by optionally accepting an
'--original-password' argument. If specified, we would use it instead
of prompting.

DocImpact

Change-Id: I2d994e8c2be949f7ae616ac1d1594fb94e1a27cd
Closes-Bug: 1531360
2016-01-11 09:27:10 -08:00
Jenkins
9317df07a2 Merge "Trivial: Remove useless string_to_bool()" 2016-01-08 06:23:32 +00:00
Jenkins
ee1a4774dd Merge "Further improve output for "os security group show"" 2016-01-07 17:35:03 +00:00
Jenkins
a80ccd8fbc Merge "Use assertTrue/False instead of assertEqual(T/F)" 2016-01-07 09:21:36 +00:00
Swapnil Kulkarni (coolsvap)
a56fc34039 Use assertTrue/False instead of assertEqual(T/F)
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).

Change-Id: I3437634329fc8ecef25082b43b5fc0e1030cdbda
Closes-Bug:#1512207
2016-01-07 12:40:09 +05:30
Einst Crazy
ee0fb4a3ba Replace assertEqual(*, None) with assertIsNone in tests
Replace assertEqual(*, None) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I8964a10ae3529e978bfab1d8140f95da4b56615c
2016-01-07 14:37:01 +08:00
Richard Theis
5ff660f718 Further improve output for "os security group show"
Improve the security group rules output when running the
"os security group show" command. Empty and duplicate
information for each security group rule is now removed.
This will ensure that the rules remain readable when
direction and ethertype information is returned as part
of the transition to neutron networking.

Change-Id: Ib49c27a9d7f4d5d38ceb2b0d785ddf94d88b2d89
Partial-Bug: #1519511
Related-To: blueprint neutron-client
2016-01-06 08:21:57 -06:00
zhurong
b29947449a Delete the unused LOG configure code
Delete the unused LOG configure code and import code

Change-Id: I1fb0cacfe44b6a2fd4e4b3f504b6d1dec055c5c4
2016-01-05 02:47:12 -05:00
Jenkins
401164939e Merge "Add support to list all security group rules" 2016-01-04 21:41:06 +00:00
Richard Theis
57dac0bc3a Refactor network endpoint enablement checking
Move the network endpoint enablement checking from the 'server create'
command to the common client manager. This allows future network
commands to use either nova or neutron networking based on the cloud
environment.

This patch set also includes related unit test enhancements to the
common client manager to trigger authentication on the tests.

Change-Id: Ia37e81d4fb05a1e2fceb3e5d367bda769ab8e64b
Related-Bug: #1519511
Related-to: blueprint neutron-client
2016-01-04 13:49:49 -06:00
Jenkins
774201b696 Merge "Implementation for project unset cmd for python-openstackclient." 2016-01-04 19:09:31 +00:00
Jenkins
1b916da1a0 Merge "Enabling domain lookup for project set v3 command" 2016-01-04 16:31:21 +00:00
Jenkins
5aeb831157 Merge "Use Block Storage instead of Volume" 2016-01-04 16:23:30 +00:00
Jude Job
a2a63f19bf Implementation for project unset cmd for python-openstackclient.
This patch introduces a unit test class TestProjectUnset
for testing unset cmd.

Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>
Change-Id: Ib4a414d2313e3d37e48d1cb3639f064231aec508
Closes-Bug: #1486597
2016-01-04 10:25:55 -05:00
Jenkins
d31c301bd3 Merge "Map some of the SDK field names" 2016-01-01 17:27:23 +00:00
Jude Job
66931c6931 Enabling domain lookup for project set v3 command
Currently the domain option for `project set` attempts to set
a new domain that owns the project. This is actually an action
that is denied by keystone server. Instead, the domain option
should be used as a lookup, to find projects that exist in the
non-default domain.

Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>

Closes-Bug: #1524456

Change-Id: I30a3812184fe262667e09baa106d2275c2cbb981
2015-12-31 02:11:39 -05:00
Rushi Agrawal
eeeb9f729f Docstring should say 'default' if option is default
Change-Id: I59d83e7a0a590fa537f509f7f19940640f555679
2015-12-31 09:36:26 +05:30
Tang Chen
5f0147ad12 Trivial: Remove useless string_to_bool()
string_to_bool() is not used by anyone.
Furthermore, it is not well designed. It tries to convirt 't', '1'
to True, which could be confused.

So remove it. If we need something similar, let's make a better one.

Change-Id: Ic1f63480c806bf7bcc9f541fc806eed297ddf718
2015-12-29 10:50:44 +08:00
Jenkins
9f2ed6b03a Merge "Improve output for "os security group show"" 2015-12-28 13:54:02 +00:00
Tang Chen
8d718e9d67 Refactor: Initialize parser in setUp() in TestNonNegativeAction
Change-Id: I12846acc4450d31d19897bbdfc6846bde8c8f2ce
2015-12-28 20:01:13 +08:00
Tang Chen
f0a3b175a1 Refactor: Initialize parser in setUp() in TestKeyValueAction
No need to initialize parser in each test case. Do it in setUp().
Also remove the test_default_values case because it could be tested
in the test_good_values case.

Change-Id: Ia2ed7c9e46bf6baabbd62b9d50511c5e8103e5e2
2015-12-28 17:28:04 +08:00
Jenkins
f5604366f0 Merge "Trivial: Remove useless return from files in image and volume" 2015-12-28 05:37:53 +00:00
Xi Yang
8210ba7a55 Replace assertEqual(None, *) with assertIsNone(*)
This patch is going to replace assertEqual(None, *) with
assertIsNone(*) in unit test code to have more clear messages
in case of failure.

Change-Id: I6f85498347e8fc7cad5ea7afb832b9acda7daafc
2015-12-25 13:14:33 +08:00
Richard Theis
0e38ef8484 Improve output for "os security group show"
Improve the security group rules output when running the
"os security group show" command. Each security group rule
is now displayed on a separate line.

Current output example:
$ openstack security group show default
+-------------+------------------------- ... ---+
| Field       | Value                    ...    |
+-------------+------------------------- ... ---+
| description | Default security group   ...    |
| id          | 048a5fc3-3be1-407d-ae47-9...    |
| name        | default                  ...    |
| project_id  | 3b96bb2020c1459da76963f9e...    |
| rules       | [u"id='5d812367-9829-4340...t"] |
+-------------+------------------------- ... ---+

New output example:
+-------------+------------------------- ... ---+
| Field       | Value                    ...    |
+-------------+------------------------- ... ---+
| description | Default security group   ...    |
| id          | 048a5fc3-3be1-407d-ae47-9...    |
| name        | default                  ...    |
| project_id  | 3b96bb2020c1459da76963f9e...    |
| rules       | id='5d812367-9829-4340-95...lt' |
|             | id='ee451d1c-ade3-4975-8e...lt' |
+-------------+------------------------- ... ---+

Change-Id: I1386075310896c58a2b776e2bbec3603bd00eff1
Partial-Bug: #1519511
Related-To: blueprint neutron-client
2015-12-23 13:44:22 -06:00
Richard Theis
d1311f9742 Add all regions to cloud configuration
OCC now requires all regions to be listed in the cloud
configuration. Update the shell unit tests to list all
of the regions being tested.

Change-Id: Ic7300d1f708339701b5daadbf2c4769b239a2adb
Closes-Bug: #1528926
2015-12-23 12:48:45 -06:00
Jenkins
49bed38a89 Merge "Add owner validation for "openstack image create/set"" 2015-12-22 17:54:22 +00:00
Jenkins
a080227b07 Merge "TestServerGeneral: Add test for _prep_server_detail()" 2015-12-22 04:10:53 +00:00
Jenkins
e79860e495 Merge "TestServerGeneral: Add test for _format_servers_list_networks()" 2015-12-22 04:10:46 +00:00
xiexs
0a444fc949 Add owner validation for "openstack image create/set"
Owner validation is necessary if a new image owner
will be created/set.

Change-Id: I621774e02866bfa98a31b613deff5d7b6a962737
Closes-Bug: #1517134
2015-12-21 11:17:42 -06:00
Tang Chen
17f3685a83 TestServerGeneral: Add test for _prep_server_detail()
1. Make TestServerGeneral inherit from TestServer because
   we need to use servers_mock, image_mock and flavor_mock
   in compute_client.
2. Create a dict containing all info of a server in the
   original format, and pass it to _prep_server_detail().
3. Compare the original and formatted dict.

Change-Id: Ie0b83c42a5c3bbba630a064d28374d07e2ce9caf
Implements: blueprint osc-unit-test-framework-improvement
2015-12-20 11:33:46 +08:00
Tang Chen
b4660fec7d TestServerGeneral: Add test for _format_servers_list_networks()
The items in a dict are in random order. So if a server is in two networks,
there may be two results after formatted.

Change-Id: I2e15d202639e3fff427935f46650a405b0e51bcc
Implements: blueprint osc-unit-test-framework-improvement
2015-12-20 11:24:12 +08:00
Jenkins
b611045639 Merge "Refactor TestImageCreate with FakeImage class" 2015-12-19 06:59:44 +00:00
Jenkins
b220f4b667 Merge "Remove list output from "compute service set"" 2015-12-18 21:40:22 +00:00
Jenkins
31b5a22db8 Merge "Add image re/deactivate commands" 2015-12-18 21:40:04 +00:00
Tang Chen
f552302b61 Trivial: Remove useless return from files in image and volume
Change-Id: I3526ecd202d0908d91305a066ad72d03cee794b5
2015-12-18 23:25:05 +08:00
Jenkins
5840dd5a77 Merge "TestServerGeneral: Add test for _format_servers_list_power_state()" 2015-12-17 21:09:46 +00:00
Jenkins
d66e666b67 Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2015-12-17 19:38:09 +00:00
Tang Chen
e590597871 Trivial: Remove useless return from files in network
Change-Id: Ib871fbde7c7140eca875403332ad5ab65a7e940d
2015-12-18 18:05:41 +08:00
Richard Theis
96cc5eb354 Add support to list all security group rules
Both nova and neutron allow security group rules to be listed without
specifying the owning security group. This patch set makes the
group argument on 'os security group rule list' optional. Behavior
is unchanged when the argument is specified. When the argument is
not specified then all accessible security group rules will be listed.
The listing will include the owning security group for each rule.

Change-Id: I6914baecf70a65354e1e82dad92c6afbd32b4973
Related-Bug: #1519512
2015-12-17 12:49:13 -06:00
SaiKiran
fe7d2d12c0 Replace assertEqual(None, *) with assertIsNone in tests
In python-openstackclient some test cases using asserEqual(None, *)
instead of assertIsNone(). assertIsNone method provides clear error message.

Change-Id: I3069a6436d11efa513ae94f21ceab46c498d6e25
Closes-Bug: #1527054
2015-12-17 17:10:37 +05:30
Jenkins
251939fb36 Merge "Trivial: Remove useless return from files in compute." 2015-12-16 14:56:41 +00:00
Tang Chen
494659fbe4 Trivial: Remove useless return from files in compute.
Change-Id: I9dc6749256fcd53d292d7f658912c032e9ce9df5
2015-12-17 09:34:12 +08:00
NiallBunting
b3943d7142 Add image re/deactivate commands
This change allows admins to deactivate and reactivate their
images. Currently this has to be done with the REST api or the
glanceclient.

This change introduces `--deactivate` and `--activate` for the `image
set` command.

This requires glanceclient 1.2.0. Which got bumped here:
https://review.openstack.org/#/c/257512/

Change-Id: I476c44a0343cdc92d58ddc93fb06470242de2345
Depends-On: I2c370c6bf6ff664d94d756cc76aaa983fbdb8869
Closes-Bug: 1516661
2015-12-16 14:25:41 +00:00
Jenkins
d72f6228cf Merge "Router: Add "router show" command using SDK" 2015-12-16 09:56:11 +00:00
Tang Chen
408dc7b290 Router: Add "router show" command using SDK
This patch adds "router show" command to osc using sdk.

Change-Id: Idb0f7f0376926e97f9f70a52ef21511e7ffa9d92
Implements: blueprint neutron-client
Partial-bug: #1519503
2015-12-17 09:19:40 +08:00