mirror of
https://github.com/containers/podman.git
synced 2025-06-18 15:39:08 +08:00
Spell check strings and comments
Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #831 Approved by: rhatdan
This commit is contained in:
@ -32,7 +32,7 @@ var (
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "author, a",
|
||||
Usage: "Set the author for the image comitted",
|
||||
Usage: "Set the author for the image committed",
|
||||
},
|
||||
cli.BoolTFlag{
|
||||
Name: "pause, p",
|
||||
|
@ -418,7 +418,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// SHM SIze
|
||||
// SHM Size
|
||||
shmSize, err := units.FromHumanSize(c.String("shm-size"))
|
||||
if err != nil {
|
||||
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"
|
||||
// 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) {
|
||||
fmt.Printf("Downloading from %q\n", source)
|
||||
|
||||
|
@ -60,7 +60,7 @@ func inspectCmd(c *cli.Context) error {
|
||||
}
|
||||
|
||||
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 {
|
||||
return err
|
||||
|
@ -109,7 +109,7 @@ func pullCmd(c *cli.Context) error {
|
||||
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
|
||||
fmt.Println(newImage.ID())
|
||||
return nil
|
||||
|
@ -88,7 +88,7 @@ func getRuntimeSpec(c *cli.Context) (*spec.Spec, error) {
|
||||
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) {
|
||||
a := createCLI()
|
||||
args := []string{"--pids-limit", "22"}
|
||||
@ -100,7 +100,7 @@ func TestPIDsLimit(t *testing.T) {
|
||||
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) {
|
||||
a := createCLI()
|
||||
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))
|
||||
}
|
||||
|
||||
// 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) {
|
||||
a := createCLI()
|
||||
args := []string{"--memory-swap", "45m", "--memory", "40m"}
|
||||
|
@ -51,7 +51,7 @@ type ImageHistory (
|
||||
)
|
||||
|
||||
# ImageSearch is the returned structure for SearchImage. It is returned
|
||||
# in arrary form.
|
||||
# in array form.
|
||||
type ImageSearch (
|
||||
description: string,
|
||||
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
|
||||
# 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.
|
||||
# #### Example
|
||||
# ~~~
|
||||
@ -398,7 +398,7 @@ method ResizeContainerTty() -> (notimplemented: NotImplemented)
|
||||
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
|
||||
# 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)
|
||||
# error will be returned instead. See also [KillContainer](KillContainer).
|
||||
# #### Error
|
||||
@ -411,7 +411,7 @@ method StartContainer(name: string) -> (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
|
||||
# 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
|
||||
# container will be returned.
|
||||
method RestartContainer(name: string, timeout: int) -> (container: string)
|
||||
@ -463,7 +463,7 @@ method GetAttachSockets(name: string) -> (sockets: Sockets)
|
||||
method WaitContainer(name: string) -> (exitcode: int)
|
||||
|
||||
# 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.
|
||||
# #### Example
|
||||
# ~~~
|
||||
@ -479,7 +479,7 @@ method RemoveContainer(name: string, force: bool) -> (container: string)
|
||||
method DeleteStoppedContainers() -> (containers: []string)
|
||||
|
||||
# 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)
|
||||
|
||||
# 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.
|
||||
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
|
||||
# ID of the removed image is returned when complete. See also [DeleteUnusedImages](DeleteUnusedImages).
|
||||
# #### 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)
|
||||
|
||||
# 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).
|
||||
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):
|
||||
"""Attach to running container."""
|
||||
with self._client() as podman:
|
||||
# TODO: streaming and port magic occur, need arguements
|
||||
# TODO: streaming and port magic occur, need arguments
|
||||
podman.AttachToContainer()
|
||||
|
||||
def processes(self):
|
||||
@ -163,7 +163,7 @@ class Container(collections.UserDict):
|
||||
def rename(self, target):
|
||||
"""Rename container, return id on success."""
|
||||
with self._client() as podman:
|
||||
# TODO: Need arguements
|
||||
# TODO: Need arguments
|
||||
results = podman.RenameContainer()
|
||||
# TODO: fixup objects cached information
|
||||
return results['container']
|
||||
@ -171,7 +171,7 @@ class Container(collections.UserDict):
|
||||
def resize_tty(self, width, height):
|
||||
"""Resize container tty."""
|
||||
with self._client() as podman:
|
||||
# TODO: magic re: attach(), arguements
|
||||
# TODO: magic re: attach(), arguments
|
||||
podman.ResizeContainerTty()
|
||||
|
||||
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))
|
||||
}
|
||||
} 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 {
|
||||
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
|
||||
// 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 {
|
||||
kubeutils.HandleResizing(resize, func(size remotecommand.TerminalSize) {
|
||||
controlPath := filepath.Join(c.bundlePath(), "ctl")
|
||||
|
@ -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 {
|
||||
var filteredImages []*Image
|
||||
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) {
|
||||
policy, err := signature.DefaultPolicy(ctx)
|
||||
if err != nil {
|
||||
|
@ -38,7 +38,7 @@ func (r *Runtime) hostInfo() (map[string]interface{}, error) {
|
||||
|
||||
kv, err := readKernelVersion()
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "error reading kernet version")
|
||||
return nil, errors.Wrapf(err, "error reading kernel version")
|
||||
}
|
||||
info["kernel"] = kv
|
||||
|
||||
|
@ -589,7 +589,7 @@ func (r *Runtime) Info() ([]InfoData, error) {
|
||||
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) {
|
||||
for {
|
||||
name := namesgenerator.GetRandomName(0)
|
||||
|
@ -56,7 +56,7 @@ type State interface {
|
||||
// Only empty pods can be removed from the state
|
||||
RemovePod(pod *Pod) error
|
||||
// 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
|
||||
// Will fail if a dependency outside the pod is encountered
|
||||
RemovePodContainers(pod *Pod) error
|
||||
|
@ -79,7 +79,7 @@ const (
|
||||
// StdinOnce is the stdin_once annotation
|
||||
StdinOnce = "io.kubernetes.cri-o.StdinOnce"
|
||||
|
||||
// Volumes is the volumes annotatoin
|
||||
// Volumes is the volumes annotation
|
||||
Volumes = "io.kubernetes.cri-o.Volumes"
|
||||
)
|
||||
|
||||
|
@ -22,7 +22,7 @@ func GetRegistries() ([]string, error) {
|
||||
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) {
|
||||
registryConfigPath := ""
|
||||
envOverride := os.Getenv("REGISTRIES_CONFIG_PATH")
|
||||
|
@ -237,7 +237,7 @@ func addSecretsFromMountsFile(filePath, mountLabel, containerWorkingDir, mountPr
|
||||
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.
|
||||
// This enables the container to be FIPS compliant and run openssl in
|
||||
// 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)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -273,7 +273,7 @@ func (i *LibpodAPI) StartContainer(call ioprojectatomicpodman.VarlinkCall, name
|
||||
return call.ReplyErrorOccurred(err.Error())
|
||||
}
|
||||
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 {
|
||||
return call.ReplyErrorOccurred(err.Error())
|
||||
|
@ -254,7 +254,7 @@ func (s *PodmanSession) OutputToStringArray() []string {
|
||||
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
|
||||
func (s *PodmanSession) IsJSONOutputValid() bool {
|
||||
var i interface{}
|
||||
|
@ -160,7 +160,7 @@ var _ = Describe("Podman push", func() {
|
||||
|
||||
defer podmanTest.SystemExec("systemctl", []string{"stop", "docker"})
|
||||
} 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"})
|
||||
|
@ -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})
|
||||
session := podmanTest.Podman([]string{"rmi", "-fa"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
Reference in New Issue
Block a user