Class: VagrantWindows::Communication::WinRMShellFactory
- Inherits:
-
Object
- Object
- VagrantWindows::Communication::WinRMShellFactory
- Defined in:
- lib/vagrant-windows/communication/winrmshell_factory.rb
Overview
Factory class for generating new WinRMShell instances
Instance Method Summary collapse
-
#create_winrm_shell ⇒ WinRMShell
Creates a new WinRMShell instance.
-
#initialize(windows_machine, winrm_finder) ⇒ WinRMShellFactory
constructor
A new instance of WinRMShellFactory.
Constructor Details
#initialize(windows_machine, winrm_finder) ⇒ WinRMShellFactory
Returns a new instance of WinRMShellFactory.
12 13 14 15 |
# File 'lib/vagrant-windows/communication/winrmshell_factory.rb', line 12 def initialize(windows_machine, winrm_finder) @windows_machine = windows_machine @winrm_finder = winrm_finder end |
Instance Method Details
#create_winrm_shell ⇒ WinRMShell
Creates a new WinRMShell instance
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/vagrant-windows/communication/winrmshell_factory.rb', line 20 def create_winrm_shell() WinRMShell.new( @winrm_finder.winrm_host_address(), @windows_machine.winrm_config.username, @windows_machine.winrm_config.password, { :port => @winrm_finder.winrm_host_port(), :timeout_in_seconds => @windows_machine.winrm_config.timeout, :max_tries => @windows_machine.winrm_config.max_tries }) end |