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

CLI skeleton for Port channel #134

Merged
merged 5 commits into from
Oct 2, 2019
Merged

CLI skeleton for Port channel #134

merged 5 commits into from
Oct 2, 2019

Conversation

Tejaswi-Goel
Copy link
Collaborator

@Tejaswi-Goel Tejaswi-Goel commented Sep 20, 2019

Note: This PR to be merged after #129 PR is merged as the code for port-channel is developed on top of Vlan's code.

image

image

Signed-off-by: Tejaswi Goel [email protected]

@Tejaswi-Goel Tejaswi-Goel force-pushed the cli-portChannel branch 4 times, most recently from b92299e to 8f6ffe7 Compare September 20, 2019 19:28
Signed-off-by: Tejaswi Goel <[email protected]>
<PARAM
name="min-links"
help="Configure the minimum number of links in a port-channel"
ptype="UINT" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we know max. no. of ports that can be added to port-channel?

@Tejaswi-Goel Tejaswi-Goel force-pushed the cli-portChannel branch 9 times, most recently from 0f836f7 to e15b277 Compare September 28, 2019 00:52
<PTYPE
name="LAG_ID"
method="integer"
pattern="0..9999"

Choose a reason for hiding this comment

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

Does it have to be 1..128? Please confirm.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I initially had it 1..128, but then I found out on Sonic NOS the allowed range is '<0-9999>'

help="LAG status and configuration"
ptype="SUBCOMMAND"
mode="subcommand" />
<COMMAND

Choose a reason for hiding this comment

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

Better to add PARAM as summary and keep optional="true", rather than adding every PARAM as separate command.

Copy link
Collaborator Author

@Tejaswi-Goel Tejaswi-Goel Sep 30, 2019

Choose a reason for hiding this comment

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

Done it like this here so that summary option selected or not, it is part of command on pressing enter

help="Configure port channel parameters"
ptype="SUBCOMMAND"
mode="subcommand"/>
<COMMAND

Choose a reason for hiding this comment

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

Same here, make command as "channel-group" and "mode", "active" as nested PARAMs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@jeff-yin
Copy link
Collaborator

@justinejose91 -- please review latest changes; will hold merge until your approval

@@ -162,10 +193,23 @@ limitations under the License.
ptype="VLAN_ID"
/>
</PARAM>
<PARAM
name="port-channel"

Choose a reason for hiding this comment

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

Before merging, need one thing to get clarified. "port-channel" is represented as PortChannel in Kernel, so need to get confirmation on what naming convention we go for interface name commands. Say for Interface, we go as Ethernet . I guess it would be better to go with the same name for CLI command. Let me confirm with Joyas, will get back soon.

Choose a reason for hiding this comment

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

Just talked with @joyas-joseph , lets have the name "PortChannel" (name used in Kernel) to be consistent across all the CLI. Sorry for not pointing this out earlier. I did it wrong for vlan too, I will fix it.

@@ -139,6 +153,23 @@ limitations under the License.
<ACTION builtin="clish_nop"></ACTION>
</COMMAND>

<COMMAND
name="interface port-channel"

Choose a reason for hiding this comment

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

Example, it has to be interface PortChannel

@Tejaswi-Goel Tejaswi-Goel merged commit 8f67a66 into master Oct 2, 2019
@Tejaswi-Goel Tejaswi-Goel deleted the cli-portChannel branch January 6, 2020 22:09
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.

4 participants