1825 Commits

Author SHA1 Message Date
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
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
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
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
OpenStack Proposal Bot
0ea5c0351b Updated from global requirements
Change-Id: I589f0463cb9696586fa3ed7ed0bb756d155cc0e5
2015-12-21 23:45:24 +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
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
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
Tang Chen
8a805dae0c Router: Add "router set" command using SDK
This patch adds "router set" command to osc using sdk.

NOTE: Setting ha property of a router is not supported for now.
      Will suppport it in another patch.

Change-Id: I9c15249ae61a87291f0728ad1c8f0a98aa8119bf
Implements: blueprint neutron-client
Partial-bug: #1519503
2015-12-17 00:20:14 +08:00
Jenkins
5a387695cc Merge "Router: Add "router set" command using SDK" 2015-12-16 09:55:08 +00:00
Jenkins
1c5528d5cb Merge "Network: Improve no option test for "network create"." 2015-12-16 07:02:06 +00:00
xiexs
556397aae7 Refactor TestImageCreate with FakeImage class
Change-Id: I0044df36bb4d761c7998dfc8aa9a86d21d81da83
Implements: blueprint improve-image-unittest-framework
2015-12-16 09:25:42 +08:00
Jenkins
5ce02deac4 Merge "when fetching object store properties use lower()" 2015-12-15 23:47:56 +00:00
OpenStack Proposal Bot
1a3068d729 Updated from global requirements
Change-Id: Ibef84b93179904c124fc493a51e4855512ddf755
2015-12-15 19:00:09 +00:00
Jenkins
b78ce592b0 Merge "Removes MANIFEST.in as it is not needed explicitely by PBR" 2015-12-15 18:36:04 +00:00
Jenkins
5736d1e00c Merge "Router: Add "router delete" command using SDK" 2015-12-15 15:42:49 +00:00
Tang Chen
3364855a22 Router: Add "router delete" command using SDK
This patch adds "router delete" command to osc using sdk.

Change-Id: I47d0ca7f7984942ffceaeb1c9ac69efd09145f40
Implements: blueprint neutron-client
Partial-bug: #1519503
2015-12-16 14:14:41 +08:00
Jenkins
25666684d2 Merge "Router: Add "router create" command using SDK" 2015-12-15 15:37:36 +00:00
Tang Chen
bd0bed7467 Network: Improve no option test for "network create".
Currently, test_create_no_options() case actually takes a 'name' arg.
Rename it to test_create_default_options, and add a test_create_no_options
case taking nothing.

Change-Id: I4f9d2e8cbfa843faea641d3cc959f96894c9cd5d
2015-12-15 13:22:00 +00:00
Jenkins
d97e6c80fa Merge "Add multi deletion testcase for "openstack image delete"" 2015-12-15 07:37:48 +00:00
Jenkins
24af1bf595 Merge "Refactor TestImageDelete with FakeImage" 2015-12-15 06:39:22 +00:00
Tang Chen
6158ebb0e0 Router: Add "router create" command using SDK
This patch adds "router create" command to osc using sdk.

NOTE: Test for --project needs support for fake identity client v2 and v3.
      These tests will be added in other patches.
NOTE: external_gateway_info and routes are not supported to be passed to
      create command now. They will be supported in another tow patches.
NOTE: Creating a ha router is not supported for now. Will support it in
      another patch.

Change-Id: I7642295d27c27dd498331ae1da1c293706d8f6af
Implements: blueprint neutron-client
Partial-bug: #1519503
2015-12-15 09:42:41 +08:00
Jenkins
c47aa52c43 Merge "Trivial: Improve unclear comments in test_server.py" 2015-12-14 22:47:35 +00:00
Jenkins
79e67089dd Merge "Remote security group name not displayed for rule" 2015-12-14 22:29:38 +00:00
Richard Theis
079123bb0b Remote security group name not displayed for rule
The 'security group rule list' command was updated to display the
remote security group name for a security group rule. This was done
via a new 'Remote Security Group' column. The output of the
'security group rule create' and 'security group show' commands was
also updated to include 'remote_security_group' information instead
of the raw 'group' information returned from the API layer.

Change-Id: I5f9600338c8331966d2c658109a24b502c538106
Closes-Bug: #1520003
2015-12-14 14:48:19 -05:00
Steve Martinelli
74a6a81ae9 when fetching object store properties use lower()
sometimes properties within object store concepts are stored with
mixed case depending on the client used to store said properties.

when retrieving properties to 'show' the user, always call lower()
on the property in question when comparing it to the reserved
values of the swift API.

Change-Id: I97ffc715788ca3cd021413124b6945a399465c99
Closes-Bug: 1525805
2015-12-14 12:23:44 -05:00
sonu.kumar
01ef42c8b4 Removes MANIFEST.in as it is not needed explicitely by PBR
This patch removes `MANIFEST.in` file as pbr generates a sensible
manifest from git files and some standard files and it removes
the need for an explicit `MANIFEST.in` file.

Change-Id: I78b28bf2fe60dc64cf6c3894da36f683a2e0bb30
2015-12-14 13:05:01 +05:30
Jenkins
1ee5191cec Merge "Deprecated tox -downloadcache option removed" 2015-12-13 22:12:05 +00:00
OpenStack Proposal Bot
cb81232254 Updated from global requirements
Change-Id: Ie88d50a9c1539ad24e0f8dae8ee5155ad467a0c0
2015-12-11 22:53:43 +00:00
Ondřej Nový
0a132d3256 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I521b7cb11374f0600d1f6d4c6529e95aa29654b0
2015-12-11 23:30:31 +01:00
Jenkins
8ee3380fa2 Merge "Router: Add "router list" command using SDK" 2015-12-11 20:42:21 +00:00
Jenkins
5f7a295b52 Merge "Router: Add class FakeRouter to test "router xxx" command" 2015-12-11 20:19:17 +00:00
Jenkins
a25222cae5 Merge "Trivial: Fix parameter name typo in network.rst" 2015-12-11 19:09:50 +00:00
Tang Chen
3278b3a022 Router: Add "router list" command using SDK
Add "router list" command. It takes one "--long" option.

By default, the command will print router id, name, status,
admin state up, distributed, ha and project id.

With "--long" option, it will also print routes and
external gateway info.

Change-Id: I9d21904c41c11ee1fa107f985744878a1dc2f970
Implements: blueprint neutron-client
Partial-bug: #1519503
2015-12-11 18:07:47 +00:00