Module: VagrantPlugins::OpenStack::Action
- Includes:
- Vagrant::Action::Builtin
- Defined in:
- lib/vagrant-openstack-plugin/action.rb,
lib/vagrant-openstack-plugin/action/is_created.rb,
lib/vagrant-openstack-plugin/action/read_state.rb,
lib/vagrant-openstack-plugin/action/sync_folders.rb,
lib/vagrant-openstack-plugin/action/create_server.rb,
lib/vagrant-openstack-plugin/action/delete_server.rb,
lib/vagrant-openstack-plugin/action/read_ssh_info.rb,
lib/vagrant-openstack-plugin/action/warn_networks.rb,
lib/vagrant-openstack-plugin/action/connect_openstack.rb,
lib/vagrant-openstack-plugin/action/message_not_created.rb,
lib/vagrant-openstack-plugin/action/message_already_created.rb
Defined Under Namespace
Classes: ConnectOpenStack, CreateServer, DeleteServer, IsCreated, MessageAlreadyCreated, MessageNotCreated, ReadSSHInfo, ReadState, SyncFolders, WarnNetworks
Class Method Summary collapse
-
.action_destroy ⇒ Object
This action is called to destroy the remote machine.
- .action_provision ⇒ Object
-
.action_read_ssh_info ⇒ Object
This action is called to read the SSH info of the machine.
-
.action_read_state ⇒ Object
This action is called to read the state of the machine.
- .action_ssh ⇒ Object
- .action_ssh_run ⇒ Object
- .action_up ⇒ Object
Class Method Details
.action_destroy ⇒ Object
This action is called to destroy the remote machine.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant-openstack-plugin/action.rb', line 12 def self.action_destroy Vagrant::Action::Builder.new.tap do |b| b.use ConfigValidate b.use Call, IsCreated do |env, b2| if !env[:result] b2.use MessageNotCreated next end b2.use ConnectOpenStack b2.use DeleteServer end end end |
.action_provision ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/vagrant-openstack-plugin/action.rb', line 97 def self.action_provision Vagrant::Action::Builder.new.tap do |b| b.use ConfigValidate b.use Call, IsCreated do |env, b2| if !env[:result] b2.use MessageNotCreated next end b2.use Provision b2.use SyncFolders end end end |
.action_read_ssh_info ⇒ Object
This action is called to read the SSH info of the machine. The resulting state is expected to be put into the ‘:machine_ssh_info` key.
30 31 32 33 34 35 36 |
# File 'lib/vagrant-openstack-plugin/action.rb', line 30 def self.action_read_ssh_info Vagrant::Action::Builder.new.tap do |b| b.use ConfigValidate b.use ConnectOpenStack b.use ReadSSHInfo end end |
.action_read_state ⇒ Object
This action is called to read the state of the machine. The resulting state is expected to be put into the ‘:machine_state_id` key.
41 42 43 44 45 46 47 |
# File 'lib/vagrant-openstack-plugin/action.rb', line 41 def self.action_read_state Vagrant::Action::Builder.new.tap do |b| b.use ConfigValidate b.use ConnectOpenStack b.use ReadState end end |
.action_ssh ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/vagrant-openstack-plugin/action.rb', line 49 def self.action_ssh Vagrant::Action::Builder.new.tap do |b| b.use ConfigValidate b.use Call, IsCreated do |env, b2| if !env[:result] b2.use MessageNotCreated next end b2.use SSHExec end end end |
.action_ssh_run ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/vagrant-openstack-plugin/action.rb', line 63 def self.action_ssh_run Vagrant::Action::Builder.new.tap do |b| b.use ConfigValidate b.use Call, IsCreated do |env, b2| if !env[:result] b2.use MessageNotCreated next end b2.use SSHRun end end end |
.action_up ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/vagrant-openstack-plugin/action.rb', line 77 def self.action_up Vagrant::Action::Builder.new.tap do |b| b.use HandleBoxUrl b.use ConfigValidate b.use Call, IsCreated do |env, b2| if env[:result] b2.use MessageAlreadyCreated next end b2.use ConnectOpenStack b2.use Provision b2.use SyncFolders b2.use SetHostname b2.use WarnNetworks b2.use CreateServer end end end |