Class: Y2Network::Sysconfig::ConnectionConfigReader

Inherits:
Object
  • Object
show all
Includes:
Yast::Logger
Defined in:
src/lib/y2network/sysconfig/connection_config_reader.rb

Overview

Reads a connection configuration for a given interface

Instance Method Summary collapse

Instance Method Details

#read(name, type) ⇒ Y2Network::ConnectionConfig::Base

Constructor


35
36
37
38
39
40
41
# File 'src/lib/y2network/sysconfig/connection_config_reader.rb', line 35

def read(name, type)
  file = Y2Network::Sysconfig::InterfaceFile.new(name)
  file.load
  handler_class = find_handler_class(type || file.type)
  return nil if handler_class.nil?
  handler_class.new(file).connection_config
end