{"uid":"d8cdd94c5599a601","name":"test_01_create_subnet_snat_basic[1]","fullName":"testcases.test_openapi.test_vpc.natmaoyan.test_snat.Test#test_01_create_subnet_snat_basic","historyId":"e50d765ace44cbadf6920b3d06aa0077","time":{"start":1752139022512,"stop":1752139107491,"duration":84979},"status":"failed","statusMessage":"AssertionError: check_vip: udp 36.213.210.76 30000 failed","statusTrace":"self = <test_snat.Test object at 0x7f7d87fefdd0>, fip_number = 1\n\n    @MARKER.P1\n    @pytest.mark.parametrize(\"fip_number\",\n                             [1])\n    def test_01_create_subnet_snat_basic(self, fip_number):\n        snat_rule = NETWORK.create_snat_rule(\n            nat_gateway_id=self.nat_gw.nat_gateway_id,\n            subnet_id=self.client.ports[0].ipv4_subnet_id,\n            fip_number=fip_number\n        )\n>       NATTestCommon.snat_ping_and_pass_package(client=self.client, server_fip=self.server.fip,\n                                        jump_host=self.jump_host, expect_code=0, expect_fip=snat_rule.fip,\n                                        tries=self.tries)\n\ntestcases/test_openapi/test_vpc/natmaoyan/test_snat.py:65: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \ntestcases/test_openapi/test_nat/nat_test_common.py:50: in snat_ping_and_pass_package\n    NATTestCommon.snat_pass_package(client=client, server_fip=server_fip, jump_host=jump_host, protocol='UDP',\ntestcases/test_openapi/test_nat/nat_test_common.py:36: in snat_pass_package\n    resp = check_vip(\ncasado/mytest/check.py:215: in check_vip\n    return _check_vip()\n/usr/local/lib/python3.11/site-packages/decorator.py:235: in fun\n    return caller(func, *(extras + args), **kw)\n/usr/local/lib/python3.11/site-packages/retry/api.py:73: in retry_decorator\n    return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,\n/usr/local/lib/python3.11/site-packages/retry/api.py:33: in __retry_internal\n    return f()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\n    @retry(tries=kwargs.pop(\"tries\", 1),\n           max_delay=kwargs.pop(\"max_delay\", 10),\n           delay=kwargs.pop(\"delay\", 3),\n           backoff=kwargs.pop(\"backoff\", 2),\n           # logger=kwargs.pop(\"logger\", logger)\n           exceptions=(paramiko.SSHException, socket.timeout, AssertionError))\n    def _check_vip():\n        '''\n        总体逻辑:  根据传入的参数构造不同的命令, 并根据命令的返回值和expect_code对比来验证结果\n        :param client:\n        :param vip:         loadbalancer的ip\n        :param port:        listener的port\n        :param expect_code: expect_code的值是对应linux命令的返回值, 如果为0表示命令执行成功, 为1表示命令执行失败\n        :param jump_host:   跳板机\n        :return: 命令执行结果(code, response_text)\n        '''\n        cmd = build_check_vip_cmd(\n            vip=vip, port=port, protocol=protocol,\n            sport=sport, sip=sip,\n            conn_timeout=conn_timeout,\n            client_key=client_key, client_cert=client_cert, ca_cert=ca_cert,\n            http2_enable=http2_enable, verbose=verbose,\n            **kwargs)\n    \n        if re.search(r\"\\bhttp\\b\", protocol, re.I):\n            cmd += \"\"\"| grep '301 Moved'\"\"\" if redirect else \"\"\"| grep -P '200 OK|301 Moved'\"\"\"\n        elif re.search(r\"\\bhttps\\b\", protocol, re.I):\n            if http2_enable:\n                cmd += \"| grep -P 'HTTP/2.*200|301 Moved'\"\n            else:\n                cmd += \"| grep -P '200 OK|301 Moved'\"\n    \n        resp = ssh_exec_cmd(\n            host=client, cmd=cmd,\n            jump_host=jump_host, jump_port=jump_port, ssh_port=ssh_port,\n            timeout=timeout, tries=1\n        )\n    \n        if expect_code == 0:\n>           assert int(resp[0]) == 0, f\"{_check_vip_str} failed\"\nE           AssertionError: check_vip: udp 36.213.210.76 30000 failed\n\ncasado/mytest/check.py:209: AssertionError","flaky":false,"newFailed":false,"newBroken":false,"newPassed":false,"retriesCount":0,"retriesStatusChange":false,"beforeStages":[{"name":"_xunit_setup_class_fixture_Test","time":{"start":1752138952757,"stop":1752139022512,"duration":69755},"status":"passed","steps":[],"attachments":[],"parameters":[],"stepsCount":0,"shouldDisplayMessage":false,"attachmentsCount":0,"hasContent":false,"attachmentStep":false},{"name":"_xunit_setup_method_fixture_Test","time":{"start":1752139022512,"stop":1752139022512,"duration":0},"status":"passed","steps":[],"attachments":[],"parameters":[],"stepsCount":0,"shouldDisplayMessage":false,"attachmentsCount":0,"hasContent":false,"attachmentStep":false}],"testStage":{"status":"failed","statusMessage":"AssertionError: check_vip: udp 36.213.210.76 30000 failed","statusTrace":"self = <test_snat.Test object at 0x7f7d87fefdd0>, fip_number = 1\n\n    @MARKER.P1\n    @pytest.mark.parametrize(\"fip_number\",\n                             [1])\n    def test_01_create_subnet_snat_basic(self, fip_number):\n        snat_rule = NETWORK.create_snat_rule(\n            nat_gateway_id=self.nat_gw.nat_gateway_id,\n            subnet_id=self.client.ports[0].ipv4_subnet_id,\n            fip_number=fip_number\n        )\n>       NATTestCommon.snat_ping_and_pass_package(client=self.client, server_fip=self.server.fip,\n                                        jump_host=self.jump_host, expect_code=0, expect_fip=snat_rule.fip,\n                                        tries=self.tries)\n\ntestcases/test_openapi/test_vpc/natmaoyan/test_snat.py:65: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \ntestcases/test_openapi/test_nat/nat_test_common.py:50: in snat_ping_and_pass_package\n    NATTestCommon.snat_pass_package(client=client, server_fip=server_fip, jump_host=jump_host, protocol='UDP',\ntestcases/test_openapi/test_nat/nat_test_common.py:36: in snat_pass_package\n    resp = check_vip(\ncasado/mytest/check.py:215: in check_vip\n    return _check_vip()\n/usr/local/lib/python3.11/site-packages/decorator.py:235: in fun\n    return caller(func, *(extras + args), **kw)\n/usr/local/lib/python3.11/site-packages/retry/api.py:73: in retry_decorator\n    return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,\n/usr/local/lib/python3.11/site-packages/retry/api.py:33: in __retry_internal\n    return f()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\n    @retry(tries=kwargs.pop(\"tries\", 1),\n           max_delay=kwargs.pop(\"max_delay\", 10),\n           delay=kwargs.pop(\"delay\", 3),\n           backoff=kwargs.pop(\"backoff\", 2),\n           # logger=kwargs.pop(\"logger\", logger)\n           exceptions=(paramiko.SSHException, socket.timeout, AssertionError))\n    def _check_vip():\n        '''\n        总体逻辑:  根据传入的参数构造不同的命令, 并根据命令的返回值和expect_code对比来验证结果\n        :param client:\n        :param vip:         loadbalancer的ip\n        :param port:        listener的port\n        :param expect_code: expect_code的值是对应linux命令的返回值, 如果为0表示命令执行成功, 为1表示命令执行失败\n        :param jump_host:   跳板机\n        :return: 命令执行结果(code, response_text)\n        '''\n        cmd = build_check_vip_cmd(\n            vip=vip, port=port, protocol=protocol,\n            sport=sport, sip=sip,\n            conn_timeout=conn_timeout,\n            client_key=client_key, client_cert=client_cert, ca_cert=ca_cert,\n            http2_enable=http2_enable, verbose=verbose,\n            **kwargs)\n    \n        if re.search(r\"\\bhttp\\b\", protocol, re.I):\n            cmd += \"\"\"| grep '301 Moved'\"\"\" if redirect else \"\"\"| grep -P '200 OK|301 Moved'\"\"\"\n        elif re.search(r\"\\bhttps\\b\", protocol, re.I):\n            if http2_enable:\n                cmd += \"| grep -P 'HTTP/2.*200|301 Moved'\"\n            else:\n                cmd += \"| grep -P '200 OK|301 Moved'\"\n    \n        resp = ssh_exec_cmd(\n            host=client, cmd=cmd,\n            jump_host=jump_host, jump_port=jump_port, ssh_port=ssh_port,\n            timeout=timeout, tries=1\n        )\n    \n        if expect_code == 0:\n>           assert int(resp[0]) == 0, f\"{_check_vip_str} failed\"\nE           AssertionError: check_vip: udp 36.213.210.76 30000 failed\n\ncasado/mytest/check.py:209: AssertionError","steps":[{"name":"test ping from {\"server_name\": \"wangxun-vpc0-subnet0-az0-ipv4-client0\", \"server_id\": \"5db1553d-a00b-4213-98a4-855ed43d467c\", \"az\": \"ecloud_compute_c5_zone\", \"image_name\": \"wuhan-botest-ntt-image01\", \"ec_status\": \"active\", \"op_status\": \"OK\", \"server_type\": \"VM\", \"region\": \"S027-HB-WHJX01\", \"visible\": true, \"ports\": [{\"port_name\": \"port023057\", \"port_id\": \"25dbe6fe-6f1a-4a45-815f-04099fabba7e\", \"vpc_id\": \"7f8b19ecdb0144c88a692d094cc966a1\", \"router_id\": \"33412d83-d63c-4728-b19c-5f0bd586d196\", \"network_id\": null, \"mac_addr\": null, \"ipv6\": \"2409:8c85:4c00:a56:cf87:9995:9113:454d\", \"ipv6_subnet_id\": \"11759b55-4c2c-4061-8570-a0a8e11801e6\", \"ipv4\": \"192.168.0.7\", \"ipv4_subnet_id\": \"bb6ee8d8-4bfa-448e-973e-641bb1860ce4\", \"fip\": null, \"fip_id\": null, \"fip_bandwidth_id\": null, \"ipv6_bandwidth_id\": null, \"res_type\": null, \"res_id\": null}], \"fip\": null, \"fip_id\": null, \"ipv4\": \"192.168.0.7\", \"ipv6\": \"2409:8c85:4c00:a56:cf87:9995:9113:454d\"} to 36.213.210.76 with protocol ICMP","time":{"start":1752139022693,"stop":1752139024526,"duration":1833},"status":"passed","steps":[],"attachments":[],"parameters":[],"stepsCount":0,"shouldDisplayMessage":false,"attachmentsCount":0,"hasContent":false,"attachmentStep":false},{"name":"test send package from {\"server_name\": \"wangxun-vpc0-subnet0-az0-ipv4-client0\", \"server_id\": \"5db1553d-a00b-4213-98a4-855ed43d467c\", \"az\": \"ecloud_compute_c5_zone\", \"image_name\": \"wuhan-botest-ntt-image01\", \"ec_status\": \"active\", \"op_status\": \"OK\", \"server_type\": \"VM\", \"region\": \"S027-HB-WHJX01\", \"visible\": true, \"ports\": [{\"port_name\": \"port023057\", \"port_id\": \"25dbe6fe-6f1a-4a45-815f-04099fabba7e\", \"vpc_id\": \"7f8b19ecdb0144c88a692d094cc966a1\", \"router_id\": \"33412d83-d63c-4728-b19c-5f0bd586d196\", \"network_id\": null, \"mac_addr\": null, \"ipv6\": \"2409:8c85:4c00:a56:cf87:9995:9113:454d\", \"ipv6_subnet_id\": \"11759b55-4c2c-4061-8570-a0a8e11801e6\", \"ipv4\": \"192.168.0.7\", \"ipv4_subnet_id\": \"bb6ee8d8-4bfa-448e-973e-641bb1860ce4\", \"fip\": null, \"fip_id\": null, \"fip_bandwidth_id\": null, \"ipv6_bandwidth_id\": null, \"res_type\": null, \"res_id\": null}], \"fip\": null, \"fip_id\": null, \"ipv4\": \"192.168.0.7\", \"ipv6\": \"2409:8c85:4c00:a56:cf87:9995:9113:454d\"} to 36.213.210.76 with protocol UDP","time":{"start":1752139024526,"stop":1752139107489,"duration":82963},"status":"failed","statusMessage":"AssertionError: check_vip: udp 36.213.210.76 30000 failed\n","statusTrace":"  File \"/root/network_test/testcases/test_openapi/test_nat/nat_test_common.py\", line 36, in snat_pass_package\n    resp = check_vip(\n           ^^^^^^^^^^\n  File \"/root/network_test/casado/mytest/check.py\", line 215, in check_vip\n    return _check_vip()\n           ^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/decorator.py\", line 235, in fun\n    return caller(func, *(extras + args), **kw)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/retry/api.py\", line 73, in retry_decorator\n    return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/retry/api.py\", line 33, in __retry_internal\n    return f()\n           ^^^\n  File \"/root/network_test/casado/mytest/check.py\", line 209, in _check_vip\n    assert int(resp[0]) == 0, f\"{_check_vip_str} failed\"\n           ^^^^^^^^^^^^^^^^^\n","steps":[],"attachments":[],"parameters":[],"stepsCount":0,"shouldDisplayMessage":true,"attachmentsCount":0,"hasContent":true,"attachmentStep":false}],"attachments":[{"uid":"4a20663d5599f7c6","name":"log","source":"4a20663d5599f7c6.txt","type":"text/plain","size":1192}],"parameters":[],"stepsCount":2,"shouldDisplayMessage":true,"attachmentsCount":1,"hasContent":true,"attachmentStep":false},"afterStages":[{"name":"_xunit_setup_class_fixture_Test::0","time":{"start":1752139107552,"stop":1752139107552,"duration":0},"status":"passed","steps":[],"attachments":[],"parameters":[],"stepsCount":0,"shouldDisplayMessage":false,"attachmentsCount":0,"hasContent":false,"attachmentStep":false},{"name":"_xunit_setup_method_fixture_Test::0","time":{"start":1752139107552,"stop":1752139107552,"duration":0},"status":"passed","steps":[],"attachments":[],"parameters":[],"stepsCount":0,"shouldDisplayMessage":false,"attachmentsCount":0,"hasContent":false,"attachmentStep":false}],"labels":[{"name":"tag","value":"P1"},{"name":"parentSuite","value":"testcases.test_openapi.test_vpc.natmaoyan"},{"name":"suite","value":"test_snat"},{"name":"subSuite","value":"Test"},{"name":"host","value":"iZf8z5u2o6lm2ylxlhxq9cZ"},{"name":"thread","value":"299088-MainThread"},{"name":"framework","value":"pytest"},{"name":"language","value":"cpython3"},{"name":"package","value":"testcases.test_openapi.test_vpc.natmaoyan.test_snat"},{"name":"resultFormat","value":"allure2"}],"parameters":[{"name":"fip_number","value":"1"}],"links":[],"hidden":false,"retry":false,"extra":{"severity":"normal","retries":[],"categories":[{"name":"Product defects","matchedStatuses":["failed"],"flaky":false}],"tags":["P1"]},"source":"d8cdd94c5599a601.json","parameterValues":["1"]}