Class: Console::KvmMachine
- Inherits:
 - 
      Object
      
        
- Object
 - Console::KvmMachine
 
 
- Defined in:
 - lib/console/kvm_machine.rb
 
Instance Method Summary collapse
- #execute(cli) ⇒ Object
 - 
  
    
      #initialize(domain)  ⇒ KvmMachine 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of KvmMachine.
 - #login ⇒ Object
 - #logout ⇒ Object
 
Constructor Details
#initialize(domain) ⇒ KvmMachine
Returns a new instance of KvmMachine.
      5 6 7  | 
    
      # File 'lib/console/kvm_machine.rb', line 5 def initialize(domain) @domain = domain end  | 
  
Instance Method Details
#execute(cli) ⇒ Object
      22 23 24 25 26 27 28 29 30 31  | 
    
      # File 'lib/console/kvm_machine.rb', line 22 def execute(cli) Console::Conversation.talk_with(@domain) do exepecting connected enter '' exepecting waiting_shell enter cli exepecting waiting_shell end end  | 
  
#login ⇒ Object
      9 10 11 12 13 14 15 16 17 18 19  | 
    
      # File 'lib/console/kvm_machine.rb', line 9 def login Console::Conversation.talk_with(@domain) do exepecting connected enter 'ronen' exepecting post_uname.chomp! enter "xaL2ohM0" sleep 3 puts read # exepecting logged_in -> we can't match since it contains date end end  | 
  
#logout ⇒ Object
      33 34 35 36 37 38 39  | 
    
      # File 'lib/console/kvm_machine.rb', line 33 def logout Console::Conversation.talk_with(@domain) do exepecting connected enter 'logout' return exepecting logout.chomp! end end  |