diff options
Diffstat (limited to 'cmd/podman/varlink')
-rw-r--r-- | cmd/podman/varlink/io.podman.varlink | 91 |
1 files changed, 49 insertions, 42 deletions
diff --git a/cmd/podman/varlink/io.podman.varlink b/cmd/podman/varlink/io.podman.varlink index 336600b2f..3d4a8fa84 100644 --- a/cmd/podman/varlink/io.podman.varlink +++ b/cmd/podman/varlink/io.podman.varlink @@ -1,5 +1,5 @@ # Podman Service Interface and API description. The master version of this document can be found -# in the [API.md](https://github.com/projectatomic/libpod/blob/master/API.md) file in the upstream libpod repository. +# in the [API.md](https://github.com/containers/libpod/blob/master/API.md) file in the upstream libpod repository. interface io.podman @@ -334,6 +334,13 @@ type ListPodContainerInfo ( status: string ) +# PodCreate is an input structure for creating pods. +type PodCreate ( + name: string, + cgroupParent: string, + labels: [string]string +) + # ListPodData is the returned struct for an individual pod type ListPodData ( id: string, @@ -346,6 +353,11 @@ type ListPodData ( containersinfo: []ListPodContainerInfo ) +type PodContainerErrorData ( + containerid: string, + reason: string +) + # Ping provides a response for developers to ensure their varlink setup is working. # #### Example # ~~~ @@ -605,7 +617,7 @@ method DeleteUnusedImages() -> (images: []string) # container while it is being committed, pass a _true_ bool for the pause argument. If the container cannot # be found by the ID or name provided, a (ContainerNotFound)[#ContainerNotFound] error will be returned; otherwise, # the resulting image's ID will be returned as a string. -method Commit(name: string, image_name: string, changes: []string, author: string, message: string, pause: bool) -> (image: string) +method Commit(name: string, image_name: string, changes: []string, author: string, message: string, pause: bool, manifestType: string) -> (image: string) # ImportImage imports an image from a source (like tarball) into local storage. The image can have additional # descriptions added to it using the message and changes options. See also [ExportImage](ExportImage). @@ -629,114 +641,115 @@ method ExportImage(name: string, destination: string, compress: bool, tags: []st # ~~~ method PullImage(name: string) -> (id: string) -# CreatePod creates a new empty pod. It takes name and cgroup_parent args as strings, and a labels map +# CreatePod creates a new empty pod. It uses a [PodCreate](#PodCreate) type for input. # On success, the ID of the newly created pod will be returned. # #### Example # ~~~ -# $ varlink call unix:/run/podman/io.podman/io.podman.CreatePod '{"name": "test"}' +# $ varlink call unix:/run/podman/io.podman/io.podman.CreatePod '{"create": {"name": "test"}}' # { -# "pod": "8759dafbc0a4dc3bcfb57eeb72e4331eb73c5cc09ab968e65ce45b9ad5c4b6bb" +# "pod": "b05dee7bd4ccfee688099fe1588a7a898d6ddd6897de9251d4671c9b0feacb2a" # } +# # ~~~ -method CreatePod() -> (notimplemented: NotImplemented) +method CreatePod(create: PodCreate) -> (pod: string) # ListPods returns a list of pods in no particular order. They are # returned as an array of ListPodData structs. See also [GetPod](#GetPod). -method ListPods() -> (notimplemented: NotImplemented) +method ListPods() -> (pods: []ListPodData) # GetPod takes a name or ID of a pod and returns single [ListPodData](#ListPodData) # structure. A [PodNotFound](#PodNotFound) error will be returned if the pod cannot be found. # See also [ListPods](ListPods). -method GetPod() -> (notimplemented: NotImplemented) +method GetPod(name: string) -> (pod: ListPodData) # InspectPod takes the name or ID of an image and returns a string respresentation of data associated with the # pod. You must serialize the string into JSON to use it further. A [PodNotFound](#PodNotFound) error will # be returned if the pod cannot be found. -method InspectPod() -> (notimplemented: NotImplemented) +method InspectPod(name: string) -> (pod: string) # StartPod starts containers in a pod. It takes the name or ID of pod. If the pod cannot be found, a [PodNotFound](#PodNotFound) -# error will be returned. If the pod has no containers, a [PodNoContainers](#PodNoContainers) error will be returned. -# Containers in a pod are started independently. If there is an error starting one container, the ID of those containers -# will be returned in a list of [PodContainerError](#PodContainerError). The ID of the pod is returned if any containers were started. +# error will be returned. Containers in a pod are started independently. If there is an error starting one container, the ID of those containers +# will be returned in a list, along with the ID of the pod in a [PodContainerError](#PodContainerError). +# If the pod was started with no errors, the pod ID is returned. # See also [CreatePod](#CreatePod). # #### Example # ~~~ # $ varlink call -m unix:/run/podman/io.podman/io.podman.StartPod '{"name": "135d71b9495f"}' # { # "pod": "135d71b9495f7c3967f536edad57750bfdb569336cd107d8aabab45565ffcfb6", -# "error": [] # } # ~~~ -method StartPod() -> (notimplemented: NotImplemented) +method StartPod(name: string) -> (pod: string) # StopPod stops containers in a pod. It takes the name or ID of a pod. # If the pod cannot be found, a [PodNotFound](#PodNotFound) error will be returned instead. # Containers in a pod are stopped independently. If there is an error stopping one container, the ID of those containers -# will be returned in a list of [PodContainerError](#PodContainerError). The ID of the pod is returned if any containers were stopped. +# will be returned in a list, along with the ID of the pod in a [PodContainerError](#PodContainerError). +# If the pod was stopped with no errors, the pod ID is returned. # See also [KillPod](KillPod). # #### Example # ~~~ # $ varlink call -m unix:/run/podman/io.podman/io.podman.StopPod '{"name": "135d71b9495f"}' # { # "pod": "135d71b9495f7c3967f536edad57750bfdb569336cd107d8aabab45565ffcfb6" -# "error": [] # } # ~~~ -method StopPod() -> (notimplemented: NotImplemented) +method StopPod(name: string) -> (pod: string) # RestartPod will restart containers in a pod given a pod name or ID. Containers in # the pod that are running will be stopped, then all stopped containers will be run. -# If the pod cannot be found by name or ID, a [PodNotFound](#PodNotFound) error will be -# returned. If the pod has no containers, a [PodNoContainers](#PodNoContainers) -# error will be returned. +# If the pod cannot be found by name or ID, a [PodNotFound](#PodNotFound) error will be returned. # Containers in a pod are restarted independently. If there is an error restarting one container, the ID of those containers -# will be returned in a list of [PodContainerError](#PodContainerError). The ID of the pod is returned if any containers were restarted. +# will be returned in a list, along with the ID of the pod in a [PodContainerError](#PodContainerError). +# If the pod was restarted with no errors, the pod ID is returned. # #### Example # ~~~ # $ varlink call -m unix:/run/podman/io.podman/io.podman.RestartPod '{"name": "135d71b9495f"}' # { # "pod": "135d71b9495f7c3967f536edad57750bfdb569336cd107d8aabab45565ffcfb6" -# "error": [] # } # ~~~ -method RestartPod() -> (notimplemented: NotImplemented) +method RestartPod(name: string) -> (pod: string) # KillPod takes the name or ID of a pod as well as a signal to be applied to the pod. If the pod cannot be found, a # [PodNotFound](#PodNotFound) error is returned. # Containers in a pod are killed independently. If there is an error killing one container, the ID of those containers -# will be returned in a list of [PodContainerError](#PodContainerError). The ID of the pod is returned if any containers were killed. +# will be returned in a list, along with the ID of the pod in a [PodContainerError](#PodContainerError). +# If the pod was killed with no errors, the pod ID is returned. # See also [StopPod](StopPod). -method KillPod() -> (notimplemented: NotImplemented) +method KillPod(name: string, signal: int) -> (pod: string) # PausePod takes the name or ID of a pod and pauses the running containers associated with it. If the pod cannot be found, # a [PodNotFound](#PodNotFound) error will be returned. # Containers in a pod are paused independently. If there is an error pausing one container, the ID of those containers -# will be returned in a list of [PodContainerError](#PodContainerError). The ID of the pod is returned if any containers were paused. +# will be returned in a list, along with the ID of the pod in a [PodContainerError](#PodContainerError). +# If the pod was paused with no errors, the pod ID is returned. # See also [UnpausePod](#UnpausePod). -method PausePod() -> (notimplemented: NotImplemented) +method PausePod(name: string) -> (pod: string) # UnpausePod takes the name or ID of a pod and unpauses the paused containers associated with it. If the pod cannot be # found, a [PodNotFound](#PodNotFound) error will be returned. -# Containers in a pod are unpaused independently. If there is an error pausing one container, the ID of those containers -# will be returned in a list of [PodContainerError](#PodContainerError). The ID of the pod is returned if any containers were unpaused. +# Containers in a pod are unpaused independently. If there is an error unpausing one container, the ID of those containers +# will be returned in a list, along with the ID of the pod in a [PodContainerError](#PodContainerError). +# If the pod was unpaused with no errors, the pod ID is returned. # See also [PausePod](#PausePod). -method UnpausePod() -> (notimplemented: NotImplemented) +method UnpausePod(name: string) -> (pod: string) # RemovePod takes the name or ID of a pod as well a boolean representing whether a running # container in the pod can be stopped and removed. If a pod has containers associated with it, and force is not true, -# a [PodHasContainer](#PodHasContainer) error will be returned. +# an error will occur. # If the pod cannot be found by name or ID, a [PodNotFound](#PodNotFound) error will be returned. # Containers in a pod are removed independently. If there is an error removing any container, the ID of those containers -# will be returned in a list of [PodContainerError](#PodContainerError). The ID of the pod is returned if any containers were removed. +# will be returned in a list, along with the ID of the pod in a [PodContainerError](#PodContainerError). +# If the pod was removed with no errors, the pod ID is returned. # #### Example # ~~~ -# $ varlink call -m unix:/run/podman/io.podman/io.podman.RemovePod '{"name": "62f4fd98cb57"}' +# $ varlink call -m unix:/run/podman/io.podman/io.podman.RemovePod '{"name": "62f4fd98cb57", "force": "true"}' # { # "pod": "62f4fd98cb57f529831e8f90610e54bba74bd6f02920ffb485e15376ed365c20" -# "error": [] # } # ~~~ -method RemovePod() -> (notimplemented: NotImplemented) +method RemovePod(name: string, force: bool) -> (pod: string) # This method has not be implemented yet. method WaitPod() -> (notimplemented: NotImplemented) @@ -756,15 +769,9 @@ error ContainerNotFound (name: string) # PodNotFound means the pod could not be found by the provided name or ID in local storage. error PodNotFound (name: string) -# PodNoContainers means the pod does not have any containers associated and cannot be started or restarted. -error PodNoContainers (name: string) - -# PodHasContainers means the pod has containers associated and cannot be stopped without the force boolean set as true. -error PodHasContainers (name: string) - # PodContainerError means a container associated with a pod failed to preform an operation. It contains # a container ID of the container that failed. -error PodContainerError (names: string) +error PodContainerError (podname: string, errors: []PodContainerErrorData) # ErrorOccurred is a generic error for an error that occurs during the execution. The actual error message # is includes as part of the error's text. |