1248 Commits

Author SHA1 Message Date
Zuul
895188ad7f Merge "Change to use product_version as nsx version" 2025-01-23 08:02:32 +00:00
ranp
699be4d9b5 Change to use product_version as nsx version
Use product_version instead of node_version properties to get nsx
version from node.

Change-Id: I01710f6d26cd8442c8aca60c459ef15444bc5fce
2025-01-23 15:27:27 +08:00
Zuul
62a07420a0 Merge "Encode username and password for basic auth" 2024-12-20 06:38:02 +00:00
Salvatore Orlando
c657aa88a3 Remove cover job from .zuul.yaml
cover jobs use python 3.12 and it's not compatible
with some of the unit tests in the repository.

Change-Id: Ief9f14d2879d2ad3cab5db68d40f0c014e5707a9
2024-12-19 19:41:32 +00:00
Salvatore Orlando
e843f3a734 Encode username and password for basic auth
This is to ensure session creation also works if username and
password contain unicode characters.
Otherwise, python's requests will use latin-1 to encode these string.

Change-Id: Ia2a1c26cffe213d23cafcf5c33b6f82b8ef364e5
2024-12-19 17:26:11 +00:00
Zuul
c8a80f7e6f Merge "Add force parameter for VpcIpAddressAllocationApi" 2024-11-27 00:26:26 +00:00
Tao Zou
0edff07c7e Add force parameter for VpcIpAddressAllocationApi
When NSX creates the NsxVpcIpAddressAllocationApi for pre-created VPC,
it will create an internal pool. If not using 'X-Allow-Overwrite: True'
NCP will fail to allocate vpcipaddressallocation

Issue: #3455572
Change-Id: Ie9d0c9c478dd8f96b6f091be359d99459013c477
2024-11-26 11:28:39 +08:00
Zuul
395f3b4c59 Merge "Remove MP search API in policy resources" 2024-11-18 09:27:36 +00:00
ranp
21047202b1 Remove MP search API in policy resources
From NSX 9.0, MP api is removed, so in policy resources, it should not
use MP resource apis or MP resource search interface.

following apis are removed:

/api/v1/search/query?query=resource_type:LogicalRouter
/api/v1/search/query?query=resource_type:LogicalSwitch

Change-Id: Ie79c95a491b7fa6364c440522d127f100d44c7c0
2024-11-18 16:40:16 +08:00
Yun-Tang Hsu
1c67001037 Revert "Add tls_version option when creating NSXHTTPAdapter"
This reverts commit 49d9ef1031d9c9373d53c9be10e00d4cc5d7bdb9.

Reason for revert: Not required change

Change-Id: Ie856ab86ac7659f21007881163f28e1e70b451c5
2024-11-15 19:16:11 +00:00
Yun-Tang Hsu
49d9ef1031 Add tls_version option when creating NSXHTTPAdapter
Change-Id: Ib54d66594dba150fd30e0d17edb98ee215f45427
Signed-off-by: Yun-Tang Hsu <yun-tang.hsu@broadcom.com>
2024-11-12 21:30:32 +00:00
Salvatore Orlando
f48a982b30 Switch zuul jobs to python 39
Commit 8eac791328c004013c6ef7ccd5d53fe22184b316 in
openstack/requirements bumped coverage max constraint to
7.6.3 from 7.6.1.
Coverage 7.6.3 does not support python 3.8. pip installation
to always fail on constraint verification.

This commit switches zuul unit tests checks to use python 3.9.
This commit also changes the minimum requirement on coverage,
removing the exception for version 4.4.

Change-Id: Ic222523959658b0144cf5b75c04ee1d427f4200a
2024-11-12 20:06:23 +00:00
Salvatore Orlando
97dae83467 Fix README
Remove lines that were accidentally added

