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
[google compute] improved Images coverage #395
Conversation
if not image: | ||
if (partial_name.startswith('debian') or | ||
partial_name.startswith('backports')): | ||
partial_name.startswith('backports') or | ||
partial_name.startswith('nvme-backports')): |
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.
@erjohnso just checking that this is not a typo. nvme-backports ? not name-backports ?
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.
@Runseb - thanks for checking! Yes, nvme
is correct.
Signed-off-by: Sebastien Goasguen <runseb@gmail.com> This closes #395
Signed-off-by: Sebastien Goasguen <runseb@gmail.com> This closes apache#395
@@ -2218,6 +2246,27 @@ def ex_deprecate_image(self, image, replacement, state=None): | |||
'replacement': replacement.extra['selfLink'], | |||
} | |||
|
|||
if deprecated is not None: |
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.
Sorry for a late comment. Number of duplicated lines of code could be reduced by doing something like that:
for attribute, value in [('deprecated', deprecated), ...]:
is value is None:
continue
try:
timestamp_to_datetime(value)
except:
raise ValueError('deprecated must be an RFC3339 timestamp')
image_data[name] = value
Anyway, that's just a suggestion and not a priority :)
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.
I like it! Adding it to the next PR.
Updates to improve the
GCENodeImage
coverage of the GCE API. Specifically, this update has:diskSizeGb
,sourceType
, etc)preferredKernel
. This has long been removed from the GCE API, but there is a chance very old customer images still retain this value.DELETED
,OBSOLETE
, andDEPRECATED
.No breaking changes introduced and tests have been enhanced for these changes.