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

[minigraph-parser] Support ACL interface type BmcData in minigraph parser #14703

Merged
merged 6 commits into from
Apr 26, 2023

Conversation

lizhijianrd
Copy link
Contributor

@lizhijianrd lizhijianrd commented Apr 18, 2023

Why I did it

Support ACL interface type BmcData in minigraph parser.

Work item tracking
  • Microsoft ADO (number only): 17695886

How I did it

If BmcData appears in minigraph:

  1. Create custom ACL table type BMCDATA or BMCDATAV6 (depends on whether ACL table name contains 'v6`) in config DB.
  2. Create ACL table.

How to verify it

  1. Built marvell-armhf image and verified on Nokia-7215 platform.
  2. Add unittest to verify this new feature.
$ pytest-3 -v test_minigraph_case.py
===================================================================== test session starts ======================================================================
platform linux -- Python 3.9.2, pytest-6.0.2, py-1.10.0, pluggy-0.13.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /sonic/src/sonic-config-engine
plugins: pyfakefs-5.2.2, cov-2.10.1
collected 41 items

test_minigraph_case.py::TestCfgGenCaseInsensitive::test_additional_json_data PASSED                                                                      [  2%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_dhcp_table PASSED                                                                                [  4%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_dummy_run PASSED                                                                                 [  7%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_jinja_expression PASSED                                                                          [  9%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_metadata_kube PASSED                                                                             [ 12%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_metadata_ntp PASSED                                                                              [ 14%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_metadata_tacacs PASSED                                                                           [ 17%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_acl_attach_to_ports PASSED                                                             [ 19%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_acl_type_bmcdata PASSED                                                                [ 21%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_bgp_mon PASSED                                                                         [ 24%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_cluster PASSED                                                                         [ 26%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_console_mgmt_feature PASSED                                                            [ 29%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_console_port PASSED                                                                    [ 31%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_deployment_id PASSED                                                                   [ 34%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_dhcp_server_feature PASSED                                                             [ 36%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_interfaces PASSED                                                                      [ 39%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_mgmt_port PASSED                                                                       [ 41%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_mirror_dscp PASSED                                                                     [ 43%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_mux_cable_table PASSED                                                                 [ 46%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_neighbor_metadata PASSED                                                               [ 48%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_peer_switch PASSED                                                                     [ 51%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_peer_switch_hostname PASSED                                                            [ 53%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_portchannels PASSED                                                                    [ 56%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_sku PASSED                                                                             [ 58%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_storage_backend_no_resource_type PASSED                                                [ 60%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_storage_backend_resource_type PASSED                                                   [ 63%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_storage_backend_subintf PASSED                                                         [ 65%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_storage_device PASSED                                                                  [ 68%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_subtype PASSED                                                                         [ 70%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_tunnel_table PASSED                                                                    [ 73%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vlan_interfaces PASSED                                                                 [ 75%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vlan_interfaces_keys PASSED                                                            [ 78%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vlan_members PASSED                                                                    [ 80%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vlans PASSED                                                                           [ 82%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vnet PASSED                                                                            [ 85%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vxlan PASSED                                                                           [ 87%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_mux_cable_parsing PASSED                                                                         [ 90%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_parse_device_desc_xml_mgmt_interface PASSED                                                      [ 92%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_print_data PASSED                                                                                [ 95%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_read_yaml PASSED                                                                                 [ 97%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_render_template PASSED                                                                           [100%]

===================================================================== 41 passed in 18.94s ======================================================================

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Tested branch (Please provide the tested image version)

  • 202205

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Blueve
Blueve previously approved these changes Apr 19, 2023
@Blueve
Copy link
Contributor

Blueve commented Apr 19, 2023

LGTM.
@bingwang-ms can you help review this PR as well?

@Blueve
Copy link
Contributor

Blueve commented Apr 25, 2023

@yxieca can you help merge this pr?

@yxieca yxieca merged commit 77728f5 into sonic-net:master Apr 26, 2023
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request May 8, 2023
…rser (sonic-net#14703)

* Support ACL interface type BmcData in minigraph parser

* Support ACL interface type BmcData in minigraph parser

* add unittest

* Add a global dict for storing the defination of custom acl tables
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202205: #14980

mssonicbld pushed a commit that referenced this pull request May 16, 2023
…rser (#14703)

* Support ACL interface type BmcData in minigraph parser

* Support ACL interface type BmcData in minigraph parser

* add unittest

* Add a global dict for storing the defination of custom acl tables
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.

5 participants