Skip to content

Commit

Permalink
[ignore] Changed logics, Documentation and Example sections in ndo_po…
Browse files Browse the repository at this point in the history
…rt_channel_interface.py module to be consistent with future modules.
  • Loading branch information
gmicol committed Nov 22, 2024
1 parent 23b361d commit db77679
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 134 deletions.
20 changes: 11 additions & 9 deletions plugins/module_utils/mso.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,17 @@ def write_file(module, url, dest, content, resp, tmpsrc=None):


def format_interface_descriptions(interface_descriptions, node=None):
formated_interface_descriptions = [
{
"nodeID": node if node is not None else interface_description.get("node"),
"interfaceID": interface_description.get("interface_id", interface_description.get("interfaceID")),
"description": interface_description.get("description"),
}
for interface_description in interface_descriptions
]

if interface_descriptions:
formated_interface_descriptions = [
{
"nodeID": node if node is not None else interface_description.get("node"),
"interfaceID": interface_description.get("interface_id", interface_description.get("interfaceID")),
"description": interface_description.get("description"),
}
for interface_description in interface_descriptions
]
else:
formated_interface_descriptions = []
return formated_interface_descriptions


Expand Down
Loading

0 comments on commit db77679

Please sign in to comment.