-
Notifications
You must be signed in to change notification settings - Fork 15
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 support for FDB Mac #141
Conversation
ViramShah91
commented
Sep 27, 2019
•
edited
Loading
edited
src/CLI/actioner/sonic-cli-mac.py
Outdated
|
||
return keypath,body | ||
|
||
def getId(item): |
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.
This function is not needed, as this sorts the interface name, or we may need to extend this function inorder to sort the VLAN names. Need to move this function to a new file, sonic_cli_utils.py.
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.
Removed code from the file.
</COMMAND> | ||
|
||
<!--====================show mac address-table count command ======================--> | ||
<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.
Better to have the command as #show MAC address-table and "address", "count" and "vlan" as PARAMs. So, this can be extended in future, so that you don't need to write separate command for all the sub-commands of MAC. Please hold on to this comment, let's discuss with joyas on this, and make a final decision, since this makes action unique, rather than having a logic for ACTION script.
src/CLI/clitree/cli-xml/mac.xml
Outdated
help="static subcommands" | ||
mode="switch" | ||
ptype="SUBCOMMAND" | ||
optional="true" |
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.
Do we need this optional flag?
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.
The requirement is to get result for "show mac address-table static" as well as for "show mac address-table static {vlan | interface | address}". Without optional param, CLI will be complaining as an incomplete command and we won't get result for static.
src/CLI/clitree/cli-xml/mac.xml
Outdated
</PARAM> | ||
</PARAM> | ||
<PARAM | ||
name="Port-channel" |
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.
Please fix indentation issues in the code.
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.
Fixed indentation.
src/CLI/clitree/cli-xml/mac.xml
Outdated
> | ||
<PARAM | ||
name="Ethernet" | ||
help="static interface Ethernet id - ethernet" |
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.
Better to have help string start with CAPS, and do we need to mention static in help string? If its not important, can you please check other places too.
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.
Addressed this issue in latest commit.
src/CLI/clitree/cli-xml/mac.xml
Outdated
<PARAM | ||
name="po-id" | ||
help="Static interface port-channel id po-id" | ||
ptype="UINT" |
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.
Can we change PTYPE as LAG_ID? and in line number 303.
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.
Added LAG_ID in sonic-type and updated ptype for port-channel as LAG_ID.
src/CLI/clitree/cli-xml/mac.xml
Outdated
optional="true" | ||
> | ||
<PARAM | ||
name="Address" |
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.
Does it have to start with CAPS for "Address", "Interface" and "Vlan" subcommands? We use small letters in os10. Please correct me if I am wrong.
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.
Addressed this issue in latest commit.
src/CLI/clitree/cli-xml/mac.xml
Outdated
</PARAM> | ||
<PARAM | ||
name="VLAN" | ||
help="VLAN ID (1-128)" |
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.
Please correct the VLAN ID range, and line number 163.
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.
Addressed this issue in the latest commit.
…nic types for supporting port-channel ptype
src/CLI/clitree/cli-xml/mac.xml
Outdated
mode="switch" | ||
> | ||
<PARAM | ||
name="ethernet" |
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.
Could we represent physical interface just like how it's been represented in Kernel? For example: ethernet -> Ethernet, and vlan -> Vlan, port-channel should be PortChannel?
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.
Addressed.
@ViramShah91 -- can't merge until your resolve the conflicts in |
* [JIRA SONIC-54751] Flex-DPB UMF changes - Rejecting config when max ports per pipe-line is reached. - Support some new modes in different formats - 1x50G-PAM and 1x50G-NRZ Signed-off-by: Prasanth Kunjum Veettil <[email protected]> Change-Id: I1305e237f000434f7c837d11b9977246df30efec * [JIRA SONIC-54751] FlexDPB - modifying the show interface breakout modes command to display the pipe. Signed-off-by: Prasanth Kunjum Veettil <[email protected]> Change-Id: Icadd5afd3729f65180a99cb8133fae47e090849c * [JIRA SONIC-54751] FlexDPB - Making the CLI output better when there are too many breakout modes. Signed-off-by: Prasanth Kunjum Veettil <[email protected]> Change-Id: I38ec87ef6025978dbd88d7d5a2fa9ff7209ac969 * [JIRA SONIC-54751] Flex-DPB UM Adding CLI "show interface breakout resources" Signed-off-by: Prasanth Kunjum Veettil <[email protected]> Change-Id: I8b9658b289557e0c708fa02f65e392b112c11609 * [JIRA SONIC-59502] User name field in not applicable cases should be displayed as Not Applicable instead of empty. Change-Id: Ie96be7eacf13a9ebe4c9e95abbd6a88f1e47533f * [JIRA SONIC-60245] Field to display the operational value of the session timeout in the output of the show authentication clients. Change-Id: Ieddba8ac30568d55197fe1ce172b8cc208ffdc30 * [JIRA SONIC-56405] Added support for pac configuration over range of interfaces. Change-Id: I0ce68fc2497fcc45fcd0c15d6113542967d974c2 * [JIRA SONIC-61478] KLISH: add 50G AN support Signed-off-by: Dante Su <[email protected]> Change-Id: If6c05a49f18469858b66c58cd456e7b4f6a3c0e0 * [JIRA SONIC-61803] GetTablePattern ExistKeysPattern API in DB Layer - Added Statistics Change-Id: I3732e78e13881842e9394a571788abe3ab1ac337 * [JIRA SONIC-61314] go.sum update Change-Id: I7576ffc6933f9727747d3463b022c23ad7def609 * [JIRA SONIC-61807] - Model Identity as enumeration Used Enum to represent identities This will allow swagger ui to show drop-down in case of parameters. Change-Id: I8e438545d0b28c9c2ee545a2704366da512b5c74 * [JIRA SONIC-60508]: ospf neighbor details template fix Change-Id: Iee1dbdc72e02a6d23e0dfac71220843be3730ddd * [JIRA SONIC-61879] PAC - Added required changes for config knobs dymanic_vlan_enable, vlan_assign_enable. Change-Id: Ib38db8f2e9917b4261fc709e1548ea78f0196453 * [JIRA SONIC-61168] Klish support for ND config commands Change-Id: I7227cb99ecf82bddac169c3b544bd28758f40c3b * [JIRA SONIC-61223] With user added explicit snooping configuration on Vlan, actioner has called PATCH with default value for the no form of the user configuration, this has resulted in running configuration showing default value when there is no explicit configuration for the default - Fixed actioner script to trigger DELETE for the snooping configuration instead of PATCH with the default values. - Fix added in l2mcmgrd to fill snooping configuration IPC message by reading redisDB update instead of keeping separate local cache for snooping configurations which comes before snooping enable. Change-Id: I3ace4e6eca5cb7608d48bb9e3a11bb1c4976e4d9 * [JIRA SONIC-61948] - Using oc-yang for dhcp snooping trusted port configuration in Klish Change-Id: I33c811e9316b552b08cdbc12489c73806f4e3e95 * [JIRA SONIC-54751] Flex DPB - PAM/NRZ generic lane count approach - System level max ports - Lane count notation translation, display, config display Signed-off-by: Prasanth Kunjum Veettil <[email protected]> Change-Id: If8b5429e732fce5342d960b0980a250f75a5ff8c * [JIRA SONIC-54751] Flex DPB - 20G speed support Signed-off-by: Prasanth Kunjum Veettil <[email protected]> Change-Id: I8a0f581c70c0aa6b30e76a64fe4262d44f828568 * [JIRA SONIC-62134] - Corrected the sag xml order to come after vrf config Change-Id: I0d463d9d16e014d39b343d14d36ff801019017d4 * [JIRA SONIC-61997] using escap_chars option to skip '\' for special chars Change-Id: I3b654ea105931c0e3605b84ed5db560cb5e13e95 * [JIRA SONIC-62061] validating tag field of SNMP_SERVER_TARGET entry, before using it Change-Id: I504812121a85e83693d00dae76d5321583b1b7a0 * [JIRA SONIC-61168] Klish support for show command Change-Id: Ia2e6d4d8b8ae598af3cdcdbbb051bcddc8625bbc * [JIRA SONIC-62420] Added changes to not format debug logs until its enabled to speed up execuction of actioners for ACL and FBS Change-Id: Ibbad404d7f6890d03b99d63f26f9ddd36eab728d * [JIRA SONIC-54751] Flex DPB - rename lane-count to total-lane-count Signed-off-by: Prasanth Kunjum Veettil <[email protected]> Change-Id: I2ecb8e0a5e6ca0ced86bb795ef2a98a155c25fdc * [JIRA SONIC-60841] The NTP client must support the "prefer" option and provide CLI for enabling it Change-Id: I724543e858a256032fa9d45a5982a4124266a859 * [JIRA SONIC-61168] Klish support for modifying help string associated with config commands to make it more descriptive Change-Id: I9377ef77a093c3b0ed5269a1df874965ae6a3298 * [JIRA SONIC-61879] PAC - Added required UI changes for Auth Fail Retry config command. Change-Id: Id66b4d31e6a509816f4d5b598c005b109397856e * [JIRA SONIC-60945] Show redirect ACL binding in show access-group CLI Change-Id: I56a2f7bce3a34eec51c4371210a4379ee8730589 * [JIRA SONIC-62672] Fix exception when per interface acl mode is enabled Change-Id: If924f71bc4e614ff948351a94a3a26b9ef18df6b * [JIRA SONIC-62796] SONIC_4.1.0 - KLISH CLI: Add 200G support to 'show interface advertise' Signed-off-by: Dante Su <[email protected]> Change-Id: Ic66c272a8bc8826480365eb5780ef4db2aa4f1ca * [JIRA SONIC-62847] Clish pre-exec hook * Added a new pre-exec hook, which gets called before executing the ACTION or CONFIG handlers * Hook function receives the current command context * Command execution is aborted if hook returns non-zero value * Added a skeleton implementation in clish plugin * Few utility functions for the future pre-hook implementation char *get_uname(clish_context_t *c) char *get_masked_line(clish_context_t *c) Change-Id: I44a0a5df4419fb51ad90ff9898db6b9534ef5eb1 * [JIRA SONIC-62732] [JIRA SONIC-62730] : 1.Fix jinja template to show proper state for helper strict lsa checking Change-Id: I313baac45137b46eab821fb5e17234ca365270a5 * [JIRA SONIC-62280] Added COA klish CLI changes. Change-Id: Ie7498ad7451763256641862da4d5ba12efdc750a * [JIRA SONIC-61879] Modified authentication fail retry default value to 1, made minor corrections in authmgr appl. Change-Id: I1cef51a96991d22a54e407c0b6dd60d0edef055c * [JIRA SONIC-62875] Fix processing of dynamic acls and redirect acls when per interface acl counter mode is enabled Change-Id: Ic8d3e0c8b16ac9785b8f9c687e603c3f8659cd77 * [JIRA SONIC-61950]: Dot1x/MAB timers config support Change-Id: I022b1d75b183e3028db5c083b1d70a971616a597 * [JIRA SONIC-62911] PTP 1-step and TH3 support - UMF changes Signed-off-by: Prasanth Kunjum Veettil <[email protected]> Change-Id: Ib46e89a9f82c73b8e8af5b53d479258f424a51f5 * [JIRA SONIC-63025] SONIC_4.1.0 - KLISH: add the missing link-training status support Signed-off-by: Dante Su <[email protected]> Change-Id: Icb05d69abd3a9042d5d2838868fcbde7871caf09 * [JIRA SONIC-63081] SONIC_4.1.0 - KLISH/YANG: Reverting SONIC-51042 to use float with precision 2 in DOM values Signed-off-by: Dante Su <[email protected]> Change-Id: I200df89d1dcc234965eb87a27b5c6df8e28c3f0a * [JIRA SONIC-62637] : 1. Added support for -:show ip ospf database opaque-link 2.Support opaque-link lsa summary for -:show ip ospf database Change-Id: I631ca9918bb90630420a94caed1603d673923e81 * [JIRA SONIC-62953] added check for security-nme key before accessing it. Change-Id: I5ff72ed7a4b183cf939455e2afba97d0f964d618 * [JIRA SONIC-63000] Portchannel min-links related changes Change-Id: I3ab9f27c8b6fe5266eddfc60295d0fa3bb806557 * [JIRA SONIC-62104] SONIC_4.1.0 - EVPN Multihoming Task - KLISH system-mac and evpn ethernet segment Change-Id: Iad4153e21c9f67b0326aced909f7c9d07ef67429 * [JIRA SONIC-63064] SONIC_4.1.0 - EVPN Multihoming Task - mclag domain config checking Change-Id: I8bc1619034e37fd99fdbac8a096fbe51de0d85b3 * [JIRA SONIC-62780] SONIC_4.1.0 - Add interface Portchannel range support for system-mac configuration Change-Id: I10bec6d70e1eaff6af16de33c12f3dbc1aa47433 * [JIRA SONIC-63320] Added UI support for multi-vrf functionality of TAM collectors. Change-Id: Ie44af58c8aab48b54b43aa843ccf5ea7870db479 * [JIRA SONIC-63333] bgp clis - disable-ead-evi-rx, disable-ead-evi-tx, use-es-l3nhg Change-Id: I12470dbf82495e14cc3638e9b329897d5d9156f5 * [JIRA SONIC-63377] TCAM Keyprofile CLI Changes Few key-profile names are missing in TCAM CLI. Code changes has been done to add the missing key-profile names in TCAM CLI. Change-Id: I249cd34b6266e6c35e79b77d5fb9d95a0dccaf04 * [JIRA SONIC-63000] Portchannel fallback config updated related changes Change-Id: I9fb8885f8f055ffe7a8556788f1e8b50ac5fb73f * [JIRA SONIC-63408] - Fix CLI docgen issue Re-Enaled cli docgen made it to execute with python3 always Fixed unicode issues. Change-Id: I611133abbf0d389172768153e6e3fc2fa2f1b996 * [JIRA SONIC-62082] Support for clearing evpn duplicate address based on IP address. Change-Id: I3f0ab0428cca4e37285ffa12416d7755cc4ce020 * [JIRA SONIC-62800] Invoking new statistics detail URLs. Change-Id: I29290a17cc85223c6ba5f23f4d64cb9c29c08380 * Fixing merge conflict Co-authored-by: sonicmergeuser <[email protected]> Co-authored-by: Prasanth Kunjum Veettil <[email protected]> Co-authored-by: Sravani Maddukuri <[email protected]> Co-authored-by: Shiva Kumar Boddula <[email protected]> Co-authored-by: Dante Su <[email protected]> Co-authored-by: Sonic Build <[email protected]> Co-authored-by: Arun Barboza <[email protected]> Co-authored-by: Sachin Holla <[email protected]> Co-authored-by: Faraaz <[email protected]> Co-authored-by: Ramachandran Sathianandan <[email protected]> Co-authored-by: sudhanshukumar22 <[email protected]> Co-authored-by: Ashok Krishnegowda <[email protected]> Co-authored-by: Akhilesh Samineni <[email protected]> Co-authored-by: suresh-rupanagudi <[email protected]> Co-authored-by: Lakshmi Sruthy <[email protected]> Co-authored-by: Abhishek Dharwadkar <[email protected]> Co-authored-by: Asha Behera <[email protected]> Co-authored-by: Rama Chandra Reddy Gaddam <[email protected]> Co-authored-by: madhukar-kamarapu <[email protected]> Co-authored-by: leeprecy <[email protected]> Co-authored-by: Mayank Maheshwari <[email protected]> Co-authored-by: karthik raj <[email protected]> Co-authored-by: Ashok Narayanasamy <[email protected]> Co-authored-by: Kishore Kunal <[email protected]> Co-authored-by: Phanindra TV <[email protected]> Co-authored-by: SONiC Syncbot <[email protected]>