Skip to content

Commit

Permalink
[ignore] Correct Grammar and Spelling in Documentation for ndo_tenant…
Browse files Browse the repository at this point in the history
…_custom_qos_policy.py and utils.py.
  • Loading branch information
gmicol committed Dec 4, 2024
1 parent 372d39b commit fdbcbf2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
16 changes: 8 additions & 8 deletions plugins/module_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@ def generate_api_endpoint(path, **kwargs):
def format_list_dict(list_dict, keys_map):
"""
Convert an Python list of dictionaries into its equivalent NDO API format.
All keys must be definied in the keys map even if no conversion is needed for some keys.
All keys must be defined in the keys map even if no conversion is needed for some keys.
:param list_dict: The Python list of dictionaries to format. -> List[Dict]
:param keys_map: the mapping from the Ansible argument's keys to NDO API keys. Can also include the map between values -> Dict
:return: The formated dictionary. -> Dict
:return: The formatted dictionary. -> Dict
"""
if list_dict:

def format_dict(d):
formated_dict = {}
formatted_dict = {}
if d:
for key, value in keys_map.items():
# keys_map can have values of type list including the API key string and the map conversion for values\
if isinstance(value, list):
formated_dict[value[0]] = value[1].get(d.get(key))
formatted_dict[value[0]] = value[1].get(d.get(key))
else:
formated_dict[value] = d.get(key)
return formated_dict
formatted_dict[value] = d.get(key)
return formatted_dict

formated_list = [format_dict(d) for d in list_dict]
return formated_list
formatted_list = [format_dict(d) for d in list_dict]
return formatted_list
24 changes: 12 additions & 12 deletions plugins/modules/ndo_tenant_custom_qos_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
dscp_mappings:
description:
- The Differentiated Services Code Point (DSCP) mappings of the Custom QoS Policy.
- O(dscp_mappings.dscp_from) and O(dscp_mappings.dscp_to) cannot both be C(unspecified).
- Both O(dscp_mappings.dscp_from) and O(dscp_mappings.dscp_to) cannot be set to C(unspecified).
type: list
elements: dict
suboptions:
dscp_from:
description:
- The starting encoding point of the DSCP range.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices:
- af11
Expand Down Expand Up @@ -83,7 +83,7 @@
dscp_to:
description:
- The ending encoding point of the DSCP range.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices:
- af11
Expand Down Expand Up @@ -113,7 +113,7 @@
dscp_target:
description:
- The DSCP target encoding point for egressing traffic.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices:
- af11
Expand Down Expand Up @@ -143,41 +143,41 @@
target_cos:
description:
- The target CoS traffic type for the egressing traffic.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices: [ background, best_effort, excellent_effort, critical_applications, video, voice, internetwork_control, network_control, unspecified ]
qos_priority:
description:
- The QoS priority level to which the DSCP values will be mapped.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices: [ level1, level2, level3, level4, level5, level6, unspecified ]
aliases: [ priority, prio ]
cos_mappings:
description:
- The Class of Service (CoS) mappings of the Custom QoS Policy.
- O(cos_mappings.dot1p_from) and O(cos_mappings.dot1p_to) cannot both be C(unspecified).
- Both O(cos_mappings.dot1p_from) and O(cos_mappings.dot1p_to) cannot be set to C(unspecified).
type: list
elements: dict
suboptions:
dot1p_from:
description:
- The starting traffic type of the CoS range.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices: [ background, best_effort, excellent_effort, critical_applications, video, voice, internetwork_control, network_control, unspecified ]
aliases: [ from ]
dot1p_to:
description:
- The encoding traffic type of the CoS range.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices: [ background, best_effort, excellent_effort, critical_applications, video, voice, internetwork_control, network_control, unspecified ]
aliases: [ to ]
dscp_target:
description:
- The DSCP target encoding point for egressing traffic.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices:
- af11
Expand Down Expand Up @@ -207,13 +207,13 @@
target_cos:
description:
- The target CoS traffic type for the egressing traffic.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices: [ background, best_effort, excellent_effort, critical_applications, video, voice, internetwork_control, network_control, unspecified ]
qos_priority:
description:
- The QoS priority level to which the DSCP values will be mapped.
- Defaults to unspecified when unset during creation.
- Defaults to C(unspecified) when unset during creation.
type: str
choices: [ level1, level2, level3, level4, level5, level6, unspecified ]
aliases: [ priority, prio ]
Expand Down

0 comments on commit fdbcbf2

Please sign in to comment.