YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Imports

  • CWM
  • CWMTab
  • DNS
  • GetInstArgs
  • Host
  • Hostname
  • IP
  • Label
  • Lan
  • Map
  • NetworkConfig
  • Popup

Includes

  • network/lan/help.ycp
  • network/routines.ycp
  • network/widgets.ycp

Local Variables

Local Functions

Info:

File: include/network/services/dns.ycp Package: Network configuration Summary: Hostname and DNS setup dialog Authors: Michal Svec Martin Vidner

local has_dhcp -> boolean

If we know that there are no interfaces with DHCP, we can disable the check boxes. Each dialog must set this variable. HostnameDialog does not know yet whether we will have DHCP so it assumes yes. DNSMainDialog can query Lan::.

local resolver_modifiable -> boolean

If there's a process modifying resolv.conf, we warn the user before letting him change things that will be overwritten anyway. See also #61000.

local settings_orig -> map

original setup, used to determine whether data have been modified

local hn_settings -> map

CWM buffer for both dialogs. Note that NAMESERVERS and SEARCHLIST are lists and their widgets are suffixed.

local NonEmpty (list<string> l) -> list<string>

Parameters:
l list of strings
Return value:
only non-empty items
local InitSettings () -> map

Return value:
initial settings for this dialog in one map, from DNS::
local StoreSettings (map settings) -> void

Parameters:
settings map of settings to be stored to DNS::
local StoreHnSettings () -> void

Stores actual hostname settings.

local InitHnSettings () -> void

Initialize internal state according current system configuration.

local SetHnItem (string key, any value) -> void

Function for updating actual hostname settings.

Parameters:
key for known keys see hn_settings
value value for particular hn_settings key
local SetHostname (any value) -> void

Function for updating actual hostname.

Parameters:
value
local SetNameserver1 (any value) -> void

Function for updating ip address of first nameserver.

Parameters:
value
local SetNameserver2 (any value) -> void

Function for updating ip address of second nameserver.

Parameters:
value
local SetNameserver3 (any value) -> void

Function for updating ip address of third nameserver.

Parameters:
value
local InitHnWidget (string key) -> void

Default function to init the value of a widget. Used for push buttons.

Parameters:
key id of the widget
local StoreHnWidget (string key, map event) -> void

Default function to store the value of a widget.

Parameters:
key id of the widget
event the event being handled
local InitDhcpHostname (string key) -> void

Init handler for DHCP_HOSTNAME. enable or disable: is DHCP available?

Parameters:
key the widget receiving the event
Return value:
nil so that the dialog loops on
local HandleResolverData (string key, map event) -> symbol

Event handler for resolver data (nameservers, searchlist) enable or disable: is DHCP available?

Parameters:
key the widget receiving the event
event the event being handled
Return value:
nil so that the dialog loops on
local ValidateHostname (string key, map event) -> boolean

Validator for hostname, no_popup

Parameters:
key the widget being validated
event the event being handled
Return value:
whether valid
local ValidateDomain (string key, map event) -> boolean

Validator for domain name, no_popup

Parameters:
key the widget being validated
event the event being handled
Return value:
whether valid
local ValidateSearchList (string key, map event) -> boolean

Validator for the search list

Parameters:
key the widget being validated
event the event being handled
Return value:
whether valid
local initHostnameGlobal (string key) -> void

Used in GUI mode - initializes widgets according hn_settings

Parameters:
key ignored
local storeHostnameGlobal (string key, map event) -> void

Used in GUI mode - updates and stores actuall hostname settings according dialog widgets content. It calls store handler for every widget from hn_settings with event as an option.

Parameters:
key ignored
event user generated event
local DNSMainDialog (boolean standalone) -> any

Standalone dialog only - embedded one is handled separately via CWMTab

Parameters:
standalone