Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backend] [vlan] Update acl template based on test ports #6686

Merged
merged 3 commits into from
Nov 4, 2022

Conversation

neethajohn
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

What is the motivation for this PR?

For storage backend, new backend acl was added (sonic-net/sonic-utilities#2236). This caused regression for vlan testcases running on 't0-backend' topology. Modified the testcase to update the acl template based on the selected test ports

How did you do it?

Created common helpers to update the acl template and used them in 'test_vlan.py' for 't0-backend' topology

How did you verify/test it?

Ran 'test_vlan.py' with the changes and all cases passed

============================= test session starts ==============================
platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/nejo_n/sonic-mgmt-int/tests, inifile: pytest.ini
plugins: forked-1.3.0, metadata-1.11.0, xdist-1.28.0, html-1.22.1, repeat-0.9.1, allure-pytest-2.8.22, ansible-2.2.2
collecting ... /usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature
collected 7 items                                                              

vlan/test_vlan.py::test_vlan_tc1_send_untagged PASSED                    [ 14%]
vlan/test_vlan.py::test_vlan_tc2_send_tagged PASSED                      [ 28%]
vlan/test_vlan.py::test_vlan_tc3_send_invalid_vid PASSED                 [ 42%]
vlan/test_vlan.py::test_vlan_tc4_tagged_unicast PASSED                   [ 57%]
vlan/test_vlan.py::test_vlan_tc5_untagged_unicast PASSED                 [ 71%]
vlan/test_vlan.py::test_vlan_tc6_tagged_untagged_unicast PASSED          [ 85%]
vlan/test_vlan.py::test_vlan_tc7_tagged_qinq_switch_on_outer_tag SKIPPED [100%]

Signed-off-by: Neetha John <nejo@microsoft.com>
Signed-off-by: Neetha John <nejo@microsoft.com>
@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/common/helpers/backend_acl.py:8:1: E302 expected 2 blank lines, found 1
tests/vlan/test_vlan.py:11:1: F401 'tests.common.fixtures.ptfhost_utils.change_mac_addresses' imported but unused
tests/vlan/test_vlan.py:12:1: F401 'tests.common.dualtor.mux_simulator_control.toggle_all_simulator_ports_to_rand_selected_tor_m' imported but unused
tests/vlan/test_vlan.py:12:121: E501 line too long (130 > 120 characters)
tests/vlan/test_vlan.py:15:1: F401 'tests.common.fixtures.duthost_utils.ports_list' imported but unused
tests/vlan/test_vlan.py:15:1: F401 'tests.common.fixtures.duthost_utils.utils_vlan_ports_list' imported but unused
tests/vlan/test_vlan.py:17:1: F401 'tests.common.fixtures.duthost_utils.utils_vlan_intfs_dict_orig' imported but unused
tests/vlan/test_vlan.py:39:1: E302 expected 2 blank lines, found 1
tests/vlan/test_vlan.py:40:29: F811 redefinition of unused 'utils_vlan_intfs_dict_orig' from line 17
tests/vlan/test_vlan.py:54:64: F811 redefinition of unused 'ports_list' from line 15
tests/vlan/test_vlan.py:54:76: F811 redefinition of unused 'utils_vlan_ports_list' from line 15
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

Signed-off-by: Neetha John <nejo@microsoft.com>
@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/common/helpers/backend_acl.py:8:1: E302 expected 2 blank lines, found 1
tests/vlan/test_vlan.py:11:1: F401 'tests.common.fixtures.ptfhost_utils.change_mac_addresses' imported but unused
tests/vlan/test_vlan.py:12:1: F401 'tests.common.dualtor.mux_simulator_control.toggle_all_simulator_ports_to_rand_selected_tor_m' imported but unused
tests/vlan/test_vlan.py:12:121: E501 line too long (130 > 120 characters)
tests/vlan/test_vlan.py:15:1: F401 'tests.common.fixtures.duthost_utils.ports_list' imported but unused
tests/vlan/test_vlan.py:15:1: F401 'tests.common.fixtures.duthost_utils.utils_vlan_ports_list' imported but unused
tests/vlan/test_vlan.py:17:1: F401 'tests.common.fixtures.duthost_utils.utils_vlan_intfs_dict_orig' imported but unused
tests/vlan/test_vlan.py:39:1: E302 expected 2 blank lines, found 1
tests/vlan/test_vlan.py:40:29: F811 redefinition of unused 'utils_vlan_intfs_dict_orig' from line 17
tests/vlan/test_vlan.py:54:64: F811 redefinition of unused 'ports_list' from line 15
tests/vlan/test_vlan.py:54:76: F811 redefinition of unused 'utils_vlan_ports_list' from line 15
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@neethajohn
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/common/helpers/backend_acl.py:8:1: E302 expected 2 blank lines, found 1
tests/vlan/test_vlan.py:11:1: F401 'tests.common.fixtures.ptfhost_utils.change_mac_addresses' imported but unused
tests/vlan/test_vlan.py:12:1: F401 'tests.common.dualtor.mux_simulator_control.toggle_all_simulator_ports_to_rand_selected_tor_m' imported but unused
tests/vlan/test_vlan.py:12:121: E501 line too long (130 > 120 characters)
tests/vlan/test_vlan.py:15:1: F401 'tests.common.fixtures.duthost_utils.ports_list' imported but unused
tests/vlan/test_vlan.py:15:1: F401 'tests.common.fixtures.duthost_utils.utils_vlan_ports_list' imported but unused
tests/vlan/test_vlan.py:17:1: F401 'tests.common.fixtures.duthost_utils.utils_vlan_intfs_dict_orig' imported but unused
tests/vlan/test_vlan.py:39:1: E302 expected 2 blank lines, found 1
tests/vlan/test_vlan.py:40:29: F811 redefinition of unused 'utils_vlan_intfs_dict_orig' from line 17
tests/vlan/test_vlan.py:54:64: F811 redefinition of unused 'ports_list' from line 15
tests/vlan/test_vlan.py:54:76: F811 redefinition of unused 'utils_vlan_ports_list' from line 15
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@neethajohn
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/common/helpers/backend_acl.py:8:1: E302 expected 2 blank lines, found 1
tests/vlan/test_vlan.py:11:1: F401 'tests.common.fixtures.ptfhost_utils.change_mac_addresses' imported but unused
tests/vlan/test_vlan.py:12:1: F401 'tests.common.dualtor.mux_simulator_control.toggle_all_simulator_ports_to_rand_selected_tor_m' imported but unused
tests/vlan/test_vlan.py:12:121: E501 line too long (130 > 120 characters)
tests/vlan/test_vlan.py:15:1: F401 'tests.common.fixtures.duthost_utils.ports_list' imported but unused
tests/vlan/test_vlan.py:15:1: F401 'tests.common.fixtures.duthost_utils.utils_vlan_ports_list' imported but unused
tests/vlan/test_vlan.py:17:1: F401 'tests.common.fixtures.duthost_utils.utils_vlan_intfs_dict_orig' imported but unused
tests/vlan/test_vlan.py:39:1: E302 expected 2 blank lines, found 1
tests/vlan/test_vlan.py:40:29: F811 redefinition of unused 'utils_vlan_intfs_dict_orig' from line 17
tests/vlan/test_vlan.py:54:64: F811 redefinition of unused 'ports_list' from line 15
tests/vlan/test_vlan.py:54:76: F811 redefinition of unused 'utils_vlan_ports_list' from line 15
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@neethajohn neethajohn merged commit 2b7b0ae into sonic-net:master Nov 4, 2022
@neethajohn neethajohn deleted the vlan_test_update branch November 4, 2022 21:03
wangxin pushed a commit that referenced this pull request Nov 7, 2022
Signed-off-by: Neetha John <nejo@microsoft.com>

What is the motivation for this PR?
For storage backend, new backend acl was added (sonic-net/sonic-utilities#2236). This caused regression for vlan testcases running on 't0-backend' topology. Modified the testcase to update the acl template based on the selected test ports

How did you do it?
Created common helpers to update the acl template and used them in 'test_vlan.py' for 't0-backend' topology

How did you verify/test it?
Ran 'test_vlan.py' with the changes and all cases passed

============================= test session starts ==============================
platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/nejo_n/sonic-mgmt-int/tests, inifile: pytest.ini
plugins: forked-1.3.0, metadata-1.11.0, xdist-1.28.0, html-1.22.1, repeat-0.9.1, allure-pytest-2.8.22, ansible-2.2.2
collecting ... /usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature
collected 7 items                                                              

vlan/test_vlan.py::test_vlan_tc1_send_untagged PASSED                    [ 14%]
vlan/test_vlan.py::test_vlan_tc2_send_tagged PASSED                      [ 28%]
vlan/test_vlan.py::test_vlan_tc3_send_invalid_vid PASSED                 [ 42%]
vlan/test_vlan.py::test_vlan_tc4_tagged_unicast PASSED                   [ 57%]
vlan/test_vlan.py::test_vlan_tc5_untagged_unicast PASSED                 [ 71%]
vlan/test_vlan.py::test_vlan_tc6_tagged_untagged_unicast PASSED          [ 85%]
vlan/test_vlan.py::test_vlan_tc7_tagged_qinq_switch_on_outer_tag SKIPPED [100%]
wangxin pushed a commit that referenced this pull request Nov 7, 2022
Signed-off-by: Neetha John <nejo@microsoft.com>

What is the motivation for this PR?
For storage backend, new backend acl was added (sonic-net/sonic-utilities#2236). This caused regression for vlan testcases running on 't0-backend' topology. Modified the testcase to update the acl template based on the selected test ports

How did you do it?
Created common helpers to update the acl template and used them in 'test_vlan.py' for 't0-backend' topology

How did you verify/test it?
Ran 'test_vlan.py' with the changes and all cases passed

============================= test session starts ==============================
platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/nejo_n/sonic-mgmt-int/tests, inifile: pytest.ini
plugins: forked-1.3.0, metadata-1.11.0, xdist-1.28.0, html-1.22.1, repeat-0.9.1, allure-pytest-2.8.22, ansible-2.2.2
collecting ... /usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature
collected 7 items                                                              

vlan/test_vlan.py::test_vlan_tc1_send_untagged PASSED                    [ 14%]
vlan/test_vlan.py::test_vlan_tc2_send_tagged PASSED                      [ 28%]
vlan/test_vlan.py::test_vlan_tc3_send_invalid_vid PASSED                 [ 42%]
vlan/test_vlan.py::test_vlan_tc4_tagged_unicast PASSED                   [ 57%]
vlan/test_vlan.py::test_vlan_tc5_untagged_unicast PASSED                 [ 71%]
vlan/test_vlan.py::test_vlan_tc6_tagged_untagged_unicast PASSED          [ 85%]
vlan/test_vlan.py::test_vlan_tc7_tagged_qinq_switch_on_outer_tag SKIPPED [100%]
neethajohn added a commit that referenced this pull request Nov 14, 2022
Signed-off-by: Neetha John <nejo@microsoft.com>

Modify sub port testcases to use common backend acl helpers added as part of #6686

How did you verify/test it?
Ran the sub port testcases with this change and all cases passed

============================= test session starts ==============================
platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/nejo_n/sonic-mgmt-int/tests, inifile: pytest.ini
plugins: forked-1.3.0, metadata-1.11.0, xdist-1.28.0, html-1.22.1, repeat-0.9.1, allure-pytest-2.8.22, ansible-2.2.2
collecting ... /usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature
collected 29 items                                                             

sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_valid_vlan[port] PASSED [  3%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_valid_vlan[port_in_lag] PASSED [  6%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_invalid_vlan[port] PASSED [ 10%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_invalid_vlan[port_in_lag] PASSED [ 13%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_untagged_packet_not_routed[port] PASSED [ 17%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_admin_status_down_disables_forwarding[port] PASSED [ 20%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_admin_status_down_disables_forwarding[port_in_lag] PASSED [ 24%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_max_numbers_of_sub_ports[port] PASSED [ 27%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_max_numbers_of_sub_ports[port_in_lag] PASSED [ 31%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_mtu_inherited_from_parent_port[port] PASSED [ 34%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_mtu_inherited_from_parent_port[port_in_lag] PASSED [ 37%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_vlan_config_impact[port] PASSED [ 41%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_vlan_config_impact[port_in_lag] PASSED [ 44%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[same-port-TCP-UDP-ICMP] PASSED [ 48%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[same-port_in_lag-TCP-UDP-ICMP] PASSED [ 51%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[different-port-TCP-UDP-ICMP] PASSED [ 55%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[different-port_in_lag-TCP-UDP-ICMP] PASSED [ 58%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[same-TCP-UDP-ICMP-PORT] PASSED [ 62%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[different-TCP-UDP-ICMP-PORT] PASSED [ 65%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[svi-port-TCP-UDP-ICMP] PASSED [ 68%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[svi-port_in_lag-TCP-UDP-ICMP] PASSED [ 72%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[l3-port-TCP-UDP-ICMP] PASSED [ 75%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[l3-port_in_lag-TCP-UDP-ICMP] PASSED [ 79%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[same-port] PASSED [ 82%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[same-port_in_lag] PASSED [ 86%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[different-port] PASSED [ 89%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[different-port_in_lag] PASSED [ 93%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_balancing_sub_ports[port] PASSED [ 96%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_balancing_sub_ports[port_in_lag] PASSED [100%]
wangxin pushed a commit that referenced this pull request Nov 15, 2022
Signed-off-by: Neetha John <nejo@microsoft.com>

Modify sub port testcases to use common backend acl helpers added as part of #6686

How did you verify/test it?
Ran the sub port testcases with this change and all cases passed

============================= test session starts ==============================
platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/nejo_n/sonic-mgmt-int/tests, inifile: pytest.ini
plugins: forked-1.3.0, metadata-1.11.0, xdist-1.28.0, html-1.22.1, repeat-0.9.1, allure-pytest-2.8.22, ansible-2.2.2
collecting ... /usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature
collected 29 items

sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_valid_vlan[port] PASSED [  3%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_valid_vlan[port_in_lag] PASSED [  6%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_invalid_vlan[port] PASSED [ 10%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_invalid_vlan[port_in_lag] PASSED [ 13%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_untagged_packet_not_routed[port] PASSED [ 17%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_admin_status_down_disables_forwarding[port] PASSED [ 20%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_admin_status_down_disables_forwarding[port_in_lag] PASSED [ 24%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_max_numbers_of_sub_ports[port] PASSED [ 27%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_max_numbers_of_sub_ports[port_in_lag] PASSED [ 31%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_mtu_inherited_from_parent_port[port] PASSED [ 34%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_mtu_inherited_from_parent_port[port_in_lag] PASSED [ 37%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_vlan_config_impact[port] PASSED [ 41%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_vlan_config_impact[port_in_lag] PASSED [ 44%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[same-port-TCP-UDP-ICMP] PASSED [ 48%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[same-port_in_lag-TCP-UDP-ICMP] PASSED [ 51%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[different-port-TCP-UDP-ICMP] PASSED [ 55%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[different-port_in_lag-TCP-UDP-ICMP] PASSED [ 58%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[same-TCP-UDP-ICMP-PORT] PASSED [ 62%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[different-TCP-UDP-ICMP-PORT] PASSED [ 65%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[svi-port-TCP-UDP-ICMP] PASSED [ 68%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[svi-port_in_lag-TCP-UDP-ICMP] PASSED [ 72%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[l3-port-TCP-UDP-ICMP] PASSED [ 75%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[l3-port_in_lag-TCP-UDP-ICMP] PASSED [ 79%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[same-port] PASSED [ 82%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[same-port_in_lag] PASSED [ 86%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[different-port] PASSED [ 89%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[different-port_in_lag] PASSED [ 93%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_balancing_sub_ports[port] PASSED [ 96%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_balancing_sub_ports[port_in_lag] PASSED [100%]
wangxin pushed a commit that referenced this pull request Nov 15, 2022
Signed-off-by: Neetha John <nejo@microsoft.com>

Modify sub port testcases to use common backend acl helpers added as part of #6686

How did you verify/test it?
Ran the sub port testcases with this change and all cases passed

============================= test session starts ==============================
platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/nejo_n/sonic-mgmt-int/tests, inifile: pytest.ini
plugins: forked-1.3.0, metadata-1.11.0, xdist-1.28.0, html-1.22.1, repeat-0.9.1, allure-pytest-2.8.22, ansible-2.2.2
collecting ... /usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature
collected 29 items                                                             

sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_valid_vlan[port] PASSED [  3%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_valid_vlan[port_in_lag] PASSED [  6%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_invalid_vlan[port] PASSED [ 10%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_packet_routed_with_invalid_vlan[port_in_lag] PASSED [ 13%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_untagged_packet_not_routed[port] PASSED [ 17%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_admin_status_down_disables_forwarding[port] PASSED [ 20%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_admin_status_down_disables_forwarding[port_in_lag] PASSED [ 24%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_max_numbers_of_sub_ports[port] PASSED [ 27%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_max_numbers_of_sub_ports[port_in_lag] PASSED [ 31%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_mtu_inherited_from_parent_port[port] PASSED [ 34%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_mtu_inherited_from_parent_port[port_in_lag] PASSED [ 37%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_vlan_config_impact[port] PASSED [ 41%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_vlan_config_impact[port_in_lag] PASSED [ 44%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[same-port-TCP-UDP-ICMP] PASSED [ 48%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[same-port_in_lag-TCP-UDP-ICMP] PASSED [ 51%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[different-port-TCP-UDP-ICMP] PASSED [ 55%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports[different-port_in_lag-TCP-UDP-ICMP] PASSED [ 58%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[same-TCP-UDP-ICMP-PORT] PASSED [ 62%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[different-TCP-UDP-ICMP-PORT] PASSED [ 65%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[svi-port-TCP-UDP-ICMP] PASSED [ 68%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[svi-port_in_lag-TCP-UDP-ICMP] PASSED [ 72%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[l3-port-TCP-UDP-ICMP] PASSED [ 75%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_and_port[l3-port_in_lag-TCP-UDP-ICMP] PASSED [ 79%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[same-port] PASSED [ 82%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[same-port_in_lag] PASSED [ 86%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[different-port] PASSED [ 89%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports[different-port_in_lag] PASSED [ 93%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_balancing_sub_ports[port] PASSED [ 96%]
sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_balancing_sub_ports[port_in_lag] PASSED [100%]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants