guests/windows: rdp_info cap

This commit is contained in:
Mitchell Hashimoto 2014-04-12 15:59:53 -07:00
parent 0fa07637f9
commit 993256643d
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,20 @@
module VagrantPlugins
module GuestWindows
module Cap
class RDP
def self.rdp_info(machine)
ssh_info = machine.ssh_info
username = ssh_info[:username]
if machine.config.vm.communicator == :winrm
username = machine.config.winrm.username
end
return {
host: ssh_info[:host],
username: username,
}
end
end
end
end
end

View File

@ -49,6 +49,11 @@ module VagrantPlugins
Cap::MountSharedFolder Cap::MountSharedFolder
end end
guest_capability(:windows, :rdp_info) do
require_relative "cap/rdp"
Cap::RDP
end
guest_capability(:windows, :wait_for_reboot) do guest_capability(:windows, :wait_for_reboot) do
require_relative "cap/reboot" require_relative "cap/reboot"
Cap::Reboot Cap::Reboot