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
f3ccff42
Commit
f3ccff42
authored
Jun 03, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11142 from Etienne-Carriere/factor_f5
Add common fonctions for F5 modules (FQ Name functions)
parents
0cbd7b6b
94fa5e87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
+14
-1
lib/ansible/module_utils/f5.py
+14
-1
No files found.
lib/ansible/module_utils/f5.py
View file @
f3ccff42
...
...
@@ -50,7 +50,7 @@ def f5_parse_arguments(module):
module
.
fail_json
(
msg
=
"the python bigsuds module is required"
)
if
not
module
.
params
[
'validate_certs'
]:
disable_ssl_cert_validation
()
return
(
module
.
params
[
'server'
],
module
.
params
[
'user'
],
module
.
params
[
'password'
],
module
.
params
[
'state'
],
module
.
params
[
'partition'
])
return
(
module
.
params
[
'server'
],
module
.
params
[
'user'
],
module
.
params
[
'password'
],
module
.
params
[
'state'
],
module
.
params
[
'partition'
]
,
module
.
params
[
'validate_certs'
]
)
def
bigip_api
(
bigip
,
user
,
password
):
api
=
bigsuds
.
BIGIP
(
hostname
=
bigip
,
username
=
user
,
password
=
password
)
...
...
@@ -62,3 +62,16 @@ def disable_ssl_cert_validation():
import
ssl
ssl
.
_create_default_https_context
=
ssl
.
_create_unverified_context
# Fully Qualified name (with the partition)
def
fq_name
(
partition
,
name
):
if
name
is
not
None
and
not
name
.
startswith
(
'/'
):
return
'/
%
s/
%
s'
%
(
partition
,
name
)
return
name
# Fully Qualified name (with partition) for a list
def
fq_list_names
(
partition
,
list_names
):
if
list_names
is
None
:
return
None
return
map
(
lambda
x
:
fq_name
(
partition
,
x
),
list_names
)
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