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
5204d7ca
Commit
5204d7ca
authored
Jun 03, 2015
by
Etienne CARRIERE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add common fonctions for F5 modules (FQ Name functions)
parent
3e2e81d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletions
+17
-1
lib/ansible/module_utils/f5.py
+17
-1
No files found.
lib/ansible/module_utils/f5.py
View file @
5204d7ca
...
...
@@ -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,19 @@ 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
None
:
return
None
if
name
[
0
]
is
'/'
:
return
name
else
:
return
'/
%
s/
%
s'
%
(
partition
,
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