Sha256: 9f6a5df6399075bef66e600760bfb28098a13d449d31b7daa4e88c91f86dcdc8
Contents?: true
Size: 1.65 KB
Versions: 10
Compression:
Stored size: 1.65 KB
Contents
if Vagrant::VERSION < "1.2.0" raise "The Vagrant CORL plugin is only compatible with Vagrant 1.2+" end module VagrantPlugins module CORL class Plugin < ::Vagrant.plugin('2') name '[C]oral [O]rchestration and [R]esearch [L]ibrary' description 'The `corl` plugin provides an easy way to develop and test CORL networks locally from within Vagrant.' @@directory = File.dirname(__FILE__) @@action_dir = File.join(@@directory, 'actions') @@command_dir = File.join(@@directory, 'commands') @@provisioner_dir = File.join(@@directory, 'provisioner') #--- nucleon_require(@@directory, :action) nucleon_require(@@command_dir, :launcher) # Commands (only one, which launches Nucleon actions) command(:corl) do Command::Launcher # Meta command for action launcher end # Provisioner (we handle provisioning internally) config(:corl, :provisioner) do nucleon_require(@@provisioner_dir, :config) Config::CORL end provisioner(:corl) do nucleon_require(@@provisioner_dir, :provisioner) Provisioner::CORL end # Action hooks action_hook 'init-keys', :machine_action_up do |hook| nucleon_require(@@action_dir, :init_keys) hook.after Vagrant::Action::Builtin::WaitForCommunicator, Action::InitKeys end action_hook 'create-shares', :machine_action_up do |hook| nucleon_require(@@action_dir, :create_shares) hook.after Action::InitKeys, Action::CreateShares end action_hook 'delete-cache', :machine_action_destroy do |hook| nucleon_require(@@action_dir, :delete_cache) hook.after Vagrant::Action::Builtin::ProvisionerCleanup, Action::DeleteCache end end end end
Version data entries
10 entries across 10 versions & 1 rubygems