mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 21:30:22 -07:00
junos implementation of net_lldp (#26872)
* junos_lldp module * junos_lldp integration test * net_lldp integration test for junos * Other minor changes
This commit is contained in:
parent
30ad30c470
commit
879acf378d
12 changed files with 280 additions and 11 deletions
|
@ -303,10 +303,6 @@ def map_obj_to_ele(module, want, top, value_map=None):
|
|||
if state == 'absent' and not (is_key or leaf_only):
|
||||
continue
|
||||
|
||||
# for tag only node if value is false continue to next attr
|
||||
if tag_only and not value:
|
||||
continue
|
||||
|
||||
# convert param value to device specific value
|
||||
if value_map and fxpath in value_map:
|
||||
value = value_map[fxpath].get(value)
|
||||
|
@ -335,12 +331,13 @@ def map_obj_to_ele(module, want, top, value_map=None):
|
|||
else:
|
||||
ele = ele_list[0]
|
||||
|
||||
tags = fxpath.split('/')
|
||||
if value is not None:
|
||||
if value is not None and not isinstance(value, bool):
|
||||
value = to_text(value, errors='surrogate_then_replace')
|
||||
|
||||
for item in tags:
|
||||
ele = SubElement(ele, item)
|
||||
if fxpath:
|
||||
tags = fxpath.split('/')
|
||||
for item in tags:
|
||||
ele = SubElement(ele, item)
|
||||
|
||||
if tag_only:
|
||||
if state == 'present':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue