YaST2 Developers Documentation: Network configuration



functions
files
intro

Network configuration

include/network/devices.ycp
Device manipulation functions
All config settings are stored in a global variable Devices. Deleted devices are in the global list DeletedDevices. NOTE: do NOT use this include, it's OBSOLETE! It's used only in ISDN.

Imports

  • Map
  • NetworkDevices

Global Functions

global GetFreeDevices (string type, integer num) -> list<string>

Compute free devices

Parameters:
type device type
num how many free devices return
Return value:
num of free devices
Example:
  GetFreeDevices("eth", 2) -> [ 1, 2 ]

global GetFreeDevice (string type) -> string

Return free device

Parameters:
type device type
Return value:
free device
Example:
  GetFreeDevice("eth") -> "1"

global ChangeDevice (string type, string device, map newdev, boolean check) -> boolean

Update Devices map

Parameters:
type device type
device device number
newdev new device map
check if check if device already exists
Return value:
true if success

global DeleteDevice (string type, string dev) -> boolean

Delete a device from Devices map

Parameters:
type device type
dev device number
Return value:
true if success

YaST2 Developers Documentation