Commit Graph

219 Commits

Author SHA1 Message Date
asarfaty 50afa71853 Fix broken Victoria branch
1.Upgrade pylint to 2.4.4, add exclusions to the tests, and
  fix some lint errors in the code

2. Fix user creation with GRANT in MySQL 8.0(Ubuntu Focal)
In Ubuntu Bionic (18.04) mysql 5.7 version used to create
the user implicitly when using using the GRANT.
Ubuntu Focal (20.04) has mysql 8.0 and with mysql 8.0 there
is no implicit user creation with GRANT. We need to
create the user first before using GRANT command.
See also commit I97b0dcbb88c6ef7c22e3c55970211bed792bbd0d

3. Remove fwaas from the zuul.yaml
4. Remove DB migration test which is failing ue to FWaaS migration
with py38
5. Fix cover tests python version in .tox
6. fix requirememnts

Change-Id: I22654a5d5ccaad3185ae3365a90afba1ce870695
2020-09-21 15:31:18 +02:00
asarfaty edad9f26e0 V2P migration: Improve config file migration
Update the FWaaS service providor to allow the migration tool to migrate
FWaaS resources.

Change-Id: Icec6353a3b495a091227f1a17ace9b9ef5c28ab1
2019-12-16 10:13:25 +02:00
asarfaty a4b2110008 V2P migration: Improve config file migration
Fix comments, add az support, and some drivers.

Change-Id: I3a7ad0cd0ab67b2f13ecd0cf6b9d86b100c936ae
2019-12-09 11:44:36 +02:00
Adit Sarfaty e0cff006c3 Pre-migration config files generation
Bash tool to create an initial neutron config files for the
policy plugin prior to migrating from V to policy

Change-Id: If99f98b2d4f43cc05d955ab553ccfc277f6e7887
2019-11-14 11:22:28 +02:00
sunqingliang6 2269aeb527 fix typos
Change-Id: I51bd8733774d890a28046cd197eb7ed6a89bb71e
2018-06-20 20:31:29 +08: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
Andreas Jaeger 8b06741ad7 Move neutron to requirements
Move neutron to requirements.txt Since neutron is now in
global-requirements, we can remove the installation from
tools/tox_install.sh.

Change-Id: I3d5aa6d61d1601358f6972a606c5a0a6fb5c2dd0
2018-03-14 21:17:17 +01:00
Boden R 7223bbf963 migrate to stestr
ostestr is no longer installed by default by infra and will be totally
removed longer term; stestr [1] is its replacement.

This is the reason out gate is failing with the following today:

nsx/tools/ostestr_compat_shim.sh: ostestr: not found

This patch moves us to stestr by:
- Updating tox.ini to use stestr rather than call ostestr_compat_shim.sh
and in turn ostestr.
- Removing ostestr_compat_shim.sh as its no longer used.

For more details on stestr see [1].

Also note that this is a quick migration to stestr to get the gate
working; additional tweaks may come up.

[1] http://stestr.readthedocs.io/en/latest/MANUAL.html

Change-Id: I9a871d3542c2f2615d757c0009ea3d6695f0e3f7
2018-03-05 14:54:00 -07:00
Boden R a75f1f0c4b zuul v3 gate changes
This patch updates our tox_install_project.sh script to account for zuul
v3 changes. The changes are made to be backwards compatible so the
script should also still work with zuul v2 jobs. Also see the depends on
patch for the project-config changes needed for our zuul v3 support.

Depends-On: Icd0dfdef3486be95ef45beb9ea96767f731d9e9e

Change-Id: Ic0d25e9f9e6d1fe7cba7cae93e66dbbc08c12071
2017-10-14 15:58:11 -06:00
XieYingYun 04362a037d Fix to use . to source script files
Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.
When you have to source a script file, for example, a credentials file
to gain access to user-only or admin-only CLI commands, use . instead of source.
https://docs.openstack.org/contributor-guide/writing-style/code-conventions.html

