VagrantRunner Class

Summary

Wrapper around Vagrant's CLI functionality for creating, starting and managing VMs
Assembly
Cake.Vagrant.dll
Namespace
Cake.Vagrant
Base Types
graph BT Type-->Base0["Tool<VagrantSettings>"] Type["VagrantRunner"] class Type type-node

Syntax

public class VagrantRunner : Tool<VagrantSettings>

Constructors

Properties

Name Value Summary
Box VagrantBoxRunner
Provides access to `vagrant box` subcommands
Docker VagrantDockerRunner
Provides access to `vagrant docker` subcommands
Plugin VagrantPluginRunner
Provides access to `vagrant plugin` subcommands
Snapshot VagrantSnapshotRunner
Provides access to `vagrant snapshot` subcommands

Methods

Name Value Summary
Destroy(string) void
This command stops the running machine Vagrant is managing and destroys all resources that were created during the machine creation process.
FromPath(DirectoryPath) VagrantRunner
Sets the working directory for vagrant commands
GetAlternativeToolPaths(VagrantSettings) IEnumerable<FilePath>
Gets alternative file paths which the tool may exist in
GetToolExecutableNames() IEnumerable<string>
Gets the possible names of the tool executable.
GetToolName() string
Gets the name of the tool.
GetWorkingDirectory(VagrantSettings) DirectoryPath
Gets the working directory. Defaults to the currently set working directory.
Halt(string, bool) void
This command shuts down the running machine Vagrant is managing.
Init(string, Action<VagrantInitSettings>) void
This initializes the current directory to be a Vagrant environment by creating an initial Vagrantfile if one does not already exist.
Init(string, string, Action<VagrantInitSettings>) void
Initializes the current directory for Vagrant by creating an initial Vagrantfile
Package(Action<VagrantPackageSettings>) void
This packages a currently running VirtualBox environment into a re-usable box.
Package(string, Action<VagrantPackageSettings>) void
This packages a currently running VirtualBox environment into a re-usable box.
Package(string) void
This packages a currently running VirtualBox environment into a re-usable box.
PowerShell(Action<VagrantPowerShellSettings>) void
This command opens a PowerShell connection to your default machine to run the provided command
PowerShell(string, Action<VagrantPowerShellSettings>) void
This command opens a PowerShell connection to the specified machine to run the provided command
Reload(Action<VagrantProvisionerSettings>) void
The equivalent of running a halt followed by an up.
Reload(string, Action<VagrantProvisionerSettings>) void
The equivalent of running a halt followed by an up.
Reload(string) void
The equivalent of running a halt followed by an up.
Resume(Action<VagrantProvisionerSettings>) void
This resumes a Vagrant managed machine that was previously suspended.
Resume(string, Action<VagrantProvisionerSettings>) void
This resumes a Vagrant managed machine that was previously suspended.
Resume(string) void
This resumes a Vagrant managed machine that was previously suspended.
SSH(Action<VagrantSSHSettings>) void
This command opens an SSH connection to your default machine to run the provided command
SSH(string, Action<VagrantSSHSettings>) void
This command opens an SSH connection to the specified machine to run the provided command
Suspend(string) void
This suspends the guest machine Vagrant is managing, rather than shutting it down
Up(Action<VagrantUpSettings>) void
This command creates and configures the default machine according to your Vagrantfile, and the specified settings
Up(string, Action<VagrantUpSettings>) void
This command creates and configures guest machines according to your Vagrantfile, and the specified settings.
Up(string) void
This command creates and configures guest machines according to your Vagrantfile, using the default settings

Extension Methods

Name Value Summary
Dump<VagrantRunner>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<VagrantRunner>(VagrantRunner[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<VagrantRunner>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<VagrantRunner>(string) void
Requires the Cake.Issues addin
ThrowIfNull<VagrantRunner>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<VagrantRunner>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Requires the Cake.Issues addin