tests/
# Get Honeycomb log file from virl host
-# log only exists on DUT1
-for index in "${!VIRL_SERVER[@]}"; do
- scp ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:/var/log/honeycomb/honeycomb.log . || true
-done
+scp ${SSH_OPTIONS} \
+ ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true
tests/
# Get Honeycomb log file from virl host
-# log only exists on DUT1
-for index in "${!VIRL_SERVER[@]}"; do
- scp ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:/var/log/honeycomb/honeycomb.log . || true
-done
+scp ${SSH_OPTIONS} \
+ ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true
(_, stdout, _) = ssh.exec_command(cmd, timeout=30)
return stdout
+
+ @staticmethod
+ def archive_honeycomb_log(node):
+ """Copy honeycomb log file from DUT node to VIRL for archiving.
+
+ :param node: Honeycomb node.
+ :type node: dict
+ """
+
+ ssh = SSH()
+ ssh.connect(node)
+
+ cmd = "cp /var/log/honeycomb/honeycomb.log /scratch/"
+
+ ssh.exec_command_sudo(cmd)
| | Stop Honeycomb service on DUTs | ${node}
| | Clear persisted Honeycomb configuration | ${node}
| | Setup DUT | ${node}
-| | Setup Honeycomb service on DUTs | ${node}
\ No newline at end of file
+| | Setup Honeycomb service on DUTs | ${node}
+
+| Archive Honeycomb log file
+| | [Documentation] | Copy honeycomb.log file from Honeycomb node\
+| | ... | to test executor.
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Archive Honeycomb log file \| ${nudes['DUT1']} \|
+| | [Arguments] | ${node}
+| | Archive Honeycomb log | ${node}
\ No newline at end of file
| ... | Configure Log Level | ${node} | TRACE | AND
| ... | Setup Honeycomb Service On DUTs | ${node} | AND
| ... | Set Global Variable | ${node}
-| Suite Teardown | Stop Honeycomb Service On DUTs | ${node}
+| Suite Teardown | Run keywords
+| ... | Stop Honeycomb Service On DUTs | ${node} | AND
+| ... | Archive Honeycomb log file | ${node}