Skip to content

[GCU] Ignore bgpraw table in GCU operation #2628

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

Merged
merged 4 commits into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion generic_config_updater/change_applier.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class ChangeApplier:
def __init__(self):
self.config_db = get_config_db()
self.backend_tables = [
"bgpraw",
"BUFFER_PG",
"BUFFER_PROFILE",
"FLEX_COUNTER_TABLE"
Expand Down
4 changes: 2 additions & 2 deletions generic_config_updater/gu_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def get_config_db_as_json(self):
return json.loads(text)

def _get_config_db_as_text(self):
# TODO: Getting configs from CLI is very slow, need to get it from sonic-cffgen directly
cmd = "show runningconfiguration all"
Copy link
Contributor

@qiluo-msft qiluo-msft Jan 26, 2023

Choose a reason for hiding this comment

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

"show runningconfiguration all"

The original cmd is better because it is the formal CLI interface. Event today the implementation is the same, but in future, the formal CLI will work better with multi-asic.

Instead, you can remove unwanted fields in get_config_db_as_json function. #Closed

# Use sonic-cfggen to generate data only from CONFIG_DB
cmd = "sonic-cfggen -d --print-data"
result = subprocess.Popen(cmd, shell=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
text, err = result.communicate()
return_code = result.returncode
Expand Down