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

Support deletion and deprecation of GCE's images. #260

Closed
wants to merge 1 commit into from
Closed

Support deletion and deprecation of GCE's images. #260

wants to merge 1 commit into from

Conversation

@fcuny
Copy link
Contributor

@fcuny fcuny commented Mar 12, 2014

Add a new class GCENodeImage to represent GCE's images, and support the
delete and deprecated functions.

Added a new extra field to the image object to specify the deprecation
status.

class GCENodeImage(NodeImage):
"""A GCE Node Image class."""
def __init__(self, id, name, driver, extra=None):
self.extra = extra

This comment has been minimized.

@Kami

Kami Mar 12, 2014
Member

You already pass extra to the parent constructor which means you shouldn't need to set the attribute in the line above.


possible_states = ['DELETED', 'DEPRECATED', 'OBSOLETE']

if state not in possible_states:

This comment has been minimized.

@Kami

Kami Mar 12, 2014
Member

Should throw ValueError instead of returning False

This comment has been minimized.

@fcuny

fcuny Mar 12, 2014
Author Contributor

Changed.

return False

image_data = {
'state': state,

This comment has been minimized.

@Kami

Kami Mar 12, 2014
Member

IIRC, this will cause lint to fail (extra whitespace)

@fcuny
Copy link
Contributor Author

@fcuny fcuny commented Mar 12, 2014

I'll push an update for the build failure.

Add a new class GCENodeImage to represent GCE's images, and support the
`delete` and `deprecated` functions.

Added a new extra field to the image object to specify the deprecation
status.
@Kami
Copy link
Member

@Kami Kami commented Mar 14, 2014

Merged into trunk.

Thanks.

@asfgit asfgit closed this in fb4099e Mar 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants