Skip to content

Commit

Permalink
Adding modules for IGMP interface and tenant route map policy object.
Browse files Browse the repository at this point in the history
  • Loading branch information
anvitha-jain committed Jan 18, 2025
1 parent 3bd6952 commit eeb7c0f
Show file tree
Hide file tree
Showing 4 changed files with 1,018 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 @@ -252,3 +252,14 @@ def get_l3out_node_group(self, name, l3out_object, fail_module=False):
if name: # Query a specific object
return self.get_object_by_key_value_pairs("L3Out Node Group Policy", existing_l3out_node_groups, [KVPair("name", name)], fail_module)
return existing_l3out_node_groups # Query all objects

def get_route_map_policy_for_multicast_uuid(self, route_map_policy_for_multicast_name):
"""
Get the UUID of an Route Map Policy for Multicast by name.
:param route_map_policy_for_multicast_name: Name of the Route Map Policy for Multicast to search for -> Str
:return: UUID of the Route Map Policy for Multicast. -> Str
"""
existing_route_map_policies = self.template.get("tenantPolicyTemplate", {}).get("template", {}).get("mcastRouteMapPolicies", [])
kv_list = [KVPair("name", route_map_policy_for_multicast_name)]
match = self.get_object_by_key_value_pairs("Route Map Policy for Multicast", existing_route_map_policies, kv_list, fail_module=True)
return match.details.get("uuid")
Loading

0 comments on commit eeb7c0f

Please sign in to comment.