-
Notifications
You must be signed in to change notification settings - Fork 664
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-clear] add a clear fdb command #186
Conversation
merge from Azure/sonic-utilities master
scripts/fdbclear
Outdated
def send_notification(self, op, data): | ||
opdata = [op,data] | ||
msg = json.dumps(opdata,separators=(',',':')) | ||
self.db.publish('ASIC_DB','FLUSHFDBREQUEST', msg) |
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 notification should be send to app db.
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.
yes, request should go to app db, and orchagent should call flush_fdb_events api from sairedis, i already added support for that sonic-net/sonic-sairedis#288
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.
changed.
RB=1288101 G=lnos-reviewers R=ntrianta,pmao,rmolina,sfardeen,zxu * github: [acl_loader] Support Service ACL binding to multiple services (sonic-net#236) [show] Rename 'show session' to 'show mirror session' (sonic-net#235) [pfcstat]: create python cli tool to show pfc counters (sonic-net#233) [queuestat] add python CLI tool to show queue counters [acl-loader] Not to crash upon invalid rule (sonic-net#232) Show FDB type in fdbshow/show mac (sonic-net#231) [show] add 'show runningconfiguration all' subcommand (sonic-net#230) [reboot scripts] remove -t option in docker exec commands (sonic-net#228) [reboot] reduce stop service to only stop syncd (sonic-net#223) [crm]: Fix failures in CLI show commands (sonic-net#221) [Fast-reboot]: Gracefully shutdown syncd in fast-reboot (sonic-net#212) add fast-reboot support for nephos platform by stop kernel modules (sonic-net#220) [config bgp] Convert user input ipv6 addr to lower case before comparing (sonic-net#218) [PFCWD]: set default configuration when enabled by default (sonic-net#213) Add fast-reboot support for Aboot based images (sonic-net#214) sonic-utilities: Format show vlan config output (sonic-net#210) [AAA] Support login(ascii) authentication type (sonic-net#217) [sfputil] Adapt new way of getting PLATFORM(sonic-net#216) [Fast-Reboot]: Adapt fast-reboot-dump script for SAIv1.2 (sonic-net#211) Refactor fast-reboot script. Generate fast-reboot-dumps into configurable directory (sonic-net#208) Find correct opennsl module name before stopping it (sonic-net#207) [crm]: Add utility for CRM configuration (sonic-net#187) [reboot] update reboot script to retrieve platform with new format (sonic-net#206) Adapt to config engine change to load platform info properly (sonic-net#205) [config] Add qos clear and qos reload support (sonic-net#204) Dump default routes from APPL_DB table before fast-reboot (sonic-net#203) [acl_loader] Fix a crash issue when appdb is not consistent with cfgdb (sonic-net#202) [pfcwd]: add command to set pfcwd polling interval (sonic-net#192) [acl-loader] Prevent from hanging if run by non-root user (sonic-net#199) [config] Store ConfigDB init indicator boolean value as 1/0 in Redis to be language-agnostic (sonic-net#197) Get Vlan Id from SAI Vlan Object if bvid present (sonic-net#196) [TACACS+]: Fix aaa show error without configuration (sonic-net#191) 'config bgp [shutdown|startup] neighbor <hostname>' now affects all sessions for neighbor (sonic-net#195) [sonic-clear] add a clear fdb command (sonic-net#186)
ef4b3ec [Y-Cable] add the definition inside setup.py to include sonic_y_cable.credo as a package (sonic-net#211) 7d81488 [Y-Cable][Credo] Credo implementation of YCable class which inherits from YCableBase required for Y-Cable API's in sonic-platform-daemons (sonic-net#203) 3efb093 [sonic_y_cable] add abstract class YCableBase required for Y-cable API support for multiple vendors (sonic-net#186) Signed-off-by: vaibhav-dahiya <[email protected]>
a4f39ac580cdc4bc816b829adefa56626332b6d6 (HEAD -> 201911, origin/201911) [RouteUpdater]: Fix multi_asic mock function implementation and multi_asic variable name (sonic-net#186) 583265e521df440549d29fd2ef403c09f9e907ab [LLDP]: Update init_db to load global database config (sonic-net#166) 005cf2e14005220699b57b0165b00914d009a852 Fix: correctly handle that lldp_loc_man_addr contains only IPv6 address without IPv4 address (sonic-net#164) Signed-off-by: Abhishek Dosi <[email protected]>
bb1254b [201911] Initialize fan led in thermalctld for the first run (sonic-net#186)
…I support for multiple vendors (sonic-net#186) Description For multiple Y-Cable vendor support once we do have a mapping from vendor/part number to the appropriate Y-Cable module to load, we need to map appropriate port to a module as well. This PR adds definition for base abstract class. Motivation and Context Basically, the key idea is once we have a port identified as being of a certain vendor and it has been identified to load a certain module, it is then needed to call the correct module/API on each port each time we call the API on the port it is required to maintain this mapping in memory since xcvrd does not want to read/parse this y_cable_vendor_mapping.py file again and again each time we call the Y-Cable API Also note that the module loaded might change during xcvrd running lifetime since cable/transceiver can be changed from one vendor to another. So we need to take this into consideration as well Proposed Solution for this Each module of the Y-Cable vendor can be a class (of each transceiver type) and all we need to do is instantiate the objects of these classes as class instances and these objects will provide the interface of calling the API's for the appropriate vendor Y-Cable. This instantiation will be done inside xcvrd, when xcvrd starts These objects basically emulate Y-Cable instances and whatever action/interaction needs to be done with the Y-Cable the methods of these objects would provide that each vendor in their implementation can inherit from a base class where there will be definitions for all the supported capabilities of the Y-Cable. for vendors the recommended approach in case their subclass implementation does not support a method, is to set the method equal to None. This differentiates it from a method they forgot to implement. Then, the calling code should first check if the method is None before attempting to call it. Design document for the support is sonic-net/SONiC#757 Signed-off-by: vaibhav-dahiya <[email protected]>
- What I did
add a clear fdb command under "sonic-clear" group,
it's looks like "sonic-clear fdb all"
- How I did it
add "sonic-clear fdb all" to "sonic-clear" froup;
add a new script 'fdbclear' to implement the function, in this script it will publish notification via some channel of ASIC_DB to syncd.
- How to verify it
tested this command on MLNX platform
- 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)
design doc see https://github.com/Azure/SONiC/wiki/SONiC-Clear-FDB-CLI-Design
this pull request need the merge of following PRs:
https://github.com/Azure/sonic-py-swsssdk/pull/29
https://github.com/Azure/sonic-sairedis/pull/279
https://github.com/Azure/sonic-swss/pull/426