mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-10 17:19:51 +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():
|
def main():
|
||||||
"""Main function for invoking the bootstrap process remotely
|
"""Main function for invoking the bootstrap process remotely
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# Get the commandline arguments
|
# Get the commandline arguments
|
||||||
opts = get_opts()
|
opts = get_opts()
|
||||||
|
|
|
@ -2,6 +2,11 @@ from bootstrapvz.common.tools import load_data
|
||||||
from build_servers import LocalBuildServer
|
from build_servers import LocalBuildServer
|
||||||
from build_servers import RemoteBuildServer
|
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
|
# Snatched from here: http://stackoverflow.com/a/7205107
|
||||||
def merge_dicts(*args):
|
def merge_dicts(*args):
|
||||||
|
|
|
@ -5,7 +5,7 @@ class BuildServer(object):
|
||||||
|
|
||||||
def __init__(self, settings):
|
def __init__(self, settings):
|
||||||
self.settings = 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.can_bootstrap = settings['can_bootstrap']
|
||||||
self.release = settings.get('release', None)
|
self.release = settings.get('release', None)
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import tools
|
import tools
|
||||||
from manifests import partials
|
from manifests import partials
|
||||||
|
from bootstrapvz.base.manifest import Manifest
|
||||||
|
|
||||||
|
|
||||||
def test_virtualbox_unpartitioned_extlinux():
|
def test_virtualbox_unpartitioned_extlinux():
|
||||||
import yaml
|
import yaml
|
||||||
specific_settings = yaml.load("""
|
manifest_data = yaml.load("""
|
||||||
provider:
|
provider:
|
||||||
name: virtualbox
|
name: virtualbox
|
||||||
system:
|
system:
|
||||||
|
@ -14,11 +15,12 @@ volume:
|
||||||
partitions:
|
partitions:
|
||||||
type: msdos
|
type: msdos
|
||||||
""")
|
""")
|
||||||
manifest = tools.merge_dicts(partials['base'], partials['stable64'],
|
manifest_data = tools.merge_dicts(partials['base'], partials['stable64'],
|
||||||
partials['unpartitioned'], specific_settings)
|
partials['unpartitioned'], manifest_data)
|
||||||
|
|
||||||
build_server = tools.pick_build_server(manifest)
|
build_server = tools.pick_build_server(manifest_data)
|
||||||
manifest['provider']['guest_additions'] = build_server.build_settings['guest_additions']
|
manifest_data['provider']['guest_additions'] = build_server.build_settings['guest_additions']
|
||||||
|
manifest = Manifest(data=manifest_data)
|
||||||
|
|
||||||
bootstrap_info = tools.bootstrap(manifest, build_server)
|
bootstrap_info = tools.bootstrap(manifest, build_server)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue