Fixes for Policy LB resources
LBPool - use get for algorithm in _update_helper LBVirtualServer - infer waf_profile_binding type Change-Id: I7a6a12a00db2e493bfe7e1bb7187eab5b096b36a
This commit is contained in:
parent
28ebb0fe6e
commit
dab8741d6d
@ -233,9 +233,11 @@ class LBVirtualServerDef(ResourceDef):
|
|||||||
value=server_ssl_binding.get_obj_dict())
|
value=server_ssl_binding.get_obj_dict())
|
||||||
waf_profile_binding = self.get_attr('waf_profile_binding')
|
waf_profile_binding = self.get_attr('waf_profile_binding')
|
||||||
if waf_profile_binding:
|
if waf_profile_binding:
|
||||||
|
if isinstance(waf_profile_binding, WAFProfileBindingDef):
|
||||||
|
waf_profile_binding = waf_profile_binding.get_obj_dict()
|
||||||
self._set_attr_if_specified(
|
self._set_attr_if_specified(
|
||||||
body, 'waf_profile_binding',
|
body, 'waf_profile_binding',
|
||||||
value=waf_profile_binding.get_obj_dict())
|
value=waf_profile_binding)
|
||||||
rules = self.get_attr('rules')
|
rules = self.get_attr('rules')
|
||||||
if self.has_attr('rules'):
|
if self.has_attr('rules'):
|
||||||
rules = rules if isinstance(rules, list) else [rules]
|
rules = rules if isinstance(rules, list) else [rules]
|
||||||
|
@ -412,7 +412,7 @@ class NsxPolicyLoadBalancerPoolApi(NsxPolicyResourceBase):
|
|||||||
pool_data.get('active_monitor_paths'))
|
pool_data.get('active_monitor_paths'))
|
||||||
|
|
||||||
if kwargs.get('algorithm', IGNORE) == IGNORE:
|
if kwargs.get('algorithm', IGNORE) == IGNORE:
|
||||||
kwargs['algorithm'] = pool_data['algorithm']
|
kwargs['algorithm'] = pool_data.get('algorithm')
|
||||||
|
|
||||||
for k in kwargs.keys():
|
for k in kwargs.keys():
|
||||||
if kwargs.get(k) == IGNORE and pool_data.get(k):
|
if kwargs.get(k) == IGNORE and pool_data.get(k):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user