[Dynamic Port Breakout]validate breakout mode exactly #1341
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the supported breakout mode is 1x100G[40G], then it can accept 1x100G.
1x100G[40G] => The port can support speed 100G and 40G
1x100G => The port just support 100G
If the supported breakout mode is 1x100G(4), then it can accept 1x100G.
1x100G => the number of hw lanes is default
1x100G(4) => the number of hw lanes should be 4
If the default numbers of hw lanes is not 4, the 1x100G and 1x100G(4) are different.
Signed-off-by: chiourung_huang [email protected]
- What I did
validate breakout mode exactly
- How I did it
- How to verify it
- Previous command output (if the output of a command-line utility has changed)
If the supported breakout mode is 1x100G[40G], then it can accept 1x100G and save 1x100G to redis-db.
root@as7816-64x:/# config interface breakout Ethernet0 1x100G -f -y
Running Breakout Mode : 4x25G
Target Breakout Mode : 1x100G
Ports to be deleted :
{
"Ethernet2": "25000",
"Ethernet3": "25000",
"Ethernet0": "25000",
"Ethernet1": "25000"
}
Ports to be added :
{
"Ethernet0": "100000"
}
After running Logic to limit the impact
Final list of ports to be deleted :
{
"Ethernet2": "25000",
"Ethernet3": "25000",
"Ethernet0": "25000",
"Ethernet1": "25000"
}
Final list of ports to be added :
{
"Ethernet0": "100000"
}
Loaded below Yang Models
['sonic-acl', 'sonic-extension', 'sonic-interface', 'sonic-loopback-interface', 'sonic-port', 'sonic-portchannel', 'sonic-types', 'sonic-vlan']
Note: Below table(s) have no YANG models:
TACPLUS_SERVER, DEVICE_METADATA, BGP_PEER_RANGE, PORTCHANNEL_MEMBER, FLEX_COUNTER_TABLE, SYSLOG_SERVER, CRM, CONTAINER_FEATURE, BGP_NEIGHBOR, PORTCHANNEL_INTERFACE, MGMT_INTERFACE, NTP_SERVER, DEVICE_NEIGHBOR_METADATA, TELEMETRY, DEVICE_NEIGHBOR, FEATURE, BREAKOUT_CFG, DHCP_SERVER, MGMT_PORT, RESTAPI, VERSIONS, BUFFER_POOL, BUFFER_PROFILE,
Breakout process got successfully completed.
Please note loaded setting will be lost after system reboot. To preserve setting, run
config save
.root@as7816-64x:/# redis-cli -n 4 hgetall "BREAKOUT_CFG|Ethernet0"
- New command output (if the output of a command-line utility has changed)
root@as7816-64x:/# config interface breakout Ethernet0 1x100G -f -y
[ERROR] Target mode 1x100G is not available for the port Ethernet0
Aborted!