Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

docs(samples): Adding samples for image related operations #277

Merged
merged 5 commits into from
May 2, 2022

Conversation

m-strzelczyk
Copy link
Contributor

@m-strzelczyk m-strzelczyk requested review from a team as code owners April 29, 2022 14:07
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Apr 29, 2022
@snippet-bot
Copy link

snippet-bot bot commented Apr 29, 2022

Here is the summary of changes.

You are about to add 3 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added api: compute Issues related to the googleapis/python-compute API. samples Issues that are directly related to samples. labels Apr 29, 2022
@m-strzelczyk m-strzelczyk added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 29, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 29, 2022
Copy link
Contributor

@parthea parthea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added minor observations

src_img = get_image_from_family('debian-cloud', 'debian-11')
new_image = create_image_from_image(PROJECT, src_img.name, autodelete_image_name, 'debian-cloud',
storage_location='eu')
yield new_image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The delete appears to be missing. Should there be a corresponding delete for the image created using create_image_from_image?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixture uses autodelete_image_name fixture to get a name for the temporary image. The autodelete_image_name fixture does the deleting.

samples/snippets/images/set_deprecation_status.py Outdated Show resolved Hide resolved
m-strzelczyk and others added 2 commits May 2, 2022 14:55
@m-strzelczyk m-strzelczyk added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2022
@m-strzelczyk m-strzelczyk added the automerge Merge the pull request once unit tests and other checks pass. label May 2, 2022
@gcf-merge-on-green gcf-merge-on-green bot merged commit 35c548e into main May 2, 2022
@gcf-merge-on-green gcf-merge-on-green bot deleted the samples-images branch May 2, 2022 15:12
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label May 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: compute Issues related to the googleapis/python-compute API. samples Issues that are directly related to samples. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants