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
[LIBCLOUD-961] Update GCE public image projects list. #1143
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #1143 +/- ##
=========================================
+ Coverage 86.11% 86.2% +0.08%
=========================================
Files 348 348
Lines 66891 67304 +413
Branches 5939 5958 +19
=========================================
+ Hits 57602 58018 +416
+ Misses 6859 6853 -6
- Partials 2430 2433 +3
Continue to review full report at Codecov.
|
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.
Thank you for your contribution! I have two questions.
libcloud/compute/drivers/gce.py
Outdated
"coreos-cloud": ["coreos"], | ||
"debian-cloud": ["debian", "backports"], | ||
"gce-nvme": ["nvme-backports"], | ||
"google-containers": ["container-vm"], | ||
"opensuse-cloud": ["opensuse"], | ||
"rhel-cloud": ["rhel"], | ||
"suse-cloud": ["sles", "suse"], | ||
"suse-byos-cloud": ["sles", "suse"], |
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.
The list may have been updated since you submitted the pull request, but I don't see suse-byos-cloud in https://cloud.google.com/compute/docs/images#os-compute-support. Do you think it's still needed?
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.
Yes, it is still needed. It's not in the list however in the SUSE details below it's mentioned:
If you need to reuse your existing SLES licenses to create Compute Engine instances, you can use Bring Your Own Subscription (BYOS) images available in the suse-byos-cloud project.
libcloud/compute/drivers/gce.py
Outdated
@@ -1733,15 +1733,19 @@ class GCENodeDriver(NodeDriver): | |||
|
|||
IMAGE_PROJECTS = { | |||
"centos-cloud": ["centos"], | |||
"cos-cloud": ["container-vm"], |
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.
Could we update the image families too? For example, in the list you linked, I see that the families associated with cos-cloud are cos-stable, cos-beta and cos-dev.
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.
Yeah, I can update the image families.
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.
On a side not: would it be possible to generate this list dynamically?
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.
It can be interesting to generate the list dynamically if there's a JSON endpoint somewhere. I'm afraid crawling the HTML page is not worth the effort? I don't know.
Add missing projects and update the image families for each project based on `gcloud compute images list` info.
@pquentin I've updated the list according gcloud tool. Removed the google containers project which is now cos-cloud and google nvme backports which doesn't appear in the project list anymore. |
Thanks! This looks good, but the tests need to be updated: see https://travis-ci.org/apache/libcloud/builds/342458915. Please tell me if you need help here. |
coreos should point to coreos-alpha, coreos-beta, or coreos-stable.
@pquentin I started updating tests but ran into mocking errors:
Skimming docs I don't see anything regarding the mocking solution and how to go about updating/recording new json responses. |
@smarlowucf sorry this is something that we really need to document. See #1157 (comment) for an explanation in the context of another driver |
Does that make sense? |
@pquentin Yep, thanks. I will take a look. |
@pquentin The tests are passing but I'm not sure I did the fixtures correct. Also, this doesn't include any updated image lists for the new projects that were added. Is there a way to record new json with image info for the new projects? |
@smarlowucf I may have misunderstood the question :
gcloud can export result in json format. $ gcloud compute images list --format=json --filter='(family: "coreos")'
[
{
"archiveSizeBytes": "500540800",
"creationTimestamp": "2018-03-02T18:02:37.081-08:00",
"description": "CoreOS, CoreOS alpha, 1702.1.0, amd64-usr published on 2018-03-03",
"diskSizeGb": "9",
"family": "coreos-alpha",
"guestOsFeatures": [
{
"type": "VIRTIO_SCSI_MULTIQUEUE"
}
],
"id": "4918486452405779667",
"kind": "compute#image",
"labelFingerprint": "42WmSpB8rSM=",
"licenses": [
"https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/licenses/coreos-alpha"
],
"name": "coreos-alpha-1702-1-0-v20180303",
"rawDisk": {
"containerType": "TAR",
"source": ""
},
"selfLink": "https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-alpha-1702-1-0-v20180303",
"sourceType": "RAW",
"status": "READY"
},
{
"archiveSizeBytes": "490827904",
"creationTimestamp": "2018-03-09T10:34:21.565-08:00",
"description": "CoreOS, CoreOS beta, 1688.3.0, amd64-usr published on 2018-03-09",
"diskSizeGb": "9",
"family": "coreos-beta",
"guestOsFeatures": [
{
"type": "VIRTIO_SCSI_MULTIQUEUE"
}
],
"id": "6827356011088538947",
"kind": "compute#image",
"labelFingerprint": "42WmSpB8rSM=",
"licenses": [
"https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/licenses/coreos-beta"
],
"name": "coreos-beta-1688-3-0-v20180309",
"rawDisk": {
"containerType": "TAR",
"source": ""
},
"selfLink": "https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-beta-1688-3-0-v20180309",
"sourceType": "RAW",
"status": "READY"
},
{
"archiveSizeBytes": "470601088",
"creationTimestamp": "2018-02-15T09:50:52.929-08:00",
"description": "CoreOS, CoreOS stable, 1632.3.0, amd64-usr published on 2018-02-15",
"diskSizeGb": "9",
"family": "coreos-stable",
"guestOsFeatures": [
{
"type": "VIRTIO_SCSI_MULTIQUEUE"
}
],
"id": "6217468005063358099",
"kind": "compute#image",
"labelFingerprint": "42WmSpB8rSM=",
"licenses": [
"https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/licenses/coreos-stable"
],
"name": "coreos-stable-1632-3-0-v20180215",
"rawDisk": {
"containerType": "TAR",
"source": ""
},
"selfLink": "https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-stable-1632-3-0-v20180215",
"sourceType": "RAW",
"status": "READY"
}
] |
@GwenaelPellenArkeup Ah, thanks. I must have overlooked the format option... Will give it another shot. |
cos-cloud, suse-byos-cloud, suse-sap-cloud, windows-sql-cloud.
@pquentin I've added json image lists for the new projects. If this all looks good I will go ahead and merge/cleanup commit history. |
Thanks! Merged in trunk. ✨ Really nice contribution. I cleaned the history myself, I hope you don't mind. Can you please close LIBCLOUD-961? |
Yep, no worries. Thanks.
Closed. |
* 'trunk' of github.com:apache/libcloud: (1281 commits) Add changes for apache#1196 Added ability to define OS disk size for Azure ARM compute Add changes for apache#1198 Google Cloud DNS documentation test_s3: Fix lint Fix one GCE test fix spelling in OpenStack ex_files description Add changes for apache#1181 [LIBCLOUD-985] Add coverage for newer GCE network and subnet creation options. LIBCLOUD-986: Fix S3 iteration without prefix Add changes for apache#1195 guess s3 multipart upload content type. Add changes for apache#1193 LIBCLOUD-986: Add prefix option to azure blob list and iterate container methods Add changes for apache#1143 [LIBCLOUD-961] Update GCE public image list. Add changes for apache#1190 fix unexpected body type openstack image sharing Add changes for apache#1191 implement attach/detach floating IPs for DO ...
Update GCE public image projects list
Description
Add missing projects to list:
Issue link: https://issues.apache.org/jira/browse/LIBCLOUD-961
Status
Checklist (tick everything that applies)