Commit Graph

25 Commits

Author SHA1 Message Date
asarfaty 95f05a2097 NSX|V3: Fix devstack cleanup for tier0 ports
In case using the cleantup with a newutron_db, tier0 logical ports
were not deleted, becasue the tier0 routers could not be found in
the neutron DB.

Change-Id: I78e6641f2d94331a081bae218a99bbc2973f2540
2019-12-19 18:38:14 +02:00
Adit Sarfaty 4902962453 Add devstack cleanup for loadbalancers
Delete all NSX LB objects on devstack cleanup, for LBaaS and Octavia

Change-Id: I6d3bd924414888406d60e1a3fa63e1f8aee949b9
2018-06-20 09:25:39 +03: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 bbddf61c87 NSX-V3 devstack: cleanup VPNaaS objects
Delete nsx vpn sessions and local endpoints when cleaning up devstack

Change-Id: Ie5e9d9f87230fb950b6951e67e5548b24ca64d33
2018-01-21 10:47:22 +00:00
Adit Sarfaty 9ac5edd12e NSX|v3 use nsxlib in devstack cleanup
Refactor the devstack cleanup script to use nsxlib instead of accessing
the nsxmanager directly.
This patch is needed for the XSRF support.

Change-Id: Ib2e8c4031aae22f97f5a400d9dc5e49a945f7aed
2017-08-31 06:02:18 +00:00
Jenkins 777825185f Merge "Use flake8-import-order plugin" 2017-07-06 05:30:33 +00:00
Gary Kotton 50cd210d59 Use flake8-import-order plugin
Automate the process

Change-Id: I54451e78c24eef2016293be87760a349df07a384
2017-07-05 00:39:10 -07:00
Adit Sarfaty c976ab8e61 NSX|V3: devstack cleanup exclude list ports on devstack
If ports are added to the exclude list directly (not using tags),
they should also be deleted when using devstack cleanup.

Change-Id: Id2bc3690bf11be41a52e6b3301995cd71da0af3b
2017-07-05 10:13:48 +03:00
Gary Kotton de196f9dc6 NSX|V3: ensure that devstack cleanup delets switches
Commit 3d24d19309 resulted in
networks not being deleted. This is due to the fact that some
ports on a network may not be stored in the DB. For example
a metadata port.

Change-Id: I192b5b85d99e08989bd68ebef73e592d398edbd4
2017-06-28 04:10:55 -07:00
Adit Sarfaty 7102def745 NSX-V3| fix devstack cleanup
Backend list results do not always have the cursor field so we should use
get when accessing it.

Change-Id: I3f31b56c50a8f014cc322ceb5e6c69b5540c879e
2017-06-17 05:17:52 +00:00
Adit Sarfaty 580331604c NSX-V3| fix devstack cleanup
firewall sections were not deleted properly causing other objects not
to be deleted too.
Fixed 2 things:
- backend list results do not always have the cursor field
- delete the fw section with cascade instead of deleting each rule.

Change-Id: Ib96ab16cc49e12111e729ead716953c8114fa99c
2017-03-27 14:10:43 +03:00
Anna Khmelnitsky 8bb4df14f1 NSXV3: Client certificate private key encryption
When certificate storage is nsx-db and nsx_client_cert_pk_password
is provided in configuration, private key will be stored encrypted.

Change-Id: Id0e6f3b614da9eb2381c80d1a76043e38d2d11ee
2017-02-06 08:00:51 +00:00
Anna Khmelnitsky 6e1a21881e NSXV3: Initial client certificate auth support
Client certificate authentication is disabled by default.
To enable client auth, define the following in nsx.ini:
nsx_use_client_auth = True
nsx_client_cert_storage = nsx-db
nsx_client_cert_file = <file to store certificate and private key>

To enable client auth in devstack, define the following in local.conf:
NSX_USE_CLIENT_CERT_AUTH=True

This commit covers only DB type of cert storage. Barbican storage
and imported cert will be added later. Also planned for near future:

    reload cert from DB if NSX connection failes due to bad cert
    show warning when cert nears expiration
    delete cert file from file system on neutron exit

