Class: RhnSatellite::Api
- Inherits:
-
Connection::Base
- Object
- Connection::Base
- RhnSatellite::Api
- Defined in:
- lib/rhn_satellite/api.rb
Class Method Summary collapse
- .api_version(disconnect = true) ⇒ Object
- .reset ⇒ Object
- .satellite_version(disconnect = true) ⇒ Object
- .test_connection(user = nil, pwd = nil) ⇒ Object
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 |
.reset ⇒ Object
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.login && test_base.logout test_base.disconnect result end |