Skip to content

Commit

Permalink
explicitly reject request if activate = false.
Browse files Browse the repository at this point in the history
  • Loading branch information
hdwhdw committed Feb 21, 2025
1 parent e567f5c commit fd7a2a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gnmi_server/gnoi.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,13 @@ func (srv *SystemServer) SetPackage(rs gnoi_system_pb.System_SetPackageServer) e
return status.Errorf(codes.InvalidArgument, "RemoteDownload information is missing or invalid")
}

// Does not support not activating the image for now.
// TODO: Support not activating the image.
if pkg.Package.Activate != nil && !pkg.Package.Activate.Value {
log.Errorf("Not activating the image is not supported")
return status.Errorf(codes.InvalidArgument, "not activating the image is not supported")
}

// Log received package details
log.V(1).Infof("Received package information: Filename=%s, RemoteDownload=%v", pkg.Package.Filename, pkg.Package.RemoteDownload)

Expand Down

0 comments on commit fd7a2a3

Please sign in to comment.