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

Updating compute engine sample to use image families. Fixes #276 #341

Merged
merged 2 commits into from
May 11, 2016
Merged
Changes from all commits
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
8 changes: 6 additions & 2 deletions compute/api/create_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ def list_instances(compute, project, zone):

# [START create_instance]
def create_instance(compute, project, zone, name, bucket):
source_disk_image = \
"projects/debian-cloud/global/images/debian-7-wheezy-v20150320"
# Get the latest Debian Jessie image.
image_response = compute.images().getFromFamily(
project='debian-cloud', family='debian-8').execute()
source_disk_image = image_response['selfLink']

# Configure the machine
machine_type = "zones/%s/machineTypes/n1-standard-1" % zone
startup_script = open(
os.path.join(
Expand Down