Skip to content

Add port alias to name map for hwsku Celestica-DX010-D48C8#7213

Merged
wangxin merged 2 commits intosonic-net:masterfrom
wangxin:dx010-hwsku-port-utils
Jan 10, 2023
Merged

Add port alias to name map for hwsku Celestica-DX010-D48C8#7213
wangxin merged 2 commits intosonic-net:masterfrom
wangxin:dx010-hwsku-port-utils

Conversation

@wangxin
Copy link
Copy Markdown
Collaborator

@wangxin wangxin commented Jan 9, 2023

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

Approach

What is the motivation for this PR?

Port alias to name map for hwsku Celestica-DX010-D48C8 is not supported in ansible/module_utils/port_utils.py.

How did you do it?

This change is to add port alias to name map for hwsku Celestica-DX010-D48C8.
This change also fixed style issues reported by pre-commit.

How did you verify/test it?

Verified that the generated port alias to name map matches /usr/share/sonic/device/x86_64-cel_seastone-r0/Celestica-DX010-D48C8/port_config.ini:

{
    "etp1a": "Ethernet0",
    "etp1b": "Ethernet2",
    "etp2a": "Ethernet4",
    "etp2b": "Ethernet6",
    "etp3a": "Ethernet8",
    "etp3b": "Ethernet10",
    "etp4a": "Ethernet12",
    "etp4b": "Ethernet14",
    "etp5a": "Ethernet16",
    "etp5b": "Ethernet18",
    "etp6a": "Ethernet20",
    "etp6b": "Ethernet22",
    "etp7a": "Ethernet24",
    "etp7b": "Ethernet26",
    "etp8a": "Ethernet28",
    "etp8b": "Ethernet30",
    "etp9a": "Ethernet32",
    "etp9b": "Ethernet34",
    "etp10a": "Ethernet36",
    "etp10b": "Ethernet38",
    "etp11": "Ethernet40",
    "etp12": "Ethernet44",
    "etp13": "Ethernet48",
    "etp14": "Ethernet52",
    "etp15a": "Ethernet56",
    "etp15b": "Ethernet58",
    "etp16a": "Ethernet60",
    "etp16b": "Ethernet62",
    "etp17a": "Ethernet64",
    "etp17b": "Ethernet66",
    "etp18a": "Ethernet68",
    "etp18b": "Ethernet70",
    "etp19": "Ethernet72",
    "etp20": "Ethernet76",
    "etp21": "Ethernet80",
    "etp22": "Ethernet84",
    "etp23a": "Ethernet88",
    "etp23b": "Ethernet90",
    "etp24a": "Ethernet92",
    "etp24b": "Ethernet94",
    "etp25a": "Ethernet96",
    "etp25b": "Ethernet98",
    "etp26a": "Ethernet100",
    "etp26b": "Ethernet102",
    "etp27a": "Ethernet104",
    "etp27b": "Ethernet106",
    "etp28a": "Ethernet108",
    "etp28b": "Ethernet110",
    "etp29a": "Ethernet112",
    "etp29b": "Ethernet114",
    "etp30a": "Ethernet116",
    "etp30b": "Ethernet118",
    "etp31a": "Ethernet120",
    "etp31b": "Ethernet122",
    "etp32a": "Ethernet124",
    "etp32b": "Ethernet126"
}

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Port to alias map for hwsku Celestica-DX010-D48C8 is not supported
in `ansible/module_utils/port_utils.py`.

This change is to add port to alias map for hwsku Celestica-DX010-D48C8.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
@wangxin wangxin marked this pull request as ready for review January 9, 2023 05:20
@wangxin wangxin changed the title Add port to alias map for hwsku Celestica-DX010-D48C8 Add port alias to name map for hwsku Celestica-DX010-D48C8 Jan 9, 2023
@wangxin wangxin merged commit d3b74d2 into sonic-net:master Jan 10, 2023
@wangxin wangxin deleted the dx010-hwsku-port-utils branch January 10, 2023 00:51
wangxin added a commit that referenced this pull request Jan 10, 2023
What is the motivation for this PR?
Port alias to name map for hwsku Celestica-DX010-D48C8 is not supported in ansible/module_utils/port_utils.py.

How did you do it?
This change is to add port alias to name map for hwsku Celestica-DX010-D48C8.
This change also fixed style issues reported by pre-commit.

