Browse Source

Add feature for supporting spoofguard ipv4 CIDR

Change-Id: Ib0d1d713fa554b462d332a3168675d10f12d9c0f
changes/77/733977/1
asarfaty 1 month ago
committed by Adit Sarfaty
parent
commit
82317efb75
3 changed files with 10 additions and 1 deletions
  1. +3
    -1
      vmware_nsxlib/v3/__init__.py
  2. +1
    -0
      vmware_nsxlib/v3/nsx_constants.py
  3. +6
    -0
      vmware_nsxlib/v3/policy/__init__.py

+ 3
- 1
vmware_nsxlib/v3/__init__.py View File

@@ -170,7 +170,9 @@ class NsxLib(lib.NsxLibBase):
if (version.LooseVersion(self.get_version()) >=
version.LooseVersion(nsx_constants.NSX_VERSION_3_1_0)):
# features available since 3.1.0
if (feature == nsx_constants.FEATURE_MP2P_MIGRATION):
if feature == nsx_constants.FEATURE_MP2P_MIGRATION:
return True
if feature == nsx_constants.FEATURE_SPOOFGUARD_CIDR:
return True

if (version.LooseVersion(self.get_version()) >=


+ 1
- 0
vmware_nsxlib/v3/nsx_constants.py View File

@@ -176,6 +176,7 @@ FEATURE_GET_TZ_FROM_SWITCH = 'Get TZ endpoints from host switch'
FEATURE_CONTAINER_CLUSTER_INVENTORY = 'Container Cluster Inventory'
FEATURE_IPV6 = 'IPV6 Forwarding and Address Allocation'
FEATURE_MP2P_MIGRATION = 'MP to Policy Migration'
FEATURE_SPOOFGUARD_CIDR = 'Spoofguard IPv4 CIDR'

# Features available depending on the Policy Manager backend version
FEATURE_NSX_POLICY = 'NSX Policy'


+ 6
- 0
vmware_nsxlib/v3/policy/__init__.py View File

@@ -185,6 +185,12 @@ class NsxPolicyLib(lib.NsxLibBase):
if (feature == nsx_constants.FEATURE_RELAX_SCALE_VALIDATION):
return True

if (version.LooseVersion(self.get_version()) >=
version.LooseVersion(nsx_constants.NSX_VERSION_3_1_0)):
# features available since 3.1.0
if feature == nsx_constants.FEATURE_SPOOFGUARD_CIDR:
return True

return (feature == nsx_constants.FEATURE_NSX_POLICY)

def reinitialize_cluster(self, resource, event, trigger, payload=None):


Loading…
Cancel
Save