11858 Commits

Author SHA1 Message Date
Adit Sarfaty
9743a4d0e4 Fix pep8 new warnings
A recent change in pep/pycodingchecks introduced new warnings as part of
the pep8 target that causes pep8 to fail now.

This patch fixes code that issued warnings W503,E731,E266,E402

Change-Id: I57c035440bd847193ea5f8a8078016fb9baa3c31
2018-04-11 09:00:58 +03:00
Adit Sarfaty
f836b5fa90 NSX-V3: Do not add mac learning profiles for ENS port
Commit I944021cbb6dfc950cff353e0ac908fa2b9c29bfe added a code to
avoid adding the mac learning + no security profiles for ENS ports
upon creation.
This patch does the same for the port update action

Change-Id: I287ccbc85c1a8ec201650b1d7b9ce9e603044815
2018-04-10 12:10:55 +03:00
yuyangbj
2ffa65f5b9 Adding --force support for nsxadmin backup-edges resources
Change-Id: Ic4d55c734230460225091c8e002cc68dbb785efb
2018-04-10 11:03:49 +08:00
Gary Kotton
4013b4ca65 NSX|V3: ensure that 0.0.0.0/0 is treated correctly
The NSX will not accept 0.0.0.0/0 for remote and local IP
prefixes. This is changed internally to 'ANY'

The 'ANY' will only be internal. The API for the user will not
change, they will stell see the 0.0.0.0/0

Change-Id: I24adc9da9f52d17621117b46d8a535ccedf93227
2018-04-09 06:31:05 +00:00
Zuul
b9cbacb1c5 Merge "NSXv: Fix LBaaS foreign key migration" 2018-04-08 13:01:28 +00:00
Adit Sarfaty
410effd667 NSX-V3: Do not remove edge id from logical router
When removing or changing the gateway of a router, we should not
set the edge-cluster id to None, and the NSX backend does not
support it.

Change-Id: I46e3ccdf1f3325ff0f6995b40146e26fe5a195d9
2018-04-08 10:55:25 +03:00
Kobi Samoray
78e8080c06 NSXv: Fix LBaaS foreign key migration
LBaaS forreign key migration adds several foreign keys, to enforce the
cleanup of stale NSXv DB objects when the LBaaS object is being deleted.
However, garbage rows may exist - and must be cleaned up prior to the
creation of the foreign key.

Change-Id: Ie6a0348df8b19a49525a1f2bad89f12370a3cd46
2018-04-08 10:20:26 +03:00
wangqi
e427c8fe39 Replace uuid.uuid4() with uuidutils.generate_uuid()
Since oslo.utils provide the ability to generate the uuid string,
and some others use oslo.utils[0] too. For consistency, this ps
replaces uuid.uuid4() with uuidutils.generate_uuid().

Change-Id: I9b3ebff137d0ffaed8c54031c8587c3bfc1acdce
2018-04-05 13:19:15 +00:00
Adit Sarfaty
dc1d46dca2 NSX-V3 Use admin context for VPN port creation
Change-Id: I4d4c0df44a95bc4c263667d2809ff85ccacfc016
2018-04-05 11:21:59 +03:00
Michal Kelner Mishali
9ce4e29a3e Handle network and port create/update, ENS + QOS
Bug fix 2082554: handle the exception in neutron side for Qos
since its not supported from NSXT for ENS TZ

Change-Id: I8ca4c7d04286830ce785a60d7a24439b9a39d801
Signed-off-by: Michal Kelner Mishali <mkelnermishal@vmware.com>
2018-04-04 13:34:23 +00:00
Zuul
db32fcec6f Merge "Allow NSX plugins to work without VPNaaS" 2018-04-04 07:51:27 +00:00
Zuul
6decf15cf6 Merge "Allow NSX plugins to work without FWaaS" 2018-04-04 07:35:03 +00:00
Adit Sarfaty
3eb130a2b4 Allow NSX plugins to work without VPNaaS
When neutron VPNaaS is not configured, the NSX plugins should
come up and work even if the neutron-vpnaas code is not installed.
This patch moves a constant the plugin needs to a file without
neutron_vpnaas imports so that the plugin doesn't have to import it.

Change-Id: I4c0893128fe8fd9c4797531bdb31d6407d18f034
2018-04-03 11:12:50 +03:00
wangqi
d753897c6b tox: Remove unnecessary configuration
These were either unnecessary or overrode default configuration.

Change-Id: Id55b41ef1f16acb4eb763ed207df0f8aa6508520
2018-04-03 07:10:46 +03:00
Zuul
a11432031f Merge "NSX-v3: fix overlay network check" 2018-04-02 19:51:56 +00:00
Adit Sarfaty
f7318af8a0 Allow NSX plugins to work without FWaaS
When neutrion FWaaS is not configured, the NSX plugins should
come up and work even if the neutron-fwaas code is not installed.
This patch adds try/except on fwaas imports, and some mocks to
allow it.

