diff --git a/vmware_nsxlib/tests/unit/v3/policy/test_lb_resources.py b/vmware_nsxlib/tests/unit/v3/policy/test_lb_resources.py index 2abb7423..ccf889ac 100644 --- a/vmware_nsxlib/tests/unit/v3/policy/test_lb_resources.py +++ b/vmware_nsxlib/tests/unit/v3/policy/test_lb_resources.py @@ -1296,11 +1296,14 @@ class TestPolicyLBVirtualServer(test_resources.NsxPolicyLibTestCase): def test_remove_virtual_server_client_ssl_profile_binding(self): vs_id = 'test-id' vs_name = 'test-name' - exist_binding = { + client_binding = { 'default_certificate_path': '/infra/certificates/test-cert', 'client_ssl_profile_path': '/infra/lb-client-ssl-profiles/default'} + server_binding = { + 'ssl_profile_path': '/infra/lb-server-ssl-profiles/test'} with self.mock_get( - vs_id, vs_name, client_ssl_profile_binding=exist_binding), \ + vs_id, vs_name, client_ssl_profile_binding=client_binding, + server_ssl_profile_binding=server_binding), \ self.mock_create_update() as update_call: self.resourceApi.remove_virtual_server_client_ssl_profile_binding( vs_id) diff --git a/vmware_nsxlib/v3/policy/lb_resources.py b/vmware_nsxlib/v3/policy/lb_resources.py index b26a3755..707bb83a 100644 --- a/vmware_nsxlib/v3/policy/lb_resources.py +++ b/vmware_nsxlib/v3/policy/lb_resources.py @@ -873,6 +873,9 @@ class NsxPolicyLoadBalancerVirtualServerAPI(NsxPolicyResourceBase): virtual_server_id=virtual_server_id, tenant=tenant) body = lbvs_def.body if lbvs_def.body else {} body.pop('client_ssl_profile_binding', None) + # Server ssl profile binding can not exist without client ssl profile + # binding + body.pop('server_ssl_profile_binding', None) if body: lbvs_def.set_obj_dict(body) self.policy_api.create_or_update(