diff --git a/acos_client/v30/slb/hm.py b/acos_client/v30/slb/hm.py index 97bee1a7..f8c4f1d9 100644 --- a/acos_client/v30/slb/hm.py +++ b/acos_client/v30/slb/hm.py @@ -69,7 +69,7 @@ def get(self, name, **kwargs): def _set(self, action, name, mon_method, interval, timeout, max_retries, method=None, url=None, expect_code=None, port=None, ipv4=None, update=False, - **kwargs): + disable_sslv2=False, **kwargs): params = { "monitor": { "name": name, @@ -82,8 +82,12 @@ def _set(self, action, name, mon_method, interval, timeout, max_retries, "override-ipv4": ipv4 } } - if method: - params['monitor']['method'][mon_method]['url-type'] = method + if mon_method in ['http', 'https']: + if method: + params['monitor']['method'][mon_method]['url-type'] = method + if mon_method in ['https']: + if disable_sslv2: + params['monitor']['method'][mon_method]['disable-sslv2hello'] = disable_sslv2 if url: params['monitor']['method'][mon_method]['url-path'] = url if expect_code: @@ -96,7 +100,6 @@ def _set(self, action, name, mon_method, interval, timeout, max_retries, k = '%s-port' % mon_method params['monitor']['method'][mon_method][k] = int(port) params['monitor']['override-port'] = int(port) - # TODO(mdurrant) : Might have to get tricky with JSON structures # ... due to 'mon_method' stuff. config_defaults = kwargs.get("config_defaults")