Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
47483290
Commit
47483290
authored
Oct 25, 2013
by
Serge van Ginderachter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up comments to show monitor specific code
parent
7bad73bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
library/net_infrastructure/bigip_monitor_http
+4
-9
No files found.
library/net_infrastructure/bigip_monitor_http
View file @
47483290
...
@@ -261,10 +261,6 @@ def update_monitor_properties(api, module, monitor, template_string_properties,
...
@@ -261,10 +261,6 @@ def update_monitor_properties(api, module, monitor, template_string_properties,
return
changed
return
changed
# ===========================================
# monitor specific function
#
def
get_ipport
(
api
,
monitor
):
def
get_ipport
(
api
,
monitor
):
return
api
.
LocalLB
.
Monitor
.
get_template_destination
(
template_names
=
[
monitor
])[
0
]
return
api
.
LocalLB
.
Monitor
.
get_template_destination
(
template_names
=
[
monitor
])[
0
]
...
@@ -291,7 +287,7 @@ def set_ipport(api, monitor, ipport):
...
@@ -291,7 +287,7 @@ def set_ipport(api, monitor, ipport):
def
main
():
def
main
():
# monitor specific stuff
#
begin
monitor specific stuff
module
=
AnsibleModule
(
module
=
AnsibleModule
(
argument_spec
=
dict
(
argument_spec
=
dict
(
...
@@ -333,6 +329,7 @@ def main():
...
@@ -333,6 +329,7 @@ def main():
timeout
=
module
.
params
[
'timeout'
]
timeout
=
module
.
params
[
'timeout'
]
time_until_up
=
module
.
params
[
'time_until_up'
]
time_until_up
=
module
.
params
[
'time_until_up'
]
# end monitor specific stuff
if
not
bigsuds_found
:
if
not
bigsuds_found
:
module
.
fail_json
(
msg
=
"the python bigsuds module is required"
)
module
.
fail_json
(
msg
=
"the python bigsuds module is required"
)
...
@@ -377,6 +374,7 @@ def main():
...
@@ -377,6 +374,7 @@ def main():
'is_read_only'
:
False
,
'is_read_only'
:
False
,
'is_directly_usable'
:
True
}
'is_directly_usable'
:
True
}
# monitor specific stuff
template_string_properties
=
[{
'type'
:
'STYPE_SEND'
,
template_string_properties
=
[{
'type'
:
'STYPE_SEND'
,
'value'
:
send
},
'value'
:
send
},
{
'type'
:
'STYPE_RECEIVE'
,
{
'type'
:
'STYPE_RECEIVE'
,
...
@@ -391,8 +389,7 @@ def main():
...
@@ -391,8 +389,7 @@ def main():
{
'type'
:
'ITYPE_TIME_UNTIL_UP'
,
{
'type'
:
'ITYPE_TIME_UNTIL_UP'
,
'value'
:
interval
}]
'value'
:
interval
}]
# monitor specific stuff END
# main logic, monitor generic
# main logic, mostly monitor generic
try
:
try
:
result
=
{
'changed'
:
False
}
# default
result
=
{
'changed'
:
False
}
# default
...
@@ -427,13 +424,11 @@ def main():
...
@@ -427,13 +424,11 @@ def main():
template_integer_properties
)
template_integer_properties
)
# else assume nothing changed
# else assume nothing changed
# monitor specific stuff
# we just have to update the ipport if monitor already exists and it's different
# we just have to update the ipport if monitor already exists and it's different
if
monitor_exists
and
cur_ipport
!=
ipport
:
if
monitor_exists
and
cur_ipport
!=
ipport
:
set_ipport
(
api
,
monitor
,
ipport
)
set_ipport
(
api
,
monitor
,
ipport
)
result
[
'changed'
]
|=
True
result
[
'changed'
]
|=
True
#else: monitor doesn't exist (check mode) or ipport is already ok
#else: monitor doesn't exist (check mode) or ipport is already ok
# monitor specific stuff
except
Exception
,
e
:
except
Exception
,
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment