| 
									
										
										
										
											2014-05-08 15:34:26 +04:00
										 |  |  | require "fog" | 
					
						
							| 
									
										
										
										
											2015-04-16 17:54:40 +03:00
										 |  |  | Dir["providers/exceptions/*.rb"].each {|file| require file } | 
					
						
							| 
									
										
										
										
											2014-05-08 15:34:26 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 15:11:47 +04:00
										 |  |  | module Provider | 
					
						
							|  |  |  |   class BaseProvider | 
					
						
							| 
									
										
										
										
											2014-05-08 15:34:26 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-20 15:08:42 +03:00
										 |  |  |     attr_accessor :ssh_key, :certificate_path, :connection_options, :run_list | 
					
						
							| 
									
										
										
										
											2014-05-08 15:34:26 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 15:11:47 +04:00
										 |  |  |     protected | 
					
						
							|  |  |  |     def connection_compute options | 
					
						
							|  |  |  |       Fog::Compute.new( options ) | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2014-05-08 15:34:26 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 15:11:47 +04:00
										 |  |  |     def connection_network options | 
					
						
							|  |  |  |       Fog::Network.new( options ) | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2014-05-08 15:34:26 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 15:11:47 +04:00
										 |  |  |     def configured? | 
					
						
							|  |  |  |       !(empty_param?(self.ssh_key) or empty_param?(self.certificate_path)) | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2014-05-08 15:34:26 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 15:11:47 +04:00
										 |  |  |     def empty_param? param | 
					
						
							|  |  |  |       param.nil? or param.empty? | 
					
						
							| 
									
										
										
										
											2014-05-08 15:34:26 +04:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2014-06-18 15:11:47 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-03 18:01:50 +03:00
										 |  |  |     def set_tags instance_id, tags | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def unset_tags instance_id, tags | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-08 15:34:26 +04:00
										 |  |  |   end | 
					
						
							|  |  |  | end |