577 Commits

Author SHA1 Message Date
Jim Rollenhagen
c53de3214e Ignore case in security group rule --ethertype
Currently, this only allows 'IPv4' or 'IPv6', but one can imagine a user
frequently typing e.g. 'ipv6' and getting frustrated. Allow any case,
while still keeping correct case for the choices and the value sent to
Neutron.

Change-Id: I70ce1f43d32aad01b174437d03c984a5b608b161
2019-04-01 15:56:40 -04:00
Zuul
6bd9cb6359 Merge "Fix: incorrect check when no shared/private input" 2019-03-16 01:05:18 +00:00
Kailun Qin
510e9a7b8e Fix: incorrect check when no shared/private input
When neither of "--shared" and "--private" is input, we should not allow
to specify "--project". Defaulting the created network segment range to
shared is expected. Therefore, "project_id" attr should only be
populated on a private range creation.

Change-Id: Iab345e1651dd8b7904ff64a20633f194d719bb84
Story: 2005206
Task: 29980
2019-03-14 01:05:21 +08:00
Glenn Van de Water
7741347041 Fix service discovery in functional tests
If a required service is not enabled then we skip the test.
The discovery is done by tests/functional/base.py:is_service_enabled
but this method is broken, credentials are not passed to the
'openstack service show' command so every call will fail and every test
that relies on it will be skipped. This commit fixed that method and
the issues that popped up when re-enabling tests.

Network segment range:
 - issue where we assumed network-segment-range extension is always
   present
 - issue where we compare integers and string representations of numbers

Subnet:
 - issue where we try to deepcopy an uncopyable object in UnsetSubnet

Change-Id: Id3cc907c1ed2a25b49cf6f4a7233e0401a02383a
Story: 2005169
Task: 29908
2019-03-13 16:16:24 +01:00
Kailun Qin
28c06d0688 Fix: set invalid None project_id on range creation
"project_id" attribute should not be set to None on shared network
segment range creation since it is not a valid string type which is
required for the API.

Change-Id: Ia2bab12e39b4bb7e05ff2acfffb851252c100651
Story: 2005205
Task: 29975
2019-03-13 01:48:46 +08:00
Zuul
c36e75d986 Merge "Add 'security_group' type support to network rbac commands" 2019-03-11 02:41:39 +00:00
Zuul
6868499ad9 Merge "Add network segment range command object" 2019-03-08 02:27:37 +00:00
Kailun Qin
d52920b387 Add network segment range command object
Add network segment range command object in support of network segment
range management.

This patch set includes documentation, unit tests and functional tests
(currently skipped unit network segment range enabled in Neutron by
default) for the following new commands:
  - "os network segment range create"
  - "os network segment range delete"
  - "os network segment range list"
  - "os network segment range set"
  - "os network segment range show"

Co-authored-by: Allain Legacy <Allain.legacy@windriver.com>

