| 
									
										
										
										
											2015-04-16 17:54:40 +03:00
										 |  |  | module Devops | 
					
						
							|  |  |  |   module Version2_0 | 
					
						
							|  |  |  |     module Routes | 
					
						
							|  |  |  |       module StackRoutes | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         def self.registered(app) | 
					
						
							|  |  |  |           app.after %r{\A/stack_template(/[\w]+)?\z} do | 
					
						
							|  |  |  |             statistic | 
					
						
							|  |  |  |           end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           app.get_with_headers '/stacks', :headers => [:accept], &Devops::Version2_0::Handler::Stack.get_stacks | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           app.get_with_headers '/stacks/provider/:provider', :headers => [:accept], &Devops::Version2_0::Handler::Stack.get_stacks_for_provider | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           app.post_with_headers "/stack", :headers => [:accept], &Devops::Version2_0::Handler::Stack.create_stack | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-14 16:51:40 +03:00
										 |  |  |           app.post_with_headers "/stack/:stack_id/sync_details", :headers => [:accept], &Devops::Version2_0::Handler::Stack.sync_details | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-15 18:37:27 +03:00
										 |  |  |           app.get_with_headers "/stack/:stack_id/resources", :headers => [:accept], &Devops::Version2_0::Handler::Stack.resources | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-16 16:01:53 +03:00
										 |  |  |           app.get_with_headers "/stack/:stack_id/resources/:resource_id", :headers => [:accept], &Devops::Version2_0::Handler::Stack.resource | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-16 17:54:40 +03:00
										 |  |  |           hash = {} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           hash['GET'] = Devops::Version2_0::Handler::Stack.get_stack | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           hash['DELETE'] = Devops::Version2_0::Handler::Stack.delete_stack | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           app.multi_routes '/stack/:stack_id', {}, hash | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           puts "Stack routes initialized" | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |