Browse Source

Allow removing segment port address bindings

Change-Id: I9374deebf7bdce8c886fceb70c0452a4377daf50
changes/37/772637/1
asarfaty 1 year ago
parent
commit
83f943c41d
  1. 9
      vmware_nsxlib/v3/policy/core_defs.py

9
vmware_nsxlib/v3/policy/core_defs.py

@ -1144,10 +1144,11 @@ class SegmentPortDef(ResourceDef):
def get_obj_dict(self):
body = super(SegmentPortDef, self).get_obj_dict()
address_bindings = self.get_attr('address_bindings')
if address_bindings:
body['address_bindings'] = [binding.get_obj_dict()
for binding in address_bindings]
if self.has_attr('address_bindings'):
address_bindings = self.get_attr('address_bindings')
if address_bindings is not None:
body['address_bindings'] = [binding.get_obj_dict()
for binding in address_bindings]
if (self.has_attr('attachment_type') or self.has_attr('vif_id') or
self.has_attr('hyperbus_mode')):
if (not self.get_attr('attachment_type') and

Loading…
Cancel
Save