11993 Commits

Author SHA1 Message Date
Boden R
cc09f65ca4 shim references for port_binding
As a consequence of implementing multiple port bindings in the Neutron
reference implementation [1], the following attributes were made lists:

- 'port_binding' in the in the SQLAlchemy Port model.
- 'binding' in the Port OVO

As a consequence of this change, these attributes names were changed to
'port_bindings' and 'bindings' respectively. This patch updates the
references to those attributes.

To support neutron envs, both with and without the neutron change [2],
this patch adds a shim to use the proper port binding accessor.
NB: this shim may allow the tests to pass but does not test using the
proper "depends on" approach since that doesn't work today with the 3rd
party VMware NSX CI.

For more details see [1][2].

[1] https://review.openstack.org/#/c/571041
[2] https://review.openstack.org/#/c/414251

Change-Id: I35c24b83150d84a15997c5ebe3e7b51015f87e99
2018-06-15 15:23:55 -06:00
Zuul
675251af75 Merge "fix lower constraints targets in tox ini" 2018-06-15 20:29:30 +00:00
Zuul
1c0d8402fa Merge "NSX|V3: Fix ENS check on update network with QoS" 2018-06-15 18:27:46 +00:00
Boden R
3cce888421 fix lower constraints targets in tox ini
This patch updates tox ini to support both a dev and build target;
lower-constraints-dev and lower-constraints respectively.
The dev target is for running locally so it manually installs the
required projects whereas the build target doesn't as per zuul's
required project definition in project.yaml.

Also see https://review.openstack.org/#/c/573386/

Change-Id: I0e6cf1ca0f4b07c080ff5a7b221dabedfd8bf6cf
2018-06-14 06:45:46 -06:00
Boden R
b42661c957 updated lower constraints jobs for include dependencies
This patch updates our local zuul.yaml to define the required projects
so they are pulled into the jobs.

Change-Id: I1e668f9413363954f148f35f88c4c0687ce4f2c0
2018-06-14 06:44:21 -06:00
Adit Sarfaty
7d02b8b5fe NSX|V3: Fix ENS check on update network with QoS
Change-Id: I5209fdfe1e5099b6fcafd3bdd5b1d815302fb000
2018-06-14 10:13:47 +00:00
Zuul
c9f7c18b36 Merge "Fix LB drivers to have a core plugin" 2018-06-14 08:56:27 +00:00
Zuul
ed4d20b20b Merge "NSX-V: fix exception for distributed router" 2018-06-14 08:38:54 +00:00
Zuul
1ab44433bb Merge "NSX|V3: Add ovs_hybrid_plug flag in ports" 2018-06-14 08:38:54 +00:00
Zuul
3de53d493a Merge "Fix FWaaS callbacks imports" 2018-06-14 08:28:47 +00:00
Zuul
e196b84fbb Merge "add enabled/disable on lbaas listener" 2018-06-14 07:02:01 +00:00
Zuul
b56e65eac5 Merge "NSX|V3 add LBaaS listener description to the backend object" 2018-06-14 06:57:09 +00:00
Zuul
f69dc80a2f Merge "NSX|V3: Fix router delete callback for LBaaS" 2018-06-13 19:24:24 +00:00
Adit Sarfaty
c114e8a571 NSX|V3 add LBaaS listener description to the backend object
Change-Id: Ia13c283510b657ac9a5dc18f2932b4963a2308a4
2018-06-13 14:35:45 +03:00
Zuul
41c16b6a03 Merge "NSXv3: add pool-level lock for LB pool member operations" 2018-06-13 11:07:55 +00:00
Adit Sarfaty
63fbeaa3bc Fix LB drivers to have a core plugin
The recent Octavia preparation caused the LB drivers not to have
a core_plugin property which fails the on-router-action callbacks.
This patch will address it.

Change-Id: I6b2c98bd605ff33bf173911898267a8ed3f7045f
2018-06-13 10:55:25 +00:00
Adit Sarfaty
007350b0bb NSX|v Do not allow changing the type of a router with firewall
Currently the plugin does not support shared routers with FWaaS firewalls.
So it should fail when the user tries to change the type of a
router with a firewall to 'shared'.

Depends-on: Ib31210121a56561fb33a8ed0a1fbbdf6b01db727
Change-Id: Ieeed46ffd7309a8a8d423e44f766fec5f47b6184
2018-06-13 07:52:38 +00:00
Adit Sarfaty
8d06a9f1f3 NSX|V3: Add ovs_hybrid_plug flag in ports
FWaaS expects OVS ports to have this flag, so the patch adds it
as False to the get_port results

