[orchagent]: Publish identified events via structured-events channel#2446
Merged
zbud-msft merged 18 commits intosonic-net:masterfrom Sep 15, 2022
Merged
[orchagent]: Publish identified events via structured-events channel#2446zbud-msft merged 18 commits intosonic-net:masterfrom
zbud-msft merged 18 commits intosonic-net:masterfrom
Conversation
Contributor
Author
|
/azp run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
zbud-msft
previously approved these changes
Sep 13, 2022
zbud-msft
previously approved these changes
Sep 14, 2022
prsunny
reviewed
Sep 14, 2022
orchagent/orchdaemon.cpp
Outdated
| string platform = getenv("platform") ? getenv("platform") : ""; | ||
|
|
||
| gCrmOrch = new CrmOrch(m_configDb, CFG_CRM_TABLE_NAME); | ||
| m_events_handle = events_init_publisher("sonic-events-swss"); |
Collaborator
There was a problem hiding this comment.
Please have this as a global variable so that we don't have to pass for each orch and change the signature in all places.
Contributor
There was a problem hiding this comment.
Would it be better to declare this as extern in orch.h or in the .cpp files that uses it?
Contributor
Author
There was a problem hiding this comment.
Please have this as a global variable so that we don't have to pass for each orch and change the signature in all places.
This is the right approach. Thanks!
Collaborator
There was a problem hiding this comment.
extern in the .cpp file that uses it
Remove handle from signature and make externs
prsunny
reviewed
Sep 14, 2022
| #include "crmorch.h" | ||
|
|
||
| CrmOrch::CrmOrch(swss::DBConnector *db, std::string tableName) : Orch(db, std::vector<std::string>{}) | ||
| CrmOrch::CrmOrch(swss::DBConnector *db, std::string tableName, event_handle_t) : Orch(db, std::vector<std::string>{}) |
Collaborator
There was a problem hiding this comment.
You may want to revert this
orchagent/portsorch.cpp
Outdated
| * default VLAN and all ports removed from .1Q bridge. | ||
| */ | ||
| PortsOrch::PortsOrch(DBConnector *db, DBConnector *stateDb, vector<table_name_with_pri_t> &tableNames, DBConnector *chassisAppDb) : | ||
| PortsOrch::PortsOrch(DBConnector *db, DBConnector *stateDb, vector<table_name_with_pri_t> &tableNames, |
Collaborator
There was a problem hiding this comment.
Can you please revert this change if its not modified?
Revert unneeded changes
prsunny
approved these changes
Sep 15, 2022
7 tasks
tjchadaga
added a commit
to tjchadaga/sonic-swss
that referenced
this pull request
Nov 12, 2024
…channel (sonic-net#2446)" This reverts commit 7cc035f.
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
…onic-net#2446) * Add events publish * Added header file * signature fix * syntax * syntax * syntax * syntax * syntax * syntax * Updated fake code * Remove if and log messages for event_publish * Remove if and log messages for event_publish (Pterosaur#1) * Remove event_handle_t from signature and add globally * Remove extern orchdaemon.cpp * Revert unneeded changes Co-authored-by: zbud-msft <zainbudhwani@microsoft.com> Co-authored-by: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Ref: sonic-net/SONiC#954
Three events identified are now published via events channel.
Why I did it
To publish events per HLD.
How I verified it
When the event occurs,
Details if related