Spell check strings and comments
Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #831 Approved by: rhatdan
This commit is contained in:
		
							parent
							
								
									a7180cd545
								
							
						
					
					
						commit
						684b544e9c
					
				| 
						 | 
					@ -32,7 +32,7 @@ var (
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		cli.StringFlag{
 | 
							cli.StringFlag{
 | 
				
			||||||
			Name:  "author, a",
 | 
								Name:  "author, a",
 | 
				
			||||||
			Usage: "Set the author for the image comitted",
 | 
								Usage: "Set the author for the image committed",
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		cli.BoolTFlag{
 | 
							cli.BoolTFlag{
 | 
				
			||||||
			Name:  "pause, p",
 | 
								Name:  "pause, p",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -418,7 +418,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// SHM SIze
 | 
						// SHM Size
 | 
				
			||||||
	shmSize, err := units.FromHumanSize(c.String("shm-size"))
 | 
						shmSize, err := units.FromHumanSize(c.String("shm-size"))
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, errors.Wrapf(err, "unable to translate --shm-size")
 | 
							return nil, errors.Wrapf(err, "unable to translate --shm-size")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -120,7 +120,7 @@ func importCmd(c *cli.Context) error {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// donwloadFromURL downloads an image in the format "https:/example.com/myimage.tar"
 | 
					// donwloadFromURL downloads an image in the format "https:/example.com/myimage.tar"
 | 
				
			||||||
// and tempoarily saves in it /var/tmp/importxyz, which is deleted after the image is imported
 | 
					// and temporarily saves in it /var/tmp/importxyz, which is deleted after the image is imported
 | 
				
			||||||
func downloadFromURL(source string) (string, error) {
 | 
					func downloadFromURL(source string) (string, error) {
 | 
				
			||||||
	fmt.Printf("Downloading from %q\n", source)
 | 
						fmt.Printf("Downloading from %q\n", source)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -60,7 +60,7 @@ func inspectCmd(c *cli.Context) error {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(args) > 0 && latestContainer {
 | 
						if len(args) > 0 && latestContainer {
 | 
				
			||||||
		return errors.Errorf("you cannot provide additional arguements with --latest")
 | 
							return errors.Errorf("you cannot provide additional arguments with --latest")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if err := validateFlags(c, inspectFlags); err != nil {
 | 
						if err := validateFlags(c, inspectFlags); err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -109,7 +109,7 @@ func pullCmd(c *cli.Context) error {
 | 
				
			||||||
		return errors.Wrapf(err, "error pulling image %q", image)
 | 
							return errors.Wrapf(err, "error pulling image %q", image)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Intentially choosing to ignore if there is an error because
 | 
						// Intentionally choosing to ignore if there is an error because
 | 
				
			||||||
	// outputting the image ID is a NTH and not integral to the pull
 | 
						// outputting the image ID is a NTH and not integral to the pull
 | 
				
			||||||
	fmt.Println(newImage.ID())
 | 
						fmt.Println(newImage.ID())
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -88,7 +88,7 @@ func getRuntimeSpec(c *cli.Context) (*spec.Spec, error) {
 | 
				
			||||||
	return runtimeSpec, nil
 | 
						return runtimeSpec, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// TestPIDsLimit verifies the inputed pid-limit is correctly defined in the spec
 | 
					// TestPIDsLimit verifies the inputted pid-limit is correctly defined in the spec
 | 
				
			||||||
func TestPIDsLimit(t *testing.T) {
 | 
					func TestPIDsLimit(t *testing.T) {
 | 
				
			||||||
	a := createCLI()
 | 
						a := createCLI()
 | 
				
			||||||
	args := []string{"--pids-limit", "22"}
 | 
						args := []string{"--pids-limit", "22"}
 | 
				
			||||||
| 
						 | 
					@ -100,7 +100,7 @@ func TestPIDsLimit(t *testing.T) {
 | 
				
			||||||
	assert.Equal(t, runtimeSpec.Linux.Resources.Pids.Limit, int64(22))
 | 
						assert.Equal(t, runtimeSpec.Linux.Resources.Pids.Limit, int64(22))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// TestBLKIOWeightDevice verifies the inputed blkio weigh device is correctly defined in the spec
 | 
					// TestBLKIOWeightDevice verifies the inputted blkio weigh device is correctly defined in the spec
 | 
				
			||||||
func TestBLKIOWeightDevice(t *testing.T) {
 | 
					func TestBLKIOWeightDevice(t *testing.T) {
 | 
				
			||||||
	a := createCLI()
 | 
						a := createCLI()
 | 
				
			||||||
	args := []string{"--blkio-weight-device", "/dev/zero:100"}
 | 
						args := []string{"--blkio-weight-device", "/dev/zero:100"}
 | 
				
			||||||
| 
						 | 
					@ -112,7 +112,7 @@ func TestBLKIOWeightDevice(t *testing.T) {
 | 
				
			||||||
	assert.Equal(t, *runtimeSpec.Linux.Resources.BlockIO.WeightDevice[0].Weight, uint16(100))
 | 
						assert.Equal(t, *runtimeSpec.Linux.Resources.BlockIO.WeightDevice[0].Weight, uint16(100))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// TestMemorySwap verifies that the inputed memory swap is correctly defined in the spec
 | 
					// TestMemorySwap verifies that the inputted memory swap is correctly defined in the spec
 | 
				
			||||||
func TestMemorySwap(t *testing.T) {
 | 
					func TestMemorySwap(t *testing.T) {
 | 
				
			||||||
	a := createCLI()
 | 
						a := createCLI()
 | 
				
			||||||
	args := []string{"--memory-swap", "45m", "--memory", "40m"}
 | 
						args := []string{"--memory-swap", "45m", "--memory", "40m"}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -51,7 +51,7 @@ type ImageHistory (
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ImageSearch is the returned structure for SearchImage.  It is returned
 | 
					# ImageSearch is the returned structure for SearchImage.  It is returned
 | 
				
			||||||
# in arrary form.
 | 
					# in array form.
 | 
				
			||||||
type ImageSearch (
 | 
					type ImageSearch (
 | 
				
			||||||
    description: string,
 | 
					    description: string,
 | 
				
			||||||
    is_official: bool,
 | 
					    is_official: bool,
 | 
				
			||||||
| 
						 | 
					@ -330,7 +330,7 @@ method InspectContainer(name: string) -> (container: string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ListContainerProcesses takes a name or ID of a container and returns the processes
 | 
					# ListContainerProcesses takes a name or ID of a container and returns the processes
 | 
				
			||||||
# running inside the container as array of strings.  It will accept an array of string
 | 
					# running inside the container as array of strings.  It will accept an array of string
 | 
				
			||||||
# arguements that represent ps options.  If the container cannot be found, a [ContainerNotFound](#ContainerNotFound)
 | 
					# arguments that represent ps options.  If the container cannot be found, a [ContainerNotFound](#ContainerNotFound)
 | 
				
			||||||
# error will be returned.
 | 
					# error will be returned.
 | 
				
			||||||
# #### Example
 | 
					# #### Example
 | 
				
			||||||
# ~~~
 | 
					# ~~~
 | 
				
			||||||
| 
						 | 
					@ -398,7 +398,7 @@ method ResizeContainerTty() -> (notimplemented: NotImplemented)
 | 
				
			||||||
method StartContainer(name: string) -> (container: string)
 | 
					method StartContainer(name: string) -> (container: string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# StopContainer stops a container given a timeout.  It takes the name or ID of a container as well as a
 | 
					# StopContainer stops a container given a timeout.  It takes the name or ID of a container as well as a
 | 
				
			||||||
# timeout value.  The timeout value the time before a forceable stop to the container is applied.  It
 | 
					# timeout value.  The timeout value the time before a forcible stop to the container is applied.  It
 | 
				
			||||||
# returns the container ID once stopped. If the container cannot be found, a [ContainerNotFound](#ContainerNotFound)
 | 
					# returns the container ID once stopped. If the container cannot be found, a [ContainerNotFound](#ContainerNotFound)
 | 
				
			||||||
# error will be returned instead. See also [KillContainer](KillContainer).
 | 
					# error will be returned instead. See also [KillContainer](KillContainer).
 | 
				
			||||||
# #### Error
 | 
					# #### Error
 | 
				
			||||||
| 
						 | 
					@ -411,7 +411,7 @@ method StartContainer(name: string) -> (container: string)
 | 
				
			||||||
method StopContainer(name: string, timeout: int) -> (container: string)
 | 
					method StopContainer(name: string, timeout: int) -> (container: string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# RestartContainer will restart a running container given a container name or ID and timeout value. The timeout
 | 
					# RestartContainer will restart a running container given a container name or ID and timeout value. The timeout
 | 
				
			||||||
# value is the time before a forceable stop is used to stop the container.  If the container cannot be found by
 | 
					# value is the time before a forcible stop is used to stop the container.  If the container cannot be found by
 | 
				
			||||||
# name or ID, a [ContainerNotFound](#ContainerNotFound)  error will be returned; otherwise, the ID of the
 | 
					# name or ID, a [ContainerNotFound](#ContainerNotFound)  error will be returned; otherwise, the ID of the
 | 
				
			||||||
# container will be returned.
 | 
					# container will be returned.
 | 
				
			||||||
method RestartContainer(name: string, timeout: int) -> (container: string)
 | 
					method RestartContainer(name: string, timeout: int) -> (container: string)
 | 
				
			||||||
| 
						 | 
					@ -463,7 +463,7 @@ method GetAttachSockets(name: string) -> (sockets: Sockets)
 | 
				
			||||||
method WaitContainer(name: string) -> (exitcode: int)
 | 
					method WaitContainer(name: string) -> (exitcode: int)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# RemoveContainer takes requires the name or ID of container as well a boolean representing whether a running
 | 
					# RemoveContainer takes requires the name or ID of container as well a boolean representing whether a running
 | 
				
			||||||
# container can be stopped and removed.  Upon sucessful removal of the container, its ID is returned.  If the
 | 
					# container can be stopped and removed.  Upon successful removal of the container, its ID is returned.  If the
 | 
				
			||||||
# container cannot be found by name or ID, a [ContainerNotFound](#ContainerNotFound) error will be returned.
 | 
					# container cannot be found by name or ID, a [ContainerNotFound](#ContainerNotFound) error will be returned.
 | 
				
			||||||
# #### Example
 | 
					# #### Example
 | 
				
			||||||
# ~~~
 | 
					# ~~~
 | 
				
			||||||
| 
						 | 
					@ -479,7 +479,7 @@ method RemoveContainer(name: string, force: bool) -> (container: string)
 | 
				
			||||||
method DeleteStoppedContainers() -> (containers: []string)
 | 
					method DeleteStoppedContainers() -> (containers: []string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ListImages returns an array of ImageInList structures which provide basic information about
 | 
					# ListImages returns an array of ImageInList structures which provide basic information about
 | 
				
			||||||
# an image currenly in storage.  See also [InspectImage](InspectImage).
 | 
					# an image currently in storage.  See also [InspectImage](InspectImage).
 | 
				
			||||||
method ListImages() -> (images: []ImageInList)
 | 
					method ListImages() -> (images: []ImageInList)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This function is not implemented yet.
 | 
					# This function is not implemented yet.
 | 
				
			||||||
| 
						 | 
					@ -507,7 +507,7 @@ method PushImage(name: string, tag: string, tlsverify: bool) -> (image: string)
 | 
				
			||||||
# be found, an [ImageNotFound](#ImageNotFound) error will be returned; otherwise, the ID of the image is returned on success.
 | 
					# be found, an [ImageNotFound](#ImageNotFound) error will be returned; otherwise, the ID of the image is returned on success.
 | 
				
			||||||
method TagImage(name: string, tagged: string) -> (image: string)
 | 
					method TagImage(name: string, tagged: string) -> (image: string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# RemoveImage takes the name or ID of an image as well as a booleon that determines if containers using that image
 | 
					# RemoveImage takes the name or ID of an image as well as a boolean that determines if containers using that image
 | 
				
			||||||
# should be deleted.  If the image cannot be found, an [ImageNotFound](#ImageNotFound) error will be returned.  The
 | 
					# should be deleted.  If the image cannot be found, an [ImageNotFound](#ImageNotFound) error will be returned.  The
 | 
				
			||||||
# ID of the removed image is returned when complete.  See also [DeleteUnusedImages](DeleteUnusedImages).
 | 
					# ID of the removed image is returned when complete.  See also [DeleteUnusedImages](DeleteUnusedImages).
 | 
				
			||||||
# #### Example
 | 
					# #### Example
 | 
				
			||||||
| 
						 | 
					@ -542,7 +542,7 @@ method Commit(name: string, image_name: string, changes: []string, author: strin
 | 
				
			||||||
method ImportImage(source: string, reference: string, message: string, changes: []string) -> (image: string)
 | 
					method ImportImage(source: string, reference: string, message: string, changes: []string) -> (image: string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ExportImage takes the name or ID of an image and exports it to a destination like a tarball.  There is also
 | 
					# ExportImage takes the name or ID of an image and exports it to a destination like a tarball.  There is also
 | 
				
			||||||
# a booleon option to force compression.  Upon completion, the ID of the image is returned. If the image cannot
 | 
					# a boolean option to force compression.  Upon completion, the ID of the image is returned. If the image cannot
 | 
				
			||||||
# be found in local storage, an [ImageNotFound](#ImageNotFound) error will be returned. See also [ImportImage](ImportImage).
 | 
					# be found in local storage, an [ImageNotFound](#ImageNotFound) error will be returned. See also [ImportImage](ImportImage).
 | 
				
			||||||
method ExportImage(name: string, destination: string, compress: bool) -> (image: string)
 | 
					method ExportImage(name: string, destination: string, compress: bool) -> (image: string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,7 +42,7 @@ class Container(collections.UserDict):
 | 
				
			||||||
    def attach(self, detach_key=None, no_stdin=False, sig_proxy=True):
 | 
					    def attach(self, detach_key=None, no_stdin=False, sig_proxy=True):
 | 
				
			||||||
        """Attach to running container."""
 | 
					        """Attach to running container."""
 | 
				
			||||||
        with self._client() as podman:
 | 
					        with self._client() as podman:
 | 
				
			||||||
            # TODO: streaming and port magic occur, need arguements
 | 
					            # TODO: streaming and port magic occur, need arguments
 | 
				
			||||||
            podman.AttachToContainer()
 | 
					            podman.AttachToContainer()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def processes(self):
 | 
					    def processes(self):
 | 
				
			||||||
| 
						 | 
					@ -163,7 +163,7 @@ class Container(collections.UserDict):
 | 
				
			||||||
    def rename(self, target):
 | 
					    def rename(self, target):
 | 
				
			||||||
        """Rename container, return id on success."""
 | 
					        """Rename container, return id on success."""
 | 
				
			||||||
        with self._client() as podman:
 | 
					        with self._client() as podman:
 | 
				
			||||||
            # TODO: Need arguements
 | 
					            # TODO: Need arguments
 | 
				
			||||||
            results = podman.RenameContainer()
 | 
					            results = podman.RenameContainer()
 | 
				
			||||||
        # TODO: fixup objects cached information
 | 
					        # TODO: fixup objects cached information
 | 
				
			||||||
        return results['container']
 | 
					        return results['container']
 | 
				
			||||||
| 
						 | 
					@ -171,7 +171,7 @@ class Container(collections.UserDict):
 | 
				
			||||||
    def resize_tty(self, width, height):
 | 
					    def resize_tty(self, width, height):
 | 
				
			||||||
        """Resize container tty."""
 | 
					        """Resize container tty."""
 | 
				
			||||||
        with self._client() as podman:
 | 
					        with self._client() as podman:
 | 
				
			||||||
            # TODO: magic re: attach(), arguements
 | 
					            # TODO: magic re: attach(), arguments
 | 
				
			||||||
            podman.ResizeContainerTty()
 | 
					            podman.ResizeContainerTty()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def pause(self):
 | 
					    def pause(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -427,7 +427,7 @@ func (s *BoltState) addContainer(ctr *Container, pod *Pod) error {
 | 
				
			||||||
					return errors.Wrapf(ErrInvalidArg, "container %s depends on container %s which is in a different pod (%s)", ctr.ID(), dependsCtr, string(depCtrPod))
 | 
										return errors.Wrapf(ErrInvalidArg, "container %s depends on container %s which is in a different pod (%s)", ctr.ID(), dependsCtr, string(depCtrPod))
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				// If we're not part of a pod, we cannot depend on containets in a pod
 | 
									// If we're not part of a pod, we cannot depend on containers in a pod
 | 
				
			||||||
				if depCtrPod != nil {
 | 
									if depCtrPod != nil {
 | 
				
			||||||
					return errors.Wrapf(ErrInvalidArg, "container %s depends on container %s which is in a pod - containers not in pods cannot depend on containers in pods", ctr.ID(), dependsCtr)
 | 
										return errors.Wrapf(ErrInvalidArg, "container %s depends on container %s which is in a pod - containers not in pods cannot depend on containers in pods", ctr.ID(), dependsCtr)
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -65,7 +65,7 @@ func (c *Container) attach(streams *AttachStreams, keys string, resize <-chan re
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// attachContainerSocket connects to the container's attach socket and deals with the IO
 | 
					// attachContainerSocket connects to the container's attach socket and deals with the IO
 | 
				
			||||||
// TODO add a channel to allow interruptiong
 | 
					// TODO add a channel to allow interrupting
 | 
				
			||||||
func (c *Container) attachContainerSocket(resize <-chan remotecommand.TerminalSize, detachKeys []byte, streams *AttachStreams) error {
 | 
					func (c *Container) attachContainerSocket(resize <-chan remotecommand.TerminalSize, detachKeys []byte, streams *AttachStreams) error {
 | 
				
			||||||
	kubeutils.HandleResizing(resize, func(size remotecommand.TerminalSize) {
 | 
						kubeutils.HandleResizing(resize, func(size remotecommand.TerminalSize) {
 | 
				
			||||||
		controlPath := filepath.Join(c.bundlePath(), "ctl")
 | 
							controlPath := filepath.Join(c.bundlePath(), "ctl")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -83,7 +83,7 @@ func (c *Container) rootFsSize() (int64, error) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	// Get the size of the last layer.  Has to be outside of the loop
 | 
						// Get the size of the last layer.  Has to be outside of the loop
 | 
				
			||||||
	// because the parent of the last layer is "", andlstore.Get("")
 | 
						// because the parent of the last layer is "", and lstore.Get("")
 | 
				
			||||||
	// will return an error.
 | 
						// will return an error.
 | 
				
			||||||
	layerSize, err := c.runtime.store.DiffSize(layer.Parent, layer.ID)
 | 
						layerSize, err := c.runtime.store.DiffSize(layer.Parent, layer.ID)
 | 
				
			||||||
	return size + layerSize, err
 | 
						return size + layerSize, err
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -67,7 +67,7 @@ func OutputImageFilter(userImage *Image) ResultFilter {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// FilterImages filters images using a set of predefined fitler funcs
 | 
					// FilterImages filters images using a set of predefined filter funcs
 | 
				
			||||||
func FilterImages(images []*Image, filters []ResultFilter) []*Image {
 | 
					func FilterImages(images []*Image, filters []ResultFilter) []*Image {
 | 
				
			||||||
	var filteredImages []*Image
 | 
						var filteredImages []*Image
 | 
				
			||||||
	for _, image := range images {
 | 
						for _, image := range images {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -72,7 +72,7 @@ func getCopyOptions(reportWriter io.Writer, signaturePolicyPath string, srcDocke
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// getPolicyContext sets up, intializes and returns a new context for the specified policy
 | 
					// getPolicyContext sets up, initializes and returns a new context for the specified policy
 | 
				
			||||||
func getPolicyContext(ctx *types.SystemContext) (*signature.PolicyContext, error) {
 | 
					func getPolicyContext(ctx *types.SystemContext) (*signature.PolicyContext, error) {
 | 
				
			||||||
	policy, err := signature.DefaultPolicy(ctx)
 | 
						policy, err := signature.DefaultPolicy(ctx)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,7 +38,7 @@ func (r *Runtime) hostInfo() (map[string]interface{}, error) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	kv, err := readKernelVersion()
 | 
						kv, err := readKernelVersion()
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, errors.Wrapf(err, "error reading kernet version")
 | 
							return nil, errors.Wrapf(err, "error reading kernel version")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	info["kernel"] = kv
 | 
						info["kernel"] = kv
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -589,7 +589,7 @@ func (r *Runtime) Info() ([]InfoData, error) {
 | 
				
			||||||
	return info, nil
 | 
						return info, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// generateName generates a unigue name for a container or pod.
 | 
					// generateName generates a unique name for a container or pod.
 | 
				
			||||||
func (r *Runtime) generateName() (string, error) {
 | 
					func (r *Runtime) generateName() (string, error) {
 | 
				
			||||||
	for {
 | 
						for {
 | 
				
			||||||
		name := namesgenerator.GetRandomName(0)
 | 
							name := namesgenerator.GetRandomName(0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -56,7 +56,7 @@ type State interface {
 | 
				
			||||||
	// Only empty pods can be removed from the state
 | 
						// Only empty pods can be removed from the state
 | 
				
			||||||
	RemovePod(pod *Pod) error
 | 
						RemovePod(pod *Pod) error
 | 
				
			||||||
	// Remove all containers from a pod
 | 
						// Remove all containers from a pod
 | 
				
			||||||
	// Used to simulataneously remove containers that might otherwise have
 | 
						// Used to simultaneously remove containers that might otherwise have
 | 
				
			||||||
	// dependency issues
 | 
						// dependency issues
 | 
				
			||||||
	// Will fail if a dependency outside the pod is encountered
 | 
						// Will fail if a dependency outside the pod is encountered
 | 
				
			||||||
	RemovePodContainers(pod *Pod) error
 | 
						RemovePodContainers(pod *Pod) error
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -79,7 +79,7 @@ const (
 | 
				
			||||||
	// StdinOnce is the stdin_once annotation
 | 
						// StdinOnce is the stdin_once annotation
 | 
				
			||||||
	StdinOnce = "io.kubernetes.cri-o.StdinOnce"
 | 
						StdinOnce = "io.kubernetes.cri-o.StdinOnce"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Volumes is the volumes annotatoin
 | 
						// Volumes is the volumes annotation
 | 
				
			||||||
	Volumes = "io.kubernetes.cri-o.Volumes"
 | 
						Volumes = "io.kubernetes.cri-o.Volumes"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,7 @@ func GetRegistries() ([]string, error) {
 | 
				
			||||||
	return searchRegistries, nil
 | 
						return searchRegistries, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// GetInsecureRegistries obtains the list of inseure registries from the global registration file.
 | 
					// GetInsecureRegistries obtains the list of insecure registries from the global registration file.
 | 
				
			||||||
func GetInsecureRegistries() ([]string, error) {
 | 
					func GetInsecureRegistries() ([]string, error) {
 | 
				
			||||||
	registryConfigPath := ""
 | 
						registryConfigPath := ""
 | 
				
			||||||
	envOverride := os.Getenv("REGISTRIES_CONFIG_PATH")
 | 
						envOverride := os.Getenv("REGISTRIES_CONFIG_PATH")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -237,7 +237,7 @@ func addSecretsFromMountsFile(filePath, mountLabel, containerWorkingDir, mountPr
 | 
				
			||||||
	return mounts, nil
 | 
						return mounts, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// addFIPSModeSecret creates /run/secrets/system-fips in the container
 | 
					// addFIPSsModeSecret creates /run/secrets/system-fips in the container
 | 
				
			||||||
// root filesystem if /etc/system-fips exists on hosts.
 | 
					// root filesystem if /etc/system-fips exists on hosts.
 | 
				
			||||||
// This enables the container to be FIPS compliant and run openssl in
 | 
					// This enables the container to be FIPS compliant and run openssl in
 | 
				
			||||||
// FIPS mode as the host is also in FIPS mode.
 | 
					// FIPS mode as the host is also in FIPS mode.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,7 +36,7 @@ func ExposedPorts(expose, publish []string, publishAll bool, imageExposedPorts m
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// parse user input'd port bindings
 | 
						// parse user inputted port bindings
 | 
				
			||||||
	pbPorts, portBindings, err := nat.ParsePortSpecs(publish)
 | 
						pbPorts, portBindings, err := nat.ParsePortSpecs(publish)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -273,7 +273,7 @@ func (i *LibpodAPI) StartContainer(call ioprojectatomicpodman.VarlinkCall, name
 | 
				
			||||||
		return call.ReplyErrorOccurred(err.Error())
 | 
							return call.ReplyErrorOccurred(err.Error())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if state == libpod.ContainerStateRunning || state == libpod.ContainerStatePaused {
 | 
						if state == libpod.ContainerStateRunning || state == libpod.ContainerStatePaused {
 | 
				
			||||||
		return call.ReplyErrorOccurred("container is alrady running or paused")
 | 
							return call.ReplyErrorOccurred("container is already running or paused")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if err := ctr.Start(getContext()); err != nil {
 | 
						if err := ctr.Start(getContext()); err != nil {
 | 
				
			||||||
		return call.ReplyErrorOccurred(err.Error())
 | 
							return call.ReplyErrorOccurred(err.Error())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -254,7 +254,7 @@ func (s *PodmanSession) OutputToStringArray() []string {
 | 
				
			||||||
	return strings.Split(output, "\n")
 | 
						return strings.Split(output, "\n")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// IsJSONOutputValid attempts to unmarshall the session buffer
 | 
					// IsJSONOutputValid attempts to unmarshal the session buffer
 | 
				
			||||||
// and if successful, returns true, else false
 | 
					// and if successful, returns true, else false
 | 
				
			||||||
func (s *PodmanSession) IsJSONOutputValid() bool {
 | 
					func (s *PodmanSession) IsJSONOutputValid() bool {
 | 
				
			||||||
	var i interface{}
 | 
						var i interface{}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -160,7 +160,7 @@ var _ = Describe("Podman push", func() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			defer podmanTest.SystemExec("systemctl", []string{"stop", "docker"})
 | 
								defer podmanTest.SystemExec("systemctl", []string{"stop", "docker"})
 | 
				
			||||||
		} else if setup.ExitCode() != 0 {
 | 
							} else if setup.ExitCode() != 0 {
 | 
				
			||||||
			Skip("Docker is not avaiable")
 | 
								Skip("Docker is not available")
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		session := podmanTest.Podman([]string{"push", ALPINE, "docker-daemon:alpine:podmantest"})
 | 
							session := podmanTest.Podman([]string{"push", ALPINE, "docker-daemon:alpine:podmantest"})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -59,7 +59,7 @@ var _ = Describe("Podman rmi", func() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	It("podman rmi all images forceably with short options", func() {
 | 
						It("podman rmi all images forcibly with short options", func() {
 | 
				
			||||||
		podmanTest.PullImages([]string{image3})
 | 
							podmanTest.PullImages([]string{image3})
 | 
				
			||||||
		session := podmanTest.Podman([]string{"rmi", "-fa"})
 | 
							session := podmanTest.Podman([]string{"rmi", "-fa"})
 | 
				
			||||||
		session.WaitWithDefaultTimeout()
 | 
							session.WaitWithDefaultTimeout()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue