Support deletion and deprecation of GCE's images. #260
Conversation
libcloud/compute/drivers/gce.py
Outdated
class GCENodeImage(NodeImage): | ||
"""A GCE Node Image class.""" | ||
def __init__(self, id, name, driver, extra=None): | ||
self.extra = extra |
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.
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: |
Kami
Mar 12, 2014
Member
Should throw ValueError
instead of returning False
Should throw ValueError
instead of returning False
fcuny
Mar 12, 2014
Author
Contributor
Changed.
Changed.
libcloud/compute/drivers/gce.py
Outdated
return False | ||
|
||
image_data = { | ||
'state': state, |
Kami
Mar 12, 2014
Member
IIRC, this will cause lint to fail (extra whitespace)
IIRC, this will cause lint to fail (extra whitespace)
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.
Merged into trunk. Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Add a new class GCENodeImage to represent GCE's images, and support the
delete
anddeprecated
functions.Added a new extra field to the image object to specify the deprecation
status.