Change-Id: I5eb818fd248d6dc0e42a3b06a61145b38130de8d
2024-11-05 06:39:13 +00:00
Zuul
9086057bd6 Merge "Add parameter for segment port delete api" 2024-10-24 09:01:12 +00:00
ranp
15775c1d25 Add parameter for segment port delete api
Add parameter skip_host_detach=true for delete api for SegmentPort
resource, this parameters allows nsx to delete segment without detach
operation. This parameter is for a corner case that NCP tries to
recreate segment ports that is attached to other vm in vmotion during
backup and restore.

Change-Id: Ia0b4f6c5d5b5b192684090cc2fdd9f309946ccb1
2024-10-23 16:58:33 +08:00
Zuul
9170f4bb33 Merge "Encode request body for POST /api/session/create" 2024-10-20 08:38:54 +00:00
Salvatore Orlando
055a8324e7 Encode request body for POST /api/session/create
This change ensures special characters are correctly escaped
when using username/password authentication.

Change-Id: I4971e4b138e925965d2bd0f85e85e70df3146c35
2024-10-18 22:05:09 +00:00
Yun-Tang Hsu
b3f79b5af5 Support HAPI for lb-pool and lb-virtual-server
In this patch, we support HAPI for lb-pool and lb-virtual-server whose tenant is org-root
We also fix a bug in func _build_wrapper_dict where the children array of wrapper_dict and the children array of node should be the same one.

Change-Id: Iaaf392f7e6904605e8ddd84d6691c92fc845dda6
Signed-off-by: Yun-Tang Hsu <hsuy@vmware.com>
Signed-off-by: Yun-Tang Hsu <yun-tang.hsu@broadcom.com>
2024-10-09 16:51:57 -07:00
Tao Zou
1fa9910c1b Add tenant while get in update
Add tenant while calling get in update

Change-Id: I94e579264218fa456c84aedd916c1c2dec47f3d0
2024-07-23 01:12:30 +00:00
Yun-Tang Hsu
14a9b16225 Fix LBServiceDef for vpc tenant
Change-Id: Idb6fb2bffdf55ceb59550f742d9cca15b69d3af1
Signed-off-by: Yun-Tang Hsu <hsuy@vmware.com>
2024-07-10 14:55:23 -07:00
Zuul
0a75bd5669 Merge "Add VPC IP address allocation to policy API" 2024-07-08 07:26:18 +00:00
Qian Sun
84eda65ba1 Add VPC IP address allocation to policy API
Change-Id: I79e2026f972bc2a52aa2c2691aef3feeb3605db0
2024-07-05 07:41:14 +00:00
Yun-Tang Hsu
c5d39d4e8b Add sharing_strategy in Share API
We add shareing_strategy option in Share API because sharing_strategy must be ALL_DESCENDANTS for sharedWith path [/orgs/default].

Change-Id: Ib982237f12d10c2b9f1163393697817397916207
Signed-off-by: Yun-Tang Hsu <hsuy@vmware.com>
2024-07-02 22:57:00 -07:00
Zuul
a797301b8e Merge "Add vpc support for group/lb vs" 2024-06-28 00:17:43 +00:00
Tao Zou
cf17557aa6 Add vpc support for group/lb vs
Add vpc suppport for GroupDef.
Change profile tenant within LB VirtualServer

Change-Id: I4a18c130d99d68e0f259568aa2c2458e45e6d958
2024-06-27 07:19:18 +00:00
Yun-Tang Hsu
6034fa2304 Support resource Share/SharedResource for policy API
Add new supported resources to NSX Policy resources API.
Supported resources:
- share
- sharedResource

Change-Id: Ife716ec411fd1472f6fa66ab8f914a0d9745121f
Signed-off-by: Yun-Tang Hsu <hsuy@vmware.com>
2024-06-11 10:43:23 -07:00
Zuul
a30074d4e5 Merge "Raise retryable exception when the returned search data size is too large" 2024-03-07 17:54:41 +00:00
Shawn Wang
82f6f63fee
Add support of pinning NSX leaf cert
In order to support cert pinning in WCP, this change adds exact cert
match for checking NSX manager authenticity. Setting "nsx_cert_der"
enables this mode, where the pritotity is below ca cert and above
thumbprints.