[depends on removed by dtroyer as those are all +W and 
trying to pass the gate, OSC has it's freeze dealine looming]
 Depends: https://review.openstack.org/624708
 Depends: https://review.openstack.org/624709
 Depends: https://review.openstack.org/638386

Partially-implements: blueprint network-segment-range-management
Change-Id: I335692f2db5be07c1c164f09b13f1abb80b7ba33
2019-03-07 19:39:17 +00:00
Doug Wiegley
be7a75814c
Add 'security_group' type support to network rbac commands
Partial-Bug: #1817119
Depends-On: https://review.openstack.org/635311
Change-Id: I5f132fa54714514d8dae62df8bc494f3f6476768
2019-03-05 21:02:03 -07:00
Zuul
3d7772e34a Merge "Partially Revert "Add command to unset information from Subnet-pools"" 2019-02-27 22:15:48 +00:00
Bernard Cafarelli
05521bf84c
Remove str() when setting network objects names
Most network commands use str() on name argument, which fails on python
2 with Unicode characters. This comes from parsed arguments so does not
actually need this call.

Sample command failing with current code:
openstack network create test_unicode™

Change-Id: Ie10b67864c912ee5c33e90b10c3d9705ee8307e7
Story: 2004356
Task: 27955
2019-02-13 10:43:11 +01:00
Johannes Kulik
b8438adbbf Add floating IP filter to floating IP list command
Add a parameter ``--floating-ip-address`` to ``floating ip list``
because it's supported by the API and also more efficient than the
current ``floating ip show``. This also works as a work-around for
pagination issues ``floating ip show`` might run into with an IP
parameter.

Change-Id: I113e3fa2495e1e86bb553c55c44f71a3f9f49d23
2019-01-14 10:27:07 +01:00
Zuul
7b72fb816f Merge "Support enable/disable uplink status propagation" 2018-12-24 12:00:03 +00:00
Zuul
235999b995 Merge "Supports router gateway IP QoS" 2018-12-12 13:07:29 +00:00
Zuul
6fec6d625f Merge "Don't display router's is_ha and is_distributed attributes always" 2018-12-10 20:09:24 +00:00
LIU Yulong
fd23025227 Supports router gateway IP QoS
Adds --qos-policy and --no-qos-policy to `openstack router set`:
    --qos-policy <qos-policy> Attach QoS policy to router gateway IPs
    --no-qos-policy Remove QoS policy from router gateway IPs

Adds --qos-policy to `openstack router unset`:
  --qos-policy Remove QoS policy from router gateway IPs

Partially-Implements blueprint: router-gateway-ip-qos
Closes-Bug: #1757044
Change-Id: Ifec3b2cf9bdb59513c8bcd7bd60305506a071192
2018-12-10 17:20:38 +00:00
Hongbin Lu
c82f4237e5 Support enable/disable uplink status propagation
Add options to enable/disable uplink status propagation on creating
a neutron port.

Related patches:
* neutron: https://review.openstack.org/#/c/571899/
* openstacksdk: https://review.openstack.org/#/c/586687/

Depends-On: https://review.openstack.org/#/c/586687/
Change-Id: I095a98fc5f5aee62d979a16b3cd79d91ec3b9ddb
Related-Bug: #1722720
2018-12-05 21:07:07 +00:00
Zuul
4e6f47e28e Merge "Add metavar for name parameter in subnet create" 2018-10-03 01:30:11 +00:00
Brian Haley
3c5824415f Fix some spaces in help messages
Fix some missing and not necessary trailing spaces in
the network v2 API files.  Also fixed one block indent
that was different from all its friends.

Trivialfix

Change-Id: Ic6491203c2fb9085543d69f0bb5f38e5a96039da
2018-09-27 17:54:40 -04:00
Wenran Xiao
01c3548dc8 Fix help message for subnetpool default-quota value
Default pre-project quota is the number of IP addresses that can be
allocated from the subnet pool. For example, with a quota of 128,
I might get a 64 addresses subnet1, and 16 addresses subnet2,
and still have room to allocate 48 more addresses in the future.

Change-Id: Ia0ba827790b190647aed990e47347560fc9e9f0c
2018-09-19 10:11:47 +08:00
David Rabel
14ceb6307f Add metavar for name parameter in subnet create
Change-Id: I2511677006687fff3166441c51e91191492962f1
Closes-Bug: #1747731
2018-09-12 17:25:10 +02:00
Bernard Cafarelli
a5865b1763
Partially Revert "Add command to unset information from Subnet-pools"
We do not support removing a prefix from a subnet pool, only updating
with a larger prefix (which is handled by the set command)

This reverts commit 063c722a110031883e9615064092644de6df8da2.

Change-Id: I11224fbdb94dc1caef42a8a64cbcebaf1dc542fe
Story: #1670230
Task: #13697
2018-09-05 10:45:37 +02:00
Zuul
a84aa492a6 Merge "Detailed help message for QoS max-burst-kbps value" 2018-08-14 17:44:18 +00:00
Lajos Katona
5c0de6edc2 Detailed help message for QoS max-burst-kbps value
For QoS rule type bandwidth-limit the max-burst-kbps value for ovs and
linuxbridge is suggested to be 80% of the maxkbps value, let's give a
detailed help message for the CLI user.
For details see https://docs.openstack.org/neutron/queens/admin/
config-qos.html#user-workflow

Change-Id: Ia6e38ec7052b7af64880c2f4c5e242d7cb980df5
Closes-Bug: #1777866
2018-08-10 07:37:57 +02:00
Zuul
a051bda111 Merge "Add DNS support to floating IP commands" 2018-08-08 20:15:07 +00:00
Zuul
c387f83af1 Merge "Add dns-domain support to Network object" 2018-08-07 22:10:41 +00:00
Jens Harbott
ed09f28a9d Add DNS support to floating IP commands
Add the DNS domain and name options to the ``floating ip create``
command. Also add these two columns to the output of the
``floating ip list --long`` command.

Change-Id: Id4cb18b51b252f19b87b24ec5d77183771189d17
Story: 1547736
Task: 13114
2018-08-06 08:14:48 +00:00
Brian Haley
6cb0f0f79c Fix missing trailing spaces in network help messages
Trivialfix

Change-Id: I1eeab576e7f50d858860a19c045f24a33449dc92
2018-08-03 12:29:34 -04:00
Zuul
d838c69605 Merge "Support filtering port with IP address substring" 2018-07-25 00:42:32 +00:00
Zuul
00194b4e20 Merge "Do not require port argument when updating floating IP" 2018-07-24 00:53:33 +00:00
Zuul
d6cf027be1 Merge "Make Profile fallback go bye-bye" 2018-07-10 14:21:48 +00:00
Hongbin Lu
4a9cb8eea8 Support filtering port with IP address substring
Change-Id: I9559f1c0a6db943705bd32aefb60d7ea7054dd1b
Related-Bug: #1718605
2018-06-29 20:15:28 +00:00
Zuul
3493948d13 Merge "Format port_details field of Floating IP" 2018-06-28 17:26:06 +00:00
Zuul
4bde9af892 Merge "Network: Add tag support for security group" 2018-06-25 15:16:05 +00:00
Huang Cheng
5bb5585aa9 Fix subnet host_routes error
When updating subnet with "no-host-route" option, set host_routes to an empty list as neutron_lib.api.validators expected.

Change-Id: I6fe039793d813758429c7a104fd40172b4f8122b
Closes-Bug: #1747101
2018-06-14 13:03:46 +00:00
yanpuqing
402c9a21b3 Do not require port argument when updating floating IP
When setting floating ip other properties, port argument is
force to use.
The patch modifies the command, when setting floating ip other
properties, like tags, no need port argument.

Change-Id: I908712c8913f32d3dd5fdfefe7347277d72f66de
Story: 1751431
Task: 13865
2018-06-13 23:05:30 -04:00
Dongcan Ye
aaed4b315f Network: Add tag support for security group
Change-Id: Icccb23429913724c6a8bd15d4737672b47a5f13a
Closes-Bug: #1750983
2018-06-14 01:01:58 +00:00
Zuul
a7973d927d Merge "Remove deprecated ip floating commands" 2018-06-09 18:43:45 +00:00
Harald Jensas
e8c731547d Allow setting network-segment on subnet update
To enable the possibility to migrate a non-routed network to a
routed network allow updating the segment_id of a subnet.

Change-Id: I3ebae2ff28d5d4e5373ebd1f52194f8c52071b88
Partial-Bug: bug/1692490
Depends-On: I1aee29dfb59e9769ec0f1cb1f5d2933bc5dc0dc5
2018-06-06 11:56:39 +02:00
Sławek Kapłoński
9b6d02d5f9 Make max_burst_kbps option as optional for bw limit QoS rule
Attribute max_burst_kbps of QoS bandwidth limit rule in Neutron's
is optional in API so it should be also optional on client's side.

Change-Id: Ie085b73fa885ff12f9ac080666cf3ca6a09b632a
Related-Bug:#1770622
Task: 19658
Story: 2002017
2018-05-25 12:54:41 -07:00
Sławek Kapłoński
8db3933feb Don't display router's is_ha and is_distributed attributes always
In case when is_ha or is_distributed attribute of Neutron's router is
set to None, it means that it wasn't returned from server and should
not be displayed.
Otherwise it might be confusing for user is making
openstack router show <router_name>
call as an admin will return e.g. is_ha=True but same call done as
regular user will return False or None.
It might happen like that because returning of those attributes is
forbidden for regular users in Neutron's policy.json

Depends-On: https://review.openstack.org/567606/
Change-Id: I626b5193d9ecb308baad7b27939f9673c32b4182
Closes-Bug: #1689510
Task: 19789
Story: 2002110
2018-05-25 19:45:13 +00:00
Hongbin Lu
46f8614da8 Format port_details field of Floating IP
Depends-On: I31e940d2986278d2fbee6fdfea4ff15f7c07ebaa
Change-Id: I115739ea253ce26e075cd3f10e719b13f18afa5b
Partial-Bug: #1723026
2018-04-27 20:29:35 +00:00
Pierre Hanselmann
b8754e15e7 Add dns-domain support to Network object
Add "dns-domain" parameter to Network class. Also check
backend extensions and send an error message in case of
an argument (like dns-domain) is sent and the extension is
missing (dns-integration in this case).

Change-Id: I7303658c27d9b9f2d8381ccea0b29e96909cab54
Closes-Bug: 1633214
Partial-Bug: 1547736
2018-04-23 08:37:27 +00:00
Zuul
b59de7b849 Merge "Network: Add tag support for floating ip" 2018-04-23 08:12:25 +00:00
Dongcan Ye
09a0916dae Network: Add tag support for floating ip
Change-Id: I7a500a4ff6cec2442b4050df26c0b017d9f71903
Closes-Bug: #1750985
2018-04-17 15:52:52 +00:00
Sean McGinnis
d601415259 Clean up W503 and E402 pep8 errors
pycodestyle 2.40 and later enforce these rules that were not previously
enforced. Rather than just skipping them, this cleans up the trivial
instances of these violations.

This does also include some other updates that were not triggering errors
in an attempt to keep some of the style consistent.

Change-Id: Id7c0a6b8f1f835e69d844b000e3ed751852ada63
Closes-bug: #1762803
2018-04-15 12:23:06 +09:00
Dongcan Ye
ea89065dab Remove deprecated ip floating commands
We had already implemented floating ip(pool) commands more
than two cycles, we can remove those deprecated commands.

Change-Id: Ib98a7403a63bb0c48c03de4c79795737de2aa84c
2018-04-08 11:37:42 +00:00
Zuul
29d4dd7a61 Merge "neutron: add --mtu for create/set network" 2018-03-23 14:31:39 +00:00
Brian Haley
2ed1b24c71 Fix typo in 'floating ip associate' command and doc
Assocaite -> Associate

Trivialfix

Change-Id: I432e35ddcd80ef77c865bee9a54ac2777f5b6386
2018-03-15 16:30:43 -04:00
Emilien Macchi
18563b4132 neutron: add --mtu for create/set network
Support Neutron network mtu configuration with a new argument, --mtu
that allows CLI users to set MTU for Neutron networks.

Change-Id: I93d23581c7e8c84eaf9bb3b293360036f60f456b
2018-03-15 13:50:59 +00:00