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
base: trunk
from

Conversation

Projects
None yet
2 participants
@fcuny
Contributor

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.

@Kami

View changes

Show outdated Hide outdated libcloud/compute/drivers/gce.py
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.

@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

@Kami

Kami Mar 12, 2014

Member

Should throw ValueError instead of returning False

This comment has been minimized.

@fcuny

fcuny Mar 12, 2014

Contributor

Changed.

@fcuny

fcuny Mar 12, 2014

Contributor

Changed.

@Kami

View changes

Show outdated Hide outdated libcloud/compute/drivers/gce.py
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)

@Kami

Kami Mar 12, 2014

Member

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

@fcuny

This comment has been minimized.

Show comment
Hide comment
@fcuny

fcuny Mar 12, 2014

Contributor

I'll push an update for the build failure.

Contributor

fcuny commented Mar 12, 2014

I'll push an update for the build failure.

Support deletion and deprecation of GCE's images.
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

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Mar 14, 2014

Member

Merged into trunk.

Thanks.

Member

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