31 lines
739 B
Ruby
31 lines
739 B
Ruby
module Devops
|
|
module API2_0
|
|
module Routes
|
|
module BootstrapTemplatesRoutes
|
|
|
|
def self.registered(app)
|
|
|
|
# Get list of available bootstrap templates
|
|
#
|
|
# * *Request*
|
|
# - method : GET
|
|
# - headers :
|
|
# - Accept: application/json
|
|
#
|
|
# * *Returns* : array of strings
|
|
# [
|
|
# "omnibus"
|
|
# ]
|
|
app.get_with_headers "/templates", :headers => [:accept] do
|
|
check_privileges("templates", "r")
|
|
json Devops::API2_0::Handler::BootstrapTemplates.new(request).get_templates
|
|
end
|
|
|
|
puts "Bootstrap templates routes initialized"
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|