Skip to content

Add dynamic configuration to a BootConfig message. #158

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all 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
28 changes: 28 additions & 0 deletions proto/bootz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,38 @@ message BootConfig {
// Proprietary key-value parameters that are required as part of boot
// configuration (e.g., feature flags, or vendor-specific hardware knobs).
google.protobuf.Struct metadata = 1;

// Fields to store the configuration that is expected of a device at boot
// time. In all cases, the configuration used on the system is computed based
// on the union of vendor_config + oc_config + dynamic_vendor_config +
// dynamic_oc_config. The union should be performed according to the same
// rules as `union_replace` in gNMI.
//
// Note, the dynamic_* fields MUST only be considered in the context of a
// `BootstrapDataResponse` and are NOT valid when a `BootConfig` is updated
// after device bootstrapping/initialisation -- for example, through
// `gnoi.bootconfig.SetBootConfig`.
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add that in setbootconfig to return an error just so this is very clear

//
// vendor_config and oc_config specify boot configuration that is considered
// immutable per the specification described in github.com/openconfig/bootz.
//
// Native format vendor configuration.
bytes vendor_config = 2;
// JSON rendered OC configuration.
bytes oc_config = 3;

// dynamic_vendor_config and dynamic_oc_config specify boot configuration
// that is required at boot time, but can be overwritten by dynamic
// configuration such as that applied by a gnmi.Set RPC call.
//
// As per the above comment dynamic_vendor_config and dynamic_oc_config
// are ONLY valid in the context of `BootstrapDataResponse`.
//
// Native format vendor configuration.
bytes dynamic_vendor_config = 5;
// JSON rendered OC configuration.
bytes dynamic_oc_config = 6;

// Bootloader key-value parameters that are required as part of boot
// configuration.
google.protobuf.Struct bootloader_config = 4;
Expand Down