Skip to content

Commit

Permalink
Adding metadata to container listing
Browse files Browse the repository at this point in the history
This commit adds the following:

* ListResponse must now return any metadata attached to a container.
* ListResponse must now return the container hash.
* RemoveContainer should not remove the specified container.
  • Loading branch information
alshabib committed Nov 13, 2024
1 parent 73a1e76 commit 5f4650f
Show file tree
Hide file tree
Showing 21 changed files with 508 additions and 456 deletions.
Empty file modified bgp/bgp_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified bootconfig/bootconfig_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified cert/cert_grpc.pb.go
100755 → 100644
Empty file.
929 changes: 485 additions & 444 deletions containerz/containerz.pb.go

Large diffs are not rendered by default.

24 changes: 15 additions & 9 deletions containerz/containerz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ service Containerz {
rpc RemoveImage(RemoveImageRequest)
returns (RemoveImageResponse) {}

// RemoveContainer deletes images that match the spec defined in the
// request. If the image is associated to a running container then an error
// is returned. If the specified container image does not exist, this
// operation is a no-op.
//
// Deprecated - use RemoveImage instead.
// RemoveContainer deletes the container that matches the instance
// name. If the specified container does not exist, this
// operation is a no-op. The container should not be removed if it is
// running unless force is specified in the request.
rpc RemoveContainer(RemoveContainerRequest)
returns (RemoveContainerResponse) {}

Expand Down Expand Up @@ -225,11 +223,10 @@ message RemoveImageResponse {
}

message RemoveContainerRequest {
// The container image name to be removed.
// The container name to be removed.
string name = 1;

// The container tag to be removed.
string tag = 2;
reserved 2;

// If force is set, the target should attempt to forcibly remove the
// container.
Expand Down Expand Up @@ -314,6 +311,14 @@ message ListContainerResponse {
}

Status status = 4;

// Metadata associated to this container. This is limited to metadata
// about the running container and should in no way change the bahaviour
// or the RPC.
map<string, string> labels = 5;

// The computed hash of the image as returned by the container runtime.
types.HashType hash = 6;
}

// A volume can be passed to a container such that it can persist data.
Expand Down Expand Up @@ -411,6 +416,7 @@ message StartContainerRequest {
// not specified then the container will be run as the docker user and group.
RunAs run_as = 11;

map<string, string> labels = 12;
// Other container properties will be added as it becomes necessary.
}

Expand Down
Empty file modified containerz/containerz_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified debug/debug_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified diag/diag_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified factory_reset/factory_reset_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified file/file_grpc.pb.go
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/openconfig/gnoi
go 1.21

require (
github.com/golang/protobuf v1.5.4
github.com/golang/protobuf v1.5.3
github.com/openconfig/bootz v0.3.1
github.com/openconfig/gnsi v1.6.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142
Expand Down
9 changes: 7 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/openconfig/bootz v0.3.1 h1:Q0mThGmZiX/kht+crar6FtLVxqdjUS/deMnpcNX+F7c=
Expand All @@ -14,9 +16,12 @@ golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
Empty file modified healthz/healthz_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified layer2/layer2_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified mpls/mpls_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified os/os_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified otdr/otdr_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified packet_capture/packet_capture_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified packet_link_qualification/packet_link_qualification_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified system/system_grpc.pb.go
100755 → 100644
Empty file.
Empty file modified wavelength_router/wavelength_router_grpc.pb.go
100755 → 100644
Empty file.

0 comments on commit 5f4650f

Please sign in to comment.