mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
* Add docker pullable support.
* Fix inspect image bug. * Fix remove image bug.
This commit is contained in:
@@ -17,7 +17,6 @@ limitations under the License.
|
||||
package testing
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
runtimeApi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
|
||||
@@ -89,11 +88,7 @@ func (r *FakeImageService) ImageStatus(image *runtimeApi.ImageSpec) (*runtimeApi
|
||||
|
||||
r.Called = append(r.Called, "ImageStatus")
|
||||
|
||||
if img, ok := r.Images[image.GetImage()]; ok {
|
||||
return img, nil
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("image %q not found", image.GetImage())
|
||||
return r.Images[image.GetImage()], nil
|
||||
}
|
||||
|
||||
func (r *FakeImageService) PullImage(image *runtimeApi.ImageSpec, auth *runtimeApi.AuthConfig) error {
|
||||
|
||||
@@ -2963,7 +2963,8 @@ var _RuntimeService_serviceDesc = grpc.ServiceDesc{
|
||||
type ImageServiceClient interface {
|
||||
// ListImages lists existing images.
|
||||
ListImages(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error)
|
||||
// ImageStatus returns the status of the image.
|
||||
// ImageStatus returns the status of the image. If the image is not
|
||||
// present, returns nil.
|
||||
ImageStatus(ctx context.Context, in *ImageStatusRequest, opts ...grpc.CallOption) (*ImageStatusResponse, error)
|
||||
// PullImage pulls an image with authentication config.
|
||||
PullImage(ctx context.Context, in *PullImageRequest, opts ...grpc.CallOption) (*PullImageResponse, error)
|
||||
@@ -3021,7 +3022,8 @@ func (c *imageServiceClient) RemoveImage(ctx context.Context, in *RemoveImageReq
|
||||
type ImageServiceServer interface {
|
||||
// ListImages lists existing images.
|
||||
ListImages(context.Context, *ListImagesRequest) (*ListImagesResponse, error)
|
||||
// ImageStatus returns the status of the image.
|
||||
// ImageStatus returns the status of the image. If the image is not
|
||||
// present, returns nil.
|
||||
ImageStatus(context.Context, *ImageStatusRequest) (*ImageStatusResponse, error)
|
||||
// PullImage pulls an image with authentication config.
|
||||
PullImage(context.Context, *PullImageRequest) (*PullImageResponse, error)
|
||||
|
||||
@@ -46,7 +46,8 @@ service RuntimeService {
|
||||
service ImageService {
|
||||
// ListImages lists existing images.
|
||||
rpc ListImages(ListImagesRequest) returns (ListImagesResponse) {}
|
||||
// ImageStatus returns the status of the image.
|
||||
// ImageStatus returns the status of the image. If the image is not
|
||||
// present, returns nil.
|
||||
rpc ImageStatus(ImageStatusRequest) returns (ImageStatusResponse) {}
|
||||
// PullImage pulls an image with authentication config.
|
||||
rpc PullImage(PullImageRequest) returns (PullImageResponse) {}
|
||||
|
||||
Reference in New Issue
Block a user