Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions acos_client/v30/slb/hm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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']:
Comment thread
JLau1596 marked this conversation as resolved.
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:
Expand All @@ -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")
Expand Down