Change-Id: Ic70a949b740d9149d71187b02640d3071a3e0159
2017-02-02 09:39:18 +00:00
Adit Sarfaty f0f6e8df6d Fix cleanup prints
Change-Id: Icfd419b506f272fb37236d81b68244ac8af393cc
2017-01-31 09:09:23 +02:00
Roey Chen 3d24d19309 NSX cleanup script to clean only related resources
nsxv_cleanup and nsxv3_cleanup scripts are called by unstack.sh and
removes all backend resources, even resources which may have been
created by other devstack deployments using the same backend.
This patch fix this issue, when calling 'unstack.sh' the script will
only remove backend resources that have db record, if 'clean.sh' is
called, then previous behavior is used and all backend resources created
by openstack are removed.

To run the scripts manually, in such way that only backend resources
with db records are cleaned, one must specify '--db-connection' (e.g -
iniget /etc/neutron/neutron.conf database connection) option so the script can
query the DB.
When '--db-connection' option is not specified then all
backend resources are cleaned.

Change-Id: I2283bdb2758c303a46574296e0067f458a6eefcf
2017-01-30 10:20:11 +00:00
Anna Khmelnitsky f32906a3fe NSX-V3: Handle pagination in devstack cleanup
NSX-V3 limits get-list APIs to 1000 objects per page.
Before this commit, unstack.sh would not clean up all objects on backend
if more than 1000 objects were present.

Change-Id: I1c5354e5638ad08538477bbba2483dc67e316f38
2016-12-09 17:58:30 -08:00
vmware 701af81a92 devstack: fixed backend cleanup during unstack
unstack should only delete ns-group created by openstack

Change-Id: I0b35fb52909fa18d5f3b9d14fa5f368ef5990880
Closes-bug: #1740678
2016-10-05 17:00:43 +05:30
Shih-Hao Li c4a2cf6b14 NSX|V3: Delete backend DHCP servers during devstack cleanup
Add a new function to delete backend logical DHCP servers
created via openstack plugin when running devstack cleanup script.

Change-Id: Ib98c036af2d3e065eb73e9855501262aba30641a
2016-08-01 11:03:12 -07:00
linb e0dd32af0c clean tier0 ports created from nsxv3
Clean all tier0 ports created from nsxv3 when doing nsxv3 cleanup
script.

Change-Id: I0960aa58045299054ef9dc4ad4ac589b2ec9bbe6
2016-03-19 08:12:00 +00:00
Gary Kotton c7b529e775 NSX|V3: use oslo_serialization instaed of json import
TrivialFix

Change-Id: I38b88c687a883e260a976855f7fbf21fb0dc5ee6
2016-02-29 04:07:40 -08:00
Akash Gangil c2f5263cc2 Add force=true option to NSgroups DELETE call
By default, if the NSServiceGroup is consumed in a Firewall rule, it
won't get deleted. In such situations, pass "force=true" as query param
to force delete the NSServiceGroup.

Change-Id: I62be6578c6a70b3b7ae657bd0fa2026fda9ebd56
2016-02-16 02:57:04 -08:00
Boden R 1e63cec18a NSX v3 devstack cleanup invalid call
Change devstack tools for nsxv3_cleanup to reference proper
jsonutils method.

Change-Id: Ibf7cf1d0acd0ad2caa2bb8493a58f4cd5386b683
2016-02-12 12:14:23 -07:00
Aaron Rosen 8cf544e62b Do not exclude flake8 checker for devstack directory
There are some python files here that we should be running the flake8 on.
This patch updates those files to pass flake8 and enables the checking.

Change-Id: I73b76d2911daaf85282c9f77143f943805a33b03
2016-02-10 23:25:38 -08:00
Roey Chen a46f433429 Delete all NS-Groups when call unstack.sh
Besides typical NSGroups which backes Neutron security-group,
the plugin also creates nested NSGroups, these should be deleted as well
when calling unstack.sh.

Change-Id: Id2e803dd29f1cd019eeaf0df7ca6309054fda600
2015-12-28 04:19:50 -08:00
Gary Kotton b973e406f9 NSX|V3: rename cleanup script for devstack
Rename the cleanup script so that it will be V3.

Change-Id: Ifbbdce60a6d6ae930a6e69aa84b55dd2dbb351ee
2015-12-27 04:43:11 -08:00