Change-Id: I0c18ce6c3e217fac7b9dc97964f22624ab0f1f3b
2017-09-05 20:02:26 -07:00
Gary Kotton 508c6262a2 Remove vmware_nsx_tempest
This now existsin the vmware_nsx_tempest_plugin

Change-Id: I76e5856deeeb06b87675314635d06aa0291143eb
Depends-On: I804c3fd1e0c9cbeb454677e7951072ad74391fec
2017-08-15 17:02:55 +00:00
Jenkins 184a29760e Merge "Remove pyshark from test-requirements" 2017-07-18 17:47:18 +00:00
Gary Kotton 5f4f514d0b Remove pyshark from test-requirements
This causes an exception on the updates of the global requirements

Change-Id: I6a5300bc0cb36aae547f0dc5e3d4cbc217b9efd4
2017-07-18 06:58:04 -07:00
Zhenmei 53d1bd0e2f NSXv: Support ipsec VPNaaS on nsxv driver
Change-Id: Id3fd4da7e4dd4cac4eb2e32024c0d8242b85a0bb
Co-Authored-By: Roey Chen <roeyc@vmware.com>
2017-07-11 06:03:19 -07:00
Roey Chen 81f9380765 NSXv BGP support
This change implement's a new BGP plugin which allows BGP support in Openstack,
using NSXv service edges (ESG).
When a BGP speaker is associated with an external network, service edges which
accommodates tenant routers that have their GW port on this network would be
configured to enable BGP/Dynamic-routing.
The specific BGP configuration (e.g - localAS, neighbours) for the edge is
retrieved from the BGP speaker object and its peers.

This change also adds an extension to the BGP peer object, this
extension allows the cloud operator to associate a BGP peer with a specific
service edge that will serve as GW edge for the network, multiple GW
edges are supported by enabling ECMP on tenant service edges.

Co-Authored: yuyangbj <yangyu@vmware.com>
Change-Id: Ife69b97f3232bee378a48d91dc53bdc8837de7f5
2017-04-13 06:09:53 -07:00
Adit Sarfaty f10dcfe82d NSX-V FWaaS(V1) support
The nsx-v FWaaS driver will add the configured firewall rules to
the router edges.
Currently there is not support for shared routers.
The rules will be edded after the current rules (NAT, LBaaS, external traffic)
for exclusive routers edges and distributed routers PLR edged.

Change-Id: I82ba90070ef4e739a0b5c4463ef03a807e26adfb
2017-04-04 11:15:49 +03:00
Gary Kotton 3759da2874 Remove Tap-as-a-service Support
The platform support will be changing so we will remove this in the
mean time.

The patch also remove false positives for test failures.

Change-Id: I118010085d305883f521fa01a5fd341e775eea5a
2017-03-20 07:57:25 -07:00
Gary Kotton dde3725bd3 Remove unconstrained for vmware-nsxlib
This is due to the fact that we no longer use the requirements.
This was done in commit 34568342ce37586cff9fe3fe462d3e722a4d4c04.

From now one we will have a specific version that matches the
vmware-nsx version.

Change-Id: I528194276a39c9434d60312f13e358afab1c404b
2017-03-07 22:28:14 -08:00
Gary Kotton 153fc1f2d6 Use vmware-nsxlib from master
Change-Id: I35408ce0e98c916d6604812f698e70393ed46832
2017-03-07 15:54:31 +00:00
Andreas Jaeger 2583872dc5 Prepare for using standard python tests
Add simple script to setup mysql and postgresql databases, this script
can be run by users during testing and will be run by CI systems for
specific setup before running unit tests. This is exactly what is
currently done by OpenStack CI in project-config.

This allows to change in project-config the python-db jobs to
python-jobs since python-jobs will call this script initially.

See also
http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html

