Commit 1f401432 by e0d Committed by Feanil Patel

removing camel case

parent 21832855
......@@ -11,7 +11,7 @@ author: Edward Zarecor
options:
function:
description:
- The function to apply, currently ['zipToDict','flatten']
- The function to apply, currently ['zip_to_dict','flatten']
required: true
input:
description:
......@@ -25,7 +25,7 @@ options:
EXAMPLES = '''
- name: Apply function to results from ec2_scaling_policies
util_map:
function: 'zipToDict'
function: 'zip_to_dict'
input: "{{ created_policies.results }}"
args:
- "name"
......@@ -74,7 +74,7 @@ def flatten(module, input):
module.exit_json(function_output = flat)
def zipToDict(module, input, key_key, value_key):
def zip_to_dict(module, input, key_key, value_key):
"""
Takes an array of dicts and flattens it to a single dict by extracting the values
of a provided key as the keys in the new dict and the values of the second
......@@ -106,7 +106,7 @@ def zipToDict(module, input, key_key, value_key):
def main():
arg_spec = dict(
function=dict(required=True,choices=['zipToDict','flatten']),
function=dict(required=True,choices=['zip_to_dict','flatten']),
input=dict(required=True, type='str'),
args=dict(required=False, type='list'),
)
......@@ -118,8 +118,8 @@ def main():
input = ast.literal_eval(module.params.get('input'))
args = module.params.get('args')
if target == 'zipToDict':
zipToDict(module, input, *args)
if target == 'zip_to_dict':
zip_to_dict(module, input, *args)
elif target == 'flatten':
flatten(module,input)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment