示例#1
0
def only_install(image, skips=None, args=None, address=None):
    """Install Cockpit into a test image"""
    verbose = args["verbose"]
    started = False
    if args["address"]:
        machine = testvm.Machine(address=args["address"], verbose=verbose, image=image, label="install")
    else:
        machine = testvm.VirtMachine(verbose=verbose, image=image, label="install")
        machine.start(maintain=True)
        started = True
    completed = False
    try:
        if started:
            machine.wait_boot()
        upload_scripts(machine,args=args)
        machine.execute("rm -rf /var/tmp/build-results");
        machine.upload([ "tmp/build-results" ], "/var/tmp")
        run_install_script(machine, False, True, skips, None, args)
        completed = True
    finally:
        if not completed and args["sit"]:
            sys.stderr.write("ADDRESS: {0}\n".format(machine.address))
            raw_input ("Press RET to continue... ")
        if started:
            machine.stop()
示例#2
0
def only_install(image, skip=None, args=None, address=None):
    """Install Cockpit into a test image"""
    verbose = args["verbose"]
    started = False
    if args["address"]:
        machine = testvm.Machine(address=args["address"],
                                 verbose=verbose,
                                 image=image,
                                 label="install")
    else:
        machine = testvm.VirtMachine(verbose=verbose,
                                     image=image,
                                     label="install")
        machine.start(maintain=True)
        started = True
    try:
        if started:
            machine.wait_boot()
        upload_scripts(machine, args=args)
        machine.execute("rm -rf /var/tmp/build-results")
        machine.upload(["tmp/build-results"], "/var/tmp")
        run_install_script(machine, False, True, skip, None, args)
    finally:
        if started:
            machine.stop()