mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00

All provider specific settings have been moved to the provider section. The image name itself is now located at the top level and called "name". It is required for all providers.
42 lines
1.5 KiB
Python
42 lines
1.5 KiB
Python
from manifests import merge_manifest_data
|
|
from tools import boot_manifest
|
|
import random
|
|
|
|
s3_bucket_name = '{id:x}'.format(id=random.randrange(16 ** 16))
|
|
partials = {'s3_pvm': '''
|
|
provider:
|
|
name: ec2
|
|
virtualization: pvm
|
|
description: Debian {system.release} {system.architecture}
|
|
bucket: ''' + s3_bucket_name + '''
|
|
system: {bootloader: pvgrub}
|
|
volume: {backing: s3}
|
|
'''
|
|
}
|
|
|
|
|
|
def test_unpartitioned_oldstable():
|
|
std_partials = ['base', 'oldstable64', 'unpartitioned', 'root_password']
|
|
custom_partials = [partials['s3_pvm']]
|
|
manifest_data = merge_manifest_data(std_partials, custom_partials)
|
|
boot_vars = {'instance_type': 'm1.small'}
|
|
with boot_manifest(manifest_data, boot_vars) as instance:
|
|
print(instance.get_console_output().output)
|
|
|
|
|
|
def test_unpartitioned_stable():
|
|
std_partials = ['base', 'stable64', 'unpartitioned', 'root_password']
|
|
custom_partials = [partials['s3_pvm']]
|
|
manifest_data = merge_manifest_data(std_partials, custom_partials)
|
|
boot_vars = {'instance_type': 'm1.small'}
|
|
with boot_manifest(manifest_data, boot_vars) as instance:
|
|
print(instance.get_console_output().output)
|
|
|
|
|
|
def test_unpartitioned_unstable():
|
|
std_partials = ['base', 'unstable64', 'unpartitioned', 'root_password']
|
|
custom_partials = [partials['s3_pvm']]
|
|
manifest_data = merge_manifest_data(std_partials, custom_partials)
|
|
boot_vars = {'instance_type': 'm1.small'}
|
|
with boot_manifest(manifest_data, boot_vars) as instance:
|
|
print(instance.get_console_output().output)
|