bootstrap-vz/bootstrapvz/providers/gce/tasks/configuration.py
Tomasz Rybak b327823261 Add Google Cloud Engine (GCE) provider:
* force kpartx to use synchronous mode, removing sleep(10)
 * get image configuration, use it during tarball creation and registration
 * add (non-working, path problems) image registration
 * add cleaning of image from Google keys and repositories
 * add NTP server address in manifest
 * add preference for backport kernels in manifest
 * disable IPv6
 * correctly set host name
2014-05-03 14:25:54 +02:00

17 lines
705 B
Python

from bootstrapvz.base import Task
from bootstrapvz.common import phases
from bootstrapvz.common.tools import log_check_call
class GatherReleaseInformation(Task):
description = 'Gathering release information about created image'
phase = phases.system_modification
@classmethod
def run(cls, info):
lsb_distribution = log_check_call(['chroot', info.root, 'lsb_release', '-i', '-s'])
lsb_description = log_check_call(['chroot', info.root, 'lsb_release', '-d', '-s'])
lsb_release = log_check_call(['chroot', info.root, 'lsb_release', '-r', '-s'])
info._gce['lsb_distribution'] = lsb_distribution[0]
info._gce['lsb_description'] = lsb_description[0]
info._gce['lsb_release'] = lsb_release[0]