Change-Id: Id2bdd67f7fefe4e36c246d4e2b091f8ddf7d23d1
Needed-By: I7d359b161909162e3e325c43797523cdff8a14be
2017-02-08 20:31:26 +01:00
gecong1973 7313577cbb Using sys.exit(main()) instead of main()
As we known, Exceptions are raised by the sys.exit() function.
When they are not handled, no stack traceback is printed in the
Python interpreter. In this patch we have known main() got return
values(eg:0, 1), but it can't specifies exit status when terminate
the main thread by unusing sys.exit(). So when using sys.exit(main())
instead of main() may be more readable and reasonable.

Change-Id: If3c185c35220f5e185e9872a91898430d6353811
2017-01-04 16:52:54 +08:00
Armando Migliaccio a951f5f929 Make vmware-nsx capable of handling depends-on
Credits to networking-midonet tox_install* files.

Change-Id: I3ddf84317501ef516a33717b71f66399b9b26875
2016-11-21 18:10:14 -08:00
Boden R 28c14f567e Update gate logic
As bug 1568706 uncovered, we were using zuul-cloner
in our gate jobs; this was preventing our translation from
syncing.

After digging into this issue a number of changes in this
associated logic were found to not be in sync with neutron.
This patch updates out tox/tools logic to follow that of neutron.
In addition this patch fixes any pylint checks that were failing to
make pep8 pass.

IMPORTANT:
Please review closely, not only to the tools/tox updates but also
to the ignored pylint checks in the code. We only want to disable
checks where appropriate.

Change-Id: I6c5fee3ca3073ad079eac1636cc3b9ec45926a68
Closes-Bug: #1568706
2016-07-12 09:05:22 -06:00
Abhishek Raut 6c1d841ff3 Automatically generate vmware-nsx configuration files
This patch adds support to automatically generate config files
for vmware-nsx repo using oslo config generator[1] for all
VMware plugins.
Tox can be used to generate a sample config file using the
following command:
    tox -e genconfig
This will generate a config file "nsx.ini.sample" under
vmware-nsx/etc/ folder.

This patch also modifies devstack scripts to use the
auto-generated config files and adds more information to help
texts in config modules.

[1] http://docs.openstack.org/developer/oslo.config/generator.html

Change-Id: Iff4ea37b52616295b262ead53947acb5b0cd9cd7
Partial-Bug: #1568215
2016-04-13 07:24:06 +00:00
Ihar Hrachyshka f54f7ee799 Consolidate branch setup for dependencies pulled from git
Later, we'll backport the patch into stable/liberty and change the
branches used for neutron-*/networking-* dependencies there.

Change-Id: I16bd097f4619c7c898b290926bcbf2f5b31356bf
2016-02-09 11:49:23 +01:00
Gary Kotton 69ad24efbb Delete i18n_cfg file
This is no longer used as the hacking checks do the validations.

