Fix flake8 warnings
Change-Id: I1c1d65f5585833a9db9d1313933dc205b5890e08
diff --git a/tcp_tests/managers/underlay_ssh_manager.py b/tcp_tests/managers/underlay_ssh_manager.py
index 6b5bebb..3fa05a4 100644
--- a/tcp_tests/managers/underlay_ssh_manager.py
+++ b/tcp_tests/managers/underlay_ssh_manager.py
@@ -414,38 +414,40 @@
# Prefix each '$' symbol with backslash '\' to disable
# early interpolation of environment variables on cfg01 node only
dump_commands = (
- "mkdir /root/\$(hostname -f)/;"
- "rsync -aruv /var/log/ /root/\$(hostname -f)/;"
- "dpkg -l > /root/\$(hostname -f)/dump_dpkg_l.txt;"
- "df -h > /root/\$(hostname -f)/dump_df.txt;"
- "mount > /root/\$(hostname -f)/dump_mount.txt;"
- "blkid -o list > /root/\$(hostname -f)/dump_blkid_o_list.txt;"
- "iptables -t nat -S > /root/\$(hostname -f)/dump_iptables_nat.txt;"
- "iptables -S > /root/\$(hostname -f)/dump_iptables.txt;"
- "ps auxwwf > /root/\$(hostname -f)/dump_ps.txt;"
- "docker images > /root/\$(hostname -f)/dump_docker_images.txt;"
- "docker ps > /root/\$(hostname -f)/dump_docker_ps.txt;"
- "docker service ls > "
- " /root/\$(hostname -f)/dump_docker_services_ls.txt;"
- "for SERVICE in \$(docker service ls | awk '{ print \$2 }'); "
- " do docker service ps --no-trunc 2>&1 \$SERVICE >> "
- " /root/\$(hostname -f)/dump_docker_service_ps.txt;"
- " done;"
- "for SERVICE in \$(docker service ls | awk '{ print \$2 }'); "
- " do timeout 30 docker service logs --no-trunc 2>&1 \$SERVICE > "
- " /root/\$(hostname -f)/dump_docker_service_\${SERVICE}_logs;"
- " done;"
- "vgdisplay > /root/\$(hostname -f)/dump_vgdisplay.txt;"
- "lvdisplay > /root/\$(hostname -f)/dump_lvdisplay.txt;"
- "ip a > /root/\$(hostname -f)/dump_ip_a.txt;"
- "ip r > /root/\$(hostname -f)/dump_ip_r.txt;"
- "netstat -anp > /root/\$(hostname -f)/dump_netstat.txt;"
- "brctl show > /root/\$(hostname -f)/dump_brctl_show.txt;"
- "arp -an > /root/\$(hostname -f)/dump_arp.txt;"
- "uname -a > /root/\$(hostname -f)/dump_uname_a.txt;"
- "lsmod > /root/\$(hostname -f)/dump_lsmod.txt;"
- "cat /proc/interrupts > /root/\$(hostname -f)/dump_interrupts.txt;"
- "cat /etc/*-release > /root/\$(hostname -f)/dump_release.txt;"
+ r"mkdir /root/\$(hostname -f)/;"
+ r"rsync -aruv /var/log/ /root/\$(hostname -f)/;"
+ r"dpkg -l > /root/\$(hostname -f)/dump_dpkg_l.txt;"
+ r"df -h > /root/\$(hostname -f)/dump_df.txt;"
+ r"mount > /root/\$(hostname -f)/dump_mount.txt;"
+ r"blkid -o list > /root/\$(hostname -f)/dump_blkid_o_list.txt;"
+ r"iptables -t nat -S > "
+ r" /root/\$(hostname -f)/dump_iptables_nat.txt;"
+ r"iptables -S > /root/\$(hostname -f)/dump_iptables.txt;"
+ r"ps auxwwf > /root/\$(hostname -f)/dump_ps.txt;"
+ r"docker images > /root/\$(hostname -f)/dump_docker_images.txt;"
+ r"docker ps > /root/\$(hostname -f)/dump_docker_ps.txt;"
+ r"docker service ls > "
+ r" /root/\$(hostname -f)/dump_docker_services_ls.txt;"
+ r"for SERVICE in \$(docker service ls | awk '{ print \$2 }'); "
+ r" do docker service ps --no-trunc 2>&1 \$SERVICE >> "
+ r" /root/\$(hostname -f)/dump_docker_service_ps.txt;"
+ r" done;"
+ r"for SERVICE in \$(docker service ls | awk '{ print \$2 }'); "
+ r" do timeout 30 docker service logs --no-trunc 2>&1 \$SERVICE > "
+ r" /root/\$(hostname -f)/dump_docker_service_\${SERVICE}_logs;"
+ r" done;"
+ r"vgdisplay > /root/\$(hostname -f)/dump_vgdisplay.txt;"
+ r"lvdisplay > /root/\$(hostname -f)/dump_lvdisplay.txt;"
+ r"ip a > /root/\$(hostname -f)/dump_ip_a.txt;"
+ r"ip r > /root/\$(hostname -f)/dump_ip_r.txt;"
+ r"netstat -anp > /root/\$(hostname -f)/dump_netstat.txt;"
+ r"brctl show > /root/\$(hostname -f)/dump_brctl_show.txt;"
+ r"arp -an > /root/\$(hostname -f)/dump_arp.txt;"
+ r"uname -a > /root/\$(hostname -f)/dump_uname_a.txt;"
+ r"lsmod > /root/\$(hostname -f)/dump_lsmod.txt;"
+ r"cat /proc/interrupts > "
+ r" /root/\$(hostname -f)/dump_interrupts.txt;"
+ r"cat /etc/*-release > /root/\$(hostname -f)/dump_release.txt;"
# OpenStack specific, will fail on other nodes
# "rabbitmqctl report > "
# " /root/\$(hostname -f)/dump_rabbitmqctl.txt;"
@@ -466,12 +468,12 @@
# " do echo Namespace: \${ns}; ip netns exec \${ns} netstat -anp;"
# "done > /root/\$(hostname -f)/dump_netstat_ns.txt;"
- "/usr/bin/haproxy-status.sh > "
- " /root/\$(hostname -f)/dump_haproxy.txt;"
+ r"/usr/bin/haproxy-status.sh > "
+ r" /root/\$(hostname -f)/dump_haproxy.txt;"
# Archive the files
- "cd /root/; tar --absolute-names --warning=no-file-changed "
- " -czf \$(hostname -f).tar.gz ./\$(hostname -f)/;"
+ r"cd /root/; tar --absolute-names --warning=no-file-changed "
+ r" -czf \$(hostname -f).tar.gz ./\$(hostname -f)/;"
)
master_host = self.__config.salt.salt_master_host