Change-Id: Ifc1f1cddc0ee737a4c463e4e1e0f8bb6de49e71b
2018-06-12 15:34:51 +03:00
Adit Sarfaty
fd1747a41c Fix FWaaS callbacks imports
Commit I4ebd24f1b13eb823c4d63452fd37cace5bcf5481 moved some files
that the FWaaS callbacks import.

Change-Id: Iec0d68f2d62f1f32e12e09db40253f5545f8fcec
2018-06-12 15:13:24 +03:00
Michal Kelner Mishali
7a402d2bdc NSX-V: fix exception for distributed router
When trying to add interface to another distributed
router, a proper message should notify the user
that this is incorrect and not supported.

Change-Id: If9230c821665813939e676fbaafe296d42cac498
Signed-off-by: Michal Kelner Mishali <mkelnermishal@vmware.com>
2018-06-12 14:36:19 +03:00
Salvatore Orlando
50aba50eef NSXv3: add pool-level lock for LB pool member operations
Add a lock around operations that read LB pools from the backend
and adjust members to add/update/remove items.
This ensures that in case of concurrent operations no stale items
could be added back to the pool accidentally.

Change-Id: I91b5c1d9eb4493c0d19dadaca0af271d0a2afe5c
2018-06-12 10:24:03 +00:00
Adit Sarfaty
2eaf0a0ad4 NSX|V3: Fix router delete callback for LBaaS
When a router is deleted, we check if any of its subnets is used
by LBaaS.
Since normally there are no subnets at this point, the check fails.
Should verify the subnets existence in teh callback.

Change-Id: I2c23722e616a8a05f6fc6d24336356355b96ca9b
2018-06-12 07:29:43 +00:00
Boden R
2e6ed98749 bump neutron-lib requirement to 1.16.0
This patch bumps the neutron-lib required version to 1.16.0, mainly to
pick up the fix in https://review.openstack.org/#/c/574068/

Change-Id: I8c445f7214164ff91c1513cb019d37b167eb0c9f
2018-06-11 15:00:23 -06:00
junbo
19be1cdc63 add enabled/disable on lbaas listener
copy listener.admin_state_up to vse dict

Change-Id: Ib6e4747978033bfee4a1e6c1f955954d6ab08a63
2018-06-11 21:12:56 +08:00
Zuul
e6d11cc04c Merge "NSX|V+V3: Preparations for Octavia support" 2018-06-07 12:51:20 +00:00
Adit Sarfaty
f6b0643782 NSX|V+V3: Preparations for Octavia support
Create internal drivers for each object that will use dictionaries
instead of objects, and will use a generic fail/success notifiers.
The LBaaS nsx-v/v3 drivers will translate the objects to dictionaries
and use the LBaaS callbacks for successful_completion and failed_completion.
Later we can add drivers for Octavia that will use the same internal
drivers.

Change-Id: I5f99f979bd5333ccfc781217379d217d611cb015
2018-06-06 09:17:51 +03:00
Zuul
4b4fd78454 Merge "Housekeeper: implement get_housekeeper_count method" 2018-06-06 00:41:55 +00:00
Zuul
8f74e2e9e8 Merge "use retry_db_errors from neutron-lib" 2018-06-04 10:06:52 +00:00
Zuul
af99078936 Merge "load neutron objects using neutron-lib" 2018-06-04 10:04:54 +00:00
Kobi Samoray
e7c94d5c05 Housekeeper: implement get_housekeeper_count method
This method is required for horizon operation

Change-Id: Iabef5b178183ec44e880ff7d85cd59cbd30aa340
2018-06-03 11:33:08 +03:00
Zuul
956e2e6015 Merge "use get reader/writer session from neutron-lib" 2018-06-01 22:16:23 +00:00
Zuul
c25d0f63bb Merge "stop using safe_reference from common db mixin" 2018-06-01 20:18:21 +00:00
Zuul
ec671a1928 Merge "Add mock to the requirements" 2018-06-01 17:05:50 +00:00
Zuul
aa153249cc Merge "NSXv: Handle listener failures on backend" 2018-06-01 10:31:03 +00:00
Adit Sarfaty
713d7f5081 Add mock to the requirements
Commit I0775e284f21012a01298168d5ca3dd1c74b95f05 added an import of
the mock package, so it should be added to the requirements

Change-Id: I444ab50d5bdb20c528c3a1581dc7e9301ab06dad
2018-05-31 14:50:55 +03:00
wangqi
d03f616be0 Replace os.makedirs to avoid process race
Use oslo_utils.fileutils.ensure_tree(path, mode=_DEFAULT_MODE)
to replace os.makedir.

Change-Id: I610ade282567e6ce976741779a6e0d23d4fadc92
2018-05-31 11:05:26 +00:00
Boden R
a09d4d506c stop using safe_reference from common db mixin
The vmware-nsx project is the only one using safe_reference [1] from the
common db mixin. We plan to remove safe_reference from the mixin, so
this patch switches vmware-nsx over to use weakref.proxy directly.

[1] http://codesearch.openstack.org/?q=%5C.safe_reference

Change-Id: I921c9265a646c3c291813d4488ad0fe0143038ca
2018-05-30 09:06:53 -06:00
Adit Sarfaty
b2a4f5d49e NSX|v3: Do not retry on DB duplications on section init
When initialzing the default NSX section and NS group, the plugin
create a default global security group, in order to make sure no
other server is doing it at the same time.
In case anotehr server does, we get a DP duplicated entry error,
but after retry it somehow works, causing the 2 process to handle
the backend at the same time.
This patch avoids the retry in case of DB errors for this case.

Change-Id: I0775e284f21012a01298168d5ca3dd1c74b95f05
2018-05-30 12:40:47 +00:00
Zuul
6757ca41b4 Merge "NSX-V: py35 compatibility" 2018-05-30 07:11:00 +00:00
Zuul
4da9d7f969 Merge "AdminUtils v3: Fix FWaaS v2 initialization" 2018-05-30 06:37:08 +00:00
Zuul
353943d214 Merge "AdminUtils V3: Support NSX objects with no tags" 2018-05-30 01:28:20 +00:00
Zuul
c2c5d70106 Merge "AdminUtils V3: Do not set nat_pass for NO-NAT rules" 2018-05-29 21:46:17 +00:00
Adit Sarfaty
1c0da57f5d Stop using nsxlib deprecated classes
Change-Id: Icc8053e49bfe054a188c67bb53f347ac4f6b4c35
2018-05-29 11:01:23 +03:00
Michal Kelner Mishali
ee2878c153 NSX-V: py35 compatibility
When creating a net and subnet on py35 env,
an error occurs noting that str should be
bytearray

Change-Id: I069a24f5a5346ce3cee9903b1e5a4fd16ffa9f86
Signed-off-by: Michal Kelner Mishali <mkelnermishal@vmware.com>
2018-05-29 09:34:15 +03:00
Adit Sarfaty
4c9518e2d5 AdminUtils V3: Support NSX objects with no tags
When retrieving NNSX backend objects, we should assume that not
all of those have the tags property

Change-Id: I6c3bc8d8735604ba463e57d7dbd9409028d30ef1
2018-05-28 11:03:14 +03:00
Adit Sarfaty
d70e015345 AdminUtils v3: Fix FWaaS v2 initialization
Since the FWaaS v2 pluggable driver patch
I4ebd24f1b13eb823c4d63452fd37cace5bcf5481
The initalization of the dummy FWaaS callbacks for admin utilities
should change.

Change-Id: I4d7bf6e470f38ea6d677fcb708ca0117b7539fa2
2018-05-28 10:49:44 +03:00
Adit Sarfaty
9e740582e9 AdminUtils V3: Do not set nat_pass for NO-NAT rules
The NSX backend doed not support setting nat_pass to false for
NO_NAT rules.

Change-Id: I90c506ac8ee50aa988bbd07999eca20c410499ee
2018-05-28 10:19:54 +03:00
Zuul
038c945aca Merge "add stestr to test requirements" 2018-05-28 06:44:50 +00:00
Boden R
50678f3e5a use retry_db_errors from neutron-lib
The externally consumed APIs from neutron.db.api were rehomed into
neutron-lib with https://review.openstack.org/#/c/557040/

This patch consumes the retry_db_errors from lib in prep for
https://review.openstack.org/#/c/570016

Change-Id: Id5cf5c0abe60fa1f3ca6193980e7f66cb3d48e1b
2018-05-28 04:33:03 +00:00
Kobi Samoray
35c8968b66 NSXv: Handle listener failures on backend
Backend doesn't produce NotFound exception when deleting a virtual server
or an application profile which doesn't exist.
Instead it produces RequestBad exception which should be caught and handled.

Change-Id: I9f3e7e55ddfea470c69c46b95dd0ac64136ecf97
2018-05-27 16:43:17 +03:00