12314 Commits

Author SHA1 Message Date
Adit Sarfaty
183b86b1f0 NSX|P: Basic router interface & GW support
Additional actions will be added with nsxlib support

Depends-on: I10a3f691b33e37e1cd8ec8094f4bfa89d7a96f35
Change-Id: I92fff433646202a0245c1cef9630173fe245a296
2018-11-28 14:46:29 +00:00
Adit Sarfaty
5e4a33e3d5 TVD LBaaS: fix operational status api
Change-Id: I210b73d33d615be84eb74e87d45989b0bc8df593
2018-11-28 10:28:36 +00:00
Zuul
5164f6b7b3 Merge "stop using _apply_filters_to_query" 2018-11-27 13:16:08 +00:00
Zuul
008d408c75 Merge "Fix devstack docs for advanced services" 2018-11-27 12:14:32 +00:00
Zuul
07f7c0716b Merge "Use tenant context to get router GW network" 2018-11-25 07:43:17 +00:00
Zuul
8d24384328 Merge "NSX|v: refactor unittests with disabled dhcp" 2018-11-23 12:47:58 +00:00
Adit Sarfaty
30f3d4a31d Fix devstack docs for advanced services
Change-Id: Icce27bcfda465f95c9a4bca16ea3e69e4bf0def0
2018-11-22 15:00:15 +02:00
Adit Sarfaty
dc3b5bb0b4 Use tenant context to get router GW network
If the tenant tries to use a network he is not allowed to, the router
action should fail with the NotFound reason.

Change-Id: I6eb32636f8e188f2abc7df22cc1732966f968538
2018-11-22 12:45:10 +00:00
Zuul
3e63e06182 Merge "Set correct switch security profile when port sec disabled" 2018-11-21 09:07:57 +00:00
Zuul
c0384c9e8a Merge "stop using _get_collection_query from CommonDbMixin" 2018-11-21 08:00:01 +00:00
Zuul
a78306f15f Merge "NSX|P: Initial admin utilities" 2018-11-21 06:58:05 +00:00
Zuul
29d0a1e5d1 Merge "NSX|P: Port create/update/delete enhancments" 2018-11-21 06:58:04 +00:00
Zuul
89bb0903fa Merge "use neutron-lib for _model_query" 2018-11-21 06:44:22 +00:00
Adit Sarfaty
11294b52dc NSX|v: refactor unittests with disabled dhcp
The NSX-V plugin unit tests copied multiple upstream tests in order to
disable the subnet dhcp for the tests to pass.
This patch uses a decorator instead so that new changes in those
upstream tests will not fail the plugin tests.

Change-Id: Iebf88179252b1d7fa9271baf43e34a20eeea8cb9
2018-11-21 05:54:23 +00:00
Zuul
e125c61245 Merge "stop patching RbacNeutronDbObjectMixin" 2018-11-21 01:09:16 +00:00
Zuul
85779ecace Merge "stop using common_db" 2018-11-21 01:05:26 +00:00
Zuul
e8593381c3 Merge "NSX|v3: Delete unused vpn services" 2018-11-21 01:00:39 +00:00
Boden R
b3a6859eb1 stop patching RbacNeutronDbObjectMixin
No need to patch neutron.objects.rbac_db.RbacNeutronDbObjectMixin
directly as the QoSPolicy OVO can be patched instead to remove the
dependency on neutron for the said. This patch does just that.

Change-Id: I530694c2fbb6d8394394bb6c889484b086ef7e04
2018-11-19 14:47:32 -07:00
Gary Kotton
e5b5ea646b Set correct switch security profile when port sec disabled
Ensure that the swicth security profile does not have any
security features on it when port security is disabled.

Change-Id: Ib3aa7f3b960d3a03d1c9eb24ce376b311abd9324
2018-11-18 08:13:01 -08:00
Salvatore Orlando
ba5f509497 NSX-v3: Fix listener for pool not fetched anymore
Due to neutron-lbaas commit c672b0d5 the listner property, used
for backward compatibility, is not populated anymore in the pool
object passed to the driver.

This patch ensures that upon pool creation a listener, if set,
is always correctly retrieved.

Change-Id: Ia09e56ad11cba9cd22b22c117923e683042b00b5
2018-11-17 15:58:15 -08:00
Salvatore Orlando
4860b8cfaa NSX-v3: Prevent comparison with None
In some circumstances virtual_server_ids in the function handling
member creation for the LBaaS driver can be None, triggering an
exception when checking if a given virtual server id is in the
list.

This patch ensures the variable is always a list.

Change-Id: Ia496649c909130906df66c114ac301b6f5af25cf
2018-11-17 15:56:07 -08:00
Boden R
38505fd6bb stop using common_db
All of the functionality of CommonDbMixin is now available in
neutron-lib and there's no need to inherit from CommonDbMixin anymore.
This patch removes usage of neutron.db.common_db.

Change-Id: I912b2c081357867c20de36b4491b429fe3c9e7d9
2018-11-16 10:55:55 -07:00
Boden R
8782daa403 stop using _get_collection_query from CommonDbMixin
The _get_collection_query of CommonDbMixin is available via the
model_query module in neutron-lib. This patch switches over to
neutron-lib's implementation rather than using it from neutron's
CommonDbMixin

Change-Id: Iab35080ac9f1ad49e4d8dabf44980a9c4d32bac2
2018-11-15 15:26:49 -07:00
Boden R
ddb130736a stop using _apply_filters_to_query
The common_db_mixin will module eventually be removed from neutron as
its functionality is available via neutron-lib. This patch switches
uses of  _apply_filters_to_query() over to apply_filters() from
neutron-lib's model_query module.

Change-Id: Ia8f69dcb0896f6383bae87164f8b165fb98772d1
2018-11-14 15:00:01 -07:00
Boden R
22acff71d0 use neutron-lib for _model_query
The model_query module is in neutron-lib and the CommonDBMixin will
eventually be removed. This patch swiches use of the _model_query
method over to query_with_hooks from neutron-lib.

Change-Id: I5f626c4aef1fba38c42a17c14861645f8c5d2129
2018-11-14 10:20:24 -07:00
Kobi Samoray
ef81e5b565 NSXv: use admin context for metadata port config
Using session context for the port creation caused conflict with IP
allocation for the metadata port.
Use of a new admin context resolves this issue.

Change-Id: Ic65b70ffd80be07aae4b668b4b8af09a915ab747
Co-Authored-By: Salvatore Orlando <sorlando@vmware.com>
2018-11-14 12:30:08 +00:00
Adit Sarfaty
f7795e275d NSX|P: Initial admin utilities
Adding the infrastracture for the policy plugin admin utils with one
example utility to list the security groups, networks & routers.

Depend-on: I10a3f691b33e37e1cd8ec8094f4bfa89d7a96f35
Change-Id: I8094b241255537a1668837ed4ca1dad8094dcc41
2018-11-14 12:29:14 +00:00
Adit Sarfaty
35549f46a6 Skip new unsupported unittests
Commit If276a7613c156f8c826967c9c8cbd6f2a8d32674 added unsupported tests
which are now skipped by the different plugins

Change-Id: If0e98cd533c83999a67e7905d8d0ec7d903c0d70
2018-11-14 12:31:34 +02:00
Adit Sarfaty
cbd10d1e79 NSX|v3: Delete unused vpn services
NSX vpn services are reused by vpnaas services. Now the NSX service will
be deleted if no vpnaas service uses it.

Change-Id: I09c79cca1560ad091a8b09a4ad65f052c6bf808b
2018-11-13 18:10:08 +02:00
Zuul
b93ef6dbb8 Merge "NSX-v3: Fix LB HTTP/HTTPS monitor impl" 2018-11-12 19:09:08 +00:00
Zuul
f6ba68e511 Merge "NSX|V3: Fix LB VIP advertisement" 2018-11-11 11:00:40 +00:00
Adit Sarfaty
ff6c595b90 NSX|P: Port create/update/delete enhancments
Complete the support for port operations
+ enabling hte relevant tempest tests

Depends-on: Ib5d26e8b22a9a167151fb17e087e8b561ea74783
Change-Id: Ia31e2180b880b29608dab42b4c810ae68547c24b
2018-11-11 12:33:24 +02:00
Salvatore Orlando
6a5c86509f NSX-v3: Fix LB HTTP/HTTPS monitor impl
This patch ensures method and URL for the monitor are
correctly set in the backend resource.

Change-Id: I23051ba8e05cec4978ccad4c1037b0779b893a5b
2018-11-11 11:11:39 +02:00
Adit Sarfaty
6a851c4b50 NSX|V Fix orphaned networks and bindings
PLR distributed routers edges and logical switches were considered as orphaned.
This patch adds the logic to validate those as well.

Change-Id: I4a77e34b6b345364d074160ebec80db965068265
2018-11-11 09:00:08 +00:00
Adit Sarfaty
b263b592b9 NSX|V3: Fix LB VIP advertisement
The LB VIP should be advertised by the Tier1 router only if it is on the
external network.
To do that, the global advertise vp flag will not be set, and instead a rule with a
filter to advertise only the VIPs on the external network is added.
In addition, an admin utility is added to update already existing routers with
loadbalancers.
Since VPNaaS also uses the router advertisement rules, its code was also updated so
that each application will handle only its own rules.

