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
146 Set Suite Variable ${L1}
148 Start Multiple_Sessions_UDP
149 [Documentation] Basic setup/cleanup work that can be done safely before any system
151 Log Start USC test VM for Multiple_Sessions_UDP
152 ${agent_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
153 Set Suite Variable ${agent_conn_id}
154 Flexible Mininet Login
155 Write ${NAV_USC_TOOLS}
159 : FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
161 \ ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
162 \ Append To List ${L1} ${echo_conn_id}
163 \ Flexible Mininet Login
164 \ Write ${NAV_USC_TOOLS}
165 \ Write java -jar EchoServer.jar -t false -p ${port_index}
166 \ Read Until initialized
167 Set Suite Variable ${L1}
170 [Documentation] Cleanup/Shutdown work that should be done at the completion of all
172 Log Stop USC test VM for Agent_Echo
173 Switch Connection ${agent_conn_id}
178 Switch Connection ${echo_conn_id}
185 [Documentation] Cleanup/Shutdown work that should be done at the completion of all
187 Log Stop USC test VM for Echo
188 Switch Connection ${echo_conn_id}
194 Stop One_Agent_Multiple_Echo
195 [Documentation] Cleanup/Shutdown work that should be done at the completion of all
197 Log Stop USC test VM for One_Agent_Multiple_Echo
198 Switch Connection ${agent_conn_id}
203 : FOR ${echo_conn_id} IN @{L1}
204 \ Switch Connection ${echo_conn_id}