Project

General

Profile

« Previous | Next » 

Revision a322a96e

Added by Ori Rabin about 8 years ago

Fixes #14190 - consistent api output and search options

View differences:

app/views/api/v2/hosts/main.json.rabl
attributes :ip, :environment_id, :environment_name, :last_report, :mac, :realm_id, :realm_name,
:sp_mac, :sp_ip, :sp_name, :domain_id, :domain_name, :architecture_id, :architecture_name, :operatingsystem_id, :operatingsystem_name,
:subnet_id, :subnet_name, :sp_subnet_id, :ptable_id, :ptable_name, :medium_id, :medium_name, :build,
:comment, :disk, :installed_at, :model_id, :hostgroup_id, :hostgroup_name, :owner_id, :owner_type,
:comment, :disk, :installed_at, :model_id, :hostgroup_id, :owner_id, :owner_type,
:enabled, :puppet_ca_proxy_id, :managed, :use_image, :image_file, :uuid, :compute_resource_id, :compute_resource_name,
:compute_profile_id, :compute_profile_name, :capabilities, :provision_method,
:puppet_proxy_id, :certname, :image_id, :image_name, :created_at, :updated_at,
......
attributes "#{status_class.humanized_name}_status", "#{status_class.humanized_name}_status_label", :if => @object.get_status(status_class).relevant?
end
node :hostgroup_name do |host|
host.hostgroup.name if host.hostgroup.present?
end
node :hostgroup_title do |host|
host.hostgroup.title if host.hostgroup.present?
end
@object.facets_with_definitions.each do |_facet, definition|
node do
partial(definition.api_list_view, :object => @object) if definition.api_list_view

Also available in: Unified diff