Skip to content

Commit

Permalink
Add OSVersion to platform protobuf
Browse files Browse the repository at this point in the history
It also extends the functions in api/types/platform_helpers.go

Signed-off-by: kiashok <kiashok@microsoft.com>
  • Loading branch information
kiashok committed Feb 7, 2024
1 parent d9cae66 commit 5aa0548
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
7 changes: 7 additions & 0 deletions api/next.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,13 @@ file {
type: TYPE_STRING
json_name: "variant"
}
field {
name: "os_version"
number: 4
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "osVersion"
}
}
options {
go_package: "github.com/containerd/containerd/v2/api/types;types"
Expand Down
22 changes: 16 additions & 6 deletions api/types/platform.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/types/platform.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ message Platform {
string os = 1;
string architecture = 2;
string variant = 3;
string os_version = 4;
}
2 changes: 2 additions & 0 deletions api/types/platform_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func OCIPlatformToProto(platforms []oci.Platform) []*Platform {
for i := range platforms {
ap[i] = &Platform{
OS: platforms[i].OS,
OSVersion: platforms[i].OSVersion,
Architecture: platforms[i].Architecture,
Variant: platforms[i].Variant,
}
Expand All @@ -39,6 +40,7 @@ func OCIPlatformFromProto(platforms []*Platform) []oci.Platform {
for i := range platforms {
op[i] = oci.Platform{
OS: platforms[i].OS,
OSVersion: platforms[i].OSVersion,
Architecture: platforms[i].Architecture,
Variant: platforms[i].Variant,
}
Expand Down

0 comments on commit 5aa0548

Please sign in to comment.