Commit Graph

1274 Commits

Author SHA1 Message Date
Nguyen Hai Truong
0a6dcc55aa Update min tox version to 2.3.2
After latest changes on tox.ini, the minimum
version of tox need to be changed to 2.3.2.

https://bugs.launchpad.net/neutron/+bug/1695888

Change-Id: I006274862f9d66af86db47f29f3b5bf7ac3fc103
2018-11-09 00:54:46 +07:00
Zuul
cfd9153dbf Merge "api-ref: document floating ip pools endpoint" 2018-11-08 17:30:28 +00:00
Zuul
b5f3bc7f01 Merge "Add shim extension l3-port-ip-change-not-allowed" 2018-11-07 00:10:32 +00:00
LIU Yulong
cd2c69890b Add shim extension l3-port-ip-change-not-allowed
Change-Id: I3578ef48432792aca25acf7c30413d79a0fd4065
Closes-Bug: #1796824
2018-11-06 23:15:47 +08:00
LIU Yulong
8dc31ec5f2 Disable port number 0 for floating IP port_forwarding
Floating IP port forwarding internal or external port number should
not allow 0, otherwise you will get some ValueError exception in
neutron server.

Directly modify the floating-ip-port-forwarding extension to change
the external_port and internal_port minimum value.

Change-Id: Icb177932f6cf1262757b29cb9b997321704616b7
Closes-Bug: #1799150
2018-11-02 23:06:28 +08:00
Zuul
987fc92fef Merge "rehome the resource_extend db module" 2018-10-31 00:46:37 +00:00
Hongbin Lu
dafbd30ef8 Support custom filters in OVO
In sqlalchemy, there are some advanced filter criterion but
such filter criterion is not supported in OVO. An example
is the "not in" criterion which is achieved by
"query.filter(~db_model.column.in_(values))". Another example
is the "not equal" criterion which is achieved by
"query.filter(db_model.column != value)"

This commit adds support for custom filtering. We introduce
a base class called "FilterObj" from which the custom
filter class should inherit. This commit also implements two filter
class: one for implementing the "not in" criterion and the other for
the "not equal" criterion. In addition, it makes StringMatchingFilterObj
inherit from the FilterObj class.

Needed-By: https://review.openstack.org/#/c/609848/

Change-Id: I9ac7fb000d2bed445efbc226c30abdcd981b90cb
Partial-Implements: blueprint adopt-oslo-versioned-objects-for-db
2018-10-29 15:27:50 +00:00
Boden R
e5afd0b9cb rehome the resource_extend db module
This patch rehomes neutron.db._resource_extend into neutron-lib. While
the module is private in neutron, it's used by consumers today [1]. The
patch also includes a test fixture along with unit tests and a
release note.

[1] http://codesearch.openstack.org/?q=from%20neutron%5C.db%20import%20_resource_extend&i=nope&files=&repos=

Change-Id: I2306ba92dcf4a989c7c73e5f0ef4bfb4f804b6cd
2018-10-25 15:42:00 -06:00
Nate Johnston
0ecceacb3e Fix random_mac_generator to make proper EUI64s
The initial implementation of random_mac_generator created MAC addresses
that were one octet too long - the MAC addresses would have seven octets
instead of the proper EUI64-standard six.

This resolved testing issues in the consuming patch in Neutron (see
the change referenced in the Needed-By line).  A test is added that
replicates the conditions of the failure.  In the failed tests, the base
mac '12:34:56:78' was instead parsed so it became '12:34:56:7:8'; when
the code went to add 2 octets to the result, there were too many octets
to form a valid EUI64 MAC address.

Implements: blueprint speed-up-neutron-bulk-creation
Needed-By: https://review.openstack.org/584061
Change-Id: I9a2c40709db9204c7686500deac9ee8e8471b1bc
2018-10-25 10:57:56 -04:00
Zuul
a8751fb404 Merge "Use QoS constants definitions" 2018-10-23 00:24:45 +00:00
Zuul
a39205075a Merge "Allow advsvc role to create port in foreign tenant" 2018-10-22 22:22:35 +00:00
Zuul
a4f84754de Merge "Add api-ref for qos-rules-alias extension" 2018-10-22 10:27:56 +00:00
Maciej Józefczyk
00147a7d70 Allow advsvc role to create port in foreign tenant
Change [1] introduced support for advsvc role. This added
possibility for user with role advsvc to make CRUD operations
on ports, subnets and networks in foreign tenants.
Due the check in _validate_privileges() it was not working.
This patch fixes that.

Closes-Bug: #1796854

[1] https://review.openstack.org/#/c/101281

Change-Id: I6a3f91337bf8dd32012a75916e3409e30f46b50d
2018-10-22 08:21:39 +00:00
Miguel Lavalle
0c476067f6 Add api-ref for qos-rules-alias extension
Add api-ref for the qos-rules-alias extension.

Change-Id: I6d2d32f89e04a8ad83fae2a1183d572221881b90
Partial-Bug: #1777627
2018-10-19 16:35:29 -05:00
Miguel Lavalle
3e44497d15 Use QoS constants definitions
Some of the QoS API extensions definitions were using literal string
constants when defining attributes, instead of commonly predefined
constants. This patch fixes that situation.

In addition, modules related to the metering extension are also
updated to re-use the DIRECTION constant.

Change-Id: Ib1c272f6ce11864bd461bb8c29ee8cad0e91945d
2018-10-19 11:44:32 -05:00
Zuul
8225a6b6a3 Merge "Use authorize instead of enforce in policy" 2018-10-15 21:43:45 +00:00
Miguel Lavalle
eb2e5c96ae Define qos-rules-alias extension
This patch adds qos-rules-alias extension to enable users to perform
GET, PUT and DELETE operations on QoS rules as though they are first
level resources. In other words, the user doesn't have to specify the
QoS policy ID

Change-Id: I5366dfee9b760ff5c884981582cdd17245b4d16f
Partial-Bug: #1777627
2018-10-14 19:39:39 -05:00
Juan Antonio Osorio Robles
f27064ffb9 Use authorize instead of enforce in policy
the policy module was doing a manual check to see if the specific rule
was actually part of the rules that the enforcer is using. oslo.policy
already has a function that does just this, which is 'authorize'. That
will check the registered rules and raise an exception if that's not
fulfilled.

Change-Id: I9f04f8b8770b15ac24f9f1cd57a58c7e98b24d48
2018-10-11 08:59:48 +03:00
Doug Hellmann
fe62f2ec7f build universal wheels
By default setuptools produces a version-specific wheel file so
installation under other versions of Python require extra work at
install time. This change turns on "universal" wheel support, so that
the wheel file will be marked as supporting both Python 2 and 3.

Change-Id: I00bc3d736e87bcc3a122b688c5e10e82b1b03d84
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-02 18:23:56 -04:00
Rodolfo Alonso Hernandez
691cd287ba PlacementAPIClient.update_resource_class client call missing argument
"PlacementAPIClient.update_resource_class" is calling Placement client
"put" method with a missing argument, "data". In this call, "data"
should be None [1], but it's a positional argument and must be passed.

[1] https://github.com/openstack/nova/blob/master/nova/api/openstack/placement/microversion.py#L41

Change-Id: Iedcad7c81a913923506bed2762b60b094f2d601d
Closes-Bug: #1794545
2018-09-26 16:15:16 +01:00
Zuul
f7fad5fe7b Merge "Let Neutron enforce rule on create_subnet with segment_id [neutron-lib part]" 2018-09-25 22:05:02 +00:00
Mykola Yakovliev
d14b379d1c Let Neutron enforce rule on create_subnet with segment_id [neutron-lib part]
Neutron ignores rule in policy file [0], that allows non-admin users
to create subnets with segment_id.

[0] https://github.com/openstack/neutron/blob/master/etc/policy.json#L19

Change-Id: I313aadc53f728663fd774957c1bd92247d1513ca
Partial-Bug: 1784259
2018-09-24 15:37:20 -05:00
Zuul
0cea7b9deb Merge "Fix the mistake of lbaas api-ref" 2018-09-20 22:11:22 +00:00
Brian Haley
157c507f70 Fix port_range_max attribute definition
port_range_max in an ICMP security group rule defines the
ICMP code value, fix a copy/paste typo.

Change-Id: I4356610d106385c72afc9c3fb7b194c690c56cae
Closes-bug: #1793285
2018-09-19 09:22:35 -04:00
Akihiro Motoki
bede782630 policy-in-code support in neutron-lib
policy-in-code will be supported by the main neutron repo
because the neutron API layer uses the policy code in the neutron repo.
However, neutron_lib.context refers to its own policy enforcer,
so we need a small code to support policy-in-code in neutron-lib side.

Part of blueprint get-policy-from-neutron-lib
Change-Id: I4923a069f4080dc53a8fb359f5a1518de06feb2f
2018-09-17 08:59:57 +00:00
Steve Kowalik
c436b10e56 Switch to oslo_messaging.ConfFixture.transport_url
oslo_messaging's rpc_backend setting, which is set by
ConfFixture.transport_driver has been deprecated since Newton. To allow
oslo_messaging to remove it, switch to setting transport_url instead.

Change-Id: Ib8839df1ae7e69bd751834903adcb96395154bf6
Partial-Bug: #1712399
2018-09-10 16:28:12 -06:00
Andreas Jaeger
f65cabd089 Use templates for cover and lower-constraints
Use openstack-tox-cover template, this runs the cover job
in the check queue only.

Use openstack-lower-constraints-jobs template.

Remove jobs that are part of the templates.

