lib/vagrant-windows/windows_machine.rb in vagrant-windows-1.5.1 vs lib/vagrant-windows/windows_machine.rb in vagrant-windows-1.6.0.pre.1
- old
+ new
@@ -16,10 +16,17 @@
# @param [Machine] The Vagrant machine object
def initialize(machine)
@machine = machine
@logger = Log4r::Logger.new("vagrant_windows::windows_machine")
end
+
+ # Returns true if this Vagrant machine is a Windows guest, otherwise false.
+ #
+ # @return [Boolean]
+ def is_windows?()
+ WindowsMachine.is_windows?(@machine)
+ end
# Checks to see if the machine is using VMWare Fusion or Workstation.
#
# @return [Boolean]
def is_vmware?()
@@ -51,9 +58,15 @@
# Returns the active WinRMShell for the guest.
#
# @return [WinRMShell]
def winrmshell()
@machine.communicate.winrmshell
+ end
+
+ # Re-establishes our symbolic links if they were created between now and a reboot
+ # Fixes issue #119
+ def reinitialize_network_shares()
+ winrmshell.powershell('& net use a-non-existant-share')
end
# Reads the machine's MAC addresses keyed by interface index.
# {1=>"0800273FAC5A", 2=>"08002757E68A"}
#
\ No newline at end of file