Sha256: 5cf38d471d1d97bf49eec3422df5e9575ba0c51b0a8a13aec761b6b0590ec30f
Contents?: true
Size: 1.88 KB
Versions: 3
Compression:
Stored size: 1.88 KB
Contents
module CORL module Facade #----------------------------------------------------------------------------- # Local identification def public_ip if Config.fact(:vagrant_exists) Config.fact(:ipaddress_eth1) else CORL.ip_address end end #----------------------------------------------------------------------------- # Vagrant related def vagrant? Vagrant.command ? true : false end #--- @@vagrant_config_loaded = false def vagrant_config_loaded? @@vagrant_config_loaded end def vagrant_config(directory, config, &code) Vagrant::Config.register(directory, config, &code) @@vagrant_config_loaded = true end #----------------------------------------------------------------------------- # Core plugin type facade def configuration(options, provider = nil) plugin(:configuration, provider, options) end def configurations(data, build_hash = false, keep_array = false) plugins(:configuration, data, build_hash, keep_array) end #----------------------------------------------------------------------------- # Cluster plugin type facade def network(name, options = {}, provider = nil) plugin(:network, provider, Config.ensure(options).import({ :name => name })) end def networks(data, build_hash = false, keep_array = false) plugins(:network, data, build_hash, keep_array) end #--- def node(name, options = {}, provider = nil) plugin(:node, provider, Config.ensure(options).import({ :name => name })) end def nodes(data, build_hash = false, keep_array = false) plugins(:node, data, build_hash, keep_array) end #--- def provisioner(options, provider = nil) plugin(:provisioner, provider, options) end def provisioners(data, build_hash = false, keep_array = false) plugins(:provisioner, data, build_hash, keep_array) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
corl-0.4.29 | lib/core/facade.rb |
corl-0.4.28 | lib/core/facade.rb |
corl-0.4.27 | lib/core/facade.rb |