Class: NetVbox::WizardDelegator
- Inherits:
-
Object
- Object
- NetVbox::WizardDelegator
- Defined in:
- lib/netvbox/wizard_delegator.rb
Instance Method Summary collapse
- #add_vm ⇒ Object
- #create_set ⇒ Object
-
#initialize(printing_delegator) ⇒ WizardDelegator
constructor
A new instance of WizardDelegator.
- #remove_set ⇒ Object
- #remove_vm ⇒ Object
- #ssh_guests ⇒ Object
- #ssh_hosts ⇒ Object
- #use_set ⇒ Object
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_vm ⇒ Object
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_set ⇒ Object
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_set ⇒ Object
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_vm ⇒ Object
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_guests ⇒ Object
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_hosts ⇒ Object
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_set ⇒ Object
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 |