Module: Yast

Included in:
InstallInfConvertor, NetworkRoutinesInclude
Defined in:
src/clients/dns.rb,
src/clients/lan.rb,
src/modules/DNS.rb,
src/modules/Lan.rb,
src/clients/host.rb,
src/modules/Host.rb,
src/clients/remote.rb,
src/clients/network.rb,
src/modules/Routing.rb,
src/clients/inst_lan.rb,
src/clients/lan_auto.rb,
src/modules/LanItems.rb,
src/clients/host_auto.rb,
src/clients/lan_export.rb,
src/lib/network/wicked.rb,
src/modules/NetHwDetection.rb,
src/include/network/complex.rb,
src/include/network/runtime.rb,
src/include/network/widgets.rb,
src/include/network/hardware.rb,
src/include/network/lan/dhcp.rb,
src/include/network/lan/help.rb,
src/include/network/lan/s390.rb,
src/include/network/routines.rb,
src/include/network/lan/cards.rb,
src/include/network/lan/address.rb,
src/include/network/lan/cmdline.rb,
src/include/network/lan/complex.rb,
src/include/network/lan/wizards.rb,
src/include/network/lan/hardware.rb,
src/include/network/services/dns.rb,
src/lib/network/network_autoyast.rb,
src/include/network/services/host.rb,
src/lib/network/lan_items_summary.rb,
src/include/network/services/routing.rb,
src/lib/network/clients/save_network.rb,
src/lib/network/confirm_virt_proposal.rb,
src/lib/network/install_inf_convertor.rb,
src/lib/network/clients/inst_setup_dhcp.rb,
src/lib/network/clients/network_proposal.rb,
src/lib/network/network_autoconfiguration.rb

Overview


Copyright (c) 2012 Novell, Inc. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, contact Novell, Inc.

To contact Novell about this file by physical or electronic mail, you may find current contact information at www.novell.com


File: include/network/services/host.ycp Module: Network configuration Summary: Hosts configuration dialogs Authors: Michal Svec [email protected]

Hosts configuration dialogs

Defined Under Namespace

Modules: NetworkComplexInclude, NetworkHardwareInclude, NetworkLanAddressInclude, NetworkLanCardsInclude, NetworkLanCmdlineInclude, NetworkLanComplexInclude, NetworkLanDhcpInclude, NetworkLanHardwareInclude, NetworkLanHelpInclude, NetworkLanS390Include, NetworkLanWizardsInclude, NetworkRoutinesInclude, NetworkRuntimeInclude, NetworkServicesDnsInclude, NetworkServicesHostInclude, NetworkServicesRoutingInclude, NetworkWidgetsInclude, Wicked Classes: ConfirmVirtProposal, DNSClass, DnsClient, HostAutoClient, HostClass, HostClient, InstLanClient, InstallInfConvertor, LanAutoClient, LanClass, LanClient, LanExportClient, LanItemsClass, LanItemsSummary, NetHwDetectionClass, NetworkAutoYast, NetworkAutoconfiguration, NetworkClient, NetworkProposal, RemoteClient, RoutingClass, SaveNetworkClient, SetupDhcp

Constant Summary collapse

DNS =
DNSClass.new
Lan =
LanClass.new
Host =
HostClass.new
Routing =
RoutingClass.new
LanItems =
LanItemsClass.new
NetHwDetection =
NetHwDetectionClass.new

Instance Method Summary collapse

Instance Method Details

#lan_summaryObject


134
135
136
# File 'src/lib/network/clients/network_proposal.rb', line 134

def lan_summary
  Yast::Lan.Summary("proposal")
end

#load_hosts(load_only: false) ⇒ Object

Initializes internal state according the /etc/hosts


318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'src/modules/Host.rb', line 318

def load_hosts(load_only: false)
  return false if SCR.Read(path(".target.size"), CFA::Hosts::PATH) <= 0

  @hosts = CFA::Hosts.new
  @hosts.load

  # save hosts to check for changes later
  @initial_hosts = nil
  @initial_hosts = @hosts.clone if !load_only

  true

# rescuing only those exceptions which are related to /etc/hosts access
# (e.g. corrupted file, file access error, ...)
rescue IOError, SystemCallError, RuntimeError => error
  log.error("Loading /etc/hosts failed with exception #{error.inspect}")

  # get clean environment, crashing due to exception is no option here
  @hosts = CFA::Hosts.new
  @initial_hosts = nil

  # reraise the exception - let the gui takes care of it
  raise
end

#settingsObject


138
139
140
# File 'src/lib/network/clients/network_proposal.rb', line 138

def settings
  Y2Network::ProposalSettings.instance
end