Browse Source

Merge "Do not use None values on patch partial update calls"

tags/14.0.4
Zuul Gerrit Code Review 8 months ago
parent
commit
63d8c2228c
2 changed files with 13 additions and 13 deletions
  1. +10
    -10
      vmware_nsxlib/v3/policy/core_defs.py
  2. +3
    -3
      vmware_nsxlib/v3/policy/lb_defs.py

+ 10
- 10
vmware_nsxlib/v3/policy/core_defs.py View File

@@ -306,7 +306,7 @@ class RouterDef(ResourceDef):
# Add dhcp relay config
# TODO(asarfaty): this can be either dhcp or dhcp relay config
if self.has_attr('dhcp_config'):
paths = None
paths = ""
if self.get_attr('dhcp_config'):
dhcp_conf = DhcpRelayConfigDef(
config_id=self.get_attr('dhcp_config'),
@@ -317,7 +317,7 @@ class RouterDef(ResourceDef):
value=paths)

if self.has_attr('ipv6_ndra_profile_id'):
paths = None
paths = ""
if self.get_attr('ipv6_ndra_profile_id'):
ndra_profile = Ipv6NdraProfileDef(
profile_id=self.get_attr('ipv6_ndra_profile_id'),
@@ -490,7 +490,7 @@ class Tier1InterfaceDef(ResourceDef):
value=path)

if self.has_attr('ipv6_ndra_profile_id'):
paths = None
paths = ""
if self.get_attr('ipv6_ndra_profile_id'):
ndra_profile = Ipv6NdraProfileDef(
profile_id=self.get_attr('ipv6_ndra_profile_id'),
@@ -828,7 +828,7 @@ class SegmentSecProfilesBindingMapDef(SegmentBindingMapDefBase):
body = super(SegmentSecProfilesBindingMapDef, self).get_obj_dict()

if self.has_attr('segment_security_profile_id'):
path = None
path = ""
if self.get_attr('segment_security_profile_id'):
profile = SegmentSecurityProfileDef(
profile_id=self.get_attr('segment_security_profile_id'),
@@ -840,7 +840,7 @@ class SegmentSecProfilesBindingMapDef(SegmentBindingMapDefBase):
value=path)

if self.has_attr('spoofguard_profile_id'):
path = None
path = ""
if self.get_attr('spoofguard_profile_id'):
profile = SpoofguardProfileDef(
profile_id=self.get_attr('spoofguard_profile_id'),
@@ -878,7 +878,7 @@ class SegmentPortSecProfilesBindingMapDef(SegmentPortBindingMapDefBase):
body = super(SegmentPortSecProfilesBindingMapDef, self).get_obj_dict()

if self.has_attr('segment_security_profile_id'):
path = None
path = ""
if self.get_attr('segment_security_profile_id'):
profile = SegmentSecurityProfileDef(
profile_id=self.get_attr('segment_security_profile_id'),
@@ -890,7 +890,7 @@ class SegmentPortSecProfilesBindingMapDef(SegmentPortBindingMapDefBase):
value=path)

if self.has_attr('spoofguard_profile_id'):
path = None
path = ""
if self.get_attr('spoofguard_profile_id'):
profile = SpoofguardProfileDef(
profile_id=self.get_attr('spoofguard_profile_id'),
@@ -919,7 +919,7 @@ class SegmentPortDiscoveryProfilesBindingMapDef(SegmentPortBindingMapDefBase):
self).get_obj_dict()

if self.has_attr('mac_discovery_profile_id'):
path = None
path = ""
if self.get_attr('mac_discovery_profile_id'):
profile = MacDiscoveryProfileDef(
profile_id=self.get_attr('mac_discovery_profile_id'),
@@ -931,7 +931,7 @@ class SegmentPortDiscoveryProfilesBindingMapDef(SegmentPortBindingMapDefBase):
value=path)

if self.has_attr('ip_discovery_profile_id'):
path = None
path = ""
if self.get_attr('ip_discovery_profile_id'):
profile = IpDiscoveryProfileDef(
profile_id=self.get_attr('ip_discovery_profile_id'),
@@ -960,7 +960,7 @@ class SegmentPortQoSProfilesBindingMapDef(SegmentPortBindingMapDefBase):
self).get_obj_dict()

if self.has_attr('qos_profile_id'):
path = None
path = ""
if self.get_attr('qos_profile_id'):
profile = QosProfileDef(
profile_id=self.get_attr('qos_profile_id'),


+ 3
- 3
vmware_nsxlib/v3/policy/lb_defs.py View File

@@ -263,7 +263,7 @@ class LBVirtualServerDef(ResourceDef):
app_profile_def.get_resource_full_path())

if self.has_attr('lb_persistence_profile_id'):
path = None
path = ""
lb_persistence_profile_id = self.get_attr(
'lb_persistence_profile_id')
if lb_persistence_profile_id:
@@ -273,7 +273,7 @@ class LBVirtualServerDef(ResourceDef):
path = lb_persistence_profile_def.get_resource_full_path()
body['lb_persistence_profile_path'] = path
if self.has_attr('lb_service_id'):
path = None
path = ""
lb_service_id = self.get_attr('lb_service_id')
if lb_service_id:
lb_service_def = LBServiceDef(
@@ -281,7 +281,7 @@ class LBVirtualServerDef(ResourceDef):
path = lb_service_def.get_resource_full_path()
body['lb_service_path'] = path
if self.has_attr('pool_id'):
path = None
path = ""
lb_pool_id = self.get_attr('pool_id')
if lb_pool_id:
lb_pool_def = LBPoolDef(


Loading…
Cancel
Save