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

support for srlinux startup config provisioning #76

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

hellt
Copy link
Contributor

@hellt hellt commented Oct 27, 2021

@marcushines, I have added support for srl-labs/srl-controller to handle startup configuration instructions that kne users may provide in topo file srl-labs/srl-controller#4

Now when users have file: "somepath" instruction under the config section of a node, this file will be mounted as a startup config for srlinux node.

The example with 3 nodes that I provided within this PR shows how node r2 uses just that.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1390332432

  • 2 of 20 (10.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.3%) to 60.697%

Changes Missing Coverage Covered Lines Changed/Added Lines %
topo/node/srl/srl.go 2 20 10.0%
Totals Coverage Status
Change from base Build 1382208147: -0.3%
Covered Lines: 1149
Relevant Lines: 1893

💛 - Coveralls

@@ -197,7 +204,8 @@ func defaults(pb *topopb.Node) *topopb.Node {
"type": topopb.Node_NOKIA_SRL.String(),
},
Config: &topopb.Config{
Image: "ghcr.io/nokia/srlinux:latest",
Image: "ghcr.io/nokia/srlinux:latest",
ConfigFile: "config.json",
Copy link
Contributor

Choose a reason for hiding this comment

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

what if a startup config isn't provided?

@hellt
Copy link
Contributor Author

hellt commented Oct 27, 2021 via email

EntryCommand: n.GetProto().GetConfig().GetEntryCommand(),
ConfigPath: n.GetProto().GetConfig().GetConfigPath(),
ConfigFile: n.GetProto().GetConfig().GetConfigFile(),
ConfigDataPresent: n.isConfigDataPresent(),
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: testcase coverage for provided and not provided config?

@marcushines
Copy link
Contributor

nm not really worth it

@marcushines marcushines merged commit 71eae84 into openconfig:main Oct 27, 2021
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.

None yet

4 participants