summaryrefslogtreecommitdiff
path: root/openstackclient
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Router: Add "router list" command using SDK"Jenkins2015-12-112-0/+198
|\
| * Router: Add "router list" command using SDKTang Chen2015-12-112-0/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Router: Add class FakeRouter to test "router xxx" command"Jenkins2015-12-111-0/+81
|\ \ | |/
| * Router: Add class FakeRouter to test "router xxx" commandTang Chen2015-12-111-0/+81
| | | | | | | | | | | | | | | | | | 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
* | Merge "Add source security group support to create rule"Jenkins2015-12-112-16/+50
|\ \
| * | Add source security group support to create ruleRichard Theis2015-12-072-16/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "The format_exc method does not take an exception"Jenkins2015-12-111-1/+1
|\ \ \ | |_|/ |/| |
| * | The format_exc method does not take an exceptionTerry Howe2015-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Fix "sevice show" cannot catch NoUniqueMatch Exception"Jenkins2015-12-101-0/+5
|\ \ \
| * | | Fix "sevice show" cannot catch NoUniqueMatch ExceptionMin Min Ren2015-12-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug for "service show" subcommand cannot cache NoUniqueMatch Exception Change-Id: I393c5417de0fef424618b08119ddbc8fea27e114 Closes-Bug: #1524305
* | | | Merge "Add unit test for TestServerList to test --long option."Jenkins2015-12-101-5/+50
|\ \ \ \
| * | | | Add unit test for TestServerList to test --long option.Tang Chen2015-12-091-5/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Trivial: Do not use plural format in command parameter in "network delete"Tang Chen2015-12-112-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Fix poorly named test mocksTerry Howe2015-12-091-6/+6
| | | | | | | | | | | | | | | | | | | | Change-Id: I6e2911e88fc458b39d5024a5714ed8af3f519946
* | | | | Remove old code after sdk integrationTerry Howe2015-12-094-120/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We won't need this anymore. Change-Id: Ib10be1dedb8db81f0cba6e45b8a9b0aade2ab473
* | | | | SDK integration extensions and server create networksTerry Howe2015-12-097-119/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish up the SDK integration with server create network and port find and extension list. Change-Id: I18dbada784d8aa92a45a937f251023ddf899c53e
* | | | | Merge "Use FakeVolume in server test cases."Jenkins2015-12-092-14/+7
|\ \ \ \ \
| * | | | | Use FakeVolume in server test cases.Tang Chen2015-12-082-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Merge "Use FakeImage in server test cases."Jenkins2015-12-091-24/+16
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Use FakeImage in server test cases.Tang Chen2015-12-081-24/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Remove unuseful test data in test_netwrok.pyTang Chen2015-12-091-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibd4f8bb602acdcc3421205d9dafc8dcafb9645df Implements: blueprint osc-network-unit-test-refactor Related-to: blueprint neutron-client
* | | | | | Migrate network client to SDK.Tang Chen2015-12-096-163/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Migrate "network show" command to use SDK.Tang Chen2015-12-092-43/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Migrate "network set" command to use SDK.Tang Chen2015-12-092-31/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Migrate "network delete" command to use SDK.Tang Chen2015-12-092-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Migrate "network create" command to use SDK.Tang Chen2015-12-092-59/+114
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Migrate "network list" command to new version using SDK.Tang Chen2015-12-082-64/+74
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Trivial: Coding style fix in test_flavor.pyTang Chen2015-12-081-4/+4
| | | | | | | | | | | | | | | | Change-Id: I3dcb3c4fbd9ff9c351426ae2ad9da009208a6485
* | | | Merge "Use formatter in server.py for "server list" tests."Jenkins2015-12-071-1/+1
|\ \ \ \ | |/ / / |/| | |
| * | | Use formatter in server.py for "server list" tests.Tang Chen2015-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | SDK integration: Add a temporary method to create network client using sdk.Tang Chen2015-12-071-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Introduce class FakeNetwork to fake one or more networks.Tang Chen2015-12-071-0/+89
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Refactor network test: Remove unusful test code."Jenkins2015-12-061-35/+0
|\ \ \
| * | | Refactor network test: Remove unusful test code.Tang Chen2015-12-051-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | openstackclient/tests/network/common.py won't be used anymore. Remove it. Change-Id: I641f6d44852931e31ecda22261bfbc9f451446de Implements: blueprint osc-network-unit-test-refactor Related-to: blueprint neutron-client
* | | | Merge "Refactor TestShowNetwork: Use TestNetwork in TestShowNetwork"Jenkins2015-12-061-12/+8
|\ \ \ \ | |/ / /
| * | | Refactor TestShowNetwork: Use TestNetwork in TestShowNetworkTang Chen2015-12-051-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are severail problems in TestShowNetwork: 1. NETWORK_ITEM is not used. 2. Some redundant code. 3. The param n_mock is used to fake find_attr(), but the name is confusing. So rename it to find_attr(). This patch fixes them. Change-Id: I7bc909057125013fb9d215e92c61f847300f93e2 Implements: blueprint osc-network-unit-test-refactor Related-to: blueprint neutron-client
* | | | Merge "Refactor TestSetNetwork: Use TestNetwork in TestSetNetwork"Jenkins2015-12-061-25/+24
|\ \ \ \ | |/ / /
| * | | Refactor TestSetNetwork: Use TestNetwork in TestSetNetworkTang Chen2015-12-051-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use TestNetwork in TestSetNetwork, and also setup test command in setUp(). Change-Id: I4e72332fcf253407bb3d5f20aaf4be047046e146 Related-to: blueprint neutron-client
* | | | Merge "Refactor TestListNetwork: Use TestNetwork in TestListNetwork"Jenkins2015-12-061-51/+44
|\ \ \ \ | |/ / /
| * | | Refactor TestListNetwork: Use TestNetwork in TestListNetworkTang Chen2015-12-051-51/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Abstract cloumns and data out in TestListNetwork so that they can be reused by each case. Also rename n_mock to network_list because it is used to fake function network_list(). Change-Id: I3f65f7bd6c587c167dc1cf8b6d34e003c6454e57 Implements: blueprint osc-network-unit-test-refactor Related-to: blueprint neutron-client
* | | | Merge "Refactor TestDeleteNetwork: Use TestNetwork in TestDeleteNetwork"Jenkins2015-12-061-9/+19
|\ \ \ \ | |/ / /
| * | | Refactor TestDeleteNetwork: Use TestNetwork in TestDeleteNetworkTang Chen2015-12-051-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make TestDeleteNetwork inherit from TestNetwork, and have the same class architecture as the other test classes. Change-Id: I37047d7d13931b2a8f25665d6427efc05fc4f989 Implements: blueprint osc-network-unit-test-refactor Related-to: blueprint neutron-client
* | | | Merge "Trivial: Import network.common as network_common in server.py"Jenkins2015-12-051-9/+13
|\ \ \ \
| * | | | Trivial: Import network.common as network_common in server.pyTang Chen2015-12-061-9/+13
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | In server.py, identity.common is imported as identity_common. But network.common is imported as common, which is confuseing. This patch imports network.common as network_common. Change-Id: I74295bc88b22de398ab64fe556aedaca2453d17d
* | | | Merge "Refactor TestCreateNetwork: Setup identity client in setUp() in ↵Jenkins2015-12-051-22/+18
|\ \ \ \ | | |/ / | |/| | | | | | TestCreateNetworkIdentityV2"
| * | | Refactor TestCreateNetwork: Setup identity client in setUp() in ↵Tang Chen2015-12-051-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TestCreateNetworkIdentityV2 This patch setup the v2 identity client only once in setUp() for TestCreateNetworkIdentityV2. Change-Id: I9d7a83e5e67e810a5c5f760fb9c40ce450f7dc99 Implements: blueprint osc-network-unit-test-refactor Related-to: blueprint neutron-client
* | | | Merge "Refactor TestCreateNetwork: Setup identity client in setUp() in ↵Jenkins2015-12-051-17/+24
|\ \ \ \ | |/ / / | | | | | | | | TestCreateNetworkIdentityV3"
| * | | Refactor TestCreateNetwork: Setup identity client in setUp() in ↵Tang Chen2015-12-051-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TestCreateNetworkIdentityV3 This patch setup the v3 identity client only once in setUp() for TestCreateNetworkIdentityV3. Change-Id: Ia20db01af85f868a88bf905174b8556979b0a39a Implements: blueprint osc-network-unit-test-refactor Related-to: blueprint neutron-client
* | | | Merge "Refactor TestCreateNetwork: Setup cmd in setUp() in ↵Jenkins2015-12-051-11/+12
|\ \ \ \ | |/ / / | | | | | | | | TestCreateNetworkIdentityV2"
| * | | Refactor TestCreateNetwork: Setup cmd in setUp() in TestCreateNetworkIdentityV2Tang Chen2015-12-051-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch setup the tested command only once in setUp() for TestCreateNetworkIdentityV2. Change-Id: I689980674c9500c0c040d27164ec61f5fcf40ee5 Implements: blueprint osc-network-unit-test-refactor Related-to: blueprint neutron-client