Class: VagrantPlugins::HyperV::Driver
- Inherits:
-
Object
- Object
- VagrantPlugins::HyperV::Driver
- Defined in:
- lib/vagrant-windows-hyperv/monkey_patch/driver.rb
Direct Known Subclasses
Instance Method Summary collapse
- #add_swith_to_vm(options) ⇒ Object
-
#create_network_switch(options) ⇒ Object
New methods for network customization.
- #find_vm_switch_name ⇒ Object
-
#import(options) ⇒ Object
Override the existing import method to Override the import_vm.ps1 script.
- #list_net_adapters ⇒ Object
- #switch_exist(options) ⇒ Object
Instance Method Details
#add_swith_to_vm(options) ⇒ Object
38 39 40 41 42 |
# File 'lib/vagrant-windows-hyperv/monkey_patch/driver.rb', line 38 def add_swith_to_vm() load_path = Pathname.new(File.("../scripts", __FILE__)) script_path = load_path.join('add_switch_to_vm.ps1') execute(script_path, ) end |
#create_network_switch(options) ⇒ Object
New methods for network customization
20 21 22 23 24 |
# File 'lib/vagrant-windows-hyperv/monkey_patch/driver.rb', line 20 def create_network_switch() load_path = Pathname.new(File.("../scripts", __FILE__)) script_path = load_path.join('create_switch.ps1') execute(script_path, ) end |
#find_vm_switch_name ⇒ Object
32 33 34 35 36 |
# File 'lib/vagrant-windows-hyperv/monkey_patch/driver.rb', line 32 def find_vm_switch_name load_path = Pathname.new(File.("../scripts", __FILE__)) script_path = load_path.join('find_vm_switch_name.ps1') execute(script_path, {vm_id: vm_id}) end |
#import(options) ⇒ Object
Override the existing import method to Override the import_vm.ps1 script
13 14 15 16 17 |
# File 'lib/vagrant-windows-hyperv/monkey_patch/driver.rb', line 13 def import() load_path = Pathname.new(File.("../scripts", __FILE__)) script_path = load_path.join('import_vm.ps1').to_s execute(script_path, ) end |
#list_net_adapters ⇒ Object
26 27 28 29 30 |
# File 'lib/vagrant-windows-hyperv/monkey_patch/driver.rb', line 26 def list_net_adapters load_path = Pathname.new(File.("../scripts", __FILE__)) script_path = load_path.join('get_adapters.ps1') execute(script_path, {}) end |
#switch_exist(options) ⇒ Object
44 45 46 47 48 |
# File 'lib/vagrant-windows-hyperv/monkey_patch/driver.rb', line 44 def switch_exist() load_path = Pathname.new(File.("../scripts", __FILE__)) script_path = load_path.join('switch_exist.ps1') execute(script_path, ) end |