How did you verify/test it?
Verified that the generated port alias to name map matches /usr/share/sonic/device/x86_64-cel_seastone-r0/Celestica-DX010-D48C8/port_config.ini:
{
    "etp1a": "Ethernet0",
    "etp1b": "Ethernet2",
    "etp2a": "Ethernet4",
    "etp2b": "Ethernet6",
    "etp3a": "Ethernet8",
    "etp3b": "Ethernet10",
    "etp4a": "Ethernet12",
    "etp4b": "Ethernet14",
    "etp5a": "Ethernet16",
    "etp5b": "Ethernet18",
    "etp6a": "Ethernet20",
    "etp6b": "Ethernet22",
    "etp7a": "Ethernet24",
    "etp7b": "Ethernet26",
    "etp8a": "Ethernet28",
    "etp8b": "Ethernet30",
    "etp9a": "Ethernet32",
    "etp9b": "Ethernet34",
    "etp10a": "Ethernet36",
    "etp10b": "Ethernet38",
    "etp11": "Ethernet40",
    "etp12": "Ethernet44",
    "etp13": "Ethernet48",
    "etp14": "Ethernet52",
    "etp15a": "Ethernet56",
    "etp15b": "Ethernet58",
    "etp16a": "Ethernet60",
    "etp16b": "Ethernet62",
    "etp17a": "Ethernet64",
    "etp17b": "Ethernet66",
    "etp18a": "Ethernet68",
    "etp18b": "Ethernet70",
    "etp19": "Ethernet72",
    "etp20": "Ethernet76",
    "etp21": "Ethernet80",
    "etp22": "Ethernet84",
    "etp23a": "Ethernet88",
    "etp23b": "Ethernet90",
    "etp24a": "Ethernet92",
    "etp24b": "Ethernet94",
    "etp25a": "Ethernet96",
    "etp25b": "Ethernet98",
    "etp26a": "Ethernet100",
    "etp26b": "Ethernet102",
    "etp27a": "Ethernet104",
    "etp27b": "Ethernet106",
    "etp28a": "Ethernet108",
    "etp28b": "Ethernet110",
    "etp29a": "Ethernet112",
    "etp29b": "Ethernet114",
    "etp30a": "Ethernet116",
    "etp30b": "Ethernet118",
    "etp31a": "Ethernet120",
    "etp31b": "Ethernet122",
    "etp32a": "Ethernet124",
    "etp32b": "Ethernet126"
}

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
wangxin added a commit that referenced this pull request Jan 10, 2023
What is the motivation for this PR?
Port alias to name map for hwsku Celestica-DX010-D48C8 is not supported in ansible/module_utils/port_utils.py.

How did you do it?
This change is to add port alias to name map for hwsku Celestica-DX010-D48C8.
This change also fixed style issues reported by pre-commit.

How did you verify/test it?
Verified that the generated port alias to name map matches /usr/share/sonic/device/x86_64-cel_seastone-r0/Celestica-DX010-D48C8/port_config.ini:
{
    "etp1a": "Ethernet0",
    "etp1b": "Ethernet2",
    "etp2a": "Ethernet4",
    "etp2b": "Ethernet6",
    "etp3a": "Ethernet8",
    "etp3b": "Ethernet10",
    "etp4a": "Ethernet12",
    "etp4b": "Ethernet14",
    "etp5a": "Ethernet16",
    "etp5b": "Ethernet18",
    "etp6a": "Ethernet20",
    "etp6b": "Ethernet22",
    "etp7a": "Ethernet24",
    "etp7b": "Ethernet26",
    "etp8a": "Ethernet28",
    "etp8b": "Ethernet30",
    "etp9a": "Ethernet32",
    "etp9b": "Ethernet34",
    "etp10a": "Ethernet36",
    "etp10b": "Ethernet38",
    "etp11": "Ethernet40",
    "etp12": "Ethernet44",
    "etp13": "Ethernet48",
    "etp14": "Ethernet52",
    "etp15a": "Ethernet56",
    "etp15b": "Ethernet58",
    "etp16a": "Ethernet60",
    "etp16b": "Ethernet62",
    "etp17a": "Ethernet64",
    "etp17b": "Ethernet66",
    "etp18a": "Ethernet68",
    "etp18b": "Ethernet70",
    "etp19": "Ethernet72",
    "etp20": "Ethernet76",
    "etp21": "Ethernet80",
    "etp22": "Ethernet84",
    "etp23a": "Ethernet88",
    "etp23b": "Ethernet90",
    "etp24a": "Ethernet92",
    "etp24b": "Ethernet94",
    "etp25a": "Ethernet96",
    "etp25b": "Ethernet98",
    "etp26a": "Ethernet100",
    "etp26b": "Ethernet102",
    "etp27a": "Ethernet104",
    "etp27b": "Ethernet106",
    "etp28a": "Ethernet108",
    "etp28b": "Ethernet110",
    "etp29a": "Ethernet112",
    "etp29b": "Ethernet114",
    "etp30a": "Ethernet116",
    "etp30b": "Ethernet118",
    "etp31a": "Ethernet120",
    "etp31b": "Ethernet122",
    "etp32a": "Ethernet124",
    "etp32b": "Ethernet126"
}

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
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.

2 participants