class => module Action
This commit is contained in:
parent
3edb9c2269
commit
b878f1bd66
|
@ -1,10 +1,8 @@
|
||||||
require 'log4r'
|
|
||||||
|
|
||||||
require 'vagrant/action/builder'
|
require 'vagrant/action/builder'
|
||||||
require 'vagrant/action/builtin'
|
require 'vagrant/action/builtin'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
autoload :Environment, 'vagrant/action/environment'
|
autoload :Environment, 'vagrant/action/environment'
|
||||||
autoload :Registry, 'vagrant/action/registry'
|
autoload :Registry, 'vagrant/action/registry'
|
||||||
autoload :Runner, 'vagrant/action/runner'
|
autoload :Runner, 'vagrant/action/runner'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module Box
|
module Box
|
||||||
class Destroy
|
class Destroy
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module Box
|
module Box
|
||||||
class Download
|
class Download
|
||||||
BASENAME = "box"
|
BASENAME = "box"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'vagrant/action/general/package'
|
require 'vagrant/action/general/package'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module Box
|
module Box
|
||||||
# Packages a box which has already been unpackaged (such as
|
# Packages a box which has already been unpackaged (such as
|
||||||
# for the `vagrant box repackage` command) by leveraging the
|
# for the `vagrant box repackage` command) by leveraging the
|
||||||
|
|
|
@ -2,7 +2,7 @@ require 'fileutils'
|
||||||
require 'archive/tar/minitar'
|
require 'archive/tar/minitar'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module Box
|
module Box
|
||||||
# Unpackages a downloaded box to a given directory with a given
|
# Unpackages a downloaded box to a given directory with a given
|
||||||
# name.
|
# name.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module Box
|
module Box
|
||||||
class Verify
|
class Verify
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
# Action builder which provides a nice DSL for building up
|
# Action builder which provides a nice DSL for building up
|
||||||
# a middleware sequence for Vagrant actions. This code is based
|
# a middleware sequence for Vagrant actions. This code is based
|
||||||
# heavily off of `Rack::Builder` and `ActionDispatch::MiddlewareStack`
|
# heavily off of `Rack::Builder` and `ActionDispatch::MiddlewareStack`
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
# Registers the builtin actions with a specific registry.
|
# Registers the builtin actions with a specific registry.
|
||||||
#
|
#
|
||||||
# These are the pre-built action sequences that are shipped with
|
# These are the pre-built action sequences that are shipped with
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module Env
|
module Env
|
||||||
# A middleware which just sets up the environment with some
|
# A middleware which just sets up the environment with some
|
||||||
# options which are passed to it.
|
# options which are passed to it.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'vagrant/util/hash_with_indifferent_access'
|
require 'vagrant/util/hash_with_indifferent_access'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
# Represents an action environment which is what is passed
|
# Represents an action environment which is what is passed
|
||||||
# to the `call` method of each action. This environment contains
|
# to the `call` method of each action. This environment contains
|
||||||
# some helper methods for accessing the environment as well
|
# some helper methods for accessing the environment as well
|
||||||
|
|
|
@ -2,7 +2,7 @@ require 'fileutils'
|
||||||
require 'archive/tar/minitar'
|
require 'archive/tar/minitar'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module General
|
module General
|
||||||
# A general packaging (tar) middleware. Given the following options,
|
# A general packaging (tar) middleware. Given the following options,
|
||||||
# it will do the right thing:
|
# it will do the right thing:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module General
|
module General
|
||||||
# Simply validates the configuration of the current Vagrant
|
# Simply validates the configuration of the current Vagrant
|
||||||
# environment.
|
# environment.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
# This is the action registry, which stores action steps indexed
|
# This is the action registry, which stores action steps indexed
|
||||||
# by a unique name. These registry names can be used to call actions
|
# by a unique name. These registry names can be used to call actions
|
||||||
# via the `Runner` class.
|
# via the `Runner` class.
|
||||||
|
|
|
@ -6,7 +6,7 @@ require 'vagrant/util/busy'
|
||||||
# * env.lock
|
# * env.lock
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
class Runner
|
class Runner
|
||||||
@@reported_interrupt = false
|
@@reported_interrupt = false
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class Boot
|
class Boot
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class CheckAccessible
|
class CheckAccessible
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class CheckBox
|
class CheckBox
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# Middleware which verifies that the VM has the proper guest additions
|
# Middleware which verifies that the VM has the proper guest additions
|
||||||
# installed and prints a warning if they're not detected or if the
|
# installed and prints a warning if they're not detected or if the
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# Cleans up the VirtualBox machine folder for any ".xml-prev"
|
# Cleans up the VirtualBox machine folder for any ".xml-prev"
|
||||||
# files which VirtualBox may have left over. This is a bug in
|
# files which VirtualBox may have left over. This is a bug in
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class ClearForwardedPorts
|
class ClearForwardedPorts
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require File.expand_path("../nfs_helpers", __FILE__)
|
require File.expand_path("../nfs_helpers", __FILE__)
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class ClearNFSExports
|
class ClearNFSExports
|
||||||
include NFSHelpers
|
include NFSHelpers
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class ClearSharedFolders
|
class ClearSharedFolders
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class Customize
|
class Customize
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class Destroy
|
class Destroy
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# Destroys the unused host only interfaces. This middleware cleans
|
# Destroys the unused host only interfaces. This middleware cleans
|
||||||
# up any created host only networks.
|
# up any created host only networks.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# Discards the saved state of the VM if its saved. If its
|
# Discards the saved state of the VM if its saved. If its
|
||||||
# not saved, does nothing.
|
# not saved, does nothing.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class Export
|
class Export
|
||||||
attr_reader :temp_dir
|
attr_reader :temp_dir
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require File.join(File.dirname(__FILE__), 'forward_ports_helpers')
|
require File.join(File.dirname(__FILE__), 'forward_ports_helpers')
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class ForwardPorts
|
class ForwardPorts
|
||||||
include ForwardPortsHelpers
|
include ForwardPortsHelpers
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# Helper methods for forwarding ports. Requires that the environment
|
# Helper methods for forwarding ports. Requires that the environment
|
||||||
# is set to the `@env` instance variable.
|
# is set to the `@env` instance variable.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class Halt
|
class Halt
|
||||||
def initialize(app, env, options=nil)
|
def initialize(app, env, options=nil)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class HostName
|
class HostName
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class Import
|
class Import
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class MatchMACAddress
|
class MatchMACAddress
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# This class allows other actions on the virtual machine object
|
# This class allows other actions on the virtual machine object
|
||||||
# to be consolidated under a single write lock. This vastly speeds
|
# to be consolidated under a single write lock. This vastly speeds
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# Networking middleware for Vagrant. This enables host only
|
# Networking middleware for Vagrant. This enables host only
|
||||||
# networking on VMs if configured as such.
|
# networking on VMs if configured as such.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require File.expand_path("../nfs_helpers", __FILE__)
|
require File.expand_path("../nfs_helpers", __FILE__)
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# Enables NFS based shared folders. `nfsd` must already be installed
|
# Enables NFS based shared folders. `nfsd` must already be installed
|
||||||
# on the host machine, and NFS client must already be installed on
|
# on the host machine, and NFS client must already be installed on
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
module NFSHelpers
|
module NFSHelpers
|
||||||
def clear_nfs_exports(env)
|
def clear_nfs_exports(env)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'vagrant/action/general/package'
|
require 'vagrant/action/general/package'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# A subclass of {General::Package} which simply makes sure that
|
# A subclass of {General::Package} which simply makes sure that
|
||||||
# the package directory is set to the directory which the VM
|
# the package directory is set to the directory which the VM
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
# Puts a generated Vagrantfile into the package directory so that
|
# Puts a generated Vagrantfile into the package directory so that
|
||||||
# it can be included in the package.
|
# it can be included in the package.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class Provision
|
class Provision
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class ProvisionerCleanup
|
class ProvisionerCleanup
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class Resume
|
class Resume
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class ShareFolders
|
class ShareFolders
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
module VM
|
module VM
|
||||||
class Suspend
|
class Suspend
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require "log4r"
|
require "log4r"
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
class Action
|
module Action
|
||||||
# The action warden is a middleware which injects itself between
|
# The action warden is a middleware which injects itself between
|
||||||
# every other middleware, watching for exceptions which are raised
|
# every other middleware, watching for exceptions which are raised
|
||||||
# and performing proper cleanup on every action by calling the `recover`
|
# and performing proper cleanup on every action by calling the `recover`
|
||||||
|
|
Loading…
Reference in New Issue