Skip to content
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

add support for startup-config passed in cli and partial-json formats #23

Closed
hellt opened this issue Oct 13, 2022 · 1 comment
Closed

Comments

@hellt
Copy link
Member

hellt commented Oct 13, 2022

Currently startup-config can only be provided as a full configuration extracted from a running system in a json format (from /etc/opt/srlinux/config.json).

Even the factory config of SR Linux counts thousands of lines, since security and ACL policies are provided in full for v4/v6 protocols. Using those bulky files as startup is not always easy as it is not evident what was added to the startup config by the user and what comes from default settings.

We have to add a more flexible solution where startup configs can be provided in the two additional formats.

CLI

As either a list of full-context set / ... commands or a regular CLI blob.
Such file needs to be read by srl-controller and executed via scrapligo, or copied over to the srlinux node and executed as sr_cli <commands>

Partial JSON

A trimmed down version of the config.json where only parts that a user adds are present. Such config can be loaded via sr_cli load file <path> merge

Considerations

Before implementing any of those additions, we need to make sure that srl-controller also waits for Srl nodes to boot

@hellt
Copy link
Member Author

hellt commented Mar 29, 2023

done in #37
partial json is not supported, and cli snippets are added on top in the merge fashion
if the full config is needed to be provided in the CLI format, then on the first line of the file it should be delete / followed by the CLI commands

@hellt hellt closed this as completed Mar 29, 2023
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

No branches or pull requests

1 participant