junos_linkagg aggregate and other minor fixes (#27855)

* junos_linkagg aggregate and other minor fixes

* Minor change
This commit is contained in:
Ganesh Nalawade
2017-08-08 12:13:28 +05:30
committed by GitHub
parent 43f6a97bdc
commit 49eb81d573
9 changed files with 96 additions and 76 deletions

View File

@@ -142,8 +142,6 @@ diff.prepared:
"""
import collections
from copy import copy
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.junos import junos_argument_spec, check_args
from ansible.module_utils.junos import load_config, map_params_to_obj, map_obj_to_ele
@@ -189,7 +187,7 @@ def main():
active=dict(default=True, type='bool')
)
aggregate_spec = copy(element_spec)
aggregate_spec = element_spec.copy()
aggregate_spec['name'] = dict(required=True)
argument_spec = dict(
@@ -238,7 +236,7 @@ def main():
requests = list()
for param in params:
item = copy(param)
item = param.copy()
state = item.get('state')
item['disable'] = True if state == 'down' else False