mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-10 09:09:50 +00:00
Dry run working in tests
This commit is contained in:
parent
a7a3161d66
commit
209651ef38
4 changed files with 13 additions and 8 deletions
|
@ -4,8 +4,6 @@
|
|||
|
||||
def main():
|
||||
"""Main function for invoking the bootstrap process remotely
|
||||
|
||||
|
||||
"""
|
||||
# Get the commandline arguments
|
||||
opts = get_opts()
|
||||
|
|
|
@ -2,6 +2,11 @@ from bootstrapvz.common.tools import load_data
|
|||
from build_servers import LocalBuildServer
|
||||
from build_servers import RemoteBuildServer
|
||||
|
||||
# Register deserialization handlers for objects
|
||||
# that will pass between server and client
|
||||
from bootstrapvz.base.remote import register_deserialization_handlers
|
||||
register_deserialization_handlers()
|
||||
|
||||
|
||||
# Snatched from here: http://stackoverflow.com/a/7205107
|
||||
def merge_dicts(*args):
|
||||
|
|
|
@ -5,7 +5,7 @@ class BuildServer(object):
|
|||
|
||||
def __init__(self, settings):
|
||||
self.settings = settings
|
||||
self.build_settings = settings.get('build_settings', None)
|
||||
self.build_settings = settings.get('build_settings', {})
|
||||
self.can_bootstrap = settings['can_bootstrap']
|
||||
self.release = settings.get('release', None)
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import tools
|
||||
from manifests import partials
|
||||
from bootstrapvz.base.manifest import Manifest
|
||||
|
||||
|
||||
def test_virtualbox_unpartitioned_extlinux():
|
||||
import yaml
|
||||
specific_settings = yaml.load("""
|
||||
manifest_data = yaml.load("""
|
||||
provider:
|
||||
name: virtualbox
|
||||
system:
|
||||
|
@ -14,11 +15,12 @@ volume:
|
|||
partitions:
|
||||
type: msdos
|
||||
""")
|
||||
manifest = tools.merge_dicts(partials['base'], partials['stable64'],
|
||||
partials['unpartitioned'], specific_settings)
|
||||
manifest_data = tools.merge_dicts(partials['base'], partials['stable64'],
|
||||
partials['unpartitioned'], manifest_data)
|
||||
|
||||
build_server = tools.pick_build_server(manifest)
|
||||
manifest['provider']['guest_additions'] = build_server.build_settings['guest_additions']
|
||||
build_server = tools.pick_build_server(manifest_data)
|
||||
manifest_data['provider']['guest_additions'] = build_server.build_settings['guest_additions']
|
||||
manifest = Manifest(data=manifest_data)
|
||||
|
||||
bootstrap_info = tools.bootstrap(manifest, build_server)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue