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,11 +142,12 @@ def main():
('disable', {'xpath': 'disable', 'tag_only': True})
])
state = module.params.get('state')
module.params['disable'] = True if state in ('disabled', 'absent') else False
item = module.params.copy()
state = item.get('state')
item['disable'] = True if state in ('disabled', 'absent') else False
if state in ('enabled', 'disabled'):
module.params['state'] = 'present'
item['state'] = 'present'
want = map_params_to_obj(module, param_to_xpath_map)
ele = map_obj_to_ele(module, want, top)