def create_image(self, image_name):
disk_name = self.state.instance_name<EOL>self._destroy_instance()<EOL>body = {<EOL>"<STR_LIT>": {},<EOL>"<STR_LIT:name>": image_name,<EOL>"<STR_LIT>": "<STR_LIT>".format(<EOL>self.project, self.zone, disk_name<EOL>),<EOL>"<STR_LIT:description>": self.description<EOL>}<EOL>self._wait_until_done(<EOL>self._compute.images().insert(<EOL>project=self.project, body=body).execute()<EOL>)<EOL>return image_name<EOL>
Shuts down the instance (necessary for creating a GCE image) and
creates and image from the disk.  Assumes that the disk name
is the same as the instance_name (this is the default behavior
for boot disks on GCE).