Change-Id: Ibfac0406a8c3009c323828cc42c96012e70cb0a9
2018-11-11 08:59:54 +00:00
Adit Sarfaty
b024fb250d NSX|V: Fix broken unittests
Commit Ia769dadf69781ba511a19c52998949b668963a19 changed a unittests
which was originally overriden by the plugin unitests to use dhcp
disabled subnet.
This patch makes the same change in the local unit test

Change-Id: I0794c2fe2bdb2ec1215cc11652f15da62f8daf9d
2018-11-11 08:46:03 +02:00
Zuul
77de3838f9 Merge "NSX|V3 Fix dhcp binding rollback" 2018-11-08 11:07:28 +00:00
Zuul
89dcad4ac4 Merge "NSX|V3: Fix FW(v2) status when deleting an illegal port" 2018-11-08 11:07:27 +00:00
Adit Sarfaty
00134a8e31 NSX|P provider networks support
Supporting provider networks including:
- Creating a base plugin for T & P plugins (separate from V)
- Moving some nsx-T code to the common plugin after stripping
  it from v3 specific code
- Reusing the nsx-T DB table for keeping the provider network
  configurations
- Support for vlan transparent
- Support for update network action

Also adding unit tests for provider networks and enabing tempest
tests for networks

Change-Id: I505ef65f2ee6bfba78dadff62c4c06463ebffff0
2018-11-07 16:18:57 +00:00
Zuul
e3e0dbca96 Merge "Update min tox version to 2.0" 2018-11-06 13:23:44 +00:00
Adit Sarfaty
f771099079 NSX|V3 Fix dhcp binding rollback
When adding DHCP binding to the nsx DB fails, the rollback
got the wrong parameters

Change-Id: Ib3508af7743d3e9098cb90736acc6229b84c6ac5
2018-11-06 13:36:57 +02:00
Zuul
121344fc7d Merge "use lib's object registry for neutron objects" 2018-11-06 07:28:49 +00:00
Nguyen Hai Truong
5bb4f882df Update min tox version to 2.0
The commands used by constraints need at least tox 2.0.
Update to reflect reality, which should help with local running of
constraints targets.

Change-Id: I301278dd742037fd4a1ca498ace8e3a4e299bf56
2018-11-05 19:18:48 -08:00
Zuul
188c5d7787 Merge "Ensure NSX VS is always associated with NSX LBS" 2018-11-05 22:05:33 +00:00
Zuul
595128350b Merge "Policy plugin - fix port tags" 2018-11-05 09:17:58 +00:00
Zuul
77f642a1cc Merge "NSX|V3: validate LBaaS NSX stats fields" 2018-11-05 07:24:11 +00:00
Adit Sarfaty
34b4dce552 Policy plugin - fix port tags
Change-Id: I05b704409d1d770f1af118d0b6c6f40dbd029ccd
2018-11-05 08:30:36 +02:00
Boden R
842b8bda56 use model_query from neutron-lib
The neutron.db._model_query modules was rehomed into neutron-lib and
also shimmed in neutron with https://review.openstack.org/#/c/591852/
This patch switches the imports over to use neutron-libs model_query
rather than neutrons.

Change-Id: I2e460e3cb93309e2539f94658d60c4ffca572e50
2018-11-04 12:18:11 +00:00
Salvatore Orlando
0f41d6ec49 Ensure NSX VS is always associated with NSX LBS
Add NSX VS to NSX LBS also if NSX load balancer bindings are
found in the database. This alone indeed does not imply the virtual
server is already associated with the load balancer as the bindings
could have been created when a member for another pool was added.

In order to avoid wasteful NSX round-trips this patch moves the check
for VS-LBS association after the addition of the member to the pool.
This allows for executing the check only for the first member of
a given pool.

Change-Id: I239f4c6bcf07279c523ba861abfe27e8029015c6
2018-11-04 11:57:21 +02:00
Boden R
b19c04aa94 use lib's object registry for neutron objects
This patch switches some of the direct reference that use
neutron.object.* modules over to use neutron-libs object registry
mechanism. The remaining reference to neutron objects will be addressed
after some additional work is done in neutron/neutron-lib to prep them.

Change-Id: Ie54b3d89d7029ab58498fd212736ed50977ccfc1
2018-11-04 09:56:10 +00:00