| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update the "os availability zone list" command to support listing
network availability zones along with the currently listed compute
and volume availability zones. This adds the --network option to
the command in order to only list network availability zones. By
default, all availability zones are listed. The --long option
was also updated to include a "Zone Resource" column which is
applicable to network availability zones. Example zone resources
include "network" and "router".
If the Network API does not support listing availability zones
then a warning message will be issued when the --network option
is specified.
This support requires an updated release of the SDK in order
to pull in [1].
[1] https://bugs.launchpad.net/python-openstacksdk/+bug/1532274
Change-Id: I78811d659b793d9d2111ea54665d5fe7e4887264
Closes-Bug: #1534202
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactored the 'os security group delete' command to use the SDK
when neutron is enabled, but continue to use the nova client when
nova network is enabled.
This patch set introduces a new NetworkAndComputeCommand class
to be used for commands that must support neutron and nova network.
The new class allows both the parser and actions to be unique.
The current DeleteSecurityGroup class is now a subclass of this
new class and has moved under the network v2 commands.
This patch set also introduces a new FakeSecurityGroup class for
testing security groups.
And finally, this patch set updates the command documentation
for security group and security group rule to indicate that
Network v2 is also used.
Change-Id: Ic21376b86b40cc6d97f360f3760ba5beed154537
Partial-Bug: #1519511
Related-to: blueprint neutron-client
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
get_body() is needed in each network files to construct a dict
to pass to sdk proxy. And it is also used by several functions
in each file. So define it as a file level private helper function.
The unified prototype should be:
def _get_attrs(client_manager, parsed_args):
1. The name, in sdk, the parameter passed to proxy is named "attrs".
And it is a private method. So let's call it _get_attrs().
2. The parameters, besides parsed_args, when we deal with project
and project_domain, we have to make use of identity_client. So
let's pass in the client manager.
Change-Id: Ib044ebd4ddedbcd805f46334a7fe99e4ebb5b249
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| | |
Add "os port show" command.
Change-Id: Id87c81640e74c60ae8f247c722c64fdadff022a2
Partial-Bug: #1519909
Partially-Implements: blueprint neutron-client
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch allows the adding of availability_zone_hints during
router create. Also allows for the display of availability_zones
during list and and show commands.
Change-Id: Ifbc5c218bc7103d28076d726212ce25321bcf7f1
Partial-bug: #1519503
Partially-implements: blueprint neutron-client
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The OpenStack SDK is now used for the network client. However,
the 'openstack quota show' command wasn't updated for the
client change. As a result, the command will fail to show
network quotas when a project name is specified. For example:
$ openstack quota show admin
'Proxy' object has no attribute 'show_quota'
This patch set fixes the command by using the OpenStack SDK
to get network quotas for a project.
Change-Id: I59a7b6780a7b80cd09e79d40d214751b25d3016e
Related-To: blueprint neutron-client
Closes-Bug: #1528249
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add --availability-zone-hint parm to network create. Also add
availability_zones and availability_zone_hints to the network list and network
show commands
Change-Id: Ib4dc2e3e7897939be7bef6b25a095c8222b885bc
Partially-implements: blueprint neutron-client
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
OpenStack uses 'CIDR' incorrectly in many places. We are not going
to perpetuate that usage. The correct name here is simply 'subnet'
as the data is the network address for the subnet, in CIDR notation.
Also, some additional cleanups as suggested in comments to
https://review.openstack.org/#/c/84782
Depends-on: I3c0748074a6511ff92500516b3129886d2476eed
Change-Id: Ib44c49dc1739ce7d881432e482dd16f8928eef49
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
Subnet list command
Partially implements: blueprint neutron-client
Partial-Bug: #1523258
Change-Id: I3c0748074a6511ff92500516b3129886d2476eed
|
| |/
|
|
|
|
|
|
| |
This patch adds "port delete" command to osc.
Change-Id: I5c92b2f573249df4e6551506584ccafb4ff290b2
Implements: blueprint neutron-client
Partial-Bug: #1519909
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The keys() method returns the keys returned from Neutron, but
the SDK maps some things like tenant_id to project_id. This
makes the output a little prettier.
Change-Id: Ibd8c890b61ffc94021f93fc1051fcf5dabd1e9ea
|
| | |
| |
| |
| |
| |
| |
| |
| | |
In python-openstackclient some test cases using asserEqual(None, *)
instead of assertIsNone(). assertIsNone method provides clear error message.
Change-Id: I3069a6436d11efa513ae94f21ceab46c498d6e25
Closes-Bug: #1527054
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds "router show" command to osc using sdk.
Change-Id: Idb0f7f0376926e97f9f70a52ef21511e7ffa9d92
Implements: blueprint neutron-client
Partial-bug: #1519503
|
| |\ \ \
| |/ / |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds "router delete" command to osc using sdk.
Change-Id: I47d0ca7f7984942ffceaeb1c9ac69efd09145f40
Implements: blueprint neutron-client
Partial-bug: #1519503
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
We won't need this anymore.
Change-Id: Ib10be1dedb8db81f0cba6e45b8a9b0aade2ab473
|
| |
|
|
|
|
|
| |
Finish up the SDK integration with server create network and port
find and extension list.
Change-Id: I18dbada784d8aa92a45a937f251023ddf899c53e
|
| |
|
|
|
|
| |
Change-Id: Ibd4f8bb602acdcc3421205d9dafc8dcafb9645df
Implements: blueprint osc-network-unit-test-refactor
Related-to: blueprint neutron-client
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
identity v2 and v3
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
unit test of network
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
|