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

[LIBCLOUD-961] Update GCE public image projects list. #1143

Closed
wants to merge 4 commits into from
Closed

[LIBCLOUD-961] Update GCE public image projects list. #1143

wants to merge 4 commits into from

Conversation

smarlowucf
Copy link
Contributor

@smarlowucf smarlowucf commented Nov 13, 2017

Update GCE public image projects list

Description

Add missing projects to list:

  • cos-cloud
  • suse-byos-cloud
  • suse-sap-cloud
  • windows-sql-cloud

Issue link: https://issues.apache.org/jira/browse/LIBCLOUD-961

Status

  • done, ready for review

Checklist (tick everything that applies)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)

@codecov-io
Copy link

codecov-io commented Nov 13, 2017

Codecov Report

Merging #1143 into trunk will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
libcloud/test/compute/test_gce.py 97.73% <100%> (+0.08%) ⬆️
libcloud/compute/drivers/gce.py 76.64% <100%> (+0.37%) ⬆️
libcloud/test/compute/test_ec2.py 97.77% <0%> (-0.16%) ⬇️
libcloud/compute/drivers/dimensiondata.py 88.38% <0%> (-0.05%) ⬇️
libcloud/compute/drivers/ec2.py 74.25% <0%> (ø) ⬆️
libcloud/compute/drivers/profitbricks.py 69.58% <0%> (ø) ⬆️
libcloud/test/common/test_openstack_identity.py 97.94% <0%> (ø) ⬆️
libcloud/test/loadbalancer/test_gogrid.py 99.02% <0%> (ø) ⬆️
libcloud/compute/types.py 100% <0%> (ø) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34d2f0a...7a267b8. Read the comment docs.

Copy link
Contributor

@pquentin pquentin left a 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.

"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"],
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@@ -1733,15 +1733,19 @@ class GCENodeDriver(NodeDriver):

IMAGE_PROJECTS = {
"centos-cloud": ["centos"],
"cos-cloud": ["container-vm"],
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.
@smarlowucf
Copy link
Contributor Author

@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.

@pquentin
Copy link
Contributor

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.
@smarlowucf
Copy link
Contributor Author

@pquentin I started updating tests but ran into mocking errors:

AttributeError: 'GCEMockHttp' object has no attribute '_global_images_family_coreos_stable'

Skimming docs I don't see anything regarding the mocking solution and how to go about updating/recording new json responses.

@pquentin
Copy link
Contributor

@smarlowucf sorry this is something that we really need to document. See #1157 (comment) for an explanation in the context of another driver

@pquentin
Copy link
Contributor

Does that make sense?

@smarlowucf
Copy link
Contributor Author

Does that make sense?

@pquentin Yep, thanks. I will take a look.

@smarlowucf
Copy link
Contributor Author

@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? gcloud doesn't seem to have a json option.

@GwenaelPellenArkeup
Copy link

@smarlowucf I may have misunderstood the question :

Is there a way to record new json with image info for the new projects? gcloud doesn't seem to have a json option.

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"
  }
]

@smarlowucf
Copy link
Contributor Author

smarlowucf commented Mar 20, 2018

gcloud can export result in json format.

@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.
@smarlowucf
Copy link
Contributor Author

@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.

@asfgit asfgit closed this in f8634a8 Mar 21, 2018
@pquentin
Copy link
Contributor

Thanks! Merged in trunk. ✨ Really nice contribution.

I cleaned the history myself, I hope you don't mind. Can you please close LIBCLOUD-961?

@smarlowucf
Copy link
Contributor Author

I cleaned the history myself, I hope you don't mind.

Yep, no worries. Thanks.

Can you please close LIBCLOUD-961?

Closed.

famanson pushed a commit to esplorio/libcloud that referenced this pull request Apr 13, 2018
* '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
  ...
@smarlowucf smarlowucf deleted the LIBCLOUD-961_image_projects branch August 14, 2018 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants