mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
Check for imageID, not imageName
We are only using imageID on that branch, so it is more consistent. Should not change behavior; in callers, either both are set or neither. [NO NEW TESTS NEEDED] Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@ -66,11 +66,12 @@ func (metadata *RuntimeContainerMetadata) SetMountLabel(mountLabel string) {
|
|||||||
metadata.MountLabel = mountLabel
|
metadata.MountLabel = mountLabel
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateContainerStorage creates the storage end of things. We already have the container spec created
|
// CreateContainerStorage creates the storage end of things. We already have the container spec created.
|
||||||
|
// imageID and imageName must both be either empty or non-empty.
|
||||||
// TO-DO We should be passing in an Image object in the future.
|
// TO-DO We should be passing in an Image object in the future.
|
||||||
func (r *storageService) CreateContainerStorage(ctx context.Context, systemContext *types.SystemContext, imageName, imageID, containerName, containerID string, options storage.ContainerOptions) (_ ContainerInfo, retErr error) {
|
func (r *storageService) CreateContainerStorage(ctx context.Context, systemContext *types.SystemContext, imageName, imageID, containerName, containerID string, options storage.ContainerOptions) (_ ContainerInfo, retErr error) {
|
||||||
var imageConfig *v1.Image
|
var imageConfig *v1.Image
|
||||||
if imageName != "" {
|
if imageID != "" {
|
||||||
if containerName == "" {
|
if containerName == "" {
|
||||||
return ContainerInfo{}, define.ErrEmptyID
|
return ContainerInfo{}, define.ErrEmptyID
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user