lib/vagrant-conoha/action.rb in vagrant-conoha-0.1.5 vs lib/vagrant-conoha/action.rb in vagrant-conoha-0.1.6

- old
+ new

@@ -15,10 +15,11 @@ b.use ConnectOpenstack b.use Call, ReadState do |env, b2| if env[:machine_state_id] == :not_created b2.use Message, I18n.t('vagrant_openstack.not_created') else + b2.use(ProvisionerCleanup, :before) b2.use DeleteServer b2.use DeleteStack end end end @@ -31,11 +32,15 @@ b.use ConnectOpenstack b.use Call, ReadState do |env, b2| if env[:machine_state_id] == :not_created b2.use Message, I18n.t('vagrant_openstack.not_created') else - b2.use ProvisionWrapper + if env[:machine].provider_config.meta_args_support + b2.use ProvisionWrapper + else + b2.use Provision + end b2.use SyncFolders end end end end @@ -97,16 +102,31 @@ b.use Call, ReadState do |env, b2| case env[:machine_state_id] when :not_created ssh_disabled = env[:machine].provider_config.ssh_disabled - b2.use ProvisionWrapper unless ssh_disabled + unless ssh_disabled + if env[:machine].provider_config.meta_args_support + b2.use ProvisionWrapper + else + b2.use Provision + end + end b2.use SyncFolders b2.use CreateStack b2.use CreateServer b2.use Message, I18n.t('vagrant_openstack.ssh_disabled_provisioning') if ssh_disabled - b2.use WaitForServerToBeAccessible unless ssh_disabled + unless ssh_disabled + # Handle legacy ssh_timeout option + timeout = env[:machine].provider_config.ssh_timeout + unless timeout.nil? + env[:machine].ui.warn I18n.t('vagrant_openstack.config.ssh_timeout_deprecated') + env[:machine].config.vm.boot_timeout = timeout + end + + b2.use WaitForCommunicator + end when :shutoff b2.use StartServer when :suspended b2.use Resume else @@ -213,10 +233,9 @@ autoload :Suspend, action_root.join('suspend') autoload :Resume, action_root.join('resume') autoload :ProvisionWrapper, action_root.join('provision') autoload :WaitForServerToStop, action_root.join('wait_stop') autoload :WaitForServerToBeActive, action_root.join('wait_active') - autoload :WaitForServerToBeAccessible, action_root.join('wait_accessible') private def self.new_builder Vagrant::Action::Builder.new