Skip to content

Commit

Permalink
Add bootconfig to Activate. This allows the caller to provide (#218)
Browse files Browse the repository at this point in the history
a new bootconfig to the device during activate.

This allows for the device to be provided a minimum configuration
to gaurentee compatibility with the new OS or provide OS version
specific configuration to allow the new OS to boot.
  • Loading branch information
marcushines authored Oct 30, 2024
1 parent 459deca commit 0f57ed2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions bootconfig/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use_new_compilers()
proto_library(
name = "bootconfig_proto",
srcs = ["bootconfig.proto"],
import_prefix = "github.com/openconfig/gnoi",
deps = [
"//types:types_proto",
"@com_github_openconfig_bootz//proto:bootz_proto",
Expand Down
11 changes: 9 additions & 2 deletions os/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ use_new_compilers()
proto_library(
name = "os_proto",
srcs = ["os.proto"],
deps = ["//types:types_proto"],
import_prefix = "github.com/openconfig/gnoi",
deps = [
"//types:types_proto",
"//bootconfig:bootconfig_proto",
],
)

cc_proto_library(
Expand All @@ -51,7 +55,10 @@ go_proto_library(
],
importpath = "github.com/openconfig/gnoi/os",
proto = ":os_proto",
deps = ["//types"],
deps = [
"//types",
"//bootconfig",
],
)

go_library(
Expand Down
12 changes: 11 additions & 1 deletion os/os.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ syntax = "proto3";

package gnoi.os;

import "github.com/openconfig/gnoi/bootconfig/bootconfig.proto";
import "github.com/openconfig/gnoi/types/types.proto";


option go_package = "github.com/openconfig/gnoi/os";

option (types.gnoi_version) = "0.1.4";
Expand Down Expand Up @@ -65,7 +67,7 @@ service OS {
// Scenario 1 - When the Target already has the OS package:
//
// Client :--------------|--------------> Target
// TransferRequest -->
// TransferRequest -->
// <-- [Validated|InstallError]
//
//
Expand Down Expand Up @@ -331,6 +333,14 @@ message ActivateRequest {
// the activated OS version is required. This action CAN be executing
// the gNOI.system.Reboot() RPC.
bool no_reboot = 3;

// Bootconfig provides the next boot configuration to load after OS upgrade.
// The device will take all artifacts provided and replace them just as if
// a gnoi.BootConfig.Set was performed on the device.
// The main use case is to facilitate the new OS to utilized a new
// configuration syntax which was not supported in previous versions.
gnoi.bootconfig.SetBootConfigRequest boot_config = 4;

}

// The ActivateResponse is sent from the Target to the Client in response to the
Expand Down

0 comments on commit 0f57ed2

Please sign in to comment.