Skip to content

save config / factory reset - #1523

Draft
edipascale wants to merge 1 commit into
masterfrom
ema/save-and-reset-config
Draft

save config / factory reset #1523
edipascale wants to merge 1 commit into
masterfrom
ema/save-and-reset-config

Conversation

@edipascale

Copy link
Copy Markdown
Contributor

not yet implemented for Cumulus; nothing calls these for the moment

Part of https://github.com/githedgehog/internal/issues/417

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4edc4571-3deb-422a-896a-844014d2d974

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-d7a6d524c 🚀

@edipascale
edipascale force-pushed the ema/fix-breakout-post-save branch 4 times, most recently from e4d0952 to e8056ff Compare July 24, 2026 10:40
Base automatically changed from ema/fix-breakout-post-save to master July 24, 2026 16:06
not yet implemented for Cumulus; nothing calls these for the moment

Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
Copilot AI review requested due to automatic review settings July 27, 2026 08:57
@edipascale
edipascale force-pushed the ema/save-and-reset-config branch from d7a6d52 to b20fde6 Compare July 27, 2026 08:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds “save running config” support to the dozer.Processor abstraction and implements initial SONiC-based save/reset behaviors for Broadcom and Celestica+ platforms (with Cumulus left as unsupported for now).

Changes:

  • Extend dozer.Processor with a SaveConfig(ctx) method.
  • Implement Broadcom FactoryReset via PTY-backed execution and add Broadcom SaveConfig.
  • Implement Celestica+ FactoryReset/SaveConfig; add Cumulus SaveConfig stub.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
pkg/agent/dozer/dozer.go Adds SaveConfig to the Processor interface.
pkg/agent/dozer/bcm/processor.go Implements Broadcom FactoryReset and introduces SaveConfig via sonic-cli.
pkg/agent/cmls/processor.go Adds SaveConfig stub returning unsupported.
pkg/agent/clsp/processor.go Implements Celestica+ FactoryReset and SaveConfig via sonic-cli.
Comments suppressed due to low confidence (1)

pkg/agent/clsp/processor.go:122

  • exec.CommandContext does not perform shell parsing; the embedded quotes in "copy running-config startup-config" will be passed literally and can break sonic-cli -c. Pass the full command as a single argument without embedded quotes.
	cmd := exec.CommandContext(ctx, "sonic-cli", "-c", "\"copy running-config startup-config\"")

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/agent/dozer/bcm/processor.go
Comment thread pkg/agent/clsp/processor.go
@github-actions

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-b20fde652 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants