Subject: | Bug in Transport.pm |
Hi Oliver,
After upgrading and changing my code to work with the new API, I was getting this error
when connecting via SSH:
ERROR: Device::CiscoIOS::_cli_cmd: router.uoregon.edu: Can't locate object method
"username" via package "Net::Appliance::Session" at
/usr/local/share/perl/5.10.1/Net/Appliance/Session/Transport.pm line 36.
It looks like this patch fixes the problem:
--- Transport.pm.old 2011-06-17 09:43:37.872020849 -0700
+++ Transport.pm 2011-06-17 09:58:16.241947660 -0700
@@ -33,7 +33,7 @@
$self->set_password($options->password) if $options->has_password;
# SSH transport takes a username if we have one
- $self->nci->transport->connect_options->username($self->username)
+ $self->nci->transport->connect_options->username($self->get_username)
if $self->has_username
and $self->nci->transport->connect_options->meta-
Show quoted text
>find_attribute_by_name('username');
Thx,
cv