Revision e54016da
Added by Marek Hulán over 8 years ago
app/controllers/api/v1/hosts_controller.rb | ||
---|---|---|
eos
|
||
|
||
def status
|
||
render :json => { :status => @host.host_status }.to_json if @host
|
||
Foreman::Deprecation.api_deprecation_warning('The /status route is deprecated, please use the new /status/configuration instead')
|
||
render :json => { :status => @host.get_status(HostStatus::ConfigurationStatus).to_label }.to_json if @host
|
||
end
|
||
|
||
private
|
Also available in: Unified diff
Fixes #10782 - global host status
Introduce new global host status that is composed of host substatuses.Each substatus defines a mapping to the global one which can result in
three values
Plugins can add their own substatuses. These are automatically
propagated also to API.
Thanks to Tomas Strachota who wrote the original code.