From 179b0dad1ac8a60ca0b5e465f08ce36dd0a06f5b Mon Sep 17 00:00:00 2001 From: yaqiangz Date: Fri, 6 Dec 2024 04:47:06 +0000 Subject: [PATCH] Fix cmts --- ansible/password.txt | 1 + ansible/secrets.json | 0 spytest/spytest/temp.py | 23 +++++++++++++++++++++++ tests/dhcp_relay/conftest.py | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ansible/password.txt create mode 100644 ansible/secrets.json create mode 100644 spytest/spytest/temp.py diff --git a/ansible/password.txt b/ansible/password.txt new file mode 100644 index 00000000000..8baef1b4abc --- /dev/null +++ b/ansible/password.txt @@ -0,0 +1 @@ +abc diff --git a/ansible/secrets.json b/ansible/secrets.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/spytest/spytest/temp.py b/spytest/spytest/temp.py new file mode 100644 index 00000000000..a729057b74f --- /dev/null +++ b/spytest/spytest/temp.py @@ -0,0 +1,23 @@ +import re + +strs = """ +ip prefix-list LOOPBACK0_V4 seq 15 permit 3.3.3.3/32 + +ip prefix-list RR-BLOCK-LIST-IPV4 + seq 10 permit 1.1.1.1/32 + seq 20 permit 2.2.2.2/32 + seq 30 permit 0.0.0.0/32 +sadfasdfasdf +asdfasdfasdf +ip prefix-list RR-BLOCK-LIST-IPV4 seq 5 permit 10.3.149.113/32 +ip prefix-list RR-BLOCK-LIST-IPV4 seq 15 permit 4.4.4.4/32 +""" + +# res = re.findall(r"(ip prefix-list RR-BLOCK-LIST-IPV4)\n*(\s*seq \d+ permit (.*))*", strs) +# for line in res: +# print(line) +# print(line[2]) +res = re.findall(r"((ip prefix-list RR-BLOCK-LIST-IPV4(\n\s*seq \d+ permit .*){1,})|ip prefix-list RR-BLOCK-LIST-IPV4.*)", strs) +for line in res: + new = re.findall(r"(\d+\..*)", line[0]) + print(new) diff --git a/tests/dhcp_relay/conftest.py b/tests/dhcp_relay/conftest.py index 10f5266d183..7a974767918 100644 --- a/tests/dhcp_relay/conftest.py +++ b/tests/dhcp_relay/conftest.py @@ -149,7 +149,7 @@ def validate_dut_routes_exist(duthosts, rand_one_dut_hostname, dut_dhcp_relay_da py_assert(wait_until(120, 5, 0, check_routes_to_dhcp_server, duthosts[rand_one_dut_hostname], dut_dhcp_relay_data), "Packets relayed to DHCP server should go through default route via upstream neighbor, but now it's" + - " going through mgmt interface, which means device is in a unhealthy status") + " going through mgmt interface, which means device is in an unhealthy status") @pytest.fixture(scope="module")