2 # This script starts the Karaf shell and sends the password for SSH auth.
3 # Further tests in Karaf shell can be done here
8 # Time expect will wait for output
14 set prompt "opendaylight-user@root>"
16 # Wait for Karaf SSH server to come online
17 send_user "Waiting on OpenDaylight to start listening for SSH on port 8101\n"
18 exec bash -c "while ! nmap -Pn -p8101 localhost | grep -q open; do sleep 0.1; done"
20 # SSH into Karaf shell
21 send_user "SSH into ODL Karaf shell\n"
22 spawn ssh -p 8101 -o StrictHostKeyChecking=no karaf@127.0.0.1
25 expect "Password authentication"
29 # Show features to make debugging easier
30 # Check for "No features available" error message
35 send_user "\nFeatures seem to be available\n"
37 "No features available" {{
38 send_user "\nNo features available, error\n"
43 # Verify that a major feature is present
45 send "feature:list | grep odl-netvirt-openstack\r"
48 send_user "\nTest feature not found\n"
51 "OpenDaylight :: NetVirt :: OpenStack" {{
52 send_user "\nTest feature available\n"
56 # Disable this test until ODLPARENT-139 is fixed
59 # send "feature:install odl-netvirt-openstack\r"
61 # "Error executing command: Can't install feature" {{
62 # send_user "\nFailed to install test feature\n"
67 # Verify installed feature is actually installed
69 # The -i flag will only show installed features
70 # send "feature:list -i | grep odl-netvirt-openstack\r"
73 # send_user "\nTest feature not installed\n"
76 # "OpenDaylight :: NetVirt :: OpenStack" {{
77 # send_user "\nTest feature installed successfully\n"
81 send_user "End of Karaf shell tests\n"