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
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
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
Use TestNetwork in TestSetNetwork, and also setup test command
in setUp().
Change-Id: I4e72332fcf253407bb3d5f20aaf4be047046e146
Related-to: blueprint neutron-client
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
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
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
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
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
This patch setup the tested command only once in setUp() for TestCreateNetworkIdentityV3.
Change-Id: Iff5119fa24c9cc0caa72ff0e8f63e8dcac72470a
Implements: blueprint osc-network-unit-test-refactor
Related-to: blueprint neutron-client
In TestCreateNetwork, both Identity v2 and v3 clients are tested. As a result, we should
initialize the identity client again and again in each test function.
To reduce redundant code, this patch split TestCreateNetwork to TestCreateNetworkIdentityV2 and V3.
And then initialize the identity client only once in each of them.
Change-Id: I349fe7f827524beb541efe7dd9460c534254b80c
Implements: blueprint osc-network-unit-test-refactor
Related-to: blueprint neutron-client
The class inherit architecture in network unit test is different from other test classes,
which leads to lots of redundant code. This patch will make it the same as the other test
classes. And it will be more convenience for the coming up refactor.
Change-Id: I6f239dd54b9401ff2bbcf7ffdeb18769a450f573
Implements: blueprint osc-network-unit-test-refactor
Related-to: blueprint neutron-client
The following options of "server create" command support searching
by both name and ID. So add this info into doc.
--image, --volume, --flavor, --security.
Change-Id: I93b167da58144e5de6c9996009b7ea2449fb4cd8
The v2 SetVolume extends from show.ShowOne and returns None
after setting volume operation. It will raise an exception.
This patch is going to fix the issue by changing the parent
class of SetVolume to command.Command.
Change-Id: Iefa453fe4adad06f2a0601a052c01e74004be5b7
Closes-bug: 1521896
This patch provide a class to test "server list" command. Only one simplest
case in this patch.
Some of the options in "server list" are complicated. And the server object
contains lots of attributes need to be handled in specific ways. So other
test cases will be added in other patches.
Change-Id: Id9fdba8f149bd74187aa42516067dacebc6962b5
Implements: blueprint osc-unit-test-framework-improvement
setup_servers_mock() is now able to set methods to the fake servers.
But it cannot set attributes. This patch enable it to do so.
This will be useful in "server list" test cases.
Change-Id: Ic30d750ebe4650244707a368cdd5d622a8f1b8ed
Implements: blueprint osc-unit-test-framework-improvement
Introduce FakeImage to improve the current image unittest framework
with following two advantages:
1. generate more than one faking images
2. all faking images generated by random
Change-Id: Ide326fa2a047ddeea478bef97000083617a0b744
Implements: blueprint improve-image-unittest-framework
* Change session imports to keystoneauth1
* Change keystoneclient.exception imports to keystoneauth1
* Change exceptions raised from internal API from keystoneclient to openstack.common
Change-Id: I046d89f561d6fe04baae53726f9749d2e7fe2056