5 Resource RemoteBash.robot
6 Resource SSHKeywords.robot
9 ${REST_VIEW_CHANNEL} /restconf/operations/usc-channel:view-channel
10 ${REST_ADD_CHANNEL} /restconf/operations/usc-channel:add-channel
11 ${REST_REMOVE_CHANNEL} /restconf/operations/usc-channel:remove-channel
12 ${REST_REMOVE_SESSION} /restconf/operations/usc-channel:remove-session
13 ${REST_SEND_MESSAGE} /restconf/operations/usc-channel:send-message
14 ${NAV_USC_TOOLS} cd ~/usc-tools
15 ${CLONE_USC_TOOLS} [ -f ~/usc-tools/UscAgent.jar ] && echo "The usc-tools does exist, done." || git clone https://github.com/victorxu99/usc-tools.git ~/usc-tools
16 ${ECHO_SERVER_PORT} 2007
17 @{LIST_ECHO_SERVER_PORT} 2007 2008 2009
18 ${TEST_MESSAGE} This is a test message.
19 ${NUM_OF_MESSAGES} 100
20 ${AgentTcp} java -jar UscAgent.jar -t true
21 ${AgentUdp} java -jar UscAgent.jar -t false
22 ${AgentTcpCallhome} java -jar UscAgent.jar -t true -c true -h
23 ${AgentUdpCallhome} java -jar UscAgent.jar -t false -c true -h
24 ${EchoServerTcp} java -jar EchoServer.jar -t true -p 2007
25 ${EchoServerUdp} java -jar EchoServer.jar -t false -p 2007
29 [Documentation] Download UscAgent and EchoServer before any system
31 Log Download tools begin ...
32 Run Command On Remote System ${TOOLS_SYSTEM_IP} ${CLONE_USC_TOOLS} prompt_timeout=30s
33 Log Download tools ended.
36 [Documentation] Basic setup/cleanup work that can be done safely before any system
38 Log Start USC test VM for TCP
39 ${agent_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
40 Set Suite Variable ${agent_conn_id}
41 Flexible Mininet Login
42 Write ${NAV_USC_TOOLS}
45 ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
46 Set Suite Variable ${echo_conn_id}
47 Flexible Mininet Login
48 Write ${NAV_USC_TOOLS}
49 Write ${EchoServerTcp}
50 Read Until initialized
53 [Documentation] Basic setup/cleanup work that can be done safely before any system
55 Log Start USC test VM for UDP
56 ${agent_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
57 Set Suite Variable ${agent_conn_id}
58 Flexible Mininet Login
59 Write ${NAV_USC_TOOLS}
62 ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
63 Set Suite Variable ${echo_conn_id}
64 Flexible Mininet Login
65 Write ${NAV_USC_TOOLS}
66 Write ${EchoServerUdp}
67 Read Until initialized
70 [Documentation] Basic setup/cleanup work that can be done safely before any system
72 Log Start USC test VM for CALLHOME_TCP
73 ${agent_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
74 Set Suite Variable ${agent_conn_id}
75 ${callhomeCmd}= Catenate ${AgentTcpCallhome} ${ODL_SYSTEM_IP}
76 Flexible Mininet Login
77 Write ${NAV_USC_TOOLS}
80 ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
81 Set Suite Variable ${echo_conn_id}
82 Flexible Mininet Login
83 Write ${NAV_USC_TOOLS}
84 Write ${EchoServerTcp}
85 Read Until initialized
88 [Documentation] Basic setup/cleanup work that can be done safely before any system
90 Log Start USC test VM for CALLHOME_UDP
91 ${agent_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
92 Set Suite Variable ${agent_conn_id}
93 ${callhomeCmd}= Catenate ${AgentUdpCallhome} ${ODL_SYSTEM_IP}
94 Flexible Mininet Login
95 Write ${NAV_USC_TOOLS}
98 ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
99 Set Suite Variable ${echo_conn_id}
100 Flexible Mininet Login
101 Write ${NAV_USC_TOOLS}
102 Write ${EchoServerUdp}
103 Read Until initialized
106 [Documentation] Basic setup/cleanup work that can be done safely before any system
108 Log Start USC test VM for Fallback_TCP
109 ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
110 Set Suite Variable ${echo_conn_id}
111 Flexible Mininet Login
112 Write ${NAV_USC_TOOLS}
113 Write ${EchoServerTcp}
114 Read Until initialized
117 [Documentation] Basic setup/cleanup work that can be done safely before any system
119 Log Start USC test VM for Fallback_TCP
120 ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
121 Set Suite Variable ${echo_conn_id}
122 Flexible Mininet Login
123 Write ${NAV_USC_TOOLS}
124 Write ${EchoServerUdp}
125 Read Until initialized
127 Start Multiple_Sessions_TCP
128 [Documentation] Basic setup/cleanup work that can be done safely before any system
130 Log Start USC test VM for Multiple_Sessions_TCP
131 ${agent_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
132 Set Suite Variable ${agent_conn_id}
133 Flexible Mininet Login
134 Write ${NAV_USC_TOOLS}
138 FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
140 ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
141 Append To List ${L1} ${echo_conn_id}
142 Flexible Mininet Login
143 Write ${NAV_USC_TOOLS}
144 Write java -jar EchoServer.jar -t true -p ${port_index}
145 Read Until initialized
147 Set Suite Variable ${L1}
149 Start Multiple_Sessions_UDP
150 [Documentation] Basic setup/cleanup work that can be done safely before any system
152 Log Start USC test VM for Multiple_Sessions_UDP
153 ${agent_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
154 Set Suite Variable ${agent_conn_id}
155 Flexible Mininet Login
156 Write ${NAV_USC_TOOLS}
160 FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
162 ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
163 Append To List ${L1} ${echo_conn_id}
164 Flexible Mininet Login
165 Write ${NAV_USC_TOOLS}
166 Write java -jar EchoServer.jar -t false -p ${port_index}
167 Read Until initialized
169 Set Suite Variable ${L1}
172 [Documentation] Cleanup/Shutdown work that should be done at the completion of all
174 Log Stop USC test VM for Agent_Echo
175 Switch Connection ${agent_conn_id}
180 Switch Connection ${echo_conn_id}
187 [Documentation] Cleanup/Shutdown work that should be done at the completion of all
189 Log Stop USC test VM for Echo
190 Switch Connection ${echo_conn_id}
196 Stop One_Agent_Multiple_Echo
197 [Documentation] Cleanup/Shutdown work that should be done at the completion of all
199 Log Stop USC test VM for One_Agent_Multiple_Echo
200 Switch Connection ${agent_conn_id}
205 FOR ${echo_conn_id} IN @{L1}
206 Switch Connection ${echo_conn_id}