Currently in nsxlib, the call chain to manage HTTPs connextion is:
1. NSXHTTPAdapter (subclass of urllib3 HTTPAdapter)
2. urllib3 PoolManager
3. urllib3 HTTPSConnectionPool
4. urllib3 HTTPSConnection
In order to inject custom TLS cert validation, we have to override the
connect() function in HTTPSConnection level. Introducing a child class
of HTTPSConnectionPool is also needed to pass the new param. Pool
manager only needs overrding two attrs to allow passing the new param
and properly binding to the new child class of connection pool.

When leaf cert verification is not used, the native urllib3 behavior
will be kept to reduce regression risk.

Change-Id: Icecf30b6df3b60fbeac20cf79586827f3370ce13
2024-02-05 15:15:15 -08:00
Shawn Wang
5d408a01f8
Add option to skip SSL hostname verification
This change adds a new config param ssl_assert_hostname. Its value will
be ultimately passed to the underlying urllib3 param "assert_hostname".

Technically, the value coud be bool or string. This patch focuses to set
it to False to disable hostname check while keeping other cert
verifications.

Change-Id: I8b1ef5fe915d8317f65ce5e1927eb71141027e16
2024-01-02 14:39:30 -08:00
Shizhao Liu
d979f5d796 Raise retryable exception when the returned search data size is too large
Change-Id: Ia980f2f385cf798abed94d8504ba9f013417651b
2023-12-06 21:59:20 +00:00
Qian Sun
d11fe387c7 Support parameter "skip_host_detach" in LogicalPort API
This patch will add the support for parameter skip_host_detach in
LogicalPort deletion request as the preparation of a corner fix
which will delete the discovered port without host detach.

The other preparation in this patch is to add the new Exception
class VifRestoreAlreadyCompleted.

Change-Id: I012dbc7db5c0af31d670e71e1d04fa6216f269b3
2023-11-21 06:33:20 +00:00
lxiaopei
d73f0aeb76 Add allow_partial_updates param for PrefixList API
Need to set allow_partial_updates param for PrefixList
update API to allow update prefix to [].

Change-Id: I5567fd8e4d25f69d09ec5362499bb1631c4d83ae
2023-08-30 14:00:16 +08:00
Shawn Wang
9341330fdb
Add enforcement_point_path param for LBServiceUsage
This change adds LBS usage, statistics and status API with param
'enforcement_point_path' to support querying in a multi enforcement
point setup.

Change-Id: I08cbc05bbad6e70dbd3a1c96fba72931a94f0b7f
Signed-off-by: Shawn Wang <wshaoquan@vmware.com>
2023-08-21 12:33:05 -07:00
Shawn Wang
77688b9934
Enable H-API delete for Policy Tier1 Api
This change adds hierarchical call support for deleting Policy Tier1.
H-API is already enabled for Tier1 creation. The change has no impact
for callers not using H-API for delete.

Change-Id: Ib36a0faa125b2c12c206b7c6c9ebc3bd0e04330e
19.4.0
2023-04-17 17:33:08 -07:00
Salvatore Orlando
ce621cfc80 Tier-1: Retry when removing edge cluster
Retry operation is a StaleRevision error is returned
from the backend.

Change-Id: I637b9d1e6a23767d9297cec115cceaa573257329
2023-04-17 00:45:08 -07:00
lxiaopei
3a627ed498 Update version check to use POST API when restore vif
According to NSX side fix merged in NSX versions 3.2.3
(and later impactor releases if any) and 4.1.*, update
the version check.

Change-Id: I8e5b29da1d10b076bef159d45ba436d135718ca8
19.3.0
2023-03-28 13:52:15 +08:00
Salvatore Orlando
acb8f2d53f Revert "Revert "Add sync_realization while creating ip-pool/ip-subnet for nsx-keeper""
This reverts commit d2836e34528d9061e2783283d7fad6a79b689ff2.

