github.com/mhilton/juju-juju@v0.0.0-20150901100907-a94dd2c73455/provider/gce/gce.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package gce 5 6 import ( 7 "github.com/juju/errors" 8 "github.com/juju/loggo" 9 10 "github.com/juju/juju/environs/tags" 11 ) 12 13 // The metadata keys used when creating new instances. 14 const ( 15 metadataKeyIsState = tags.JujuEnv 16 // This is defined by the cloud-init code: 17 // http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/sources/DataSourceGCE.py 18 // http://cloudinit.readthedocs.org/en/latest/ 19 // https://cloud.google.com/compute/docs/metadata 20 metadataKeyCloudInit = "user-data" 21 metadataKeyEncoding = "user-data-encoding" 22 // GCE uses this specific key for authentication (*handwaving*) 23 // https://cloud.google.com/compute/docs/instances#sshkeys 24 metadataKeySSHKeys = "sshKeys" 25 ) 26 27 // Common metadata values used when creating new instances. 28 const ( 29 metadataValueTrue = "true" 30 metadataValueFalse = "false" 31 ) 32 33 const ( 34 // See https://cloud.google.com/compute/docs/operating-systems/linux-os#ubuntu 35 // TODO(ericsnow) Should this be handled in cloud-images (i.e. 36 // simplestreams)? 37 imageBasePath = "projects/ubuntu-os-cloud/global/images/" 38 ) 39 40 var ( 41 logger = loggo.GetLogger("juju.provider.gce") 42 43 errNotImplemented = errors.NotImplementedf("gce provider functionality") 44 )