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

Parse backend switches to vlan sub port interface #3413

Merged
merged 7 commits into from
Oct 17, 2019

Conversation

wendani
Copy link
Contributor

@wendani wendani commented Sep 5, 2019

- What I did

- How I did it

- How to verify it
On brcm dut

    "VLAN_SUB_INTERFACE": {
        "Ethernet88.10": {
            "admin_status": "up"
        },
        "Ethernet92.10": {
            "admin_status": "up"
        },
        "Ethernet96.10": {
            "admin_status": "up"
        },
        "Ethernet100.10": {
            "admin_status": "up"
        },
        "Ethernet104.10": {
            "admin_status": "up"
        },
        "Ethernet108.10": {
            "admin_status": "up"
        },
        "Ethernet112.10": {
            "admin_status": "up"
        },
        "Ethernet116.10": {
            "admin_status": "up"
        },
        "Ethernet120.10": {
            "admin_status": "up"
        },
        "Ethernet124.10": {
            "admin_status": "up"
        },
        "Ethernet88.10|172.16.8.13/31": {},
        "Ethernet92.10|172.16.8.141/31": {},
        "Ethernet96.10|172.16.9.13/31": {},
        "Ethernet100.10|172.16.9.141/31": {},
        "Ethernet104.10|172.16.10.13/31": {},
        "Ethernet108.10|172.16.10.141/31": {},
        "Ethernet112.10|172.16.11.13/31": {},
        "Ethernet116.10|172.16.11.141/31": {},
        "Ethernet120.10|172.16.12.13/31": {},
        "Ethernet124.10|172.16.12.141/31": {}
    },


        "Ethernet88": {
            "index": "27", 
            "lanes": "121,122,123,124", 
            "description": "SYD03-0102-0401-01BT1:Ethernet8/1", 
            "pfc_asym": "off", 
            "mtu": "9100", 
            "alias": "Ethernet27/1", 
            "admin_status": "up", 
            "speed": "40000"
        }, 
        "Ethernet92": {
            "index": "28", 
            "lanes": "125,126,127,128", 
            "description": "SYD03-0102-0401-02BT1:Ethernet8/1", 
            "pfc_asym": "off", 
            "mtu": "9100", 
            "alias": "Ethernet28/1", 
            "admin_status": "up", 
            "speed": "40000"
        }, 

        "Ethernet120": {
            "index": "35", 
            "lanes": "1,2,3,4", 
            "description": "SYD03-0102-0401-09BT1:Ethernet8/1", 
            "pfc_asym": "off", 
            "mtu": "9100", 
            "alias": "Ethernet35", 
            "admin_status": "up", 
            "speed": "40000"
        }, 
        "Ethernet124": {
            "index": "36", 
            "lanes": "5,6,7,8", 
            "description": "SYD03-0102-0401-10BT1:Ethernet8/1", 
            "pfc_asym": "off", 
            "mtu": "9100", 
            "alias": "Ethernet36", 
            "admin_status": "up", 
            "speed": "40000"
        }

In sonic-cfggen unit test:

$ pytest test_cfggen.py::TestCfgGen::test_minigraph_sub_port_interfaces   
====================================================================== test session starts ======================================================================
platform linux2 -- Python 2.7.12, pytest-3.3.0, py-1.7.0, pluggy-0.6.0
rootdir: /home/localadmin/190607/sonic-buildimage/src/sonic-config-engine, inifile:
collected 1 item                                                                                                                                                

test_cfggen.py .                                                                                                                                          [100%]

=================================================================== 1 passed in 3.61 seconds ====================================================================
    "VLAN_SUB_INTERFACE": {
        "Ethernet0.10": {
            "admin_status": "up"
        }, 
        "PortChannel01.10": {
            "admin_status": "up"
        }, 
        "Ethernet0.10|10.0.0.58/31": {}, 
        "Ethernet0.10|FC00::75/126": {}, 
        "PortChannel01.10|10.0.0.56/31": {}, 
        "PortChannel01.10|FC00::71/126": {}
    }

- Description for the changelog

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

Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
@lguohan
Copy link
Collaborator

lguohan commented Sep 6, 2019

please add unit test in sonic-cfggen accordingly.

Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add unit test in sonic-cfggen

@wendani wendani requested a review from lguohan September 14, 2019 00:16
@wendani
Copy link
Contributor Author

wendani commented Sep 14, 2019

Added #3413 (review)

Signed-off-by: Wenda Ni <wenni@microsoft.com>
@wendani wendani requested a review from qiluo-msft September 16, 2019 18:15
@lguohan
Copy link
Collaborator

lguohan commented Oct 16, 2019

can you consoliate the sub interface transformation in one place. once you caculate the phy interface and port channel, then change them to sub interfaces.

@wendani
Copy link
Contributor Author

wendani commented Oct 16, 2019

Done #3413 (comment)

@wendani wendani requested a review from lguohan October 16, 2019 22:13
@wendani
Copy link
Contributor Author

wendani commented Oct 16, 2019

retest vs please

Signed-off-by: Wenda Ni <wenni@microsoft.com>
@wendani wendani requested review from baiwei0427 and aiwen19 and removed request for aiwen19 October 17, 2019 06:33
@lguohan lguohan merged commit d1c4deb into sonic-net:master Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants