Skip to content

Commit

Permalink
Updating compute engine sample to use image families. Fixes #276 (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Wayne Parrott committed May 11, 2016
1 parent a3d36ed commit 730343e
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit 730343e

Please sign in to comment.