| 
									
										
										
										
											2014-12-15 14:26:54 +03:00
										 |  |  | module Devops | 
					
						
							| 
									
										
										
										
											2015-07-17 20:22:29 +03:00
										 |  |  |   module API2_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-07-17 20:22:29 +03:00
										 |  |  |           app.get_with_headers "/templates", :headers => [:accept] do | 
					
						
							|  |  |  |             check_privileges("templates", "r") | 
					
						
							|  |  |  |             json Devops::API2_0::Handler::BootstrapTemplates.new.get_templates | 
					
						
							|  |  |  |           end | 
					
						
							| 
									
										
										
										
											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 |