1.download the latest build
2.root@c910f02c01p13 ~]# tabdump switches
"switch_10_4_25_1",,,,,,,"admin","passw0rd","ssh","Jun",,
"switch_10_5_25_1",,,,,,,"admin",,"telnet","Cisco",,
[root@c910f02c01p13 ~]#
[root@c910f02c01p13 ~]# lsdef switch_10_4_25_1
Object name: switch_10_4_25_1
groups=switch
ip=10.4.25.1
mgt=switch
nodetype=switch
password=passw0rd
postbootscripts=otherpkgs
postscripts=syslog,remoteshell,syncfiles
protocol=ssh
switchtype=Jun
username=admin
then:
[root@c910f02c01p13 ~]# xdsh switch_10_4_25_1 --devicetype EthSwitch::Jun "show vlan"
switch_10_4_25_1: start SSH session...
switch_10_4_25_1:
switch_10_4_25_1: ?
switch_10_4_25_1:
switch_10_4_25_1: {master:0}
switch_10_4_25_1: set cli screen-length 0
switch_10_4_25_1: Screen length set to 0
switch_10_4_25_1:
switch_10_4_25_1: {master:0}
[root@c910f02c01p13 ~]#
---------------->could not work using ssh
telnet works.
ssh does not work for Juniper switch. I have debugged it, the waitfor function in RShellAPI does not give expected result. Use get function many times will get the result.
There is a Mellanox switch that has ssh connection without password. The code works.
We need to do more testing on all kinds of switches (BNT, Cisco, Mellanox, Juniper) for ssh to figure out if this is a common problem or not. We need to setup username and password for ssh for the switches.
The only switch that we have tested was 10.4.25.1. It is down. A note has sent out to the lab asking to bring it up.
Fixed by adding a post_command in the config file.
Checked in revision 74a822071d20c51685991e99aebf13e39fbfb6b3 for xCAT 2.10