Module: Netconf::Junos::TransTelnet

Defined in:
lib/net/netconf/jnpr/telnet.rb

Instance Method Summary collapse

Instance Method Details

#trans_loginObject


8
9
10
11
12
13
# File 'lib/net/netconf/jnpr/telnet.rb', line 8

def 
  l_rsp = @trans.(@args[:username], @args[:password])
  # @@@/JLS: need to rescue the timeout ... ???
  l_rsp =~ "([>%])\s+$"
  @exec_netconf = (Regexp.last_match(1) == '%') ? Netconf::Junos::NETCONF_SHELL : Netconf::Junos::NETCONF_CLI
end

#trans_start_netconfObject


15
16
17
# File 'lib/net/netconf/jnpr/telnet.rb', line 15

def trans_start_netconf
  @trans.puts @exec_netconf
end