32 lines
		
	
	
		
			823 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			823 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require "db/mongo/models/deploy_env/deploy_env_base"
 | |
| require "db/validators/deploy_env/run_list"
 | |
| require "db/validators/deploy_env/expiration"
 | |
| require "db/validators/deploy_env/users"
 | |
| 
 | |
| module Devops
 | |
|   module Model
 | |
|     class DeployEnvStatic < DeployEnvBase
 | |
| 
 | |
|       # TODO: all code except self.create could be safely removed
 | |
|       types :identifier => {:type => String, :empty => false},
 | |
|             :provider => {:type => String, :empty => false},
 | |
|             :expires => {:type => String, :empty => false, :nil => true},
 | |
|             :run_list => {:type => Array, :empty => true},
 | |
|             :users => {:type => Array, :empty => true}
 | |
| 
 | |
|       def initialize d={}
 | |
|         super(d)
 | |
|       end
 | |
| 
 | |
|       def to_hash
 | |
|         super
 | |
|       end
 | |
| 
 | |
|       def self.create hash
 | |
|         DeployEnvStatic.new(hash)
 | |
|       end
 | |
| 
 | |
|     end
 | |
|   end
 | |
| end
 | 
