ACC SHELL

Path : /var/lib/named/proc/self/root/usr/share/YaST2/clients/
File Upload :
Current File : //var/lib/named/proc/self/root/usr/share/YaST2/clients/lan.ycp

/**
 * File:	clients/lan.ycp
 * Package:	Network configuration
 * Summary:	Network cards main file
 * Authors:	Michal Svec <msvec@suse.cz>
 *
 * $Id: lan.ycp 61796 2010-04-21 12:48:36Z mzugec $
 *
 * Main file for network card configuration.
 * Uses all other files.
 */

{

/***
 * <h3>Network configuration</h3>
 */

textdomain "network";

/* The main () */
y2milestone("----------------------------------------");
y2milestone("Lan module started");

import "CommandLine";
import "Label";
import "Lan";
import "RichText";

include "network/lan/cmdline.ycp";
include "network/lan/wizards.ycp";

/**
 * Command line definition
 */
map cmdline = $[
    /* Commandline help title */
    "help"	: _("Network Card Configuration"),
    "id"	: "lan",
    "guihandler": LanSequence,
    "initialize": Lan::ReadWithCacheNoGUI,
    "finish"	: Lan::Write,
    "actions"	: $[
	"list" : $[
	    /* Commandline command help */
	    "help"	: _("Display configuration summary"),
	    "example"	: "lan list configured",
	    "handler"	: ListHandler,
	],
	"show" : $[
	    /* Commandline command help */
	    "help"	: _("Display configuration summary"),
	    "example"	: "lan show id=0",
	    "handler"	: ShowHandler,
	],
	"add" : $[
	    /* Commandline command help */
	    "help"	: _("Add a network card"),
	    "handler"	: AddHandler,
	    "example"	: [
			"yast lan add name=vlan50 ethdevice=eth0 bootproto=dhcp",
			"yast lan add name=br0 bridge_ports=eth0 eth1 bootproot=dhcp",
			"yast lan add name=bond0 slaves=eth0 eth1 bootproto=dhcp"
			]
	],
	"edit" : $[
	    "help" 	: _("Change existing configuration"),
	    "handler"	: EditHandler
	],
	"delete" : $[
	    /* Commandline command help */
	    "help"	: _("Delete a network card"),
	    "handler"	: DeleteHandler,
	]
    ],
    "options" : $[
	"configured" : $[
	    /* Commandline option help */
	    "help"	: _("List only configured cards")
	],
	"unconfigured" : $[
	    /* Commandline option help */
	    "help"	: _("List only unconfigured cards")
	],
	"device" : $[
	    /* Commandline option help */
	    "help"	: _("Device identifier"),
	    "type"	: "string",
	],
	"id" : $[
	    /* Commandline option help */
	    "help"	: _("Config identifier"),
	    "type"	: "string",
	],
	"bootproto" : $[
	    "help"	: _("Use static or dynamic configuration"),
	    "type"	: "string",
	],
	"name" : $[
	    "help"	: _("Configuration Name"),
	    "type"	: "string",
	],
	"bootproto" : $[
	    /* Commandline option help */
	    "help": _("Device boot protocol"),
	    "type": "string"
	],
	"ip" : $[
	    /* Commandline option help */
	    "help": _("Device IP address"),
	    "type": "ip"
	],
	"netmask" : $[
	    /* Commandline option help */
	    "help": _("Network mask"),
	    "type": "netmask"
	],
	"prefix" : $[
	    /* Commandline option help */
	    "help": _("Prefix length"),
	    "type": "string"
	],
	"slaves" : $[
	    /* Commandline option help */
	    "help": _("Bond Slaves"),
	    "type": "string"
	],
	"ethdevice" : $[
	    /* Commandline option help */
	    "help": _("Ethernet Device for VLAN"),
	    "type": "string"
	],
	"bridge_ports" : $[
	    /* Commandline option help */
	    "help": _("Interfaces for Bridging"),
	    "type": "string"
	],
    ],
    "mappings" : $[
	"list"	: [ "configured", "unconfigured" ],
	"show"	: [ "id" ],
	"add"	: [ "name", "bootproto", "ip", "netmask", "prefix", "slaves", "ethdevice", "bridge_ports" ],
	"edit"	: [ "id", "bootproto", "ip", "netmask", "prefix" ],
	"delete": [ "id" ],
    ]
];

any ret = CommandLine::Run(cmdline);
y2debug("ret=%1", ret);

/* Finish */
y2milestone("Lan module finished");
y2milestone("----------------------------------------");

/* EOF */
}

ACC SHELL 2018