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

Fix error messages for get_uuid() reponse #47

Merged
merged 1 commit into from
Jan 31, 2022
Merged
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
10 changes: 5 additions & 5 deletions plugins/module_utils/prism/vms.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _build_spec_project(self, payload, param):
name = param["name"]
uuid = project.get_uuid(name)
if not uuid:
error = "Failed to get UUID for project name: {}".format(name)
error = "Project {} not found.".format(name)
return None, error

elif "uuid" in param:
Expand All @@ -130,7 +130,7 @@ def _build_spec_cluster(self, payload, param):
name = param["name"]
uuid = cluster.get_uuid(name)
if not uuid:
error = "Failed to get UUID for cluster name: {}".format(name)
error = "Cluster {} not found.".format(name)
return None, error

elif "uuid" in param:
Expand Down Expand Up @@ -165,7 +165,7 @@ def _build_spec_networks(self, payload, networks):
name = network["subnet"]["name"]
uuid = subnet.get_uuid(name)
if not uuid:
error = "Failed to get UUID for subnet name: {}".format(name)
error = "Subnet {} not found.".format(name)
return None, error

elif network.get("subnet", {}).get("uuid"):
Expand Down Expand Up @@ -223,7 +223,7 @@ def _build_spec_disks(self, payload, vdisks):
filter=f"container_name=={name}",
)
if not uuid:
error = "Failed to get UUID for storgae container: {}".format(
error = "Storage container {} not found.".format(
name
)
return None, error
Expand All @@ -239,7 +239,7 @@ def _build_spec_disks(self, payload, vdisks):
name = vdisk["clone_image"]["name"]
uuid = image.get_uuid(name)
if not uuid:
error = "Failed to get UUID for image: {}".format(name)
error = "Image {} not found.".format(name)
return None, error

elif "uuid" in vdisk["clone_image"]:
Expand Down