Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding modules for IGMP interface policy object. (DCNE-128) #577

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading