1778 Commits

Author SHA1 Message Date
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
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
Tang Chen
185412f28c Router: Add class FakeRouter to test "router xxx" command
A unit test class similar to FakeServer, which is able to fake one
or more routers. It will be used by the router CRUD patches.

Change-Id: I9b87c6c95282902c3a829da51229a35d4265a1e4
Implements: blueprint neutron-client
Partial-bug: #1519503
2015-12-11 17:52:19 +00:00
Jenkins
785caf503f Merge "Add source security group support to create rule" 2015-12-11 17:40:11 +00:00
Tang Chen
4221bc282d Trivial: Fix parameter name typo in network.rst
1. "network delete" takes network name or ID, not project
2. "network set/show" takes network name or ID, not only name.
   So use network, not name.

Change-Id: I13835fea1d0151ea0cd93e250b022c9daf74b537
2015-12-11 07:31:34 +00:00
Tang Chen
2caf7b19e2 Trivial: Do not use plural format in command parameter in "network delete"
Since "network delete" could delete more than one network,
add a (s) to the doc.

And also, rename the parameter "networks" to "network".
The naming style is not using plural format in parameter.

Change-Id: Id434ea905af34457f84ea6bcb18addef5800429a
2015-12-11 19:39:36 +08:00
Jenkins
67090b77b2 Merge "The format_exc method does not take an exception" 2015-12-11 02:34:37 +00:00
Jenkins
823ba770e0 Merge "Fix "sevice show" cannot catch NoUniqueMatch Exception" 2015-12-10 18:37:18 +00:00
Jenkins
f2339e94b0 Merge "Add unit test for TestServerList to test --long option." 2015-12-10 18:25:40 +00:00
Jenkins
24712ba6ea Merge "Remove python-neutronclient requirement" 2015-12-10 18:23:03 +00:00
Richard Theis
8485a52b99 Remove python-neutronclient requirement
Now that the neutron support is using the openstacksdk
requirement, the python-neutronclient requirement can
be removed.

Change-Id: Ieefac297e136f2f2997ec41cef2673e814c75b55
Related-to: blueprint neutron-client
2015-12-09 15:50:17 -06:00
Terry Howe
f65f82e435 Fix poorly named test mocks
Change-Id: I6e2911e88fc458b39d5024a5714ed8af3f519946
2015-12-09 11:59:30 -07:00
Terry Howe
7a42174c4b Remove old code after sdk integration
We won't need this anymore.

Change-Id: Ib10be1dedb8db81f0cba6e45b8a9b0aade2ab473
2015-12-09 11:45:59 -07:00
Terry Howe
7aa6e5e36c SDK integration extensions and server create networks
Finish up the SDK integration with server create network and port
find and extension list.

Change-Id: I18dbada784d8aa92a45a937f251023ddf899c53e
2015-12-09 11:39:20 -07:00
Tang Chen
6a5be8c4c9 Add unit test for TestServerList to test --long option.
In two steps:
1. Setup all necessary attributes of a server in setUp(), including
   the ones that are not faked in FaseServer by default.
2. Run a similar process with no option test case.

The future plan is to move all these attributes to FakeServer.
But it will cause some other changes which has nothing to do with
this patch. So leave this job to do later.

Change-Id: I1134812a0ea146ef737b0f0ffbef8ca23684accd
Implements: blueprint osc-unit-test-framework-improvement
2015-12-09 19:42:52 +08:00
Jenkins
ccbffb2ef9 Merge "Use FakeVolume in server test cases." 2015-12-09 04:14:56 +00:00
Jenkins
dc5bd94213 Merge "Use FakeImage in server test cases." 2015-12-09 04:14:53 +00:00
Jenkins
e4cbc4485f Merge "Remove unuseful test data in test_netwrok.py" 2015-12-09 04:14:50 +00:00
Tang Chen
55480d014c Remove unuseful test data in test_netwrok.py
Change-Id: Ibd4f8bb602acdcc3421205d9dafc8dcafb9645df
Implements: blueprint osc-network-unit-test-refactor
Related-to: blueprint neutron-client
2015-12-09 13:38:36 +08:00
Jenkins
805e8f89c9 Merge "Migrate network client to SDK." 2015-12-09 04:14:47 +00:00
Jenkins
766354990d Merge "Migrate "network show" command to use SDK." 2015-12-09 04:14:45 +00:00
Jenkins
45a330ca4e Merge "Migrate "network set" command to use SDK." 2015-12-09 04:14:41 +00:00
Jenkins
f9c7baad0e Merge "Migrate "network delete" command to use SDK." 2015-12-09 03:50:46 +00:00
Jenkins
761657c8e8 Merge "Migrate "network create" command to use SDK." 2015-12-09 03:32:08 +00:00
Tang Chen
4be716eb27 Migrate network client to SDK.
The previous patches have migrate all network commands to
the new version using sdk. This patch will remove the
temporary method, and implement a new make_client() to
create sdk network client.

And also, find() in openstackclient/network/common.py must
support sdk. The logic of this function will become much
easier than before, so this patch also removes two useless
test cases of find().

This patch will also remove the patched methods in tests.

Change-Id: Ic2f7bca073beb9757172d16f95d9b82c48cbbc12
Implements: blueprint neutron-client
Co-Authored-By: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
2015-12-09 09:30:29 +08:00
Tang Chen
2a2cb4f75d Migrate "network show" command to use SDK.
This patch makes "network show" command use sdk.

Since we have to keep the other commands runnable with
the old network client, we use a temporary method to
create sdk network client. And as a result, the tests
need to patch a method to fake the temporary method,
which will be removed at last.

There are two same test cases in the unit tests. This
patch will remove one.

And since the output has changed, we also need to fix
function test cases.

Change-Id: I4c06b4efad2db430767bbaa882b0876df3ab483a
Implements: blueprint neutron-client
Co-Authored-By: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
2015-12-09 09:30:13 +08:00
Tang Chen
45c644d428 Migrate "network set" command to use SDK.
This patch makes "network set" command use sdk.

Since we have to keep the other commands runnable with
the old network client, we use a temporary method to
create sdk network client. And as a result, the tests
need to patch a method to fake the temporary method,
which will be removed at last.

Change-Id: I794ac4b82d9200747298f1a9ee44611140e9b6d0
Implements: blueprint neutron-client
Co-Authored-By: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
2015-12-09 09:29:54 +08:00
Tang Chen
511e862294 Migrate "network delete" command to use SDK.
This patch makes "network delete" command use sdk.

Since we have to keep the other commands runnable with
the old network client, we use a temporary method to
create sdk network client. And as a result, the tests
need to patch a method to fake the temporary method,
which will be removed at last.

Change-Id: I1f2c404e4b0ff6727e4c535ce543aa406f2290ce
Implements: blueprint neutron-client
Co-Authored-By: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
2015-12-09 09:29:39 +08:00
Tang Chen
0b4fb0bb66 Migrate "network create" command to use SDK.
This patch makes "network create" command use sdk.

Since we have to keep the other commands runnable with
the old network client, we use a temporary method to
create sdk network client. And as a result, the tests
need to patch a method to fake the temporary method,
which will be removed at last.

Change-Id: I06559c675be1188747257f72f18d6b4d420d0285
Implements: blueprint neutron-client
Co-Authored-By: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
2015-12-09 09:29:26 +08:00
Min Min Ren
b98aee57c1 Fix "sevice show" cannot catch NoUniqueMatch Exception
Fix a bug for "service show" subcommand cannot cache NoUniqueMatch Exception

Change-Id: I393c5417de0fef424618b08119ddbc8fea27e114
Closes-Bug: #1524305
2015-12-09 05:47:12 +08:00
Jenkins
9bff399ff3 Merge "Integrating mistralclient with openstackclient" 2015-12-08 18:15:49 +00:00
Terry Howe
2348617606 The format_exc method does not take an exception
For py35, this call blows up.  Seems to be ignored for py27, but
even in py27, it doesn't take an exception.

https://docs.python.org/2.7/library/traceback.html
https://docs.python.org/3/library/traceback.html

