Class: ForemanDiscovery::NodeAPI::PowerService

Inherits:
NodeResource
  • Object
show all
Defined in:
app/services/foreman_discovery/node_api/power_service.rb

Instance Method Summary collapse

Methods inherited from NodeResource

#initialize, #is_proxy?, #port, #root_path, #scheme

Constructor Details

This class inherits a constructor from ForemanDiscovery::NodeAPI::NodeResource

Instance Method Details

#kexec(json) ⇒ Object



11
12
13
# File 'app/services/foreman_discovery/node_api/power_service.rb', line 11

def kexec(json)
  put(json, "/kexec")
end

#rebootObject



7
8
9
# File 'app/services/foreman_discovery/node_api/power_service.rb', line 7

def reboot
  put({}, "/reboot")
end

#urlObject



3
4
5
# File 'app/services/foreman_discovery/node_api/power_service.rb', line 3

def url
  @args[:url] + "/power"
end