Skip to content

Commit

Permalink
[minor_changes] Adding new module for physical interface (object: int…
Browse files Browse the repository at this point in the history
…erfaceProfiles)
  • Loading branch information
anvitha-jain committed Oct 30, 2024
1 parent 4fa9818 commit e253d7b
Show file tree
Hide file tree
Showing 4 changed files with 885 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/module_utils/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,14 @@ def get_l3out_node_routing_policy_object(self, uuid=None, name=None, fail_module
"L3Out Node Routing Policy", existing_l3out_node_routing_policy, [KVPair("uuid", uuid) if uuid else KVPair("name", name)], fail_module
)
return existing_l3out_node_routing_policy # Query all objects

def get_interface_policy_group_uuid(self, interface_policy_group):
"""
Get the UUID of an Interface Policy Group by name.
:param interface_policy_group: Name of the Interface Policy Group to search for -> Str
:return: UUID of the Interface Policy Group. -> Str
"""
existing_policies = self.template.get("fabricPolicyTemplate", {}).get("template", {}).get("interfacePolicyGroups", [])
kv_list = [KVPair("name", interface_policy_group)]
match = self.get_object_by_key_value_pairs("Interface Policy Groups", existing_policies, kv_list, fail_module=True)
return match.details.get("uuid")
Loading

0 comments on commit e253d7b

Please sign in to comment.