Skip to content

Commit

Permalink
Fix sanity:Gihub#101
Browse files Browse the repository at this point in the history
  • Loading branch information
alaa-bish committed Feb 17, 2022
1 parent b34f7bb commit 679c561
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugins/module_utils/prism/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def __init__(self, module):
resource_type = "/groups"
super(Groups, self).__init__(module, resource_type=resource_type)

def get_uuid(self, entity_type, filter):
data = {"entity_type": entity_type, "filter_criteria": filter}
def get_uuid(self, value, key):
data = {"entity_type": value, "filter_criteria": key}
resp, status = self.list(data, use_base_url=True)
if resp.get("group_results"):
return resp["group_results"][0]["entity_results"][0]["entity_id"]
Expand Down
4 changes: 1 addition & 3 deletions plugins/module_utils/prism/virtual_switches.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ def get_dvs_uuid(config, module):
if "name" in config:
groups = Groups(module)
name = config["name"]
uuid = groups.get_uuid(
entity_type="distributed_virtual_switch", filter="name=={0}".format(name)
)
uuid = groups.get_uuid("distributed_virtual_switch", "name=={0}".format(name))
if not uuid:
error = "Virtual Switch {0} not found.".format(name)
return None, error
Expand Down

0 comments on commit 679c561

Please sign in to comment.