Change-Id: I2602426b966045b15b96e5e41d0df6524ed05119
2015-12-08 09:23:47 -07:00
Tang Chen
56150de224 Migrate "network list" command to new version using SDK.
This patch makes "network list" command use sdk.

Since we have to keep the other commands runnable with
the old network client, we use a temporary method to
create sdk network client. And as a result, the tests
need to patch a method to fake the temporary method,
which will be removed at last.

Change-Id: I0882501cd7bb2c17917e10a6da4298f1452c9765
Implements: blueprint neutron-client
Co-Authored-By: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
2015-12-08 23:24:20 +08:00
Tang Chen
85d6aeea32 Trivial: Coding style fix in test_flavor.py
Change-Id: I3dcb3c4fbd9ff9c351426ae2ad9da009208a6485
2015-12-08 13:35:51 +08:00
Tang Chen
ec79d338f7 Use FakeVolume in server test cases.
We have a class FakeVolume to fake one or more volumes. So use it in
test_server.py.

Change-Id: I735ae7f678a6799e0ae4c7c25c8083d9ebf47b09
Implements: blueprint improve-volume-unittest-framework
2015-12-08 10:36:25 +08:00
Tang Chen
a4696dce1e Use FakeImage in server test cases.
We have a class FakeImage to fake one or more images. So use it in
test_server.py.

Change-Id: I276e4ade5aecefbe66b9722c1dfbac10b3bd14b6
Implements: blueprint improve-image-unittest-framework
2015-12-08 10:05:36 +08:00
Richard Theis
566388ab1e Add source security group support to create rule
The 'security group rule create' command was updated to support a
source security group. Now either a source IP address block or source
security group can be specified when creating a rule. The default
remains the same.

Change-Id: If57de2871810caddeeaee96482eb34146968e173
Closes-Bug: #1522969
2015-12-07 12:42:10 -06:00
Tang Chen
481b711fae SDK integration: Add a temporary method to create network client using sdk.
This patch adds a temporary method to create a network client using sdk.
This method will help to migrate network commands from neutronclient to sdk
one by one. The command which is being migrated will use this temporary
method to create the sdk client, and the rest ones will use the old client.

The temporary method will finally be removed and implement the same thing
in make_client().

This patch will also add sdk to requirements file.

And adds some formatter helper functions, which will be used in class
CreateNetwork, ListNetwork and ShowNetwork.

This patch is splited from TerryHowe <terrylhowe@gmail.com> 's original patch.

Change-Id: Ie9b35747680afeb66cf6922e2c654fbca7e03569
Implements: blueprint neutron-client
Co-Authored-By: TerryHowe <terrylhowe@gmail.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
2015-12-07 22:44:23 +08:00
Tang Chen
6a3bc765f4 Introduce class FakeNetwork to fake one or more networks.
Introduce a new class FakeNetwork to fake one or more Network
objects so that we don't need to initialize objects once and
once again in each test case.

Change-Id: I519e5368025946a737002a2e97bc218b65a78fa2
Implements: blueprint osc-network-unit-test-refactor
Related-to: blueprint neutron-client
2015-12-07 22:44:23 +08:00
Jenkins
695500496c Merge "Use formatter in server.py for "server list" tests." 2015-12-07 03:48:48 +00:00
Tang Chen
0d7be6fbcb Use formatter in server.py for "server list" tests.
We should use the formatter in the original code to set the
expected data in each test case.

The same problem exists in other test cases, like "server create".
But data structure in TestServerCreate is different from TestServerList,
so will fix the problem in another patch.

Change-Id: I233f7a91cd4cc1e996941e26ea85490fa3290572
2015-12-07 22:16:04 +08:00
OpenStack Proposal Bot
7d01a44822 Updated from global requirements
Change-Id: I7910586e32ec248e95f7f54fe776b3603f667c49
2015-12-06 20:47:37 +00:00
Jenkins
000b3c6dea Merge "Refactor network test: Remove unusful test code." 2015-12-06 04:07:46 +00:00
Jenkins
e19d49ba08 Merge "Refactor TestShowNetwork: Use TestNetwork in TestShowNetwork" 2015-12-06 04:04:12 +00:00