-
Notifications
You must be signed in to change notification settings - Fork 667
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
sonic-utilities updates for MPLS #1537
Conversation
This pull request introduces 2 alerts when merging 48f08d186793a19b9553c1801370ac378e84091b into 6b51bcd - view on LGTM.com new alerts:
|
53c8efe
to
2a657e6
Compare
1684d5a
to
9f2062e
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Update description with the proper format, use merged PR's description as an example. If you are adding a CLI, update the description section with the new CLIs added, and a snippet of output. |
show/interfaces/__init__.py
Outdated
# 'mpls' subcommand ("show interfaces mpls") | ||
@interfaces.command() | ||
@click.argument('interfacename', required=False) | ||
@multi_asic_util.multi_asic_click_options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now remove the 'multi_asic_click_options' and the 'namespace' argument. Support for multi ASIC platform is requried but it would be hard to test and write unit tests without multi ASIC platform. (It is possible to test with multi ASIC VM)
e3bad19
to
1f21769
Compare
/azp run |
Commenter does not have sufficient privileges for PR 1537 in repo Azure/sonic-utilities |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
0b758e6
to
1a30c25
Compare
crm/main.py
Outdated
@mpls.command() | ||
@click.pass_context | ||
def inseg(ctx): | ||
"""Show CRM information for in-segment resource""" | ||
if ctx.obj["crm"].cli_mode == 'thresholds': | ||
ctx.obj["crm"].show_thresholds('{0}_inseg'.format(ctx.obj["crm"].addr_family)) | ||
elif ctx.obj["crm"].cli_mode == 'resources': | ||
ctx.obj["crm"].show_resources('{0}_inseg'.format(ctx.obj["crm"].addr_family)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't understand why this is a repeat of line 520-528
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smaheshm This cut-n-paste remnant has been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
# 'add' subcommand | ||
# | ||
|
||
@mpls.command() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not move mpls into a mpls.py instead of put them in the main.py file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lguohan You asked this same question 3 months ago. I will restate my answer from then: All subgroups, including mpls, of the interface.group are in main.py. The mpls subgroup is very small and a separate file is overkill.
What I did
SONiC CLI support for MPLS:
Why I did it
SONiC CLI support for MPLS
How I verified it
Unit-tests in sonic-swss/tests/test_mpls.py and sonic-utilities/tests
Details if related
Refer to HLD: sonic-net/SONiC#706