lib/vagrant/machine.rb
def action(name, extra_env=nil)
      @logger.info("Calling action: #{name} on provider #{@provider}")

      # Get the callable from the provider.
      callable = @provider.action(name)

      # If this action doesn't exist on the provider, then an exception
      # must be raised.
      if callable.nil?
        raise Errors::UnimplementedProviderAction,
          :action => name,
          :provider => @provider.to_s
      end

      # Run the action with the action runner on the environment
      env = {
        :action_name    => "machine_action_#{name}".to_sym,
        :machine        => self,
        :machine_action => name,
        :ui             => @ui
      }.merge(extra_env || {})
      @env.action_runner.run(callable, env)
    end
# This calls an action on the provider. The provider may or may not
# actually implement the action.
#
# @param [Symbol] name Name of the action to run.
# @param [Hash] extra_env This data will be passed into the action runner
#   as extra data set on the environment hash for the middleware
#   runner.
This calls an action on the provider. The provider may or may not
actually implement the action.
This calls an action on the provider . The provider may or may not actually implement the action .
def action(name, extra_env=nil)
      @logger.info("Calling action: #{name} on provider #{@provider}")
      callable = @provider.action(name)
      if callable.nil?
        raise Errors::UnimplementedProviderAction,
          :action => name,
          :provider => @provider.to_s
      end
      env = {
        :action_name    => "machine_action_#{name}".to_sym,
        :machine        => self,
        :machine_action => name,
        :ui             => @ui
      }.merge(extra_env || {})
      @env.action_runner.run(callable, env)
    end
def action ( name , extra_env = nil ) @logger . info ( "Calling action: #{name} on provider #{@provider}" ) callable = @provider . action ( name ) if callable . nil? raise Errors :: UnimplementedProviderAction , :action => name , :provider => @provider . to_s end env = { :action_name => "machine_action_#{name}" . to_sym , :machine => self , :machine_action => name , :ui => @ui } . merge ( extra_env || { } ) @env . action_runner . run ( callable , env ) end
This calls an action on the provider.
This calls an action on the provider .
# Get the callable from the provider. # If this action doesn't exist on the provider, then an exception # must be raised. # Run the action with the action runner on the environment
name
extra_env
extra_env This data will be passed into the action runner as extra data set on the environment hash for the middleware runner.
extra_env This data will be passed into the action runner as extra data set on the environment hash for the middleware runner .