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

platform.json changes to use list for modes #25

Open
wants to merge 1 commit into
base: sonic-cfg-mgmt
Choose a base branch
from

Conversation

samaity
Copy link
Collaborator

@samaity samaity commented Apr 27, 2020

Signed-off-by: Sangita Maity [email protected]

- What I did
Once, the datatype of "breakout_modes" get changed from string to list, this code will be compatible with the changes.

Needed change all the platform.json files in sonic-buildimage device folder.
dependent PR: sonic-buildimage#70

"breakout_modes": "1x100G[40G], 2x50G, 4x25G[10G], 2x25G(2)+1x50G(2), 1x50G(2)+2x25G(2)"

into this:

"breakout_modes": ["1x100G[40G]", "2x50G", "4x25G[10G]", "2x25G(2)+1x50G(2)", "1x50G(2)+2x25G(2)" ]

- How I did it

- How to verify it

admin@lnos-x1-a-csw07:~$ sudo config interface breakout Ethernet0
1x100G[40G]  2x50G        4x25G[10G]
admin@lnos-x1-a-csw07:~$ sudo config interface breakout Ethernet0 2x50G -l -y

Running Breakout Mode : 1x100G[40G]
Target Breakout Mode : 2x50G

Ports to be deleted :
 {
    "Ethernet0": "100000"
}
Ports to be added :
 {
    "Ethernet2": "50000",
    "Ethernet0": "50000"
}

After running Logic to limit the impact

Final list of ports to be deleted :
 {
    "Ethernet0": "100000"
}
Final list of ports to be added :
 {
    "Ethernet2": "50000",
    "Ethernet0": "50000"
}
Loaded below Yang Models
['sonic-acl', 'sonic-extension', 'sonic-head', 'sonic-interface', 'sonic-loopback-interface', 'sonic-port', 'sonic-portchannel', 'sonic-vlan']
Reading data from Redis configDb

Start Port Deletion
Find dependecies for port Ethernet0
Dependecies Exist. No further action will be taken
*** Printing dependecies ***
/sonic-interface:sonic-interface/INTERFACE/INTERFACE_LIST[port_name='Ethernet0']/port_name
/sonic-interface:sonic-interface/INTERFACE/INTERFACE_IPPREFIX_LIST[port_name='Ethernet0'][ip-prefix='10.0.0.0/31']/port_name
/sonic-interface:sonic-interface/INTERFACE/INTERFACE_IPPREFIX_LIST[port_name='Ethernet0'][ip-prefix='2000:1:1::2/126']/port_name

- Previous command output (if the output of a command-line utility has changed)

- New command output (if the output of a command-line utility has changed)

@samaity samaity force-pushed the platform_list_util branch from d416211 to cbfa608 Compare May 7, 2020 20:20
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.

1 participant