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

- old
+ new

@@ -37,11 +37,17 @@ if env[:machine].provider_config.meta_args_support b2.use ProvisionWrapper else b2.use Provision end - b2.use SyncFolders + if env[:machine].provider_config.use_legacy_synced_folders + env[:machine].ui.warn I18n.t('vagrant_openstack.config.sync_folders_deprecated') + b2.use SyncFolders + else + # Standard Vagrant implementation. + b2.use SyncedFolders + end end end end end @@ -59,10 +65,11 @@ # 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. def self.action_read_state new_builder.tap do |b| + b.use HandleBox b.use ConfigValidate b.use ConnectOpenstack b.use ReadState end end @@ -95,10 +102,11 @@ end end def self.action_up new_builder.tap do |b| + b.use HandleBox b.use ConfigValidate b.use ConnectOpenstack b.use Call, ReadState do |env, b2| case env[:machine_state_id] @@ -109,10 +117,18 @@ b2.use ProvisionWrapper else b2.use Provision end end - b2.use SyncFolders + + if env[:machine].provider_config.use_legacy_synced_folders + env[:machine].ui.warn I18n.t('vagrant_openstack.config.sync_folders_deprecated') + b2.use SyncFolders + else + # Standard Vagrant implementation. + b2.use SyncedFolders + end + b2.use CreateStack b2.use CreateServer b2.use Message, I18n.t('vagrant_openstack.ssh_disabled_provisioning') if ssh_disabled unless ssh_disabled # Handle legacy ssh_timeout option