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
7ff3282e
Commit
7ff3282e
authored
Jun 09, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7682 from sergevanginderachter/bigip_monitor_http_checkmode_fix
bigip_monitor bugfix for check mode
parents
4c30b3d6
ceb1ba16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
library/net_infrastructure/bigip_monitor_http
+19
-2
library/net_infrastructure/bigip_monitor_tcp
+20
-2
No files found.
library/net_infrastructure/bigip_monitor_http
View file @
7ff3282e
...
@@ -226,7 +226,15 @@ def delete_monitor(api, monitor):
...
@@ -226,7 +226,15 @@ def delete_monitor(api, monitor):
def
check_string_property
(
api
,
monitor
,
str_property
):
def
check_string_property
(
api
,
monitor
,
str_property
):
return
str_property
==
api
.
LocalLB
.
Monitor
.
get_template_string_property
([
monitor
],
[
str_property
[
'type'
]])[
0
]
try
:
return
str_property
==
api
.
LocalLB
.
Monitor
.
get_template_string_property
([
monitor
],
[
str_property
[
'type'
]])[
0
]
except
bigsuds
.
OperationFailed
,
e
:
# happens in check mode if not created yet
if
"was not found"
in
str
(
e
):
return
True
else
:
# genuine exception
raise
def
set_string_property
(
api
,
monitor
,
str_property
):
def
set_string_property
(
api
,
monitor
,
str_property
):
...
@@ -236,7 +244,16 @@ def set_string_property(api, monitor, str_property):
...
@@ -236,7 +244,16 @@ def set_string_property(api, monitor, str_property):
def
check_integer_property
(
api
,
monitor
,
int_property
):
def
check_integer_property
(
api
,
monitor
,
int_property
):
return
int_property
==
api
.
LocalLB
.
Monitor
.
get_template_integer_property
([
monitor
],
[
int_property
[
'type'
]])[
0
]
try
:
return
int_property
==
api
.
LocalLB
.
Monitor
.
get_template_integer_property
([
monitor
],
[
int_property
[
'type'
]])[
0
]
except
bigsuds
.
OperationFailed
,
e
:
# happens in check mode if not created yet
if
"was not found"
in
str
(
e
):
return
True
else
:
# genuine exception
raise
def
set_integer_property
(
api
,
monitor
,
int_property
):
def
set_integer_property
(
api
,
monitor
,
int_property
):
...
...
library/net_infrastructure/bigip_monitor_tcp
View file @
7ff3282e
...
@@ -245,7 +245,16 @@ def delete_monitor(api, monitor):
...
@@ -245,7 +245,16 @@ def delete_monitor(api, monitor):
def
check_string_property
(
api
,
monitor
,
str_property
):
def
check_string_property
(
api
,
monitor
,
str_property
):
return
str_property
==
api
.
LocalLB
.
Monitor
.
get_template_string_property
([
monitor
],
[
str_property
[
'type'
]])[
0
]
try
:
return
str_property
==
api
.
LocalLB
.
Monitor
.
get_template_string_property
([
monitor
],
[
str_property
[
'type'
]])[
0
]
except
bigsuds
.
OperationFailed
,
e
:
# happens in check mode if not created yet
if
"was not found"
in
str
(
e
):
return
True
else
:
# genuine exception
raise
return
True
def
set_string_property
(
api
,
monitor
,
str_property
):
def
set_string_property
(
api
,
monitor
,
str_property
):
...
@@ -255,7 +264,16 @@ def set_string_property(api, monitor, str_property):
...
@@ -255,7 +264,16 @@ def set_string_property(api, monitor, str_property):
def
check_integer_property
(
api
,
monitor
,
int_property
):
def
check_integer_property
(
api
,
monitor
,
int_property
):
return
int_property
==
api
.
LocalLB
.
Monitor
.
get_template_integer_property
([
monitor
],
[
int_property
[
'type'
]])[
0
]
try
:
return
int_property
==
api
.
LocalLB
.
Monitor
.
get_template_integer_property
([
monitor
],
[
int_property
[
'type'
]])[
0
]
except
bigsuds
.
OperationFailed
,
e
:
# happens in check mode if not created yet
if
"was not found"
in
str
(
e
):
return
True
else
:
# genuine exception
raise
return
True
def
set_integer_property
(
api
,
monitor
,
int_property
):
def
set_integer_property
(
api
,
monitor
,
int_property
):
...
...
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