From 875cf4a1468a8cadc3606c98e8ea10b82067a87d Mon Sep 17 00:00:00 2001 From: Tong Liu Date: Thu, 6 Oct 2016 06:11:41 +0000 Subject: [PATCH] NSXv3: Fix MAC Learning Profile POST API Per NSXv3 API MacManagementSwitchingProfile schema, the POST MAC Learning switching profile API should use mac_change_allowed not source_mac_change_allowed. Also, the mac_change_allowed should not be used in creating MAC Learning switching profile. That param is designed for used in ESX to change MAC address once. In MAC Learning use case, as long as mac_learning is enabled, mac_change_allowed doesn't matter. Change-Id: Icd88f222c559c15949d9b9d1a600f78e89715bae --- vmware_nsx/nsxlib/v3/resources.py | 3 +-- vmware_nsx/tests/unit/nsxlib/v3/test_resources.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/vmware_nsx/nsxlib/v3/resources.py b/vmware_nsx/nsxlib/v3/resources.py index 196f5993c8..a9f4376aff 100644 --- a/vmware_nsx/nsxlib/v3/resources.py +++ b/vmware_nsx/nsxlib/v3/resources.py @@ -160,8 +160,7 @@ class SwitchingProfile(AbstractRESTResource): display_name=display_name, description=description, tags=tags or [], - mac_learning=mac_learning, - source_mac_change_allowed=True) + mac_learning=mac_learning) def create_port_mirror_profile(self, display_name, description, direction, destinations, tags=None): diff --git a/vmware_nsx/tests/unit/nsxlib/v3/test_resources.py b/vmware_nsx/tests/unit/nsxlib/v3/test_resources.py index 5f28b323d1..b7b69e30f2 100644 --- a/vmware_nsx/tests/unit/nsxlib/v3/test_resources.py +++ b/vmware_nsx/tests/unit/nsxlib/v3/test_resources.py @@ -182,7 +182,6 @@ class TestSwitchingProfileTestCase(nsxlib_testcase.NsxClientTestCase): 'display_name': 'plugin-mac-learning', 'description': 'mac-learning-for-plugin', 'tags': tags, - 'source_mac_change_allowed': True, }, sort_keys=True)) def test_find_by_display_name(self):