Class: RhnSatellite::Api

Inherits:
Connection::Base show all
Defined in:
lib/rhn_satellite/api.rb

Class Method Summary collapse

Class Method Details

.api_version(disconnect = true) ⇒ Object



4
5
6
# File 'lib/rhn_satellite/api.rb', line 4

def api_version(disconnect=true)
  @api_version ||= get_version('getVersion',disconnect)
end

.resetObject



21
22
23
24
# File 'lib/rhn_satellite/api.rb', line 21

def reset
  @api_version = @satellite_version = nil
  super
end

.satellite_version(disconnect = true) ⇒ Object



8
9
10
# File 'lib/rhn_satellite/api.rb', line 8

def satellite_version(disconnect=true)
  @satellite_version ||= get_version('systemVersion',disconnect)
end

.test_connection(user = nil, pwd = nil) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/rhn_satellite/api.rb', line 12

def test_connection(user=nil,pwd=nil)
  reset
  test_base = RhnSatellite::Connection::Handler.instance_for(self.name, hostname, user||username, pwd||password, https)
  test_base.connect
  result = test_base. && test_base.logout
  test_base.disconnect
  result
end