Class: Puppet::NetDev::CE::Device_tel
- Inherits:
- 
      Object
      
        - Object
- Puppet::NetDev::CE::Device_tel
 
- Defined in:
- lib/puppet/provider/ce/device_tel/device_tel.rb
Constant Summary collapse
- @@telnet_session =
- nil
- @@command_telnet_api =
- nil
- @@telnet_hostip =
- nil
- @@telnet_username =
- nil
- @@telnet_password =
- nil
Class Method Summary collapse
- 
  
    
      .command_telnet_api  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    create Command_telnetApi instance. 
- .tel_instance(telnet_ipaddress, telnet_username, telnet_password) ⇒ Object
- .telnet_session ⇒ Object
Class Method Details
.command_telnet_api ⇒ Object
create Command_telnetApi instance
| 52 53 54 55 56 57 | # File 'lib/puppet/provider/ce/device_tel/device_tel.rb', line 52 def self.command_telnet_api if nil == @@command_telnet_api @@command_telnet_api = Command_telnetApi.new end @@command_telnet_api end | 
.tel_instance(telnet_ipaddress, telnet_username, telnet_password) ⇒ Object
| 45 46 47 48 49 | # File 'lib/puppet/provider/ce/device_tel/device_tel.rb', line 45 def self.tel_instance(telnet_ipaddress, telnet_username, telnet_password) @@telnet_hostip = telnet_ipaddress @@telnet_username = telnet_username @@telnet_password = telnet_password end | 
.telnet_session ⇒ Object
| 33 34 35 36 37 38 39 40 41 42 43 | # File 'lib/puppet/provider/ce/device_tel/device_tel.rb', line 33 def self.telnet_session if nil == @@telnet_session && nil != @@telnet_hostip && nil != @@telnet_username && nil != @@telnet_password telnet_session = Puppet::NetDev::CE::TelnetSession.new(@@telnet_hostip, @@telnet_username, @@telnet_password) @@telnet_session = telnet_session.connect puts 'create telnet session in normal way' end @@telnet_session end |