Class: NetVbox::WizardDelegator

Inherits:
Object
  • Object
show all
Defined in:
lib/netvbox/wizard_delegator.rb

Instance Method Summary collapse

Constructor Details

#initialize(printing_delegator) ⇒ WizardDelegator

Returns a new instance of WizardDelegator.



6
7
8
# File 'lib/netvbox/wizard_delegator.rb', line 6

def initialize(printing_delegator)
  @printing_delegator = printing_delegator
end

Instance Method Details

#add_vmObject



10
11
12
13
14
15
16
17
# File 'lib/netvbox/wizard_delegator.rb', line 10

def add_vm
  hostname = get_value 'Enter hostname of VM host: '
  username = get_value 'Enter ssh username: '
  pw = get_password 'Enter ssh password: '
  vm_name = get_value 'Enter VM name: '
  snapshot_name = get_value 'Enter snapshot name: '
  @printing_delegator.add_vm(hostname, username, pw, vm_name, snapshot_name)
end

#create_setObject



38
39
40
41
# File 'lib/netvbox/wizard_delegator.rb', line 38

def create_set
  set_name = get_value 'Enter set name: '
  @printing_delegator.create_set set_name
end

#remove_setObject



43
44
45
46
# File 'lib/netvbox/wizard_delegator.rb', line 43

def remove_set
  set_name = get_value 'Enter set name: '
  @printing_delegator.remove_set set_name
end

#remove_vmObject



19
20
21
22
23
24
# File 'lib/netvbox/wizard_delegator.rb', line 19

def remove_vm
  hostname = get_value 'Enter hostname of VM host: '
  username = get_value 'Enter ssh username: '
  vm_name = get_value 'Enter VM name: '
  @printing_delegator.remove_vm(hostname, username, vm_name)
end

#ssh_guestsObject



31
32
33
34
35
36
# File 'lib/netvbox/wizard_delegator.rb', line 31

def ssh_guests
  username = get_value 'Enter ssh username: '
  pw = get_password 'Enter ssh password: '
  command = get_value 'Enter command: '
  @printing_delegator.ssh_guests(username, pw, command)
end

#ssh_hostsObject



26
27
28
29
# File 'lib/netvbox/wizard_delegator.rb', line 26

def ssh_hosts
  command = get_value 'Enter command: '
  @printing_delegator.ssh_hosts command
end

#use_setObject



48
49
50
51
# File 'lib/netvbox/wizard_delegator.rb', line 48

def use_set
  set_name = get_value 'Enter set name: '
  @printing_delegator.use_set set_name
end