Reason for revert: backend support is now available

Change-Id: I835c4a99f38760e5cb834852adb4fb56b3bd234e
2023-03-11 02:00:08 -08:00
lxiaopei
d049dbc406 Add ip_release_delay when creating IpPool
When creating IpPool, ip_release_delay can be set
to indicate the delay for releasing allocated IP address from IP pool.
Default is 2mins.

Change-Id: I56e9edd09df34f7909a7ce47339ae903f518fbda
2023-02-27 13:52:54 +08:00
Zuul
0d922467e8 Merge "Revert "Add sync_realization while creating ip-pool/ip-subnet for nsx-keeper"" 2023-02-20 07:46:54 +00:00
Tao Zou
d2836e3452 Revert "Add sync_realization while creating ip-pool/ip-subnet for nsx-keeper"
This reverts commit b0c97de6605f719a6febe9febb66a44d562ddd84.

Reason for revert: it depends on nsxt support. but nsxt didn't merge the code

Change-Id: Id053d28cc9b315462849fd8df2d99b2ca7f6059c
2023-02-20 07:10:57 +00:00
lxiaopei
417f4085a5 Add version check to use POST API when restore vif
Since the new POST API to restore vif only exists
on NSX version >=4.1.0, add version check before
invoking the new POST API. Otherwise, still use
the old patch API.

Change-Id: Ic0047cba6ccaf275830b3c24a73f59ca28883de6
2023-02-15 17:19:02 +08:00
Zuul
7d64ecb265 Merge "Add sync_realization while creating ip-pool/ip-subnet for nsx-keeper" 2023-02-14 06:51:40 +00:00
Tao Zou
b0c97de660 Add sync_realization while creating ip-pool/ip-subnet for nsx-keeper
Change-Id: I3b797c7130a7deb858a21c2d63580e91211a665f
2023-02-14 14:17:10 +08:00
Shawn Wang
cbbb782084
Fix issues with tox 4.2.4
tox 4.2.4 starts to fail if basepython mismatches with python env[1].
This change works around the issue by setting [tox]
ignore_base_python_conflict.

Also changing envlist from py37 to py38 given the Zuul env using py3.8
now.

[1] https://github.com/tox-dev/tox/pull/2824/

Change-Id: I380c1073a4b1f5b8d8a066345c7512061bd007fb
2023-02-13 21:30:34 -08:00
Zuul
44ac0a020a Merge "Use POST API when restore vif" 2023-01-04 04:37:14 +00:00
lxiaopei
67a72e6baf Use POST API when restore vif
When restore vif, we need to use POST api with init_state:RESTORE_VIF
for NSX to persist all properties including tags and address_bindings.

Change-Id: I0d49a3860349a4d021cc9c881fb60543936feefc
2023-01-04 09:36:23 +08:00
Salvatore Orlando
2ae52acfab Drop lower-constraints job
The job is not supported anymore, and failing
with errors related to SSL symbols.

Change-Id: Ia879c9b18d5a5e8d5d784323c1fc33be022a8181
2023-01-03 01:56:16 -08:00
Gautam Verma
349c4c3999 Allow using force option to create and release IPBlockSubnets
Change-Id: I95cd3b5ada9fc4a612bec83ca759258ed1029f81
2022-12-23 21:37:20 +00:00
Salvatore Orlando
4f35234766 [tox] Make pass_env compatible with tox4
Change-Id: I2c4e321afe8b5b6bf2e6a03181cd182be06c4f44
(cherry picked from commit be23e754a72faea3ff038d30170ac7186ad5f1b8)
2022-12-23 20:53:51 +00:00
tathgurt
7b16449dab Support large IPv6 subnet via NSX IPAM
New field Introduced in IPblockSubnet in order to cap the
maximum Ip Subnets across different clusters.

Jira: #NCP-439
Change-Id: I2e01f7e787c5be5d20256b96b19e9ce8b68edbe6
2022-11-08 16:32:04 -08:00