Change-Id: I44895c1ded046668c56d559b47a69c44102d2f04
2018-04-02 15:08:48 +03:00
Adit Sarfaty
2535cac55f NSX-v3: fix overlay network check
Change-Id: I8e6db4d89b9741f50a19f2499703a9c755063c31
2018-04-02 14:51:09 +03:00
Adit Sarfaty
794ae68734 Add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Ia65cd41c6d0f4a4847458188cc5afddb06035a23
2018-04-02 13:38:00 +03:00
Gary Kotton
7c3f1e63df NSX|V3: fix ENS VLAN attach to router
When the default TZ is a ENS VLAN TZ then we identify this this
is not a regular overlay network. It is a VLAN network. There was
a missing check for regular networks that were not provider
networks.

Change-Id: I9e4241fd2e1047ba14442babc4677efa4dcab3a5
2018-03-23 04:31:16 +03:00
Zuul
456ac69e49 Merge "Filter port-list based on security-group" 2018-03-28 11:11:20 +00:00
Zuul
3ea32b0293 Merge "NSX|V3: ensure external subnet does not conflicts with T0 address" 2018-03-28 09:27:33 +00:00
Michal Kelner Mishali
1b5d0867ab Filter port-list based on security-group
This patch will allow users to filter ports according
to security_group supplied as a filter.
Code is for V and V3.

Change-Id: I20b4655cb188aae9d031fee20aea917268ebdf48
Signed-off-by: Michal Kelner Mishali <mkelnermishal@vmware.com>
2018-03-28 12:04:54 +03:00
Zuul
842cc00209 Merge "NSX|V3: prevent attaching transparent VLAN to router" 2018-03-28 07:54:08 +00:00
Zuul
3ee7ea4a3c Merge "Updated from global requirements" 2018-03-27 16:12:12 +00:00
Gary Kotton
4c4a62ba5c NSX|V3: prevent attaching transparent VLAN to router
Currently NSX does not support attaching a trunked network to a
router

Change-Id: I6396d07cbd12f023263b9b50374b49255f54102d
2018-03-27 04:42:01 -07:00
Gary Kotton
cffc8ab57b NSX|V3: ensure external subnet does not conflicts with T0 address
The NSX T0 interface should not be part of the external subnet.

Change-Id: I45e6f821a03f81d5a0ca7852276ab1b14c3d22af
2018-03-27 02:06:07 -07:00
Adit Sarfaty
9e77debf51 Use current neutron project for devstack & CI
Change-Id: I43186a466dfff3f3c5dab25efcbe8037dc54f50f
2018-03-26 08:54:11 +00:00
OpenStack Proposal Bot
7c7ba35404 Updated from global requirements
Change-Id: I9ba6d645a2107056274e07d977a9fd5f7466a1bb
2018-03-26 08:30:54 +00:00
Zuul
385caaec09 Merge "Update lib to >=12.0.0.0" 2018-03-25 11:36:43 +00:00
Zuul
2955bd1d53 Merge "NSX-V3: prevent the user form changing vpn internal ports" 2018-03-25 09:40:32 +00:00
Gary Kotton
1e30a78d93 Update lib to >=12.0.0.0
Change-Id: I4c20cd47bc6d29ee7a14fa5775ebea88b4f38eca
2018-03-25 12:36:28 +03:00
Zuul
cb5895390a Merge "Updated from global requirements" 2018-03-25 07:02:05 +00:00
Adit Sarfaty
778b04ead0 NSX-V3: prevent the user form changing vpn internal ports
The VPNaaS uses a neutron port to allocate a local peer ip.
This port should not be updated or deleted by the neutron users.

Change-Id: I5c0e823ebd1fe79cb3ccdf175f760b16d5e2f562
2018-03-25 06:39:04 +00:00
Zuul
4277b21c5a Merge "NSX-V3: Enhance VPNaaS related validations" 2018-03-25 06:37:03 +00:00
OpenStack Proposal Bot
4cd1a99105 Updated from global requirements
Change-Id: Ic22bc10f9e6cb20bc19fb3796f2b60bcb6e4ec1f
2018-03-23 20:06:20 +00:00
Zuul
b457bfaa6d Merge "add py27-dev and pep8-dev tox targets" 2018-03-23 15:29:59 +00:00
Zuul
49a535044e Merge "Remove tox_install.sh" 2018-03-23 15:29:57 +00:00
Boden R
d48a790378 add py27-dev and pep8-dev tox targets
This patch adds the py27-dev and pep8-dev tox targets that enable local
(outside the gate) running of py27 and pep8 using master branches from
our sub-project dependencies as discussed in [1] in editable mode.
If additional local/dev targets are needed (ex functional) they can be
added in the same fashion as shown herein.

With this patch to run pep8 locally use:
   tox -e pep8-dev

And to run py27 locally:
   tox -e py27-dev

The editable projects will be under .tox/{env}/src/

This patch also adds to our devstack/lib scripts by cleaning out any
existing (dependency git) projects and installing them in editable mode
from git.

Depends-On: https://review.openstack.org/552865
Depends-On: https://review.openstack.org/554297

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-March/128328.html

Change-Id: I4d0dcba15e5b30e4cfa7335edf9c2dd961530184
2018-03-22 14:39:37 -06:00
Adit Sarfaty
3fd27427ae NSX-V3: Enhance VPNaaS related validations
a No-SNAT router subnets cannot overlap with VPN subnets becasue of the rotuer
advertisment.
This patch adds validations when changing the rotuer GW or addign an interface.

Also change the local endpoint port creation so this port will have a distingished
name and device id/owner and won't be queried by mistake.

Change-Id: I41faf97bae67ca85b38da3ade47894865eac8d51
2018-03-22 13:22:16 +00:00
Zuul
6ea7d64683 Merge "Fix tvd-v devstack" 2018-03-22 13:14:13 +00:00
Adit Sarfaty
cbe12a2d35 Fix tvd-v devstack
Change-Id: I3223b1c0f6694d06fb7a38613d2d1cadcab8f09f
2018-03-22 11:44:04 +00:00
Andreas Jaeger
4c0802d796 Remove tox_install.sh
Remove tox_install.sh, we have now all dependencies in
global-requirements and don't need this setup anymore.

Update tox.ini for this, move constraints into deps for proper
working.

This enables proper installation of dependencies from git.

Depends-On: https://review.openstack.org/552865
Depends-On: https://review.openstack.org/554297
Change-Id: I49d432bdf01221d0244449c4e2be807d0f646afa
2018-03-21 09:17:08 -06:00
Gary Kotton
8965202777 NSX|V3: improve trandparent VLAN support
The NSX currently does not support trunking for DHCP and
metadata ports. When a network and subnet are create we will
not create these if transparent VLAN is set on the network.

Change-Id: I7f8c4c81ba5074c58e61d31b08e0af66ef43accb
2018-03-21 05:44:47 -07:00
Zuul
5ef3c29977 Merge "NSX-V3 Add NO-DNAT rules only if supported" 2018-03-21 09:42:24 +00:00
Zuul
3c5cee63df Merge "TVD allow devstack init without V3 transport zone" 2018-03-21 09:40:16 +00:00
Adit Sarfaty
cec3ed1788 NSX-V3 devstack cleanup for VPNaaS
Delete all NSX VPN objects on devstack cleanup

Change-Id: Ib6f49961e76e648d56f9c4576342bba0a1b9b778
2018-03-21 09:46:05 +02:00
Adit Sarfaty
a38a7f127d TVD allow devstack init without V3 transport zone
devstack should succedd for TVD plugin even if the V3 transport zone
is not configured, sonce it can work with v/dvs plugins.

Change-Id: I889a9cdfd2a79c26be4c5ab0f880b33fa6b2a384
2018-03-21 09:02:21 +02:00
Adit Sarfaty
163dd0b214 NSX-V3 Add NO-DNAT rules only if supported
Commit I34d72b12289d6f6527bc114a32dac88281dd2cc4 added NO_DNAT rules
for each router interface. Those rules are not supported and unnecessary
for older NSX versions as VLAN networks were not supported with routers.
This commit adds the NO_DNAT rules only when supported.

Depends-on: I4d99193caac6940911cc071016359a1361428967
Change-Id: Ic0934979931e20645ee1d7d6b5968d7d3efc9c01
2018-03-21 05:28:47 +00:00
Adit Sarfaty
9d99e2ffb6 NSX-V3 fix FW rules for VPNaaS
The edge firewall rules for VPNaaS traffic where created in the
opposite direction

Change-Id: Ifdd51c64264e2a01ae6afb68ee7fe4cac5da430e
2018-03-20 10:29:41 +02:00
Gary Kotton
fc59514f30 NSX|V3: prevent disabling MAC learning on ENS TZ
By default MAC learning is enabled on these networks. The patch
does the following:
1. prevent disabling this for TZ networks
2. marks the port mac learning as enabled on create
3. does some minor optimization in reading id the port is on a TZ
   network

Change-Id: I944021cbb6dfc950cff353e0ac908fa2b9c29bfe
2018-03-19 10:06:30 +00:00