YaST2 Developers Documentation: Network configuration



functions
files
intro

Network configuration

include/network/complex.ycp
Summary and overview functions

Imports

  • Detection
  • NetworkDevices
  • Popup
  • Provider
  • String
  • Summary

Includes

  • network/routines.ycp
  • network/summary.ycp

Local Functions

local BuildDescription (string devtype, string devnum, map devmap, list<map> Hardware) -> string

Used for initializing the description variable (ifcfg[NAME]) The code is mostly moved from BuildSummaryDevs Take the NAME field from ifcfg If empty, identify the hardware and use its data

Parameters:
devtype
devnum
devmap
Hardware

local BuildSummaryDevs (map<string,map> Devs, list<map> Hardware, boolean split) -> list<any>

Build textual summary

Parameters:
Devs
Hardware
split split configured and unconfigured?
Return value:
[ configured, unconfigured ] if split, [ summary ] otherwise

local BuildSummary (string devregex, list<map> Hardware, boolean split) -> list<any>

Build textual summary

Parameters:
devregex
Hardware
split split configured and unconfigured?
Return value:
[ configured, unconfigured ] if split, [ summary ] otherwise

local CheckEmptyName (string devtype, string hwname) -> string

Fill in sensible string if the name is empty

Parameters:
devtype device type
hwname device name
Return value:
hwname if not empty, "Unknown device" otherwise

local HardwareName (list<map> Hardware, string id) -> string

Return a human readable hardware name for device with given id

Parameters:
Hardware hardware map
id id-..., bus-...-..., or unique
Return value:
hardware name

local ProviderName (string provider) -> string

Get aprovider name from the provider map

Parameters:
provider identifier
Return value:
provider name
Example:
  ProviderName("tonline") -> "T-Online"

local DeviceStatus (string devtype, string devnum, map devmap) -> string

Return the textual device status

Parameters:
devtype device type
devnum device number
devmap map with devices settings
Return value:
text wth device status

local DeviceProtocol (map devmap) -> string

Return the device protocol or IP address in case of static config

Parameters:
devmap device map
Return value:
textual device protocol

local BuildOverviewDevs (map<string,map> Devs, list<map> Hardware) -> list

Create overview table contents

Parameters:
Devs
Hardware
Return value:
table items

local BuildOverview (string devregex, list<map> Hardware) -> list

Create overview table contents

Parameters:
devregex
Hardware
Return value:
table items

YaST2 Developers Documentation