Change-Id: I04c9adab4fb2c33b127efe298b0e7943bc969c37
2015-12-31 02:08:23 -08:00
Boden R 70fa532032 Move python_nsxadmin out of a top-level namespace
It is not a good idea to have a top-level "tools" namespace, this
name is too generic and already taken in PyPi (see
https://pypi.python.org/pypi/tools).

This patch moves python_nsxadmin to the vmware_nsx.tools namespace,
adjusting all imports and making sure setup.cfg is adapted
accordingly.

Change-Id: I75922db2010194fe59db424cc4615c7ba57c1b81
2015-12-17 15:34:45 -07:00
Jenkins e3c558d391 Merge "Admin Utility: Add orphaned-edges resource" 2015-12-10 23:32:02 +00:00
Jenkins 52142877fb Merge "Admin Utility: Minor fixes for output formatting" 2015-12-10 23:31:56 +00:00
Jenkins d472816f5b Merge "Admin Utility: Update DHCP binding for NSXv edge" 2015-12-10 23:02:33 +00:00
Amey Bhide 30f3bc2443 Admin Utility: Add orphaned-edges resource
Added orphaned-edges as a resource with list and delete operations for it

Change-Id: I06da1326518142272c3bf8e69ab8d67d01aed847
2015-12-10 14:36:44 -08:00
Amey Bhide f9cae85f78 Admin Utility: Minor fixes for output formatting
Change-Id: I77913904f2e937797e2d7f61123dd1c4a45144f9
2015-12-10 14:36:40 -08:00
Jenkins c865d6045b Merge "Make sure correct branch of neutron is pulled in" 2015-12-10 22:35:18 +00:00
Amey Bhide ec68daecc3 Admin Utility: Update DHCP binding for NSXv edge
$ nsxadmin -r dhcp-binding -o nsx-update --property edge-id=edge-15
NSX Plugin in use: nsxv
Notify callbacks for dhcp-binding, nsx-update
Calling callback
tools.python_nsxadmin.admin.plugins.common.utils.nsx_update_dhcp_edge_binding
==== [NSX] Update Dhcp Edge Binding ====
Updating NSXv Edge: edge-15

Change-Id: I3524a5cb7a4418006f157842b35c9519235be1d7
2015-12-10 13:44:47 -08:00
Aaron Rosen 1a0a03bb8c Make sure correct branch of neutron is pulled in
stable tests are running against master neutron(!) AHHH

Closes-bug: 1524578

Change-Id: I08dfc3c5e9a1d85443368b60db435db4b4c9abee
2015-12-09 18:07:11 -08:00
Amey Bhide 248baf2d7d Admin Utility: Add command for delete-backup-edge
$ nsxadmin -r backup-edges -o clean --property edge-id=edge-9

Change-Id: I9e26110854f0fe12c52f3c26738d30def4dc74cc
2015-12-09 11:35:36 -08:00
Gary Kotton 338ca3085f Remove code that is no longer used
The i18n checks are validated by the 'tox -e pep8' so we no longer
need this stuff.

Change-Id: I388da7cfd3bb4098ac0fcc192c00f521b33d0ab3
2015-12-08 02:43:18 -08:00
Jenkins e514c5e530 Merge "Fix custom conf files referencing" 2015-12-07 03:19:43 +00:00
Akash Gangil 215d21dc04 Fix custom conf files referencing
The cli args neutron-conf/nsx-conf we had until this
point to conf files not in the default locations didn't
work. This is because of the below code section,
https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L2580

the above states reloading the conf options only from the
ones passed as --config-file. So that's the only way to pass
new config files to oslo.config.

So if someone wants to pass a custom neutron.conf/nsx.ini to
admin utility, they can do:
nsxadmin --config-file custom_path/neutron.conf --config-file
custom_path/nsx.ini -r <resource> -o <operation>

This patch removes neutron_conf and nsx_conf options from the cli
and users should use --config-file option to specify any config files.

Change-Id: Ia5048875fd465d46aa6f85cd02278d778eb6017e
2015-12-05 03:28:25 -08:00
Amey Bhide b1394ed444 [Admin Utility]: Add command for list-backup-edges
$ nsxadmin -r backup-edges -o list
NSX Plugin in use: nsxv
Notify callbacks for backup-edges, list
Calling callback
tools.python_nsxadmin.admin.plugins.common.utils.nsx_list_backup_edges
==== [NSX] List Backup Edges ====
backup-edges
+---------+
| id      |
+---------+
| edge-5  |
| edge-9  |
| edge-13 |
| edge-18 |
+---------+

Change-Id: Id4cba1240db71e581174a39c51c57f72012a9199
2015-12-04 10:57:25 -08:00
Jenkins 4456fab4f0 Merge "Admin Utility: Fix output for missing edges and spoofguard policy" 2015-12-04 07:33:37 +00:00
Saurabh Chordiya de379da7ea [Admin utility nsxv3] Fix import error
On NSXT-BB setup, execution of nsxadmin throws
ImportError: No module named admin.plugins.common
so this patch fix that error

Change-Id: Iaf4781636440f510cf13926a4b539525af4a1db3
2015-12-04 09:52:36 +05:30
Amey Bhide d5e7606f4e Admin Utility: Fix output for missing edges and spoofguard policy
Change-Id: I00e74555ee42840b3f5ee9b704a7893fa293b516
2015-12-02 22:34:42 -08:00
Akash Gangil 72d72623a9 Admin util should work from any dir
It wasn't working because of two reasons:
1. The packages filed in setup.cfg takes a directory name.
so specifying tools.python_nsxadmin.admin didn't put the py files
in /usr/local/lib/python2.7/dist-packages when we pip installed
vmware-nsx package. (sudo pip install .). So changing it to tools
installs all the code in tools including python_nsxadmin there. Read
2 to know why we need this.

2. To enable admin utility to dynamically pick up any hooks that users
might add we use the importlib module. The bug was here, as the path was
absolute tools/python_nsxadmin/.... So when we executed it from other
diretory those modules were not imported. So I changed that to relative
path. Though, over here there could be a case where the hooks location
directory path contains a '-' / dash, which will cause it to fail.

>>> import
>>> home.gangil.t1-review.e_nsx.tools.python_nsxadmin.admin.plugins.nsxv.resources.edges

  File "<stdin>", line 1

    import
home.gangil.t1-review.vmware_nsx.tools.python_nsxadmin.admin.plugins.nsxv.resources.edges

                         ^

SyntaxError: invalid syntax

So we install the tools code using setup.cfg and then just import
resources from there.

Now it works from any directory.

Change-Id: Idc414fabc769d0503974e8f77b84d32008b3c08a
2015-12-02 07:10:00 -08:00
Akash Gangil c327bedf04 Cleanup python-nsxadmin dir
We don't need it. We renamed it to python_nsxadmin directory.

Change-Id: I637e621240abda869356095dc5694e0d15700df4
2015-12-02 06:12:10 -08:00
Akash Gangil f88a8cfb7b Use prettytable and rename python-nsxadmin - to _
This patch dumps the tabulate package in favor of prettytable
since its a global requirement and is used by all openstack
clients. So users won't have to install a package separately.

We also refactor python-nsxadmin to python_nsxadmin. Since setup.cfg
does not like names with '-'

Change-Id: Ib510c7b40673b747e0712a656d19e18e4ff4accb
2015-12-02 06:12:02 -08:00
Akash Gangil 06cd0d5bf0 [AU]Fix help message for supported ops on resource
Fixes the case of the operations supported in the help message
of a resource.
Also fixes list of supported ops where we were listing all the ops
when a invalid op was specified instead of just the ops that are
supported *only* by the resource.

$ nsxadmin -r edges
Supported list of operations for the NSX-V resource ['LIST', 'CLEAN']

If user supplies -o LIST, it won't work. since the callback registration
is case sensitive. So to avoice any ambiguity we show the ops as lower
case.

Supported list of operations for the NSX-V resource ['list', clean'']

Change-Id: If41274181baf0f30502b8821169bbc6e4504ba2d
2015-12-02 03:45:40 -08:00
Gary Kotton 4afa13c3c4 Switch to internal _i18n pattern, as per oslo_i18n guidelines
- Guidelines referenced from:
  http://docs.openstack.org/developer/oslo.i18n/usage.html

Change-Id: I938919958525b2db0c8a517b951a23f974a7762e
2015-12-02 06:59:23 -08:00
Amey Bhide ee88416cbe Add nsx-update to supported ops
nsx-update was missing from list of supported ops for dhcp-binding and edges
resources

Change-Id: Idb4cc0360d267e2d1166e9947e6dc26bcdaff19c
2015-11-30 15:24:32 -08:00
Jenkins 2984da38b3 Merge "Fix typos with topy" 2015-11-20 16:06:57 +00:00