Change-Id: I168feb6c304cf14efe06e6d8f3726facc1c3c7b4
2018-09-07 15:35:30 +02:00
Zuul
8a7d0ac7ff Merge "Fix placement_client max microversion" 2018-09-06 21:09:51 +00:00
Zuul
736b876d9a Merge "Show is_default as a valid parameter for subnet pool creation" 2018-09-06 08:33:40 +00:00
Lajos Katona
0555ffe4b2 Fix placement_client max microversion
Placement introduced the json body response for resource provider
creation from microversion 1.20.
As the client introduced in neutron_lib uses the returned body (see:
https://review.openstack.org/589749) the used maximum microversion must
be bumped as well.

Change-Id: I71a723a95fb407a97aa6793beb965ae7be1769a7
2018-09-05 07:46:13 +02:00
Zuul
c9a094a9e6 Merge "Add 'project_default' attribute to Network" 2018-09-05 02:10:37 +00:00
Mykola Yakovliev
9d20ecd9aa Show is_default as a valid parameter for subnet pool creation
Change-Id: I36e30d92f5ba763e3d1a410399e99dbcb207865b
2018-08-30 15:25:06 -05:00
yanpuqing
2c98c01e99 Fix the mistake of lbaas api-ref
There are some mistakes of lbaas api-ref.
1.There is no definition for "status", "status_description",
"healthmonitors_status", "provider", "subnet_id", "vip_id"
attributes in the pool, and "listeners", "session_persistence"
should be defined in the pool.
2.The protocol_port of listener and the delay of healthmonitor is an
integer.
3.The id of healthmonitor of the pool named "healthmonitor_id"
rather than "healthmonitors".
4.There is no "name" attribute in "POST /v2.0/lbaas/health_monitors"
request body, but from the lbaas v2.0 code and datamodel, there is
 a "name" attribute added in to healthmonitor object.
The patch fixes those mistakes.

Change-Id: Ia7417c818f6646c419f734d7273fd3bf8eb5aad5
Closes-Bug: #1719259
2018-08-30 07:25:51 +00:00
Doug Hellmann
3a2fc5b123 add lib-forward-testing-python3 test job
This is a mechanically generated patch to add a functional test job
running under Python 3 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Iee4060c3d566c312ece529f82bbd93c1a2661e78
Story: #2002586
Task: #24314
2018-08-29 17:39:04 -04:00
Doug Hellmann
89d569fb34 add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Ie8653b10f2002206998b8a245137ce992a934852
Story: #2002586
Task: #24314
2018-08-29 17:38:57 -04:00
Doug Hellmann
60716a2b96 switch documentation job to new PTI
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs as part of the
python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Ibbe8311a9884afff9a38c6c35c5ebcf9e2990322
Story: #2002586
Task: #24314
2018-08-29 17:38:42 -04:00
Doug Hellmann
b06d4cbda3 import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I0e2bf8ce2d5b915ef5a6f16a46957fcdb66b4be9
Story: #2002586
Task: #24314
2018-08-29 17:37:27 -04:00
Zuul
61e2a98ed0 Merge "api-ref: Add port-resource-request extension" 2018-08-29 15:15:46 +00:00
Zuul
31b2af7e9f Merge "Add is_filter to network_ip_availability" 2018-08-29 10:28:52 +00:00
Lajos Katona
9f32a2d04e api-ref: Add port-resource-request extension
Change-Id: If345ef3ac910ea0a57044f026a2fb74a46882fd9
Partial-Bug: #1578989
See-Also: https://review.openstack.org/502306 (nova spec)
See-Also: https://review.openstack.org/508149 (neutron spec)
2018-08-28 15:08:19 +02:00
Hongbin Lu
10eaab3242 Add is_filter to network_ip_availability
Change-Id: Ie1d69c3575210c99f9f4c3e9f709da5d3f972c06
2018-08-27 21:42:50 +00:00
Zuul
df512e5b02 Merge "Adds qos-gateway-ip extension api definition" 2018-08-25 01:45:21 +00:00
Zuul
24eee17749 Merge "Introduce Port resource request extension" 2018-08-24 23:54:33 +00:00
Zuul
7a7ef66564 Merge "Mechanism driver API: resource_provider_uuid5_namespace" 2018-08-23 10:07:53 +00:00
Zuul
83029819cd Merge "Placement: utils" 2018-08-22 21:05:12 +00:00
Zuul
db3cbf5bca Merge "Placement: constants" 2018-08-22 19:29:26 +00:00
Zuul
7f7f7e49a2 Merge "Placement client: move to neutron_lib.placement" 2018-08-22 19:29:25 +00:00
Zuul
1dbb22417e Merge "Placement client: optional RP generations" 2018-08-22 19:17:14 +00:00
Zuul
e58d872e60 Merge "Placement client: ensure_resource_provider" 2018-08-22 19:17:13 +00:00
Zuul
947e730328 Merge "Placement client: always return body" 2018-08-22 19:17:12 +00:00