ACC SHELL

Path : /usr/share/YaST2/clients/
File Upload :
Current File : //usr/share/YaST2/clients/xen.ycp

/* ------------------------------------------------------------------------------
 * Copyright (c) 2007 Novell, Inc. All Rights Reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of version 2 of the GNU General Public License as published by the
 * Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, contact Novell, Inc.
 *
 * To contact Novell about this file by physical or electronic mail, you may find
 * current contact information at www.novell.com.
 * ------------------------------------------------------------------------------
 */

/**
 * File:	clients/xen.ycp
 * Package:	Installation/management in a virtual machine
 * Summary:	Main virtual machine installation/management
 * Authors:	Michael G. Fritch <mgfritch@novell.com>
 *
 * $Id: xen.ycp 57028 2009-04-29 10:58:09Z lslezak $
 */

{

    /***
     * <h3>Configuration of novell-xad</h3>
     */

    textdomain "vm";

    /* The main () */
    y2milestone ("----------------------------------------");
    y2milestone ("Xen (yast2-vm) module started");


    import "Arch";
    import "CommandLine";
    import "Mode";
    import "Package";
    import "Popup";
    import "Report";
    import "VM_XEN";


    // check whether VM can be started
    boolean CheckConfiguration() {

        boolean ret = true;

        // check whether VM can be started (cannot start a vm using UML)
        if ( VM_XEN::isUML() ) return false;

        y2milestone("Checking for Xen installation");

        // check the dom0 configuration...
        ret = ret && VM_XEN::ConfigureDom0();
        if (ret == false) return false;

        y2milestone("CheckConfiguration returned: %1", ret);
        return ret;
    }

    /* Main */

    /**
     * Definition of command line mode options
     */
    map cmdline = $[
        "id"         : "vm",
        "help"       : _("Install Hypervisor and Tools"),
        "guihandler" : CheckConfiguration
    ];


    any rc = CommandLine::Run(cmdline);
    y2milestone("YAST2-VM: rc = %1", rc);

    // Always check the dom0 configuration
//    boolean ret = CheckConfiguration();
//    if (ret == false) return `abort;

    /* Finish */
    y2milestone("Xen (yast-vm) module finished");
    y2milestone("----------------------------------------");

    return `next;

/* EOF */
}


ACC SHELL 2018