INNER CODE UNIT · Ruby

self

devopsgroup-io/vagrant-digitalocean · lib/vagrant-digitalocean/actions.rb:109

      def self.halt
        return Vagrant::Action::Builder.new.tap do |builder|
          builder.use ConfigValidate
          builder.use Call, CheckState do |env, b|
            case env[:machine_state]
            when :active
              if env[:force_halt] 
                b.use PowerOff
              else
                b.use ShutDown
              end
            when :off
              env[:ui].info I18n.t('vagrant_digital_ocean.info.already_off')
            when :not_created
              env[:ui].info I18n.t('vagrant_digital_ocean.info.not_created')
            end
          end
        end

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…