Resolve whitespace
This commit is contained in:
parent
344fc0ea7b
commit
d350fd0d28
|
@ -20,7 +20,7 @@ module VagrantPlugins
|
|||
vmname = env[:machine].provider_config.vmname
|
||||
differencing_disk = env[:machine].provider_config.differencing_disk
|
||||
auto_start_action = env[:machine].provider_config.auto_start_action
|
||||
auto_stop_action = env[:machine].provider_config.auto_stop_action
|
||||
auto_stop_action = env[:machine].provider_config.auto_stop_action
|
||||
|
||||
env[:ui].output("Configured Dynamic memory allocation, maxmemory is #{maxmemory}") if maxmemory
|
||||
env[:ui].output("Configured startup memory is #{memory}") if memory
|
||||
|
@ -28,7 +28,7 @@ module VagrantPlugins
|
|||
env[:ui].output("Configured vmname is #{vmname}") if vmname
|
||||
env[:ui].output("Configured differencing disk instead of cloning") if differencing_disk
|
||||
env[:ui].output("Configured automatic start action is #{auto_start_action}") if auto_start_action
|
||||
env[:ui].output("Configured automatic stop action is #{auto_stop_action}") if auto_stop_action
|
||||
env[:ui].output("Configured automatic stop action is #{auto_stop_action}") if auto_stop_action
|
||||
|
||||
if !vm_dir.directory? || !hd_dir.directory?
|
||||
raise Errors::BoxInvalid
|
||||
|
@ -120,7 +120,7 @@ module VagrantPlugins
|
|||
options[:cpus] = cpus if cpus
|
||||
options[:vmname] = vmname if vmname
|
||||
options[:auto_start_action] = auto_start_action if auto_start_action
|
||||
options[:auto_stop_action] = auto_stop_action if auto_stop_action
|
||||
options[:auto_stop_action] = auto_stop_action if auto_stop_action
|
||||
|
||||
env[:ui].detail("Creating and registering the VM...")
|
||||
server = env[:machine].provider.driver.import(options)
|
||||
|
|
|
@ -13,7 +13,7 @@ module VagrantPlugins
|
|||
attr_accessor :mac # MAC address for network interface for the virtual machine. @return [String]
|
||||
attr_accessor :differencing_disk # Create differencing disk instead of cloning whole VHD [Boolean]
|
||||
attr_accessor :auto_start_action #action on automatic start of VM. Values: Nothing, StartIfRunning, Start
|
||||
attr_accessor :auto_stop_action #action on automatic stop of VM. Values: ShutDown, TurnOff, Save
|
||||
attr_accessor :auto_stop_action #action on automatic stop of VM. Values: ShutDown, TurnOff, Save
|
||||
|
||||
def initialize
|
||||
@ip_address_timeout = UNSET_VALUE
|
||||
|
@ -25,7 +25,7 @@ module VagrantPlugins
|
|||
@mac = UNSET_VALUE
|
||||
@differencing_disk = UNSET_VALUE
|
||||
@auto_start_action = UNSET_VALUE
|
||||
@auto_stop_action = UNSET_VALUE
|
||||
@auto_stop_action = UNSET_VALUE
|
||||
end
|
||||
|
||||
def finalize!
|
||||
|
@ -40,7 +40,7 @@ module VagrantPlugins
|
|||
@mac = nil if @mac == UNSET_VALUE
|
||||
@differencing_disk = false if @differencing_disk == UNSET_VALUE
|
||||
@auto_start_action = nil if @auto_start_action == UNSET_VALUE
|
||||
@auto_stop_action = nil if @auto_stop_action == UNSET_VALUE
|
||||
@auto_stop_action = nil if @auto_stop_action == UNSET_VALUE
|
||||
end
|
||||
|
||||
def validate(machine)
|
||||
|
|
|
@ -9,8 +9,8 @@ Param(
|
|||
[string]$maxmemory=$null,
|
||||
[string]$cpus=$null,
|
||||
[string]$vmname=$null,
|
||||
[string]$auto_start_action=$null,
|
||||
[string]$auto_stop_action=$null
|
||||
[string]$auto_start_action=$null,
|
||||
[string]$auto_stop_action=$null
|
||||
)
|
||||
|
||||
# Include the following modules
|
||||
|
@ -147,11 +147,11 @@ if ($notes) {
|
|||
}
|
||||
|
||||
if ($auto_start_action) {
|
||||
$more_vm_params.Add("AutomaticStartAction",$auto_start_action)
|
||||
$more_vm_params.Add("AutomaticStartAction",$auto_start_action)
|
||||
}
|
||||
|
||||
if ($auto_stop_action) {
|
||||
$more_vm_params.Add("AutomaticStopAction",$auto_stop_action)
|
||||
$more_vm_params.Add("AutomaticStopAction",$auto_stop_action)
|
||||
}
|
||||
|
||||
# Set the values on the VM
|
||||
|
@ -162,12 +162,12 @@ $controllers = Select-Xml -xml $vmconfig -xpath "//*[starts-with(name(.),'contro
|
|||
|
||||
# Only set EFI secure boot for Gen 2 machines, not gen 1
|
||||
if ($generation -ne 1) {
|
||||
# Set EFI secure boot
|
||||
if ($secure_boot_enabled -eq "True") {
|
||||
Set-VMFirmware -VM $vm -EnableSecureBoot On
|
||||
} else {
|
||||
Set-VMFirmware -VM $vm -EnableSecureBoot Off
|
||||
}
|
||||
# Set EFI secure boot
|
||||
if ($secure_boot_enabled -eq "True") {
|
||||
Set-VMFirmware -VM $vm -EnableSecureBoot On
|
||||
} else {
|
||||
Set-VMFirmware -VM $vm -EnableSecureBoot Off
|
||||
}
|
||||
}
|
||||
|
||||
# A regular expression pattern to pull the number from controllers
|
||||
|
|
Loading…
Reference in New Issue