diff --git a/vmware_nsxlib/tests/unit/v3/test_resources.py b/vmware_nsxlib/tests/unit/v3/test_resources.py index bac021ea..800240f0 100644 --- a/vmware_nsxlib/tests/unit/v3/test_resources.py +++ b/vmware_nsxlib/tests/unit/v3/test_resources.py @@ -307,11 +307,7 @@ class LogicalPortTestCase(BaseTestResource): return fake_profile_dicts def _get_extra_config_dicts(self, fake_port): - fake_extra_config_dicts = [] - for config in fake_port['extra_configs']: - fake_extra_config_dicts.append( - {'config_value': config['config_pair']['value'], - 'config_key': config['config_pair']['key']}) + fake_extra_config_dicts = fake_port['extra_configs'] return fake_extra_config_dicts def _get_pktcls_bindings(self): diff --git a/vmware_nsxlib/v3/resources.py b/vmware_nsxlib/v3/resources.py index 16d10dc0..7eb6da79 100644 --- a/vmware_nsxlib/v3/resources.py +++ b/vmware_nsxlib/v3/resources.py @@ -129,14 +129,7 @@ class LogicalPort(utils.NsxLibApiBase): body['description'] = description if extra_configs: - configs = [] - for config in extra_configs: - configs.append({ - 'config_pair': { - 'value': config.get('config_value'), - 'key': config.get('config_key')} - }) - body['extra_configs'] = configs + body['extra_configs'] = extra_configs return body