diff --git a/vmware_nsxlib/v3/nsx_constants.py b/vmware_nsxlib/v3/nsx_constants.py index a8c54848..194b51b6 100644 --- a/vmware_nsxlib/v3/nsx_constants.py +++ b/vmware_nsxlib/v3/nsx_constants.py @@ -149,6 +149,7 @@ NSX_VERSION_2_3_0 = '2.3.0' NSX_VERSION_2_4_0 = '2.4.0' NSX_VERSION_2_5_0 = '2.5.0' NSX_VERSION_3_0_0 = '3.0.0' +NSX_VERSION_3_0_2 = '3.0.2' NSX_VERSION_3_1_0 = '3.1.0' # Features available depending on the NSX Manager backend version diff --git a/vmware_nsxlib/v3/policy/core_defs.py b/vmware_nsxlib/v3/policy/core_defs.py index 6a200607..b49e2b58 100644 --- a/vmware_nsxlib/v3/policy/core_defs.py +++ b/vmware_nsxlib/v3/policy/core_defs.py @@ -1165,13 +1165,18 @@ class SegmentPortDef(ResourceDef): arg_name='init_state') self._set_attr_if_specified(body, 'init_state') + if (self.has_attr('extra_configs') and + self._version_dependant_attr_supported('extra_configs')): + self._set_attr_if_specified(body, 'extra_configs') + return body @property def version_dependant_attr_map(self): return {'hyperbus_mode': nsx_constants.NSX_VERSION_3_0_0, 'admin_state': nsx_constants.NSX_VERSION_3_0_0, - 'init_state': nsx_constants.NSX_VERSION_3_1_0} + 'init_state': nsx_constants.NSX_VERSION_3_1_0, + 'extra_configs': nsx_constants.NSX_VERSION_3_0_2} class SegmentBindingMapDefBase(ResourceDef): diff --git a/vmware_nsxlib/v3/policy/core_resources.py b/vmware_nsxlib/v3/policy/core_resources.py index 3b8ddb47..b1abf48f 100644 --- a/vmware_nsxlib/v3/policy/core_resources.py +++ b/vmware_nsxlib/v3/policy/core_resources.py @@ -2153,6 +2153,7 @@ class NsxPolicySegmentPortApi(NsxPolicyResourceBase): hyperbus_mode=IGNORE, admin_state=IGNORE, init_state=IGNORE, + extra_configs=IGNORE, tags=IGNORE, tenant=constants.POLICY_INFRA_TENANT): @@ -2171,6 +2172,7 @@ class NsxPolicySegmentPortApi(NsxPolicyResourceBase): hyperbus_mode=hyperbus_mode, admin_state=admin_state, init_state=init_state, + extra_configs=extra_configs, tags=tags, tenant=tenant) self._create_or_store(port_def) @@ -2201,6 +2203,7 @@ class NsxPolicySegmentPortApi(NsxPolicyResourceBase): address_bindings=IGNORE, hyperbus_mode=IGNORE, admin_state=IGNORE, + extra_configs=IGNORE, tags=IGNORE, tenant=constants.POLICY_INFRA_TENANT): @@ -2211,6 +2214,7 @@ class NsxPolicySegmentPortApi(NsxPolicyResourceBase): address_bindings=address_bindings, hyperbus_mode=hyperbus_mode, admin_state=admin_state, + extra_configs=extra_configs, tags=tags, tenant=tenant) @@ -2247,6 +2251,7 @@ class NsxPolicySegmentPortApi(NsxPolicyResourceBase): context_id=None, traffic_tag=None, hyperbus_mode=IGNORE, + extra_configs=IGNORE, tags=IGNORE, tenant=constants.POLICY_INFRA_TENANT): @@ -2259,6 +2264,7 @@ class NsxPolicySegmentPortApi(NsxPolicyResourceBase): context_id=context_id, traffic_tag=traffic_tag, hyperbus_mode=hyperbus_mode, + extra_configs=extra_configs, tags=tags, tenant=tenant)