mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
parent
2f33c1a1a1
commit
5553b20828
206 changed files with 1853 additions and 1870 deletions
|
@ -56,7 +56,6 @@ def f5_argument_spec():
|
|||
server_port=dict(
|
||||
type='int',
|
||||
default=443,
|
||||
required=False,
|
||||
fallback=(env_fallback, ['F5_SERVER_PORT'])
|
||||
),
|
||||
state=dict(
|
||||
|
@ -80,7 +79,7 @@ def f5_parse_arguments(module):
|
|||
import ssl
|
||||
if not hasattr(ssl, 'SSLContext'):
|
||||
module.fail_json(
|
||||
msg="bigsuds does not support verifying certificates with python < 2.7.9." \
|
||||
msg="bigsuds does not support verifying certificates with python < 2.7.9."
|
||||
"Either update python or set validate_certs=False on the task'")
|
||||
|
||||
return (
|
||||
|
@ -122,26 +121,22 @@ def bigip_api(bigip, user, password, validate_certs, port=443):
|
|||
|
||||
|
||||
# Fully Qualified name (with the partition)
|
||||
def fq_name(partition,name):
|
||||
def fq_name(partition, name):
|
||||
if name is not None and not name.startswith('/'):
|
||||
return '/%s/%s' % (partition,name)
|
||||
return '/%s/%s' % (partition, name)
|
||||
return name
|
||||
|
||||
|
||||
# Fully Qualified name (with partition) for a list
|
||||
def fq_list_names(partition,list_names):
|
||||
def fq_list_names(partition, list_names):
|
||||
if list_names is None:
|
||||
return None
|
||||
return map(lambda x: fq_name(partition,x),list_names)
|
||||
|
||||
|
||||
|
||||
return map(lambda x: fq_name(partition, x), list_names)
|
||||
|
||||
|
||||
# New style
|
||||
|
||||
from abc import ABCMeta, abstractproperty
|
||||
from ansible.module_utils.six import with_metaclass
|
||||
from collections import defaultdict
|
||||
|
||||
try:
|
||||
|
@ -158,7 +153,7 @@ except ImportError:
|
|||
|
||||
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils.six import iteritems, with_metaclass
|
||||
|
||||
|
||||
F5_COMMON_ARGS = dict(
|
||||
|
@ -187,7 +182,6 @@ F5_COMMON_ARGS = dict(
|
|||
server_port=dict(
|
||||
type='int',
|
||||
default=443,
|
||||
required=False,
|
||||
fallback=(env_fallback, ['F5_SERVER_PORT'])
|
||||
),
|
||||
state=dict(
|
||||
|
@ -286,7 +280,7 @@ class AnsibleF5Parameters(object):
|
|||
def __init__(self, params=None):
|
||||
self._values = defaultdict(lambda: None)
|
||||
if params:
|
||||
for k,v in iteritems(params):
|
||||
for k, v in iteritems(params):
|
||||
if self.api_map is not None and k in self.api_map:
|
||||
dict_to_use = self.api_map
|
||||
map_key = self.api_map[k]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue