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

25 lines
864 B
Ruby
Raw Normal View History

2016-04-04 13:17:07 +03:00
module Devops
module API2_0
module Routes
module ProviderNotificationRoutes
def self.registered(app)
# * *Request*
# - method : POST
# Checks if given autoscaling group is launched within stack that is handled by CID.
# If so, starts syncing that stack. Otherwise returns 404 error.
#
# * *Returns* :
# report_id
app.post_with_headers '/provider_notifications/aws/:provider_account/autoscaling_groups/:id/changes', :headers => [:accept] do |provider_account, group_id|
check_privileges("stack", "r")
json Devops::API2_0::Handler::ProviderNotification.new(request).autoscaling_groups_change(group_id, provider_account)
end
puts "ProviderNotifications routes initialized"
2016-04-04 13:17:07 +03:00
end
end
end
end
end