fluke/devops-service/app/api2/routes/bootstrap_templates.rb

30 lines
708 B
Ruby
Raw Normal View History

2014-12-15 14:26:54 +03:00
module Devops
module Version2_0
2014-12-22 14:22:04 +03:00
module Routes
2014-12-15 14:26:54 +03:00
module BootstrapTemplatesRoutes
2014-05-08 15:34:26 +04:00
2014-12-15 14:26:54 +03:00
extend BootstrapTemplatesCommands
2014-07-08 11:48:23 +04:00
2014-12-15 14:26:54 +03:00
def self.registered(app)
2014-05-08 15:34:26 +04:00
2014-12-15 14:26:54 +03:00
# Get list of available bootstrap templates
#
# * *Request*
# - method : GET
# - headers :
# - Accept: application/json
#
# * *Returns* : array of strings
# [
# "omnibus"
# ]
2015-02-19 11:27:56 +03:00
app.get_with_headers "/templates", :headers => [:accept], &Devops::Version2_0::Handler::BootstrapTemplates.get_bootstrap_templates
2014-12-15 14:26:54 +03:00
puts "Bootstrap templates routes initialized"
end
2014-05-08 15:34:26 +04:00
2014-12-15 14:26:54 +03:00
end
end
2014-05-08 15:34:26 +04:00
end
end