Class: Registration::SuseRegister

Inherits:
Object
  • Object
show all
Defined in:
src/lib/registration/suse_register.rb

Overview

class to read and query old suse register configuration file

Constant Summary collapse

PATH =
"/etc/suseRegister.conf".freeze
NCC_HOST =
"secure-www.novell.com".freeze

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ SuseRegister


9
10
11
# File 'src/lib/registration/suse_register.rb', line 9

def initialize(root)
  @found = read_conf(root)
end

Instance Method Details

#found?Boolean

found suse register with valid content?


14
15
16
# File 'src/lib/registration/suse_register.rb', line 14

def found?
  @found
end

#ncc?Boolean

does it found ncc url in registration?


19
20
21
# File 'src/lib/registration/suse_register.rb', line 19

def ncc?
  found? && url.host == NCC_HOST
end

#stripped_urlObject

url with removed old registration suffix


24
25
26
27
28
# File 'src/lib/registration/suse_register.rb', line 24

def stripped_url
  res = url.dup
  res.path = ""
  res
end