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

Skip image_folder if no access #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 6 additions & 4 deletions modules/ycc_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
description:
- Folders to search images by its family besides from
- standard and target folders
- Skips folders that users do not have access to
type: list
required: false
image_id:
Expand Down Expand Up @@ -635,10 +636,11 @@ def _get_image_by_family(self):
).id
break
except _InactiveRpcError as err:
if (
err._state.code # pylint: disable=protected-access
is not StatusCode.NOT_FOUND
):
err_code = err.code()
# if PERMISSION_DENIED returned try other folders
if err_code == StatusCode.PERMISSION_DENIED:
self.warn(err.details())
elif err_code != StatusCode.NOT_FOUND:
raise err
else:
raise ImageFamilyNotFound
Expand Down