-
Notifications
You must be signed in to change notification settings - Fork 18
Add extract_name_mapping logic to fix get_all method #294
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
Conversation
| if self.custom_key_mapping: | ||
| init_data = {self.custom_key_mapping.get(k, k): v for k, v in init_data.items()} | ||
|
|
||
| # Extract name from arn. Currently implemented for HubContent and ImageVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this only work for these 2 cases or applies to all arns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could potentially work for other arns, but it depends on the structure of arn and what we want to extract. HubContentArn and ImageVersionArn shares the same structure where there is "hub-content/" and "image-version/" string before the hub name and image name we want to extract.
*Issue #289 *
Description of changes:
I added the extract_name_mapping variable and logic that extracts HubName from HubContentArn and ImageName from ImageVersionArn. This variable is similar to custom_key_mapping, but is a parallel condition.
Tests done:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.