YaST2 Developers Documentation: Network configuration

Network configuration

modules/Lan.ycp
Network card data
  • Michal Svec

This module has an unstable interface.

Representation of the configuration of network cards. Input and output routines.

Imports

  • Arch
  • DNS
  • FileUtils
  • Host
  • Hostname
  • IP
  • Label
  • LanItems
  • LanUdevAuto
  • Linuxrc
  • Map
  • Mode
  • ModuleLoading
  • NetHwDetection
  • NetworkConfig
  • NetworkInterfaces
  • NetworkService
  • NetworkStorage
  • Package
  • PackageSystem
  • ProductFeatures
  • Progress
  • Routing
  • Service
  • Stage
  • String
  • SuSEFirewall4Network
  • Summary

Includes

  • network/complex.ycp
  • network/runtime.ycp

Global Functions

Local Variables

Local Functions

Info:

Current module information

Info:

autoinstallation: if true, write_only is disabled and the network settings are applied at once, like during the normal installation. #128810, #168806 boolean start_immediately = false;

Info:

Hotplug type ("" if not hot pluggable)

Info:

Modules information

See
ReadModules
Info:

Deleted modules

local initialized -> boolean

Lan::Read (`cache) will do nothing if initialized already.

global Read (symbol cache) -> boolean

Read all network settings from the SCR

Parameters:
cache : `cache=use cached data, `nocache=reread from disk (for reproposal); TODO pass to submodules
Return value:
true on success
global ReadWithCache () -> boolean

(a specialization used when a parameterless function is needed)

Return value:
Read(`cache)
global Write () -> boolean

Update the SCR according to network settings

Return value:
true on success
global WriteOnly () -> boolean

Only write configuration without starting any init scripts and SuSEconfig

Return value:
true on success
global Import (map settings) -> boolean

Import data

Parameters:
settings settings to be imported
Return value:
true on success
global Export () -> map

Export data

Return value:
dumped settings (later acceptable by Import())
global Summary (string mode) -> list

Create a textual summary and a list of unconfigured devices

Parameters:
mode "split": split configured and unconfigured?
"summary": add resolver and routing symmary, "proposal": for proposal, add links for direct config
Return value:
summary of the current configuration
global SummaryGeneral () -> list

Create a textual summary for the general network settings proposal (NetworkManager + ipv6)

Return value:
[rich text, links]
global Add () -> boolean

Add a new device

Return value:
true if success
global Edit (string name) -> boolean

Edit the given device

Parameters:
name device to edit
Return value:
true if success
global Delete () -> boolean

Delete the given device

Return value:
true if success
local UseNetworkManager () -> boolean

Uses product info and is subject to installed packages.

Return value:
Should NM be enabled?
local ProposeNMInterfaces () -> void

Create minimal ifcfgs for the case when NetworkManager is used: NM does not need them but yast2-firewall and SuSEfirewall2 do Avoid existing ifcfg from network installation

global ProposeInterfaces () -> boolean

Propose interface configuration

Return value:
true if something was proposed
local ProposeHostname () -> boolean

Propose the hostname See also DNS::Read

Return value:
true if something was proposed
global ProposeRoutesAndResolver () -> boolean

Propose configuration for routing and resolver

Return value:
true if something was proposed
global Propose () -> boolean

Propose a configuration

Return value:
true if something was proposed
global Autoinstall () -> boolean

Create a configuration for autoyast

Return value:
true if something was proposed
global AnyDHCPDevice () -> boolean

Check if any device is configured with DHCP.

Return value:
true if any DHCP device is configured
global Packages () -> list<string>

Return value:
of packages needed when writing the config
global AutoPackages () -> map

Return value:
of packages needed when writing the config in autoinst mode
global HaveXenBridge () -> boolean

Xen bridging confuses us (#178848)

Return value:
whether xenbr* exists