Revision 10ac97b0
Added by Joseph Magen about 10 years ago
app/controllers/api/v2/hosts_controller.rb | ||
---|---|---|
|
||
before_filter :find_resource, :except => %w{index create facts}
|
||
before_filter :permissions_check, :only => %w{power boot puppetrun}
|
||
|
||
add_puppetmaster_filters :facts
|
||
|
||
api :GET, "/hosts/", "List all hosts."
|
||
... | ... | |
param :managed, :bool
|
||
param :progress_report_id, String, :desc => 'UUID to track orchestration tasks status, GET /api/orchestration/:UUID/tasks'
|
||
param :capabilities, String
|
||
param :compute_profile_id, :number
|
||
param :compute_attributes, Hash do
|
||
end
|
||
end
|
||
... | ... | |
permission = "#{params[:action]}_hosts".to_sym
|
||
deny_access unless Host.authorized(permission).find(@host.id)
|
||
end
|
||
|
||
end
|
||
end
|
||
end
|
||
|
Also available in: Unified diff
fixes #4250 - API v2 - add compute profiles