From cd305ac756f1548fdbf021fd877337267c77d858 Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Mon, 22 Apr 2019 09:18:19 +0300 Subject: [PATCH] Fix updating Policy LB pool with no members Change-Id: I35e99bcd7ad2399196ec6040d5e0bc2ca4e0c762 --- vmware_nsxlib/v3/policy/lb_defs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vmware_nsxlib/v3/policy/lb_defs.py b/vmware_nsxlib/v3/policy/lb_defs.py index 792aa363..5ab53747 100644 --- a/vmware_nsxlib/v3/policy/lb_defs.py +++ b/vmware_nsxlib/v3/policy/lb_defs.py @@ -192,6 +192,8 @@ class LBPoolDef(ResourceDef): body, ['active_monitor_paths', 'algorithm', 'member_group', 'snat_translation']) members = self.get_attr('members') + if members is None: + members = [] if self.has_attr('members'): members = members if isinstance(members, list) else [members] body['members'] = []