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

builder/googlecompute: added support for all standard VM images #1350

Merged
merged 2 commits into from
Jul 25, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions builder/googlecompute/driver_gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (d *driverGCE) WaitForInstance(state, zone, name string) <-chan error {
}

func (d *driverGCE) getImage(name string) (image *compute.Image, err error) {
projects := []string{d.projectId, "debian-cloud", "centos-cloud"}
projects := []string{d.projectId, "centos-cloud", "debian-cloud", "google-containers", "rhel-cloud", "suse-cloud"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there may be a few others that could be added to the list. [https://developers.google.com/compute/docs/operating-systems]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

for _, project := range projects {
image, err = d.service.Images.Get(project, name).Do()
if err == nil && image != nil && image.SelfLink != "" {
Expand All @@ -238,10 +238,7 @@ func (d *driverGCE) getImage(name string) (image *compute.Image, err error) {
image = nil
}

if err == nil {
err = fmt.Errorf("Image could not be found: %s", name)
}

err = fmt.Errorf("Image %s could not be found in any of these projects: %s", name, projects)
return
}

Expand Down