fluke/devops-service/db/mongo/models/deploy_env/deploy_env_static.rb
2015-03-06 12:20:30 +03:00

32 lines
795 B
Ruby

require "db/mongo/models/deploy_env/deploy_env_base"
module Devops
module Model
class DeployEnvStatic < DeployEnvBase
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}
set_validators ::Validators::DeployEnv::RunList,
::Validators::DeployEnv::Expiration,
::Validators::DeployEnv::Users
def initialize d={}
super(d)
end
def to_hash
super
end
def self.create hash
DeployEnvStatic.new(hash)
end
end
end
end