mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
21 lines
712 B
Python
21 lines
712 B
Python
from base import Task
|
|
|
|
|
|
class CreateVolume(Task):
|
|
description = 'Creating an EBS volume for bootstrapping'
|
|
|
|
def run(self, info):
|
|
# info.conn.create_volume(50, "us-west-2")
|
|
# volume_id=`euca-create-volume --size $volume_size --zone "$availability_zone" | awk '{print $2}'`
|
|
# [ -z "$volume_id" ] && die "Unable to create volume."
|
|
# log "The EBS volume id is $volume_id"
|
|
|
|
# for package in info.host_packages:
|
|
# try:
|
|
# with open(devnull, 'w') as dev_null:
|
|
# subprocess.check_call(['/usr/bin/dpkg', '-s', package], stdout=dev_null, stderr=dev_null)
|
|
# except subprocess.CalledProcessError:
|
|
# msg = "The package ``{0}\'\' is not installed".format(package)
|
|
# raise RuntimeError(msg)
|
|
pass
|
|
|