39 lines
1.1 KiB
Ruby
39 lines
1.1 KiB
Ruby
module Devops
|
|
module Version2_0
|
|
module Routes
|
|
module KeyRoutes
|
|
|
|
def self.registered(app)
|
|
# Get list of available stack_template_presets
|
|
#
|
|
# * *Request*
|
|
# - method : GET
|
|
# - headers :
|
|
# - Accept: application/json
|
|
#
|
|
# * *Returns* : array of hashes
|
|
# [ {id: 'preset id', template_preset_body: 'long body'} ]
|
|
#
|
|
app.get_with_headers "/stack_template_presets", :headers => [:accept], &Devops::Version2_0::Handler::StackTemplatePreset.get_presets
|
|
|
|
|
|
# Get information about stack_template_preset
|
|
#
|
|
# * *Request*
|
|
# - method : GET
|
|
# - headers :
|
|
# - Accept: application/json
|
|
#
|
|
# * *Returns* : array of strings
|
|
# [ 'postgres_cluster' ]
|
|
#
|
|
app.get_with_headers "/stack_template_presets/:id", :headers => [:accept], &Devops::Version2_0::Handler::StackTemplatePreset.get_preset
|
|
|
|
puts "Stack template presets routes initialized"
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|