summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--cmd/podman/common/completion.go8
-rw-r--r--cmd/podman/completion/completion.go8
-rw-r--r--cmd/podman/containers/run.go6
-rw-r--r--cmd/podman/images/build.go50
-rw-r--r--cmd/podman/machine/init.go96
-rw-r--r--cmd/podman/machine/machine.go32
-rw-r--r--cmd/podman/machine/machine_unsupported.go5
-rw-r--r--cmd/podman/machine/rm.go92
-rw-r--r--cmd/podman/machine/ssh.go74
-rw-r--r--cmd/podman/machine/start.go52
-rw-r--r--cmd/podman/machine/stop.go53
-rw-r--r--cmd/podman/main.go1
-rw-r--r--cmd/podman/root.go4
-rw-r--r--cmd/podman/system/service_abi.go30
-rw-r--r--completions/powershell/podman-remote.ps1227
-rw-r--r--completions/powershell/podman.ps1227
-rwxr-xr-xcontrib/cirrus/setup_environment.sh3
-rw-r--r--contrib/tmpfile/podman.conf1
-rw-r--r--docs/source/Commands.rst2
-rw-r--r--docs/source/conf.py6
-rw-r--r--docs/source/machine.rst9
-rw-r--r--docs/source/markdown/podman-attach.1.md10
-rw-r--r--docs/source/markdown/podman-auto-update.1.md2
-rw-r--r--docs/source/markdown/podman-build.1.md166
-rw-r--r--docs/source/markdown/podman-commit.1.md16
-rw-r--r--docs/source/markdown/podman-completion.1.md29
-rw-r--r--docs/source/markdown/podman-container-checkpoint.1.md30
-rw-r--r--docs/source/markdown/podman-container-cleanup.1.md16
-rw-r--r--docs/source/markdown/podman-container-exists.1.md4
-rw-r--r--docs/source/markdown/podman-container-prune.1.md6
-rw-r--r--docs/source/markdown/podman-container-restore.1.md56
-rw-r--r--docs/source/markdown/podman-container-runlabel.1.md18
-rw-r--r--docs/source/markdown/podman-create.1.md304
-rw-r--r--docs/source/markdown/podman-diff.1.md4
-rw-r--r--docs/source/markdown/podman-events.1.md10
-rw-r--r--docs/source/markdown/podman-exec.1.md22
-rw-r--r--docs/source/markdown/podman-export.1.md4
-rw-r--r--docs/source/markdown/podman-generate-kube.1.md4
-rw-r--r--docs/source/markdown/podman-generate-systemd.1.md29
-rw-r--r--docs/source/markdown/podman-healthcheck-run.1.md2
-rw-r--r--docs/source/markdown/podman-history.1.md16
-rw-r--r--docs/source/markdown/podman-image-diff.1.md2
-rw-r--r--docs/source/markdown/podman-image-exists.1.md2
-rw-r--r--docs/source/markdown/podman-image-mount.1.md4
-rw-r--r--docs/source/markdown/podman-image-prune.1.md8
-rw-r--r--docs/source/markdown/podman-image-sign.1.md10
-rw-r--r--docs/source/markdown/podman-image-tree.1.md4
-rw-r--r--docs/source/markdown/podman-image-trust.1.md12
-rw-r--r--docs/source/markdown/podman-image-unmount.1.md4
-rw-r--r--docs/source/markdown/podman-images.1.md18
-rw-r--r--docs/source/markdown/podman-import.1.md12
-rw-r--r--docs/source/markdown/podman-info.1.md4
-rw-r--r--docs/source/markdown/podman-init.1.md4
-rw-r--r--docs/source/markdown/podman-inspect.1.md8
-rw-r--r--docs/source/markdown/podman-kill.1.md8
-rw-r--r--docs/source/markdown/podman-load.1.md6
-rw-r--r--docs/source/markdown/podman-login.1.md16
-rw-r--r--docs/source/markdown/podman-logout.1.md6
-rw-r--r--docs/source/markdown/podman-logs.1.md12
-rw-r--r--docs/source/markdown/podman-machine-init.1.md57
-rw-r--r--docs/source/markdown/podman-machine-rm.1.md65
-rw-r--r--docs/source/markdown/podman-machine-ssh.1.md43
-rw-r--r--docs/source/markdown/podman-machine-start.1.md35
-rw-r--r--docs/source/markdown/podman-machine-stop.1.md35
-rw-r--r--docs/source/markdown/podman-machine.1.md26
-rw-r--r--docs/source/markdown/podman-manifest-add.1.md22
-rw-r--r--docs/source/markdown/podman-manifest-annotate.1.md14
-rw-r--r--docs/source/markdown/podman-manifest-create.1.md2
-rw-r--r--docs/source/markdown/podman-manifest-exists.1.md2
-rw-r--r--docs/source/markdown/podman-manifest-push.1.md22
-rw-r--r--docs/source/markdown/podman-mount.1.md8
-rw-r--r--docs/source/markdown/podman-network-connect.1.md2
-rw-r--r--docs/source/markdown/podman-network-create.1.md20
-rw-r--r--docs/source/markdown/podman-network-disconnect.1.md2
-rw-r--r--docs/source/markdown/podman-network-exists.1.md2
-rw-r--r--docs/source/markdown/podman-network-inspect.1.md2
-rw-r--r--docs/source/markdown/podman-network-ls.1.md10
-rw-r--r--docs/source/markdown/podman-network-prune.1.md2
-rw-r--r--docs/source/markdown/podman-network-reload.1.md4
-rw-r--r--docs/source/markdown/podman-network-rm.1.md2
-rw-r--r--docs/source/markdown/podman-pause.1.md2
-rw-r--r--docs/source/markdown/podman-play-kube.1.md22
-rw-r--r--docs/source/markdown/podman-pod-create.1.md48
-rw-r--r--docs/source/markdown/podman-pod-inspect.1.md4
-rw-r--r--docs/source/markdown/podman-pod-kill.1.md6
-rw-r--r--docs/source/markdown/podman-pod-pause.1.md4
-rw-r--r--docs/source/markdown/podman-pod-prune.1.md2
-rw-r--r--docs/source/markdown/podman-pod-ps.1.md22
-rw-r--r--docs/source/markdown/podman-pod-restart.1.md4
-rw-r--r--docs/source/markdown/podman-pod-rm.1.md10
-rw-r--r--docs/source/markdown/podman-pod-start.1.md6
-rw-r--r--docs/source/markdown/podman-pod-stats.1.md10
-rw-r--r--docs/source/markdown/podman-pod-stop.1.md10
-rw-r--r--docs/source/markdown/podman-pod-top.1.md4
-rw-r--r--docs/source/markdown/podman-pod-unpause.1.md4
-rw-r--r--docs/source/markdown/podman-port.1.md4
-rw-r--r--docs/source/markdown/podman-ps.1.md32
-rw-r--r--docs/source/markdown/podman-pull.1.md24
-rw-r--r--docs/source/markdown/podman-push.1.md22
-rw-r--r--docs/source/markdown/podman-remote.1.md12
-rw-r--r--docs/source/markdown/podman-restart.1.md8
-rw-r--r--docs/source/markdown/podman-rm.1.md14
-rw-r--r--docs/source/markdown/podman-rmi.1.md4
-rw-r--r--docs/source/markdown/podman-run.1.md384
-rw-r--r--docs/source/markdown/podman-save.1.md12
-rw-r--r--docs/source/markdown/podman-search.1.md20
-rw-r--r--docs/source/markdown/podman-secret-create.1.md4
-rw-r--r--docs/source/markdown/podman-secret-inspect.1.md4
-rw-r--r--docs/source/markdown/podman-secret-ls.1.md4
-rw-r--r--docs/source/markdown/podman-secret-rm.1.md4
-rw-r--r--docs/source/markdown/podman-start.1.md10
-rw-r--r--docs/source/markdown/podman-stats.1.md10
-rw-r--r--docs/source/markdown/podman-stop.1.md12
-rw-r--r--docs/source/markdown/podman-system-connection-add.1.md8
-rw-r--r--docs/source/markdown/podman-system-df.1.md4
-rw-r--r--docs/source/markdown/podman-system-migrate.1.md2
-rw-r--r--docs/source/markdown/podman-system-prune.1.md14
-rw-r--r--docs/source/markdown/podman-system-reset.1.md4
-rw-r--r--docs/source/markdown/podman-system-service.1.md4
-rw-r--r--docs/source/markdown/podman-tag.1.md2
-rw-r--r--docs/source/markdown/podman-top.1.md4
-rw-r--r--docs/source/markdown/podman-unmount.1.md6
-rw-r--r--docs/source/markdown/podman-unpause.1.md2
-rw-r--r--docs/source/markdown/podman-untag.1.md2
-rw-r--r--docs/source/markdown/podman-version.1.md4
-rw-r--r--docs/source/markdown/podman-volume-create.1.md12
-rw-r--r--docs/source/markdown/podman-volume-exists.1.md2
-rw-r--r--docs/source/markdown/podman-volume-inspect.1.md10
-rw-r--r--docs/source/markdown/podman-volume-ls.1.md14
-rw-r--r--docs/source/markdown/podman-volume-prune.1.md10
-rw-r--r--docs/source/markdown/podman-volume-rm.1.md10
-rw-r--r--docs/source/markdown/podman-wait.1.md8
-rw-r--r--docs/source/markdown/podman.1.md47
-rw-r--r--go.mod23
-rw-r--r--go.sum91
-rwxr-xr-xhack/xref-helpmsgs-manpages19
-rw-r--r--libpod/container_internal_linux.go12
-rw-r--r--libpod/events/logfile.go4
-rw-r--r--libpod/image/docker_registry_options.go1
-rw-r--r--libpod/image/filters.go14
-rw-r--r--libpod/image/image_test.go80
-rw-r--r--libpod/image/prune.go31
-rw-r--r--libpod/image/pull.go8
-rw-r--r--libpod/image/testdata/registries.conf4
-rw-r--r--libpod/network/netconflist.go29
-rw-r--r--libpod/options.go22
-rw-r--r--libpod/runtime_ctr.go2
-rw-r--r--libpod/runtime_img.go3
-rw-r--r--libpod/volume_internal.go1
-rw-r--r--libpod/volume_internal_linux.go10
-rw-r--r--pkg/api/handlers/compat/images_build.go71
-rw-r--r--pkg/api/handlers/compat/images_prune.go19
-rw-r--r--pkg/api/handlers/compat/images_remove.go35
-rw-r--r--pkg/api/handlers/compat/resize.go22
-rw-r--r--pkg/api/handlers/compat/version.go6
-rw-r--r--pkg/api/handlers/libpod/images.go18
-rw-r--r--pkg/api/handlers/libpod/pods.go12
-rw-r--r--pkg/api/handlers/types.go4
-rw-r--r--pkg/api/handlers/types/types.go23
-rw-r--r--pkg/api/handlers/utils/images.go14
-rw-r--r--pkg/api/server/register_containers.go5
-rw-r--r--pkg/api/server/register_exec.go5
-rw-r--r--pkg/api/server/swagger.go2
-rw-r--r--pkg/bindings/containers/attach.go3
-rw-r--r--pkg/bindings/containers/types.go5
-rw-r--r--pkg/bindings/containers/types_resizetty_options.go16
-rw-r--r--pkg/bindings/images/build.go6
-rw-r--r--pkg/bindings/images/images.go6
-rw-r--r--pkg/bindings/images/rm.go4
-rw-r--r--pkg/bindings/images/types.go4
-rw-r--r--pkg/domain/entities/images.go41
-rw-r--r--pkg/domain/entities/system.go2
-rw-r--r--pkg/domain/entities/types.go4
-rw-r--r--pkg/domain/entities/types/auth.go22
-rw-r--r--pkg/domain/entities/types/types.go28
-rw-r--r--pkg/domain/entities/volumes.go96
-rw-r--r--pkg/domain/filters/containers.go24
-rw-r--r--pkg/domain/filters/pods.go21
-rw-r--r--pkg/domain/filters/volumes.go17
-rw-r--r--pkg/domain/infra/abi/generate.go100
-rw-r--r--pkg/domain/infra/abi/play.go152
-rw-r--r--pkg/domain/infra/abi/play_test.go97
-rw-r--r--pkg/domain/infra/abi/system.go2
-rw-r--r--pkg/domain/infra/runtime_libpod.go8
-rw-r--r--pkg/machine/config.go122
-rw-r--r--pkg/machine/connection.go50
-rw-r--r--pkg/machine/fcos.go160
-rw-r--r--pkg/machine/fcos_amd64.go68
-rw-r--r--pkg/machine/fcos_arm64.go169
-rw-r--r--pkg/machine/ignition.go180
-rw-r--r--pkg/machine/ignition_schema.go251
-rw-r--r--pkg/machine/keys.go25
-rw-r--r--pkg/machine/libvirt/config.go4
-rw-r--r--pkg/machine/libvirt/machine.go15
-rw-r--r--pkg/machine/pull.go97
-rw-r--r--pkg/machine/qemu/config.go43
-rw-r--r--pkg/machine/qemu/machine.go374
-rw-r--r--pkg/machine/qemu/options_darwin.go15
-rw-r--r--pkg/machine/qemu/options_darwin_amd64.go18
-rw-r--r--pkg/machine/qemu/options_darwin_arm64.go36
-rw-r--r--pkg/machine/qemu/options_linux.go7
-rw-r--r--pkg/machine/qemu/options_linux_amd64.go21
-rw-r--r--pkg/namespaces/namespaces.go10
-rw-r--r--pkg/rootless/rootless.go4
-rw-r--r--pkg/rootless/rootless_linux.c11
-rw-r--r--pkg/specgen/generate/container_create.go4
-rw-r--r--pkg/specgen/generate/kube/kube.go100
-rw-r--r--pkg/specgen/generate/kube/play_test.go359
-rw-r--r--pkg/specgen/generate/kube/volume.go2
-rw-r--r--pkg/specgen/generate/ports.go24
-rw-r--r--pkg/specgen/namespaces.go2
-rw-r--r--pkg/specgen/specgen.go4
-rw-r--r--pkg/systemd/generate/common.go37
-rw-r--r--pkg/systemd/generate/common_test.go147
-rw-r--r--pkg/systemd/generate/containers.go44
-rw-r--r--pkg/systemd/generate/containers_test.go145
-rw-r--r--pkg/systemd/generate/pods.go14
-rw-r--r--pkg/systemd/generate/pods_test.go38
-rw-r--r--pkg/util/filters.go27
-rw-r--r--pkg/util/filters_test.go113
-rw-r--r--pkg/util/utils.go14
-rw-r--r--test/apiv2/10-images.at49
-rw-r--r--test/apiv2/40-pods.at6
-rw-r--r--test/buildah-bud/buildah-tests.diff42
-rw-r--r--test/e2e/build/basicalpine/Containerfile2
-rw-r--r--test/e2e/build/basicalpine/Containerfile.path2
-rw-r--r--test/e2e/build/basicalpine/Containerfile.volume2
-rw-r--r--test/e2e/build/squash/Dockerfile.squash-a2
-rw-r--r--test/e2e/build/squash/Dockerfile.squash-c2
-rw-r--r--test/e2e/build_test.go35
-rw-r--r--test/e2e/containers_conf_test.go2
-rw-r--r--test/e2e/exec_test.go4
-rw-r--r--test/e2e/generate_kube_test.go36
-rw-r--r--test/e2e/play_kube_test.go366
-rw-r--r--test/e2e/prune_test.go7
-rw-r--r--test/e2e/ps_test.go4
-rw-r--r--test/e2e/rmi_test.go19
-rw-r--r--test/e2e/run_passwd_test.go9
-rw-r--r--test/e2e/run_privileged_test.go16
-rw-r--r--test/e2e/run_security_labels_test.go7
-rw-r--r--test/e2e/run_test.go12
-rw-r--r--test/e2e/run_volume_test.go35
-rw-r--r--test/e2e/run_working_dir_test.go5
-rw-r--r--test/e2e/runlabel_test.go20
-rw-r--r--test/e2e/system_df_test.go2
-rw-r--r--test/python/docker/compat/test_images.py2
-rw-r--r--test/system/070-build.bats27
-rw-r--r--test/system/120-load.bats11
-rw-r--r--test/system/450-interactive.bats87
-rw-r--r--test/system/helpers.bash8
-rw-r--r--utils/ports.go26
-rw-r--r--vendor/github.com/containers/buildah/.cirrus.yml267
-rw-r--r--vendor/github.com/containers/buildah/CHANGELOG.md38
-rw-r--r--vendor/github.com/containers/buildah/Makefile7
-rw-r--r--vendor/github.com/containers/buildah/OWNERS5
-rw-r--r--vendor/github.com/containers/buildah/add.go58
-rw-r--r--vendor/github.com/containers/buildah/buildah.go124
-rw-r--r--vendor/github.com/containers/buildah/changelog.txt122
-rw-r--r--vendor/github.com/containers/buildah/common.go5
-rw-r--r--vendor/github.com/containers/buildah/config.go13
-rw-r--r--vendor/github.com/containers/buildah/copier/copier.go4
-rw-r--r--vendor/github.com/containers/buildah/define/build.go223
-rw-r--r--vendor/github.com/containers/buildah/define/isolation.go32
-rw-r--r--vendor/github.com/containers/buildah/define/namespace.go87
-rw-r--r--vendor/github.com/containers/buildah/define/pull.go50
-rw-r--r--vendor/github.com/containers/buildah/define/types.go245
-rw-r--r--vendor/github.com/containers/buildah/define/types_unix.go9
-rw-r--r--vendor/github.com/containers/buildah/define/types_unsupported.go6
-rw-r--r--vendor/github.com/containers/buildah/go.mod39
-rw-r--r--vendor/github.com/containers/buildah/go.sum584
-rw-r--r--vendor/github.com/containers/buildah/image.go45
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/build.go181
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/executor.go25
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/stage_executor.go71
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/util.go141
-rw-r--r--vendor/github.com/containers/buildah/import.go3
-rw-r--r--vendor/github.com/containers/buildah/new.go47
-rw-r--r--vendor/github.com/containers/buildah/pkg/chrootuser/user_linux.go56
-rw-r--r--vendor/github.com/containers/buildah/pkg/cli/common.go14
-rw-r--r--vendor/github.com/containers/buildah/pkg/parse/parse.go62
-rw-r--r--vendor/github.com/containers/buildah/pkg/parse/parse_unix.go8
-rw-r--r--vendor/github.com/containers/buildah/pkg/parse/parse_unsupported.go6
-rw-r--r--vendor/github.com/containers/buildah/pull.go3
-rw-r--r--vendor/github.com/containers/buildah/release.sh22
-rw-r--r--vendor/github.com/containers/buildah/run.go91
-rw-r--r--vendor/github.com/containers/buildah/run_linux.go106
-rw-r--r--vendor/github.com/containers/buildah/run_unsupported.go3
-rw-r--r--vendor/github.com/containers/buildah/util/types.go33
-rw-r--r--vendor/github.com/containers/buildah/util/util.go3
-rw-r--r--vendor/github.com/containers/common/pkg/capabilities/capabilities.go49
-rw-r--r--vendor/github.com/containers/common/pkg/config/default.go2
-rw-r--r--vendor/github.com/containers/common/pkg/seccomp/supported.go97
-rw-r--r--vendor/github.com/containers/common/version/version.go2
-rw-r--r--vendor/github.com/containers/storage/VERSION2
-rw-r--r--vendor/github.com/containers/storage/drivers/overlay/overlay.go127
-rw-r--r--vendor/github.com/containers/storage/go.mod1
-rw-r--r--vendor/github.com/containers/storage/go.sum2
-rw-r--r--vendor/github.com/containers/storage/pkg/archive/archive.go45
-rw-r--r--vendor/github.com/coreos/stream-metadata-go/LICENSE201
-rw-r--r--vendor/github.com/coreos/stream-metadata-go/fedoracoreos/fcos.go27
-rw-r--r--vendor/github.com/coreos/stream-metadata-go/fedoracoreos/internals/fcosinternals.go33
-rw-r--r--vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go18
-rw-r--r--vendor/github.com/coreos/stream-metadata-go/stream/stream.go74
-rw-r--r--vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go47
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/.travis.yml62
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/AUTHORS24
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/CONTRIBUTING.md30
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/LICENSE.md195
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/README.md171
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/const.gen.go2414
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/doc.go76
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/go.mod9
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/go.sum35
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/internal/constants/qemu_protocol.gen.go47
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/internal/constants/remote_protocol.gen.go1019
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/internal/event/event.go20
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/internal/event/stream.go145
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/LICENSE13
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/decode.go896
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/doc.go171
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/encode.go669
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/error.go177
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/libvirt.go608
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/libvirt.yml64
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/libvirtd.conf7
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/qemu_protocol.gen.go292
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/remote_protocol.gen.go16449
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/rpc.go606
-rw-r--r--vendor/github.com/digitalocean/go-libvirt/units.go27
-rw-r--r--vendor/github.com/digitalocean/go-qemu/AUTHORS17
-rw-r--r--vendor/github.com/digitalocean/go-qemu/LICENSE.md195
-rw-r--r--vendor/github.com/digitalocean/go-qemu/qmp/README.md104
-rw-r--r--vendor/github.com/digitalocean/go-qemu/qmp/qmp.go94
-rw-r--r--vendor/github.com/digitalocean/go-qemu/qmp/rpc.go107
-rw-r--r--vendor/github.com/digitalocean/go-qemu/qmp/socket.go274
-rw-r--r--vendor/github.com/digitalocean/go-qemu/qmp/socket_unix.go27
-rw-r--r--vendor/github.com/digitalocean/go-qemu/qmp/socket_windows.go25
-rw-r--r--vendor/github.com/docker/docker/api/swagger.yaml10
-rw-r--r--vendor/github.com/docker/docker/client/build_cancel.go2
-rw-r--r--vendor/github.com/docker/docker/client/config_create.go2
-rw-r--r--vendor/github.com/docker/docker/client/config_remove.go2
-rw-r--r--vendor/github.com/docker/docker/client/config_update.go2
-rw-r--r--vendor/github.com/docker/docker/client/container_commit.go2
-rw-r--r--vendor/github.com/docker/docker/client/container_copy.go2
-rw-r--r--vendor/github.com/docker/docker/client/container_create.go2
-rw-r--r--vendor/github.com/docker/docker/client/container_restart.go2
-rw-r--r--vendor/github.com/docker/docker/client/container_update.go2
-rw-r--r--vendor/github.com/docker/docker/client/distribution_inspect.go2
-rw-r--r--vendor/github.com/docker/docker/client/image_build.go4
-rw-r--r--vendor/github.com/docker/docker/client/image_create.go2
-rw-r--r--vendor/github.com/docker/docker/client/image_import.go2
-rw-r--r--vendor/github.com/docker/docker/client/image_search.go2
-rw-r--r--vendor/github.com/docker/docker/client/secret_create.go2
-rw-r--r--vendor/github.com/docker/docker/client/secret_remove.go2
-rw-r--r--vendor/github.com/docker/docker/client/secret_update.go2
-rw-r--r--vendor/github.com/docker/docker/client/service_create.go2
-rw-r--r--vendor/github.com/docker/docker/client/task_inspect.go2
-rw-r--r--vendor/github.com/docker/docker/errdefs/helpers.go52
-rw-r--r--vendor/github.com/docker/docker/pkg/archive/archive.go24
-rw-r--r--vendor/github.com/docker/docker/pkg/archive/archive_unix.go12
-rw-r--r--vendor/github.com/docker/docker/pkg/idtools/idtools.go11
-rw-r--r--vendor/github.com/docker/docker/pkg/idtools/idtools_unix.go65
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/.golangci.yaml38
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/AUTHORS3
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/LICENSE2
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/Makefile27
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/auth.go100
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/client.go7
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/client_windows.go1
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_changes.go4
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_commit.go4
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_copy.go3
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_create.go3
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_inspect.go5
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_kill.go5
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_pause.go4
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_remove.go4
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_restart.go4
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_start.go5
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_stats.go7
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_stop.go5
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_top.go4
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_unpause.go4
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/container_wait.go5
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/event.go79
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/exec.go12
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/go.mod26
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/go.sum180
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/image.go13
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/misc.go1
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/network.go12
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/plugin.go13
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/swarm.go15
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/swarm_configs.go10
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/swarm_node.go10
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/swarm_secrets.go10
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/swarm_service.go10
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/swarm_task.go4
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/tls.go2
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/volume.go6
-rw-r--r--vendor/github.com/moby/sys/mount/doc.go4
-rw-r--r--vendor/github.com/moby/sys/mount/flags_bsd.go (renamed from vendor/github.com/moby/sys/mount/flags_freebsd.go)17
-rw-r--r--vendor/github.com/moby/sys/mount/flags_unix.go (renamed from vendor/github.com/moby/sys/mount/flags.go)2
-rw-r--r--vendor/github.com/moby/sys/mount/flags_unsupported.go30
-rw-r--r--vendor/github.com/moby/sys/mount/go.mod4
-rw-r--r--vendor/github.com/moby/sys/mount/go.sum9
-rw-r--r--vendor/github.com/moby/sys/mount/mount_unix.go (renamed from vendor/github.com/moby/sys/mount/mount.go)36
-rw-r--r--vendor/github.com/moby/sys/mount/mounter_bsd.go (renamed from vendor/github.com/moby/sys/mount/mounter_freebsd.go)2
-rw-r--r--vendor/github.com/moby/sys/mount/mounter_unsupported.go4
-rw-r--r--vendor/github.com/moby/sys/mount/unmount_unix.go26
-rw-r--r--vendor/github.com/moby/sys/mount/unmount_unsupported.go11
-rw-r--r--vendor/github.com/moby/term/windows/console.go2
-rw-r--r--vendor/github.com/openshift/imagebuilder/builder.go36
-rw-r--r--vendor/github.com/openshift/imagebuilder/dispatchers.go30
-rw-r--r--vendor/github.com/openshift/imagebuilder/imagebuilder.spec2
-rw-r--r--vendor/github.com/prometheus/procfs/Makefile.common4
-rw-r--r--vendor/github.com/prometheus/procfs/SECURITY.md6
-rw-r--r--vendor/github.com/prometheus/procfs/arp.go4
-rw-r--r--vendor/github.com/prometheus/procfs/buddyinfo.go2
-rw-r--r--vendor/github.com/prometheus/procfs/cpuinfo.go31
-rw-r--r--vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go19
-rw-r--r--vendor/github.com/prometheus/procfs/crypto.go4
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures.ttar374
-rw-r--r--vendor/github.com/prometheus/procfs/fscache.go2
-rw-r--r--vendor/github.com/prometheus/procfs/go.mod8
-rw-r--r--vendor/github.com/prometheus/procfs/go.sum14
-rw-r--r--vendor/github.com/prometheus/procfs/internal/fs/fs.go4
-rw-r--r--vendor/github.com/prometheus/procfs/loadavg.go4
-rw-r--r--vendor/github.com/prometheus/procfs/mdstat.go42
-rw-r--r--vendor/github.com/prometheus/procfs/meminfo.go194
-rw-r--r--vendor/github.com/prometheus/procfs/mountstats.go15
-rw-r--r--vendor/github.com/prometheus/procfs/net_conntrackstat.go4
-rw-r--r--vendor/github.com/prometheus/procfs/net_ip_socket.go220
-rw-r--r--vendor/github.com/prometheus/procfs/net_protocols.go180
-rw-r--r--vendor/github.com/prometheus/procfs/net_sockstat.go4
-rw-r--r--vendor/github.com/prometheus/procfs/net_softnet.go2
-rw-r--r--vendor/github.com/prometheus/procfs/net_tcp.go64
-rw-r--r--vendor/github.com/prometheus/procfs/net_udp.go183
-rw-r--r--vendor/github.com/prometheus/procfs/net_unix.go14
-rw-r--r--vendor/github.com/prometheus/procfs/proc.go6
-rw-r--r--vendor/github.com/prometheus/procfs/proc_cgroup.go2
-rw-r--r--vendor/github.com/prometheus/procfs/proc_fdinfo.go4
-rw-r--r--vendor/github.com/prometheus/procfs/proc_limits.go87
-rw-r--r--vendor/github.com/prometheus/procfs/proc_ns.go6
-rw-r--r--vendor/github.com/prometheus/procfs/proc_psi.go2
-rw-r--r--vendor/github.com/prometheus/procfs/proc_stat.go5
-rw-r--r--vendor/github.com/prometheus/procfs/schedstat.go15
-rw-r--r--vendor/github.com/prometheus/procfs/slab.go151
-rw-r--r--vendor/github.com/prometheus/procfs/stat.go24
-rw-r--r--vendor/github.com/prometheus/procfs/xfrm.go3
-rw-r--r--vendor/github.com/prometheus/procfs/zoneinfo.go4
-rw-r--r--vendor/github.com/ulikunitz/xz/LICENSE2
-rw-r--r--vendor/github.com/ulikunitz/xz/TODO.md8
-rw-r--r--vendor/github.com/ulikunitz/xz/bits.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/crc.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/format.go9
-rw-r--r--vendor/github.com/ulikunitz/xz/internal/hash/cyclic_poly.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/internal/hash/doc.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/internal/hash/rabin_karp.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/internal/hash/roller.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/internal/xlog/xlog.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/bintree.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/bitops.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/breader.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/buffer.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/bytewriter.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/decoder.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/decoderdict.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/directcodec.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/distcodec.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/encoder.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/encoderdict.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/hashtable.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/header.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/header2.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/lengthcodec.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/literalcodec.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/operation.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/prob.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/properties.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/rangecodec.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/reader.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/reader2.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/state.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/treecodecs.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/writer.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzma/writer2.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/lzmafilter.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/none-check.go2
-rw-r--r--vendor/github.com/ulikunitz/xz/reader.go9
-rw-r--r--vendor/github.com/ulikunitz/xz/writer.go2
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/.gitignore5
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/.travis.yml11
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/README.md120
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/UNLICENSE24
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/bar.go492
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/bar_filler.go31
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/bar_filler_bar.go191
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/bar_filler_spinner.go65
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/bar_option.go153
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/container_option.go112
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/cwriter/doc.go2
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/cwriter/util_bsd.go7
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/cwriter/util_linux.go7
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/cwriter/util_solaris.go7
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/cwriter/writer.go84
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/cwriter/writer_posix.go26
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/cwriter/writer_windows.go73
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/any.go21
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/counters.go243
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/decorator.go191
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/doc.go20
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/elapsed.go35
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/eta.go203
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/merge.go107
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/moving_average.go68
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/name.go12
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/on_complete.go37
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/percentage.go58
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/size_type.go109
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/sizeb1000_string.go41
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/sizeb1024_string.go41
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/speed.go171
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/decor/spinner.go21
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/doc.go2
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/go.mod11
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/go.sum11
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/internal/percentage.go19
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/internal/predicate.go6
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/internal/width.go10
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/priority_queue.go32
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/progress.go412
-rw-r--r--vendor/github.com/vbauerster/mpb/v6/proxyreader.go90
-rw-r--r--vendor/golang.org/x/sys/execabs/execabs.go102
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_386.s (renamed from vendor/golang.org/x/sys/unix/asm_freebsd_386.s)10
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_amd64.s (renamed from vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s)8
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_arm.s (renamed from vendor/golang.org/x/sys/unix/asm_netbsd_arm.s)8
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_arm64.s (renamed from vendor/golang.org/x/sys/unix/asm_darwin_amd64.s)8
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_386.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_arm.s30
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_arm64.s30
-rw-r--r--vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_arm.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_netbsd_386.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_386.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_arm.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/mkall.sh2
-rw-r--r--vendor/golang.org/x/sys/unix/mkerrors.sh4
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_illumos.go53
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_s390x.go2
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_solaris.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go25
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go25
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go28
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go5
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go40
-rw-r--r--vendor/modules.txt46
565 files changed, 39513 insertions, 4154 deletions
diff --git a/Makefile b/Makefile
index 14e428397..49250f2fd 100644
--- a/Makefile
+++ b/Makefile
@@ -536,6 +536,7 @@ install.completions:
install ${SELINUXOPT} -d -m 755 ${DESTDIR}${FISHINSTALLDIR}
install ${SELINUXOPT} -m 644 completions/fish/podman.fish ${DESTDIR}${FISHINSTALLDIR}
install ${SELINUXOPT} -m 644 completions/fish/podman-remote.fish ${DESTDIR}${FISHINSTALLDIR}
+ # There is no common location for powershell files so do not install them. Users have to source the file from their powershell profile.
.PHONY: install.cni
install.cni:
@@ -658,7 +659,7 @@ install.libseccomp.sudo:
.PHONY: completions
completions: podman podman-remote
# key = shell, value = completion filename
- declare -A outfiles=([bash]=%s [zsh]=_%s [fish]=%s.fish);\
+ declare -A outfiles=([bash]=%s [zsh]=_%s [fish]=%s.fish [powershell]=%s.ps1);\
for shell in $${!outfiles[*]}; do \
for remote in "" "-remote"; do \
podman="podman$$remote"; \
diff --git a/cmd/podman/common/completion.go b/cmd/podman/common/completion.go
index bc106263c..6bed5e0c6 100644
--- a/cmd/podman/common/completion.go
+++ b/cmd/podman/common/completion.go
@@ -1092,3 +1092,11 @@ func AutocompleteVolumeFilters(cmd *cobra.Command, args []string, toComplete str
}
return completeKeyValues(toComplete, kv)
}
+
+// AutocompleteMachineSSH - Autocomplete machine ssh command.
+func AutocompleteMachineSSH(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ if len(args) == 0 {
+ return nil, cobra.ShellCompDirectiveNoFileComp
+ }
+ return nil, cobra.ShellCompDirectiveDefault
+}
diff --git a/cmd/podman/completion/completion.go b/cmd/podman/completion/completion.go
index a4ceab4b0..472068130 100644
--- a/cmd/podman/completion/completion.go
+++ b/cmd/podman/completion/completion.go
@@ -21,7 +21,7 @@ const (
var (
file string
noDesc bool
- shells = []string{"bash", "zsh", "fish"}
+ shells = []string{"bash", "zsh", "fish", "powershell"}
completionCmd = &cobra.Command{
Use: fmt.Sprintf("completion [options] {%s}", strings.Join(shells, "|")),
Short: "Generate shell autocompletions",
@@ -76,6 +76,12 @@ func completion(cmd *cobra.Command, args []string) error {
}
case "fish":
err = cmd.Root().GenFishCompletion(w, !noDesc)
+ case "powershell":
+ if noDesc {
+ err = cmd.Root().GenPowerShellCompletion(w)
+ } else {
+ err = cmd.Root().GenPowerShellCompletionWithDesc(w)
+ }
}
if err != nil {
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go
index 83a5d7b8a..db7180ca9 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -17,6 +17,7 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
+ "golang.org/x/crypto/ssh/terminal"
)
var (
@@ -106,6 +107,11 @@ func run(cmd *cobra.Command, args []string) error {
return err
}
+ // TODO: Breaking change should be made fatal in next major Release
+ if cliVals.TTY && cliVals.Interactive && !terminal.IsTerminal(int(os.Stdin.Fd())) {
+ logrus.Warnf("The input device is not a TTY. The --tty and --interactive flags might not work properly")
+ }
+
if af := cliVals.Authfile; len(af) > 0 {
if _, err := os.Stat(af); err != nil {
return err
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index 3b34a6bf6..da7f5d862 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -8,8 +8,7 @@ import (
"strings"
"time"
- "github.com/containers/buildah"
- "github.com/containers/buildah/imagebuildah"
+ buildahDefine "github.com/containers/buildah/define"
buildahCLI "github.com/containers/buildah/pkg/cli"
"github.com/containers/buildah/pkg/parse"
"github.com/containers/common/pkg/completion"
@@ -159,11 +158,11 @@ func buildFlags(cmd *cobra.Command) {
flags.SetNormalizeFunc(buildahCLI.AliasFlags)
if registry.IsRemote() {
flag = flags.Lookup("isolation")
- buildOpts.Isolation = buildah.OCI
- if err := flag.Value.Set(buildah.OCI); err != nil {
- logrus.Errorf("unable to set --isolation to %v: %v", buildah.OCI, err)
+ buildOpts.Isolation = buildahDefine.OCI
+ if err := flag.Value.Set(buildahDefine.OCI); err != nil {
+ logrus.Errorf("unable to set --isolation to %v: %v", buildahDefine.OCI, err)
}
- flag.DefValue = buildah.OCI
+ flag.DefValue = buildahDefine.OCI
_ = flags.MarkHidden("disable-content-trust")
_ = flags.MarkHidden("cache-from")
_ = flags.MarkHidden("sign-by")
@@ -196,7 +195,7 @@ func build(cmd *cobra.Command, args []string) error {
var contextDir string
if len(args) > 0 {
// The context directory could be a URL. Try to handle that.
- tempDir, subDir, err := imagebuildah.TempDirForURL("", "buildah", args[0])
+ tempDir, subDir, err := buildahDefine.TempDirForURL("", "buildah", args[0])
if err != nil {
return errors.Wrapf(err, "error prepping temporary context directory")
}
@@ -304,16 +303,31 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
return nil, err
}
- pullPolicy := imagebuildah.PullIfMissing
+ pullFlagsCount := 0
+ if c.Flag("pull").Changed {
+ pullFlagsCount++
+ }
+ if c.Flag("pull-always").Changed {
+ pullFlagsCount++
+ }
+ if c.Flag("pull-never").Changed {
+ pullFlagsCount++
+ }
+
+ if pullFlagsCount > 1 {
+ return nil, errors.Errorf("can only set one of 'pull' or 'pull-always' or 'pull-never'")
+ }
+
+ pullPolicy := buildahDefine.PullIfMissing
if c.Flags().Changed("pull") && flags.Pull {
- pullPolicy = imagebuildah.PullAlways
+ pullPolicy = buildahDefine.PullAlways
}
if flags.PullAlways {
- pullPolicy = imagebuildah.PullAlways
+ pullPolicy = buildahDefine.PullAlways
}
if flags.PullNever {
- pullPolicy = imagebuildah.PullIfMissing
+ pullPolicy = buildahDefine.PullNever
}
args := make(map[string]string)
@@ -388,9 +402,9 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
flags.Layers = false
}
- compression := imagebuildah.Gzip
+ compression := buildahDefine.Gzip
if flags.DisableCompression {
- compression = imagebuildah.Uncompressed
+ compression = buildahDefine.Uncompressed
}
isolation, err := parse.IsolationOption(flags.Isolation)
@@ -412,10 +426,10 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
format := ""
flags.Format = strings.ToLower(flags.Format)
switch {
- case strings.HasPrefix(flags.Format, buildah.OCI):
- format = buildah.OCIv1ImageManifest
- case strings.HasPrefix(flags.Format, buildah.DOCKER):
- format = buildah.Dockerv2ImageManifest
+ case strings.HasPrefix(flags.Format, buildahDefine.OCI):
+ format = buildahDefine.OCIv1ImageManifest
+ case strings.HasPrefix(flags.Format, buildahDefine.DOCKER):
+ format = buildahDefine.Dockerv2ImageManifest
default:
return nil, errors.Errorf("unrecognized image type %q", flags.Format)
}
@@ -443,7 +457,7 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
return nil, errors.Wrapf(err, "unable to obtain decrypt config")
}
- opts := imagebuildah.BuildOptions{
+ opts := buildahDefine.BuildOptions{
AddCapabilities: flags.CapAdd,
AdditionalTags: tags,
Annotations: flags.Annotation,
diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go
new file mode 100644
index 000000000..05474fd89
--- /dev/null
+++ b/cmd/podman/machine/init.go
@@ -0,0 +1,96 @@
+// +build amd64,linux amd64,darwin arm64,darwin
+
+package machine
+
+import (
+ "github.com/containers/common/pkg/completion"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/machine"
+ "github.com/containers/podman/v3/pkg/machine/qemu"
+ "github.com/pkg/errors"
+ "github.com/spf13/cobra"
+)
+
+var (
+ initCmd = &cobra.Command{
+ Use: "init [options] [NAME]",
+ Short: "initialize a vm",
+ Long: "initialize a virtual machine for Podman to run on. Virtual machines are used to run Podman.",
+ RunE: initMachine,
+ Args: cobra.MaximumNArgs(1),
+ Example: `podman machine init myvm`,
+ ValidArgsFunction: completion.AutocompleteNone,
+ }
+)
+
+var (
+ initOpts = machine.InitOptions{}
+ defaultMachineName string = "podman-machine-default"
+)
+
+func init() {
+ registry.Commands = append(registry.Commands, registry.CliCommand{
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
+ Command: initCmd,
+ Parent: machineCmd,
+ })
+ flags := initCmd.Flags()
+
+ cpusFlagName := "cpus"
+ flags.Uint64Var(
+ &initOpts.CPUS,
+ cpusFlagName, 1,
+ "Number of CPUs. The default is 1.",
+ )
+ _ = initCmd.RegisterFlagCompletionFunc(cpusFlagName, completion.AutocompleteNone)
+
+ diskSizeFlagName := "disk-size"
+ flags.Uint64Var(
+ &initOpts.DiskSize,
+ diskSizeFlagName, 10,
+ "Disk size in GB",
+ )
+
+ _ = initCmd.RegisterFlagCompletionFunc(diskSizeFlagName, completion.AutocompleteNone)
+
+ memoryFlagName := "memory"
+ flags.Uint64VarP(
+ &initOpts.Memory,
+ memoryFlagName, "m", 2048,
+ "Memory (in MB)",
+ )
+ _ = initCmd.RegisterFlagCompletionFunc(memoryFlagName, completion.AutocompleteNone)
+
+ ImagePathFlagName := "image-path"
+ flags.StringVar(&initOpts.ImagePath, ImagePathFlagName, "", "Path to qcow image")
+ _ = initCmd.RegisterFlagCompletionFunc(ImagePathFlagName, completion.AutocompleteDefault)
+
+ IgnitionPathFlagName := "ignition-path"
+ flags.StringVar(&initOpts.IgnitionPath, IgnitionPathFlagName, "", "Path to ignition file")
+ _ = initCmd.RegisterFlagCompletionFunc(IgnitionPathFlagName, completion.AutocompleteDefault)
+}
+
+// TODO should we allow for a users to append to the qemu cmdline?
+func initMachine(cmd *cobra.Command, args []string) error {
+ var (
+ vm machine.VM
+ vmType string
+ err error
+ )
+ initOpts.Name = defaultMachineName
+ if len(args) > 0 {
+ initOpts.Name = args[0]
+ }
+ switch vmType {
+ default: // qemu is the default
+ if _, err := qemu.LoadVMByName(initOpts.Name); err == nil {
+ return errors.Wrap(machine.ErrVMAlreadyExists, initOpts.Name)
+ }
+ vm, err = qemu.NewMachine(initOpts)
+ }
+ if err != nil {
+ return err
+ }
+ return vm.Init(initOpts)
+}
diff --git a/cmd/podman/machine/machine.go b/cmd/podman/machine/machine.go
new file mode 100644
index 000000000..ed284ee10
--- /dev/null
+++ b/cmd/podman/machine/machine.go
@@ -0,0 +1,32 @@
+// +build amd64,linux amd64,darwin arm64,darwin
+
+package machine
+
+import (
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/spf13/cobra"
+)
+
+var (
+ noOp = func(cmd *cobra.Command, args []string) error {
+ return nil
+ }
+ // Command: podman _machine_
+ machineCmd = &cobra.Command{
+ Use: "machine",
+ Short: "Manage a virtual machine",
+ Long: "Manage a virtual machine. Virtual machines are used to run Podman.",
+ PersistentPreRunE: noOp,
+ PersistentPostRunE: noOp,
+ RunE: validate.SubCommandExists,
+ }
+)
+
+func init() {
+ registry.Commands = append(registry.Commands, registry.CliCommand{
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
+ Command: machineCmd,
+ })
+}
diff --git a/cmd/podman/machine/machine_unsupported.go b/cmd/podman/machine/machine_unsupported.go
new file mode 100644
index 000000000..cb1636419
--- /dev/null
+++ b/cmd/podman/machine/machine_unsupported.go
@@ -0,0 +1,5 @@
+// +build !amd64 arm64,linux amd64,windows
+
+package machine
+
+func init() {}
diff --git a/cmd/podman/machine/rm.go b/cmd/podman/machine/rm.go
new file mode 100644
index 000000000..cd2cc84f2
--- /dev/null
+++ b/cmd/podman/machine/rm.go
@@ -0,0 +1,92 @@
+// +build amd64,linux amd64,darwin arm64,darwin
+
+package machine
+
+import (
+ "bufio"
+ "fmt"
+ "os"
+ "strings"
+
+ "github.com/containers/common/pkg/completion"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/machine"
+ "github.com/containers/podman/v3/pkg/machine/qemu"
+ "github.com/spf13/cobra"
+)
+
+var (
+ rmCmd = &cobra.Command{
+ Use: "rm [options] [NAME]",
+ Short: "Remove an existing machine",
+ Long: "Remove an existing machine ",
+ RunE: rm,
+ Args: cobra.MaximumNArgs(1),
+ Example: `podman machine rm myvm`,
+ ValidArgsFunction: completion.AutocompleteNone,
+ }
+)
+
+var (
+ destoryOptions machine.RemoveOptions
+)
+
+func init() {
+ registry.Commands = append(registry.Commands, registry.CliCommand{
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
+ Command: rmCmd,
+ Parent: machineCmd,
+ })
+
+ flags := rmCmd.Flags()
+ formatFlagName := "force"
+ flags.BoolVar(&destoryOptions.Force, formatFlagName, false, "Do not prompt before rming")
+
+ keysFlagName := "save-keys"
+ flags.BoolVar(&destoryOptions.SaveKeys, keysFlagName, false, "Do not delete SSH keys")
+
+ ignitionFlagName := "save-ignition"
+ flags.BoolVar(&destoryOptions.SaveIgnition, ignitionFlagName, false, "Do not delete ignition file")
+
+ imageFlagName := "save-image"
+ flags.BoolVar(&destoryOptions.SaveImage, imageFlagName, false, "Do not delete the image file")
+}
+
+func rm(cmd *cobra.Command, args []string) error {
+ var (
+ err error
+ vm machine.VM
+ vmType string
+ )
+ vmName := defaultMachineName
+ if len(args) > 0 && len(args[0]) > 0 {
+ vmName = args[0]
+ }
+ switch vmType {
+ default:
+ vm, err = qemu.LoadVMByName(vmName)
+ }
+ if err != nil {
+ return err
+ }
+ confirmationMessage, remove, err := vm.Remove(vmName, machine.RemoveOptions{})
+ if err != nil {
+ return err
+ }
+
+ if !destoryOptions.Force {
+ // Warn user
+ fmt.Println(confirmationMessage)
+ reader := bufio.NewReader(os.Stdin)
+ fmt.Print("Are you sure you want to continue? [y/N] ")
+ answer, err := reader.ReadString('\n')
+ if err != nil {
+ return err
+ }
+ if strings.ToLower(answer)[0] != 'y' {
+ return nil
+ }
+ }
+ return remove()
+}
diff --git a/cmd/podman/machine/ssh.go b/cmd/podman/machine/ssh.go
new file mode 100644
index 000000000..879122a14
--- /dev/null
+++ b/cmd/podman/machine/ssh.go
@@ -0,0 +1,74 @@
+// +build amd64,linux amd64,darwin arm64,darwin
+
+package machine
+
+import (
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/machine"
+ "github.com/containers/podman/v3/pkg/machine/qemu"
+ "github.com/pkg/errors"
+ "github.com/spf13/cobra"
+)
+
+var (
+ sshCmd = &cobra.Command{
+ Use: "ssh [options] [NAME] [COMMAND [ARG ...]]",
+ Short: "SSH into a virtual machine",
+ Long: "SSH into a virtual machine ",
+ RunE: ssh,
+ Args: cobra.MaximumNArgs(1),
+ Example: `podman machine ssh myvm
+ podman machine ssh -e myvm echo hello`,
+
+ ValidArgsFunction: common.AutocompleteMachineSSH,
+ }
+)
+
+var (
+ sshOpts machine.SSHOptions
+)
+
+func init() {
+ registry.Commands = append(registry.Commands, registry.CliCommand{
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
+ Command: sshCmd,
+ Parent: machineCmd,
+ })
+
+ flags := sshCmd.Flags()
+ executeFlagName := "execute"
+ flags.BoolVarP(&sshOpts.Execute, executeFlagName, "e", false, "Execute command from args")
+}
+
+func ssh(cmd *cobra.Command, args []string) error {
+ var (
+ err error
+ vm machine.VM
+ vmType string
+ )
+ vmName := defaultMachineName
+ if len(args) > 0 && len(args[0]) > 1 {
+ vmName = args[0]
+ }
+ sshOpts.Args = args[1:]
+
+ // Error if no execute but args given
+ if !sshOpts.Execute && len(sshOpts.Args) > 0 {
+ return errors.New("too many args: to execute commands via ssh, use -e flag")
+ }
+ // Error if execute but no args given
+ if sshOpts.Execute && len(sshOpts.Args) < 1 {
+ return errors.New("must proivde at least one command to execute")
+ }
+
+ switch vmType {
+ default:
+ vm, err = qemu.LoadVMByName(vmName)
+ }
+ if err != nil {
+ return errors.Wrapf(err, "vm %s not found", args[0])
+ }
+ return vm.SSH(vmName, sshOpts)
+}
diff --git a/cmd/podman/machine/start.go b/cmd/podman/machine/start.go
new file mode 100644
index 000000000..80fd77102
--- /dev/null
+++ b/cmd/podman/machine/start.go
@@ -0,0 +1,52 @@
+// +build amd64,linux amd64,darwin arm64,darwin
+
+package machine
+
+import (
+ "github.com/containers/common/pkg/completion"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/machine"
+ "github.com/containers/podman/v3/pkg/machine/qemu"
+ "github.com/spf13/cobra"
+)
+
+var (
+ startCmd = &cobra.Command{
+ Use: "start [NAME]",
+ Short: "Start an existing machine",
+ Long: "Start an existing machine ",
+ RunE: start,
+ Args: cobra.MaximumNArgs(1),
+ Example: `podman machine start myvm`,
+ ValidArgsFunction: completion.AutocompleteNone,
+ }
+)
+
+func init() {
+ registry.Commands = append(registry.Commands, registry.CliCommand{
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
+ Command: startCmd,
+ Parent: machineCmd,
+ })
+}
+
+func start(cmd *cobra.Command, args []string) error {
+ var (
+ err error
+ vm machine.VM
+ vmType string
+ )
+ vmName := defaultMachineName
+ if len(args) > 0 && len(args[0]) > 0 {
+ vmName = args[0]
+ }
+ switch vmType {
+ default:
+ vm, err = qemu.LoadVMByName(vmName)
+ }
+ if err != nil {
+ return err
+ }
+ return vm.Start(vmName, machine.StartOptions{})
+}
diff --git a/cmd/podman/machine/stop.go b/cmd/podman/machine/stop.go
new file mode 100644
index 000000000..4fcb065a3
--- /dev/null
+++ b/cmd/podman/machine/stop.go
@@ -0,0 +1,53 @@
+// +build amd64,linux amd64,darwin arm64,darwin
+
+package machine
+
+import (
+ "github.com/containers/common/pkg/completion"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/machine"
+ "github.com/containers/podman/v3/pkg/machine/qemu"
+ "github.com/spf13/cobra"
+)
+
+var (
+ stopCmd = &cobra.Command{
+ Use: "stop [NAME]",
+ Short: "Stop an existing machine",
+ Long: "Stop an existing machine ",
+ RunE: stop,
+ Args: cobra.MaximumNArgs(1),
+ Example: `podman machine stop myvm`,
+ ValidArgsFunction: completion.AutocompleteNone,
+ }
+)
+
+func init() {
+ registry.Commands = append(registry.Commands, registry.CliCommand{
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
+ Command: stopCmd,
+ Parent: machineCmd,
+ })
+}
+
+// TODO Name shouldnt be required, need to create a default vm
+func stop(cmd *cobra.Command, args []string) error {
+ var (
+ err error
+ vm machine.VM
+ vmType string
+ )
+ vmName := defaultMachineName
+ if len(args) > 0 && len(args[0]) > 0 {
+ vmName = args[0]
+ }
+ switch vmType {
+ default:
+ vm, err = qemu.LoadVMByName(vmName)
+ }
+ if err != nil {
+ return err
+ }
+ return vm.Stop(vmName, machine.StopOptions{})
+}
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 561459c31..5219da26d 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -9,6 +9,7 @@ import (
_ "github.com/containers/podman/v3/cmd/podman/generate"
_ "github.com/containers/podman/v3/cmd/podman/healthcheck"
_ "github.com/containers/podman/v3/cmd/podman/images"
+ _ "github.com/containers/podman/v3/cmd/podman/machine"
_ "github.com/containers/podman/v3/cmd/podman/manifest"
_ "github.com/containers/podman/v3/cmd/podman/networks"
_ "github.com/containers/podman/v3/cmd/podman/play"
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 7722e35dd..2b77afbeb 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -3,7 +3,7 @@ package main
import (
"fmt"
"os"
- "path"
+ "path/filepath"
"runtime"
"runtime/pprof"
"strings"
@@ -57,7 +57,7 @@ Options:
var (
rootCmd = &cobra.Command{
- Use: path.Base(os.Args[0]) + " [options]",
+ Use: filepath.Base(os.Args[0]) + " [options]",
Long: "Manage pods, containers and images",
SilenceUsage: true,
SilenceErrors: true,
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go
index 0e96e1fbb..9e8a9f9b4 100644
--- a/cmd/podman/system/service_abi.go
+++ b/cmd/podman/system/service_abi.go
@@ -24,16 +24,28 @@ func restService(opts entities.ServiceOptions, flags *pflag.FlagSet, cfg *entiti
)
if opts.URI != "" {
- fields := strings.Split(opts.URI, ":")
- if len(fields) == 1 {
- return errors.Errorf("%s is an invalid socket destination", opts.URI)
+ if os.Getenv("LISTEN_FDS") != "" {
+ // If it is activated by systemd, use the first LISTEN_FD (3)
+ // instead of opening the socket file.
+ f := os.NewFile(uintptr(3), "podman.sock")
+ l, err := net.FileListener(f)
+ if err != nil {
+ return err
+ }
+ listener = &l
+ } else {
+ fields := strings.Split(opts.URI, ":")
+ if len(fields) == 1 {
+ return errors.Errorf("%s is an invalid socket destination", opts.URI)
+ }
+ network := fields[0]
+ address := strings.Join(fields[1:], ":")
+ l, err := net.Listen(network, address)
+ if err != nil {
+ return errors.Wrapf(err, "unable to create socket")
+ }
+ listener = &l
}
- address := strings.Join(fields[1:], ":")
- l, err := net.Listen(fields[0], address)
- if err != nil {
- return errors.Wrapf(err, "unable to create socket")
- }
- listener = &l
}
// Close stdin, so shortnames will not prompt
diff --git a/completions/powershell/podman-remote.ps1 b/completions/powershell/podman-remote.ps1
new file mode 100644
index 000000000..9cdbabc52
--- /dev/null
+++ b/completions/powershell/podman-remote.ps1
@@ -0,0 +1,227 @@
+# powershell completion for podman-remote -*- shell-script -*-
+
+function __podman-remote_debug {
+ if ($env:BASH_COMP_DEBUG_FILE) {
+ "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE"
+ }
+}
+
+filter __podman-remote_escapeStringWithSpecialChars {
+ $_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
+}
+
+Register-ArgumentCompleter -CommandName 'podman-remote' -ScriptBlock {
+ param(
+ $WordToComplete,
+ $CommandAst,
+ $CursorPosition
+ )
+
+ # Get the current command line and convert into a string
+ $Command = $CommandAst.CommandElements
+ $Command = "$Command"
+
+ __podman-remote_debug ""
+ __podman-remote_debug "========= starting completion logic =========="
+ __podman-remote_debug "WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition"
+
+ # The user could have moved the cursor backwards on the command-line.
+ # We need to trigger completion from the $CursorPosition location, so we need
+ # to truncate the command-line ($Command) up to the $CursorPosition location.
+ # Make sure the $Command is longer then the $CursorPosition before we truncate.
+ # This happens because the $Command does not include the last space.
+ if ($Command.Length -gt $CursorPosition) {
+ $Command=$Command.Substring(0,$CursorPosition)
+ }
+ __podman-remote_debug "Truncated command: $Command"
+
+ $ShellCompDirectiveError=1
+ $ShellCompDirectiveNoSpace=2
+ $ShellCompDirectiveNoFileComp=4
+ $ShellCompDirectiveFilterFileExt=8
+ $ShellCompDirectiveFilterDirs=16
+
+ # Prepare the command to request completions for the program.
+ # Split the command at the first space to separate the program and arguments.
+ $Program,$Arguments = $Command.Split(" ",2)
+ $RequestComp="$Program __complete $Arguments"
+ __podman-remote_debug "RequestComp: $RequestComp"
+
+ # we cannot use $WordToComplete because it
+ # has the wrong values if the cursor was moved
+ # so use the last argument
+ if ($WordToComplete -ne "" ) {
+ $WordToComplete = $Arguments.Split(" ")[-1]
+ }
+ __podman-remote_debug "New WordToComplete: $WordToComplete"
+
+
+ # Check for flag with equal sign
+ $IsEqualFlag = ($WordToComplete -Like "--*=*" )
+ if ( $IsEqualFlag ) {
+ __podman-remote_debug "Completing equal sign flag"
+ # Remove the flag part
+ $Flag,$WordToComplete = $WordToComplete.Split("=",2)
+ }
+
+ if ( $WordToComplete -eq "" -And ( -Not $IsEqualFlag )) {
+ # If the last parameter is complete (there is a space following it)
+ # We add an extra empty parameter so we can indicate this to the go method.
+ __podman-remote_debug "Adding extra empty parameter"
+ # We need to use `"`" to pass an empty argument a "" or '' does not work!!!
+ $RequestComp="$RequestComp" + ' `"`"'
+ }
+
+ __podman-remote_debug "Calling $RequestComp"
+ #call the command store the output in $out and redirect stderr and stdout to null
+ # $Out is an array contains each line per element
+ Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null
+
+
+ # get directive from last line
+ [int]$Directive = $Out[-1].TrimStart(':')
+ if ($Directive -eq "") {
+ # There is no directive specified
+ $Directive = 0
+ }
+ __podman-remote_debug "The completion directive is: $Directive"
+
+ # remove directive (last element) from out
+ $Out = $Out | Where-Object { $_ -ne $Out[-1] }
+ __podman-remote_debug "The completions are: $Out"
+
+ if (($Directive -band $ShellCompDirectiveError) -ne 0 ) {
+ # Error code. No completion.
+ __podman-remote_debug "Received error from custom completion go code"
+ return
+ }
+
+ $Longest = 0
+ $Values = $Out | ForEach-Object {
+ #Split the output in name and description
+ $Name, $Description = $_.Split("`t",2)
+ __podman-remote_debug "Name: $Name Description: $Description"
+
+ # Look for the longest completion so that we can format things nicely
+ if ($Longest -lt $Name.Length) {
+ $Longest = $Name.Length
+ }
+
+ # Set the description to a one space string if there is none set.
+ # This is needed because the CompletionResult does not accept an empty string as argument
+ if (-Not $Description) {
+ $Description = " "
+ }
+ @{Name="$Name";Description="$Description"}
+ }
+
+
+ $Space = " "
+ if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) {
+ # remove the space here
+ __podman-remote_debug "ShellCompDirectiveNoSpace is called"
+ $Space = ""
+ }
+
+ if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) {
+ __podman-remote_debug "ShellCompDirectiveNoFileComp is called"
+
+ if ($Values.Length -eq 0) {
+ # Just print an empty string here so the
+ # shell does not start to complete paths.
+ # We cannot use CompletionResult here because
+ # it does not accept an empty string as argument.
+ ""
+ return
+ }
+ }
+
+ if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or
+ (($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 )) {
+ __podman-remote_debug "ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported"
+
+ # return here to prevent the completion of the extensions
+ return
+ }
+
+ $Values = $Values | Where-Object {
+ # filter the result
+ $_.Name -like "$WordToComplete*"
+
+ # Join the flag back if we have a equal sign flag
+ if ( $IsEqualFlag ) {
+ __podman-remote_debug "Join the equal sign flag back to the completion value"
+ $_.Name = $Flag + "=" + $_.Name
+ }
+ }
+
+ # Get the current mode
+ $Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq "Tab" }).Function
+ __podman-remote_debug "Mode: $Mode"
+
+ $Values | ForEach-Object {
+
+ # store temporay because switch will overwrite $_
+ $comp = $_
+
+ # PowerShell supports three different completion modes
+ # - TabCompleteNext (default windows style - on each key press the next option is displayed)
+ # - Complete (works like bash)
+ # - MenuComplete (works like zsh)
+ # You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function <mode>
+
+ # CompletionResult Arguments:
+ # 1) CompletionText text to be used as the auto completion result
+ # 2) ListItemText text to be displayed in the suggestion list
+ # 3) ResultType type of completion result
+ # 4) ToolTip text for the tooltip with details about the object
+
+ switch ($Mode) {
+
+ # bash like
+ "Complete" {
+
+ if ($Values.Length -eq 1) {
+ __podman-remote_debug "Only one completion left"
+
+ # insert space after value
+ [System.Management.Automation.CompletionResult]::new($($comp.Name | __podman-remote_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
+
+ } else {
+ # Add the proper number of spaces to align the descriptions
+ while($comp.Name.Length -lt $Longest) {
+ $comp.Name = $comp.Name + " "
+ }
+
+ # Check for empty description and only add parentheses if needed
+ if ($($comp.Description) -eq " " ) {
+ $Description = ""
+ } else {
+ $Description = " ($($comp.Description))"
+ }
+
+ [System.Management.Automation.CompletionResult]::new("$($comp.Name)$Description", "$($comp.Name)$Description", 'ParameterValue', "$($comp.Description)")
+ }
+ }
+
+ # zsh like
+ "MenuComplete" {
+ # insert space after value
+ # MenuComplete will automatically show the ToolTip of
+ # the highlighted value at the bottom of the suggestions.
+ [System.Management.Automation.CompletionResult]::new($($comp.Name | __podman-remote_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
+ }
+
+ # TabCompleteNext and in case we get something unknown
+ Default {
+ # Like MenuComplete but we don't want to add a space here because
+ # the user need to press space anyway to get the completion.
+ # Description will not be shown because thats not possible with TabCompleteNext
+ [System.Management.Automation.CompletionResult]::new($($comp.Name | __podman-remote_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
+ }
+ }
+
+ }
+}
+
+# This file is generated with "podman-remote completion"; see: podman-completion(1)
diff --git a/completions/powershell/podman.ps1 b/completions/powershell/podman.ps1
new file mode 100644
index 000000000..6b6f832d2
--- /dev/null
+++ b/completions/powershell/podman.ps1
@@ -0,0 +1,227 @@
+# powershell completion for podman -*- shell-script -*-
+
+function __podman_debug {
+ if ($env:BASH_COMP_DEBUG_FILE) {
+ "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE"
+ }
+}
+
+filter __podman_escapeStringWithSpecialChars {
+ $_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
+}
+
+Register-ArgumentCompleter -CommandName 'podman' -ScriptBlock {
+ param(
+ $WordToComplete,
+ $CommandAst,
+ $CursorPosition
+ )
+
+ # Get the current command line and convert into a string
+ $Command = $CommandAst.CommandElements
+ $Command = "$Command"
+
+ __podman_debug ""
+ __podman_debug "========= starting completion logic =========="
+ __podman_debug "WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition"
+
+ # The user could have moved the cursor backwards on the command-line.
+ # We need to trigger completion from the $CursorPosition location, so we need
+ # to truncate the command-line ($Command) up to the $CursorPosition location.
+ # Make sure the $Command is longer then the $CursorPosition before we truncate.
+ # This happens because the $Command does not include the last space.
+ if ($Command.Length -gt $CursorPosition) {
+ $Command=$Command.Substring(0,$CursorPosition)
+ }
+ __podman_debug "Truncated command: $Command"
+
+ $ShellCompDirectiveError=1
+ $ShellCompDirectiveNoSpace=2
+ $ShellCompDirectiveNoFileComp=4
+ $ShellCompDirectiveFilterFileExt=8
+ $ShellCompDirectiveFilterDirs=16
+
+ # Prepare the command to request completions for the program.
+ # Split the command at the first space to separate the program and arguments.
+ $Program,$Arguments = $Command.Split(" ",2)
+ $RequestComp="$Program __complete $Arguments"
+ __podman_debug "RequestComp: $RequestComp"
+
+ # we cannot use $WordToComplete because it
+ # has the wrong values if the cursor was moved
+ # so use the last argument
+ if ($WordToComplete -ne "" ) {
+ $WordToComplete = $Arguments.Split(" ")[-1]
+ }
+ __podman_debug "New WordToComplete: $WordToComplete"
+
+
+ # Check for flag with equal sign
+ $IsEqualFlag = ($WordToComplete -Like "--*=*" )
+ if ( $IsEqualFlag ) {
+ __podman_debug "Completing equal sign flag"
+ # Remove the flag part
+ $Flag,$WordToComplete = $WordToComplete.Split("=",2)
+ }
+
+ if ( $WordToComplete -eq "" -And ( -Not $IsEqualFlag )) {
+ # If the last parameter is complete (there is a space following it)
+ # We add an extra empty parameter so we can indicate this to the go method.
+ __podman_debug "Adding extra empty parameter"
+ # We need to use `"`" to pass an empty argument a "" or '' does not work!!!
+ $RequestComp="$RequestComp" + ' `"`"'
+ }
+
+ __podman_debug "Calling $RequestComp"
+ #call the command store the output in $out and redirect stderr and stdout to null
+ # $Out is an array contains each line per element
+ Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null
+
+
+ # get directive from last line
+ [int]$Directive = $Out[-1].TrimStart(':')
+ if ($Directive -eq "") {
+ # There is no directive specified
+ $Directive = 0
+ }
+ __podman_debug "The completion directive is: $Directive"
+
+ # remove directive (last element) from out
+ $Out = $Out | Where-Object { $_ -ne $Out[-1] }
+ __podman_debug "The completions are: $Out"
+
+ if (($Directive -band $ShellCompDirectiveError) -ne 0 ) {
+ # Error code. No completion.
+ __podman_debug "Received error from custom completion go code"
+ return
+ }
+
+ $Longest = 0
+ $Values = $Out | ForEach-Object {
+ #Split the output in name and description
+ $Name, $Description = $_.Split("`t",2)
+ __podman_debug "Name: $Name Description: $Description"
+
+ # Look for the longest completion so that we can format things nicely
+ if ($Longest -lt $Name.Length) {
+ $Longest = $Name.Length
+ }
+
+ # Set the description to a one space string if there is none set.
+ # This is needed because the CompletionResult does not accept an empty string as argument
+ if (-Not $Description) {
+ $Description = " "
+ }
+ @{Name="$Name";Description="$Description"}
+ }
+
+
+ $Space = " "
+ if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) {
+ # remove the space here
+ __podman_debug "ShellCompDirectiveNoSpace is called"
+ $Space = ""
+ }
+
+ if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) {
+ __podman_debug "ShellCompDirectiveNoFileComp is called"
+
+ if ($Values.Length -eq 0) {
+ # Just print an empty string here so the
+ # shell does not start to complete paths.
+ # We cannot use CompletionResult here because
+ # it does not accept an empty string as argument.
+ ""
+ return
+ }
+ }
+
+ if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or
+ (($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 )) {
+ __podman_debug "ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported"
+
+ # return here to prevent the completion of the extensions
+ return
+ }
+
+ $Values = $Values | Where-Object {
+ # filter the result
+ $_.Name -like "$WordToComplete*"
+
+ # Join the flag back if we have a equal sign flag
+ if ( $IsEqualFlag ) {
+ __podman_debug "Join the equal sign flag back to the completion value"
+ $_.Name = $Flag + "=" + $_.Name
+ }
+ }
+
+ # Get the current mode
+ $Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq "Tab" }).Function
+ __podman_debug "Mode: $Mode"
+
+ $Values | ForEach-Object {
+
+ # store temporay because switch will overwrite $_
+ $comp = $_
+
+ # PowerShell supports three different completion modes
+ # - TabCompleteNext (default windows style - on each key press the next option is displayed)
+ # - Complete (works like bash)
+ # - MenuComplete (works like zsh)
+ # You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function <mode>
+
+ # CompletionResult Arguments:
+ # 1) CompletionText text to be used as the auto completion result
+ # 2) ListItemText text to be displayed in the suggestion list
+ # 3) ResultType type of completion result
+ # 4) ToolTip text for the tooltip with details about the object
+
+ switch ($Mode) {
+
+ # bash like
+ "Complete" {
+
+ if ($Values.Length -eq 1) {
+ __podman_debug "Only one completion left"
+
+ # insert space after value
+ [System.Management.Automation.CompletionResult]::new($($comp.Name | __podman_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
+
+ } else {
+ # Add the proper number of spaces to align the descriptions
+ while($comp.Name.Length -lt $Longest) {
+ $comp.Name = $comp.Name + " "
+ }
+
+ # Check for empty description and only add parentheses if needed
+ if ($($comp.Description) -eq " " ) {
+ $Description = ""
+ } else {
+ $Description = " ($($comp.Description))"
+ }
+
+ [System.Management.Automation.CompletionResult]::new("$($comp.Name)$Description", "$($comp.Name)$Description", 'ParameterValue', "$($comp.Description)")
+ }
+ }
+
+ # zsh like
+ "MenuComplete" {
+ # insert space after value
+ # MenuComplete will automatically show the ToolTip of
+ # the highlighted value at the bottom of the suggestions.
+ [System.Management.Automation.CompletionResult]::new($($comp.Name | __podman_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
+ }
+
+ # TabCompleteNext and in case we get something unknown
+ Default {
+ # Like MenuComplete but we don't want to add a space here because
+ # the user need to press space anyway to get the completion.
+ # Description will not be shown because thats not possible with TabCompleteNext
+ [System.Management.Automation.CompletionResult]::new($($comp.Name | __podman_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
+ }
+ }
+
+ }
+}
+
+# This file is generated with "podman completion"; see: podman-completion(1)
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index fcb1284e7..36878365d 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -36,6 +36,9 @@ do
fi
done
+# Make sure cni network plugins directory exists
+mkdir -p /etc/cni/net.d
+
# Ensure that all lower-level contexts and child-processes have
# ready access to higher level orchestration (e.g Cirrus-CI)
# variables.
diff --git a/contrib/tmpfile/podman.conf b/contrib/tmpfile/podman.conf
index e7cad4066..650678a21 100644
--- a/contrib/tmpfile/podman.conf
+++ b/contrib/tmpfile/podman.conf
@@ -1,5 +1,6 @@
# /tmp/podman-run-* directory can contain content for Podman containers that have run
# for many days. This following line prevents systemd from removing this content.
x /tmp/podman-run-*
+x /tmp/containers-user-*
D! /run/podman 0700 root root
D! /var/lib/cni/networks
diff --git a/docs/source/Commands.rst b/docs/source/Commands.rst
index 0bb23f71b..766b6a02e 100644
--- a/docs/source/Commands.rst
+++ b/docs/source/Commands.rst
@@ -55,6 +55,8 @@ Commands
:doc:`logs <markdown/podman-logs.1>` Fetch the logs of a container
+:doc:`machine <markdown/podman-machine.1>` Manage podman's virtual machine
+
:doc:`manifest <manifest>` Create and manipulate manifest lists and image indexes
:doc:`mount <markdown/podman-mount.1>` Mount a working container's root filesystem
diff --git a/docs/source/conf.py b/docs/source/conf.py
index e3715937d..883e1240e 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -29,13 +29,9 @@ author = "team"
# ones.
extensions = [
"sphinx_markdown_tables",
+ "recommonmark"
]
-source_parsers = {
- ".md": "recommonmark.parser.CommonMarkParser",
-}
-
-
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
diff --git a/docs/source/machine.rst b/docs/source/machine.rst
new file mode 100644
index 000000000..be9ef1e95
--- /dev/null
+++ b/docs/source/machine.rst
@@ -0,0 +1,9 @@
+Machine
+======
+
+
+:doc:`init <markdown/podman-machine-init.1>` Initialize a new virtual machine
+:doc:`rm <markdown/podman-machine-rm.1>` Remove a virtual machine
+:doc:`ssh <markdown/podman-machine-ssh.1>` SSH into a virtual machine
+:doc:`start <markdown/podman-machine-start.1>` Start a virtual machine
+:doc:`stop <markdown/podman-machine-stop.1>` Stop a virtual machine
diff --git a/docs/source/markdown/podman-attach.1.md b/docs/source/markdown/podman-attach.1.md
index c4a5eec50..eb770d07d 100644
--- a/docs/source/markdown/podman-attach.1.md
+++ b/docs/source/markdown/podman-attach.1.md
@@ -14,24 +14,24 @@ or name, either to view its ongoing output or to control it interactively.
You can detach from the container (and leave it running) using a configurable key sequence. The default
sequence is `ctrl-p,ctrl-q`.
-Configure the keys sequence using the **--detach-keys** option, or specifying
+Configure the keys sequence using the **\-\-detach-keys** option, or specifying
it in the **containers.conf** file: see **containers.conf(5)** for more information.
## OPTIONS
-#### **--detach-keys**=*sequence*
+#### **\-\-detach-keys**=*sequence*
Specify the key sequence for detaching a container. Format is a single character `[a-Z]` or one or more `ctrl-<value>` characters where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. Specifying "" will disable this feature. The default is *ctrl-p,ctrl-q*.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--no-stdin**
+#### **\-\-no-stdin**
Do not attach STDIN. The default is false.
-#### **--sig-proxy**=*true*|*false*
+#### **\-\-sig-proxy**=*true*|*false*
Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true*.
diff --git a/docs/source/markdown/podman-auto-update.1.md b/docs/source/markdown/podman-auto-update.1.md
index ad1e425aa..f82a1375c 100644
--- a/docs/source/markdown/podman-auto-update.1.md
+++ b/docs/source/markdown/podman-auto-update.1.md
@@ -34,7 +34,7 @@ Podman ships with a `podman-auto-update.service` systemd unit. This unit is tri
## OPTIONS
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
diff --git a/docs/source/markdown/podman-build.1.md b/docs/source/markdown/podman-build.1.md
index 8fcfe555e..1bb3c2c3a 100644
--- a/docs/source/markdown/podman-build.1.md
+++ b/docs/source/markdown/podman-build.1.md
@@ -45,14 +45,14 @@ command to see these containers. External containers can be removed with the
## OPTIONS
-#### **--add-host**=*host*
+#### **\-\-add-host**=*host*
Add a custom host-to-IP mapping (host:ip)
-Add a line to /etc/hosts. The format is hostname:ip. The **--add-host** option
+Add a line to /etc/hosts. The format is hostname:ip. The **\-\-add-host** option
can be set multiple times.
-#### **--annotation**=*annotation*
+#### **\-\-annotation**=*annotation*
Add an image *annotation* (e.g. annotation=*value*) to the image metadata. Can
be used multiple times.
@@ -60,12 +60,12 @@ be used multiple times.
Note: this information is not present in Docker image formats, so it is
discarded when writing images in Docker formats.
-#### **--arch**=*arch*
+#### **\-\-arch**=*arch*
Set the ARCH of the image to the provided value instead of the architecture of
the host.
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is
${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
@@ -76,26 +76,26 @@ Note: You can also override the default path of the authentication file by
setting the REGISTRY\_AUTH\_FILE environment variable.
`export REGISTRY_AUTH_FILE=path`
-#### **--build-arg**=*arg=value*
+#### **\-\-build-arg**=*arg=value*
Specifies a build argument and its value, which will be interpolated in
instructions read from the Containerfiles in the same way that environment
variables are, but which will not be added to environment variable list in the
resulting image's configuration.
-#### **--cache-from**
+#### **\-\-cache-from**
Images to utilize as potential cache sources. Podman does not currently support
caching so this is a NOOP. (This option is not available with the remote Podman client)
-#### **--cap-add**=*CAP\_xxx*
+#### **\-\-cap-add**=*CAP\_xxx*
When executing RUN instructions, run the command specified in the instruction
with the specified capability added to its capability set.
Certain capabilities are granted by default; this option can be used to add
more.
-#### **--cap-drop**=*CAP\_xxx*
+#### **\-\-cap-drop**=*CAP\_xxx*
When executing RUN instructions, run the command specified in the instruction
with the specified capability removed from its capability set.
@@ -104,40 +104,40 @@ CAP\_FSETID, CAP\_KILL, CAP\_MKNOD, CAP\_NET\_BIND\_SERVICE, CAP\_SETFCAP,
CAP\_SETGID, CAP\_SETPCAP, CAP\_SETUID, and CAP\_SYS\_CHROOT capabilities are
granted by default; this option can be used to remove them.
-If a capability is specified to both the **--cap-add** and **--cap-drop**
+If a capability is specified to both the **\-\-cap-add** and **\-\-cap-drop**
options, it will be dropped, regardless of the order in which the options were
given.
-#### **--cert-dir**=*path*
+#### **\-\-cert-dir**=*path*
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
Default certificates directory is _/etc/containers/certs.d_. (This option is not available with the remote Podman client)
-#### **--cgroup-parent**=*path*
+#### **\-\-cgroup-parent**=*path*
Path to cgroups under which the cgroup for the container will be created. If the
path is not absolute, the path is considered to be relative to the cgroups path
of the init process. Cgroups will be created if they do not already exist.
-#### **--compress**
+#### **\-\-compress**
This option is added to be aligned with other containers CLIs.
Podman doesn't communicate with a daemon or a remote server.
Thus, compressing the data before sending it is irrelevant to Podman. (This option is not available with the remote Podman client)
-#### **--cni-config-dir**=*directory*
+#### **\-\-cni-config-dir**=*directory*
Location of CNI configuration files which will dictate which plugins will be
used to configure network interfaces and routing for containers created for
handling `RUN` instructions, if those containers will be run in their own
network namespaces, and networking is not disabled.
-#### **--cni-plugin-path**=*directory[:directory[:directory[...]]]*
+#### **\-\-cni-plugin-path**=*directory[:directory[:directory[...]]]*
List of directories in which the CNI plugins which will be used for configuring
network namespaces can be found.
-#### **--cpu-period**=*limit*
+#### **\-\-cpu-period**=*limit*
Set the CPU period for the Completely Fair Scheduler (CFS), which is a
duration in microseconds. Once the container's CPU quota is used up, it will
@@ -148,20 +148,20 @@ On some systems, changing the CPU limits may not be allowed for non-root
users. For more details, see
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
-#### **--cpu-quota**=*limit*
+#### **\-\-cpu-quota**=*limit*
Limit the CPU Completely Fair Scheduler (CFS) quota.
Limit the container's CPU usage. By default, containers run with the full
CPU resource. The limit is a number in microseconds. If you provide a number,
the container will be allowed to use that much CPU time until the CPU period
-ends (controllable via **--cpu-period**).
+ends (controllable via **\-\-cpu-period**).
On some systems, changing the CPU limits may not be allowed for non-root
users. For more details, see
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
-#### **--cpu-shares**, **-c**=*shares*
+#### **\-\-cpu-shares**, **-c**=*shares*
CPU shares (relative weight)
@@ -169,7 +169,7 @@ By default, all containers get the same proportion of CPU cycles. This
proportion can be modified by changing the container's CPU share weighting
relative to the weighting of all other running containers.
-To modify the proportion from the default of 1024, use the **--cpu-shares**
+To modify the proportion from the default of 1024, use the **\-\-cpu-shares**
flag to set the weighting to 2 or higher.
The proportion will only apply when CPU-intensive processes are running.
@@ -199,11 +199,11 @@ division of CPU shares:
101 {C1} 1 100% of CPU1
102 {C1} 2 100% of CPU2
-#### **--cpuset-cpus**=*num*
+#### **\-\-cpuset-cpus**=*num*
CPUs in which to allow execution (0-3, 0,1)
-#### **--cpuset-mems**=*nodes*
+#### **\-\-cpuset-mems**=*nodes*
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on
NUMA systems.
@@ -212,26 +212,26 @@ If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1`
then processes in your container will only use memory from the first
two memory nodes.
-#### **--creds**=*creds*
+#### **\-\-creds**=*creds*
The [username[:password]] to use to authenticate with the registry if required.
If one or both values are not supplied, a command line prompt will appear and
the value can be entered. The password is entered without echo.
-#### **--decryption-key**=*key[:passphrase]*
+#### **\-\-decryption-key**=*key[:passphrase]*
The [key[:passphrase]] to be used for decryption of images. Key can point to
keys and/or certificates. Decryption will be tried with all keys. If the key is
protected by a passphrase, it is required to be passed in the argument and
omitted otherwise.
-#### **--device**=_host-device_[**:**_container-device_][**:**_permissions_]
+#### **\-\-device**=_host-device_[**:**_container-device_][**:**_permissions_]
Add a host device to the container. Optional *permissions* parameter
can be used to specify device permissions, it is combination of
**r** for read, **w** for write, and **m** for **mknod**(2).
-Example: **--device=/dev/sdc:/dev/xvdc:rwm**.
+Example: **\-\-device=/dev/sdc:/dev/xvdc:rwm**.
Note: if _host_device_ is a symbolic link then it will be resolved first.
The container will only store the major and minor numbers of the host device.
@@ -239,24 +239,24 @@ The container will only store the major and minor numbers of the host device.
Note: if the user only has access rights via a group, accessing the device
from inside a rootless container will fail. The **crun**(1) runtime offers a
workaround for this by adding the option
-#### **--annotation run.oci.keep_original_groups=1**.
+#### **\-\-annotation run.oci.keep_original_groups=1**.
-#### **--disable-compression**, **-D**
+#### **\-\-disable-compression**, **-D**
Don't compress filesystem layers when building the image unless it is required
by the location where the image is being written. This is the default setting,
because image layers are compressed automatically when they are pushed to
registries, and images being written to local storage would only need to be
decompressed again to be stored. Compression can be forced in all cases by
-specifying **--disable-compression=false**.
+specifying **\-\-disable-compression=false**.
-#### **--disable-content-trust**
+#### **\-\-disable-content-trust**
This is a Docker specific option to disable image verification to a Docker
registry and is not supported by Podman. This flag is a NOOP and provided
solely for scripting compatibility. (This option is not available with the remote Podman client)
-#### **--dns**=*dns*
+#### **\-\-dns**=*dns*
Set custom DNS servers to be used during the build.
@@ -269,15 +269,15 @@ The special value **none** can be specified to disable creation of
/etc/resolv.conf in the container by Podman. The /etc/resolv.conf file in the
image will be used without changes.
-#### **--dns-option**=*option*
+#### **\-\-dns-option**=*option*
Set custom DNS options to be used during the build.
-#### **--dns-search**=*domain*
+#### **\-\-dns-search**=*domain*
Set custom DNS search domains to be used during the build.
-#### **--file**, **-f**=*Containerfile*
+#### **\-\-file**, **-f**=*Containerfile*
Specifies a Containerfile which contains instructions for building the image,
either a local file or an **http** or **https** URL. If more than one
@@ -290,12 +290,12 @@ context.
If you specify `-f -`, the Containerfile contents will be read from stdin.
-#### **--force-rm**=*true|false*
+#### **\-\-force-rm**=*true|false*
Always remove intermediate containers after a build, even if the build fails
(default true).
-#### **--format**
+#### **\-\-format**
Control the format for the built image's manifest and configuration data.
Recognized formats include *oci* (OCI image-spec v1.0, the default) and
@@ -304,28 +304,28 @@ Recognized formats include *oci* (OCI image-spec v1.0, the default) and
Note: You can also override the default format by setting the BUILDAH\_FORMAT
environment variable. `export BUILDAH_FORMAT=docker`
-#### **--from**
+#### **\-\-from**
Overrides the first `FROM` instruction within the Containerfile. If there are multiple
FROM instructions in a Containerfile, only the first is changed.
-**-h**, **--help**
+**-h**, **\-\-help**
Print usage statement
-#### **--http-proxy**
+#### **\-\-http-proxy**
Pass through HTTP Proxy environment variables.
-#### **--iidfile**=*ImageIDfile*
+#### **\-\-iidfile**=*ImageIDfile*
Write the image ID to the file.
-#### **--ignorefile**
+#### **\-\-ignorefile**
Path to an alternative .dockerignore file.
-#### **--ipc**=*how*
+#### **\-\-ipc**=*how*
Sets the configuration for IPC namespaces when handling `RUN` instructions.
The configured value can be "" (the empty string) or "container" to indicate
@@ -334,7 +334,7 @@ that the IPC namespace in which `podman` itself is being run should be reused,
or it can be the path to an IPC namespace which is already in use by
another process.
-#### **--isolation**=*type*
+#### **\-\-isolation**=*type*
Controls what type of isolation is used for running processes as part of `RUN`
instructions. Recognized types include *oci* (OCI-compatible runtime, the
@@ -348,13 +348,13 @@ chroot(1) than container technology).
Note: You can also override the default isolation type by setting the
BUILDAH\_ISOLATION environment variable. `export BUILDAH_ISOLATION=oci`
-#### **--jobs**=*number*
+#### **\-\-jobs**=*number*
Run up to N concurrent stages in parallel. If the number of jobs is greater
than 1, stdin will be read from /dev/null. If 0 is specified, then there is
no limit in the number of jobs that run in parallel.
-#### **--label**=*label*
+#### **\-\-label**=*label*
Add an image *label* (e.g. label=*value*) to the image metadata. Can be used
multiple times.
@@ -369,30 +369,30 @@ capabilities is a subset of the default list.
If the specified capabilities are not in the default set, Podman will
print an error message and will run the container with the default capabilities.
-#### **--layers**
+#### **\-\-layers**
Cache intermediate images during the build process (Default is `true`).
Note: You can also override the default value of layers by setting the
BUILDAH\_LAYERS environment variable. `export BUILDAH_LAYERS=true`
-#### **--logfile**=*filename*
+#### **\-\-logfile**=*filename*
Log output which would be sent to standard output and standard error to the
specified file instead of to standard output and standard error.
-#### **--loglevel**=*number*
+#### **\-\-loglevel**=*number*
Adjust the logging level up or down. Valid option values range from -2 to 3,
with 3 being roughly equivalent to using the global *--debug* option, and
values below 0 omitting even error messages which accompany fatal errors.
-#### **--manifest** "manifest"
+#### **\-\-manifest** "manifest"
Name of the manifest list to which the image will be added. Creates the manifest list
if it does not exist. This option is useful for building multi architecture images.
-#### **--memory**, **-m**=*LIMIT*
+#### **\-\-memory**, **-m**=*LIMIT*
Memory limit (format: `<number>[<unit>]`, where unit = b (bytes), k (kilobytes),
m (megabytes), or g (gigabytes))
@@ -403,18 +403,18 @@ not limited. The actual limit may be rounded up to a multiple of the operating
system's page size (the value would be very large, that's millions of
trillions).
-#### **--memory-swap**=*LIMIT*
+#### **\-\-memory-swap**=*LIMIT*
A limit value equal to memory plus swap. Must be used with the **-m**
-(**--memory**) flag. The swap `LIMIT` should always be larger than **-m**
-(**--memory**) value. By default, the swap `LIMIT` will be set to double
+(**\-\-memory**) flag. The swap `LIMIT` should always be larger than **-m**
+(**\-\-memory**) value. By default, the swap `LIMIT` will be set to double
the value of --memory.
The format of `LIMIT` is `<number>[<unit>]`. Unit can be `b` (bytes),
`k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you don't specify a
unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap.
-#### **--network**=*mode*, **--net**
+#### **\-\-network**=*mode*, **\-\-net**
Sets the configuration for network namespaces when handling `RUN` instructions.
@@ -427,17 +427,17 @@ considered insecure.
- **ns:**_path_: path to a network namespace to join.
- **private**: create a new namespace for the container (default).
-#### **--no-cache**
+#### **\-\-no-cache**
Do not use existing cached images for the container build. Build from the start
with a new set of cached layers.
-#### **--os**=*string*
+#### **\-\-os**=*string*
Set the OS to the provided value instead of the current operating system of the
host.
-#### **--pid**=*pid*
+#### **\-\-pid**=*pid*
Sets the configuration for PID namespaces when handling `RUN` instructions.
The configured value can be "" (the empty string) or "container" to indicate
@@ -446,13 +446,13 @@ that the PID namespace in which `podman` itself is being run should be reused,
or it can be the path to a PID namespace which is already in use by another
process.
-#### **--platform**="Linux"
+#### **\-\-platform**="Linux"
This option has no effect on the build. Other container engines use this option
to control the execution platform for the build (e.g., Windows, Linux) which is
not required for Buildah as it supports only Linux.
-#### **--pull**
+#### **\-\-pull**
When the option is specified or set to "true", pull the image. Raise an error
if the image could not be pulled, even if the image is present locally.
@@ -461,28 +461,28 @@ If the option is disabled (with *--pull=false*) or not specified, pull the
image from the registry only if the image is not present locally. Raise an
error if the image is not found in the registries and is not present locally.
-#### **--pull-always**
+#### **\-\-pull-always**
Pull the image from the first registry it is found in as listed in
registries.conf. Raise an error if not found in the registries, even if the
image is present locally.
-#### **--pull-never**
+#### **\-\-pull-never**
Do not pull the image from the registry, use only the local version. Raise an
error if the image is not present locally.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Suppress output messages which indicate which instruction is being processed,
and of progress when pulling images from a registry, and when writing the
output image.
-#### **--rm**=*true|false*
+#### **\-\-rm**=*true|false*
Remove intermediate containers after a successful build (default true).
-#### **--runtime**=*path*
+#### **\-\-runtime**=*path*
The *path* to an alternate OCI-compatible runtime, which will be used to run
commands specified by the **RUN** instruction.
@@ -490,7 +490,7 @@ commands specified by the **RUN** instruction.
Note: You can also override the default runtime by setting the BUILDAH\_RUNTIME
environment variable. `export BUILDAH_RUNTIME=/usr/local/bin/runc`
-#### **--security-opt**=*option*
+#### **\-\-security-opt**=*option*
Security Options
@@ -510,7 +510,7 @@ container
- `seccomp=profile.json` : White listed syscalls seccomp Json file to be used
as a seccomp filter
-#### **--shm-size**=*size*
+#### **\-\-shm-size**=*size*
Size of `/dev/shm`. The format is `<number><unit>`. `number` must be greater
than `0`.
@@ -518,40 +518,40 @@ Unit is optional and can be `b` (bytes), `k` (kilobytes), `m`(megabytes), or
`g` (gigabytes). If you omit the unit, the system uses bytes. If you omit the
size entirely, the system uses `64m`.
-#### **--sign-by**=*fingerprint*
+#### **\-\-sign-by**=*fingerprint*
Sign the image using a GPG key with the specified FINGERPRINT. (This option is not available with the remote Podman client)
-#### **--squash**
+#### **\-\-squash**
Squash all of the image's new layers into a single new layer; any preexisting
layers are not squashed.
-#### **--squash-all**
+#### **\-\-squash-all**
Squash all of the new image's layers (including those inherited from a base
image) into a single new layer.
-#### **--stdin**
+#### **\-\-stdin**
Pass stdin into the RUN containers. Sometime commands being RUN within a Containerfile
want to request information from the user. For example apt asking for a confirmation for install.
Use --stdin to be able to interact from the terminal during the build.
-#### **--tag**, **-t**=*imageName*
+#### **\-\-tag**, **-t**=*imageName*
Specifies the name which will be assigned to the resulting image if the build
process completes successfully.
If _imageName_ does not include a registry name, the registry name *localhost*
will be prepended to the image name.
-#### **--target**=*stageName*
+#### **\-\-target**=*stageName*
Set the target build stage to build. When building a Containerfile with
multiple build stages, --target can be used to specify an intermediate build
stage by name as the final stage for the resulting image. Commands after the target stage will be skipped.
-#### **--timestamp** *seconds*
+#### **\-\-timestamp** *seconds*
Set the create timestamp to seconds since epoch to allow for deterministic
builds (defaults to current time). By default, the created timestamp is changed
@@ -562,12 +562,12 @@ specified and therefore not changed, allowing the image's sha256 hash to remain
same. All files committed to the layers of the image will be created with the
timestamp.
-#### **--tls-verify**=*true|false*
+#### **\-\-tls-verify**=*true|false*
Require HTTPS and verify certificates when talking to container registries
(defaults to true). (This option is not available with the remote Podman client)
-#### **--ulimit**=*type*=*soft-limit*[:*hard-limit*]
+#### **\-\-ulimit**=*type*=*soft-limit*[:*hard-limit*]
Specifies resource limits to apply to processes launched when processing `RUN`
instructions. This option can be specified multiple times. Recognized resource
@@ -588,7 +588,7 @@ types include:
"sigpending": maximum number of pending signals (ulimit -i)
"stack": maximum stack size (ulimit -s)
-#### **--userns**=*how*
+#### **\-\-userns**=*how*
Sets the configuration for user namespaces when handling `RUN` instructions.
The configured value can be "" (the empty string) or "container" to indicate
@@ -597,7 +597,7 @@ the user namespace in which `podman` itself is being run should be reused, or
it can be the path to an user namespace which is already in use by another
process.
-#### **--userns-uid-map**=*mapping*
+#### **\-\-userns-uid-map**=*mapping*
Directly specifies a UID mapping which should be used to set ownership, at the
filesystem level, on the working container's contents.
@@ -618,7 +618,7 @@ If none of --userns-uid-map-user, --userns-gid-map-group, or --userns-uid-map
are specified, but --userns-gid-map is specified, the UID map will be set to
use the same numeric values as the GID map.
-#### **--userns-gid-map**=*mapping*
+#### **\-\-userns-gid-map**=*mapping*
Directly specifies a GID mapping which should be used to set ownership, at the
filesystem level, on the working container's contents.
@@ -639,7 +639,7 @@ If none of --userns-uid-map-user, --userns-gid-map-group, or --userns-gid-map
are specified, but --userns-uid-map is specified, the GID map will be set to
use the same numeric values as the UID map.
-#### **--userns-uid-map-user**=*user*
+#### **\-\-userns-uid-map-user**=*user*
Specifies that a UID mapping which should be used to set ownership, at the
filesystem level, on the working container's contents, can be found in entries
@@ -654,7 +654,7 @@ suitable user name to use as the default setting for this option.
mappings are relative to the rootless usernamespace in the container, rather
than being relative to the host as it would be when run rootful.
-#### **--userns-gid-map-group**=*group*
+#### **\-\-userns-gid-map-group**=*group*
Specifies that a GID mapping which should be used to set ownership, at the
filesystem level, on the working container's contents, can be found in entries
@@ -669,7 +669,7 @@ suitable group name to use as the default setting for this option.
mappings are relative to the rootless usernamespace in the container, rather
than being relative to the host as it would be when run rootful.
-#### **--uts**=*how*
+#### **\-\-uts**=*how*
Sets the configuration for UTS namespaces when the handling `RUN` instructions.
The configured value can be "" (the empty string) or "container" to indicate
@@ -678,11 +678,11 @@ that the UTS namespace in which `podman` itself is being run should be reused,
or it can be the path to a UTS namespace which is already in use by another
process.
-#### **--variant**=""
+#### **\-\-variant**=""
Set the architecture variant of the image to be pulled.
-#### **--volume**, **-v**[=*[HOST-DIR:CONTAINER-DIR[:OPTIONS]]*]
+#### **\-\-volume**, **-v**[=*[HOST-DIR:CONTAINER-DIR[:OPTIONS]]*]
Create a bind mount. If you specify, ` -v /HOST-DIR:/CONTAINER-DIR`, Podman
bind mounts `/HOST-DIR` in the host to `/CONTAINER-DIR` in the Podman
diff --git a/docs/source/markdown/podman-commit.1.md b/docs/source/markdown/podman-commit.1.md
index 7485e9bd9..35ee1d010 100644
--- a/docs/source/markdown/podman-commit.1.md
+++ b/docs/source/markdown/podman-commit.1.md
@@ -22,39 +22,39 @@ If *image* is not provided, the values for the `REPOSITORY` and `TAG` values of
## OPTIONS
-#### **--author**, **-a**=*author*
+#### **\-\-author**, **-a**=*author*
Set the author for the committed image
-#### **--change**, **-c**=*instruction*
+#### **\-\-change**, **-c**=*instruction*
Apply the following possible instructions to the created image:
**CMD** | **ENTRYPOINT** | **ENV** | **EXPOSE** | **LABEL** | **ONBUILD** | **STOPSIGNAL** | **USER** | **VOLUME** | **WORKDIR**
Can be set multiple times
-#### **--format**, **-f**=*format*
+#### **\-\-format**, **-f**=*format*
Set the format of the image manifest and metadata. The currently supported formats are _oci_ and _docker_. If
not specifically set, the default format used is _oci_.
-#### **--iidfile**=*ImageIDfile*
+#### **\-\-iidfile**=*ImageIDfile*
Write the image ID to the file.
-#### **--include-volumes**
+#### **\-\-include-volumes**
Include in the committed image any volumes added to the container by the `--volume` or `--mount` options to the `podman create` and `podman run` commands.
-#### **--message**, **-m**=*message*
+#### **\-\-message**, **-m**=*message*
Set commit message for committed image. The message field is not supported in _oci_ format.
-#### **--pause**, **-p**
+#### **\-\-pause**, **-p**
Pause the container when creating an image
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Suppress output
diff --git a/docs/source/markdown/podman-completion.1.md b/docs/source/markdown/podman-completion.1.md
index 50b0b6145..964f3264e 100644
--- a/docs/source/markdown/podman-completion.1.md
+++ b/docs/source/markdown/podman-completion.1.md
@@ -4,53 +4,60 @@
podman\-completion - Generate shell completion scripts
## SYNOPSIS
-**podman completion** [*options*] *bash*|*zsh*|*fish*
+**podman completion** [*options*] *bash*|*zsh*|*fish*|*powershell*
## DESCRIPTION
-The completion command allows you to generate shell completion scripts. Supported shells are **bash**, **zsh** and **fish**.
+The completion command generates shell completion scripts for a variety of shells. Supported shells are **bash**, **zsh**, **fish** and **powershell**.
These script are used by the shell to provide suggestions and complete commands when you are typing the command and press [TAB].
Usually these scripts are automatically installed via the package manager.
## OPTIONS
-#### **--file**, **-f**
+#### **\-\-file**, **-f**
Write the generated output to file.
-#### **--no-desc**
+#### **\-\-no-desc**
Do not provide description in the completions.
## Installation
### BASH
-Make sure you have `bash-completion` installed on your system.
+Make sure you have `bash-completion` installed on the system.
-To load the completion script into your current session run:
+To load the completion script into the current session run:
`source <(podman completion bash)`
-To make it available in all your bash sessions run:
+To make it available for all bash sessions run:
`podman completion bash -f /etc/bash_completion.d/podman`
### ZSH
-If shell completion is not already enabled in your environment you will need to enable it. You can execute the following once:
+If shell completion is not already enabled in the environment you will need to enable it. You can execute the following once:
`echo "autoload -U compinit; compinit" >> ~/.zshrc`
-To make it available in all your zsh sessions run:
+To make it available for all zsh sessions run:
`podman completion zsh -f "${fpath[1]}/_podman"`
Once you reload the shell the autocompletion should be working.
### FISH
-To load the completion script into your current session run:
+To load the completion script into the current session run:
`podman completion fish | source`
-To make it available in all your fish sessions run:
+To make it available for all fish sessions run:
`podman completion fish -f ~/.config/fish/completions/podman.fish`
+### POWERSHELL
+To load the completion script into the current session run:
+`podman.exe completion powershell | Out-String | Invoke-Expression`
+
+To make it available in all powershell sessions that a user has, write the
+completion output to a file and source that to the user's powershell profile.
+More information about profiles is available with `Get-Help about_Profiles`.
## SEE ALSO
[podman(1)](podman.1.md)
diff --git a/docs/source/markdown/podman-container-checkpoint.1.md b/docs/source/markdown/podman-container-checkpoint.1.md
index 46b6cb646..a93464508 100644
--- a/docs/source/markdown/podman-container-checkpoint.1.md
+++ b/docs/source/markdown/podman-container-checkpoint.1.md
@@ -10,61 +10,61 @@ podman\-container\-checkpoint - Checkpoints one or more running containers
Checkpoints all the processes in one or more containers. You may use container IDs or names as input.
## OPTIONS
-#### **--keep**, **-k**
+#### **\-\-keep**, **-k**
Keep all temporary log and statistics files created by CRIU during checkpointing. These files
are not deleted if checkpointing fails for further debugging. If checkpointing succeeds these
files are theoretically not needed, but if these files are needed Podman can keep the files
for further analysis.
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Checkpoint all running containers.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, checkpoint the last created container. (This option is not available with the remote Podman client)
-#### **--leave-running**, **-R**
+#### **\-\-leave-running**, **-R**
Leave the container running after checkpointing instead of stopping it.
-#### **--tcp-established**
+#### **\-\-tcp-established**
Checkpoint a container with established TCP connections. If the checkpoint
image contains established TCP connections, this options is required during
restore. Defaults to not checkpointing containers with established TCP
connections.
-#### **--export**, **-e**
+#### **\-\-export**, **-e**
Export the checkpoint to a tar.gz file. The exported checkpoint can be used
to import the container on another system and thus enabling container live
migration. This checkpoint archive also includes all changes to the container's
-root file-system, if not explicitly disabled using **--ignore-rootfs**
+root file-system, if not explicitly disabled using **\-\-ignore-rootfs**
-#### **--ignore-rootfs**
+#### **\-\-ignore-rootfs**
-This only works in combination with **--export, -e**. If a checkpoint is
-exported to a tar.gz file it is possible with the help of **--ignore-rootfs**
+This only works in combination with **\-\-export, -e**. If a checkpoint is
+exported to a tar.gz file it is possible with the help of **\-\-ignore-rootfs**
to explicitly disable including changes to the root file-system into
the checkpoint archive file.
-#### **--ignore-volumes**
+#### **\-\-ignore-volumes**
-This option must be used in combination with the **--export, -e** option.
+This option must be used in combination with the **\-\-export, -e** option.
When this option is specified, the content of volumes associated with
the container will not be included into the checkpoint tar.gz file.
-#### **--pre-checkpoint**, **-P**
+#### **\-\-pre-checkpoint**, **-P**
Dump the container's memory information only, leaving the container running. Later
operations will supersede prior dumps. It only works on runc 1.0-rc3 or higher.
-#### **--with-previous**
+#### **\-\-with-previous**
Check out the container with previous criu image files in pre-dump. It only works
-without **--pre-checkpoint** or **-P**. It only works on runc 1.0-rc3 or higher.
+without **\-\-pre-checkpoint** or **-P**. It only works on runc 1.0-rc3 or higher.
## EXAMPLE
diff --git a/docs/source/markdown/podman-container-cleanup.1.md b/docs/source/markdown/podman-container-cleanup.1.md
index 8fd267b47..bd650c6af 100644
--- a/docs/source/markdown/podman-container-cleanup.1.md
+++ b/docs/source/markdown/podman-container-cleanup.1.md
@@ -12,26 +12,26 @@ Sometimes container's mount points and network stacks can remain if the podman c
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Cleanup all containers.
-#### **--exec**=_session_
+#### **\-\-exec**=_session_
Clean up an exec session for a single container.
-Can only be specified if a single container is being cleaned up (conflicts with **--all** as such).
-If **--rm** is not specified, temporary files for the exec session will be cleaned up; if it is, the exec session will be removed from the container.
-Conflicts with **--rmi** as the container is not being cleaned up so the image cannot be removed.
+Can only be specified if a single container is being cleaned up (conflicts with **\-\-all** as such).
+If **\-\-rm** is not specified, temporary files for the exec session will be cleaned up; if it is, the exec session will be removed from the container.
+Conflicts with **\-\-rmi** as the container is not being cleaned up so the image cannot be removed.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--rm**
+#### **\-\-rm**
After cleanup, remove the container entirely.
-#### **--rmi**
+#### **\-\-rmi**
After cleanup, remove the image entirely.
diff --git a/docs/source/markdown/podman-container-exists.1.md b/docs/source/markdown/podman-container-exists.1.md
index 381d968ab..28f1832a2 100644
--- a/docs/source/markdown/podman-container-exists.1.md
+++ b/docs/source/markdown/podman-container-exists.1.md
@@ -14,10 +14,10 @@ was an issue accessing the local storage.
## OPTIONS
-#### **--external**=*true|false*
+#### **\-\-external**=*true|false*
Check for external containers as well as Podman containers. These external containers are generally created via other container technology such as Buildah or CRI-O.
-**-h**, **--help**
+**-h**, **\-\-help**
Print usage statement
## EXAMPLES
diff --git a/docs/source/markdown/podman-container-prune.1.md b/docs/source/markdown/podman-container-prune.1.md
index b199f9ebb..abdf58981 100644
--- a/docs/source/markdown/podman-container-prune.1.md
+++ b/docs/source/markdown/podman-container-prune.1.md
@@ -11,7 +11,7 @@ podman-container-prune - Remove all stopped containers from local storage
## OPTIONS
-#### **--filter**=*filters*
+#### **\-\-filter**=*filters*
Provide filter values.
@@ -26,11 +26,11 @@ The until filter can be Unix timestamps, date formatted timestamps, or Go durati
The label filter accepts two formats. One is the label=... (label=_key_ or label=_key=value_), which removes containers with the specified labels. The other format is the label!=... (label!=_key_ or label!=_key=value_), which removes containers without the specified labels.
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Do not provide an interactive prompt for container removal.
-**-h**, **--help**
+**-h**, **\-\-help**
Print usage statement
diff --git a/docs/source/markdown/podman-container-restore.1.md b/docs/source/markdown/podman-container-restore.1.md
index ef8722279..3b517fb3d 100644
--- a/docs/source/markdown/podman-container-restore.1.md
+++ b/docs/source/markdown/podman-container-restore.1.md
@@ -10,7 +10,7 @@ podman\-container\-restore - Restores one or more containers from a checkpoint
Restores a container from a checkpoint. You may use container IDs or names as input.
## OPTIONS
-#### **--keep**, **-k**
+#### **\-\-keep**, **-k**
Keep all temporary log and statistics files created by CRIU during
checkpointing as well as restoring. These files are not deleted if restoring
@@ -21,18 +21,18 @@ files created during checkpointing. The size required by the checkpoint
directory is roughly the same as the amount of memory required by the
processes in the checkpointed container.
-Without the **-k**, **--keep** option the checkpoint will be consumed and cannot be used
+Without the **-k**, **\-\-keep** option the checkpoint will be consumed and cannot be used
again.
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Restore all checkpointed containers.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, restore the last created container. (This option is not available with the remote Podman client)
-#### **--tcp-established**
+#### **\-\-tcp-established**
Restore a container with established TCP connections. If the checkpoint image
contains established TCP connections, this option is required during restore.
@@ -40,58 +40,58 @@ If the checkpoint image does not contain established TCP connections this
option is ignored. Defaults to not restoring containers with established TCP
connections.
-#### **--import**, **-i**
+#### **\-\-import**, **-i**
Import a checkpoint tar.gz file, which was exported by Podman. This can be used
to import a checkpointed container from another host. Do not specify a *container*
argument when using this option.
-#### **--import-previous**
+#### **\-\-import-previous**
Import a pre-checkpoint tar.gz file which was exported by Podman. This option
-must be used with **-i** or **--import**. It only works on runc 1.0-rc3 or higher.
+must be used with **-i** or **\-\-import**. It only works on runc 1.0-rc3 or higher.
-#### **--name**, **-n**
+#### **\-\-name**, **-n**
-This is only available in combination with **--import, -i**. If a container is restored
-from a checkpoint tar.gz file it is possible to rename it with **--name, -n**. This
+This is only available in combination with **\-\-import, -i**. If a container is restored
+from a checkpoint tar.gz file it is possible to rename it with **\-\-name, -n**. This
way it is possible to restore a container from a checkpoint multiple times with different
names.
-If the **--name, -n** option is used, Podman will not attempt to assign the same IP
+If the **\-\-name, -n** option is used, Podman will not attempt to assign the same IP
address to the container it was using before checkpointing as each IP address can only
be used once and the restored container will have another IP address. This also means
-that **--name, -n** cannot be used in combination with **--tcp-established**.
+that **\-\-name, -n** cannot be used in combination with **\-\-tcp-established**.
-#### **--ignore-rootfs**
+#### **\-\-ignore-rootfs**
-This is only available in combination with **--import, -i**. If a container is restored
+This is only available in combination with **\-\-import, -i**. If a container is restored
from a checkpoint tar.gz file it is possible that it also contains all root file-system
-changes. With **--ignore-rootfs** it is possible to explicitly disable applying these
+changes. With **\-\-ignore-rootfs** it is possible to explicitly disable applying these
root file-system changes to the restored container.
-#### **--ignore-static-ip**
+#### **\-\-ignore-static-ip**
-If the container was started with **--ip** the restored container also tries to use that
+If the container was started with **\-\-ip** the restored container also tries to use that
IP address and restore fails if that IP address is already in use. This can happen, if
-a container is restored multiple times from an exported checkpoint with **--name, -n**.
+a container is restored multiple times from an exported checkpoint with **\-\-name, -n**.
-Using **--ignore-static-ip** tells Podman to ignore the IP address if it was configured
-with **--ip** during container creation.
+Using **\-\-ignore-static-ip** tells Podman to ignore the IP address if it was configured
+with **\-\-ip** during container creation.
-#### **--ignore-static-mac**
+#### **\-\-ignore-static-mac**
-If the container was started with **--mac-address** the restored container also
+If the container was started with **\-\-mac-address** the restored container also
tries to use that MAC address and restore fails if that MAC address is already
in use. This can happen, if a container is restored multiple times from an
-exported checkpoint with **--name, -n**.
+exported checkpoint with **\-\-name, -n**.
-Using **--ignore-static-mac** tells Podman to ignore the MAC address if it was
-configured with **--mac-address** during container creation.
+Using **\-\-ignore-static-mac** tells Podman to ignore the MAC address if it was
+configured with **\-\-mac-address** during container creation.
-#### **--ignore-volumes**
+#### **\-\-ignore-volumes**
-This option must be used in combination with the **--import, -i** option.
+This option must be used in combination with the **\-\-import, -i** option.
When restoring containers from a checkpoint tar.gz file with this option,
the content of associated volumes will not be restored.
diff --git a/docs/source/markdown/podman-container-runlabel.1.md b/docs/source/markdown/podman-container-runlabel.1.md
index 36bcbab3d..84d283cf8 100644
--- a/docs/source/markdown/podman-container-runlabel.1.md
+++ b/docs/source/markdown/podman-container-runlabel.1.md
@@ -41,7 +41,7 @@ is used.
Any additional arguments will be appended to the command.
## OPTIONS
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
@@ -49,39 +49,39 @@ If the authorization state is not found there, $HOME/.docker/config.json is chec
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--display**
+#### **\-\-display**
Display the label's value of the image having populated its environment variables.
The runlabel command will not execute if --display is specified.
-#### **--cert-dir**=*path*
+#### **\-\-cert-dir**=*path*
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
Default certificates directory is _/etc/containers/certs.d_. (This option is not available with the remote Podman client)
-#### **--creds**=*[username[:password]]*
+#### **\-\-creds**=*[username[:password]]*
The [username[:password]] to use to authenticate with the registry if required.
If one or both values are not supplied, a command line prompt will appear and the
value can be entered. The password is entered without echo.
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--name**, **-n**=*name*
+#### **\-\-name**, **-n**=*name*
Use this name for creating content for the container. NAME will default to the IMAGENAME if it is not specified.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Suppress output information when pulling images
-#### **--replace**
+#### **\-\-replace**
If a container exists of the default or given name, as needed it will be stopped, deleted and a new container will be
created from this image.
-#### **--tls-verify**
+#### **\-\-tls-verify**
Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true,
then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified,
diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md
index 5c53f8601..9ae4ab207 100644
--- a/docs/source/markdown/podman-create.1.md
+++ b/docs/source/markdown/podman-create.1.md
@@ -65,22 +65,22 @@ and specified with a _tag_.
$ podman create oci-archive:/tmp/fedora echo hello
## OPTIONS
-#### **--add-host**=*host*
+#### **\-\-add-host**=*host*
Add a custom host-to-IP mapping (host:ip)
-Add a line to /etc/hosts. The format is hostname:ip. The **--add-host**
+Add a line to /etc/hosts. The format is hostname:ip. The **\-\-add-host**
option can be set multiple times.
-#### **--annotation**=*key=value*
+#### **\-\-annotation**=*key=value*
Add an annotation to the container. The format is key=value.
-The **--annotation** option can be set multiple times.
+The **\-\-annotation** option can be set multiple times.
-#### **--arch**=*ARCH*
+#### **\-\-arch**=*ARCH*
Override the architecture, defaults to hosts, of the image to be pulled. For example, `arm`.
-#### **--attach**, **-a**=*location*
+#### **\-\-attach**, **-a**=*location*
Attach to STDIN, STDOUT or STDERR.
@@ -91,30 +91,30 @@ error. It can even pretend to be a TTY (this is what most commandline
executables expect) and pass along signals. The **-a** option can be set for
each of stdin, stdout, and stderr.
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--blkio-weight**=*weight*
+#### **\-\-blkio-weight**=*weight*
Block IO weight (relative weight) accepts a weight value between 10 and 1000.
-#### **--blkio-weight-device**=*weight*
+#### **\-\-blkio-weight-device**=*weight*
Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`).
-#### **--cap-add**=*capability*
+#### **\-\-cap-add**=*capability*
Add Linux capabilities
-#### **--cap-drop**=*capability*
+#### **\-\-cap-drop**=*capability*
Drop Linux capabilities
-#### **--cgroupns**=*mode*
+#### **\-\-cgroupns**=*mode*
Set the cgroup namespace mode for the container.
**`host`**: use the host's cgroup namespace inside the container.
@@ -124,33 +124,33 @@ Set the cgroup namespace mode for the container.
If the host uses cgroups v1, the default is set to **host**. On cgroups v2 the default is **private**.
-#### **--cgroups**=*mode*
+#### **\-\-cgroups**=*mode*
Determines whether the container will create CGroups.
Valid values are *enabled*, *disabled*, *no-conmon*, *split*, which the default being *enabled*.
The *enabled* option will create a new cgroup under the cgroup-parent.
-The *disabled* option will force the container to not create CGroups, and thus conflicts with CGroup options (**--cgroupns** and **--cgroup-parent**).
+The *disabled* option will force the container to not create CGroups, and thus conflicts with CGroup options (**\-\-cgroupns** and **\-\-cgroup-parent**).
The *no-conmon* option disables a new CGroup only for the conmon process.
The *split* option splits the current cgroup in two sub-cgroups: one for conmon and one for the container payload. It is not possible to set *--cgroup-parent* with *split*.
-#### **--cgroup-parent**=*path*
+#### **\-\-cgroup-parent**=*path*
Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.
-#### **--cgroup-conf**=*KEY=VALUE*
+#### **\-\-cgroup-conf**=*KEY=VALUE*
-When running on cgroup v2, specify the cgroup file to write to and its value. For example **--cgroup-conf=memory.high=1073741824** sets the memory.high limit to 1GB.
+When running on cgroup v2, specify the cgroup file to write to and its value. For example **\-\-cgroup-conf=memory.high=1073741824** sets the memory.high limit to 1GB.
-#### **--cidfile**=*id*
+#### **\-\-cidfile**=*id*
Write the container ID to the file
-#### **--conmon-pidfile**=*path*
+#### **\-\-conmon-pidfile**=*path*
Write the pid of the `conmon` process to a file. `conmon` runs in a separate process than Podman, so this is necessary when using systemd to restart Podman containers.
-#### **--cpu-period**=*limit*
+#### **\-\-cpu-period**=*limit*
Set the CPU period for the Completely Fair Scheduler (CFS), which is a
duration in microseconds. Once the container's CPU quota is used up, it will
@@ -161,26 +161,26 @@ On some systems, changing the CPU limits may not be allowed for non-root
users. For more details, see
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
-#### **--cpu-quota**=*limit*
+#### **\-\-cpu-quota**=*limit*
Limit the CPU Completely Fair Scheduler (CFS) quota.
Limit the container's CPU usage. By default, containers run with the full
CPU resource. The limit is a number in microseconds. If you provide a number,
the container will be allowed to use that much CPU time until the CPU period
-ends (controllable via **--cpu-period**).
+ends (controllable via **\-\-cpu-period**).
On some systems, changing the CPU limits may not be allowed for non-root
users. For more details, see
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
-#### **--cpu-rt-period**=*microseconds*
+#### **\-\-cpu-rt-period**=*microseconds*
Limit the CPU real-time period in microseconds
Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify.
-#### **--cpu-rt-runtime**=*microseconds*
+#### **\-\-cpu-rt-runtime**=*microseconds*
Limit the CPU real-time runtime in microseconds
@@ -189,7 +189,7 @@ Period of 1,000,000us and Runtime of 950,000us means that this container could c
The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
-#### **--cpu-shares**=*shares*
+#### **\-\-cpu-shares**=*shares*
CPU shares (relative weight)
@@ -197,7 +197,7 @@ By default, all containers get the same proportion of CPU cycles. This proportio
can be modified by changing the container's CPU share weighting relative
to the weighting of all other running containers.
-To modify the proportion from the default of 1024, use the **--cpu-shares**
+To modify the proportion from the default of 1024, use the **\-\-cpu-shares**
flag to set the weighting to 2 or higher.
The proportion will only apply when CPU-intensive processes are running.
@@ -226,21 +226,21 @@ PID container CPU CPU share
101 {C1} 1 100% of CPU1
102 {C1} 2 100% of CPU2
-#### **--cpus**=*number*
+#### **\-\-cpus**=*number*
Number of CPUs. The default is *0.0* which means no limit. This is shorthand
-for **--cpu-period** and **--cpu-quota**, so you may only set either
-#### **--cpus** or **--cpu-period** and **--cpu-quota**.
+for **\-\-cpu-period** and **\-\-cpu-quota**, so you may only set either
+#### **\-\-cpus** or **\-\-cpu-period** and **\-\-cpu-quota**.
On some systems, changing the CPU limits may not be allowed for non-root
users. For more details, see
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
-#### **--cpuset-cpus**=*cpus*
+#### **\-\-cpuset-cpus**=*cpus*
CPUs in which to allow execution (0-3, 0,1)
-#### **--cpuset-mems**=*nodes*
+#### **\-\-cpuset-mems**=*nodes*
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
@@ -248,75 +248,75 @@ If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1`
then processes in your container will only use memory from the first
two memory nodes.
-#### **--device**=_host-device_[**:**_container-device_][**:**_permissions_]
+#### **\-\-device**=_host-device_[**:**_container-device_][**:**_permissions_]
Add a host device to the container. Optional *permissions* parameter
can be used to specify device permissions, it is combination of
**r** for read, **w** for write, and **m** for **mknod**(2).
-Example: **--device=/dev/sdc:/dev/xvdc:rwm**.
+Example: **\-\-device=/dev/sdc:/dev/xvdc:rwm**.
Note: if _host_device_ is a symbolic link then it will be resolved first.
The container will only store the major and minor numbers of the host device.
Note: if the user only has access rights via a group, accessing the device
from inside a rootless container will fail. The **crun**(1) runtime offers a
-workaround for this by adding the option **--annotation run.oci.keep_original_groups=1**.
+workaround for this by adding the option **\-\-annotation run.oci.keep_original_groups=1**.
Podman may load kernel modules required for using the specified
device. The devices that podman will load modules when necessary are:
/dev/fuse.
-#### **--device-cgroup-rule**="type major:minor mode"
+#### **\-\-device-cgroup-rule**="type major:minor mode"
Add a rule to the cgroup allowed devices list. The rule is expected to be in the format specified in the Linux kernel documentation (Documentation/cgroup-v1/devices.txt):
- type: a (all), c (char), or b (block);
- major and minor: either a number, or * for all;
- mode: a composition of r (read), w (write), and m (mknod(2)).
-#### **--device-read-bps**=*path*
+#### **\-\-device-read-bps**=*path*
Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb)
-#### **--device-read-iops**=*path*
+#### **\-\-device-read-iops**=*path*
Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000)
-#### **--device-write-bps**=*path*
+#### **\-\-device-write-bps**=*path*
Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb)
-#### **--device-write-iops**=*path*
+#### **\-\-device-write-iops**=*path*
Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000)
-#### **--disable-content-trust**
+#### **\-\-disable-content-trust**
This is a Docker specific option to disable image verification to a Docker
registry and is not supported by Podman. This flag is a NOOP and provided
solely for scripting compatibility.
-#### **--dns**=*dns*
+#### **\-\-dns**=*dns*
-Set custom DNS servers. Invalid if using **--dns** and **--network** that is set to 'none' or `container:<name|id>`.
+Set custom DNS servers. Invalid if using **\-\-dns** and **\-\-network** that is set to 'none' or `container:<name|id>`.
This option can be used to override the DNS
configuration passed to the container. Typically this is necessary when the
host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this
-is the case the **--dns** flags is necessary for every run.
+is the case the **\-\-dns** flags is necessary for every run.
The special value **none** can be specified to disable creation of **/etc/resolv.conf** in the container by Podman.
The **/etc/resolv.conf** file in the image will be used without changes.
-#### **--dns-opt**=*option*
+#### **\-\-dns-opt**=*option*
-Set custom DNS options. Invalid if using **--dns-opt** and **--network** that is set to 'none' or `container:<name|id>`.
+Set custom DNS options. Invalid if using **\-\-dns-opt** and **\-\-network** that is set to 'none' or `container:<name|id>`.
-#### **--dns-search**=*domain*
+#### **\-\-dns-search**=*domain*
-Set custom DNS search domains. Invalid if using **--dns-search** and **--network** that is set to 'none' or `container:<name|id>`. (Use --dns-search=. if you don't wish to set the search domain)
+Set custom DNS search domains. Invalid if using **\-\-dns-search** and **\-\-network** that is set to 'none' or `container:<name|id>`. (Use --dns-search=. if you don't wish to set the search domain)
-#### **--entrypoint**=*"command"* | *'["command", "arg1", ...]'*
+#### **\-\-entrypoint**=*"command"* | *'["command", "arg1", ...]'*
Overwrite the default ENTRYPOINT of the image
@@ -328,12 +328,12 @@ default nature or behavior, so that when you set an ENTRYPOINT you can run the
container as if it were that binary, complete with default options, and you can
pass in more options via the COMMAND. But, sometimes an operator may want to run
something else inside the container, so you can override the default ENTRYPOINT
-at runtime by using a **--entrypoint** and a string to specify the new
+at runtime by using a **\-\-entrypoint** and a string to specify the new
ENTRYPOINT.
You need to specify multi option commands in the form of a json string.
-#### **--env**, **-e**=*env*
+#### **\-\-env**, **-e**=*env*
Set environment variables
@@ -341,30 +341,30 @@ This option allows arbitrary environment variables that are available for the pr
See [**Environment**](#environment) note below for precedence and examples.
-#### **--env-host**=*true|false*
+#### **\-\-env-host**=*true|false*
Use host environment inside of the container. See **Environment** note below for precedence. (This option is not available with the remote Podman client)
-#### **--env-file**=*file*
+#### **\-\-env-file**=*file*
Read in a line delimited file of environment variables. See **Environment** note below for precedence.
-#### **--expose**=*port*
+#### **\-\-expose**=*port*
Expose a port, or a range of ports (e.g. --expose=3300-3310) to set up port redirection
on the host system.
-#### **--gidmap**=*container_gid:host_gid:amount*
+#### **\-\-gidmap**=*container_gid:host_gid:amount*
GID map for the user namespace. Using this flag will run the container with user namespace enabled. It conflicts with the `--userns` and `--subgidname` flags.
The following example maps uids 0-2000 in the container to the uids 30000-31999 on the host and gids 0-2000 in the container to the gids 30000-31999 on the host. `--gidmap=0:30000:2000`
-#### **--group-add**=*group*
+#### **\-\-group-add**=*group*
Add additional groups to run as
-#### **--health-cmd**=*"command"* | *'["command", "arg1", ...]'*
+#### **\-\-health-cmd**=*"command"* | *'["command", "arg1", ...]'*
Set or alter a healthcheck command for a container. The command is a command to be executed inside your
container that determines your container health. The command is required for other healthcheck options
@@ -373,35 +373,35 @@ to be applied. A value of `none` disables existing healthchecks.
Multiple options can be passed in the form of a JSON array; otherwise, the command will be interpreted
as an argument to `/bin/sh -c`.
-#### **--health-interval**=*interval*
+#### **\-\-health-interval**=*interval*
Set an interval for the healthchecks (a value of `disable` results in no automatic timer setup) (default "30s")
-#### **--health-retries**=*retries*
+#### **\-\-health-retries**=*retries*
The number of retries allowed before a healthcheck is considered to be unhealthy. The default value is `3`.
-#### **--health-start-period**=*period*
+#### **\-\-health-start-period**=*period*
The initialization time needed for a container to bootstrap. The value can be expressed in time format like
`2m3s`. The default value is `0s`
-#### **--health-timeout**=*timeout*
+#### **\-\-health-timeout**=*timeout*
The maximum time allowed to complete the healthcheck before an interval is considered failed. Like start-period, the
value can be expressed in a time format such as `1m22s`. The default value is `30s`.
-#### **--hostname**=*name*, **-h**
+#### **\-\-hostname**=*name*, **-h**
Container host name
Sets the container host name that is available inside the container. Can only be used with a private UTS namespace `--uts=private` (default). If `--pod` is specified and the pod shares the UTS namespace (default) the pod's hostname will be used.
-#### **--help**
+#### **\-\-help**
Print usage statement
-#### **--http-proxy**=*true|false*
+#### **\-\-http-proxy**=*true|false*
By default proxy environment variables are passed into the container if set
for the Podman process. This can be disabled by setting the `--http-proxy`
@@ -421,7 +421,7 @@ container:
Defaults to `true`
-#### **--image-volume**, **builtin-volume**=*bind|tmpfs|ignore*
+#### **\-\-image-volume**, **builtin-volume**=*bind|tmpfs|ignore*
Tells Podman how to handle the builtin image volumes. Default is **bind**.
@@ -430,37 +430,37 @@ Tells Podman how to handle the builtin image volumes. Default is **bind**.
content that disappears when the container is stopped.
- **ignore**: All volumes are just ignored and no action is taken.
-#### **--init**
+#### **\-\-init**
Run an init inside the container that forwards signals and reaps processes.
-#### **--init-path**=*path*
+#### **\-\-init-path**=*path*
Path to the container-init binary.
-#### **--interactive**, **-i**=*true|false*
+#### **\-\-interactive**, **-i**=*true|false*
Keep STDIN open even if not attached. The default is *false*.
-#### **--ip6**=*ip*
+#### **\-\-ip6**=*ip*
Not implemented
-#### **--ip**=*ip*
+#### **\-\-ip**=*ip*
Specify a static IP address for the container, for example **10.88.64.128**.
This option can only be used if the container is joined to only a single network - i.e., `--network=_network-name_` is used at most once -
and if the container is not joining another container's network namespace via `--network=container:_id_`.
The address must be within the CNI network's IP address pool (default **10.88.0.0/16**).
-#### **--ipc**=*ipc*
+#### **\-\-ipc**=*ipc*
Default is to create a private IPC namespace (POSIX SysV IPC) for the container
`container:<name|id>`: reuses another container shared memory, semaphores and message queues
`host`: use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.
`ns:<path>` path to an IPC namespace to join.
-#### **--kernel-memory**=*number[unit]*
+#### **\-\-kernel-memory**=*number[unit]*
Kernel memory limit (format: `<number>[<unit>]`, where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
@@ -470,34 +470,34 @@ is not limited. If you specify a limit, it may be rounded up to a multiple
of the operating system's page size and the value can be very large,
millions of trillions.
-#### **--label**, **-l**=*label*
+#### **\-\-label**, **-l**=*label*
Add metadata to a container (e.g., --label com.example.key=value)
-#### **--label-file**=*file*
+#### **\-\-label-file**=*file*
Read in a line delimited file of labels
-#### **--link-local-ip**=*ip*
+#### **\-\-link-local-ip**=*ip*
Not implemented
-#### **--log-driver**="*k8s-file*"
+#### **\-\-log-driver**="*k8s-file*"
Logging driver for the container. Currently available options are *k8s-file*, *journald*, and *none*, with *json-file* aliased to *k8s-file* for scripting compatibility.
-#### **--log-opt**=*name*=*value*
+#### **\-\-log-opt**=*name*=*value*
Set custom logging configuration. The following *name*s are supported:
- **path**: specify a path to the log file
-(e.g. **--log-opt path=/var/log/container/mycontainer.json**);
+(e.g. **\-\-log-opt path=/var/log/container/mycontainer.json**);
- **max-size**: specify a max size of the log file
-(e.g. **--log-opt max-size=10mb**);
+(e.g. **\-\-log-opt max-size=10mb**);
- **tag**: specify a custom log tag for the container
-(e.g. **--log-opt tag="{{.ImageName}}"**.
+(e.g. **\-\-log-opt tag="{{.ImageName}}"**.
It supports the same keys as **podman inspect --format**.
@@ -509,7 +509,7 @@ It supports the same keys as `podman inspect --format`.
It is currently supported only by the journald log driver.
-#### **--mac-address**=*address*
+#### **\-\-mac-address**=*address*
Container MAC address (e.g. 92:d0:c6:0a:29:33)
@@ -517,7 +517,7 @@ Remember that the MAC address in an Ethernet network must be unique.
The IPv6 link-local address will be based on the device's MAC address
according to RFC4862.
-#### **--memory**, **-m**=*limit*
+#### **\-\-memory**, **-m**=*limit*
Memory limit (format: `<number>[<unit>]`, where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
@@ -527,32 +527,32 @@ RAM. If a limit of 0 is specified (not using **-m**), the container's memory is
not limited. The actual limit may be rounded up to a multiple of the operating
system's page size (the value would be very large, that's millions of trillions).
-#### **--memory-reservation**=*limit*
+#### **\-\-memory-reservation**=*limit*
Memory soft limit (format: `<number>[<unit>]`, where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
After setting memory reservation, when the system detects memory contention
or low memory, containers are forced to restrict their consumption to their
-reservation. So you should always set the value below **--memory**, otherwise the
+reservation. So you should always set the value below **\-\-memory**, otherwise the
hard limit will take precedence. By default, memory reservation will be the same
as memory limit.
-#### **--memory-swap**=*limit*
+#### **\-\-memory-swap**=*limit*
A limit value equal to memory plus swap. Must be used with the **-m**
-(**--memory**) flag. The swap `LIMIT` should always be larger than **-m**
-(**--memory**) value. By default, the swap `LIMIT` will be set to double
+(**\-\-memory**) flag. The swap `LIMIT` should always be larger than **-m**
+(**\-\-memory**) value. By default, the swap `LIMIT` will be set to double
the value of --memory.
The format of `LIMIT` is `<number>[<unit>]`. Unit can be `b` (bytes),
`k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you don't specify a
unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap.
-#### **--memory-swappiness**=*number*
+#### **\-\-memory-swappiness**=*number*
Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
-#### **--mount**=*type=TYPE,TYPE-SPECIFIC-OPTION[,...]*
+#### **\-\-mount**=*type=TYPE,TYPE-SPECIFIC-OPTION[,...]*
Attach a filesystem mount to the container
@@ -609,7 +609,7 @@ Current supported mount TYPEs are **bind**, **volume**, **image**, **tmpfs** and
· notmpcopyup: Disable copying files from the image to the tmpfs.
-#### **--name**=*name*
+#### **\-\-name**=*name*
Assign a name to the container
@@ -619,13 +619,13 @@ UUID short identifier (“f78375b1c487”)
Name (“jonah”)
podman generates a UUID for each container, and if a name is not assigned
-to the container with **--name** then it will generate a random
+to the container with **\-\-name** then it will generate a random
string name. The name is useful any place you need to identify a container.
This works for both background and foreground containers.
-#### **--network**=*mode*, **--net**
+#### **\-\-network**=*mode*, **\-\-net**
-Set the network mode for the container. Invalid if using **--dns**, **--dns-opt**, or **--dns-search** with **--network** that is set to **none** or **container:**_id_. If used together with **--pod**, the container will not join the pod's network namespace.
+Set the network mode for the container. Invalid if using **\-\-dns**, **\-\-dns-opt**, or **\-\-dns-search** with **\-\-network** that is set to **none** or **container:**_id_. If used together with **\-\-pod**, the container will not join the pod's network namespace.
Valid _mode_ values are:
@@ -648,33 +648,33 @@ Valid _mode_ values are:
- **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
- **port_handler=slirp4netns**: Use the slirp4netns port forwarding.
-#### **--network-alias**=*alias*
+#### **\-\-network-alias**=*alias*
Add network-scoped alias for the container
-#### **--no-healthcheck**=*true|false*
+#### **\-\-no-healthcheck**=*true|false*
Disable any defined healthchecks for container.
-#### **--no-hosts**=*true|false*
+#### **\-\-no-hosts**=*true|false*
Do not create /etc/hosts for the container.
-By default, Podman will manage /etc/hosts, adding the container's own IP address and any hosts from **--add-host**.
-#### **--no-hosts** disables this, and the image's **/etc/host** will be preserved unmodified.
-This option conflicts with **--add-host**.
+By default, Podman will manage /etc/hosts, adding the container's own IP address and any hosts from **\-\-add-host**.
+#### **\-\-no-hosts** disables this, and the image's **/etc/host** will be preserved unmodified.
+This option conflicts with **\-\-add-host**.
-#### **--oom-kill-disable**=*true|false*
+#### **\-\-oom-kill-disable**=*true|false*
Whether to disable OOM Killer for the container or not.
-#### **--oom-score-adj**=*num*
+#### **\-\-oom-score-adj**=*num*
Tune the host's OOM preferences for containers (accepts -1000 to 1000)
-#### **--os**=*OS*
+#### **\-\-os**=*OS*
Override the OS, defaults to hosts, of the image to be pulled. For example, `windows`.
-#### **--pid**=*pid*
+#### **\-\-pid**=*pid*
Set the PID mode for the container
Default is to create a private PID namespace for the container
@@ -683,25 +683,25 @@ Default is to create a private PID namespace for the container
- `ns`: join the specified PID namespace
- `private`: create a new namespace for the container (default)
-#### **--pids-limit**=*limit*
+#### **\-\-pids-limit**=*limit*
Tune the container's pids limit. Set `0` to have unlimited pids for the container. (default "4096" on systems that support PIDS cgroups).
-#### **--platform**=*OS/ARCH*
+#### **\-\-platform**=*OS/ARCH*
Specify the platform for selecting the image. (Conflicts with --arch and --os)
The `--platform` option can be used to override the current architecture and operating system.
-#### **--pod**=*name*
+#### **\-\-pod**=*name*
Run container in an existing pod. If you want Podman to make the pod for you, preference the pod name with `new:`.
To make a pod with more granular options, use the `podman pod create` command before creating a container.
-#### **--pod-id-file**=*path*
+#### **\-\-pod-id-file**=*path*
Run container in an existing pod and read the pod's ID from the specified file. If a container is run within a pod, and the pod has an infra-container, the infra-container will be started before the container is.
-#### **--privileged**=*true|false*
+#### **\-\-privileged**=*true|false*
Give extended privileges to this container. The default is *false*.
@@ -717,7 +717,7 @@ container.
Rootless containers cannot have more privileges than the account that launched them.
-#### **--publish**, **-p**=*port*
+#### **\-\-publish**, **-p**=*port*
Publish a container's port, or range of ports, to the host
@@ -740,7 +740,7 @@ associated ports. If one container binds to a port, no other container can use t
within the pod while it is in use. Containers in the pod can also communicate over localhost
by having one container bind to localhost in the pod, and another connect to that port.
-#### **--publish-all**, **-P**=*true|false*
+#### **\-\-publish-all**, **-P**=*true|false*
Publish all exposed ports to random ports on the host interfaces. The default is *false*.
@@ -752,7 +752,7 @@ port to a random port on the host within an *ephemeral port range* defined by
`/proc/sys/net/ipv4/ip_local_port_range`. To find the mapping between the host
ports and the exposed ports, use `podman port`.
-#### **--pull**=*missing*
+#### **\-\-pull**=*missing*
Pull image before creating ("always"|"missing"|"never") (default "missing").
'missing': default value, attempt to pull the latest image from the registries listed in registries.conf if a local image does not exist.Raise an error if the image is not in any listed registry and is not present locally.
@@ -761,11 +761,11 @@ Pull image before creating ("always"|"missing"|"never") (default "missing").
Defaults to *missing*.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Suppress output information when pulling images
-#### **--read-only**=*true|false*
+#### **\-\-read-only**=*true|false*
Mount the container's root filesystem as read only.
@@ -773,15 +773,15 @@ By default a container will have its root filesystem writable allowing processes
to write files anywhere. By specifying the `--read-only` flag the container will have
its root filesystem mounted as read only prohibiting any writes.
-#### **--read-only-tmpfs**=*true|false*
+#### **\-\-read-only-tmpfs**=*true|false*
If container is running in --read-only mode, then mount a read-write tmpfs on /run, /tmp, and /var/tmp. The default is *true*
-#### **--replace**=**true**|**false**
+#### **\-\-replace**=**true**|**false**
If another container with the same name already exists, replace and remove it. The default is **false**.
-#### **--restart**=*policy*
+#### **\-\-restart**=*policy*
Restart policy to follow when containers exit.
Restart policy will not take effect if a container is stopped via the `podman kill` or `podman stop` commands.
@@ -797,18 +797,18 @@ Please note that restart will not restart containers after a system reboot.
If this functionality is required in your environment, you can invoke Podman from a systemd unit file, or create an init script for whichever init system is in use.
To generate systemd unit files, please see *podman generate systemd*
-#### **--rm**=*true|false*
+#### **\-\-rm**=*true|false*
Automatically remove the container when it exits. The default is *false*.
-#### **--rootfs**
+#### **\-\-rootfs**
If specified, the first argument refers to an exploded container on the file system.
This is useful to run a container without requiring any image management, the rootfs
of the container is assumed to be managed externally.
-#### **--sdnotify**=**container**|**conmon**|**ignore**
+#### **\-\-sdnotify**=**container**|**conmon**|**ignore**
Determines how to use the NOTIFY_SOCKET, as passed with systemd and Type=notify.
@@ -819,13 +819,13 @@ has started. The socket is never passed to the runtime or the container.
The **ignore** option removes NOTIFY_SOCKET from the environment for itself and child processes,
for the case where some other process above Podman uses NOTIFY_SOCKET and Podman should not use it.
-#### **--seccomp-policy**=*policy*
+#### **\-\-seccomp-policy**=*policy*
-Specify the policy to select the seccomp profile. If set to *image*, Podman will look for a "io.podman.seccomp.profile" label in the container-image config and use its value as a seccomp profile. Otherwise, Podman will follow the *default* policy by applying the default profile unless specified otherwise via *--security-opt seccomp* as described below.
+Specify the policy to select the seccomp profile. If set to *image*, Podman will look for a "io.containers.seccomp.profile" label in the container-image config and use its value as a seccomp profile. Otherwise, Podman will follow the *default* policy by applying the default profile unless specified otherwise via *--security-opt seccomp* as described below.
Note that this feature is experimental and may change in the future.
-#### **--secret**=*secret*
+#### **\-\-secret**=*secret*
Give the container access to a secret. Can be specified multiple times.
@@ -840,7 +840,7 @@ secret value will still remain.
Secrets are managed using the `podman secret` command.
-#### **--security-opt**=*option*
+#### **\-\-security-opt**=*option*
Security Options
@@ -871,30 +871,30 @@ Security Options
Note: Labeling can be disabled for all containers by setting label=false in the **containers.conf** (`/etc/containers/containers.conf` or `$HOME/.config/containers/containers.conf`) file.
-#### **--shm-size**=*size*
+#### **\-\-shm-size**=*size*
Size of `/dev/shm` (format: `<number>[<unit>]`, where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`.
When size is `0`, there is no limit on the amount of memory used for IPC by the container.
-#### **--stop-signal**=*SIGTERM*
+#### **\-\-stop-signal**=*SIGTERM*
Signal to stop a container. Default is SIGTERM.
-#### **--stop-timeout**=*seconds*
+#### **\-\-stop-timeout**=*seconds*
Timeout (in seconds) to stop a container. Default is 10.
Remote connections use local containers.conf for defaults
-#### **--subgidname**=*name*
+#### **\-\-subgidname**=*name*
Name for GID map from the `/etc/subgid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--gidmap`.
-#### **--subuidname**=*name*
+#### **\-\-subuidname**=*name*
Name for UID map from the `/etc/subuid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--uidmap`.
-#### **--sysctl**=*SYSCTL*
+#### **\-\-sysctl**=*SYSCTL*
Configure namespaced kernel parameters at runtime
@@ -910,7 +910,7 @@ Network Namespace - current sysctls allowed:
Note: if you use the --network=host option these sysctls will not be allowed.
-#### **--systemd**=*true|false|always*
+#### **\-\-systemd**=*true|false|always*
Run container in systemd mode. The default is *true*.
@@ -934,7 +934,7 @@ The `container_manage_cgroup` boolean must be enabled for this to be allowed on
`setsebool -P container_manage_cgroup true`
-#### **--tmpfs**=*fs*
+#### **\-\-tmpfs**=*fs*
Create a tmpfs mount
@@ -947,7 +947,7 @@ options are the same as the Linux default `mount` flags. If you do not specify
any options, the systems uses the following options:
`rw,noexec,nosuid,nodev`.
-#### **--tty**, **-t**=*true|false*
+#### **\-\-tty**, **-t**=*true|false*
Allocate a pseudo-TTY. The default is *false*.
@@ -958,29 +958,29 @@ interactive shell. The default is false.
Note: The **-t** option is incompatible with a redirection of the Podman client
standard input.
-#### **--tz**=*timezone*
+#### **\-\-tz**=*timezone*
Set timezone in container. This flag takes area-based timezones, GMT time, as well as `local`, which sets the timezone in the container to match the host machine. See `/usr/share/zoneinfo/` for valid timezones.
Remote connections use local containers.conf for defaults
-#### **--umask**=*umask*
+#### **\-\-umask**=*umask*
Set the umask inside the container. Defaults to `0022`.
Remote connections use local containers.conf for defaults
-#### **--uidmap**=*container_uid:host_uid:amount*
+#### **\-\-uidmap**=*container_uid:host_uid:amount*
UID map for the user namespace. Using this flag will run the container with user namespace enabled. It conflicts with the `--userns` and `--subuidname` flags.
The following example maps uids 0-2000 in the container to the uids 30000-31999 on the host and gids 0-2000 in the container to the gids 30000-31999 on the host. `--uidmap=0:30000:2000`
-#### **--ulimit**=*option*
+#### **\-\-ulimit**=*option*
Ulimit options
You can pass `host` to copy the current configuration from the host.
-#### **--user**, **-u**=*user*
+#### **\-\-user**, **-u**=*user*
Sets the username or UID used and optionally the groupname or GID for the specified command.
@@ -989,12 +989,12 @@ The following examples are all valid:
Without this argument the command will be run as root in the container.
-#### **--userns**=*auto*[:OPTIONS]
-#### **--userns**=*host*
-#### **--userns**=*keep-id*
-#### **--userns**=container:container
-#### **--userns**=private
-#### **--userns**=*ns:my_namespace*
+#### **\-\-userns**=*auto*[:OPTIONS]
+#### **\-\-userns**=*host*
+#### **\-\-userns**=*keep-id*
+#### **\-\-userns**=container:container
+#### **\-\-userns**=private
+#### **\-\-userns**=*ns:my_namespace*
Set the user namespace mode for the container. It defaults to the **PODMAN_USERNS** environment variable. An empty value means user namespaces are disabled.
@@ -1009,9 +1009,9 @@ Set the user namespace mode for the container. It defaults to the **PODMAN_USERN
- `ns`: run the container in the given existing user namespace.
- `private`: create a new namespace for the container (default)
-This option is incompatible with **--gidmap**, **--uidmap**, **--subuidname** and **--subgidname**.
+This option is incompatible with **\-\-gidmap**, **\-\-uidmap**, **\-\-subuidname** and **\-\-subgidname**.
-#### **--uts**=*mode*
+#### **\-\-uts**=*mode*
Set the UTS namespace mode for the container. The following values are supported:
@@ -1020,10 +1020,10 @@ Set the UTS namespace mode for the container. The following values are supported
- **ns:[path]**: run the container in the given existing UTS namespace.
- **container:[container]**: join the UTS namespace of the specified container.
-#### **--variant**=*VARIANT*
+#### **\-\-variant**=*VARIANT*
Use _VARIANT_ instead of the default architecture variant of the container image. Some images can use multiple variants of the arm architectures, such as arm/v5 and arm/v7.
-#### **--volume**, **-v**[=*[[SOURCE-VOLUME|HOST-DIR:]CONTAINER-DIR[:OPTIONS]]*]
+#### **\-\-volume**, **-v**[=*[[SOURCE-VOLUME|HOST-DIR:]CONTAINER-DIR[:OPTIONS]]*]
Create a bind mount. If you specify, ` -v /HOST-DIR:/CONTAINER-DIR`, Podman
bind mounts `/HOST-DIR` in the host to `/CONTAINER-DIR` in the Podman
@@ -1176,7 +1176,7 @@ will convert /foo into a `shared` mount point. Alternatively one can directly
change propagation properties of source mount. Say `/` is source mount for
`/foo`, then use `mount --make-shared /` to convert `/` into a `shared` mount.
-#### **--volumes-from**[=*CONTAINER*[:*OPTIONS*]]
+#### **\-\-volumes-from**[=*CONTAINER*[:*OPTIONS*]]
Mount volumes from the specified container(s). Used to share volumes between
containers. The *options* is a comma delimited list with the following available elements:
@@ -1209,7 +1209,7 @@ If the location of the volume from the source container overlaps with
data residing on a target container, then the volume hides
that data on the target.
-#### **--workdir**, **-w**=*dir*
+#### **\-\-workdir**, **-w**=*dir*
Working directory inside the container
@@ -1274,11 +1274,11 @@ Environment variables within containers can be set using multiple different opti
Precedence order (later entries override earlier entries):
-- **--env-host** : Host environment of the process executing Podman is added.
-- **--http-proxy**: By default, several environment variables will be passed in from the host, such as **http_proxy** and **no_proxy**. See **--http-proxy** for details.
+- **\-\-env-host** : Host environment of the process executing Podman is added.
+- **\-\-http-proxy**: By default, several environment variables will be passed in from the host, such as **http_proxy** and **no_proxy**. See **\-\-http-proxy** for details.
- Container image : Any environment variables specified in the container image.
-- **--env-file** : Any environment variables specified via env-files. If multiple files specified, then they override each other in order of entry.
-- **--env** : Any environment variables specified will override previous settings.
+- **\-\-env-file** : Any environment variables specified via env-files. If multiple files specified, then they override each other in order of entry.
+- **\-\-env** : Any environment variables specified will override previous settings.
Create containers and set the environment ending with a __*__ and a *****
diff --git a/docs/source/markdown/podman-diff.1.md b/docs/source/markdown/podman-diff.1.md
index dbab2d4db..5a4132783 100644
--- a/docs/source/markdown/podman-diff.1.md
+++ b/docs/source/markdown/podman-diff.1.md
@@ -13,11 +13,11 @@ Displays changes on a container or image's filesystem. The container or image w
## OPTIONS
-#### **--format**
+#### **\-\-format**
Alter the output into a different format. The only valid format for diff is `json`.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman-events.1.md b/docs/source/markdown/podman-events.1.md
index 4f9e9418f..0a73712b3 100644
--- a/docs/source/markdown/podman-events.1.md
+++ b/docs/source/markdown/podman-events.1.md
@@ -70,16 +70,16 @@ The *volume* type will report the following statuses:
## OPTIONS
-#### **--help**
+#### **\-\-help**
Print usage statement.
-#### **--format**
+#### **\-\-format**
Format the output to JSON Lines or using the given Go template.
-#### **--filter**=*filter*
+#### **\-\-filter**=*filter*
Filter events that are displayed. They must be in the format of "filter=value". The following
filters are supported:
@@ -93,12 +93,12 @@ filters are supported:
In the case where an ID is used, the ID may be in its full or shortened form.
-#### **--since**=*timestamp*
+#### **\-\-since**=*timestamp*
Show all events created since the given timestamp
-#### **--until**=*timestamp*
+#### **\-\-until**=*timestamp*
Show all events created until the given timestamp
diff --git a/docs/source/markdown/podman-exec.1.md b/docs/source/markdown/podman-exec.1.md
index 524ee50f0..f412cadd8 100644
--- a/docs/source/markdown/podman-exec.1.md
+++ b/docs/source/markdown/podman-exec.1.md
@@ -13,37 +13,37 @@ podman\-exec - Execute a command in a running container
## OPTIONS
-#### **--detach**, **-d**
+#### **\-\-detach**, **-d**
Start the exec session, but do not attach to it. The command will run in the background and the exec session will be automatically removed when it completes. The **podman exec** command will print the ID of the exec session and exit immediately after it starts.
-#### **--detach-keys**=*sequence*
+#### **\-\-detach-keys**=*sequence*
Specify the key sequence for detaching a container. Format is a single character `[a-Z]` or one or more `ctrl-<value>` characters where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. Specifying "" will disable this feature. The default is *ctrl-p,ctrl-q*.
-#### **--env**, **-e**
+#### **\-\-env**, **-e**
You may specify arbitrary environment variables that are available for the
command to be executed.
-#### **--env-file**=*file*
+#### **\-\-env-file**=*file*
Read in a line delimited file of environment variables.
-#### **--interactive**, **-i**=*true|false*
+#### **\-\-interactive**, **-i**=*true|false*
When set to true, keep stdin open even if not attached. The default is *false*.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--preserve-fds**=*N*
+#### **\-\-preserve-fds**=*N*
Pass down to the process N additional file descriptors (in addition to 0, 1, 2). The total FDs will be 3+N.
-#### **--privileged**
+#### **\-\-privileged**
Give extended privileges to this container. The default is *false*.
@@ -59,17 +59,17 @@ points, Apparmor/SELinux separation, and Seccomp filters are all disabled.
Rootless containers cannot have more privileges than the account that launched them.
-#### **--tty**, **-t**
+#### **\-\-tty**, **-t**
Allocate a pseudo-TTY.
-#### **--user**, **-u**
+#### **\-\-user**, **-u**
Sets the username or UID used and optionally the groupname or GID for the specified command.
The following examples are all valid:
--user [user | user:group | uid | uid:gid | user:gid | uid:group ]
-#### **--workdir**, **-w**=*path*
+#### **\-\-workdir**, **-w**=*path*
Working directory inside the container
diff --git a/docs/source/markdown/podman-export.1.md b/docs/source/markdown/podman-export.1.md
index 63989a4db..172be035e 100644
--- a/docs/source/markdown/podman-export.1.md
+++ b/docs/source/markdown/podman-export.1.md
@@ -24,11 +24,11 @@ Note: `:` is a restricted character and cannot be part of the file name.
## OPTIONS
-#### **--output**, **-o**
+#### **\-\-output**, **-o**
Write to a file, default is STDOUT
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-generate-kube.1.md b/docs/source/markdown/podman-generate-kube.1.md
index 0e5a31ae6..90b4c59fb 100644
--- a/docs/source/markdown/podman-generate-kube.1.md
+++ b/docs/source/markdown/podman-generate-kube.1.md
@@ -18,11 +18,11 @@ Note that the generated Kubernetes YAML file can be used to re-run the deploymen
## OPTIONS
-#### **--filename**, **-f**=**filename**
+#### **\-\-filename**, **-f**=**filename**
Output to the given file, instead of STDOUT. If the file already exists, `generate kube` will refuse to replace it and return an error.
-#### **--service**, **-s**
+#### **\-\-service**, **-s**
Generate a Kubernetes service object in addition to the Pods. Used to generate a Service specification for the corresponding Pod output. In particular, if the object has portmap bindings, the service specification will include a NodePort declaration to expose the service. A
random port is assigned by Podman in the specification.
diff --git a/docs/source/markdown/podman-generate-systemd.1.md b/docs/source/markdown/podman-generate-systemd.1.md
index 00b13669a..431163d56 100644
--- a/docs/source/markdown/podman-generate-systemd.1.md
+++ b/docs/source/markdown/podman-generate-systemd.1.md
@@ -14,46 +14,46 @@ _Note: If you use this command with the remote client, you would still have to p
## OPTIONS
-#### **--files**, **-f**
+#### **\-\-files**, **-f**
Generate files instead of printing to stdout. The generated files are named {container,pod}-{ID,name}.service and will be placed in the current working directory.
Note: On a system with SELinux enabled, the generated files will inherit contexts from the current working directory. Depending on the SELinux setup, changes to the generated files using `restorecon`, `chcon`, or `semanage` may be required to allow systemd to access these files. Alternatively, use the `-Z` option when running `mv` or `cp`.
-#### **--format**=*format*
+#### **\-\-format**=*format*
Print the created units in specified format (json). If `--files` is specified the paths to the created files will be printed instead of the unit content.
-#### **--name**, **-n**
+#### **\-\-name**, **-n**
Use the name of the container for the start, stop, and description in the unit file
-#### **--new**
+#### **\-\-new**
Using this flag will yield unit files that do not expect containers and pods to exist. Instead, new containers and pods are created based on their configuration files. The unit files are created best effort and may need to be further edited; please review the generated files carefully before using them in production.
-#### **--no-header**
+#### **\-\-no-header**
Do not generate the header including meta data such as the Podman version and the timestamp.
-#### **--time**, **-t**=*value*
+#### **\-\-time**, **-t**=*value*
Override the default stop timeout for the container with the given value.
-#### **--restart-policy**=*policy*
+#### **\-\-restart-policy**=*policy*
Set the systemd restart policy. The restart-policy must be one of: "no", "on-success", "on-failure", "on-abnormal",
"on-watchdog", "on-abort", or "always". The default policy is *on-failure*.
-#### **--container-prefix**=*prefix*
+#### **\-\-container-prefix**=*prefix*
Set the systemd unit name prefix for containers. The default is *container*.
-#### **--pod-prefix**=*prefix*
+#### **\-\-pod-prefix**=*prefix*
Set the systemd unit name prefix for pods. The default is *pod*.
-#### **--separator**=*separator*
+#### **\-\-separator**=*separator*
Set the systemd unit name separator between the name/id of a container/pod and the prefix. The default is *-*.
@@ -61,7 +61,7 @@ Set the systemd unit name separator between the name/id of a container/pod and t
### Generate and print a systemd unit file for a container
-Generate a systemd unit file for a container running nginx with an *always* restart policy and 1-second timeout to stdout.
+Generate a systemd unit file for a container running nginx with an *always* restart policy and 1-second timeout to stdout. Note that the **RequiresMountsFor** option in the **Unit** section ensures that the container storage for both the GraphRoot and the RunRoot are mounted prior to starting the service. For systems with container storage on disks like iSCSI or other remote block protocols, this ensures that Podman is not executed prior to any necessary storage operations coming online.
```
$ podman create --name nginx nginx:latest
@@ -73,6 +73,9 @@ $ podman generate systemd --restart-policy=always -t 1 nginx
[Unit]
Description=Podman container-de1e3223b1b888bc02d0962dd6cb5855eb00734061013ffdd3479d225abacdc6.service
Documentation=man:podman-generate-systemd(1)
+Wants=network.target
+After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/container/storage
[Service]
Restart=always
@@ -101,6 +104,7 @@ Description=Podman container-busy_moser.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/container/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -140,6 +144,9 @@ Description=Podman pod-systemd-pod.service
Documentation=man:podman-generate-systemd(1)
Requires=container-amazing_chandrasekhar.service container-jolly_shtern.service
Before=container-amazing_chandrasekhar.service container-jolly_shtern.service
+Wants=network.target
+After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/container/storage
[Service]
Restart=on-failure
diff --git a/docs/source/markdown/podman-healthcheck-run.1.md b/docs/source/markdown/podman-healthcheck-run.1.md
index fa10d5dca..41abef204 100644
--- a/docs/source/markdown/podman-healthcheck-run.1.md
+++ b/docs/source/markdown/podman-healthcheck-run.1.md
@@ -21,7 +21,7 @@ Possible errors that can occur during the healthcheck are:
* container is not running
## OPTIONS
-#### **--help**
+#### **\-\-help**
Print usage statement
diff --git a/docs/source/markdown/podman-history.1.md b/docs/source/markdown/podman-history.1.md
index 2dd41e9f5..cebb45054 100644
--- a/docs/source/markdown/podman-history.1.md
+++ b/docs/source/markdown/podman-history.1.md
@@ -12,9 +12,9 @@ podman\-history - Show the history of an image
**podman history** displays the history of an image by printing out information
about each layer used in the image. The information printed out for each layer
include Created (time and date), Created By, Size, and Comment. The output can
-be truncated or not using the **--no-trunc** flag. If the **--human** flag is
+be truncated or not using the **\-\-no-trunc** flag. If the **\-\-human** flag is
set, the time of creation and size are printed out in a human readable format.
-The **--quiet** flag displays the ID of the image only when set and the **--format**
+The **\-\-quiet** flag displays the ID of the image only when set and the **\-\-format**
flag is used to print the information using the Go template provided by the user.
Valid placeholders for the Go template are listed below:
@@ -29,26 +29,26 @@ Valid placeholders for the Go template are listed below:
## OPTIONS
-#### **--human**, **-H**=*true|false*
+#### **\-\-human**, **-H**=*true|false*
Display sizes and dates in human readable format (default *true*).
-#### **--no-trunc**=*true|false*
+#### **\-\-no-trunc**=*true|false*
Do not truncate the output (default *false*).
-#### **--notruncate**
+#### **\-\-notruncate**
Do not truncate the output
-#### **--quiet**, **-q**=*true|false*
+#### **\-\-quiet**, **-q**=*true|false*
Print the numeric IDs only (default *false*).
-#### **--format**=*format*
+#### **\-\-format**=*format*
Alter the output for a format like 'json' or a Go template.
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-image-diff.1.md b/docs/source/markdown/podman-image-diff.1.md
index 9b1dfa45a..4c03fcd09 100644
--- a/docs/source/markdown/podman-image-diff.1.md
+++ b/docs/source/markdown/podman-image-diff.1.md
@@ -11,7 +11,7 @@ Displays changes on a container or image's filesystem. The container or image w
## OPTIONS
-#### **--format**
+#### **\-\-format**
Alter the output into a different format. The only valid format for diff is `json`.
diff --git a/docs/source/markdown/podman-image-exists.1.md b/docs/source/markdown/podman-image-exists.1.md
index 5d5cb1647..370d28daa 100644
--- a/docs/source/markdown/podman-image-exists.1.md
+++ b/docs/source/markdown/podman-image-exists.1.md
@@ -14,7 +14,7 @@ was an issue accessing the local storage.
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-image-mount.1.md b/docs/source/markdown/podman-image-mount.1.md
index 8cb9684a7..766f337ad 100644
--- a/docs/source/markdown/podman-image-mount.1.md
+++ b/docs/source/markdown/podman-image-mount.1.md
@@ -22,11 +22,11 @@ returned.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Mount all images.
-#### **--format**=*format*
+#### **\-\-format**=*format*
Print the mounted images in specified format (json).
diff --git a/docs/source/markdown/podman-image-prune.1.md b/docs/source/markdown/podman-image-prune.1.md
index 73024ffb8..16e6c9b03 100644
--- a/docs/source/markdown/podman-image-prune.1.md
+++ b/docs/source/markdown/podman-image-prune.1.md
@@ -14,11 +14,11 @@ does not have any containers based on it.
The image prune command does not prune cache images that only use layers that are necessary for other images.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Remove dangling images and images that have no associated containers.
-#### **--filter**=*filters*
+#### **\-\-filter**=*filters*
Provide filter values.
@@ -33,11 +33,11 @@ The until filter can be Unix timestamps, date formatted timestamps, or Go durati
The label filter accepts two formats. One is the label=... (label=_key_ or label=_key=value_), which removes images with the specified labels. The other format is the label!=... (label!=_key_ or label!=_key=value_), which removes images without the specified labels.
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Do not provide an interactive prompt for container removal.
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-image-sign.1.md b/docs/source/markdown/podman-image-sign.1.md
index b9addc062..994578530 100644
--- a/docs/source/markdown/podman-image-sign.1.md
+++ b/docs/source/markdown/podman-image-sign.1.md
@@ -15,24 +15,24 @@ By default, the signature will be written into `/var/lib/containers/sigstore` fo
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement.
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Sign all the manifests of the multi-architecture image (default false).
-#### **--cert-dir**=*path*
+#### **\-\-cert-dir**=*path*
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
Default certificates directory is _/etc/containers/certs.d_. (This option is not available with the remote Podman client)
-#### **--directory**, **-d**=*dir*
+#### **\-\-directory**, **-d**=*dir*
Store the signatures in the specified directory. Default: /var/lib/containers/sigstore
-#### **--sign-by**=*identity*
+#### **\-\-sign-by**=*identity*
Override the default identity of the signature.
diff --git a/docs/source/markdown/podman-image-tree.1.md b/docs/source/markdown/podman-image-tree.1.md
index fe36929cc..5f5473f28 100644
--- a/docs/source/markdown/podman-image-tree.1.md
+++ b/docs/source/markdown/podman-image-tree.1.md
@@ -13,11 +13,11 @@ If you do not provide a *tag*, Podman will default to `latest` for the *image*.
Layers are indicated with image tags as `Top Layer of`, when the tag is known locally.
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--whatrequires**
+#### **\-\-whatrequires**
Show all child images and layers of the specified image
diff --git a/docs/source/markdown/podman-image-trust.1.md b/docs/source/markdown/podman-image-trust.1.md
index 6e2c2287a..63280c4d7 100644
--- a/docs/source/markdown/podman-image-trust.1.md
+++ b/docs/source/markdown/podman-image-trust.1.md
@@ -37,15 +37,15 @@ Require signature (“signedBy”).
Trust may be updated using the command **podman image trust set** for an existing trust scope.
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement.
-#### **--pubkeysfile**=*KEY1*, **-f**
+#### **\-\-pubkeysfile**=*KEY1*, **-f**
A path to an exported public key on the local system. Key paths
will be referenced in policy.json. Any path to a file may be used but locating the file in **/etc/pki/containers** is recommended. Options may be used multiple times to
- require an image be signed by multiple keys. The **--pubkeysfile** option is required for the **signedBy** type.
+ require an image be signed by multiple keys. The **\-\-pubkeysfile** option is required for the **signedBy** type.
-#### **--type**=*value*, **-t**
+#### **\-\-type**=*value*, **-t**
The trust type for this policy entry.
Accepted values:
**signedBy** (default): Require signatures with corresponding list of
@@ -56,10 +56,10 @@ Trust may be updated using the command **podman image trust set** for an existin
## show OPTIONS
-#### **--raw**
+#### **\-\-raw**
Output trust policy file as raw JSON
-#### **--json**, **-j**
+#### **\-\-json**, **-j**
Output trust as JSON for machine parsing
## EXAMPLES
diff --git a/docs/source/markdown/podman-image-unmount.1.md b/docs/source/markdown/podman-image-unmount.1.md
index 62e879fa1..075ae5968 100644
--- a/docs/source/markdown/podman-image-unmount.1.md
+++ b/docs/source/markdown/podman-image-unmount.1.md
@@ -19,11 +19,11 @@ counter reaches zero indicating no other processes are using the mount.
An unmount can be forced with the --force flag.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
All of the currently mounted images will be unmounted.
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Force the unmounting of specified images' root file system, even if other
processes have mounted it.
diff --git a/docs/source/markdown/podman-images.1.md b/docs/source/markdown/podman-images.1.md
index 23cce450a..4aac40a61 100644
--- a/docs/source/markdown/podman-images.1.md
+++ b/docs/source/markdown/podman-images.1.md
@@ -15,15 +15,15 @@ Displays locally stored images, their names, and their IDs.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Show all images (by default filter out the intermediate image layers). The default is false.
-#### **--digests**
+#### **\-\-digests**
Show image digests
-#### **--filter**=*filter*, **-f**
+#### **\-\-filter**=*filter*, **-f**
Filter output based on conditions provided
@@ -47,7 +47,7 @@ Filter output based on conditions provided
**reference=**
Filter by image name, specified as regular expressions.
-#### **--format**=*format*
+#### **\-\-format**=*format*
Change the default output format. This can be of a supported type like 'json'
or a Go template.
@@ -64,23 +64,23 @@ Valid placeholders for the Go template are listed below:
| .Size | Size of layer on disk |
| .History | History of the image layer |
-#### **--history**
+#### **\-\-history**
Display the history of image names. If an image gets re-tagged or untagged, then the image name history gets prepended (latest image first). This is especially useful when undoing a tag operation or an image does not contain any name because it has been untagged.
-#### **--noheading**, **-n**
+#### **\-\-noheading**, **-n**
Omit the table headings from the listing of images.
-#### **--no-trunc**
+#### **\-\-no-trunc**
Do not truncate output.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Lists only the image IDs.
-#### **--sort**=*sort*
+#### **\-\-sort**=*sort*
Sort by created, id, repository, size or tag (default: created)
diff --git a/docs/source/markdown/podman-import.1.md b/docs/source/markdown/podman-import.1.md
index 427c67da4..38c2ab680 100644
--- a/docs/source/markdown/podman-import.1.md
+++ b/docs/source/markdown/podman-import.1.md
@@ -11,26 +11,26 @@ podman\-import - Import a tarball and save it as a filesystem image
## DESCRIPTION
**podman import** imports a tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz)
and saves it as a filesystem image. Remote tarballs can be specified using a URL.
-Various image instructions can be configured with the **--change** flag and
-a commit message can be set using the **--message** flag.
+Various image instructions can be configured with the **\-\-change** flag and
+a commit message can be set using the **\-\-message** flag.
**reference**, if present, is a tag to assign to the image.
**podman import** is used for importing from the archive generated by **podman export**, that includes the container's filesystem. To import the archive of image layers created by **podman save**, use **podman load**.
Note: `:` is a restricted character and cannot be part of the file name.
## OPTIONS
-#### **--change**=*instruction*, **-c**
+#### **\-\-change**=*instruction*, **-c**
Apply the following possible instructions to the created image:
**CMD** | **ENTRYPOINT** | **ENV** | **EXPOSE** | **LABEL** | **STOPSIGNAL** | **USER** | **VOLUME** | **WORKDIR**
Can be set multiple times
-#### **--message**, **-m**=*message*
+#### **\-\-message**, **-m**=*message*
Set commit message for imported image
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Shows progress on the import
@@ -38,7 +38,7 @@ Shows progress on the import
Print additional debugging information
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-info.1.md b/docs/source/markdown/podman-info.1.md
index 4af51d3eb..ee7961be0 100644
--- a/docs/source/markdown/podman-info.1.md
+++ b/docs/source/markdown/podman-info.1.md
@@ -15,11 +15,11 @@ Displays information pertinent to the host, current storage stats, configured co
## OPTIONS
-#### **--debug**, **-D**
+#### **\-\-debug**, **-D**
Show additional information
-#### **--format**=*format*, **-f**
+#### **\-\-format**=*format*, **-f**
Change output format to "json" or a Go template.
diff --git a/docs/source/markdown/podman-init.1.md b/docs/source/markdown/podman-init.1.md
index 5f3636686..4fd552e65 100644
--- a/docs/source/markdown/podman-init.1.md
+++ b/docs/source/markdown/podman-init.1.md
@@ -18,11 +18,11 @@ This can be used to inspect the container before it runs, or debug why a contain
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Initialize all containers. Containers that have already initialized (including containers that have been started and are running) are ignored.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman-inspect.1.md b/docs/source/markdown/podman-inspect.1.md
index bfd0cea3d..7feb36de1 100644
--- a/docs/source/markdown/podman-inspect.1.md
+++ b/docs/source/markdown/podman-inspect.1.md
@@ -24,24 +24,24 @@ For more inspection options, see:
## OPTIONS
-#### **--type**, **-t**=*type*
+#### **\-\-type**, **-t**=*type*
Return JSON for the specified type. Type can be 'container', 'image', 'volume', 'network', 'pod', or 'all' (default: all)
(Only meaningful when invoked as *podman inspect*)
-#### **--format**, **-f**=*format*
+#### **\-\-format**, **-f**=*format*
Format the output using the given Go template.
The keys of the returned JSON can be used as the values for the --format flag (see examples below).
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods.
This option can be used to inspect the latest pod created when used with --type pod. (This option is not available with the remote Podman client or when invoked as *podman image inspect*.)
-#### **--size**, **-s**
+#### **\-\-size**, **-s**
In addition to normal output, display the total file size if the type is a container.
diff --git a/docs/source/markdown/podman-kill.1.md b/docs/source/markdown/podman-kill.1.md
index e5f1d4bbe..e4e984836 100644
--- a/docs/source/markdown/podman-kill.1.md
+++ b/docs/source/markdown/podman-kill.1.md
@@ -12,20 +12,20 @@ podman\-kill - Kill the main process in one or more containers
The main process inside each container specified will be sent SIGKILL, or any signal specified with option --signal.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Signal all running containers. This does not include paused containers.
-#### **--cidfile**
+#### **\-\-cidfile**
Read container ID from the specified file and remove the container. Can be specified multiple times.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--signal**, **-s**
+#### **\-\-signal**, **-s**
Signal to send to the container. For more information on Linux signals, refer to *man signal(7)*.
diff --git a/docs/source/markdown/podman-load.1.md b/docs/source/markdown/podman-load.1.md
index 3ff03e9e7..4f3208377 100644
--- a/docs/source/markdown/podman-load.1.md
+++ b/docs/source/markdown/podman-load.1.md
@@ -26,7 +26,7 @@ Note: `:` is a restricted character and cannot be part of the file name.
## OPTIONS
-#### **--input**, **-i**=*input*
+#### **\-\-input**, **-i**=*input*
Read from archive file, default is STDIN.
@@ -34,11 +34,11 @@ The remote client requires the use of this option.
NOTE: Use the environment variable `TMPDIR` to change the temporary storage location of container images. Podman defaults to use `/var/tmp`.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Suppress the progress output
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-login.1.md b/docs/source/markdown/podman-login.1.md
index 274869042..c7779788f 100644
--- a/docs/source/markdown/podman-login.1.md
+++ b/docs/source/markdown/podman-login.1.md
@@ -28,41 +28,41 @@ For more details about format and configurations of the auth.json file, please r
## OPTIONS
-#### **--password**, **-p**=*password*
+#### **\-\-password**, **-p**=*password*
Password for registry
-#### **--password-stdin**
+#### **\-\-password-stdin**
Take the password from stdin
-#### **--username**, **-u**=*username*
+#### **\-\-username**, **-u**=*username*
Username for registry
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json.
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--get-login**
+#### **\-\-get-login**
Return the logged-in user for the registry. Return error if no login is found.
-#### **--cert-dir**=*path*
+#### **\-\-cert-dir**=*path*
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
Default certificates directory is _/etc/containers/certs.d_. (This option is not available with the remote Podman client)
-#### **--tls-verify**=*true|false*
+#### **\-\-tls-verify**=*true|false*
Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true,
then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified,
TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-logout.1.md b/docs/source/markdown/podman-logout.1.md
index c35c4856b..caa8c9021 100644
--- a/docs/source/markdown/podman-logout.1.md
+++ b/docs/source/markdown/podman-logout.1.md
@@ -21,18 +21,18 @@ All the cached credentials can be removed by setting the **all** flag.
## OPTIONS
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json.
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Remove the cached credentials for all registries in the auth file
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-logs.1.md b/docs/source/markdown/podman-logs.1.md
index 8f1301102..863e8278a 100644
--- a/docs/source/markdown/podman-logs.1.md
+++ b/docs/source/markdown/podman-logs.1.md
@@ -15,7 +15,7 @@ any logs at the time you execute podman logs).
## OPTIONS
-#### **--follow**, **-f**
+#### **\-\-follow**, **-f**
Follow log output. Default is false.
@@ -23,28 +23,28 @@ Note: If you are following a container which is removed `podman container rm`
or removed on exit `podman run --rm ...`, then there is a chance the the log
file will be removed before `podman logs` reads the final content.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--names**, **-n**
+#### **\-\-names**, **-n**
Output the container name in the log
-#### **--since**=*TIMESTAMP*
+#### **\-\-since**=*TIMESTAMP*
Show logs since TIMESTAMP. The --since option can be Unix timestamps, date formatted timestamps, or Go duration
strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted
time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
and 2006-01-02.
-#### **--tail**=*LINES*
+#### **\-\-tail**=*LINES*
Output the specified number of LINES at the end of the logs. LINES must be an integer. Defaults to -1,
which prints all lines
-#### **--timestamps**, **-t**
+#### **\-\-timestamps**, **-t**
Show timestamps in the log outputs. The default is false
diff --git a/docs/source/markdown/podman-machine-init.1.md b/docs/source/markdown/podman-machine-init.1.md
new file mode 100644
index 000000000..e2ed1eb10
--- /dev/null
+++ b/docs/source/markdown/podman-machine-init.1.md
@@ -0,0 +1,57 @@
+% podman-machine-init(1)
+
+## NAME
+podman\-machine\-init - Initialize a new virtual machine
+
+## SYNOPSIS
+**podman machine init** [*options*] [*name*]
+
+## DESCRIPTION
+
+Initialize a new virtual machine for Podman.
+
+Podman on MacOS requires a virtual machine. This is because containers are Linux -
+containers do not run on any other OS because containers' core functionality are
+tied to the Linux kernel.
+
+**podman machine init** initializes a new Linux virtual machine where containers are run.
+
+## OPTIONS
+
+#### **\-\-cpus**=*number*
+
+Number of CPUs.
+
+#### **\-\-disk-size**=*number*
+
+Size of the disk for the guest VM in GB.
+
+#### **\-\-ignition-path**
+
+Fully qualified path of the ignition file
+
+#### **\-\-image-path**
+
+Fully qualified path of the uncompressed image file
+
+#### **\-\-memory**, **-m**=*number*
+
+Memory (in MB).
+
+#### **\-\-help**
+
+Print usage statement.
+
+## EXAMPLES
+
+```
+$ podman machine init myvm
+$ podman machine init --device=/dev/xvdc:rw myvm
+$ podman machine init --memory=1024 myvm
+```
+
+## SEE ALSO
+podman-machine (1)
+
+## HISTORY
+March 2021, Originally compiled by Ashley Cui <acui@redhat.com>
diff --git a/docs/source/markdown/podman-machine-rm.1.md b/docs/source/markdown/podman-machine-rm.1.md
new file mode 100644
index 000000000..e80f26d6d
--- /dev/null
+++ b/docs/source/markdown/podman-machine-rm.1.md
@@ -0,0 +1,65 @@
+% podman-machine-rm(1)
+
+## NAME
+podman\-machine\-rm - Remove a virtual machine
+
+## SYNOPSIS
+**podman machine rm** [*options*] [*name*]
+
+## DESCRIPTION
+
+Remove a virtual machine and its related files. What is actually deleted
+depends on the virtual machine type. For all virtual machines, the generated
+SSH keys and the podman system connection are deleted. The ignition files
+generated for that VM are also removed as is its image file on the filesystem.
+
+Users get a display of what will be deleted and are required to confirm unless the option `--force`
+is used.
+
+
+## OPTIONS
+
+#### **\-\-help**
+
+Print usage statement.
+
+#### **\-\-force**
+
+Delete without confirmation
+
+#### **\-\-save-ignition**
+
+Do not delete the generated ignition file
+
+#### **\-\-save-image**
+
+Do not delete the VM image
+
+#### **\-\-save-keys**
+
+Do not delete the SSH keys for the VM. The system connection is always
+deleted.
+
+## EXAMPLES
+
+Remove a VM named "test1"
+
+```
+$ podman machine rm test1
+
+The following files will be deleted:
+
+/home/user/.ssh/test1
+/home/user/.ssh/test1.pub
+/home/user/.config/containers/podman/machine/qemu/test1.ign
+/home/user/.local/share/containers/podman/machine/qemu/test1_fedora-coreos-33.20210315.1.0-qemu.x86_64.qcow2
+/home/user/.config/containers/podman/machine/qemu/test1.json
+
+Are you sure you want to continue? [y/N] y
+```
+
+## SEE ALSO
+podman-machine (1)
+
+## HISTORY
+March 2021, Originally compiled by Ashley Cui <acui@redhat.com>
diff --git a/docs/source/markdown/podman-machine-ssh.1.md b/docs/source/markdown/podman-machine-ssh.1.md
new file mode 100644
index 000000000..fa78f876a
--- /dev/null
+++ b/docs/source/markdown/podman-machine-ssh.1.md
@@ -0,0 +1,43 @@
+% podman-machine-ssh(1)
+
+## NAME
+podman\-machine\-ssh - SSH into a virtual machine
+
+## SYNOPSIS
+**podman machine ssh** [*options*] [*name*] [*command* [*arg* ...]]
+
+## DESCRIPTION
+
+SSH into a Podman-managed virtual machine.
+
+Podman on MacOS requires a virtual machine. This is because containers are Linux -
+containers do not run on any other OS because containers' core functionality are
+tied to the Linux kernel.
+
+## OPTIONS
+
+#### **\-\-execute**, **-e**
+
+Execute the given command on the VM
+
+#### **\-\-help**
+
+Print usage statement.
+
+## EXAMPLES
+
+To get an interactive session with a VM called `myvm`:
+```
+$ podman machine ssh myvm
+```
+
+To run a command on a VM called `myvm`:
+```
+$ podman machine ssh -e myvm -- rpm -q podman
+```
+
+## SEE ALSO
+podman-machine (1)
+
+## HISTORY
+March 2021, Originally compiled by Ashley Cui <acui@redhat.com>
diff --git a/docs/source/markdown/podman-machine-start.1.md b/docs/source/markdown/podman-machine-start.1.md
new file mode 100644
index 000000000..22942767a
--- /dev/null
+++ b/docs/source/markdown/podman-machine-start.1.md
@@ -0,0 +1,35 @@
+% podman-machine-start(1)
+
+## NAME
+podman\-machine\-start - Start a virtual machine
+
+## SYNOPSIS
+**podman machine start** [*name*]
+
+## DESCRIPTION
+
+Starts a virtual machine for Podman.
+
+Podman on MacOS requires a virtual machine. This is because containers are Linux -
+containers do not run on any other OS because containers' core functionality are
+tied to the Linux kernel.
+
+**podman machine start** starts a Linux virtual machine where containers are run.
+
+## OPTIONS
+
+#### **\-\-help**
+
+Print usage statement.
+
+## EXAMPLES
+
+```
+$ podman machine start myvm
+```
+
+## SEE ALSO
+podman-machine (1)
+
+## HISTORY
+March 2021, Originally compiled by Ashley Cui <acui@redhat.com>
diff --git a/docs/source/markdown/podman-machine-stop.1.md b/docs/source/markdown/podman-machine-stop.1.md
new file mode 100644
index 000000000..33c67f70b
--- /dev/null
+++ b/docs/source/markdown/podman-machine-stop.1.md
@@ -0,0 +1,35 @@
+% podman-machine-stop(1)
+
+## NAME
+podman\-machine\-stop - Stop a virtual machine
+
+## SYNOPSIS
+**podman machine stop** [*name*]
+
+## DESCRIPTION
+
+Stops a virtual machine.
+
+Podman on MacOS requires a virtual machine. This is because containers are Linux -
+containers do not run on any other OS because containers' core functionality are
+tied to the Linux kernel.
+
+**podman machine stop** stops a Linux virtual machine where containers are run.
+
+## OPTIONS
+
+#### **\-\-help**
+
+Print usage statement.
+
+## EXAMPLES
+
+```
+$ podman machine stop myvm
+```
+
+## SEE ALSO
+podman-machine (1)
+
+## HISTORY
+March 2021, Originally compiled by Ashley Cui <acui@redhat.com>
diff --git a/docs/source/markdown/podman-machine.1.md b/docs/source/markdown/podman-machine.1.md
new file mode 100644
index 000000000..a5d3b78df
--- /dev/null
+++ b/docs/source/markdown/podman-machine.1.md
@@ -0,0 +1,26 @@
+% podman-machine(1)
+
+## NAME
+podman\-machine - Manage Podman's virtual machine
+
+## SYNOPSIS
+**podman machine** *subcommand*
+
+## DESCRIPTION
+`podman machine` is a set of subcommands that manage Podman's virtual machine on MacOS.
+
+## SUBCOMMANDS
+
+| Command | Man Page | Description |
+| ------- | ------------------------------------------------------- | --------------------------------- |
+| init | [podman-machine-init(1)](podman-machine-init.1.md) | Initialize a new virtual machine |
+| rm | [podman-machine-rm(1)](podman-machine-rm.1.md)| Remove a virtual machine |
+| ssh | [podman-machine-ssh(1)](podman-machine-ssh.1.md) | SSH into a virtual machine |
+| start | [podman-machine-start(1)](podman-machine-start.1.md) | Start a virtual machine |
+| stop | [podman-machine-stop(1)](podman-machine-stop.1.md) | Stop a virtual machine |
+
+## SEE ALSO
+podman(1)
+
+## HISTORY
+March 2021, Originally compiled by Ashley Cui <acui@redhat.com>
diff --git a/docs/source/markdown/podman-manifest-add.1.md b/docs/source/markdown/podman-manifest-add.1.md
index f2d188766..c3c1ea1cf 100644
--- a/docs/source/markdown/podman-manifest-add.1.md
+++ b/docs/source/markdown/podman-manifest-add.1.md
@@ -15,25 +15,25 @@ The list image's ID.
## OPTIONS
-#### **--all**
+#### **\-\-all**
If the image which should be added to the list or index is itself a list or
index, add all of the contents to the local list. By default, only one image
from such a list or index will be added to the list or index. Combining
*--all* with any of the other options described below is NOT recommended.
-#### **--annotation** *annotation=value*
+#### **\-\-annotation** *annotation=value*
Set an annotation on the entry for the newly-added image.
-#### **--arch**
+#### **\-\-arch**
Override the architecture which the list or index records as a requirement for
the image. If *imageName* refers to a manifest list or image index, the
architecture information will be retrieved from it. Otherwise, it will be
retrieved from the image's configuration information.
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
@@ -41,39 +41,39 @@ If the authorization state is not found there, $HOME/.docker/config.json is chec
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--cert-dir**=*path*
+#### **\-\-cert-dir**=*path*
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
Default certificates directory is _/etc/containers/certs.d_. (This option is not available with the remote Podman client)
-#### **--creds**=*creds*
+#### **\-\-creds**=*creds*
The [username[:password]] to use to authenticate with the registry if required.
If one or both values are not supplied, a command line prompt will appear and the
value can be entered. The password is entered without echo.
-#### **--features**
+#### **\-\-features**
Specify the features list which the list or index records as requirements for
the image. This option is rarely used.
-#### **--os**
+#### **\-\-os**
Override the OS which the list or index records as a requirement for the image.
If *imagename* refers to a manifest list or image index, the OS information
will be retrieved from it. Otherwise, it will be retrieved from the image's
configuration information.
-#### **--os-version**
+#### **\-\-os-version**
Specify the OS version which the list or index records as a requirement for the
image. This option is rarely used.
-#### **--tls-verify**
+#### **\-\-tls-verify**
Require HTTPS and verify certificates when talking to container registries (defaults to true).
-#### **--variant**
+#### **\-\-variant**
Specify the variant which the list or index records for the image. This option
is typically used to distinguish between multiple entries which share the same
diff --git a/docs/source/markdown/podman-manifest-annotate.1.md b/docs/source/markdown/podman-manifest-annotate.1.md
index 2126b71ec..70b077e5b 100644
--- a/docs/source/markdown/podman-manifest-annotate.1.md
+++ b/docs/source/markdown/podman-manifest-annotate.1.md
@@ -12,39 +12,39 @@ Adds or updates information about an image included in a manifest list or image
## OPTIONS
-#### **--annotation** *annotation=value*
+#### **\-\-annotation** *annotation=value*
Set an annotation on the entry for the specified image.
-#### **--arch**
+#### **\-\-arch**
Override the architecture which the list or index records as a requirement for
the image. This is usually automatically retrieved from the image's
configuration information, so it is rarely necessary to use this option.
-#### **--features**
+#### **\-\-features**
Specify the features list which the list or index records as requirements for
the image. This option is rarely used.
-#### **--os**
+#### **\-\-os**
Override the OS which the list or index records as a requirement for the image.
This is usually automatically retrieved from the image's configuration
information, so it is rarely necessary to use this option.
-#### **--os-features**
+#### **\-\-os-features**
Specify the OS features list which the list or index records as requirements
for the image. This option is rarely used.
-#### **--os-version**
+#### **\-\-os-version**
Specify the OS version which the list or index records as a requirement for the
image. This option is rarely used.
-#### **--variant**
+#### **\-\-variant**
Specify the variant which the list or index records for the image. This option
is typically used to distinguish between multiple entries which share the same
diff --git a/docs/source/markdown/podman-manifest-create.1.md b/docs/source/markdown/podman-manifest-create.1.md
index 3a3d5e4b0..3017fb515 100644
--- a/docs/source/markdown/podman-manifest-create.1.md
+++ b/docs/source/markdown/podman-manifest-create.1.md
@@ -16,7 +16,7 @@ index.
## OPTIONS
-#### **--all**
+#### **\-\-all**
If any of the images which should be added to the new list or index are
themselves lists or indexes, add all of their contents. By default, only one
diff --git a/docs/source/markdown/podman-manifest-exists.1.md b/docs/source/markdown/podman-manifest-exists.1.md
index e15110126..944cc04c8 100644
--- a/docs/source/markdown/podman-manifest-exists.1.md
+++ b/docs/source/markdown/podman-manifest-exists.1.md
@@ -14,7 +14,7 @@ An exit code of `125` indicates there was another issue.
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement.
diff --git a/docs/source/markdown/podman-manifest-push.1.md b/docs/source/markdown/podman-manifest-push.1.md
index a8169cb56..4e7118dad 100644
--- a/docs/source/markdown/podman-manifest-push.1.md
+++ b/docs/source/markdown/podman-manifest-push.1.md
@@ -14,12 +14,12 @@ The list image's ID and the digest of the image's manifest.
## OPTIONS
-#### **--all**
+#### **\-\-all**
Push the images mentioned in the manifest list or image index, in addition to
the list or index itself. (Default true)
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
@@ -27,42 +27,42 @@ If the authorization state is not found there, $HOME/.docker/config.json is chec
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--cert-dir**=*path*
+#### **\-\-cert-dir**=*path*
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
Default certificates directory is _/etc/containers/certs.d_. (This option is not available with the remote Podman client)
-#### **--creds**=*creds*
+#### **\-\-creds**=*creds*
The [username[:password]] to use to authenticate with the registry if required.
If one or both values are not supplied, a command line prompt will appear and the
value can be entered. The password is entered without echo.
-#### **--digestfile**=*Digestfile*
+#### **\-\-digestfile**=*Digestfile*
After copying the image, write the digest of the resulting image to the file.
-#### **--format**, **-f**=*format*
+#### **\-\-format**, **-f**=*format*
Manifest list type (oci or v2s2) to use when pushing the list (default is oci).
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
When writing the manifest, suppress progress output
-#### **--rm**
+#### **\-\-rm**
Delete the manifest list or image index from local storage if pushing succeeds.
-#### **--remove-signatures**
+#### **\-\-remove-signatures**
Don't copy signatures when pushing images.
-#### **--sign-by**=*fingerprint*
+#### **\-\-sign-by**=*fingerprint*
Sign the pushed images using the GPG key that matches the specified fingerprint.
-#### **--tls-verify**
+#### **\-\-tls-verify**
Require HTTPS and verify certificates when talking to container registries. (defaults to true)
diff --git a/docs/source/markdown/podman-mount.1.md b/docs/source/markdown/podman-mount.1.md
index 1b1b09120..780437a9c 100644
--- a/docs/source/markdown/podman-mount.1.md
+++ b/docs/source/markdown/podman-mount.1.md
@@ -26,21 +26,21 @@ returned.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Mount all podman containers. (External containers will not be mounted)
-#### **--format**=*format*
+#### **\-\-format**=*format*
Print the mounted containers in specified format (json).
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container.
If you use methods other than Podman to run containers such as CRI-O, the last
started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--notruncate**
+#### **\-\-notruncate**
Do not truncate IDs in output.
diff --git a/docs/source/markdown/podman-network-connect.1.md b/docs/source/markdown/podman-network-connect.1.md
index cff4336d6..bb765a677 100644
--- a/docs/source/markdown/podman-network-connect.1.md
+++ b/docs/source/markdown/podman-network-connect.1.md
@@ -13,7 +13,7 @@ Once connected, the container can communicate with other containers in the same
This command is not available for rootless users.
## OPTIONS
-#### **--alias**
+#### **\-\-alias**
Add network-scoped alias for the container. If the network is using the `dnsname` CNI plugin, these aliases
can be used for name resolution on the given network. Multiple *--alias* options may be specified as input.
diff --git a/docs/source/markdown/podman-network-create.1.md b/docs/source/markdown/podman-network-create.1.md
index 3d5d98055..9a8c4f72d 100644
--- a/docs/source/markdown/podman-network-create.1.md
+++ b/docs/source/markdown/podman-network-create.1.md
@@ -18,16 +18,16 @@ If no options are provided, Podman will assign a free subnet and name for your n
Upon completion of creating the network, Podman will display the path to the newly added network file.
## OPTIONS
-#### **--disable-dns**
+#### **\-\-disable-dns**
Disables the DNS plugin for this network which if enabled, can perform container to container name
resolution.
-#### **--driver**, **-d**
+#### **\-\-driver**, **-d**
Driver to manage the network (default "bridge"). Currently only `bridge` is supported.
-#### **--opt**=*option*, **-o**
+#### **\-\-opt**=*option*, **-o**
Set driver specific options.
@@ -35,37 +35,37 @@ For the `bridge` driver the following options are supported: `mtu` and `vlan`.
The `mtu` option sets the Maximum Transmission Unit (MTU) and takes an integer value.
The `vlan` option assign VLAN tag and enables vlan\_filtering. Defaults to none.
-#### **--gateway**
+#### **\-\-gateway**
Define a gateway for the subnet. If you want to provide a gateway address, you must also provide a
*subnet* option.
-#### **--internal**
+#### **\-\-internal**
Restrict external access of this network. Note when using this option, the dnsname plugin will be
automatically disabled.
-#### **--ip-range**
+#### **\-\-ip-range**
Allocate container IP from a range. The range must be a complete subnet and in CIDR notation. The *ip-range* option
must be used with a *subnet* option.
-#### **--label**
+#### **\-\-label**
Set metadata for a network (e.g., --label mykey=value).
-#### **--macvlan**
+#### **\-\-macvlan**
*This option is being deprecated*
Create a *Macvlan* based connection rather than a classic bridge. You must pass an interface name from the host for the
Macvlan connection.
-#### **--subnet**
+#### **\-\-subnet**
The subnet in CIDR notation.
-#### **--ipv6**
+#### **\-\-ipv6**
Enable IPv6 (Dual Stack) networking. You must pass a IPv6 subnet. The *subnet* option must be used with the *ipv6* option.
diff --git a/docs/source/markdown/podman-network-disconnect.1.md b/docs/source/markdown/podman-network-disconnect.1.md
index 8b7125282..ed5a5637a 100644
--- a/docs/source/markdown/podman-network-disconnect.1.md
+++ b/docs/source/markdown/podman-network-disconnect.1.md
@@ -12,7 +12,7 @@ Disconnects a container from a network.
This command is not available for rootless users.
## OPTIONS
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Force the container to disconnect from a network
diff --git a/docs/source/markdown/podman-network-exists.1.md b/docs/source/markdown/podman-network-exists.1.md
index 3ad3ccedb..bc3c88014 100644
--- a/docs/source/markdown/podman-network-exists.1.md
+++ b/docs/source/markdown/podman-network-exists.1.md
@@ -15,7 +15,7 @@ of `0` when the network is found. A `1` will be returned otherwise. An exit cod
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-network-inspect.1.md b/docs/source/markdown/podman-network-inspect.1.md
index 56515d0c1..af6907906 100644
--- a/docs/source/markdown/podman-network-inspect.1.md
+++ b/docs/source/markdown/podman-network-inspect.1.md
@@ -10,7 +10,7 @@ podman\-network\-inspect - Displays the raw CNI network configuration for one or
Display the raw (JSON format) network configuration.
## OPTIONS
-#### **--format**, **-f**
+#### **\-\-format**, **-f**
Pretty-print networks to JSON or using a Go template.
diff --git a/docs/source/markdown/podman-network-ls.1.md b/docs/source/markdown/podman-network-ls.1.md
index 9d2dd52a8..12dbb01d3 100644
--- a/docs/source/markdown/podman-network-ls.1.md
+++ b/docs/source/markdown/podman-network-ls.1.md
@@ -10,7 +10,7 @@ podman\-network\-ls - Display a summary of CNI networks
Displays a list of existing podman networks.
## OPTIONS
-#### **--filter**, **-f**
+#### **\-\-filter**, **-f**
Filter output based on conditions given.
Multiple filters can be given with multiple uses of the --filter flag.
@@ -27,7 +27,7 @@ Valid filters are listed below:
| plugin | [Plugin] CNI plugins included in a network (e.g `bridge`,`portmap`,`firewall`,`tuning`,`dnsname`,`macvlan`) |
| driver | [Driver] Only `bridge` is supported |
-#### **--format**
+#### **\-\-format**
Change the default output format. This can be of a supported type like 'json'
or a Go template.
@@ -41,11 +41,11 @@ Valid placeholders for the Go template are listed below:
| .Labels | Network labels |
| .Version | CNI Version of the config file |
-#### **--no-trunc**
+#### **\-\-no-trunc**
-Do not truncate the network ID. The network ID is not displayed by default and must be specified with **--format**.
+Do not truncate the network ID. The network ID is not displayed by default and must be specified with **\-\-format**.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
The `quiet` option will restrict the output to only the network names.
diff --git a/docs/source/markdown/podman-network-prune.1.md b/docs/source/markdown/podman-network-prune.1.md
index af0a7295d..909db462c 100644
--- a/docs/source/markdown/podman-network-prune.1.md
+++ b/docs/source/markdown/podman-network-prune.1.md
@@ -12,7 +12,7 @@ has no containers connected or configured to connect to it. It will not remove
the so-called default network which goes by the name of *podman*.
## OPTIONS
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Do not prompt for confirmation
diff --git a/docs/source/markdown/podman-network-reload.1.md b/docs/source/markdown/podman-network-reload.1.md
index 011640c86..a4204a397 100644
--- a/docs/source/markdown/podman-network-reload.1.md
+++ b/docs/source/markdown/podman-network-reload.1.md
@@ -16,11 +16,11 @@ the network connectivity.
This command is not available for rootless users since rootless containers are not affected by such connectivity problems.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Reload network configuration of all containers.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman-network-rm.1.md b/docs/source/markdown/podman-network-rm.1.md
index ad4bc11e2..9777975df 100644
--- a/docs/source/markdown/podman-network-rm.1.md
+++ b/docs/source/markdown/podman-network-rm.1.md
@@ -10,7 +10,7 @@ podman\-network\-rm - Remove one or more CNI networks
Delete one or more Podman networks.
## OPTIONS
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
The `force` option will remove all containers that use the named network. If the container is
running, the container will be stopped and removed.
diff --git a/docs/source/markdown/podman-pause.1.md b/docs/source/markdown/podman-pause.1.md
index 123362822..98948739c 100644
--- a/docs/source/markdown/podman-pause.1.md
+++ b/docs/source/markdown/podman-pause.1.md
@@ -13,7 +13,7 @@ Pauses all the processes in one or more containers. You may use container IDs o
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Pause all running containers.
diff --git a/docs/source/markdown/podman-play-kube.1.md b/docs/source/markdown/podman-play-kube.1.md
index 1be597b94..6206a2ea9 100644
--- a/docs/source/markdown/podman-play-kube.1.md
+++ b/docs/source/markdown/podman-play-kube.1.md
@@ -19,7 +19,7 @@ Note: If the `:latest` tag is used, Podman will attempt to pull the image from a
## OPTIONS
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
@@ -27,50 +27,50 @@ If the authorization state is not found there, $HOME/.docker/config.json is chec
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--cert-dir**=*path*
+#### **\-\-cert-dir**=*path*
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
Default certificates directory is _/etc/containers/certs.d_. (This option is not available with the remote Podman client)
-#### **--configmap**=*path*
+#### **\-\-configmap**=*path*
Use Kubernetes configmap YAML at path to provide a source for environment variable values within the containers of the pod.
Note: The *--configmap* option can be used multiple times or a comma-separated list of paths can be used to pass multiple Kubernetes configmap YAMLs.
-#### **--creds**
+#### **\-\-creds**
The [username[:password]] to use to authenticate with the registry if required.
If one or both values are not supplied, a command line prompt will appear and the
value can be entered. The password is entered without echo.
-#### **--log-driver**=driver
+#### **\-\-log-driver**=driver
Set logging driver for all created containers.
-#### **--network**=*networks*, **--net**
+#### **\-\-network**=*networks*, **\-\-net**
A comma-separated list of the names of CNI networks the pod should join.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Suppress output information when pulling images
-#### **--seccomp-profile-root**=*path*
+#### **\-\-seccomp-profile-root**=*path*
Directory path for seccomp profiles (default: "/var/lib/kubelet/seccomp"). (This option is not available with the remote Podman client)
-#### **--start**=*true|false*
+#### **\-\-start**=*true|false*
Start the pod after creating it, set to false to only create it.
-#### **--tls-verify**=*true|false*
+#### **\-\-tls-verify**=*true|false*
Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true,
then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified,
TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-pod-create.1.md b/docs/source/markdown/podman-pod-create.1.md
index 22eb07bf3..9ecde1ca3 100644
--- a/docs/source/markdown/podman-pod-create.1.md
+++ b/docs/source/markdown/podman-pod-create.1.md
@@ -15,71 +15,71 @@ containers added to it. The pod id is printed to STDOUT. You can then use
## OPTIONS
-#### **--add-host**=_host_:_ip_
+#### **\-\-add-host**=_host_:_ip_
Add a host to the /etc/hosts file shared between all containers in the pod.
-#### **--cgroup-parent**=*path*
+#### **\-\-cgroup-parent**=*path*
Path to cgroups under which the cgroup for the pod will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.
-#### **--dns**=*ipaddr*
+#### **\-\-dns**=*ipaddr*
Set custom DNS servers in the /etc/resolv.conf file that will be shared between all containers in the pod. A special option, "none" is allowed which disables creation of /etc/resolv.conf for the pod.
-#### **--dns-opt**=*option*
+#### **\-\-dns-opt**=*option*
Set custom DNS options in the /etc/resolv.conf file that will be shared between all containers in the pod.
-#### **--dns-search**=*domain*
+#### **\-\-dns-search**=*domain*
Set custom DNS search domains in the /etc/resolv.conf file that will be shared between all containers in the pod.
-#### **--help**
+#### **\-\-help**
Print usage statement.
-#### **--hostname**=name
+#### **\-\-hostname**=name
Set a hostname to the pod
-#### **--infra**=**true**|**false**
+#### **\-\-infra**=**true**|**false**
Create an infra container and associate it with the pod. An infra container is a lightweight container used to coordinate the shared kernel namespace of a pod. Default: true.
-#### **--infra-conmon-pidfile**=*file*
+#### **\-\-infra-conmon-pidfile**=*file*
Write the pid of the infra container's **conmon** process to a file. As **conmon** runs in a separate process than Podman, this is necessary when using systemd to manage Podman containers and pods.
-#### **--infra-command**=*command*
+#### **\-\-infra-command**=*command*
The command that will be run to start the infra container. Default: "/pause".
-#### **--infra-image**=*image*
+#### **\-\-infra-image**=*image*
The image that will be created for the infra container. Default: "k8s.gcr.io/pause:3.1".
-#### **--ip**=*ipaddr*
+#### **\-\-ip**=*ipaddr*
Set a static IP for the pod's shared network.
-#### **--label**=*label*, **-l**
+#### **\-\-label**=*label*, **-l**
Add metadata to a pod (e.g., --label com.example.key=value).
-#### **--label-file**=*label*
+#### **\-\-label-file**=*label*
Read in a line delimited file of labels.
-#### **--mac-address**=*address*
+#### **\-\-mac-address**=*address*
Set a static MAC address for the pod's shared network.
-#### **--name**=*name*, **-n**
+#### **\-\-name**=*name*, **-n**
Assign a name to the pod.
-#### **--network**=*mode*, **--net**
+#### **\-\-network**=*mode*, **\-\-net**
Set network mode for the pod. Supported values are
- **bridge**: Create a network stack on the default bridge. This is the default for rootful containers.
@@ -96,19 +96,19 @@ Set network mode for the pod. Supported values are
- **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
- **port_handler=slirp4netns**: Use the slirp4netns port forwarding.
-#### **--network-alias**=strings
+#### **\-\-network-alias**=strings
Add a DNS alias for the container. When the container is joined to a CNI network with support for the dnsname plugin, the container will be accessible through this name from other containers in the network.
-#### **--no-hosts**=**true**|**false**
+#### **\-\-no-hosts**=**true**|**false**
Disable creation of /etc/hosts for the pod.
-#### **--pod-id-file**=*path*
+#### **\-\-pod-id-file**=*path*
Write the pod ID to the file.
-#### **--publish**=*port*, **-p**
+#### **\-\-publish**=*port*, **-p**
Publish a port or range of ports from the pod to the host.
@@ -119,11 +119,11 @@ Use `podman port` to see the actual mapping: `podman port CONTAINER $CONTAINERPO
NOTE: This cannot be modified once the pod is created.
-#### **--replace**=**true**|**false**
+#### **\-\-replace**=**true**|**false**
If another pod with the same name already exists, replace and remove it. The default is **false**.
-#### **--share**=*namespace*
+#### **\-\-share**=*namespace*
A comma delimited list of kernel namespaces to share. If none or "" is specified, no namespaces will be shared. The namespaces to choose from are ipc, net, pid, uts.
@@ -133,7 +133,7 @@ UUID short identifier (“f78375b1c487”)
Name (“jonah”)
podman generates a UUID for each pod, and if a name is not assigned
-to the container with **--name** then a random string name will be generated
+to the container with **\-\-name** then a random string name will be generated
for it. The name is useful any place you need to identify a pod.
## EXAMPLES
diff --git a/docs/source/markdown/podman-pod-inspect.1.md b/docs/source/markdown/podman-pod-inspect.1.md
index 1f4e6cb06..9265b824c 100644
--- a/docs/source/markdown/podman-pod-inspect.1.md
+++ b/docs/source/markdown/podman-pod-inspect.1.md
@@ -11,12 +11,12 @@ Displays configuration and state information about a given pod. It also display
that belong to the pod.
## OPTIONS
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, use the last created pod. If you use methods other than Podman
to run pods such as CRI-O, the last started pod could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--format**=*format*, **-f**
+#### **\-\-format**=*format*, **-f**
Change the default output format. This can be of a supported type like 'json'
or a Go template.
diff --git a/docs/source/markdown/podman-pod-kill.1.md b/docs/source/markdown/podman-pod-kill.1.md
index d4eef2307..38bcaab17 100644
--- a/docs/source/markdown/podman-pod-kill.1.md
+++ b/docs/source/markdown/podman-pod-kill.1.md
@@ -10,16 +10,16 @@ podman\-pod\-kill - Kill the main process of each container in one or more pods
The main process of each container inside the pods specified will be sent SIGKILL, or any signal specified with option --signal.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Sends signal to all containers associated with a pod.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, use the last created pod. If you use methods other than Podman
to run pods such as CRI-O, the last started pod could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--signal**, **-s**
+#### **\-\-signal**, **-s**
Signal to send to the containers in the pod. For more information on Linux signals, refer to *man signal(7)*.
diff --git a/docs/source/markdown/podman-pod-pause.1.md b/docs/source/markdown/podman-pod-pause.1.md
index 2c849a932..51dee5939 100644
--- a/docs/source/markdown/podman-pod-pause.1.md
+++ b/docs/source/markdown/podman-pod-pause.1.md
@@ -11,11 +11,11 @@ Pauses all the running processes in the containers of one or more pods. You may
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Pause all pods.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, pause the last created pod. (This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman-pod-prune.1.md b/docs/source/markdown/podman-pod-prune.1.md
index e90164c15..7b7137186 100644
--- a/docs/source/markdown/podman-pod-prune.1.md
+++ b/docs/source/markdown/podman-pod-prune.1.md
@@ -11,7 +11,7 @@ podman-pod-prune - Remove all stopped pods and their containers
## OPTIONS
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Force removal of all running pods and their containers. The default is false.
## EXAMPLES
diff --git a/docs/source/markdown/podman-pod-ps.1.md b/docs/source/markdown/podman-pod-ps.1.md
index 7c1c4a0b4..0be22c2b1 100644
--- a/docs/source/markdown/podman-pod-ps.1.md
+++ b/docs/source/markdown/podman-pod-ps.1.md
@@ -26,35 +26,35 @@ By default it lists:
## OPTIONS
-#### **--ctr-names**
+#### **\-\-ctr-names**
Includes the container names in the container info field
-#### **--ctr-ids**
+#### **\-\-ctr-ids**
Includes the container IDs in the container info field
-#### **--ctr-status**
+#### **\-\-ctr-status**
Includes the container statuses in the container info field
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Show the latest pod created (all states) (This option is not available with the remote Podman client)
-#### **--no-trunc**
+#### **\-\-no-trunc**
Display the extended information
-#### **--ns**
+#### **\-\-ns**
Display namespace information of the pod
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Print the numeric IDs of the pods only
-#### **--format**=*format*
+#### **\-\-format**=*format*
Pretty-print containers to JSON or using a Go template
@@ -72,13 +72,13 @@ Valid placeholders for the Go template are listed below:
| .InfraID | Pod infra container ID |
| .Networks | Show all networks connected to the infra container |
-#### **--sort**
+#### **\-\-sort**
Sort by created, ID, name, status, or number of containers
Default: created
-#### **--filter**, **-f**=*filter*
+#### **\-\-filter**, **-f**=*filter*
Filter output based on conditions given.
Multiple filters can be given with multiple uses of the --filter flag.
@@ -99,7 +99,7 @@ Valid filters are listed below:
| ctr-status | Container status within the pod |
| ctr-number | Number of containers in the pod |
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-pod-restart.1.md b/docs/source/markdown/podman-pod-restart.1.md
index 65d05f977..15261d5aa 100644
--- a/docs/source/markdown/podman-pod-restart.1.md
+++ b/docs/source/markdown/podman-pod-restart.1.md
@@ -14,11 +14,11 @@ When restarting multiple pods, an error from restarting one pod will not effect
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Restarts all pods
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, restart the last created pod. (This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman-pod-rm.1.md b/docs/source/markdown/podman-pod-rm.1.md
index d185385b6..025bedc61 100644
--- a/docs/source/markdown/podman-pod-rm.1.md
+++ b/docs/source/markdown/podman-pod-rm.1.md
@@ -11,25 +11,25 @@ podman\-pod\-rm - Remove one or more stopped pods and containers
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Remove all pods. Can be used in conjunction with \-f as well.
-#### **--ignore**, **-i**
+#### **\-\-ignore**, **-i**
Ignore errors when specified pods are not in the container store. A user might
have decided to manually remove a pod which would lead to a failure during the
ExecStop directive of a systemd service referencing that pod.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, remove the last created pod. (This option is not available with the remote Podman client)
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Stop running containers and delete all stopped containers before removal of pod.
-#### **--pod-id-file**
+#### **\-\-pod-id-file**
Read pod ID from the specified file and remove the pod. Can be specified multiple times.
diff --git a/docs/source/markdown/podman-pod-start.1.md b/docs/source/markdown/podman-pod-start.1.md
index 40a71d879..78656b954 100644
--- a/docs/source/markdown/podman-pod-start.1.md
+++ b/docs/source/markdown/podman-pod-start.1.md
@@ -12,15 +12,15 @@ to be started.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Starts all pods
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, start the last created pod. (This option is not available with the remote Podman client)
-#### **--pod-id-file**
+#### **\-\-pod-id-file**
Read pod ID from the specified file and start the pod. Can be specified multiple times.
diff --git a/docs/source/markdown/podman-pod-stats.1.md b/docs/source/markdown/podman-pod-stats.1.md
index 3158ffc1c..6d67295d8 100644
--- a/docs/source/markdown/podman-pod-stats.1.md
+++ b/docs/source/markdown/podman-pod-stats.1.md
@@ -11,23 +11,23 @@ Display a live stream of containers in one or more pods resource usage statistic
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Show all containers. Only running containers are shown by default
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, use the last created pod. (This option is not available with the remote Podman client)
-#### **--no-reset**
+#### **\-\-no-reset**
Do not clear the terminal/screen in between reporting intervals
-#### **--no-stream**
+#### **\-\-no-stream**
Disable streaming pod stats and only pull the first result, default setting is false
-#### **--format**=*template*
+#### **\-\-format**=*template*
Pretty-print container statistics to JSON or using a Go template
diff --git a/docs/source/markdown/podman-pod-stop.1.md b/docs/source/markdown/podman-pod-stop.1.md
index 77f6af433..b68ee2377 100644
--- a/docs/source/markdown/podman-pod-stop.1.md
+++ b/docs/source/markdown/podman-pod-stop.1.md
@@ -11,25 +11,25 @@ Stop containers in one or more pods. You may use pod IDs or names as input.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Stops all pods
-#### **--ignore**, **-i**
+#### **\-\-ignore**, **-i**
Ignore errors when specified pods are not in the container store. A user might
have decided to manually remove a pod which would lead to a failure during the
ExecStop directive of a systemd service referencing that pod.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, stop the last created pod. (This option is not available with the remote Podman client)
-#### **--time**, **-t**=*time*
+#### **\-\-time**, **-t**=*time*
Timeout to wait before forcibly stopping the containers in the pod.
-#### **--pod-id-file**
+#### **\-\-pod-id-file**
Read pod ID from the specified file and stop the pod. Can be specified multiple times.
diff --git a/docs/source/markdown/podman-pod-top.1.md b/docs/source/markdown/podman-pod-top.1.md
index d374a0dca..ea86c3999 100644
--- a/docs/source/markdown/podman-pod-top.1.md
+++ b/docs/source/markdown/podman-pod-top.1.md
@@ -11,11 +11,11 @@ Display the running processes of containers in a pod. The *format-descriptors* a
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, use the last created pod. (This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman-pod-unpause.1.md b/docs/source/markdown/podman-pod-unpause.1.md
index 98022a50b..75230113f 100644
--- a/docs/source/markdown/podman-pod-unpause.1.md
+++ b/docs/source/markdown/podman-pod-unpause.1.md
@@ -11,11 +11,11 @@ Unpauses all the paused processes in the containers of one or more pods. You ma
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Unpause all pods.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the pod name or ID, unpause the last created pod. (This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman-port.1.md b/docs/source/markdown/podman-port.1.md
index 7a84d181a..1db174e7d 100644
--- a/docs/source/markdown/podman-port.1.md
+++ b/docs/source/markdown/podman-port.1.md
@@ -13,12 +13,12 @@ List port mappings for the *container* or lookup the public-facing port that is
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
List all known port mappings for running containers. When using this option, you cannot pass any container names
or private ports/protocols as filters.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman-ps.1.md b/docs/source/markdown/podman-ps.1.md
index 75eede527..b950fede4 100644
--- a/docs/source/markdown/podman-ps.1.md
+++ b/docs/source/markdown/podman-ps.1.md
@@ -13,7 +13,7 @@ podman\-ps - Prints out information about containers
**podman container ls** [*options*]
## DESCRIPTION
-**podman ps** lists the running containers on the system. Use the **--all** flag to view
+**podman ps** lists the running containers on the system. Use the **\-\-all** flag to view
all the containers information. By default it lists:
* container id
@@ -26,17 +26,17 @@ all the containers information. By default it lists:
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Show all the containers created by Podman, default is only running containers.
Note: Podman shares containers storage with other tools such as Buildah and CRI-O. In some cases these `external` containers might also exist in the same storage. Use the `--external` option to see these external containers. External containers show the 'storage' status.
-#### **--external**
+#### **\-\-external**
Display external containers that are not controlled by Podman but are stored in containers storage. These external containers are generally created via other container technology such as Buildah or CRI-O and may depend on the same container images that Podman is also using. External containers are denoted with either a 'buildah' or 'storage' in the COMMAND and STATUS column of the ps output. Only used with the --all option.
-#### **--filter**, **-f**
+#### **\-\-filter**, **-f**
Filter what containers are shown in the output.
Multiple filters can be given with multiple uses of the --filter flag.
@@ -61,7 +61,7 @@ Valid filters are listed below:
| network | [Network] name or full ID of network |
-#### **--format**=*format*
+#### **\-\-format**=*format*
Pretty-print containers to JSON or using a Go template
@@ -84,52 +84,52 @@ Valid placeholders for the Go template are listed below:
| .Labels | All the labels assigned to the container |
| .Mounts | Volumes mounted in the container |
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--last**, **-n**
+#### **\-\-last**, **-n**
Print the n last created containers (all states)
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Show the latest container created (all states) (This option is not available with the remote Podman client)
-#### **--namespace**, **--ns**
+#### **\-\-namespace**, **\-\-ns**
Display namespace information
-#### **--no-trunc**
+#### **\-\-no-trunc**
Display the extended information
-#### **--pod**, **-p**
+#### **\-\-pod**, **-p**
Display the pods the containers are associated with
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Print the numeric IDs of the containers only
-#### **--sort**
+#### **\-\-sort**
Sort by command, created, id, image, names, runningfor, size, or status",
Note: Choosing size will sort by size of rootFs, not alphabetically like the rest of the options
Default: created
-#### **--size**, **-s**
+#### **\-\-size**, **-s**
Display the total file size
-#### **--sync**
+#### **\-\-sync**
Force a sync of container state with the OCI runtime.
In some cases, a container's state in the runtime can become out of sync with Podman's state.
This will update Podman's state based on what the OCI runtime reports.
Forcibly syncing is much slower, but can resolve inconsistent state issues.
-#### **--watch**, **-w**
+#### **\-\-watch**, **-w**
Refresh the output with current containers on an interval in seconds.
diff --git a/docs/source/markdown/podman-pull.1.md b/docs/source/markdown/podman-pull.1.md
index 02ba736f2..79563fb57 100644
--- a/docs/source/markdown/podman-pull.1.md
+++ b/docs/source/markdown/podman-pull.1.md
@@ -65,16 +65,16 @@ Images are stored in local image storage.
## OPTIONS
-#### **--all-tags**, **a**
+#### **\-\-all-tags**, **a**
All tagged images in the repository will be pulled.
Note: When using the all-tags flag, Podman will not iterate over the search registries in the containers-registries.conf(5) but will always use docker.io for unqualified image names.
-#### **--arch**=*ARCH*
+#### **\-\-arch**=*ARCH*
Override the architecture, defaults to hosts, of the image to be pulled. For example, `arm`.
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
@@ -82,46 +82,46 @@ If the authorization state is not found there, $HOME/.docker/config.json is chec
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--cert-dir**=*path*
+#### **\-\-cert-dir**=*path*
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
Default certificates directory is _/etc/containers/certs.d_. (This option is not available with the remote Podman client)
-#### **--creds**=*[username[:password]]*
+#### **\-\-creds**=*[username[:password]]*
The [username[:password]] to use to authenticate with the registry if required.
If one or both values are not supplied, a command line prompt will appear and the
value can be entered. The password is entered without echo.
-#### **--disable-content-trust**
+#### **\-\-disable-content-trust**
This is a Docker specific option to disable image verification to a Docker
registry and is not supported by Podman. This flag is a NOOP and provided
solely for scripting compatibility.
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--os**=*OS*
+#### **\-\-os**=*OS*
Override the OS, defaults to hosts, of the image to be pulled. For example, `windows`.
-#### **--platform**=*OS/ARCH*
+#### **\-\-platform**=*OS/ARCH*
Specify the platform for selecting the image. (Conflicts with --arch and --os)
The `--platform` option can be used to override the current architecture and operating system.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Suppress output information when pulling images
-#### **--tls-verify**=*true|false*
+#### **\-\-tls-verify**=*true|false*
Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true,
then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified,
TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.
-#### **--variant**=*VARIANT*
+#### **\-\-variant**=*VARIANT*
Use _VARIANT_ instead of the default architecture variant of the container image. Some images can use multiple variants of the arm architectures, such as arm/v5 and arm/v7.
diff --git a/docs/source/markdown/podman-push.1.md b/docs/source/markdown/podman-push.1.md
index f42ee1020..1bef7ebdb 100644
--- a/docs/source/markdown/podman-push.1.md
+++ b/docs/source/markdown/podman-push.1.md
@@ -54,7 +54,7 @@ Images are pushed from those stored in local image storage.
## OPTIONS
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
@@ -62,49 +62,49 @@ If the authorization state is not found there, $HOME/.docker/config.json is chec
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--creds**=*[username[:password]]*
+#### **\-\-creds**=*[username[:password]]*
The [username[:password]] to use to authenticate with the registry if required.
If one or both values are not supplied, a command line prompt will appear and the
value can be entered. The password is entered without echo.
-#### **--cert-dir**=*path*
+#### **\-\-cert-dir**=*path*
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
Default certificates directory is _/etc/containers/certs.d_. (This option is not available with the remote Podman client)
-#### **--compress**
+#### **\-\-compress**
Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source)
Note: This flag can only be set when using the **dir** transport
-#### **--digestfile** *Digestfile*
+#### **\-\-digestfile** *Digestfile*
After copying the image, write the digest of the resulting image to the file. (This option is not available with the remote Podman client)
-#### **--disable-content-trust**
+#### **\-\-disable-content-trust**
This is a Docker specific option to disable image verification to a Docker
registry and is not supported by Podman. This flag is a NOOP and provided
solely for scripting compatibility.
-#### **--format**, **-f**=*format*
+#### **\-\-format**, **-f**=*format*
Manifest Type (oci, v2s2, or v2s1) to use when pushing an image.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
When writing the output image, suppress progress output
-#### **--remove-signatures**
+#### **\-\-remove-signatures**
Discard any pre-existing signatures in the image. (This option is not available with the remote Podman client)
-#### **--sign-by**=*key*
+#### **\-\-sign-by**=*key*
Add a signature at the destination using the specified key. (This option is not available with the remote Podman client)
-#### **--tls-verify**=*true|false*
+#### **\-\-tls-verify**=*true|false*
Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true,
then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified,
diff --git a/docs/source/markdown/podman-remote.1.md b/docs/source/markdown/podman-remote.1.md
index 1a6c7d3cc..3e20e1ded 100644
--- a/docs/source/markdown/podman-remote.1.md
+++ b/docs/source/markdown/podman-remote.1.md
@@ -25,15 +25,15 @@ The `containers.conf` file should be placed under `$HOME/.config/containers/cont
## GLOBAL OPTIONS
-#### **--connection**=*name*, **-c**
+#### **\-\-connection**=*name*, **-c**
Remote connection name
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--identity**=*path*
+#### **\-\-identity**=*path*
Path to ssh identity file. If the identity file has been encrypted, Podman prompts the user for the passphrase.
If no identity file is provided and no user is given, Podman defaults to the user running the podman command.
@@ -44,11 +44,11 @@ Identity value resolution precedence:
- environment variable `CONTAINER_SSHKEY`, if `CONTAINER_HOST` is found
- `containers.conf`
-#### **--log-level**=*level*
+#### **\-\-log-level**=*level*
Log messages above specified level: debug, info, warn, error (default), fatal or panic
-#### **--url**=*value*
+#### **\-\-url**=*value*
URL to access Podman service (default from `containers.conf`, rootless "unix://run/user/$UID/podman/podman.sock" or as root "unix://run/podman/podman.sock).
@@ -67,7 +67,7 @@ URL value resolution precedence:
- `containers.conf`
- `unix://run/podman/podman.sock`
-#### **--version**
+#### **\-\-version**
Print the version
diff --git a/docs/source/markdown/podman-restart.1.md b/docs/source/markdown/podman-restart.1.md
index 2b37e2ea4..0d6d3b595 100644
--- a/docs/source/markdown/podman-restart.1.md
+++ b/docs/source/markdown/podman-restart.1.md
@@ -14,17 +14,17 @@ Containers will be stopped if they are running and then restarted. Stopped
containers will not be stopped and will only be started.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Restart all containers regardless of their current state.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--running**
+#### **\-\-running**
Restart all containers that are already in the *running* state.
-#### **--time**=*time*, **-t**
+#### **\-\-time**=*time*, **-t**
Timeout to wait before forcibly stopping the container.
diff --git a/docs/source/markdown/podman-rm.1.md b/docs/source/markdown/podman-rm.1.md
index 0abf2768c..1fce9d2f3 100644
--- a/docs/source/markdown/podman-rm.1.md
+++ b/docs/source/markdown/podman-rm.1.md
@@ -14,15 +14,15 @@ Running or unusable containers will not be removed without the **-f** option.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Remove all containers. Can be used in conjunction with **-f** as well.
-#### **--cidfile**
+#### **\-\-cidfile**
Read container ID from the specified file and remove the container. Can be specified multiple times.
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Force the removal of running and paused containers. Forcing a container removal also
removes containers from container storage even if the container is not known to podman.
@@ -30,21 +30,21 @@ Containers could have been created by a different container engine.
In addition, forcing can be used to remove unusable containers, e.g. containers
whose OCI runtime has become unavailable.
-#### **--ignore**, **-i**
+#### **\-\-ignore**, **-i**
Ignore errors when specified containers are not in the container store. A user
might have decided to manually remove a container which would lead to a failure
during the ExecStop directive of a systemd service referencing that container.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--volumes**, **-v**
+#### **\-\-volumes**, **-v**
Remove anonymous volumes associated with the container. This does not include named volumes
-created with **podman volume create**, or the **--volume** option of **podman run** and **podman create**.
+created with **podman volume create**, or the **\-\-volume** option of **podman run** and **podman create**.
## EXAMPLE
Remove a container by its name *mywebserver*
diff --git a/docs/source/markdown/podman-rmi.1.md b/docs/source/markdown/podman-rmi.1.md
index 765c1bd6d..037a0a170 100644
--- a/docs/source/markdown/podman-rmi.1.md
+++ b/docs/source/markdown/podman-rmi.1.md
@@ -13,11 +13,11 @@ Removes one or more locally stored images.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Remove all images in the local storage.
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
This option will cause podman to remove all containers that are using the image before removing the image from the system.
diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md
index f61344099..6d9d5ba28 100644
--- a/docs/source/markdown/podman-run.1.md
+++ b/docs/source/markdown/podman-run.1.md
@@ -25,7 +25,7 @@ pull** _image_ , before it starts the container from that image.
Several files will be automatically created within the container. These include
_/etc/hosts_, _/etc/hostname_, and _/etc/resolv.conf_ to manage networking.
These will be based on the host's version of the files, though they can be
-customized with options (for example, **--dns** will override the host's DNS
+customized with options (for example, **\-\-dns** will override the host's DNS
servers in the created _resolv.conf_). Additionally, a container environment
file is created in each container to indicate to programs they are running in a
container. This file is located at _/run/.containerenv_. When using the
@@ -83,20 +83,20 @@ and specified with a _tag_.
$ podman run oci-archive:/tmp/fedora echo hello
## OPTIONS
-#### **--add-host**=_host_:_ip_
+#### **\-\-add-host**=_host_:_ip_
Add a line to container's _/etc/hosts_ for custom host-to-IP mapping.
This option can be set multiple times.
-#### **--annotation**=_key_=_value_
+#### **\-\-annotation**=_key_=_value_
Add an annotation to the container.
This option can be set multiple times.
-#### **--arch**=*ARCH*
+#### **\-\-arch**=*ARCH*
Override the architecture, defaults to hosts, of the image to be pulled. For example, `arm`.
-#### **--attach**, **-a**=**stdin**|**stdout**|**stderr**
+#### **\-\-attach**, **-a**=**stdin**|**stdout**|**stderr**
Attach to STDIN, STDOUT or STDERR.
@@ -107,30 +107,30 @@ error. It can even pretend to be a TTY (this is what most commandline
executables expect) and pass along signals. The **-a** option can be set for
each of **stdin**, **stdout**, and **stderr**.
-#### **--authfile**[=*path*]
+#### **\-\-authfile**[=*path*]
Path to the authentication file. Default is *${XDG_RUNTIME_DIR}/containers/auth.json*.
Note: You can also override the default path of the authentication file by setting the **REGISTRY_AUTH_FILE**
environment variable.
-#### **--blkio-weight**=*weight*
+#### **\-\-blkio-weight**=*weight*
Block IO relative weight. The _weight_ is a value between **10** and **1000**.
-#### **--blkio-weight-device**=*device*:*weight*
+#### **\-\-blkio-weight-device**=*device*:*weight*
Block IO relative device weight.
-#### **--cap-add**=*capability*
+#### **\-\-cap-add**=*capability*
Add Linux capabilities.
-#### **--cap-drop**=*capability*
+#### **\-\-cap-drop**=*capability*
Drop Linux capabilities.
-#### **--cgroupns**=*mode*
+#### **\-\-cgroupns**=*mode*
Set the cgroup namespace mode for the container.
@@ -141,34 +141,34 @@ Set the cgroup namespace mode for the container.
If the host uses cgroups v1, the default is set to **host**. On cgroups v2, the default is **private**.
-#### **--cgroups**=**enabled**|**disabled**|**no-conmon**|**split**
+#### **\-\-cgroups**=**enabled**|**disabled**|**no-conmon**|**split**
Determines whether the container will create CGroups.
Default is **enabled**.
The **enabled** option will create a new cgroup under the cgroup-parent.
-The **disabled** option will force the container to not create CGroups, and thus conflicts with CGroup options (**--cgroupns** and **--cgroup-parent**).
+The **disabled** option will force the container to not create CGroups, and thus conflicts with CGroup options (**\-\-cgroupns** and **\-\-cgroup-parent**).
The **no-conmon** option disables a new CGroup only for the **conmon** process.
-The **split** option splits the current cgroup in two sub-cgroups: one for conmon and one for the container payload. It is not possible to set **--cgroup-parent** with **split**.
+The **split** option splits the current cgroup in two sub-cgroups: one for conmon and one for the container payload. It is not possible to set **\-\-cgroup-parent** with **split**.
-#### **--cgroup-parent**=*path*
+#### **\-\-cgroup-parent**=*path*
Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.
-#### **--cgroup-conf**=*KEY=VALUE*
+#### **\-\-cgroup-conf**=*KEY=VALUE*
-When running on cgroup v2, specify the cgroup file to write to and its value. For example **--cgroup-conf=memory.high=1073741824** sets the memory.high limit to 1GB.
+When running on cgroup v2, specify the cgroup file to write to and its value. For example **\-\-cgroup-conf=memory.high=1073741824** sets the memory.high limit to 1GB.
-#### **--cidfile**=*file*
+#### **\-\-cidfile**=*file*
Write the container ID to *file*.
-#### **--conmon-pidfile**=*file*
+#### **\-\-conmon-pidfile**=*file*
Write the pid of the **conmon** process to a file. As **conmon** runs in a separate process than Podman, this is necessary when using systemd to restart Podman containers.
-#### **--cpu-period**=*limit*
+#### **\-\-cpu-period**=*limit*
Set the CPU period for the Completely Fair Scheduler (CFS), which is a
duration in microseconds. Once the container's CPU quota is used up, it will
@@ -179,26 +179,26 @@ On some systems, changing the CPU limits may not be allowed for non-root
users. For more details, see
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
-#### **--cpu-quota**=*limit*
+#### **\-\-cpu-quota**=*limit*
Limit the CPU Completely Fair Scheduler (CFS) quota.
Limit the container's CPU usage. By default, containers run with the full
CPU resource. The limit is a number in microseconds. If you provide a number,
the container will be allowed to use that much CPU time until the CPU period
-ends (controllable via **--cpu-period**).
+ends (controllable via **\-\-cpu-period**).
On some systems, changing the CPU limits may not be allowed for non-root
users. For more details, see
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
-#### **--cpu-rt-period**=*microseconds*
+#### **\-\-cpu-rt-period**=*microseconds*
Limit the CPU real-time period in microseconds.
Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify.
-#### **--cpu-rt-runtime**=*microseconds*
+#### **\-\-cpu-rt-runtime**=*microseconds*
Limit the CPU real-time runtime in microseconds.
@@ -207,7 +207,7 @@ Period of 1,000,000us and Runtime of 950,000us means that this container could c
The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
-#### **--cpu-shares**=*shares*
+#### **\-\-cpu-shares**=*shares*
CPU shares (relative weight).
@@ -232,8 +232,8 @@ cores. Even if a container is limited to less than 100% of CPU time, it can
use 100% of each individual CPU core.
For example, consider a system with more than three cores. If you start one
-container **{C0}** with **--cpu-shares=512** running one process, and another container
-**{C1}** with **--cpu-shares=1024** running two processes, this can result in the following
+container **{C0}** with **\-\-cpu-shares=512** running one process, and another container
+**{C1}** with **\-\-cpu-shares=1024** running two processes, this can result in the following
division of CPU shares:
| PID | container | CPU | CPU share |
@@ -242,30 +242,30 @@ division of CPU shares:
| 101 | {C1} | 1 | 100% of CPU1 |
| 102 | {C1} | 2 | 100% of CPU2 |
-#### **--cpus**=*number*
+#### **\-\-cpus**=*number*
Number of CPUs. The default is *0.0* which means no limit. This is shorthand
-for **--cpu-period** and **--cpu-quota**, so you may only set either
-#### **--cpus** or **--cpu-period** and **--cpu-quota**.
+for **\-\-cpu-period** and **\-\-cpu-quota**, so you may only set either
+#### **\-\-cpus** or **\-\-cpu-period** and **\-\-cpu-quota**.
On some systems, changing the CPU limits may not be allowed for non-root
users. For more details, see
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
-#### **--cpuset-cpus**=*number*
+#### **\-\-cpuset-cpus**=*number*
CPUs in which to allow execution. Can be specified as a comma-separated list
(e.g. **0,1**), as a range (e.g. **0-3**), or any combination thereof
(e.g. **0-3,7,11-15**).
-#### **--cpuset-mems**=*nodes*
+#### **\-\-cpuset-mems**=*nodes*
Memory nodes (MEMs) in which to allow execution. Only effective on NUMA systems.
-For example, if you have four memory nodes (0-3) on your system, use **--cpuset-mems=0,1**
+For example, if you have four memory nodes (0-3) on your system, use **\-\-cpuset-mems=0,1**
to only use memory from the first two memory nodes.
-#### **--detach**, **-d**=**true**|**false**
+#### **\-\-detach**, **-d**=**true**|**false**
Detached mode: run the container in the background and print the new container ID. The default is *false*.
@@ -275,10 +275,10 @@ detached container with **podman attach**.
When attached in the tty mode, you can detach from the container (and leave it
running) using a configurable key sequence. The default sequence is `ctrl-p,ctrl-q`.
-Configure the keys sequence using the **--detach-keys** option, or specifying
+Configure the keys sequence using the **\-\-detach-keys** option, or specifying
it in the **containers.conf** file: see **containers.conf(5)** for more information.
-#### **--detach-keys**=*sequence*
+#### **\-\-detach-keys**=*sequence*
Specify the key sequence for detaching a container. Format is a single character `[a-Z]` or one or more `ctrl-<value>` characters where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. Specifying "" will disable this feature. The default is *ctrl-p,ctrl-q*.
@@ -286,73 +286,73 @@ This option can also be set in **containers.conf**(5) file.
Specifying "" will disable this feature. The default is **ctrl-p,ctrl-q**.
-#### **--device**=_host-device_[**:**_container-device_][**:**_permissions_]
+#### **\-\-device**=_host-device_[**:**_container-device_][**:**_permissions_]
Add a host device to the container. Optional *permissions* parameter
can be used to specify device permissions, it is combination of
**r** for read, **w** for write, and **m** for **mknod**(2).
-Example: **--device=/dev/sdc:/dev/xvdc:rwm**.
+Example: **\-\-device=/dev/sdc:/dev/xvdc:rwm**.
Note: if _host_device_ is a symbolic link then it will be resolved first.
The container will only store the major and minor numbers of the host device.
Note: if the user only has access rights via a group, accessing the device
from inside a rootless container will fail. The **crun**(1) runtime offers a
-workaround for this by adding the option **--annotation run.oci.keep_original_groups=1**.
+workaround for this by adding the option **\-\-annotation run.oci.keep_original_groups=1**.
Podman may load kernel modules required for using the specified
device. The devices that Podman will load modules when necessary are:
/dev/fuse.
-#### **--device-cgroup-rule**=rule
+#### **\-\-device-cgroup-rule**=rule
Add a rule to the cgroup allowed devices list
-#### **--device-read-bps**=_path_:_rate_
+#### **\-\-device-read-bps**=_path_:_rate_
-Limit read rate (in bytes per second) from a device (e.g. **--device-read-bps=/dev/sda:1mb**).
+Limit read rate (in bytes per second) from a device (e.g. **\-\-device-read-bps=/dev/sda:1mb**).
-#### **--device-read-iops**=_path_:_rate_
+#### **\-\-device-read-iops**=_path_:_rate_
-Limit read rate (in IO operations per second) from a device (e.g. **--device-read-iops=/dev/sda:1000**).
+Limit read rate (in IO operations per second) from a device (e.g. **\-\-device-read-iops=/dev/sda:1000**).
-#### **--device-write-bps**=_path_:_rate_
+#### **\-\-device-write-bps**=_path_:_rate_
-Limit write rate (in bytes per second) to a device (e.g. **--device-write-bps=/dev/sda:1mb**).
+Limit write rate (in bytes per second) to a device (e.g. **\-\-device-write-bps=/dev/sda:1mb**).
-#### **--device-write-iops**=_path_:_rate_
+#### **\-\-device-write-iops**=_path_:_rate_
-Limit write rate (in IO operations per second) to a device (e.g. **--device-write-iops=/dev/sda:1000**).
+Limit write rate (in IO operations per second) to a device (e.g. **\-\-device-write-iops=/dev/sda:1000**).
-#### **--disable-content-trust**
+#### **\-\-disable-content-trust**
This is a Docker specific option to disable image verification to a Docker
registry and is not supported by Podman. This flag is a NOOP and provided
solely for scripting compatibility.
-#### **--dns**=*ipaddr*
+#### **\-\-dns**=*ipaddr*
-Set custom DNS servers. Invalid if using **--dns** with **--network** that is set to **none** or **container:**_id_.
+Set custom DNS servers. Invalid if using **\-\-dns** with **\-\-network** that is set to **none** or **container:**_id_.
This option can be used to override the DNS
configuration passed to the container. Typically this is necessary when the
host DNS configuration is invalid for the container (e.g., **127.0.0.1**). When this
-is the case the **--dns** flags is necessary for every run.
+is the case the **\-\-dns** flags is necessary for every run.
The special value **none** can be specified to disable creation of _/etc/resolv.conf_ in the container by Podman.
The _/etc/resolv.conf_ file in the image will be used without changes.
-#### **--dns-opt**=*option*
+#### **\-\-dns-opt**=*option*
-Set custom DNS options. Invalid if using **--dns-opt** with **--network** that is set to **none** or **container:**_id_.
+Set custom DNS options. Invalid if using **\-\-dns-opt** with **\-\-network** that is set to **none** or **container:**_id_.
-#### **--dns-search**=*domain*
+#### **\-\-dns-search**=*domain*
-Set custom DNS search domains. Invalid if using **--dns-search** and **--network** that is set to **none** or **container:**_id_.
-Use **--dns-search=.** if you don't wish to set the search domain.
+Set custom DNS search domains. Invalid if using **\-\-dns-search** and **\-\-network** that is set to **none** or **container:**_id_.
+Use **\-\-dns-search=.** if you don't wish to set the search domain.
-#### **--entrypoint**=*"command"* | *'["command", "arg1", ...]'*
+#### **\-\-entrypoint**=*"command"* | *'["command", "arg1", ...]'*
Overwrite the default ENTRYPOINT of the image.
@@ -365,12 +365,12 @@ default nature or behavior, so that when you set an ENTRYPOINT you can run the
container as if it were that binary, complete with default options, and you can
pass in more options via the COMMAND. But, sometimes an operator may want to run
something else inside the container, so you can override the default ENTRYPOINT
-at runtime by using a **--entrypoint** and a string to specify the new
+at runtime by using a **\-\-entrypoint** and a string to specify the new
ENTRYPOINT.
You need to specify multi option commands in the form of a json string.
-#### **--env**, **-e**=*env*
+#### **\-\-env**, **-e**=*env*
Set environment variables.
@@ -378,37 +378,37 @@ This option allows arbitrary environment variables that are available for the pr
See [**Environment**](#environment) note below for precedence and examples.
-#### **--env-host**=**true**|**false**
+#### **\-\-env-host**=**true**|**false**
Use host environment inside of the container. See **Environment** note below for precedence. (This option is not available with the remote Podman client)
-#### **--env-file**=*file*
+#### **\-\-env-file**=*file*
Read in a line delimited file of environment variables. See **Environment** note below for precedence.
-#### **--expose**=*port*
+#### **\-\-expose**=*port*
-Expose a port, or a range of ports (e.g. **--expose=3300-3310**) to set up port redirection
+Expose a port, or a range of ports (e.g. **\-\-expose=3300-3310**) to set up port redirection
on the host system.
-#### **--gidmap**=*container_gid*:*host_gid*:*amount*
+#### **\-\-gidmap**=*container_gid*:*host_gid*:*amount*
-Run the container in a new user namespace using the supplied mapping. This option conflicts with the **--userns** and **--subgidname** flags.
+Run the container in a new user namespace using the supplied mapping. This option conflicts with the **\-\-userns** and **\-\-subgidname** flags.
This option can be passed several times to map different ranges. If calling **podman run** as an unprivileged user, the user needs to have the right to use the mapping. See **subuid**(5).
-The example maps gids **0-1999** in the container to the gids **30000-31999** on the host: **--gidmap=0:30000:2000**.
+The example maps gids **0-1999** in the container to the gids **30000-31999** on the host: **\-\-gidmap=0:30000:2000**.
-**Important note:** The new user namespace mapping based on **--gidmap** is based on the initial mapping made in the _/etc/subgid_ file.
+**Important note:** The new user namespace mapping based on **\-\-gidmap** is based on the initial mapping made in the _/etc/subgid_ file.
Assuming there is a _/etc/subgid_ mapping **groupname:100000:65536**, then **groupname** is initially mapped to a namespace starting with
-gid **100000** for **65536** ids. From here the **--gidmap** mapping to the new namespace starts from **0** again, but is based on the initial mapping.
-Meaning **groupname** is initially mapped to gid **100000** which is referenced as **0** in the following **--gidmap** mapping. In terms of the example
+gid **100000** for **65536** ids. From here the **\-\-gidmap** mapping to the new namespace starts from **0** again, but is based on the initial mapping.
+Meaning **groupname** is initially mapped to gid **100000** which is referenced as **0** in the following **\-\-gidmap** mapping. In terms of the example
above: The group **groupname** is mapped to group **100000** of the initial namespace then the
**30000**st id of this namespace (which is gid 130000 in this namespace) is mapped to container namespace group id **0**. (groupname -> 100000 / 30000 -> 0)
-#### **--group-add**=*group*
+#### **\-\-group-add**=*group*
Add additional groups to run as
-#### **--health-cmd**=*"command"* | *'["command", "arg1", ...]'*
+#### **\-\-health-cmd**=*"command"* | *'["command", "arg1", ...]'*
Set or alter a healthcheck command for a container. The command is a command to be executed inside your
container that determines your container health. The command is required for other healthcheck options
@@ -417,35 +417,35 @@ to be applied. A value of **none** disables existing healthchecks.
Multiple options can be passed in the form of a JSON array; otherwise, the command will be interpreted
as an argument to **/bin/sh -c**.
-#### **--health-interval**=*interval*
+#### **\-\-health-interval**=*interval*
Set an interval for the healthchecks. An _interval_ of **disable** results in no automatic timer setup. The default is **30s**.
-#### **--health-retries**=*retries*
+#### **\-\-health-retries**=*retries*
The number of retries allowed before a healthcheck is considered to be unhealthy. The default value is **3**.
-#### **--health-start-period**=*period*
+#### **\-\-health-start-period**=*period*
The initialization time needed for a container to bootstrap. The value can be expressed in time format like
**2m3s**. The default value is **0s**.
-#### **--health-timeout**=*timeout*
+#### **\-\-health-timeout**=*timeout*
The maximum time allowed to complete the healthcheck before an interval is considered failed. Like start-period, the
value can be expressed in a time format such as **1m22s**. The default value is **30s**.
-#### **--help**
+#### **\-\-help**
Print usage statement
-#### **--hostname**=*name*, **-h**
+#### **\-\-hostname**=*name*, **-h**
Container host name
Sets the container host name that is available inside the container. Can only be used with a private UTS namespace `--uts=private` (default). If `--pod` is specified and the pod shares the UTS namespace (default) the pod's hostname will be used.
-#### **--http-proxy**=**true**|**false**
+#### **\-\-http-proxy**=**true**|**false**
By default proxy environment variables are passed into the container if set
for the Podman process. This can be disabled by setting the value to **false**.
@@ -455,12 +455,12 @@ those. This option is only needed when the host system must use a proxy but
the container should not use any proxy. Proxy environment variables specified
for the container in any other way will override the values that would have
been passed through from the host. (Other ways to specify the proxy for the
-container include passing the values with the **--env** flag, or hard coding the
+container include passing the values with the **\-\-env** flag, or hard coding the
proxy environment at container build time.) (This option is not available with the remote Podman client)
Defaults to **true**.
-#### **--image-volume**, **builtin-volume**=**bind**|**tmpfs**|**ignore**
+#### **\-\-image-volume**, **builtin-volume**=**bind**|**tmpfs**|**ignore**
Tells Podman how to handle the builtin image volumes. Default is **bind**.
@@ -469,30 +469,30 @@ Tells Podman how to handle the builtin image volumes. Default is **bind**.
content that disappears when the container is stopped.
- **ignore**: All volumes are just ignored and no action is taken.
-#### **--init**
+#### **\-\-init**
Run an init inside the container that forwards signals and reaps processes.
-#### **--init-path**=*path*
+#### **\-\-init-path**=*path*
Path to the container-init binary.
-#### **--interactive**, **-i**=**true**|**false**
+#### **\-\-interactive**, **-i**=**true**|**false**
When set to **true**, keep stdin open even if not attached. The default is **false**.
-#### **--ip6**=*ip*
+#### **\-\-ip6**=*ip*
Not implemented.
-#### **--ip**=*ip*
+#### **\-\-ip**=*ip*
Specify a static IP address for the container, for example **10.88.64.128**.
This option can only be used if the container is joined to only a single network - i.e., `--network=_network-name_` is used at most once
and if the container is not joining another container's network namespace via `--network=container:_id_`.
The address must be within the CNI network's IP address pool (default **10.88.0.0/16**).
-#### **--ipc**=*mode*
+#### **\-\-ipc**=*mode*
Set the IPC namespace mode for a container. The default is to create
a private IPC namespace.
@@ -501,7 +501,7 @@ a private IPC namespace.
- **host**: use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.
- **ns:**_path_: path to an IPC namespace to join.
-#### **--kernel-memory**=_number_[_unit_]
+#### **\-\-kernel-memory**=_number_[_unit_]
Kernel memory limit. A _unit_ can be **b** (bytes), **k** (kilobytes), **m** (megabytes), or **g** (gigabytes).
@@ -511,40 +511,40 @@ is not limited. If you specify a limit, it may be rounded up to a multiple
of the operating system's page size and the value can be very large,
millions of trillions.
-#### **--label**, **-l**=*key*=*value*
+#### **\-\-label**, **-l**=*key*=*value*
Add metadata to a container.
-#### **--label-file**=*file*
+#### **\-\-label-file**=*file*
Read in a line-delimited file of labels.
-#### **--link-local-ip**=*ip*
+#### **\-\-link-local-ip**=*ip*
Not implemented.
-#### **--log-driver**="*driver*"
+#### **\-\-log-driver**="*driver*"
Logging driver for the container. Currently available options are **k8s-file**, **journald**, and **none**, with **json-file** aliased to **k8s-file** for scripting compatibility.
-#### **--log-opt**=*name*=*value*
+#### **\-\-log-opt**=*name*=*value*
Logging driver specific options.
Set custom logging configuration. The following *name*s are supported:
**path**: specify a path to the log file
- (e.g. **--log-opt path=/var/log/container/mycontainer.json**);
+ (e.g. **\-\-log-opt path=/var/log/container/mycontainer.json**);
**max-size**: specify a max size of the log file
- (e.g. **--log-opt max-size=10mb**);
+ (e.g. **\-\-log-opt max-size=10mb**);
**tag**: specify a custom log tag for the container
- (e.g. **--log-opt tag="{{.ImageName}}"**.
+ (e.g. **\-\-log-opt tag="{{.ImageName}}"**.
This option is currently supported only by the **journald** log driver.
-#### **--mac-address**=*address*
+#### **\-\-mac-address**=*address*
Container MAC address (e.g. **92:d0:c6:0a:29:33**).
@@ -552,7 +552,7 @@ Remember that the MAC address in an Ethernet network must be unique.
The IPv6 link-local address will be based on the device's MAC address
according to RFC4862.
-#### **--memory**, **-m**=_number_[_unit_]
+#### **\-\-memory**, **-m**=_number_[_unit_]
Memory limit. A _unit_ can be **b** (bytes), **k** (kilobytes), **m** (megabytes), or **g** (gigabytes).
@@ -562,33 +562,33 @@ RAM. If a limit of 0 is specified (not using **-m**), the container's memory is
not limited. The actual limit may be rounded up to a multiple of the operating
system's page size (the value would be very large, that's millions of trillions).
-#### **--memory-reservation**=_number_[_unit_]
+#### **\-\-memory-reservation**=_number_[_unit_]
Memory soft limit. A _unit_ can be **b** (bytes), **k** (kilobytes), **m** (megabytes), or **g** (gigabytes).
After setting memory reservation, when the system detects memory contention
or low memory, containers are forced to restrict their consumption to their
-reservation. So you should always set the value below **--memory**, otherwise the
+reservation. So you should always set the value below **\-\-memory**, otherwise the
hard limit will take precedence. By default, memory reservation will be the same
as memory limit.
-#### **--memory-swap**=_number_[_unit_]
+#### **\-\-memory-swap**=_number_[_unit_]
A limit value equal to memory plus swap.
A _unit_ can be **b** (bytes), **k** (kilobytes), **m** (megabytes), or **g** (gigabytes).
-Must be used with the **-m** (**--memory**) flag.
+Must be used with the **-m** (**\-\-memory**) flag.
The argument value should always be larger than that of
- **-m** (**--memory**) By default, it is set to double
-the value of **--memory**.
+ **-m** (**\-\-memory**) By default, it is set to double
+the value of **\-\-memory**.
Set _number_ to **-1** to enable unlimited swap.
-#### **--memory-swappiness**=*number*
+#### **\-\-memory-swappiness**=*number*
Tune a container's memory swappiness behavior. Accepts an integer between *0* and *100*.
-#### **--mount**=*type=TYPE,TYPE-SPECIFIC-OPTION[,...]*
+#### **\-\-mount**=*type=TYPE,TYPE-SPECIFIC-OPTION[,...]*
Attach a filesystem mount to the container
@@ -644,7 +644,7 @@ Current supported mount TYPEs are **bind**, **volume**, **image**, **tmpfs** and
· notmpcopyup: Disable copying files from the image to the tmpfs.
-#### **--name**=*name*
+#### **\-\-name**=*name*
Assign a name to the container.
@@ -655,13 +655,13 @@ The operator can identify a container in three ways:
- Name (“jonah”).
Podman generates a UUID for each container, and if a name is not assigned
-to the container with **--name** then it will generate a random
+to the container with **\-\-name** then it will generate a random
string name. The name is useful any place you need to identify a container.
This works for both background and foreground containers.
-#### **--network**=*mode*, **--net**
+#### **\-\-network**=*mode*, **\-\-net**
-Set the network mode for the container. Invalid if using **--dns**, **--dns-opt**, or **--dns-search** with **--network** that is set to **none** or **container:**_id_. If used together with **--pod**, the container will not join the pods network namespace.
+Set the network mode for the container. Invalid if using **\-\-dns**, **\-\-dns-opt**, or **\-\-dns-search** with **\-\-network** that is set to **none** or **container:**_id_. If used together with **\-\-pod**, the container will not join the pods network namespace.
Valid _mode_ values are:
@@ -684,34 +684,34 @@ Valid _mode_ values are:
- **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
- **port_handler=slirp4netns**: Use the slirp4netns port forwarding.
-#### **--network-alias**=*alias*
+#### **\-\-network-alias**=*alias*
Add network-scoped alias for the container
-#### **--no-healthcheck**=*true|false*
+#### **\-\-no-healthcheck**=*true|false*
Disable any defined healthchecks for container.
-#### **--no-hosts**=**true**|**false**
+#### **\-\-no-hosts**=**true**|**false**
Do not create _/etc/hosts_ for the container.
-By default, Podman will manage _/etc/hosts_, adding the container's own IP address and any hosts from **--add-host**.
-#### **--no-hosts** disables this, and the image's _/etc/hosts_ will be preserved unmodified.
-This option conflicts with **--add-host**.
+By default, Podman will manage _/etc/hosts_, adding the container's own IP address and any hosts from **\-\-add-host**.
+#### **\-\-no-hosts** disables this, and the image's _/etc/hosts_ will be preserved unmodified.
+This option conflicts with **\-\-add-host**.
-#### **--oom-kill-disable**=**true**|**false**
+#### **\-\-oom-kill-disable**=**true**|**false**
Whether to disable OOM Killer for the container or not.
-#### **--oom-score-adj**=*num*
+#### **\-\-oom-score-adj**=*num*
Tune the host's OOM preferences for containers (accepts values from **-1000** to **1000**).
-#### **--os**=*OS*
+#### **\-\-os**=*OS*
Override the OS, defaults to hosts, of the image to be pulled. For example, `windows`.
-#### **--pid**=*mode*
+#### **\-\-pid**=*mode*
Set the PID namespace mode for the container.
The default is to create a private PID namespace for the container.
@@ -721,32 +721,32 @@ The default is to create a private PID namespace for the container.
- **private**: create a new namespace for the container (default)
- **ns:**_path_: join the specified PID namespace.
-#### **--pids-limit**=*limit*
+#### **\-\-pids-limit**=*limit*
Tune the container's pids limit. Set to **0** to have unlimited pids for the container. The default is **4096** on systems that support "pids" cgroup controller.
-#### **--platform**=*OS/ARCH*
+#### **\-\-platform**=*OS/ARCH*
Specify the platform for selecting the image. (Conflicts with --arch and --os)
The `--platform` option can be used to override the current architecture and operating system.
-#### **--pod**=*name*
+#### **\-\-pod**=*name*
Run container in an existing pod. If you want Podman to make the pod for you, prefix the pod name with **new:**.
To make a pod with more granular options, use the **podman pod create** command before creating a container.
If a container is run with a pod, and the pod has an infra-container, the infra-container will be started before the container is.
-#### **--pod-id-file**=*path*
+#### **\-\-pod-id-file**=*path*
Run container in an existing pod and read the pod's ID from the specified file.
If a container is run within a pod, and the pod has an infra-container, the infra-container will be started before the container is.
-#### **--preserve-fds**=*N*
+#### **\-\-preserve-fds**=*N*
Pass down to the process N additional file descriptors (in addition to 0, 1, 2).
The total FDs will be 3+N.
-#### **--privileged**=**true**|**false**
+#### **\-\-privileged**=**true**|**false**
Give extended privileges to this container. The default is **false**.
@@ -761,7 +761,7 @@ points, Apparmor/SELinux separation, and Seccomp filters are all disabled.
Rootless containers cannot have more privileges than the account that launched them.
-#### **--publish**, **-p**=_ip_:_hostPort_:_containerPort_ | _ip_::_containerPort_ | _hostPort_:_containerPort_ | _containerPort_
+#### **\-\-publish**, **-p**=_ip_:_hostPort_:_containerPort_ | _ip_::_containerPort_ | _hostPort_:_containerPort_ | _containerPort_
Publish a container's port, or range of ports, to the host.
@@ -784,7 +784,7 @@ associated ports. If one container binds to a port, no other container can use t
within the pod while it is in use. Containers in the pod can also communicate over localhost
by having one container bind to localhost in the pod, and another connect to that port.
-#### **--publish-all**, **-P**=**true**|**false**
+#### **\-\-publish-all**, **-P**=**true**|**false**
Publish all exposed ports to random ports on the host interfaces. The default is **false**.
@@ -797,7 +797,7 @@ When using this option, Podman will bind any exposed port to a random port on th
within an ephemeral port range defined by */proc/sys/net/ipv4/ip_local_port_range*.
To find the mapping between the host ports and the exposed ports, use **podman port**.
-#### **--pull**=**always**|**missing**|**never**
+#### **\-\-pull**=**always**|**missing**|**never**
Pull image before running. The default is **missing**.
@@ -805,27 +805,27 @@ Pull image before running. The default is **missing**.
- **always**: Pull the image from the first registry it is found in as listed in registries.conf. Raise an error if not found in the registries, even if the image is present locally.
- **never**: do not pull the image from the registry, use only the local version. Raise an error if the image is not present locally.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Suppress output information when pulling images
-#### **--read-only**=**true**|**false**
+#### **\-\-read-only**=**true**|**false**
Mount the container's root filesystem as read only.
By default a container will have its root filesystem writable allowing processes
-to write files anywhere. By specifying the **--read-only** flag, the container will have
+to write files anywhere. By specifying the **\-\-read-only** flag, the container will have
its root filesystem mounted as read only prohibiting any writes.
-#### **--read-only-tmpfs**=**true**|**false**
+#### **\-\-read-only-tmpfs**=**true**|**false**
-If container is running in **--read-only** mode, then mount a read-write tmpfs on _/run_, _/tmp_, and _/var/tmp_. The default is **true**.
+If container is running in **\-\-read-only** mode, then mount a read-write tmpfs on _/run_, _/tmp_, and _/var/tmp_. The default is **true**.
-#### **--replace**=**true**|**false**
+#### **\-\-replace**=**true**|**false**
If another container with the same name already exists, replace and remove it. The default is **false**.
-#### **--restart**=*policy*
+#### **\-\-restart**=*policy*
Restart policy to follow when containers exit.
Restart policy will not take effect if a container is stopped via the **podman kill** or **podman stop** commands.
@@ -841,16 +841,16 @@ Please note that restart will not restart containers after a system reboot.
If this functionality is required in your environment, you can invoke Podman from a **systemd.unit**(5) file, or create an init script for whichever init system is in use.
To generate systemd unit files, please see **podman generate systemd**.
-#### **--rm**=**true**|**false**
+#### **\-\-rm**=**true**|**false**
Automatically remove the container when it exits. The default is **false**.
-#### **--rmi**=*true|false*
+#### **\-\-rmi**=*true|false*
After exit of the container, remove the image unless another
container is using it. The default is *false*.
-#### **--rootfs**
+#### **\-\-rootfs**
If specified, the first argument refers to an exploded container on the file system.
@@ -860,7 +860,7 @@ of the container is assumed to be managed externally.
Note: On **SELinux** systems, the rootfs needs the correct label, which is by default
**unconfined_u:object_r:container_file_t**.
-#### **--sdnotify**=**container**|**conmon**|**ignore**
+#### **\-\-sdnotify**=**container**|**conmon**|**ignore**
Determines how to use the NOTIFY_SOCKET, as passed with systemd and Type=notify.
@@ -871,13 +871,13 @@ has started. The socket is never passed to the runtime or the container.
The **ignore** option removes NOTIFY_SOCKET from the environment for itself and child processes,
for the case where some other process above Podman uses NOTIFY_SOCKET and Podman should not use it.
-#### **--seccomp-policy**=*policy*
+#### **\-\-seccomp-policy**=*policy*
-Specify the policy to select the seccomp profile. If set to *image*, Podman will look for a "io.podman.seccomp.profile" label in the container-image config and use its value as a seccomp profile. Otherwise, Podman will follow the *default* policy by applying the default profile unless specified otherwise via *--security-opt seccomp* as described below.
+Specify the policy to select the seccomp profile. If set to *image*, Podman will look for a "io.containers.seccomp.profile" label in the container-image config and use its value as a seccomp profile. Otherwise, Podman will follow the *default* policy by applying the default profile unless specified otherwise via *--security-opt seccomp* as described below.
Note that this feature is experimental and may change in the future.
-#### **--secret**=*secret*
+#### **\-\-secret**=*secret*
Give the container access to a secret. Can be specified multiple times.
@@ -892,7 +892,7 @@ secret value will still remain.
Secrets are managed using the `podman secret` command
-#### **--security-opt**=*option*
+#### **\-\-security-opt**=*option*
Security Options
@@ -917,38 +917,38 @@ Security Options
Note: Labeling can be disabled for all containers by setting **label=false** in the **containers.conf**(5) file.
-#### **--shm-size**=_number_[_unit_]
+#### **\-\-shm-size**=_number_[_unit_]
Size of _/dev/shm_. A _unit_ can be **b** (bytes), **k** (kilobytes), **m** (megabytes), or **g** (gigabytes).
If you omit the unit, the system uses bytes. If you omit the size entirely, the default is **64m**.
When _size_ is **0**, there is no limit on the amount of memory used for IPC by the container.
-#### **--sig-proxy**=**true**|**false**
+#### **\-\-sig-proxy**=**true**|**false**
Sets whether the signals sent to the **podman run** command are proxied to the container process. SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is **true**.
-#### **--stop-signal**=*signal*
+#### **\-\-stop-signal**=*signal*
Signal to stop a container. Default is **SIGTERM**.
-#### **--stop-timeout**=*seconds*
+#### **\-\-stop-timeout**=*seconds*
Timeout to stop a container. Default is **10**.
Remote connections use local containers.conf for defaults
-#### **--subgidname**=*name*
+#### **\-\-subgidname**=*name*
Run the container in a new user namespace using the map with _name_ in the _/etc/subgid_ file.
If calling **podman run** as an unprivileged user, the user needs to have the right to use the mapping. See **subgid**(5).
-This flag conflicts with **--userns** and **--gidmap**.
+This flag conflicts with **\-\-userns** and **\-\-gidmap**.
-#### **--subuidname**=*name*
+#### **\-\-subuidname**=*name*
Run the container in a new user namespace using the map with _name_ in the _/etc/subuid_ file.
If calling **podman run** as an unprivileged user, the user needs to have the right to use the mapping. See **subuid**(5).
-This flag conflicts with **--userns** and **--uidmap**.
+This flag conflicts with **\-\-userns** and **\-\-uidmap**.
-#### **--sysctl**=_name_=_value_
+#### **\-\-sysctl**=_name_=_value_
Configure namespaced kernel parameters at runtime.
@@ -964,15 +964,15 @@ For the IPC namespace, the following sysctls are allowed:
- kernel.shm_rmid_forced
- Sysctls beginning with fs.mqueue.\*
-Note: if you use the **--ipc=host** option, the above sysctls will not be allowed.
+Note: if you use the **\-\-ipc=host** option, the above sysctls will not be allowed.
For the network namespace, the following sysctls are allowed:
- Sysctls beginning with net.\*
-Note: if you use the **--network=host** option, these sysctls will not be allowed.
+Note: if you use the **\-\-network=host** option, these sysctls will not be allowed.
-#### **--systemd**=**true**|**false**|**always**
+#### **\-\-systemd**=**true**|**false**|**always**
Run container in systemd mode. The default is **true**.
@@ -1001,7 +1001,7 @@ The **container_manage_cgroup** boolean must be enabled for this to be allowed o
setsebool -P container_manage_cgroup true
```
-#### **--tmpfs**=*fs*
+#### **\-\-tmpfs**=*fs*
Create a tmpfs mount.
@@ -1016,7 +1016,7 @@ options are the same as the Linux default mount flags. If you do not specify
any options, the systems uses the following options:
**rw,noexec,nosuid,nodev**.
-#### **--tty**, **-t**=**true**|**false**
+#### **\-\-tty**, **-t**=**true**|**false**
Allocate a pseudo-TTY. The default is **false**.
@@ -1030,39 +1030,39 @@ interactive shell. The default is **false**.
echo "asdf" | podman run --rm -i someimage /bin/cat
```
-#### **--tz**=*timezone*
+#### **\-\-tz**=*timezone*
Set timezone in container. This flag takes area-based timezones, GMT time, as well as `local`, which sets the timezone in the container to match the host machine. See `/usr/share/zoneinfo/` for valid timezones.
Remote connections use local containers.conf for defaults
-#### **--umask**=*umask*
+#### **\-\-umask**=*umask*
Set the umask inside the container. Defaults to `0022`.
Remote connections use local containers.conf for defaults
-#### **--uidmap**=*container_uid*:*host_uid*:*amount*
+#### **\-\-uidmap**=*container_uid*:*host_uid*:*amount*
Run the container in a new user namespace using the supplied mapping. This option conflicts
-with the **--userns** and **--subuidname** flags.
+with the **\-\-userns** and **\-\-subuidname** flags.
This option can be passed several times to map different ranges. If calling **podman run**
as an unprivileged user, the user needs to have the right to use the mapping. See **subuid**(5).
-The following example maps uids 0-1999 in the container to the uids 30000-31999 on the host: **--uidmap=0:30000:2000**.
+The following example maps uids 0-1999 in the container to the uids 30000-31999 on the host: **\-\-uidmap=0:30000:2000**.
-**Important note:** The new user namespace mapping based on **--uidmap** is based on the initial mapping made in the _/etc/subuid_ file.
+**Important note:** The new user namespace mapping based on **\-\-uidmap** is based on the initial mapping made in the _/etc/subuid_ file.
Assuming there is a _/etc/subuid_ mapping **username:100000:65536**, then **username** is initially mapped to a namespace starting with
-uid **100000** for **65536** ids. From here the **--uidmap** mapping to the new namespace starts from **0** again, but is based on the initial mapping.
-Meaning **username** is initially mapped to uid **100000** which is referenced as **0** in the following **--uidmap** mapping. In terms of the example
+uid **100000** for **65536** ids. From here the **\-\-uidmap** mapping to the new namespace starts from **0** again, but is based on the initial mapping.
+Meaning **username** is initially mapped to uid **100000** which is referenced as **0** in the following **\-\-uidmap** mapping. In terms of the example
above: The user **username** is mapped to user **100000** of the initial namespace then the
**30000**st id of this namespace (which is uid 130000 in this namespace) is mapped to container namespace user id **0**. (username -> 100000 / 30000 -> 0)
_Note_: A minimal mapping has to have at least container uid **0** mapped to the parent user namespace.
-#### **--ulimit**=*option*
+#### **\-\-ulimit**=*option*
Ulimit options. You can use **host** to copy the current configuration from the host.
-#### **--user**, **-u**=[_user_ | _user_:_group_ | _uid_ | _uid_:_gid_ | _user_:_gid_ | _uid_:_group_ ]
+#### **\-\-user**, **-u**=[_user_ | _user_:_group_ | _uid_ | _uid_:_gid_ | _user_:_gid_ | _uid_:_group_ ]
Sets the username or UID used and optionally the groupname or GID for the specified command.
@@ -1070,7 +1070,7 @@ Without this argument, the command will run as the user specified in the contain
When a user namespace is not in use, the UID and GID used within the container and on the host will match. When user namespaces are in use, however, the UID and GID in the container may correspond to another UID and GID on the host. In rootless containers, for example, a user namespace is always used, and root in the container will by default correspond to the UID and GID of the user invoking Podman.
-#### **--userns**=**auto**|**host**|**keep-id**|**container:**_id_|**ns:**_namespace_
+#### **\-\-userns**=**auto**|**host**|**keep-id**|**container:**_id_|**ns:**_namespace_
Set the user namespace mode for the container. It defaults to the **PODMAN_USERNS** environment variable. An empty value ("") means user namespaces are disabled unless an explicit mapping is set with they `--uidmapping` and `--gidmapping` options.
@@ -1084,9 +1084,9 @@ Set the user namespace mode for the container. It defaults to the **PODMAN_USERN
- **private**: create a new namespace for the container.
- **container**: join the user namespace of the specified container.
-This option is incompatible with **--gidmap**, **--uidmap**, **--subuidname** and **--subgidname**.
+This option is incompatible with **\-\-gidmap**, **\-\-uidmap**, **\-\-subuidname** and **\-\-subgidname**.
-#### **--uts**=*mode*
+#### **\-\-uts**=*mode*
Set the UTS namespace mode for the container. The following values are supported:
@@ -1095,10 +1095,10 @@ Set the UTS namespace mode for the container. The following values are supported
- **ns:[path]**: run the container in the given existing UTS namespace.
- **container:[container]**: join the UTS namespace of the specified container.
-#### **--variant**=*VARIANT*
+#### **\-\-variant**=*VARIANT*
Use _VARIANT_ instead of the default architecture variant of the container image. Some images can use multiple variants of the arm architectures, such as arm/v5 and arm/v7.
-#### **--volume**, **-v**[=*[[SOURCE-VOLUME|HOST-DIR:]CONTAINER-DIR[:OPTIONS]]*]
+#### **\-\-volume**, **-v**[=*[[SOURCE-VOLUME|HOST-DIR:]CONTAINER-DIR[:OPTIONS]]*]
Create a bind mount. If you specify _/HOST-DIR_:_/CONTAINER-DIR_, Podman
bind mounts _host-dir_ in the host to _CONTAINER-DIR_ in the Podman
@@ -1251,7 +1251,7 @@ will convert /foo into a shared mount point. Alternatively, one can directly
change propagation properties of source mount. Say, if _/_ is source mount for
_/foo_, then use **mount --make-shared /** to convert _/_ into a shared mount.
-#### **--volumes-from**[=*CONTAINER*[:*OPTIONS*]]
+#### **\-\-volumes-from**[=*CONTAINER*[:*OPTIONS*]]
Mount volumes from the specified container(s). Used to share volumes between
containers. The *options* is a comma delimited list with the following available elements:
@@ -1284,7 +1284,7 @@ If the location of the volume from the source container overlaps with
data residing on a target container, then the volume hides
that data on the target.
-#### **--workdir**, **-w**=*dir*
+#### **\-\-workdir**, **-w**=*dir*
Working directory inside the container.
@@ -1329,7 +1329,7 @@ During container image development, containers often need to write to the image
content. Installing packages into _/usr_, for example. In production,
applications seldom need to write to the image. Container applications write
to volumes if they need to write to file systems at all. Applications can be
-made more secure by running them in read-only mode using the **--read-only** switch.
+made more secure by running them in read-only mode using the **\-\-read-only** switch.
This protects the containers image from modification. Read only containers may
still need to write temporary data. The best way to handle this is to mount
tmpfs directories on _/run_ and _/tmp_.
@@ -1379,7 +1379,7 @@ $ podman run -a stdin -a stdout -i -t fedora /bin/bash
Using **shm_server.c** available here: https://www.cs.cf.ac.uk/Dave/C/node27.html
-Testing **--ipc=host** mode:
+Testing **\-\-ipc=host** mode:
Host shows a shared memory segment with 7 pids attached, happens to be from httpd:
@@ -1400,7 +1400,7 @@ $ podman run -it shm ipcs -m
key shmid owner perms bytes nattch status
```
-Run a container with the new **--ipc=host** option, and it now sees the shared memory segment from the host httpd:
+Run a container with the new **\-\-ipc=host** option, and it now sees the shared memory segment from the host httpd:
```
$ podman run -it --ipc=host shm ipcs -m
@@ -1409,7 +1409,7 @@ $ podman run -it --ipc=host shm ipcs -m
key shmid owner perms bytes nattch status
0x01128e25 0 root 600 1000 7
```
-Testing **--ipc=container:**_id_ mode:
+Testing **\-\-ipc=container:**_id_ mode:
Start a container with a program to create a shared memory segment:
```
@@ -1429,7 +1429,7 @@ $ podman run shm ipcs -m
key shmid owner perms bytes nattch status
```
-Create a 3rd container using the **--ipc=container:**_id_ option, now it shows the shared memory segment from the first:
+Create a 3rd container using the **\-\-ipc=container:**_id_ option, now it shows the shared memory segment from the first:
```
$ podman run -it --ipc=container:ed735b2264ac shm ipcs -m
@@ -1468,7 +1468,7 @@ $ podman run -v /var/cache/dnf:/var/cache/dnf:O -ti fedora dnf -y update
$ podman run -d -e MYSQL_ROOT_PASSWORD=root --user mysql --userns=keep-id -v ~/data:/var/lib/mysql:z,U mariadb
```
-Using **--mount** flags to mount a host directory as a container folder, specify
+Using **\-\-mount** flags to mount a host directory as a container folder, specify
the absolute path to the directory or the volume name, and the absolute path
within the container directory:
@@ -1497,7 +1497,7 @@ changes will also be reflected on the host in _/var/db_.
### Using alternative security labeling
You can override the default labeling scheme for each container by specifying
-the **--security-opt** flag. For example, you can specify the MCS/MLS level, a
+the **\-\-security-opt** flag. For example, you can specify the MCS/MLS level, a
requirement for MLS systems. Specifying the level in the following command
allows you to share the same content between containers.
@@ -1512,7 +1512,7 @@ $ podman run --security-opt label=level:TopSecret -i -t rhel7 bash
```
To disable the security labeling for this container versus running with the
-#### **--permissive** flag, use the following command:
+#### **\-\-permissive** flag, use the following command:
```
$ podman run --security-opt label=disable -i -t fedora bash
@@ -1530,7 +1530,7 @@ $ podman run --security-opt label=type:svirt_apache_t -i -t centos bash
Note you would have to write policy defining a **svirt_apache_t** type.
To mask additional specific paths in the container, specify the paths
-separated by a colon using the **mask** option with the **--security-opt**
+separated by a colon using the **mask** option with the **\-\-security-opt**
flag.
```
@@ -1552,7 +1552,7 @@ $ podman run --security-opt unmask=/foo/bar:/sys/firmware fedora bash
### Setting device weight
If you want to set _/dev/sda_ device weight to **200**, you can specify the device
-weight by **--blkio-weight-device** flag. Use the following command:
+weight by **\-\-blkio-weight-device** flag. Use the following command:
```
$ podman run -it --blkio-weight-device "/dev/sda:200" ubuntu
@@ -1567,7 +1567,7 @@ asdf
### Setting Namespaced Kernel Parameters (Sysctls)
-The **--sysctl** sets namespaced kernel parameters (sysctls) in the
+The **\-\-sysctl** sets namespaced kernel parameters (sysctls) in the
container. For example, to turn on IP forwarding in the containers
network namespace, run this command:
@@ -1579,7 +1579,7 @@ Note that not all sysctls are namespaced. Podman does not support changing sysct
inside of a container that also modify the host system. As the kernel
evolves we expect to see more sysctls become namespaced.
-See the definition of the **--sysctl** option above for the current list of
+See the definition of the **\-\-sysctl** option above for the current list of
supported sysctls.
### Set UID/GID mapping in a new user namespace
@@ -1622,7 +1622,7 @@ In order for users to run rootless, there must be an entry for their username in
Rootless Podman works better if the fuse-overlayfs and slirp4netns packages are installed.
The **fuse-overlay** package provides a userspace overlay storage driver, otherwise users need to use
the **vfs** storage driver, which is diskspace expensive and does not perform well. slirp4netns is
-required for VPN, without it containers need to be run with the **--network=host** flag.
+required for VPN, without it containers need to be run with the **\-\-network=host** flag.
## ENVIRONMENT
@@ -1630,10 +1630,10 @@ Environment variables within containers can be set using multiple different opti
in the following order of precedence (later entries override earlier entries):
- Container image: Any environment variables specified in the container image.
-- **--http-proxy**: By default, several environment variables will be passed in from the host, such as **http_proxy** and **no_proxy**. See **--http-proxy** for details.
-- **--env-host**: Host environment of the process executing Podman is added.
-- **--env-file**: Any environment variables specified via env-files. If multiple files specified, then they override each other in order of entry.
-- **--env**: Any environment variables specified will override previous settings.
+- **\-\-http-proxy**: By default, several environment variables will be passed in from the host, such as **http_proxy** and **no_proxy**. See **\-\-http-proxy** for details.
+- **\-\-env-host**: Host environment of the process executing Podman is added.
+- **\-\-env-file**: Any environment variables specified via env-files. If multiple files specified, then they override each other in order of entry.
+- **\-\-env**: Any environment variables specified will override previous settings.
Run containers and set the environment ending with a __*__ and a __*****__:
diff --git a/docs/source/markdown/podman-save.1.md b/docs/source/markdown/podman-save.1.md
index fb79cfd2a..e6f6e993b 100644
--- a/docs/source/markdown/podman-save.1.md
+++ b/docs/source/markdown/podman-save.1.md
@@ -24,16 +24,16 @@ Note: `:` is a restricted character and cannot be part of the file name.
## OPTIONS
-#### **--compress**
+#### **\-\-compress**
Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source)
Note: This flag can only be set when using the **dir** transport i.e --format=oci-dir or --format-docker-dir
-#### **--output**, **-o**=*file*
+#### **\-\-output**, **-o**=*file*
Write to a file, default is STDOUT
-#### **--format**=*format*
+#### **\-\-format**=*format*
Save image to **oci-archive, oci-dir** (directory with oci manifest type), or **docker-dir** (directory with v2s2 manifest type)
```
@@ -42,15 +42,15 @@ Save image to **oci-archive, oci-dir** (directory with oci manifest type), or **
--format docker-dir
```
-#### **--multi-image-archive**, **-m**
+#### **\-\-multi-image-archive**, **-m**
Allow for creating archives with more than one image. Additional names will be interpreted as images instead of tags. Only supported for **docker-archive**.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Suppress the output
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-search.1.md b/docs/source/markdown/podman-search.1.md
index ec610d3ba..23aa6acd1 100644
--- a/docs/source/markdown/podman-search.1.md
+++ b/docs/source/markdown/podman-search.1.md
@@ -11,9 +11,9 @@ podman\-search - Search a registry for an image
The user can specify which registry to search by prefixing the registry in the search term
(example **registry.fedoraproject.org/fedora**), default is the registries in the
**registries.search** table in the config file - **/etc/containers/registries.conf**.
-The default number of results is 25. The number of results can be limited using the **--limit** flag.
+The default number of results is 25. The number of results can be limited using the **\-\-limit** flag.
If more than one registry is being searched, the limit will be applied to each registry. The output can be filtered
-using the **--filter** flag. To get all available images in a registry without a specific
+using the **\-\-filter** flag. To get all available images in a registry without a specific
search term, the user can just enter the registry name with a trailing "/" (example **registry.fedoraproject.org/**).
Note, searching without a search term will only work for registries that implement the v2 API.
@@ -25,14 +25,14 @@ Note, searching without a search term will only work for registries that impleme
## OPTIONS
-#### **--authfile**=*path*
+#### **\-\-authfile**=*path*
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
environment variable. `export REGISTRY_AUTH_FILE=path`
-#### **--filter**, **-f**=*filter*
+#### **\-\-filter**, **-f**=*filter*
Filter output based on conditions provided (default [])
@@ -42,7 +42,7 @@ Supported filters are:
* is-automated (boolean - true | false) - is the image automated or not
* is-official (boolean - true | false) - is the image official or not
-#### **--format**=*format*
+#### **\-\-format**=*format*
Change the output format to a Go template
@@ -60,7 +60,7 @@ Valid placeholders for the Go template are listed below:
Note: use .Tag only if the --list-tags is set.
-#### **--limit**=*limit*
+#### **\-\-limit**=*limit*
Limit the number of results (default 25).
Note: The results from each registry will be limited to this value.
@@ -68,24 +68,24 @@ Example if limit is 10 and two registries are being searched, the total
number of results will be 20, 10 from each (if there are at least 10 matches in each).
The order of the search results is the order in which the API endpoint returns the results.
-#### **--list-tags**
+#### **\-\-list-tags**
List the available tags in the repository for the specified image.
**Note:** --list-tags requires the search term to be a fully specified image name.
The result contains the Image name and its tag, one line for every tag associated with the image.
-#### **--no-trunc**
+#### **\-\-no-trunc**
Do not truncate the output
-#### **--tls-verify**=*true|false*
+#### **\-\-tls-verify**=*true|false*
Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true,
then TLS verification will be used. If set to false, then TLS verification will not be used if needed. If not specified,
default registries will be searched through (in /etc/containers/registries.conf), and TLS will be skipped if a default
registry is listed in the insecure registries.
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-secret-create.1.md b/docs/source/markdown/podman-secret-create.1.md
index af4dc1d97..ca92dd38e 100644
--- a/docs/source/markdown/podman-secret-create.1.md
+++ b/docs/source/markdown/podman-secret-create.1.md
@@ -20,11 +20,11 @@ Secrets will not be commited to an image with `podman commit`, and will not be i
## OPTIONS
-#### **--driver**=*driver*
+#### **\-\-driver**=*driver*
Specify the secret driver (default **file**, which is unencrypted).
-#### **--help**
+#### **\-\-help**
Print usage statement.
diff --git a/docs/source/markdown/podman-secret-inspect.1.md b/docs/source/markdown/podman-secret-inspect.1.md
index 383db8375..042cc25d9 100644
--- a/docs/source/markdown/podman-secret-inspect.1.md
+++ b/docs/source/markdown/podman-secret-inspect.1.md
@@ -15,11 +15,11 @@ Secrets can be queried individually by providing their full name or a unique par
## OPTIONS
-#### **--format**=*format*
+#### **\-\-format**=*format*
Format secret output using Go template.
-#### **--help**
+#### **\-\-help**
Print usage statement.
diff --git a/docs/source/markdown/podman-secret-ls.1.md b/docs/source/markdown/podman-secret-ls.1.md
index 688784e05..57a606738 100644
--- a/docs/source/markdown/podman-secret-ls.1.md
+++ b/docs/source/markdown/podman-secret-ls.1.md
@@ -8,11 +8,11 @@ podman\-secret\-ls - List all available secrets
## DESCRIPTION
-Lists all the secrets that exist. The output can be formatted to a Go template using the **--format** option.
+Lists all the secrets that exist. The output can be formatted to a Go template using the **\-\-format** option.
## OPTIONS
-#### **--format**=*format*
+#### **\-\-format**=*format*
Format secret output using Go template.
diff --git a/docs/source/markdown/podman-secret-rm.1.md b/docs/source/markdown/podman-secret-rm.1.md
index c6f5079ba..72d6a1af4 100644
--- a/docs/source/markdown/podman-secret-rm.1.md
+++ b/docs/source/markdown/podman-secret-rm.1.md
@@ -18,11 +18,11 @@ the old secret value will still remain.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Remove all existing secrets.
-#### **--help**
+#### **\-\-help**
Print usage statement.
diff --git a/docs/source/markdown/podman-start.1.md b/docs/source/markdown/podman-start.1.md
index 600d3859a..1822eab34 100644
--- a/docs/source/markdown/podman-start.1.md
+++ b/docs/source/markdown/podman-start.1.md
@@ -16,25 +16,25 @@ attach to the container.
## OPTIONS
-#### **--attach**, **-a**
+#### **\-\-attach**, **-a**
Attach container's STDOUT and STDERR. The default is false. This option cannot be used when
starting multiple containers.
-#### **--detach-keys**=*sequence*
+#### **\-\-detach-keys**=*sequence*
Specify the key sequence for detaching a container. Format is a single character `[a-Z]` or one or more `ctrl-<value>` characters where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. Specifying "" will disable this feature. The default is *ctrl-p,ctrl-q*.
-#### **--interactive**, **-i**
+#### **\-\-interactive**, **-i**
Attach container's STDIN. The default is false.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--sig-proxy**=*true|false*
+#### **\-\-sig-proxy**=*true|false*
Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true* when attaching, *false* otherwise.
diff --git a/docs/source/markdown/podman-stats.1.md b/docs/source/markdown/podman-stats.1.md
index 300106796..a4f4f68a3 100644
--- a/docs/source/markdown/podman-stats.1.md
+++ b/docs/source/markdown/podman-stats.1.md
@@ -20,24 +20,24 @@ about their networking usage.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Show all containers. Only running containers are shown by default
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--no-reset**
+#### **\-\-no-reset**
Do not clear the terminal/screen in between reporting intervals
-#### **--no-stream**
+#### **\-\-no-stream**
Disable streaming stats and only pull the first result, default setting is false
-#### **--format**=*template*
+#### **\-\-format**=*template*
Pretty-print container statistics to JSON or using a Go template
diff --git a/docs/source/markdown/podman-stop.1.md b/docs/source/markdown/podman-stop.1.md
index a1e9675c1..bcb928e57 100644
--- a/docs/source/markdown/podman-stop.1.md
+++ b/docs/source/markdown/podman-stop.1.md
@@ -9,7 +9,7 @@ podman\-stop - Stop one or more running containers
**podman container stop** [*options*] *container* ...
## DESCRIPTION
-Stops one or more containers. You may use container IDs or names as input. The **--time** switch
+Stops one or more containers. You may use container IDs or names as input. The **\-\-time** switch
allows you to specify the number of seconds to wait before forcibly stopping the container after the stop command
is issued to the container. The default is 10 seconds. By default, containers are stopped with SIGTERM
and then SIGKILL after the timeout. The SIGTERM default can be overridden by the image used to create the
@@ -17,26 +17,26 @@ container and also via command line when creating the container.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Stop all running containers. This does not include paused containers.
-#### **--cidfile**
+#### **\-\-cidfile**
Read container ID from the specified file and remove the container. Can be specified multiple times.
-#### **--ignore**, **-i**
+#### **\-\-ignore**, **-i**
Ignore errors when specified containers are not in the container store. A user
might have decided to manually remove a container which would lead to a failure
during the ExecStop directive of a systemd service referencing that container.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
-#### **--time**, **-t**=*time*
+#### **\-\-time**, **-t**=*time*
Time to wait before forcibly stopping the container
diff --git a/docs/source/markdown/podman-system-connection-add.1.md b/docs/source/markdown/podman-system-connection-add.1.md
index 32c16d6a1..5f5d2bc7d 100644
--- a/docs/source/markdown/podman-system-connection-add.1.md
+++ b/docs/source/markdown/podman-system-connection-add.1.md
@@ -15,21 +15,21 @@ The user will be prompted for the remote ssh login password or key file pass phr
## OPTIONS
-#### **--default**=*false*, **-d**
+#### **\-\-default**=*false*, **-d**
Make the new destination the default for this user.
-#### **--identity**=*path*
+#### **\-\-identity**=*path*
Path to ssh identity file. If the identity file has been encrypted, Podman prompts the user for the passphrase.
If no identity file is provided and no user is given, Podman defaults to the user running the podman command.
Podman prompts for the login password on the remote server.
-#### **--port**=*port*, **-p**
+#### **\-\-port**=*port*, **-p**
Port for ssh destination. The default value is `22`.
-#### **--socket-path**=*path*
+#### **\-\-socket-path**=*path*
Path to the Podman service unix domain socket on the ssh destination host
diff --git a/docs/source/markdown/podman-system-df.1.md b/docs/source/markdown/podman-system-df.1.md
index f3db2d020..98c8ad3ad 100644
--- a/docs/source/markdown/podman-system-df.1.md
+++ b/docs/source/markdown/podman-system-df.1.md
@@ -10,11 +10,11 @@ podman\-system\-df - Show podman disk usage
Show podman disk usage
## OPTIONS
-#### **--format**=*format*
+#### **\-\-format**=*format*
Pretty-print images using a Go template
-#### **--verbose**, **-v**
+#### **\-\-verbose**, **-v**
Show detailed information on space usage
## EXAMPLE
diff --git a/docs/source/markdown/podman-system-migrate.1.md b/docs/source/markdown/podman-system-migrate.1.md
index 913f119b0..45f2ce547 100644
--- a/docs/source/markdown/podman-system-migrate.1.md
+++ b/docs/source/markdown/podman-system-migrate.1.md
@@ -26,7 +26,7 @@ newly configured mappings.
## OPTIONS
-#### **--new-runtime**=*runtime*
+#### **\-\-new-runtime**=*runtime*
Set a new OCI runtime for all containers.
This can be used after a system upgrade which changes the default OCI runtime to move all containers to the new runtime.
diff --git a/docs/source/markdown/podman-system-prune.1.md b/docs/source/markdown/podman-system-prune.1.md
index 791503a2c..50a25bf6d 100644
--- a/docs/source/markdown/podman-system-prune.1.md
+++ b/docs/source/markdown/podman-system-prune.1.md
@@ -9,16 +9,16 @@ podman\-system\-prune - Remove all unused pod, container, image and volume data
## DESCRIPTION
**podman system prune** removes all unused containers (both dangling and unreferenced), pods and optionally, volumes from local storage.
-With the **--all** option, you can delete all unused images. Unused images are dangling images as well as any image that does not have any containers based on it.
+With the **\-\-all** option, you can delete all unused images. Unused images are dangling images as well as any image that does not have any containers based on it.
-By default, volumes are not removed to prevent important data from being deleted if there is currently no container using the volume. Use the **--volumes** flag when running the command to prune volumes as well.
+By default, volumes are not removed to prevent important data from being deleted if there is currently no container using the volume. Use the **\-\-volumes** flag when running the command to prune volumes as well.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Recursively remove all unused pod, container, image and volume data (Maximum 50 iterations.)
-#### **--filter**=*filters*
+#### **\-\-filter**=*filters*
Provide filter values.
@@ -33,15 +33,15 @@ The until filter can be Unix timestamps, date formatted timestamps, or Go durati
The label filter accepts two formats. One is the label=... (label=_key_ or label=_key=value_), which removes containers and images with the specified labels. The other format is the label!=... (label!=_key_ or label!=_key=value_), which removes containers and images without the specified labels.
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Do not prompt for confirmation
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--volumes**
+#### **\-\-volumes**
Prune volumes currently unused by any container
diff --git a/docs/source/markdown/podman-system-reset.1.md b/docs/source/markdown/podman-system-reset.1.md
index 744f917df..9644d8d90 100644
--- a/docs/source/markdown/podman-system-reset.1.md
+++ b/docs/source/markdown/podman-system-reset.1.md
@@ -18,11 +18,11 @@ of the relevant configurations. If the administrator modified the configuration
`podman system reset` might not be able to clean up the previous storage.
## OPTIONS
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Do not prompt for confirmation
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-system-service.1.md b/docs/source/markdown/podman-system-service.1.md
index 93f18adf1..83ede074c 100644
--- a/docs/source/markdown/podman-system-service.1.md
+++ b/docs/source/markdown/podman-system-service.1.md
@@ -25,12 +25,12 @@ Note: The default systemd unit files (system and user) change the log-level opti
## OPTIONS
-#### **--time**, **-t**
+#### **\-\-time**, **-t**
The time until the session expires in _seconds_. The default is 5
seconds. A value of `0` means no timeout, therefore the session will not expire.
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement.
diff --git a/docs/source/markdown/podman-tag.1.md b/docs/source/markdown/podman-tag.1.md
index 7eab62028..70a09fc3c 100644
--- a/docs/source/markdown/podman-tag.1.md
+++ b/docs/source/markdown/podman-tag.1.md
@@ -16,7 +16,7 @@ provided, then podman will default to `latest` for both the *image* and the
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-top.1.md b/docs/source/markdown/podman-top.1.md
index 09e8f7423..1bfe0dccb 100644
--- a/docs/source/markdown/podman-top.1.md
+++ b/docs/source/markdown/podman-top.1.md
@@ -13,11 +13,11 @@ Display the running processes of the container. The *format-descriptors* are ps
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods.(This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman-unmount.1.md b/docs/source/markdown/podman-unmount.1.md
index 2832e5fdb..d09762d46 100644
--- a/docs/source/markdown/podman-unmount.1.md
+++ b/docs/source/markdown/podman-unmount.1.md
@@ -27,11 +27,11 @@ External containers are containers created in container/storage by other tools l
Buildah and CRI-O.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
All of the currently mounted containers will be unmounted.
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Force the unmounting of specified containers' root file system, even if other
processes have mounted it.
@@ -39,7 +39,7 @@ processes have mounted it.
Note: This could cause other processes that are using the file system to fail,
as the mount point could be removed without their knowledge.
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container.
If you use methods other than Podman to run containers such as CRI-O, the last
diff --git a/docs/source/markdown/podman-unpause.1.md b/docs/source/markdown/podman-unpause.1.md
index ae178647a..2c344236f 100644
--- a/docs/source/markdown/podman-unpause.1.md
+++ b/docs/source/markdown/podman-unpause.1.md
@@ -13,7 +13,7 @@ Unpauses the processes in one or more containers. You may use container IDs or
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Unpause all paused containers.
diff --git a/docs/source/markdown/podman-untag.1.md b/docs/source/markdown/podman-untag.1.md
index 70053c940..351faadbb 100644
--- a/docs/source/markdown/podman-untag.1.md
+++ b/docs/source/markdown/podman-untag.1.md
@@ -13,7 +13,7 @@ Remove one or more names from an image in the local storage. The image can be r
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-version.1.md b/docs/source/markdown/podman-version.1.md
index a54e66372..ba03c4809 100644
--- a/docs/source/markdown/podman-version.1.md
+++ b/docs/source/markdown/podman-version.1.md
@@ -12,11 +12,11 @@ OS, and Architecture.
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--format**, **-f**=*format*
+#### **\-\-format**, **-f**=*format*
Change output format to "json" or a Go template.
diff --git a/docs/source/markdown/podman-volume-create.1.md b/docs/source/markdown/podman-volume-create.1.md
index a06411000..093b978a7 100644
--- a/docs/source/markdown/podman-volume-create.1.md
+++ b/docs/source/markdown/podman-volume-create.1.md
@@ -10,24 +10,24 @@ podman\-volume\-create - Create a new volume
Creates an empty volume and prepares it to be used by containers. The volume
can be created with a specific name, if a name is not given a random name is
-generated. You can add metadata to the volume by using the **--label** flag and
-driver options can be set using the **--opt** flag.
+generated. You can add metadata to the volume by using the **\-\-label** flag and
+driver options can be set using the **\-\-opt** flag.
## OPTIONS
-#### **--driver**=*driver*
+#### **\-\-driver**=*driver*
Specify the volume driver name (default **local**). Setting this to a value other than **local** Podman will attempt to create the volume using a volume plugin with the given name. Such plugins must be defined in the **volume_plugins** section of the **containers.conf**(5) configuration file.
-#### **--help**
+#### **\-\-help**
Print usage statement
-#### **--label**=*label*, **-l**
+#### **\-\-label**=*label*, **-l**
Set metadata for a volume (e.g., --label mykey=value).
-#### **--opt**=*option*, **-o**
+#### **\-\-opt**=*option*, **-o**
Set driver specific options.
For the default driver, **local**, this allows a volume to be configured to mount a filesystem on the host.
diff --git a/docs/source/markdown/podman-volume-exists.1.md b/docs/source/markdown/podman-volume-exists.1.md
index ead806bd9..e75159d56 100644
--- a/docs/source/markdown/podman-volume-exists.1.md
+++ b/docs/source/markdown/podman-volume-exists.1.md
@@ -14,7 +14,7 @@ of `0` when the volume is found. A `1` will be returned otherwise. An exit code
## OPTIONS
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
diff --git a/docs/source/markdown/podman-volume-inspect.1.md b/docs/source/markdown/podman-volume-inspect.1.md
index ea0ee91b4..7273b817a 100644
--- a/docs/source/markdown/podman-volume-inspect.1.md
+++ b/docs/source/markdown/podman-volume-inspect.1.md
@@ -9,22 +9,22 @@ podman\-volume\-inspect - Get detailed information on one or more volumes
## DESCRIPTION
Display detailed information on one or more volumes. The output can be formatted using
-the **--format** flag and a Go template. To get detailed information about all the
-existing volumes, use the **--all** flag.
+the **\-\-format** flag and a Go template. To get detailed information about all the
+existing volumes, use the **\-\-all** flag.
Volumes can be queried individually by providing their full name or a unique partial name.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Inspect all volumes.
-#### **--format**=*format*, **-f**
+#### **\-\-format**=*format*, **-f**
Format volume output using Go template
-#### **--help**
+#### **\-\-help**
Print usage statement
diff --git a/docs/source/markdown/podman-volume-ls.1.md b/docs/source/markdown/podman-volume-ls.1.md
index 48853bdfd..5214980a3 100644
--- a/docs/source/markdown/podman-volume-ls.1.md
+++ b/docs/source/markdown/podman-volume-ls.1.md
@@ -8,25 +8,25 @@ podman\-volume\-ls - List all the available volumes
## DESCRIPTION
-Lists all the volumes that exist. The output can be filtered using the **--filter**
-flag and can be formatted to either JSON or a Go template using the **--format**
-flag. Use the **--quiet** flag to print only the volume names.
+Lists all the volumes that exist. The output can be filtered using the **\-\-filter**
+flag and can be formatted to either JSON or a Go template using the **\-\-format**
+flag. Use the **\-\-quiet** flag to print only the volume names.
## OPTIONS
-#### **--filter**=*filter*, **-f**
+#### **\-\-filter**=*filter*, **-f**
Filter volume output.
-#### **--format**=*format*
+#### **\-\-format**=*format*
Format volume output using Go template.
-#### **--help**
+#### **\-\-help**
Print usage statement.
-#### **--quiet**, **-q**
+#### **\-\-quiet**, **-q**
Print volume output in quiet mode. Only print the volume names.
diff --git a/docs/source/markdown/podman-volume-prune.1.md b/docs/source/markdown/podman-volume-prune.1.md
index 9477cb5d5..b1ca72623 100644
--- a/docs/source/markdown/podman-volume-prune.1.md
+++ b/docs/source/markdown/podman-volume-prune.1.md
@@ -8,18 +8,18 @@ podman\-volume\-prune - Remove all unused volumes
## DESCRIPTION
-Removes unused volumes. By default all unused volumes will be removed, the **--filter** flag can
+Removes unused volumes. By default all unused volumes will be removed, the **\-\-filter** flag can
be used to filter specific volumes. You will be prompted to confirm the removal of all the
-unused volumes. To bypass the confirmation, use the **--force** flag.
+unused volumes. To bypass the confirmation, use the **\-\-force** flag.
## OPTIONS
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Do not prompt for confirmation.
-#### **--filter**
+#### **\-\-filter**
Filter volumes to be pruned. Volumes can be filtered by the following attributes:
@@ -30,7 +30,7 @@ Filter volumes to be pruned. Volumes can be filtered by the following attributes
- opt
- scope
-#### **--help**
+#### **\-\-help**
Print usage statement
diff --git a/docs/source/markdown/podman-volume-rm.1.md b/docs/source/markdown/podman-volume-rm.1.md
index c066d1c6e..2727ea640 100644
--- a/docs/source/markdown/podman-volume-rm.1.md
+++ b/docs/source/markdown/podman-volume-rm.1.md
@@ -9,22 +9,22 @@ podman\-volume\-rm - Remove one or more volumes
## DESCRIPTION
Removes one or more volumes. Only volumes that are not being used will be removed.
-If a volume is being used by a container, an error will be returned unless the **--force**
-flag is being used. To remove all volumes, use the **--all** flag.
+If a volume is being used by a container, an error will be returned unless the **\-\-force**
+flag is being used. To remove all volumes, use the **\-\-all** flag.
Volumes can be removed individually by providing their full name or a unique partial name.
## OPTIONS
-#### **--all**, **-a**
+#### **\-\-all**, **-a**
Remove all volumes.
-#### **--force**, **-f**
+#### **\-\-force**, **-f**
Remove a volume by force.
If it is being used by containers, the containers will be removed first.
-#### **--help**
+#### **\-\-help**
Print usage statement
diff --git a/docs/source/markdown/podman-wait.1.md b/docs/source/markdown/podman-wait.1.md
index fac017fe6..3697cc94a 100644
--- a/docs/source/markdown/podman-wait.1.md
+++ b/docs/source/markdown/podman-wait.1.md
@@ -16,17 +16,17 @@ separated by newline in the same order as they were given to the command.
## OPTIONS
-#### **--condition**=*state*
+#### **\-\-condition**=*state*
Condition to wait on (default "stopped")
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--interval**, **-i**=*duration*
+#### **\-\-interval**, **-i**=*duration*
Time interval to wait before polling for completion. A duration string is a sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Time unit defaults to "ms".
-#### **--latest**, **-l**
+#### **\-\-latest**, **-l**
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client)
diff --git a/docs/source/markdown/podman.1.md b/docs/source/markdown/podman.1.md
index 141d231f3..7a6a51c39 100644
--- a/docs/source/markdown/podman.1.md
+++ b/docs/source/markdown/podman.1.md
@@ -25,34 +25,34 @@ man pages.
## GLOBAL OPTIONS
-#### **--cgroup-manager**=*manager*
+#### **\-\-cgroup-manager**=*manager*
The CGroup manager to use for container cgroups. Supported values are cgroupfs or systemd. Default is systemd unless overridden in the containers.conf file.
Note: Setting this flag can cause certain commands to break when called on containers previously created by the other CGroup manager type.
Note: CGroup manager is not supported in rootless mode when using CGroups Version V1.
-#### **--cni-config-dir**
+#### **\-\-cni-config-dir**
Path of the configuration directory for CNI networks. (Default: `/etc/cni/net.d`)
-#### **--connection**, **-c**
+#### **\-\-connection**, **-c**
Connection to use for remote podman (Default connection is configured in `containers.conf`)
Remote connections use local containers.conf for default.
-#### **--conmon**
+#### **\-\-conmon**
Path of the conmon binary (Default path is configured in `containers.conf`)
-#### **--events-backend**=*type*
+#### **\-\-events-backend**=*type*
Backend to use for storing events. Allowed values are **file**, **journald**, and
**none**. When *file* is specified, the events are stored under a subdirectory
-of the *tmpdir* location (see **--tmpdir** below).
+of the *tmpdir* location (see **\-\-tmpdir** below).
-#### **--help**, **-h**
+#### **\-\-help**, **-h**
Print usage statement
-#### **--hooks-dir**=*path*
+#### **\-\-hooks-dir**=*path*
Each `*.json` file in the path configures a hook for Podman containers. For more details on the syntax of the JSON files and the semantics of hook injection, see `oci-hooks(5)`. Podman and libpod currently support both the 1.0.0 and 0.1.0 hook schemas, although the 0.1.0 schema is deprecated.
@@ -68,7 +68,7 @@ Podman and libpod currently support an additional `precreate` state which is cal
**WARNING**: the `precreate` hook lets you do powerful things, such as adding additional mounts to the runtime configuration. That power also makes it easy to break things. Before reporting libpod errors, try running your container with `precreate` hooks disabled to see if the problem is due to one of your hooks.
-#### **--identity**=*path*
+#### **\-\-identity**=*path*
Path to ssh identity file. If the identity file has been encrypted, podman prompts the user for the passphrase.
If no identity file is provided and no user is given, podman defaults to the user running the podman command.
@@ -80,23 +80,23 @@ Identity value resolution precedence:
- `containers.conf`
Remote connections use local containers.conf for default.
-#### **--log-level**=*level*
+#### **\-\-log-level**=*level*
Log messages above specified level: debug, info, warn, error (default), fatal or panic (default: "error")
-#### **--namespace**=*namespace*
+#### **\-\-namespace**=*namespace*
Set libpod namespace. Namespaces are used to separate groups of containers and pods in libpod's state.
When namespace is set, created containers and pods will join the given namespace, and only containers and pods in the given namespace will be visible to Podman.
-#### **--network-cmd-path**=*path*
+#### **\-\-network-cmd-path**=*path*
Path to the command binary to use for setting up a network. It is currently only used for setting up a slirp4netns network. If "" is used then the binary is looked up using the $PATH environment variable.
-#### **--remote**, **-r**
+#### **\-\-remote**, **-r**
Access Podman service will be remote
Remote connections use local containers.conf for default.
-#### **--url**=*value*
+#### **\-\-url**=*value*
URL to access Podman service (default from `containers.conf`, rootless `unix://run/user/$UID/podman/podman.sock` or as root `unix://run/podman/podman.sock`).
- `CONTAINER_HOST` is of the format `<schema>://[<user[:<password>]@]<host>[:<port>][<path>]`
@@ -115,21 +115,21 @@ URL value resolution precedence:
- `unix://run/podman/podman.sock`
Remote connections use local containers.conf for default.
-#### **--root**=*value*
+#### **\-\-root**=*value*
Storage root dir in which data, including images, is stored (default: "/var/lib/containers/storage" for UID 0, "$HOME/.local/share/containers/storage" for other users).
Default root dir configured in `/etc/containers/storage.conf`.
-#### **--runroot**=*value*
+#### **\-\-runroot**=*value*
Storage state directory where all state information is stored (default: "/run/containers/storage" for UID 0, "/run/user/$UID/run" for other users).
Default state dir configured in `/etc/containers/storage.conf`.
-#### **--runtime**=*value*
+#### **\-\-runtime**=*value*
Name of the OCI runtime as specified in containers.conf or absolute path to the OCI compatible binary used to run containers.
-#### **--runtime-flag**=*flag*
+#### **\-\-runtime-flag**=*flag*
Adds global flags for the container runtime. To list the supported flags, please
consult the manpages of the selected container runtime (`runc` is the default
@@ -139,30 +139,30 @@ for cgroup V2, the default runtime is `crun`, the manpage to consult is `crun(8)
Note: Do not pass the leading `--` to the flag. To pass the runc flag `--log-format json`
to podman build, the option given would be `--runtime-flag log-format=json`.
-#### **--storage-driver**=*value*
+#### **\-\-storage-driver**=*value*
Storage driver. The default storage driver for UID 0 is configured in /etc/containers/storage.conf (`$HOME/.config/containers/storage.conf` in rootless mode), and is *vfs* for non-root users when *fuse-overlayfs* is not available. The `STORAGE_DRIVER` environment variable overrides the default. The --storage-driver specified driver overrides all.
Overriding this option will cause the *storage-opt* settings in /etc/containers/storage.conf to be ignored. The user must
specify additional options via the `--storage-opt` flag.
-#### **--storage-opt**=*value*
+#### **\-\-storage-opt**=*value*
Storage driver option, Default storage driver options are configured in /etc/containers/storage.conf (`$HOME/.config/containers/storage.conf` in rootless mode). The `STORAGE_OPTS` environment variable overrides the default. The --storage-opt specified options overrides all.
-#### **--syslog**=*true|false*
+#### **\-\-syslog**=*true|false*
Output logging information to syslog as well as the console (default *false*).
On remote clients, logging is directed to the file $HOME/.config/containers/podman.log.
-#### **--tmpdir**
+#### **\-\-tmpdir**
Path to the tmp directory, for libpod runtime content.
NOTE --tmpdir is not used for the temporary storage of downloaded images. Use the environment variable `TMPDIR` to change the temporary storage location of downloaded container images. Podman defaults to use `/var/tmp`.
-#### **--version**, **-v**
+#### **\-\-version**, **-v**
Print the version
@@ -237,6 +237,7 @@ the exit codes follow the `chroot` standard, see below:
| [podman-login(1)](podman-login.1.md) | Login to a container registry. |
| [podman-logout(1)](podman-logout.1.md) | Logout of a container registry. |
| [podman-logs(1)](podman-logs.1.md) | Display the logs of one or more containers. |
+| [podman-machine(1)](podman-machine.1.md) | Manage Podman's virtual machine |
| [podman-manifest(1)](podman-manifest.1.md) | Create and manipulate manifest lists and image indexes. |
| [podman-mount(1)](podman-mount.1.md) | Mount a working container's root filesystem. |
| [podman-network(1)](podman-network.1.md) | Manage Podman CNI networks. |
diff --git a/go.mod b/go.mod
index 680f9bd9c..fe2624ea8 100644
--- a/go.mod
+++ b/go.mod
@@ -10,19 +10,21 @@ require (
github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b
github.com/containernetworking/cni v0.8.1
github.com/containernetworking/plugins v0.9.1
- github.com/containers/buildah v1.19.8
- github.com/containers/common v0.35.3
+ github.com/containers/buildah v1.20.0
+ github.com/containers/common v0.35.4
github.com/containers/conmon v2.0.20+incompatible
github.com/containers/image/v5 v5.10.5
github.com/containers/ocicrypt v1.1.0
github.com/containers/psgo v1.5.2
- github.com/containers/storage v1.28.0
+ github.com/containers/storage v1.28.1
github.com/coreos/go-systemd/v22 v22.3.0
+ github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3
github.com/cri-o/ocicni v0.2.1-0.20210301205850-541cf7c703cf
github.com/cyphar/filepath-securejoin v0.2.2
github.com/davecgh/go-spew v1.1.1
+ github.com/digitalocean/go-qemu v0.0.0-20210209191958-152a1535e49f
github.com/docker/distribution v2.7.1+incompatible
- github.com/docker/docker v20.10.0-beta1.0.20201113105859-b6bfff2a628f+incompatible
+ github.com/docker/docker v20.10.3-0.20210216175712-646072ed6524+incompatible
github.com/docker/go-connections v0.4.0
github.com/docker/go-plugins-helpers v0.0.0-20200102110956-c9a8a2d92ccc
github.com/docker/go-units v0.4.0
@@ -38,8 +40,7 @@ require (
github.com/json-iterator/go v1.1.10
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
- github.com/mattn/go-runewidth v0.0.10 // indirect
- github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf
+ github.com/moby/term v0.0.0-20201216013528-df9cb8a40635
github.com/mrunalp/fileutils v0.5.0
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/onsi/ginkgo v1.15.2
@@ -52,21 +53,21 @@ require (
github.com/opencontainers/selinux v1.8.0
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.0
- github.com/rivo/uniseg v0.2.0 // indirect
- github.com/rootless-containers/rootlesskit v0.14.0-beta.0
+ github.com/rootless-containers/rootlesskit v0.14.0
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
github.com/uber/jaeger-client-go v2.25.0+incompatible
+ github.com/vbauerster/mpb/v6 v6.0.3
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852
go.etcd.io/bbolt v1.3.5
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
- golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
- golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005
+ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
+ golang.org/x/sys v0.0.0-20210324051608-47abb6519492
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
- gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
+ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
k8s.io/api v0.20.5
k8s.io/apimachinery v0.20.5
)
diff --git a/go.sum b/go.sum
index e7a89e5c3..d8992be0c 100644
--- a/go.sum
+++ b/go.sum
@@ -44,7 +44,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
-github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3 h1:mw6pDQqv38/WGF1cO/jF5t/jyAJ2yi7CmtFLLO5tGFI=
@@ -137,18 +136,17 @@ github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.
github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.5.0-beta.1 h1:IK6yirB4X7wpKyFSikWiT++nZsyIxGAAgNEv3fEGuls=
github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ=
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
-github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY=
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo=
-github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 h1:6ejg6Lkk8dskcM7wQ28gONkukbQkM4qpj4RnYbpFzrI=
github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y=
+github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e h1:6JKvHHt396/qabvMhnhUZvWaHZzfVfldxE60TK8YLhg=
+github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ=
github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
@@ -176,15 +174,13 @@ github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHV
github.com/containernetworking/plugins v0.8.7/go.mod h1:R7lXeZaBzpfqapcAbHRW8/CYwm0dHzbz0XEjofx0uB0=
github.com/containernetworking/plugins v0.9.1 h1:FD1tADPls2EEi3flPc2OegIY1M9pUa9r2Quag7HMLV8=
github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
-github.com/containers/buildah v1.19.8 h1:4TzmetfKPQF5hh6GgMwbAfrD50j+PAcsRiWDnx+gCI8=
-github.com/containers/buildah v1.19.8/go.mod h1:VnyHWgNmfR1d89/zJ/F4cbwOzaQS+6sBky46W7dCo3E=
-github.com/containers/common v0.33.4/go.mod h1:PhgL71XuC4jJ/1BIqeP7doke3aMFkCP90YBXwDeUr9g=
-github.com/containers/common v0.35.3 h1:6tEBSIHlJzpmt35zA1ZcjBqbtUilAHDWaa7buPvaqWY=
+github.com/containers/buildah v1.20.0 h1:H8db/d2uSGm947mqjX0Iup6F0T9AnK3kS/ff9RCemZA=
+github.com/containers/buildah v1.20.0/go.mod h1:8V3UBoTKBWU9AxNHb1MAKnZZ9oSoz/IsYyjeymrpl1s=
github.com/containers/common v0.35.3/go.mod h1:rMzxgD7nMGw++cEbsp+NZv0UJO4rgXbm7F7IbJPTwIE=
+github.com/containers/common v0.35.4 h1:szyWRncsHkBwCVpu1dkEOXUjkwCetlfcLmKJTwo1Sp8=
+github.com/containers/common v0.35.4/go.mod h1:rMzxgD7nMGw++cEbsp+NZv0UJO4rgXbm7F7IbJPTwIE=
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
-github.com/containers/image/v5 v5.10.1/go.mod h1:JlRLJZv7elVbtHaaaR6Kz8i6G3k2ttj4t7fubwxD9Hs=
-github.com/containers/image/v5 v5.10.2/go.mod h1:JlRLJZv7elVbtHaaaR6Kz8i6G3k2ttj4t7fubwxD9Hs=
github.com/containers/image/v5 v5.10.5 h1:VK1UbsZMzjdw5Xqr3Im9h4iOqHWU0naFs+I78kavc7I=
github.com/containers/image/v5 v5.10.5/go.mod h1:SgIbWEedCNBbn2FI5cH0/jed1Ecy2s8XK5zTxvJTzII=
github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b h1:Q8ePgVfHDplZ7U33NwHZkrVELsZP5fYj9pM5WBZB2GE=
@@ -196,11 +192,10 @@ github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgU
github.com/containers/psgo v1.5.2 h1:3aoozst/GIwsrr/5jnFy3FrJay98uujPCu9lTuSZ/Cw=
github.com/containers/psgo v1.5.2/go.mod h1:2ubh0SsreMZjSXW1Hif58JrEcFudQyIy9EzPUWfawVU=
github.com/containers/storage v1.23.5/go.mod h1:ha26Q6ngehFNhf3AWoXldvAvwI4jFe3ETQAf/CeZPyM=
-github.com/containers/storage v1.24.5/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
-github.com/containers/storage v1.24.6/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
github.com/containers/storage v1.24.8/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
-github.com/containers/storage v1.28.0 h1:lA/9i9BIjfmIRxCI8GuzasYHmU4IUXVcfZZiDceD0Eg=
github.com/containers/storage v1.28.0/go.mod h1:ixAwO7Bj31cigqPEG7aCz+PYmxkDxbIFdUFioYdxbzI=
+github.com/containers/storage v1.28.1 h1:axYBD+c0N0YkHelDoqzdLQXfY3fgb8pqIMsRHqUNGts=
+github.com/containers/storage v1.28.1/go.mod h1:5bwiMh2LkrN3AWIfDFMH7A/xbVNLcve+oeXYvHvW8cc=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
@@ -219,6 +214,8 @@ github.com/coreos/go-systemd/v22 v22.3.0 h1:C8u/Ljj8G8O6rqWJh2J8cDyeEFBMWvXlvJ/c
github.com/coreos/go-systemd/v22 v22.3.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3 h1:0JspqV66RwYqYfvi8lCUoL5zUZMh9uN4hx/J5+NRXIE=
+github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3/go.mod h1:RTjQyHgO/G37oJ3qnqYK6Z4TPZ5EsaabOtfMjVXmgko=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
@@ -240,16 +237,19 @@ github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8l
github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
+github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1 h1:j6vGflaQ2T7yOWqVgPdiRF73j/U2Zmpbbzab8nyDCRQ=
+github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1/go.mod h1:QS1XzqZLcDniNYrN7EZefq3wIyb/M2WmJbql4ZKoc1Q=
+github.com/digitalocean/go-qemu v0.0.0-20210209191958-152a1535e49f h1:N2HvbwONtcvzegFxOAgGt15JsajIk5QzY3j5X3VzFDI=
+github.com/digitalocean/go-qemu v0.0.0-20210209191958-152a1535e49f/go.mod h1:IetBE52JfFxK46p2n2Rqm+p5Gx1gpu2hRHsrbnPOWZQ=
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker v17.12.0-ce-rc1.0.20200505174321-1655290016ac+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v17.12.0-ce-rc1.0.20201020191947-73dc6a680cdd+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker v20.10.0-beta1.0.20201113105859-b6bfff2a628f+incompatible h1:lwpV3629md5omgAKjxPWX17shI7vMRpE3nyb9WHn8pA=
-github.com/docker/docker v20.10.0-beta1.0.20201113105859-b6bfff2a628f+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker v20.10.3-0.20210216175712-646072ed6524+incompatible h1:Yu2uGErhwEoOT/OxAFe+/SiJCqRLs+pgcS5XKrDXnG4=
+github.com/docker/docker v20.10.3-0.20210216175712-646072ed6524+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ=
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
@@ -281,13 +281,14 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc=
+github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/fsouza/go-dockerclient v1.6.6 h1:9e3xkBrVkPb81gzYq23i7iDUEd6sx2ooeJA/gnYU6R4=
-github.com/fsouza/go-dockerclient v1.6.6/go.mod h1:3/oRIWoe7uT6bwtAayj/EmJmepBjeL4pYvt7ZxC7Rnk=
+github.com/fsouza/go-dockerclient v1.7.2 h1:bBEAcqLTkpq205jooP5RVroUKiVEWgGecHyeZc4OFjo=
+github.com/fsouza/go-dockerclient v1.7.2/go.mod h1:+ugtMCVRwnPfY7d8/baCzZ3uwB0BrG5DB8OzbtxaRz8=
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
@@ -363,8 +364,10 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -485,7 +488,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
-github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -534,20 +536,16 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
-github.com/moby/sys/mount v0.1.0/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74=
-github.com/moby/sys/mount v0.1.1 h1:mdhBytJ1SMmMat0gtzWWjFX/87K5j6E/7Q5z7rR0cZY=
-github.com/moby/sys/mount v0.1.1/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74=
-github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o=
+github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM=
+github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM=
github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o=
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM=
github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
-github.com/moby/term v0.0.0-20200429084858-129dac9f73f6/go.mod h1:or9wGItza1sRcM4Wd3dIv8DsFHYQuFsMHEdxUIlUxms=
-github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ=
-github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf h1:Un6PNx5oMK6CCwO3QTUyPiK2mtZnPrpDl5UnZ64eCkw=
-github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc=
+github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk=
+github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc=
github.com/moby/vpnkit v0.5.0/go.mod h1:KyjUrL9cb6ZSNNAUwZfqRjhwwgJ3BJN+kXh0t43WTUQ=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
@@ -583,7 +581,6 @@ github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
-github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg=
github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org=
github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o=
@@ -594,7 +591,6 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
-github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ=
github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48=
github.com/onsi/gomega v1.11.0 h1:+CqWgvj0OZycCaqclBD1pxKHAU+tOkHmQIWvDHq2aug=
github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg=
@@ -621,7 +617,6 @@ github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/
github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/opencontainers/runtime-spec v1.0.3-0.20200710190001-3e4195d92445/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d h1:pNa8metDkwZjb9g4T8s+krQ+HRgZAkqnXml+wNir/+s=
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
@@ -631,8 +626,8 @@ github.com/opencontainers/selinux v1.5.1/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwy
github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE=
github.com/opencontainers/selinux v1.8.0 h1:+77ba4ar4jsCbL1GLbFL8fFM57w6suPfSS9PDLDY7KM=
github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
-github.com/openshift/imagebuilder v1.1.8 h1:gjiIl8pbNj0eC4XWvFJHATdDvYm64p9/pLDLQWoLZPA=
-github.com/openshift/imagebuilder v1.1.8/go.mod h1:9aJRczxCH0mvT6XQ+5STAQaPWz7OsWcU5/mRkt8IWeo=
+github.com/openshift/imagebuilder v1.2.0 h1:uoZFjJICLlTMjlAL/UG2PA2kM8RjAsVflGfHJK7MMDk=
+github.com/openshift/imagebuilder v1.2.0/go.mod h1:9aJRczxCH0mvT6XQ+5STAQaPWz7OsWcU5/mRkt8IWeo=
github.com/ostreedev/ostree-go v0.0.0-20190702140239-759a8c1ac913 h1:TnbXhKzrTOyuvWrjI8W6pcoI9XPbLHFXCdN2dtUw7Rw=
github.com/ostreedev/ostree-go v0.0.0-20190702140239-759a8c1ac913/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
@@ -680,16 +675,17 @@ github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDa
github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
-github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
+github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rootless-containers/rootlesskit v0.14.0-beta.0 h1:S0VzvU7sEvqCTkxPAxzJ1OZpG9a8oG9FSwkVhk0b8PM=
-github.com/rootless-containers/rootlesskit v0.14.0-beta.0/go.mod h1:5UDnrX52Dyoyz2lK66mjHftWpK9YSp1ghO+fY1ZkxFc=
+github.com/rootless-containers/rootlesskit v0.14.0 h1:4zfZqDv7JzsVuMkj4ZMB9cs9mQQnyl1gWBsrpOYcmtk=
+github.com/rootless-containers/rootlesskit v0.14.0/go.mod h1:nV3TpRISvwhZQSwo0nmQQnxjCxXr3mvrMi0oASLvzcg=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
@@ -709,7 +705,6 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
-github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
@@ -761,8 +756,9 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1
github.com/u-root/u-root v7.0.0+incompatible/go.mod h1:RYkpo8pTHrNjW08opNd/U6p/RJE7K0D8fXO0d47+3YY=
github.com/uber/jaeger-client-go v2.25.0+incompatible h1:IxcNZ7WRY1Y3G4poYlx24szfsn/3LvK9QHCq9oQw8+U=
github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
-github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I=
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
+github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8=
+github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
@@ -772,6 +768,8 @@ github.com/vbatts/tar-split v0.11.1 h1:0Odu65rhcZ3JZaPHxl7tCI3V/C/Q9Zf82UFravl02
github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g=
github.com/vbauerster/mpb/v5 v5.4.0 h1:n8JPunifvQvh6P1D1HAl2Ur9YcmKT1tpoUuiea5mlmg=
github.com/vbauerster/mpb/v5 v5.4.0/go.mod h1:fi4wVo7BVQ22QcvFObm+VwliQXlV1eBT8JDaKXR4JGI=
+github.com/vbauerster/mpb/v6 v6.0.3 h1:j+twHHhSUe8aXWaT/27E98G5cSBeqEuJSVCMjmLg0PI=
+github.com/vbauerster/mpb/v6 v6.0.3/go.mod h1:5luBx4rDLWxpA4t6I5sdeeQuZhqDxc+wr5Nqf35+tnM=
github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 h1:cPXZWzzG0NllBLdjWoD1nDfaqu98YMv+OneaKc8sPOA=
@@ -793,6 +791,7 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
@@ -824,7 +823,6 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -893,6 +891,7 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
@@ -915,8 +914,9 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -971,7 +971,6 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -991,8 +990,10 @@ golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005 h1:pDMpM2zh2MT0kHy037cKlSby2nEhD50SYqwQk76Nm40=
-golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210216224549-f992740a1bac/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210324051608-47abb6519492 h1:Paq34FxTluEPvVyayQqMPgHm+vTOrIifmcYxFBx9TLg=
+golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201113234701-d7a72108b828/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -1046,6 +1047,7 @@ golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
@@ -1106,7 +1108,6 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
diff --git a/hack/xref-helpmsgs-manpages b/hack/xref-helpmsgs-manpages
index 08e56c77e..25e972fbc 100755
--- a/hack/xref-helpmsgs-manpages
+++ b/hack/xref-helpmsgs-manpages
@@ -320,7 +320,7 @@ sub podman_man {
}
}
- # Options should always be of the form '**-f**' or '**--flag**',
+ # Options should always be of the form '**-f**' or '**\-\-flag**',
# possibly separated by comma-space.
elsif ($section eq 'flags') {
# e.g. 'podman run --ip6', documented in man page, but nonexistent
@@ -331,12 +331,23 @@ sub podman_man {
@most_recent_flags = ();
# As of PR #8292, all options are <h4> and anchored
if ($line =~ s/^\#{4}\s+//) {
+ # 2021-03: PR #9856: some (bleep) markdown processor converts
+ # double dashes to a single em-dash. We need to escape every
+ # instance with backslashes. This is anti-intuitive, and
+ # developers will naturally write --foo; try to catch that
+ # and warn with a helpful message.
+ if ($line =~ /--([a-z]+)/) {
+ warn "$ME: $subpath:$.: You probably need to backslash-escape '--$1' as '\\-\\-$1'\n";
+ }
+
# If option has long and short form, long must come first.
# This is a while-loop because there may be multiple long
# option names, e.g. --net/--network
- while ($line =~ s/^\*\*(--[a-z0-9-]+)\*\*(=\*[a-zA-Z0-9-]+\*)?(,\s+)?//g) {
- $man{$1} = 1;
- push @most_recent_flags, $1;
+ while ($line =~ s/^\*\*\\-\\-([a-z0-9-]+)\*\*(=\*[a-zA-Z0-9-]+\*)?(,\s+)?//g) {
+ # add -- to the flag name
+ my $flag = "--".$1;
+ $man{$flag} = 1;
+ push @most_recent_flags, $flag;
}
# Short form
if ($line =~ s/^\*\*(-[a-zA-Z0-9])\*\*(=\*[a-zA-Z0-9-]+\*)?//g) {
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 94c6c3840..a136fb72d 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -607,10 +607,16 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
availableUIDs, availableGIDs, err := rootless.GetAvailableIDMaps()
if err != nil {
- return nil, err
+ if os.IsNotExist(err) {
+ // The kernel-provided files only exist if user namespaces are supported
+ logrus.Debugf("user or group ID mappings not available: %s", err)
+ } else {
+ return nil, err
+ }
+ } else {
+ g.Config.Linux.UIDMappings = rootless.MaybeSplitMappings(g.Config.Linux.UIDMappings, availableUIDs)
+ g.Config.Linux.GIDMappings = rootless.MaybeSplitMappings(g.Config.Linux.GIDMappings, availableGIDs)
}
- g.Config.Linux.UIDMappings = rootless.MaybeSplitMappings(g.Config.Linux.UIDMappings, availableUIDs)
- g.Config.Linux.GIDMappings = rootless.MaybeSplitMappings(g.Config.Linux.GIDMappings, availableGIDs)
// Hostname handling:
// If we have a UTS namespace, set Hostname in the OCI spec.
diff --git a/libpod/events/logfile.go b/libpod/events/logfile.go
index 7a32ea311..0f00525e8 100644
--- a/libpod/events/logfile.go
+++ b/libpod/events/logfile.go
@@ -7,7 +7,7 @@ import (
"time"
"github.com/containers/podman/v3/pkg/util"
- "github.com/containers/storage"
+ "github.com/containers/storage/pkg/lockfile"
"github.com/pkg/errors"
)
@@ -20,7 +20,7 @@ type EventLogFile struct {
// Writes to the log file
func (e EventLogFile) Write(ee Event) error {
// We need to lock events file
- lock, err := storage.GetLockfile(e.options.LogFilePath + ".lock")
+ lock, err := lockfile.GetLockfile(e.options.LogFilePath + ".lock")
if err != nil {
return err
}
diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go
index 0a2a375ae..d95234e3d 100644
--- a/libpod/image/docker_registry_options.go
+++ b/libpod/image/docker_registry_options.go
@@ -69,6 +69,7 @@ func GetSystemContext(signaturePolicyPath, authFilePath string, forceCompress bo
sc.AuthFilePath = authFilePath
sc.DirForceCompress = forceCompress
sc.DockerRegistryUserAgent = fmt.Sprintf("libpod/%s", podmanVersion.Version)
+ sc.BigFilesTemporaryDir = parse.GetTempDir()
return sc
}
diff --git a/libpod/image/filters.go b/libpod/image/filters.go
index 37d3cb6a5..d316c6956 100644
--- a/libpod/image/filters.go
+++ b/libpod/image/filters.go
@@ -9,6 +9,7 @@ import (
"time"
"github.com/containers/podman/v3/pkg/inspect"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -78,23 +79,14 @@ func ReadOnlyFilter(readOnly bool) ResultFilter {
}
// LabelFilter allows you to filter by images labels key and/or value
-func LabelFilter(ctx context.Context, labelfilter string) ResultFilter {
+func LabelFilter(ctx context.Context, filter string) ResultFilter {
// We need to handle both label=key and label=key=value
return func(i *Image) bool {
- var value string
- splitFilter := strings.SplitN(labelfilter, "=", 2)
- key := splitFilter[0]
- if len(splitFilter) > 1 {
- value = splitFilter[1]
- }
labels, err := i.Labels(ctx)
if err != nil {
return false
}
- if len(strings.TrimSpace(labels[key])) > 0 && len(strings.TrimSpace(value)) == 0 {
- return true
- }
- return labels[key] == value
+ return util.MatchLabelFilters([]string{filter}, labels)
}
}
diff --git a/libpod/image/image_test.go b/libpod/image/image_test.go
index 3e6e7b9db..2b42d6394 100644
--- a/libpod/image/image_test.go
+++ b/libpod/image/image_test.go
@@ -9,10 +9,12 @@ import (
"github.com/containers/podman/v3/libpod/events"
"github.com/containers/podman/v3/pkg/util"
+ podmanVersion "github.com/containers/podman/v3/version"
"github.com/containers/storage"
"github.com/containers/storage/pkg/reexec"
"github.com/opencontainers/go-digest"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
var (
@@ -93,6 +95,8 @@ func TestImage_NewFromLocal(t *testing.T) {
// Need images to be present for this test
ir, err := NewImageRuntimeFromOptions(so)
assert.NoError(t, err)
+ defer cleanup(workdir, ir)
+
ir.Eventer = events.NewNullEventer()
bb, err := ir.New(context.Background(), "docker.io/library/busybox:latest", "", "", writer, nil, SigningOptions{}, nil, util.PullImageMissing, nil)
assert.NoError(t, err)
@@ -106,13 +110,10 @@ func TestImage_NewFromLocal(t *testing.T) {
assert.NoError(t, err)
for _, name := range image.names {
newImage, err := ir.NewFromLocal(name)
- assert.NoError(t, err)
+ require.NoError(t, err)
assert.Equal(t, newImage.ID(), image.img.ID())
}
}
-
- // Shutdown the runtime and remove the temporary storage
- cleanup(workdir, ir)
}
// TestImage_New tests pulling the image by various names, tags, and from
@@ -125,30 +126,31 @@ func TestImage_New(t *testing.T) {
var names []string
workdir, err := mkWorkDir()
assert.NoError(t, err)
-
so := storage.StoreOptions{
RunRoot: workdir,
GraphRoot: workdir,
}
ir, err := NewImageRuntimeFromOptions(so)
assert.NoError(t, err)
+ defer cleanup(workdir, ir)
+
ir.Eventer = events.NewNullEventer()
// Build the list of pull names
names = append(names, bbNames...)
writer := os.Stdout
+ opts := DockerRegistryOptions{
+ RegistriesConfPath: "testdata/registries.conf",
+ }
// Iterate over the names and delete the image
// after the pull
for _, img := range names {
- newImage, err := ir.New(context.Background(), img, "", "", writer, nil, SigningOptions{}, nil, util.PullImageMissing, nil)
- assert.NoError(t, err)
+ newImage, err := ir.New(context.Background(), img, "", "", writer, &opts, SigningOptions{}, nil, util.PullImageMissing, nil)
+ require.NoError(t, err, img)
assert.NotEqual(t, newImage.ID(), "")
err = newImage.Remove(context.Background(), false)
assert.NoError(t, err)
}
-
- // Shutdown the runtime and remove the temporary storage
- cleanup(workdir, ir)
}
// TestImage_MatchRepoTag tests the various inputs we need to match
@@ -161,20 +163,24 @@ func TestImage_MatchRepoTag(t *testing.T) {
//Set up
workdir, err := mkWorkDir()
assert.NoError(t, err)
-
so := storage.StoreOptions{
RunRoot: workdir,
GraphRoot: workdir,
}
ir, err := NewImageRuntimeFromOptions(so)
- assert.NoError(t, err)
+ require.NoError(t, err)
+ defer cleanup(workdir, ir)
+
+ opts := DockerRegistryOptions{
+ RegistriesConfPath: "testdata/registries.conf",
+ }
ir.Eventer = events.NewNullEventer()
- newImage, err := ir.New(context.Background(), "busybox", "", "", os.Stdout, nil, SigningOptions{}, nil, util.PullImageMissing, nil)
- assert.NoError(t, err)
+ newImage, err := ir.New(context.Background(), "busybox", "", "", os.Stdout, &opts, SigningOptions{}, nil, util.PullImageMissing, nil)
+ require.NoError(t, err)
err = newImage.TagImage("foo:latest")
- assert.NoError(t, err)
+ require.NoError(t, err)
err = newImage.TagImage("foo:bar")
- assert.NoError(t, err)
+ require.NoError(t, err)
// Tests start here.
for _, name := range bbNames {
@@ -187,23 +193,19 @@ func TestImage_MatchRepoTag(t *testing.T) {
// foo should resolve to foo:latest
repoTag, err := newImage.MatchRepoTag("foo")
- assert.NoError(t, err)
+ require.NoError(t, err)
assert.Equal(t, "localhost/foo:latest", repoTag)
// foo:bar should resolve to foo:bar
repoTag, err = newImage.MatchRepoTag("foo:bar")
- assert.NoError(t, err)
+ require.NoError(t, err)
assert.Equal(t, "localhost/foo:bar", repoTag)
- // Shutdown the runtime and remove the temporary storage
- cleanup(workdir, ir)
}
// TestImage_RepoDigests tests RepoDigest generation.
func TestImage_RepoDigests(t *testing.T) {
dgst, err := digest.Parse("sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc")
- if err != nil {
- t.Fatal(err)
- }
+ require.NoError(t, err)
for _, tt := range []struct {
name string
@@ -235,10 +237,7 @@ func TestImage_RepoDigests(t *testing.T) {
},
}
actual, err := image.RepoDigests()
- if err != nil {
- t.Fatal(err)
- }
-
+ require.NoError(t, err)
assert.Equal(t, test.expected, actual)
image = &Image{
@@ -248,10 +247,7 @@ func TestImage_RepoDigests(t *testing.T) {
},
}
actual, err = image.RepoDigests()
- if err != nil {
- t.Fatal(err)
- }
-
+ require.NoError(t, err)
assert.Equal(t, test.expected, actual)
})
}
@@ -298,3 +294,25 @@ func TestNormalizedTag(t *testing.T) {
}
}
}
+
+func TestGetSystemContext(t *testing.T) {
+ sc := GetSystemContext("", "", false)
+ assert.Equal(t, sc.SignaturePolicyPath, "")
+ assert.Equal(t, sc.AuthFilePath, "")
+ assert.Equal(t, sc.DirForceCompress, false)
+ assert.Equal(t, sc.DockerRegistryUserAgent, fmt.Sprintf("libpod/%s", podmanVersion.Version))
+ assert.Equal(t, sc.BigFilesTemporaryDir, "/var/tmp")
+
+ oldtmpdir := os.Getenv("TMPDIR")
+ os.Setenv("TMPDIR", "/mnt")
+ sc = GetSystemContext("/tmp/foo", "/tmp/bar", true)
+ assert.Equal(t, sc.SignaturePolicyPath, "/tmp/foo")
+ assert.Equal(t, sc.AuthFilePath, "/tmp/bar")
+ assert.Equal(t, sc.DirForceCompress, true)
+ assert.Equal(t, sc.BigFilesTemporaryDir, "/mnt")
+ if oldtmpdir != "" {
+ os.Setenv("TMPDIR", oldtmpdir)
+ } else {
+ os.Unsetenv("TMPDIR")
+ }
+}
diff --git a/libpod/image/prune.go b/libpod/image/prune.go
index d6ae5feaf..12727901a 100644
--- a/libpod/image/prune.go
+++ b/libpod/image/prune.go
@@ -2,12 +2,12 @@ package image
import (
"context"
+ "strconv"
"strings"
- "time"
"github.com/containers/podman/v3/libpod/events"
"github.com/containers/podman/v3/pkg/domain/entities/reports"
- "github.com/containers/podman/v3/pkg/timetype"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -16,42 +16,31 @@ import (
func generatePruneFilterFuncs(filter, filterValue string) (ImageFilter, error) {
switch filter {
case "label":
- var filterArray = strings.SplitN(filterValue, "=", 2)
- var filterKey = filterArray[0]
- if len(filterArray) > 1 {
- filterValue = filterArray[1]
- } else {
- filterValue = ""
- }
return func(i *Image) bool {
labels, err := i.Labels(context.Background())
if err != nil {
return false
}
- for labelKey, labelValue := range labels {
- if labelKey == filterKey && (filterValue == "" || labelValue == filterValue) {
- return true
- }
- }
- return false
+ return util.MatchLabelFilters([]string{filterValue}, labels)
}, nil
case "until":
- ts, err := timetype.GetTimestamp(filterValue, time.Now())
+ until, err := util.ComputeUntilTimestamp([]string{filterValue})
if err != nil {
return nil, err
}
- seconds, nanoseconds, err := timetype.ParseTimestamps(ts, 0)
- if err != nil {
- return nil, err
- }
- until := time.Unix(seconds, nanoseconds)
return func(i *Image) bool {
if !until.IsZero() && i.Created().After((until)) {
return true
}
return false
}, nil
+ case "dangling":
+ danglingImages, err := strconv.ParseBool(filterValue)
+ if err != nil {
+ return nil, errors.Wrapf(err, "invalid filter dangling=%s", filterValue)
+ }
+ return ImageFilter(DanglingFilter(danglingImages)), nil
}
return nil, nil
}
diff --git a/libpod/image/pull.go b/libpod/image/pull.go
index 58160b52f..6517fbd07 100644
--- a/libpod/image/pull.go
+++ b/libpod/image/pull.go
@@ -245,6 +245,7 @@ func (ir *Runtime) pullImageFromHeuristicSource(ctx context.Context, inputName s
sc.OSChoice = dockerOptions.OSChoice
sc.ArchitectureChoice = dockerOptions.ArchitectureChoice
sc.VariantChoice = dockerOptions.VariantChoice
+ sc.SystemRegistriesConfPath = dockerOptions.RegistriesConfPath
}
if signaturePolicyPath == "" {
sc.SignaturePolicyPath = ir.SignaturePolicyPath
@@ -306,7 +307,12 @@ func (ir *Runtime) doPullImage(ctx context.Context, sc *types.SystemContext, goa
}
}()
- systemRegistriesConfPath := registries.SystemRegistriesConfPath()
+ var systemRegistriesConfPath string
+ if dockerOptions != nil && dockerOptions.RegistriesConfPath != "" {
+ systemRegistriesConfPath = dockerOptions.RegistriesConfPath
+ } else {
+ systemRegistriesConfPath = registries.SystemRegistriesConfPath()
+ }
var (
images []string
diff --git a/libpod/image/testdata/registries.conf b/libpod/image/testdata/registries.conf
new file mode 100644
index 000000000..16622a1ac
--- /dev/null
+++ b/libpod/image/testdata/registries.conf
@@ -0,0 +1,4 @@
+short-name-mode="enforcing"
+
+[aliases]
+"busybox"="docker.io/library/busybox"
diff --git a/libpod/network/netconflist.go b/libpod/network/netconflist.go
index b358bc530..08816f2bd 100644
--- a/libpod/network/netconflist.go
+++ b/libpod/network/netconflist.go
@@ -225,7 +225,7 @@ func IfPassesFilter(netconf *libcni.NetworkConfigList, filters map[string][]stri
case "label":
// matches all labels
- result = matchPruneLabelFilters(netconf, filterValues)
+ result = util.MatchLabelFilters(filterValues, GetNetworkLabels(netconf))
case "driver":
// matches only for the DefaultNetworkDriver
@@ -260,9 +260,9 @@ func IfPassesPruneFilter(config *config.Config, netconf *libcni.NetworkConfigLis
for key, filterValues := range f {
switch strings.ToLower(key) {
case "label":
- return matchPruneLabelFilters(netconf, filterValues), nil
+ return util.MatchLabelFilters(filterValues, GetNetworkLabels(netconf)), nil
case "until":
- until, err := util.ComputeUntilTimestamp(key, filterValues)
+ until, err := util.ComputeUntilTimestamp(filterValues)
if err != nil {
return false, err
}
@@ -280,29 +280,6 @@ func IfPassesPruneFilter(config *config.Config, netconf *libcni.NetworkConfigLis
return false, nil
}
-func matchPruneLabelFilters(netconf *libcni.NetworkConfigList, filterValues []string) bool {
- labels := GetNetworkLabels(netconf)
- result := true
-outer:
- for _, filterValue := range filterValues {
- filterArray := strings.SplitN(filterValue, "=", 2)
- filterKey := filterArray[0]
- if len(filterArray) > 1 {
- filterValue = filterArray[1]
- } else {
- filterValue = ""
- }
- for labelKey, labelValue := range labels {
- if labelKey == filterKey && (filterValue == "" || labelValue == filterValue) {
- result = true
- continue outer
- }
- }
- result = false
- }
- return result
-}
-
func getCreatedTimestamp(config *config.Config, netconf *libcni.NetworkConfigList) (*time.Time, error) {
networkConfigPath, err := GetCNIConfigPathByNameOrID(config, netconf.Name)
if err != nil {
diff --git a/libpod/options.go b/libpod/options.go
index 85862cc17..24e9d74f4 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -1577,8 +1577,6 @@ func WithVolumeLabels(labels map[string]string) VolumeCreateOption {
}
// WithVolumeOptions sets the options of the volume.
-// If the "local" driver has been selected, options will be validated. There are
-// currently 3 valid options for the "local" driver - o, type, and device.
func WithVolumeOptions(options map[string]string) VolumeCreateOption {
return func(volume *Volume) error {
if volume.valid {
@@ -1587,13 +1585,6 @@ func WithVolumeOptions(options map[string]string) VolumeCreateOption {
volume.config.Options = make(map[string]string)
for key, value := range options {
- switch key {
- case "type", "device", "o", "UID", "GID":
- volume.config.Options[key] = value
- default:
- return errors.Wrapf(define.ErrInvalidArg, "unrecognized volume option %q is not supported with local driver", key)
- }
-
volume.config.Options[key] = value
}
@@ -1627,19 +1618,6 @@ func WithVolumeGID(gid int) VolumeCreateOption {
}
}
-// WithVolumeNeedsChown sets the NeedsChown flag for the volume.
-func WithVolumeNeedsChown() VolumeCreateOption {
- return func(volume *Volume) error {
- if volume.valid {
- return define.ErrVolumeFinalized
- }
-
- volume.state.NeedsChown = true
-
- return nil
- }
-}
-
// withSetAnon sets a bool notifying libpod that this volume is anonymous and
// should be removed when containers using it are removed and volumes are
// specified for removal.
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 19690d79b..537618b65 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -392,7 +392,7 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
logrus.Debugf("Creating new volume %s for container", vol.Name)
// The volume does not exist, so we need to create it.
- volOptions := []VolumeCreateOption{WithVolumeName(vol.Name), WithVolumeUID(ctr.RootUID()), WithVolumeGID(ctr.RootGID()), WithVolumeNeedsChown()}
+ volOptions := []VolumeCreateOption{WithVolumeName(vol.Name), WithVolumeUID(ctr.RootUID()), WithVolumeGID(ctr.RootGID())}
if isAnonymous {
volOptions = append(volOptions, withSetAnon())
}
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go
index 13ac42e7d..b427125db 100644
--- a/libpod/runtime_img.go
+++ b/libpod/runtime_img.go
@@ -9,6 +9,7 @@ import (
"net/url"
"os"
+ buildahDefine "github.com/containers/buildah/define"
"github.com/containers/buildah/imagebuildah"
"github.com/containers/image/v5/directory"
"github.com/containers/image/v5/docker/reference"
@@ -165,7 +166,7 @@ func (r *Runtime) newImageBuildCompleteEvent(idOrName string) {
}
// Build adds the runtime to the imagebuildah call
-func (r *Runtime) Build(ctx context.Context, options imagebuildah.BuildOptions, dockerfiles ...string) (string, reference.Canonical, error) {
+func (r *Runtime) Build(ctx context.Context, options buildahDefine.BuildOptions, dockerfiles ...string) (string, reference.Canonical, error) {
if options.Runtime == "" {
// Make sure that build containers use the same runtime as Podman (see #9365).
conf := util.DefaultContainerConfig()
diff --git a/libpod/volume_internal.go b/libpod/volume_internal.go
index c1dbe00fd..694cdd149 100644
--- a/libpod/volume_internal.go
+++ b/libpod/volume_internal.go
@@ -17,6 +17,7 @@ func newVolume(runtime *Runtime) *Volume {
volume.config.Labels = make(map[string]string)
volume.config.Options = make(map[string]string)
volume.state.NeedsCopyUp = true
+ volume.state.NeedsChown = true
return volume
}
diff --git a/libpod/volume_internal_linux.go b/libpod/volume_internal_linux.go
index 67ac41874..92391de1d 100644
--- a/libpod/volume_internal_linux.go
+++ b/libpod/volume_internal_linux.go
@@ -32,8 +32,10 @@ func (v *Volume) mount() error {
return nil
}
- // We cannot mount volumes as rootless.
- if rootless.IsRootless() {
+ // We cannot mount 'local' volumes as rootless.
+ if !v.UsesVolumeDriver() && rootless.IsRootless() {
+ // This check should only be applied to 'local' driver
+ // so Volume Drivers must be excluded
return errors.Wrapf(define.ErrRootless, "cannot mount volumes without root privileges")
}
@@ -137,8 +139,8 @@ func (v *Volume) unmount(force bool) error {
return nil
}
- // We cannot unmount volumes as rootless.
- if rootless.IsRootless() {
+ // We cannot unmount 'local' volumes as rootless.
+ if !v.UsesVolumeDriver() && rootless.IsRootless() {
// If force is set, just clear the counter and bail without
// error, so we can remove volumes from the state if they are in
// an awkward configuration.
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index 7751b91a7..fd310711f 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -13,7 +13,7 @@ import (
"time"
"github.com/containers/buildah"
- "github.com/containers/buildah/imagebuildah"
+ buildahDefine "github.com/containers/buildah/define"
"github.com/containers/buildah/util"
"github.com/containers/image/v5/types"
"github.com/containers/podman/v3/libpod"
@@ -69,7 +69,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
BuildArgs string `schema:"buildargs"`
CacheFrom string `schema:"cachefrom"`
Compression uint64 `schema:"compression"`
- ConfigureNetwork int64 `schema:"networkmode"`
+ ConfigureNetwork string `schema:"networkmode"`
CpuPeriod uint64 `schema:"cpuperiod"` // nolint
CpuQuota int64 `schema:"cpuquota"` // nolint
CpuSetCpus string `schema:"cpusetcpus"` // nolint
@@ -84,7 +84,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
ForceRm bool `schema:"forcerm"`
From string `schema:"from"`
HTTPProxy bool `schema:"httpproxy"`
- Isolation int64 `schema:"isolation"`
+ Isolation string `schema:"isolation"`
Ignore bool `schema:"ignore"`
Jobs int `schema:"jobs"` // nolint
Labels string `schema:"labels"`
@@ -98,6 +98,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
OutputFormat string `schema:"outputformat"`
Platform string `schema:"platform"`
Pull bool `schema:"pull"`
+ PullPolicy string `schema:"pullpolicy"`
Quiet bool `schema:"q"`
Registry string `schema:"registry"`
Rm bool `schema:"rm"`
@@ -199,15 +200,17 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
}
format := buildah.Dockerv2ImageManifest
registry := query.Registry
- isolation := buildah.IsolationChroot
- /*
- // FIXME, This is very broken. Buildah will only work with chroot
- isolation := buildah.IsolationDefault
- */
+ isolation := buildah.IsolationDefault
if utils.IsLibpodRequest(r) {
- // isolation = buildah.Isolation(query.Isolation)
+ isolation = parseLibPodIsolation(query.Isolation)
registry = ""
format = query.OutputFormat
+ } else {
+ if _, found := r.URL.Query()["isolation"]; found {
+ if query.Isolation != "" && query.Isolation != "default" {
+ logrus.Debugf("invalid `isolation` parameter: %q", query.Isolation)
+ }
+ }
}
var additionalTags []string
if len(query.Tag) > 1 {
@@ -273,10 +276,14 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
jobs = query.Jobs
}
- pullPolicy := buildah.PullIfMissing
- if _, found := r.URL.Query()["pull"]; found {
- if query.Pull {
- pullPolicy = buildah.PullAlways
+ pullPolicy := buildahDefine.PullIfMissing
+ if utils.IsLibpodRequest(r) {
+ pullPolicy = buildahDefine.PolicyMap[query.PullPolicy]
+ } else {
+ if _, found := r.URL.Query()["pull"]; found {
+ if query.Pull {
+ pullPolicy = buildahDefine.PullAlways
+ }
}
}
@@ -307,7 +314,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Decode()"))
return
}
- buildOptions := imagebuildah.BuildOptions{
+ buildOptions := buildahDefine.BuildOptions{
AddCapabilities: addCaps,
AdditionalTags: additionalTags,
Annotations: annotations,
@@ -329,7 +336,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
CNIConfigDir: rtc.Network.CNIPluginDirs[0],
CNIPluginPath: util.DefaultCNIPluginPath,
Compression: compression,
- ConfigureNetwork: buildah.NetworkConfigurationPolicy(query.ConfigureNetwork),
+ ConfigureNetwork: parseNetworkConfigurationPolicy(query.ConfigureNetwork),
ContextDirectory: contextDirectory,
Devices: devices,
DropCapabilities: dropCaps,
@@ -459,6 +466,40 @@ loop:
}
}
+func parseNetworkConfigurationPolicy(network string) buildah.NetworkConfigurationPolicy {
+ if val, err := strconv.Atoi(network); err == nil {
+ return buildah.NetworkConfigurationPolicy(val)
+ }
+ switch network {
+ case "NetworkDefault":
+ return buildah.NetworkDefault
+ case "NetworkDisabled":
+ return buildah.NetworkDisabled
+ case "NetworkEnabled":
+ return buildah.NetworkEnabled
+ default:
+ return buildah.NetworkDefault
+ }
+}
+
+func parseLibPodIsolation(isolation string) buildah.Isolation { // nolint
+ if val, err := strconv.Atoi(isolation); err == nil {
+ return buildah.Isolation(val)
+ }
+ switch isolation {
+ case "IsolationDefault", "default":
+ return buildah.IsolationDefault
+ case "IsolationOCI":
+ return buildah.IsolationOCI
+ case "IsolationChroot":
+ return buildah.IsolationChroot
+ case "IsolationOCIRootless":
+ return buildah.IsolationOCIRootless
+ default:
+ return buildah.IsolationDefault
+ }
+}
+
func extractTarFile(r *http.Request) (string, error) {
// build a home for the request body
anchorDir, err := ioutil.TempDir("", "libpod_builder")
diff --git a/pkg/api/handlers/compat/images_prune.go b/pkg/api/handlers/compat/images_prune.go
index 63daaa780..ddf559ec6 100644
--- a/pkg/api/handlers/compat/images_prune.go
+++ b/pkg/api/handlers/compat/images_prune.go
@@ -8,8 +8,8 @@ import (
"github.com/containers/podman/v3/libpod"
"github.com/containers/podman/v3/pkg/api/handlers"
"github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/docker/docker/api/types"
- "github.com/gorilla/schema"
"github.com/pkg/errors"
)
@@ -17,27 +17,20 @@ func PruneImages(w http.ResponseWriter, r *http.Request) {
var (
filters []string
)
- decoder := r.Context().Value("decoder").(*schema.Decoder)
runtime := r.Context().Value("runtime").(*libpod.Runtime)
- query := struct {
- All bool
- Filters map[string][]string `schema:"filters"`
- }{
- // This is where you can override the golang default value for one of fields
- }
-
- if err := decoder.Decode(&query, r.URL.Query()); err != nil {
- utils.Error(w, "Something went wrong.", http.StatusBadRequest, errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String()))
+ filterMap, err := util.PrepareFilters(r)
+ if err != nil {
+ utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String()))
return
}
- for k, v := range query.Filters {
+ for k, v := range *filterMap {
for _, val := range v {
filters = append(filters, fmt.Sprintf("%s=%s", k, val))
}
}
- imagePruneReports, err := runtime.ImageRuntime().PruneImages(r.Context(), query.All, filters)
+ imagePruneReports, err := runtime.ImageRuntime().PruneImages(r.Context(), false, filters)
if err != nil {
utils.InternalServerError(w, err)
return
diff --git a/pkg/api/handlers/compat/images_remove.go b/pkg/api/handlers/compat/images_remove.go
index 874c57f16..e89558a86 100644
--- a/pkg/api/handlers/compat/images_remove.go
+++ b/pkg/api/handlers/compat/images_remove.go
@@ -4,7 +4,10 @@ import (
"net/http"
"github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
@@ -30,28 +33,32 @@ func RemoveImage(w http.ResponseWriter, r *http.Request) {
}
}
name := utils.GetName(r)
- newImage, err := runtime.ImageRuntime().NewFromLocal(name)
- if err != nil {
- utils.ImageNotFound(w, name, errors.Wrapf(err, "failed to find image %s", name))
- return
+ imageEngine := abi.ImageEngine{Libpod: runtime}
+
+ options := entities.ImageRemoveOptions{
+ Force: query.Force,
}
+ report, rmerrors := imageEngine.Remove(r.Context(), []string{name}, options)
+ if len(rmerrors) > 0 && rmerrors[0] != nil {
+ err := rmerrors[0]
+ if errors.Cause(err) == define.ErrNoSuchImage {
+ utils.ImageNotFound(w, name, errors.Wrapf(err, "failed to find image %s", name))
+ return
+ }
- results, err := runtime.RemoveImage(r.Context(), newImage, query.Force)
- if err != nil {
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, err)
return
}
-
- response := make([]map[string]string, 0, len(results.Untagged)+1)
- deleted := make(map[string]string, 1)
- deleted["Deleted"] = results.Deleted
- response = append(response, deleted)
-
- for _, u := range results.Untagged {
+ response := make([]map[string]string, 0, len(report.Untagged)+1)
+ for _, d := range report.Deleted {
+ deleted := make(map[string]string, 1)
+ deleted["Deleted"] = d
+ response = append(response, deleted)
+ }
+ for _, u := range report.Untagged {
untagged := make(map[string]string, 1)
untagged["Untagged"] = u
response = append(response, untagged)
}
-
utils.WriteResponse(w, http.StatusOK, response)
}
diff --git a/pkg/api/handlers/compat/resize.go b/pkg/api/handlers/compat/resize.go
index 1bf7ad460..23ed33a22 100644
--- a/pkg/api/handlers/compat/resize.go
+++ b/pkg/api/handlers/compat/resize.go
@@ -19,8 +19,9 @@ func ResizeTTY(w http.ResponseWriter, r *http.Request) {
// /containers/{id}/resize
query := struct {
- Height uint16 `schema:"h"`
- Width uint16 `schema:"w"`
+ Height uint16 `schema:"h"`
+ Width uint16 `schema:"w"`
+ IgnoreNotRunning bool `schema:"running"`
}{
// override any golang type defaults
}
@@ -48,14 +49,17 @@ func ResizeTTY(w http.ResponseWriter, r *http.Request) {
if state, err := ctnr.State(); err != nil {
utils.InternalServerError(w, errors.Wrapf(err, "cannot obtain container state"))
return
- } else if state != define.ContainerStateRunning {
+ } else if state != define.ContainerStateRunning && !query.IgnoreNotRunning {
utils.Error(w, "Container not running", http.StatusConflict,
fmt.Errorf("container %q in wrong state %q", name, state.String()))
return
}
+ // If container is not running, ignore since this can be a race condition, and is expected
if err := ctnr.AttachResize(sz); err != nil {
- utils.InternalServerError(w, errors.Wrapf(err, "cannot resize container"))
- return
+ if errors.Cause(err) != define.ErrCtrStateInvalid || !query.IgnoreNotRunning {
+ utils.InternalServerError(w, errors.Wrapf(err, "cannot resize container"))
+ return
+ }
}
// This is not a 204, even though we write nothing, for compatibility
// reasons.
@@ -70,14 +74,16 @@ func ResizeTTY(w http.ResponseWriter, r *http.Request) {
if state, err := ctnr.State(); err != nil {
utils.InternalServerError(w, errors.Wrapf(err, "cannot obtain session container state"))
return
- } else if state != define.ContainerStateRunning {
+ } else if state != define.ContainerStateRunning && !query.IgnoreNotRunning {
utils.Error(w, "Container not running", http.StatusConflict,
fmt.Errorf("container %q in wrong state %q", name, state.String()))
return
}
if err := ctnr.ExecResize(name, sz); err != nil {
- utils.InternalServerError(w, errors.Wrapf(err, "cannot resize session"))
- return
+ if errors.Cause(err) != define.ErrCtrStateInvalid || !query.IgnoreNotRunning {
+ utils.InternalServerError(w, errors.Wrapf(err, "cannot resize session"))
+ return
+ }
}
// This is not a 204, even though we write nothing, for compatibility
// reasons.
diff --git a/pkg/api/handlers/compat/version.go b/pkg/api/handlers/compat/version.go
index fae147440..f1cd77a9a 100644
--- a/pkg/api/handlers/compat/version.go
+++ b/pkg/api/handlers/compat/version.go
@@ -10,8 +10,8 @@ import (
"github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/types"
"github.com/containers/podman/v3/version"
- docker "github.com/docker/docker/api/types"
"github.com/pkg/errors"
)
@@ -32,7 +32,7 @@ func VersionHandler(w http.ResponseWriter, r *http.Request) {
return
}
- components := []docker.ComponentVersion{{
+ components := []types.ComponentVersion{{
Name: "Podman Engine",
Version: versionInfo.Version,
Details: map[string]string{
@@ -52,7 +52,7 @@ func VersionHandler(w http.ResponseWriter, r *http.Request) {
minVersion := version.APIVersion[version.Compat][version.MinimalAPI]
utils.WriteResponse(w, http.StatusOK, entities.ComponentVersion{
- Version: docker.Version{
+ Version: types.Version{
Platform: struct {
Name string
}{
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go
index 1f306a533..158babcdc 100644
--- a/pkg/api/handlers/libpod/images.go
+++ b/pkg/api/handlers/libpod/images.go
@@ -22,6 +22,7 @@ import (
"github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/util"
utils2 "github.com/containers/podman/v3/utils"
"github.com/gorilla/schema"
"github.com/pkg/errors"
@@ -125,31 +126,32 @@ func PruneImages(w http.ResponseWriter, r *http.Request) {
runtime := r.Context().Value("runtime").(*libpod.Runtime)
decoder := r.Context().Value("decoder").(*schema.Decoder)
query := struct {
- All bool `schema:"all"`
- Filters map[string][]string `schema:"filters"`
+ All bool `schema:"all"`
}{
// override any golang type defaults
}
- if err := decoder.Decode(&query, r.URL.Query()); err != nil {
- utils.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest,
+ filterMap, err := util.PrepareFilters(r)
+
+ if dErr := decoder.Decode(&query, r.URL.Query()); dErr != nil || err != nil {
+ utils.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError,
errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String()))
return
}
var libpodFilters = []string{}
if _, found := r.URL.Query()["filters"]; found {
- dangling := query.Filters["all"]
+ dangling := (*filterMap)["all"]
if len(dangling) > 0 {
- query.All, err = strconv.ParseBool(query.Filters["all"][0])
+ query.All, err = strconv.ParseBool((*filterMap)["all"][0])
if err != nil {
utils.InternalServerError(w, err)
return
}
}
// dangling is special and not implemented in the libpod side of things
- delete(query.Filters, "dangling")
- for k, v := range query.Filters {
+ delete(*filterMap, "dangling")
+ for k, v := range *filterMap {
libpodFilters = append(libpodFilters, fmt.Sprintf("%s=%s", k, v[0]))
}
}
diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go
index 89a4a451f..4dc8740e2 100644
--- a/pkg/api/handlers/libpod/pods.go
+++ b/pkg/api/handlers/libpod/pods.go
@@ -44,13 +44,9 @@ func PodCreate(w http.ResponseWriter, r *http.Request) {
func Pods(w http.ResponseWriter, r *http.Request) {
runtime := r.Context().Value("runtime").(*libpod.Runtime)
- decoder := r.Context().Value("decoder").(*schema.Decoder)
- query := struct {
- Filters map[string][]string `schema:"filters"`
- }{
- // override any golang type defaults
- }
- if err := decoder.Decode(&query, r.URL.Query()); err != nil {
+
+ filterMap, err := util.PrepareFilters(r)
+ if err != nil {
utils.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest,
errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String()))
return
@@ -58,7 +54,7 @@ func Pods(w http.ResponseWriter, r *http.Request) {
containerEngine := abi.ContainerEngine{Libpod: runtime}
podPSOptions := entities.PodPSOptions{
- Filters: query.Filters,
+ Filters: *filterMap,
}
pods, err := containerEngine.PodPs(r.Context(), podPSOptions)
if err != nil {
diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go
index f5eaf6f6d..736203171 100644
--- a/pkg/api/handlers/types.go
+++ b/pkg/api/handlers/types.go
@@ -28,10 +28,6 @@ type ContainerConfig struct {
dockerContainer.Config
}
-type LibpodImagesLoadReport struct {
- ID string `json:"id"`
-}
-
type LibpodImagesPullReport struct {
entities.ImagePullReport
}
diff --git a/pkg/api/handlers/types/types.go b/pkg/api/handlers/types/types.go
new file mode 100644
index 000000000..71165364f
--- /dev/null
+++ b/pkg/api/handlers/types/types.go
@@ -0,0 +1,23 @@
+package types
+
+import (
+ "github.com/containers/podman/v3/pkg/domain/entities"
+)
+
+// LibpodImagesRemoveReport is the return type for image removal via the rest
+// api.
+type LibpodImagesRemoveReport struct {
+ entities.ImageRemoveReport
+ // Image removal requires is to return data and an error.
+ Errors []string
+}
+
+// HistoryResponse provides details on image layers
+type HistoryResponse struct {
+ ID string `json:"Id"`
+ Created int64
+ CreatedBy string
+ Tags []string
+ Size int64
+ Comment string
+}
diff --git a/pkg/api/handlers/utils/images.go b/pkg/api/handlers/utils/images.go
index 743629db8..da3c9e985 100644
--- a/pkg/api/handlers/utils/images.go
+++ b/pkg/api/handlers/utils/images.go
@@ -11,6 +11,7 @@ import (
"github.com/containers/image/v5/types"
"github.com/containers/podman/v3/libpod"
"github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
@@ -58,13 +59,17 @@ func GetImages(w http.ResponseWriter, r *http.Request) ([]*image.Image, error) {
runtime := r.Context().Value("runtime").(*libpod.Runtime)
query := struct {
All bool
- Filters map[string][]string `schema:"filters"`
Digests bool
Filter string // Docker 1.24 compatibility
}{
// This is where you can override the golang default value for one of fields
}
+ filterMap, err := util.PrepareFilters(r)
+ if err != nil {
+ return nil, err
+ }
+
if err := decoder.Decode(&query, r.URL.Query()); err != nil {
return nil, err
}
@@ -72,12 +77,9 @@ func GetImages(w http.ResponseWriter, r *http.Request) ([]*image.Image, error) {
if _, found := r.URL.Query()["digests"]; found && query.Digests {
UnSupportedParameter("digests")
}
- var (
- images []*image.Image
- err error
- )
+ var images []*image.Image
- queryFilters := query.Filters
+ queryFilters := *filterMap
if !IsLibpodRequest(r) && len(query.Filter) > 0 { // Docker 1.24 compatibility
if queryFilters == nil {
queryFilters = make(map[string][]string)
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go
index 31196aa9e..b379d52ce 100644
--- a/pkg/api/server/register_containers.go
+++ b/pkg/api/server/register_containers.go
@@ -587,6 +587,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// type: integer
// required: false
// description: Width to set for the terminal, in characters
+ // - in: query
+ // name: running
+ // type: boolean
+ // required: false
+ // description: Ignore containers not running errors
// produces:
// - application/json
// responses:
diff --git a/pkg/api/server/register_exec.go b/pkg/api/server/register_exec.go
index 0f8c827c8..de437ab1a 100644
--- a/pkg/api/server/register_exec.go
+++ b/pkg/api/server/register_exec.go
@@ -136,6 +136,11 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// name: w
// type: integer
// description: Width of the TTY session in characters
+ // - in: query
+ // name: running
+ // type: boolean
+ // required: false
+ // description: Ignore containers not running errors
// produces:
// - application/json
// responses:
diff --git a/pkg/api/server/swagger.go b/pkg/api/server/swagger.go
index 12fd083bb..d282edf23 100644
--- a/pkg/api/server/swagger.go
+++ b/pkg/api/server/swagger.go
@@ -205,7 +205,7 @@ type swagHealthCheckRunResponse struct {
type swagVersion struct {
// in:body
Body struct {
- entities.SystemVersionReport
+ entities.ComponentVersion
}
}
diff --git a/pkg/bindings/containers/attach.go b/pkg/bindings/containers/attach.go
index f48b99a95..fd8a7011d 100644
--- a/pkg/bindings/containers/attach.go
+++ b/pkg/bindings/containers/attach.go
@@ -307,6 +307,7 @@ func resizeTTY(ctx context.Context, endpoint string, height *int, width *int) er
if width != nil {
params.Set("w", strconv.Itoa(*width))
}
+ params.Set("running", "true")
rsp, err := conn.DoRequest(nil, http.MethodPost, endpoint, params, nil)
if err != nil {
return err
@@ -336,7 +337,7 @@ func attachHandleResize(ctx, winCtx context.Context, winChange chan os.Signal, i
case <-winCtx.Done():
return
case <-winChange:
- h, w, err := terminal.GetSize(int(file.Fd()))
+ w, h, err := terminal.GetSize(int(file.Fd()))
if err != nil {
logrus.Warnf("failed to obtain TTY size: %v", err)
}
diff --git a/pkg/bindings/containers/types.go b/pkg/bindings/containers/types.go
index 2d0e65bb4..f63e35bf1 100644
--- a/pkg/bindings/containers/types.go
+++ b/pkg/bindings/containers/types.go
@@ -210,8 +210,9 @@ type RenameOptions struct {
// ResizeTTYOptions are optional options for resizing
// container TTYs
type ResizeTTYOptions struct {
- Height *int
- Width *int
+ Height *int
+ Width *int
+ Running *bool
}
//go:generate go run ../generator/generator.go ResizeExecTTYOptions
diff --git a/pkg/bindings/containers/types_resizetty_options.go b/pkg/bindings/containers/types_resizetty_options.go
index 68527b330..94946692f 100644
--- a/pkg/bindings/containers/types_resizetty_options.go
+++ b/pkg/bindings/containers/types_resizetty_options.go
@@ -51,3 +51,19 @@ func (o *ResizeTTYOptions) GetWidth() int {
}
return *o.Width
}
+
+// WithRunning
+func (o *ResizeTTYOptions) WithRunning(value bool) *ResizeTTYOptions {
+ v := &value
+ o.Running = v
+ return o
+}
+
+// GetRunning
+func (o *ResizeTTYOptions) GetRunning() bool {
+ var running bool
+ if o.Running == nil {
+ return running
+ }
+ return *o.Running
+}
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index 9d77883f9..c79d79136 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -15,7 +15,6 @@ import (
"strconv"
"strings"
- "github.com/containers/buildah"
"github.com/containers/podman/v3/pkg/auth"
"github.com/containers/podman/v3/pkg/bindings"
"github.com/containers/podman/v3/pkg/domain/entities"
@@ -175,9 +174,8 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
if len(platform) > 0 {
params.Set("platform", platform)
}
- if options.PullPolicy == buildah.PullAlways {
- params.Set("pull", "1")
- }
+ params.Set("pullpolicy", options.PullPolicy.String())
+
if options.Quiet {
params.Set("q", "1")
}
diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go
index 1be2bdfdd..8680d6baa 100644
--- a/pkg/bindings/images/images.go
+++ b/pkg/bindings/images/images.go
@@ -8,7 +8,7 @@ import (
"net/url"
"strconv"
- "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/types"
"github.com/containers/podman/v3/pkg/auth"
"github.com/containers/podman/v3/pkg/bindings"
"github.com/containers/podman/v3/pkg/domain/entities"
@@ -96,12 +96,12 @@ func Tree(ctx context.Context, nameOrID string, options *TreeOptions) (*entities
}
// History returns the parent layers of an image.
-func History(ctx context.Context, nameOrID string, options *HistoryOptions) ([]*handlers.HistoryResponse, error) {
+func History(ctx context.Context, nameOrID string, options *HistoryOptions) ([]*types.HistoryResponse, error) {
if options == nil {
options = new(HistoryOptions)
}
_ = options
- var history []*handlers.HistoryResponse
+ var history []*types.HistoryResponse
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err
diff --git a/pkg/bindings/images/rm.go b/pkg/bindings/images/rm.go
index beecce7bf..e45e583f4 100644
--- a/pkg/bindings/images/rm.go
+++ b/pkg/bindings/images/rm.go
@@ -4,7 +4,7 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/types"
"github.com/containers/podman/v3/pkg/bindings"
"github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/podman/v3/pkg/errorhandling"
@@ -19,7 +19,7 @@ func Remove(ctx context.Context, images []string, options *RemoveOptions) (*enti
// FIXME - bindings tests are missing for this endpoint. Once the CI is
// re-enabled for bindings, we need to add them. At the time of writing,
// the tests don't compile.
- var report handlers.LibpodImagesRemoveReport
+ var report types.LibpodImagesRemoveReport
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, []error{err}
diff --git a/pkg/bindings/images/types.go b/pkg/bindings/images/types.go
index 7bf70c82b..1f3e46729 100644
--- a/pkg/bindings/images/types.go
+++ b/pkg/bindings/images/types.go
@@ -1,7 +1,7 @@
package images
import (
- "github.com/containers/buildah/imagebuildah"
+ buildahDefine "github.com/containers/buildah/define"
)
//go:generate go run ../generator/generator.go RemoveOptions
@@ -162,7 +162,7 @@ type PullOptions struct {
//BuildOptions are optional options for building images
type BuildOptions struct {
- imagebuildah.BuildOptions
+ buildahDefine.BuildOptions
}
//go:generate go run ../generator/generator.go ExistsOptions
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index 7999d8209..3cc46ed0a 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -8,33 +8,32 @@ import (
"github.com/containers/image/v5/types"
"github.com/containers/podman/v3/pkg/inspect"
"github.com/containers/podman/v3/pkg/trust"
- docker "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
)
type Image struct {
- ID string `json:"Id"`
- RepoTags []string `json:",omitempty"`
- RepoDigests []string `json:",omitempty"`
- Parent string `json:",omitempty"`
- Comment string `json:",omitempty"`
- Created string `json:",omitempty"`
- Container string `json:",omitempty"`
- ContainerConfig *container.Config `json:",omitempty"`
- DockerVersion string `json:",omitempty"`
- Author string `json:",omitempty"`
- Config *container.Config `json:",omitempty"`
- Architecture string `json:",omitempty"`
- Variant string `json:",omitempty"`
- Os string `json:",omitempty"`
- OsVersion string `json:",omitempty"`
- Size int64 `json:",omitempty"`
- VirtualSize int64 `json:",omitempty"`
- GraphDriver docker.GraphDriverData `json:",omitempty"`
- RootFS docker.RootFS `json:",omitempty"`
- Metadata docker.ImageMetadata `json:",omitempty"`
+ ID string `json:"Id"`
+ RepoTags []string `json:",omitempty"`
+ RepoDigests []string `json:",omitempty"`
+ Parent string `json:",omitempty"`
+ Comment string `json:",omitempty"`
+ Created string `json:",omitempty"`
+ Container string `json:",omitempty"`
+ ContainerConfig *container.Config `json:",omitempty"`
+ DockerVersion string `json:",omitempty"`
+ Author string `json:",omitempty"`
+ Config *container.Config `json:",omitempty"`
+ Architecture string `json:",omitempty"`
+ Variant string `json:",omitempty"`
+ Os string `json:",omitempty"`
+ OsVersion string `json:",omitempty"`
+ Size int64 `json:",omitempty"`
+ VirtualSize int64 `json:",omitempty"`
+ GraphDriver string `json:",omitempty"`
+ RootFS string `json:",omitempty"`
+ Metadata string `json:",omitempty"`
// Podman extensions
Digest digest.Digest `json:",omitempty"`
diff --git a/pkg/domain/entities/system.go b/pkg/domain/entities/system.go
index 4b8383613..1a671d59e 100644
--- a/pkg/domain/entities/system.go
+++ b/pkg/domain/entities/system.go
@@ -5,7 +5,7 @@ import (
"github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/pkg/domain/entities/reports"
- "github.com/docker/docker/api/types"
+ "github.com/containers/podman/v3/pkg/domain/entities/types"
"github.com/spf13/cobra"
)
diff --git a/pkg/domain/entities/types.go b/pkg/domain/entities/types.go
index 9efc64c93..02e374111 100644
--- a/pkg/domain/entities/types.go
+++ b/pkg/domain/entities/types.go
@@ -3,7 +3,7 @@ package entities
import (
"net"
- "github.com/containers/buildah/imagebuildah"
+ buildahDefine "github.com/containers/buildah/define"
"github.com/containers/podman/v3/libpod/events"
"github.com/containers/podman/v3/pkg/specgen"
"github.com/containers/storage/pkg/archive"
@@ -91,7 +91,7 @@ type ContainerCreateResponse struct {
// BuildOptions describe the options for building container images.
type BuildOptions struct {
- imagebuildah.BuildOptions
+ buildahDefine.BuildOptions
}
// BuildReport is the image-build report.
diff --git a/pkg/domain/entities/types/auth.go b/pkg/domain/entities/types/auth.go
new file mode 100644
index 000000000..ddf15bb18
--- /dev/null
+++ b/pkg/domain/entities/types/auth.go
@@ -0,0 +1,22 @@
+package types // import "github.com/docker/docker/api/types"
+
+// AuthConfig contains authorization information for connecting to a Registry
+type AuthConfig struct {
+ Username string `json:"username,omitempty"`
+ Password string `json:"password,omitempty"`
+ Auth string `json:"auth,omitempty"`
+
+ // Email is an optional value associated with the username.
+ // This field is deprecated and will be removed in a later
+ // version of docker.
+ Email string `json:"email,omitempty"`
+
+ ServerAddress string `json:"serveraddress,omitempty"`
+
+ // IdentityToken is used to authenticate the user and get
+ // an access token for the registry.
+ IdentityToken string `json:"identitytoken,omitempty"`
+
+ // RegistryToken is a bearer token to be sent to a registry
+ RegistryToken string `json:"registrytoken,omitempty"`
+}
diff --git a/pkg/domain/entities/types/types.go b/pkg/domain/entities/types/types.go
new file mode 100644
index 000000000..77834c0cb
--- /dev/null
+++ b/pkg/domain/entities/types/types.go
@@ -0,0 +1,28 @@
+package types // import "github.com/docker/docker/api/types"
+
+// ComponentVersion describes the version information for a specific component.
+type ComponentVersion struct {
+ Name string
+ Version string
+ Details map[string]string `json:",omitempty"`
+}
+
+// Version contains response of Engine API:
+// GET "/version"
+type Version struct {
+ Platform struct{ Name string } `json:",omitempty"`
+ Components []ComponentVersion `json:",omitempty"`
+
+ // The following fields are deprecated, they relate to the Engine component and are kept for backwards compatibility
+
+ Version string
+ APIVersion string `json:"ApiVersion"`
+ MinAPIVersion string `json:"MinAPIVersion,omitempty"`
+ GitCommit string
+ GoVersion string
+ Os string
+ Arch string
+ KernelVersion string `json:",omitempty"`
+ Experimental bool `json:",omitempty"`
+ BuildTime string `json:",omitempty"`
+}
diff --git a/pkg/domain/entities/volumes.go b/pkg/domain/entities/volumes.go
index beb2a75ac..55a6a1b14 100644
--- a/pkg/domain/entities/volumes.go
+++ b/pkg/domain/entities/volumes.go
@@ -4,10 +4,72 @@ import (
"net/url"
"github.com/containers/podman/v3/libpod/define"
- docker_api_types "github.com/docker/docker/api/types"
- docker_api_types_volume "github.com/docker/docker/api/types/volume"
)
+// Volume volume
+// swagger:model Volume
+type volume struct {
+
+ // Date/Time the volume was created.
+ CreatedAt string `json:"CreatedAt,omitempty"`
+
+ // Name of the volume driver used by the volume.
+ // Required: true
+ Driver string `json:"Driver"`
+
+ // User-defined key/value metadata.
+ // Required: true
+ Labels map[string]string `json:"Labels"`
+
+ // Mount path of the volume on the host.
+ // Required: true
+ Mountpoint string `json:"Mountpoint"`
+
+ // Name of the volume.
+ // Required: true
+ Name string `json:"Name"`
+
+ // The driver specific options used when creating the volume.
+ //
+ // Required: true
+ Options map[string]string `json:"Options"`
+
+ // The level at which the volume exists. Either `global` for cluster-wide,
+ // or `local` for machine level.
+ //
+ // Required: true
+ Scope string `json:"Scope"`
+
+ // Low-level details about the volume, provided by the volume driver.
+ // Details are returned as a map with key/value pairs:
+ // `{"key":"value","key2":"value2"}`.
+ //
+ // The `Status` field is optional, and is omitted if the volume driver
+ // does not support this feature.
+ //
+ Status map[string]interface{} `json:"Status,omitempty"`
+
+ // usage data
+ UsageData *VolumeUsageData `json:"UsageData,omitempty"`
+}
+
+type VolumeUsageData struct {
+
+ // The number of containers referencing this volume. This field
+ // is set to `-1` if the reference-count is not available.
+ //
+ // Required: true
+ RefCount int64 `json:"RefCount"`
+
+ // Amount of disk space used by the volume (in bytes). This information
+ // is only available for volumes created with the `"local"` volume
+ // driver. For volumes created with other volume drivers, this field
+ // is set to `-1` ("not available")
+ //
+ // Required: true
+ Size int64 `json:"Size"`
+}
+
// swagger:model VolumeCreate
type VolumeCreateOptions struct {
// New volume's name. Can be left blank
@@ -113,14 +175,14 @@ type SwagVolumeListResponse struct {
*/
// swagger:model DockerVolumeCreate
-type DockerVolumeCreate docker_api_types_volume.VolumeCreateBody
+type DockerVolumeCreate VolumeCreateBody
// This response definition is used for both the create and inspect endpoints
// swagger:response DockerVolumeInfoResponse
type SwagDockerVolumeInfoResponse struct {
// in:body
Body struct {
- docker_api_types.Volume
+ volume
}
}
@@ -129,6 +191,30 @@ type SwagDockerVolumeInfoResponse struct {
type SwagDockerVolumePruneResponse struct {
// in:body
Body struct {
- docker_api_types.VolumesPruneReport
+ // docker_api_types.VolumesPruneReport
}
}
+
+// VolumeCreateBody Volume configuration
+// swagger:model VolumeCreateBody
+type VolumeCreateBody struct {
+
+ // Name of the volume driver to use.
+ // Required: true
+ Driver string `json:"Driver"`
+
+ // A mapping of driver options and values. These options are
+ // passed directly to the driver and are driver specific.
+ //
+ // Required: true
+ DriverOpts map[string]string `json:"DriverOpts"`
+
+ // User-defined key/value metadata.
+ // Required: true
+ Labels map[string]string `json:"Labels"`
+
+ // The new volume's name. If not specified, Docker generates a name.
+ //
+ // Required: true
+ Name string `json:"Name"`
+}
diff --git a/pkg/domain/filters/containers.go b/pkg/domain/filters/containers.go
index 02727e841..84cf03764 100644
--- a/pkg/domain/filters/containers.go
+++ b/pkg/domain/filters/containers.go
@@ -23,27 +23,7 @@ func GenerateContainerFilterFuncs(filter string, filterValues []string, r *libpo
case "label":
// we have to match that all given labels exits on that container
return func(c *libpod.Container) bool {
- labels := c.Labels()
- for _, filterValue := range filterValues {
- matched := false
- filterArray := strings.SplitN(filterValue, "=", 2)
- filterKey := filterArray[0]
- if len(filterArray) > 1 {
- filterValue = filterArray[1]
- } else {
- filterValue = ""
- }
- for labelKey, labelValue := range labels {
- if labelKey == filterKey && (filterValue == "" || labelValue == filterValue) {
- matched = true
- break
- }
- }
- if !matched {
- return false
- }
- }
- return true
+ return util.MatchLabelFilters(filterValues, c.Labels())
}, nil
case "name":
// we only have to match one name
@@ -185,7 +165,7 @@ func GenerateContainerFilterFuncs(filter string, filterValues []string, r *libpo
return false
}, nil
case "until":
- until, err := util.ComputeUntilTimestamp(filter, filterValues)
+ until, err := util.ComputeUntilTimestamp(filterValues)
if err != nil {
return nil, err
}
diff --git a/pkg/domain/filters/pods.go b/pkg/domain/filters/pods.go
index 0490a4848..9a1c7d19d 100644
--- a/pkg/domain/filters/pods.go
+++ b/pkg/domain/filters/pods.go
@@ -114,26 +114,7 @@ func GeneratePodFilterFunc(filter string, filterValues []string) (
case "label":
return func(p *libpod.Pod) bool {
labels := p.Labels()
- for _, filterValue := range filterValues {
- matched := false
- filterArray := strings.SplitN(filterValue, "=", 2)
- filterKey := filterArray[0]
- if len(filterArray) > 1 {
- filterValue = filterArray[1]
- } else {
- filterValue = ""
- }
- for labelKey, labelValue := range labels {
- if labelKey == filterKey && (filterValue == "" || labelValue == filterValue) {
- matched = true
- break
- }
- }
- if !matched {
- return false
- }
- }
- return true
+ return util.MatchLabelFilters(filterValues, labels)
}, nil
case "network":
return func(p *libpod.Pod) bool {
diff --git a/pkg/domain/filters/volumes.go b/pkg/domain/filters/volumes.go
index bc1756cf5..9b2fc5280 100644
--- a/pkg/domain/filters/volumes.go
+++ b/pkg/domain/filters/volumes.go
@@ -5,6 +5,7 @@ import (
"strings"
"github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
@@ -29,21 +30,9 @@ func GenerateVolumeFilters(filters url.Values) ([]libpod.VolumeFilter, error) {
return v.Scope() == scopeVal
})
case "label":
- filterArray := strings.SplitN(val, "=", 2)
- filterKey := filterArray[0]
- var filterVal string
- if len(filterArray) > 1 {
- filterVal = filterArray[1]
- } else {
- filterVal = ""
- }
+ filter := val
vf = append(vf, func(v *libpod.Volume) bool {
- for labelKey, labelValue := range v.Labels() {
- if labelKey == filterKey && (filterVal == "" || labelValue == filterVal) {
- return true
- }
- }
- return false
+ return util.MatchLabelFilters([]string{filter}, v.Labels())
})
case "opt":
filterArray := strings.SplitN(val, "=", 2)
diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go
index 161becbfa..94f649e15 100644
--- a/pkg/domain/infra/abi/generate.go
+++ b/pkg/domain/infra/abi/generate.go
@@ -44,11 +44,10 @@ func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string,
func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string, options entities.GenerateKubeOptions) (*entities.GenerateKubeReport, error) {
var (
pods []*libpod.Pod
- podYAML *k8sAPI.Pod
- err error
ctrs []*libpod.Container
- servicePorts []k8sAPI.ServicePort
- serviceYAML k8sAPI.Service
+ kubePods []*k8sAPI.Pod
+ kubeServices []k8sAPI.Service
+ content []byte
)
for _, nameOrID := range nameOrIDs {
// Get the container in question
@@ -59,9 +58,6 @@ func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string,
return nil, err
}
pods = append(pods, pod)
- if len(pods) > 1 {
- return nil, errors.New("can only generate single pod at a time")
- }
} else {
if len(ctr.Dependencies()) > 0 {
return nil, errors.Wrapf(define.ErrNotImplemented, "containers with dependencies")
@@ -79,20 +75,29 @@ func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string,
return nil, errors.New("cannot generate pods and containers at the same time")
}
- if len(pods) == 1 {
- podYAML, servicePorts, err = pods[0].GenerateForKube()
+ if len(pods) >= 1 {
+ pos, svcs, err := getKubePods(pods, options.Service)
+ if err != nil {
+ return nil, err
+ }
+
+ kubePods = append(kubePods, pos...)
+ if options.Service {
+ kubeServices = append(kubeServices, svcs...)
+ }
} else {
- podYAML, err = libpod.GenerateForKube(ctrs)
- }
- if err != nil {
- return nil, err
- }
+ po, err := libpod.GenerateForKube(ctrs)
+ if err != nil {
+ return nil, err
+ }
- if options.Service {
- serviceYAML = libpod.GenerateKubeServiceFromV1Pod(podYAML, servicePorts)
+ kubePods = append(kubePods, po)
+ if options.Service {
+ kubeServices = append(kubeServices, libpod.GenerateKubeServiceFromV1Pod(po, []k8sAPI.ServicePort{}))
+ }
}
- content, err := generateKubeOutput(podYAML, &serviceYAML, options.Service)
+ content, err := generateKubeOutput(kubePods, kubeServices, options.Service)
if err != nil {
return nil, err
}
@@ -100,24 +105,56 @@ func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string,
return &entities.GenerateKubeReport{Reader: bytes.NewReader(content)}, nil
}
-func generateKubeOutput(podYAML *k8sAPI.Pod, serviceYAML *k8sAPI.Service, hasService bool) ([]byte, error) {
- var (
- output []byte
- marshalledPod []byte
- marshalledService []byte
- err error
- )
+func getKubePods(pods []*libpod.Pod, getService bool) ([]*k8sAPI.Pod, []k8sAPI.Service, error) {
+ kubePods := make([]*k8sAPI.Pod, 0)
+ kubeServices := make([]k8sAPI.Service, 0)
- marshalledPod, err = yaml.Marshal(podYAML)
- if err != nil {
- return nil, err
+ for _, p := range pods {
+ po, svc, err := p.GenerateForKube()
+ if err != nil {
+ return nil, nil, err
+ }
+
+ kubePods = append(kubePods, po)
+ if getService {
+ kubeServices = append(kubeServices, libpod.GenerateKubeServiceFromV1Pod(po, svc))
+ }
}
- if hasService {
- marshalledService, err = yaml.Marshal(serviceYAML)
+ return kubePods, kubeServices, nil
+}
+
+func generateKubeOutput(kubePods []*k8sAPI.Pod, kubeServices []k8sAPI.Service, hasService bool) ([]byte, error) {
+ output := make([]byte, 0)
+ marshalledPods := make([]byte, 0)
+ marshalledServices := make([]byte, 0)
+
+ for i, p := range kubePods {
+ if i != 0 {
+ marshalledPods = append(marshalledPods, []byte("---\n")...)
+ }
+
+ b, err := yaml.Marshal(p)
if err != nil {
return nil, err
}
+
+ marshalledPods = append(marshalledPods, b...)
+ }
+
+ if hasService {
+ for i, s := range kubeServices {
+ if i != 0 {
+ marshalledServices = append(marshalledServices, []byte("---\n")...)
+ }
+
+ b, err := yaml.Marshal(s)
+ if err != nil {
+ return nil, err
+ }
+
+ marshalledServices = append(marshalledServices, b...)
+ }
}
header := `# Generation of Kubernetes YAML is still under development!
@@ -133,11 +170,12 @@ func generateKubeOutput(podYAML *k8sAPI.Pod, serviceYAML *k8sAPI.Service, hasSer
}
output = append(output, []byte(fmt.Sprintf(header, podmanVersion.Version))...)
- output = append(output, marshalledPod...)
+ // kube generate order is based on helm install order (service, pod...)
if hasService {
+ output = append(output, marshalledServices...)
output = append(output, []byte("---\n")...)
- output = append(output, marshalledService...)
}
+ output = append(output, marshalledPods...)
return output, nil
}
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index efc7c86e3..3b5c141d7 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -1,6 +1,7 @@
package abi
import (
+ "bytes"
"context"
"fmt"
"io"
@@ -8,6 +9,7 @@ import (
"os"
"strings"
+ "github.com/containers/common/pkg/secrets"
"github.com/containers/image/v5/types"
"github.com/containers/podman/v3/libpod"
"github.com/containers/podman/v3/libpod/define"
@@ -20,46 +22,79 @@ import (
"github.com/ghodss/yaml"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
+ yamlv3 "gopkg.in/yaml.v3"
v1apps "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
)
func (ic *ContainerEngine) PlayKube(ctx context.Context, path string, options entities.PlayKubeOptions) (*entities.PlayKubeReport, error) {
- var (
- kubeObject v1.ObjectReference
- )
+ report := &entities.PlayKubeReport{}
+ validKinds := 0
+ // read yaml document
content, err := ioutil.ReadFile(path)
if err != nil {
return nil, err
}
- if err := yaml.Unmarshal(content, &kubeObject); err != nil {
- return nil, errors.Wrapf(err, "unable to read %q as YAML", path)
+ // split yaml document
+ documentList, err := splitMultiDocYAML(content)
+ if err != nil {
+ return nil, err
}
- // NOTE: pkg/bindings/play is also parsing the file.
- // A pkg/kube would be nice to refactor and abstract
- // parts of the K8s-related code.
- switch kubeObject.Kind {
- case "Pod":
- var podYAML v1.Pod
- var podTemplateSpec v1.PodTemplateSpec
- if err := yaml.Unmarshal(content, &podYAML); err != nil {
- return nil, errors.Wrapf(err, "unable to read YAML %q as Kube Pod", path)
+ // create pod on each document if it is a pod or deployment
+ // any other kube kind will be skipped
+ for _, document := range documentList {
+ kind, err := getKubeKind(document)
+ if err != nil {
+ return nil, errors.Wrapf(err, "unable to read %q as kube YAML", path)
}
- podTemplateSpec.ObjectMeta = podYAML.ObjectMeta
- podTemplateSpec.Spec = podYAML.Spec
- return ic.playKubePod(ctx, podTemplateSpec.ObjectMeta.Name, &podTemplateSpec, options)
- case "Deployment":
- var deploymentYAML v1apps.Deployment
- if err := yaml.Unmarshal(content, &deploymentYAML); err != nil {
- return nil, errors.Wrapf(err, "unable to read YAML %q as Kube Deployment", path)
+
+ switch kind {
+ case "Pod":
+ var podYAML v1.Pod
+ var podTemplateSpec v1.PodTemplateSpec
+
+ if err := yaml.Unmarshal(document, &podYAML); err != nil {
+ return nil, errors.Wrapf(err, "unable to read YAML %q as Kube Pod", path)
+ }
+
+ podTemplateSpec.ObjectMeta = podYAML.ObjectMeta
+ podTemplateSpec.Spec = podYAML.Spec
+
+ r, err := ic.playKubePod(ctx, podTemplateSpec.ObjectMeta.Name, &podTemplateSpec, options)
+ if err != nil {
+ return nil, err
+ }
+
+ report.Pods = append(report.Pods, r.Pods...)
+ validKinds++
+ case "Deployment":
+ var deploymentYAML v1apps.Deployment
+
+ if err := yaml.Unmarshal(document, &deploymentYAML); err != nil {
+ return nil, errors.Wrapf(err, "unable to read YAML %q as Kube Deployment", path)
+ }
+
+ r, err := ic.playKubeDeployment(ctx, &deploymentYAML, options)
+ if err != nil {
+ return nil, err
+ }
+
+ report.Pods = append(report.Pods, r.Pods...)
+ validKinds++
+ default:
+ logrus.Infof("kube kind %s not supported", kind)
+ continue
}
- return ic.playKubeDeployment(ctx, &deploymentYAML, options)
- default:
- return nil, errors.Errorf("invalid YAML kind: %q. [Pod|Deployment] are the only supported Kubernetes Kinds", kubeObject.Kind)
}
+
+ if validKinds == 0 {
+ return nil, fmt.Errorf("YAML document does not contain any supported kube kind")
+ }
+
+ return report, nil
}
func (ic *ContainerEngine) playKubeDeployment(ctx context.Context, deploymentYAML *v1apps.Deployment, options entities.PlayKubeOptions) (*entities.PlayKubeReport, error) {
@@ -101,6 +136,12 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
report entities.PlayKubeReport
)
+ // Create the secret manager before hand
+ secretsManager, err := secrets.NewManager(ic.Libpod.GetSecretsStorageDir())
+ if err != nil {
+ return nil, err
+ }
+
// check for name collision between pod and container
if podName == "" {
return nil, errors.Errorf("pod does not have a name")
@@ -227,16 +268,17 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
}
specgenOpts := kube.CtrSpecGenOptions{
- Container: container,
- Image: newImage,
- Volumes: volumes,
- PodID: pod.ID(),
- PodName: podName,
- PodInfraID: podInfraID,
- ConfigMaps: configMaps,
- SeccompPaths: seccompPaths,
- RestartPolicy: ctrRestartPolicy,
- NetNSIsHost: p.NetNS.IsHost(),
+ Container: container,
+ Image: newImage,
+ Volumes: volumes,
+ PodID: pod.ID(),
+ PodName: podName,
+ PodInfraID: podInfraID,
+ ConfigMaps: configMaps,
+ SeccompPaths: seccompPaths,
+ RestartPolicy: ctrRestartPolicy,
+ NetNSIsHost: p.NetNS.IsHost(),
+ SecretsManager: secretsManager,
}
specGen, err := kube.ToSpecGen(ctx, &specgenOpts)
if err != nil {
@@ -290,3 +332,45 @@ func readConfigMapFromFile(r io.Reader) (v1.ConfigMap, error) {
return cm, nil
}
+
+// splitMultiDocYAML reads mutiple documents in a YAML file and
+// returns them as a list.
+func splitMultiDocYAML(yamlContent []byte) ([][]byte, error) {
+ var documentList [][]byte
+
+ d := yamlv3.NewDecoder(bytes.NewReader(yamlContent))
+ for {
+ var o interface{}
+ // read individual document
+ err := d.Decode(&o)
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ return nil, errors.Wrapf(err, "multi doc yaml could not be split")
+ }
+
+ if o != nil {
+ // back to bytes
+ document, err := yamlv3.Marshal(o)
+ if err != nil {
+ return nil, errors.Wrapf(err, "individual doc yaml could not be marshalled")
+ }
+
+ documentList = append(documentList, document)
+ }
+ }
+
+ return documentList, nil
+}
+
+// getKubeKind unmarshals a kube YAML document and returns its kind.
+func getKubeKind(obj []byte) (string, error) {
+ var kubeObject v1.ObjectReference
+
+ if err := yaml.Unmarshal(obj, &kubeObject); err != nil {
+ return "", err
+ }
+
+ return kubeObject.Kind, nil
+}
diff --git a/pkg/domain/infra/abi/play_test.go b/pkg/domain/infra/abi/play_test.go
index 4354a3835..bbc7c3493 100644
--- a/pkg/domain/infra/abi/play_test.go
+++ b/pkg/domain/infra/abi/play_test.go
@@ -89,3 +89,100 @@ data:
})
}
}
+
+func TestGetKubeKind(t *testing.T) {
+ tests := []struct {
+ name string
+ kubeYAML string
+ expectError bool
+ expectedErrorMsg string
+ expected string
+ }{
+ {
+ "ValidKubeYAML",
+ `
+apiVersion: v1
+kind: Pod
+`,
+ false,
+ "",
+ "Pod",
+ },
+ {
+ "InvalidKubeYAML",
+ "InvalidKubeYAML",
+ true,
+ "cannot unmarshal",
+ "",
+ },
+ }
+
+ for _, test := range tests {
+ test := test
+ t.Run(test.name, func(t *testing.T) {
+ kind, err := getKubeKind([]byte(test.kubeYAML))
+ if test.expectError {
+ assert.Error(t, err)
+ assert.Contains(t, err.Error(), test.expectedErrorMsg)
+ } else {
+ assert.NoError(t, err)
+ assert.Equal(t, test.expected, kind)
+ }
+ })
+ }
+}
+
+func TestSplitMultiDocYAML(t *testing.T) {
+ tests := []struct {
+ name string
+ kubeYAML string
+ expectError bool
+ expectedErrorMsg string
+ expected int
+ }{
+ {
+ "ValidNumberOfDocs",
+ `
+apiVersion: v1
+kind: Pod
+---
+apiVersion: v1
+kind: Pod
+---
+apiVersion: v1
+kind: Pod
+`,
+ false,
+ "",
+ 3,
+ },
+ {
+ "InvalidMultiDocYAML",
+ `
+apiVersion: v1
+kind: Pod
+---
+apiVersion: v1
+kind: Pod
+-
+`,
+ true,
+ "multi doc yaml could not be split",
+ 0,
+ },
+ }
+
+ for _, test := range tests {
+ test := test
+ t.Run(test.name, func(t *testing.T) {
+ docs, err := splitMultiDocYAML([]byte(test.kubeYAML))
+ if test.expectError {
+ assert.Error(t, err)
+ assert.Contains(t, err.Error(), test.expectedErrorMsg)
+ } else {
+ assert.NoError(t, err)
+ assert.Equal(t, test.expected, len(docs))
+ }
+ })
+ }
+}
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go
index 9f7c8919b..a3e753384 100644
--- a/pkg/domain/infra/abi/system.go
+++ b/pkg/domain/infra/abi/system.go
@@ -67,7 +67,7 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, cmd *cobra.Command)
if os.Geteuid() == 0 {
ownsCgroup, err := cgroups.UserOwnsCurrentSystemdCgroup()
if err != nil {
- logrus.Warnf("Failed to detect the owner for the current cgroup: %v", err)
+ logrus.Infof("Failed to detect the owner for the current cgroup: %v", err)
}
if !ownsCgroup {
conf, err := ic.Config(context.Background())
diff --git a/pkg/domain/infra/runtime_libpod.go b/pkg/domain/infra/runtime_libpod.go
index 8b6581c7b..b0d9dc797 100644
--- a/pkg/domain/infra/runtime_libpod.go
+++ b/pkg/domain/infra/runtime_libpod.go
@@ -15,8 +15,8 @@ import (
"github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/podman/v3/pkg/namespaces"
"github.com/containers/podman/v3/pkg/rootless"
- "github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
+ "github.com/containers/storage/types"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
flag "github.com/spf13/pflag"
@@ -100,7 +100,7 @@ func GetRuntimeNoStore(ctx context.Context, fs *flag.FlagSet, cfg *entities.Podm
func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpod.Runtime, error) {
options := []libpod.RuntimeOption{}
- storageOpts := storage.StoreOptions{}
+ storageOpts := types.StoreOptions{}
cfg := opts.config
storageSet := false
@@ -237,8 +237,8 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo
}
// ParseIDMapping takes idmappings and subuid and subgid maps and returns a storage mapping
-func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []string, subUIDMap, subGIDMap string) (*storage.IDMappingOptions, error) {
- options := storage.IDMappingOptions{
+func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []string, subUIDMap, subGIDMap string) (*types.IDMappingOptions, error) {
+ options := types.IDMappingOptions{
HostUIDMapping: true,
HostGIDMapping: true,
}
diff --git a/pkg/machine/config.go b/pkg/machine/config.go
new file mode 100644
index 000000000..273deca00
--- /dev/null
+++ b/pkg/machine/config.go
@@ -0,0 +1,122 @@
+package machine
+
+import (
+ "net"
+ "net/url"
+ "os"
+ "path/filepath"
+
+ "github.com/containers/storage/pkg/homedir"
+ "github.com/pkg/errors"
+)
+
+type InitOptions struct {
+ CPUS uint64
+ DiskSize uint64
+ IgnitionPath string
+ ImagePath string
+ IsDefault bool
+ Memory uint64
+ Name string
+ URI url.URL
+ Username string
+}
+
+type RemoteConnectionType string
+
+var (
+ SSHRemoteConnection RemoteConnectionType = "ssh"
+ DefaultIgnitionUserName = "core"
+ ErrNoSuchVM = errors.New("VM does not exist")
+ ErrVMAlreadyExists = errors.New("VM already exists")
+)
+
+type Download struct {
+ Arch string
+ Artifact string
+ CompressionType string
+ Format string
+ ImageName string `json:"image_name"`
+ LocalPath string
+ LocalUncompressedFile string
+ Sha256sum string
+ URL *url.URL
+ VMName string
+}
+
+type SSHOptions struct {
+ Execute bool
+ Args []string
+}
+type StartOptions struct{}
+
+type StopOptions struct{}
+
+type RemoveOptions struct {
+ Force bool
+ SaveKeys bool
+ SaveImage bool
+ SaveIgnition bool
+}
+
+type VM interface {
+ Init(opts InitOptions) error
+ Remove(name string, opts RemoveOptions) (string, func() error, error)
+ SSH(name string, opts SSHOptions) error
+ Start(name string, opts StartOptions) error
+ Stop(name string, opts StopOptions) error
+}
+
+type DistributionDownload interface {
+ DownloadImage() error
+ Get() *Download
+}
+
+func (rc RemoteConnectionType) MakeSSHURL(host, path, port, userName string) url.URL {
+ userInfo := url.User(userName)
+ uri := url.URL{
+ Scheme: "ssh",
+ Opaque: "",
+ User: userInfo,
+ Host: host,
+ Path: path,
+ RawPath: "",
+ ForceQuery: false,
+ RawQuery: "",
+ Fragment: "",
+ }
+ if len(port) > 0 {
+ uri.Host = net.JoinHostPort(uri.Hostname(), port)
+ }
+ return uri
+}
+
+// GetDataDir returns the filepath where vm images should
+// live for podman-machine
+func GetDataDir(vmType string) (string, error) {
+ data, err := homedir.GetDataHome()
+ if err != nil {
+ return "", err
+ }
+ dataDir := filepath.Join(data, "containers", "podman", "machine", vmType)
+ if _, err := os.Stat(dataDir); !os.IsNotExist(err) {
+ return dataDir, nil
+ }
+ mkdirErr := os.MkdirAll(dataDir, 0755)
+ return dataDir, mkdirErr
+}
+
+// GetConfigDir returns the filepath to where configuration
+// files for podman-machine should live
+func GetConfDir(vmType string) (string, error) {
+ conf, err := homedir.GetConfigHome()
+ if err != nil {
+ return "", err
+ }
+ confDir := filepath.Join(conf, "containers", "podman", "machine", vmType)
+ if _, err := os.Stat(confDir); !os.IsNotExist(err) {
+ return confDir, nil
+ }
+ mkdirErr := os.MkdirAll(confDir, 0755)
+ return confDir, mkdirErr
+}
diff --git a/pkg/machine/connection.go b/pkg/machine/connection.go
new file mode 100644
index 000000000..e3985d8ac
--- /dev/null
+++ b/pkg/machine/connection.go
@@ -0,0 +1,50 @@
+package machine
+
+import (
+ "fmt"
+
+ "github.com/containers/common/pkg/config"
+ "github.com/pkg/errors"
+)
+
+func AddConnection(uri fmt.Stringer, name, identity string, isDefault bool) error {
+ if len(identity) < 1 {
+ return errors.New("identity must be defined")
+ }
+ cfg, err := config.ReadCustomConfig()
+ if err != nil {
+ return err
+ }
+ if _, ok := cfg.Engine.ServiceDestinations[name]; ok {
+ return errors.New("cannot overwrite connection")
+ }
+ if isDefault {
+ cfg.Engine.ActiveService = name
+ }
+ dst := config.Destination{
+ URI: uri.String(),
+ }
+ dst.Identity = identity
+ if cfg.Engine.ServiceDestinations == nil {
+ cfg.Engine.ServiceDestinations = map[string]config.Destination{
+ name: dst,
+ }
+ cfg.Engine.ActiveService = name
+ } else {
+ cfg.Engine.ServiceDestinations[name] = dst
+ }
+ return cfg.Write()
+}
+
+func RemoveConnection(name string) error {
+ cfg, err := config.ReadCustomConfig()
+ if err != nil {
+ return err
+ }
+ if _, ok := cfg.Engine.ServiceDestinations[name]; ok {
+ delete(cfg.Engine.ServiceDestinations, name)
+ } else {
+ return errors.Errorf("unable to find connection named %q", name)
+ }
+ return cfg.Write()
+}
diff --git a/pkg/machine/fcos.go b/pkg/machine/fcos.go
new file mode 100644
index 000000000..0c6a2485e
--- /dev/null
+++ b/pkg/machine/fcos.go
@@ -0,0 +1,160 @@
+package machine
+
+import (
+ "crypto/sha256"
+ "io"
+ "io/ioutil"
+ url2 "net/url"
+ "os"
+ "path/filepath"
+ "runtime"
+ "strings"
+
+ "github.com/containers/storage/pkg/archive"
+ digest "github.com/opencontainers/go-digest"
+ "github.com/sirupsen/logrus"
+)
+
+// These should eventually be moved into machine/qemu as
+// they are specific to running qemu
+var (
+ artifact string = "qemu"
+ Format string = "qcow2.xz"
+)
+
+type FcosDownload struct {
+ Download
+}
+
+func NewFcosDownloader(vmType, vmName string) (DistributionDownload, error) {
+ info, err := getFCOSDownload()
+ if err != nil {
+ return nil, err
+ }
+ urlSplit := strings.Split(info.Location, "/")
+ imageName := urlSplit[len(urlSplit)-1]
+ url, err := url2.Parse(info.Location)
+ if err != nil {
+ return nil, err
+ }
+
+ dataDir, err := GetDataDir(vmType)
+ if err != nil {
+ return nil, err
+ }
+
+ fcd := FcosDownload{
+ Download: Download{
+ Arch: getFcosArch(),
+ Artifact: artifact,
+ Format: Format,
+ ImageName: imageName,
+ LocalPath: filepath.Join(dataDir, imageName),
+ Sha256sum: info.Sha256Sum,
+ URL: url,
+ VMName: vmName,
+ },
+ }
+ fcd.Download.LocalUncompressedFile = fcd.getLocalUncompressedName()
+ return fcd, nil
+}
+
+func (f FcosDownload) getLocalUncompressedName() string {
+ uncompressedFilename := filepath.Join(filepath.Dir(f.LocalPath), f.VMName+"_"+f.ImageName)
+ return strings.TrimSuffix(uncompressedFilename, ".xz")
+}
+
+func (f FcosDownload) DownloadImage() error {
+ // check if the latest image is already present
+ ok, err := UpdateAvailable(&f.Download)
+ if err != nil {
+ return err
+ }
+ if !ok {
+ if err := DownloadVMImage(f.URL, f.LocalPath); err != nil {
+ return err
+ }
+ }
+ uncompressedFileWriter, err := os.OpenFile(f.getLocalUncompressedName(), os.O_CREATE|os.O_RDWR, 0600)
+ if err != nil {
+ return err
+ }
+ sourceFile, err := ioutil.ReadFile(f.LocalPath)
+ if err != nil {
+ return err
+ }
+ compressionType := archive.DetectCompression(sourceFile)
+ f.CompressionType = compressionType.Extension()
+
+ switch f.CompressionType {
+ case "tar.xz":
+ return decompressXZ(f.LocalPath, uncompressedFileWriter)
+ default:
+ // File seems to be uncompressed, make a copy
+ if err := copyFile(f.LocalPath, uncompressedFileWriter); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func copyFile(src string, dest *os.File) error {
+ source, err := os.Open(src)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err := source.Close(); err != nil {
+ logrus.Error(err)
+ }
+ }()
+ _, err = io.Copy(dest, source)
+ return err
+}
+
+func (f FcosDownload) Get() *Download {
+ return &f.Download
+}
+
+type fcosDownloadInfo struct {
+ CompressionType string
+ Location string
+ Release string
+ Sha256Sum string
+}
+
+func UpdateAvailable(d *Download) (bool, error) {
+ // check the sha of the local image if it exists
+ // get the sha of the remote image
+ // == dont bother to pull
+ files, err := ioutil.ReadDir(filepath.Dir(d.LocalPath))
+ if err != nil {
+ return false, err
+ }
+ for _, file := range files {
+ if filepath.Base(d.LocalPath) == file.Name() {
+ b, err := ioutil.ReadFile(d.LocalPath)
+ if err != nil {
+ return false, err
+ }
+ s := sha256.Sum256(b)
+ sum := digest.NewDigestFromBytes(digest.SHA256, s[:])
+ if sum.Encoded() == d.Sha256sum {
+ return true, nil
+ }
+ }
+ }
+ return false, nil
+}
+
+func getFcosArch() string {
+ var arch string
+ // TODO fill in more architectures
+ switch runtime.GOARCH {
+ case "arm64":
+ arch = "aarch64"
+ default:
+ arch = "x86_64"
+ }
+ return arch
+}
diff --git a/pkg/machine/fcos_amd64.go b/pkg/machine/fcos_amd64.go
new file mode 100644
index 000000000..36676405a
--- /dev/null
+++ b/pkg/machine/fcos_amd64.go
@@ -0,0 +1,68 @@
+package machine
+
+import (
+ "encoding/json"
+ "fmt"
+ "io/ioutil"
+ "net/http"
+
+ "github.com/coreos/stream-metadata-go/fedoracoreos"
+ "github.com/coreos/stream-metadata-go/stream"
+ "github.com/sirupsen/logrus"
+)
+
+// This should get Exported and stay put as it will apply to all fcos downloads
+// getFCOS parses fedoraCoreOS's stream and returns the image download URL and the release version
+func getFCOSDownload() (*fcosDownloadInfo, error) {
+ var (
+ fcosstable stream.Stream
+ )
+ streamurl := fedoracoreos.GetStreamURL(fedoracoreos.StreamNext)
+ resp, err := http.Get(streamurl.String())
+ if err != nil {
+ return nil, err
+ }
+ body, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ if err := resp.Body.Close(); err != nil {
+ logrus.Error(err)
+ }
+ }()
+
+ if err := json.Unmarshal(body, &fcosstable); err != nil {
+ return nil, err
+ }
+ arch, ok := fcosstable.Architectures[getFcosArch()]
+ if !ok {
+ return nil, fmt.Errorf("unable to pull VM image: no targetArch in stream")
+ }
+ artifacts := arch.Artifacts
+ if artifacts == nil {
+ return nil, fmt.Errorf("unable to pull VM image: no artifact in stream")
+ }
+ qemu, ok := artifacts[artifact]
+ if !ok {
+ return nil, fmt.Errorf("unable to pull VM image: no qemu artifact in stream")
+ }
+ formats := qemu.Formats
+ if formats == nil {
+ return nil, fmt.Errorf("unable to pull VM image: no formats in stream")
+ }
+ qcow, ok := formats[Format]
+ if !ok {
+ return nil, fmt.Errorf("unable to pull VM image: no qcow2.xz format in stream")
+ }
+ disk := qcow.Disk
+ if disk == nil {
+ return nil, fmt.Errorf("unable to pull VM image: no disk in stream")
+ }
+ return &fcosDownloadInfo{
+ Location: disk.Location,
+ Release: qemu.Release,
+ Sha256Sum: disk.Sha256,
+ CompressionType: "xz",
+ }, nil
+}
diff --git a/pkg/machine/fcos_arm64.go b/pkg/machine/fcos_arm64.go
new file mode 100644
index 000000000..ab50ca874
--- /dev/null
+++ b/pkg/machine/fcos_arm64.go
@@ -0,0 +1,169 @@
+package machine
+
+import (
+ "encoding/json"
+ "fmt"
+ "io/ioutil"
+ "net/http"
+
+ "github.com/sirupsen/logrus"
+)
+
+const aarchBaseURL = "https://fedorapeople.org/groups/fcos-images/builds/latest/aarch64/"
+
+// Total hack until automation is possible.
+// We need a proper json file at least to automate
+func getFCOSDownload() (*fcosDownloadInfo, error) {
+
+ meta := Build{}
+ fmt.Println(aarchBaseURL + "meta.json")
+ resp, err := http.Get(aarchBaseURL + "meta.json")
+ if err != nil {
+ return nil, err
+ }
+ body, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ if err := resp.Body.Close(); err != nil {
+ logrus.Error(err)
+ }
+ }()
+ if err := json.Unmarshal(body, &meta); err != nil {
+ return nil, err
+ }
+ return &fcosDownloadInfo{
+ Location: "https://fedorapeople.org/groups/fcos-images/builds/latest/aarch64/fedora-coreos-33.20210310.dev.0-qemu.aarch64.qcow2",
+ Release: "",
+ Sha256Sum: meta.BuildArtifacts.Qemu.Sha256,
+ }, nil
+}
+
+/*
+ All of this can be nuked when fcos upstream generates a proper meta data file for aarch.
+*/
+type AliyunImage struct {
+ ImageID string `json:"id"`
+ Region string `json:"name"`
+}
+
+type Amis struct {
+ Hvm string `json:"hvm"`
+ Region string `json:"name"`
+ Snapshot string `json:"snapshot"`
+}
+
+type Artifact struct {
+ Path string `json:"path"`
+ Sha256 string `json:"sha256"`
+ SizeInBytes float64 `json:"size,omitempty"`
+ UncompressedSha256 string `json:"uncompressed-sha256,omitempty"`
+ UncompressedSize int `json:"uncompressed-size,omitempty"`
+}
+
+type Build struct {
+ AlibabaAliyunUploads []AliyunImage `json:"aliyun,omitempty"`
+ Amis []Amis `json:"amis,omitempty"`
+ Architecture string `json:"coreos-assembler.basearch,omitempty"`
+ Azure *Cloudartifact `json:"azure,omitempty"`
+ BuildArtifacts *BuildArtifacts `json:"images,omitempty"`
+ BuildID string `json:"buildid"`
+ BuildRef string `json:"ref,omitempty"`
+ BuildSummary string `json:"summary"`
+ BuildTimeStamp string `json:"coreos-assembler.build-timestamp,omitempty"`
+ BuildURL string `json:"build-url,omitempty"`
+ ConfigGitRev string `json:"coreos-assembler.config-gitrev,omitempty"`
+ ContainerConfigGit *Git `json:"coreos-assembler.container-config-git,omitempty"`
+ CoreOsSource string `json:"coreos-assembler.code-source,omitempty"`
+ CosaContainerImageGit *Git `json:"coreos-assembler.container-image-git,omitempty"`
+ CosaDelayedMetaMerge bool `json:"coreos-assembler.delayed-meta-merge,omitempty"`
+ CosaImageChecksum string `json:"coreos-assembler.image-config-checksum,omitempty"`
+ CosaImageVersion int `json:"coreos-assembler.image-genver,omitempty"`
+ Extensions *Extensions `json:"extensions,omitempty"`
+ FedoraCoreOsParentCommit string `json:"fedora-coreos.parent-commit,omitempty"`
+ FedoraCoreOsParentVersion string `json:"fedora-coreos.parent-version,omitempty"`
+ Gcp *Gcp `json:"gcp,omitempty"`
+ GitDirty string `json:"coreos-assembler.config-dirty,omitempty"`
+ ImageInputChecksum string `json:"coreos-assembler.image-input-checksum,omitempty"`
+ InputHasOfTheRpmOstree string `json:"rpm-ostree-inputhash"`
+ MetaStamp float64 `json:"coreos-assembler.meta-stamp,omitempty"`
+ Name string `json:"name"`
+ Oscontainer *Image `json:"oscontainer,omitempty"`
+ OstreeCommit string `json:"ostree-commit"`
+ OstreeContentBytesWritten int `json:"ostree-content-bytes-written,omitempty"`
+ OstreeContentChecksum string `json:"ostree-content-checksum"`
+ OstreeNCacheHits int `json:"ostree-n-cache-hits,omitempty"`
+ OstreeNContentTotal int `json:"ostree-n-content-total,omitempty"`
+ OstreeNContentWritten int `json:"ostree-n-content-written,omitempty"`
+ OstreeNMetadataTotal int `json:"ostree-n-metadata-total,omitempty"`
+ OstreeNMetadataWritten int `json:"ostree-n-metadata-written,omitempty"`
+ OstreeTimestamp string `json:"ostree-timestamp"`
+ OstreeVersion string `json:"ostree-version"`
+ OverridesActive bool `json:"coreos-assembler.overrides-active,omitempty"`
+ PkgdiffAgainstParent PackageSetDifferences `json:"parent-pkgdiff,omitempty"`
+ PkgdiffBetweenBuilds PackageSetDifferences `json:"pkgdiff,omitempty"`
+ ReleasePayload *Image `json:"release-payload,omitempty"`
+}
+
+type BuildArtifacts struct {
+ Aliyun *Artifact `json:"aliyun,omitempty"`
+ Aws *Artifact `json:"aws,omitempty"`
+ Azure *Artifact `json:"azure,omitempty"`
+ AzureStack *Artifact `json:"azurestack,omitempty"`
+ Dasd *Artifact `json:"dasd,omitempty"`
+ DigitalOcean *Artifact `json:"digitalocean,omitempty"`
+ Exoscale *Artifact `json:"exoscale,omitempty"`
+ Gcp *Artifact `json:"gcp,omitempty"`
+ IbmCloud *Artifact `json:"ibmcloud,omitempty"`
+ Initramfs *Artifact `json:"initramfs,omitempty"`
+ Iso *Artifact `json:"iso,omitempty"`
+ Kernel *Artifact `json:"kernel,omitempty"`
+ LiveInitramfs *Artifact `json:"live-initramfs,omitempty"`
+ LiveIso *Artifact `json:"live-iso,omitempty"`
+ LiveKernel *Artifact `json:"live-kernel,omitempty"`
+ LiveRootfs *Artifact `json:"live-rootfs,omitempty"`
+ Metal *Artifact `json:"metal,omitempty"`
+ Metal4KNative *Artifact `json:"metal4k,omitempty"`
+ OpenStack *Artifact `json:"openstack,omitempty"`
+ Ostree Artifact `json:"ostree"`
+ Qemu *Artifact `json:"qemu,omitempty"`
+ Vmware *Artifact `json:"vmware,omitempty"`
+ Vultr *Artifact `json:"vultr,omitempty"`
+}
+
+type Cloudartifact struct {
+ Image string `json:"image"`
+ URL string `json:"url"`
+}
+
+type Extensions struct {
+ Manifest map[string]interface{} `json:"manifest"`
+ Path string `json:"path"`
+ RpmOstreeState string `json:"rpm-ostree-state"`
+ Sha256 string `json:"sha256"`
+}
+
+type Gcp struct {
+ ImageFamily string `json:"family,omitempty"`
+ ImageName string `json:"image"`
+ ImageProject string `json:"project,omitempty"`
+ URL string `json:"url"`
+}
+
+type Git struct {
+ Branch string `json:"branch,omitempty"`
+ Commit string `json:"commit"`
+ Dirty string `json:"dirty,omitempty"`
+ Origin string `json:"origin"`
+}
+
+type Image struct {
+ Comment string `json:"comment,omitempty"`
+ Digest string `json:"digest"`
+ Image string `json:"image"`
+}
+
+type Items interface{}
+
+type PackageSetDifferences []Items
diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go
new file mode 100644
index 000000000..a68d68ac3
--- /dev/null
+++ b/pkg/machine/ignition.go
@@ -0,0 +1,180 @@
+package machine
+
+import (
+ "encoding/json"
+ "fmt"
+ "io/ioutil"
+)
+
+/*
+ If this file gets too nuts, we can perhaps use existing go code
+ to create ignition files. At this point, the file is so simple
+ that I chose to use structs and not import any code as I was
+ concerned (unsubstantiated) about too much bloat coming in.
+
+ https://github.com/openshift/machine-config-operator/blob/master/pkg/server/server.go
+*/
+
+// Convenience function to convert int to ptr
+func intToPtr(i int) *int {
+ return &i
+}
+
+// Convenience function to convert string to ptr
+func strToPtr(s string) *string {
+ return &s
+}
+
+// Convenience function to convert bool to ptr
+func boolToPtr(b bool) *bool {
+ return &b
+}
+
+func getNodeUsr(usrName string) NodeUser {
+ return NodeUser{Name: &usrName}
+}
+
+func getNodeGrp(grpName string) NodeGroup {
+ return NodeGroup{Name: &grpName}
+}
+
+type DynamicIgnition struct {
+ Name string
+ Key string
+ VMName string
+ WritePath string
+}
+
+// NewIgnitionFile
+func NewIgnitionFile(ign DynamicIgnition) error {
+ if len(ign.Name) < 1 {
+ ign.Name = DefaultIgnitionUserName
+ }
+ ignVersion := Ignition{
+ Version: "3.2.0",
+ }
+
+ ignPassword := Passwd{
+ Users: []PasswdUser{{
+ Name: ign.Name,
+ SSHAuthorizedKeys: []SSHAuthorizedKey{SSHAuthorizedKey(ign.Key)},
+ }},
+ }
+
+ ignStorage := Storage{
+ Directories: getDirs(ign.Name),
+ Files: getFiles(ign.Name),
+ Links: getLinks(ign.Name),
+ }
+
+ // ready is a unit file that sets up the virtual serial device
+ // where when the VM is done configuring, it will send an ack
+ // so a listening host knows it can being interacting with it
+ ready := `[Unit]
+Requires=dev-virtio\\x2dports-%s.device
+OnFailure=emergency.target
+OnFailureJobMode=isolate
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/sh -c '/usr/bin/echo Ready >/dev/%s'
+[Install]
+RequiredBy=multi-user.target
+`
+ _ = ready
+ ignSystemd := Systemd{
+ Units: []Unit{
+ {
+ Enabled: boolToPtr(true),
+ Name: "podman.socket",
+ },
+ {
+ Enabled: boolToPtr(true),
+ Name: "ready.service",
+ Contents: strToPtr(fmt.Sprintf(ready, "vport1p1", "vport1p1")),
+ },
+ }}
+ ignConfig := Config{
+ Ignition: ignVersion,
+ Passwd: ignPassword,
+ Storage: ignStorage,
+ Systemd: ignSystemd,
+ }
+ b, err := json.Marshal(ignConfig)
+ if err != nil {
+ return err
+ }
+ return ioutil.WriteFile(ign.WritePath, b, 0644)
+}
+
+func getDirs(usrName string) []Directory {
+ // Ignition has a bug/feature? where if you make a series of dirs
+ // in one swoop, then the leading dirs are creates as root.
+ newDirs := []string{
+ "/home/" + usrName + "/.config",
+ "/home/" + usrName + "/.config/systemd",
+ "/home/" + usrName + "/.config/systemd/user",
+ "/home/" + usrName + "/.config/systemd/user/default.target.wants",
+ }
+ var (
+ dirs = make([]Directory, len(newDirs))
+ )
+ for i, d := range newDirs {
+ newDir := Directory{
+ Node: Node{
+ Group: getNodeGrp(usrName),
+ Path: d,
+ User: getNodeUsr(usrName),
+ },
+ DirectoryEmbedded1: DirectoryEmbedded1{Mode: intToPtr(493)},
+ }
+ dirs[i] = newDir
+ }
+ return dirs
+}
+
+func getFiles(usrName string) []File {
+ var (
+ files []File
+ )
+ // Add a fake systemd service to get the user socket rolling
+ files = append(files, File{
+ Node: Node{
+ Group: getNodeGrp(usrName),
+ Path: "/home/" + usrName + "/.config/systemd/user/linger-example.service",
+ User: getNodeUsr(usrName),
+ },
+ FileEmbedded1: FileEmbedded1{
+ Append: nil,
+ Contents: Resource{
+ Source: strToPtr("data:,%5BUnit%5D%0ADescription%3DA%20systemd%20user%20unit%20demo%0AAfter%3Dnetwork-online.target%0AWants%3Dnetwork-online.target%20podman.socket%0A%5BService%5D%0AExecStart%3D%2Fusr%2Fbin%2Fsleep%20infinity%0A"),
+ },
+ Mode: intToPtr(484),
+ },
+ })
+
+ // Add a file into linger
+ files = append(files, File{
+ Node: Node{
+ Group: getNodeGrp(usrName),
+ Path: "/var/lib/systemd/linger/core",
+ User: getNodeUsr(usrName),
+ },
+ FileEmbedded1: FileEmbedded1{Mode: intToPtr(420)},
+ })
+ return files
+}
+
+func getLinks(usrName string) []Link {
+ return []Link{{
+ Node: Node{
+ Group: getNodeGrp(usrName),
+ Path: "/home/" + usrName + "/.config/systemd/user/default.target.wants/linger-example.service",
+ User: getNodeUsr(usrName),
+ },
+ LinkEmbedded1: LinkEmbedded1{
+ Hard: boolToPtr(false),
+ Target: "/home/" + usrName + "/.config/systemd/user/linger-example.service",
+ },
+ }}
+}
diff --git a/pkg/machine/ignition_schema.go b/pkg/machine/ignition_schema.go
new file mode 100644
index 000000000..9dbd90ba4
--- /dev/null
+++ b/pkg/machine/ignition_schema.go
@@ -0,0 +1,251 @@
+package machine
+
+/*
+ This file was taken from https://github.com/coreos/ignition/blob/master/config/v3_2/types/schema.go in an effort to
+ use more of the core-os structs but not fully commit to bringing their api in.
+
+ // generated by "schematyper --package=types config/v3_2/schema/ignition.json -o config/v3_2/types/ignition_schema.go --root-type=Config" -- DO NOT EDIT
+*/
+
+type Clevis struct {
+ Custom *Custom `json:"custom,omitempty"`
+ Tang []Tang `json:"tang,omitempty"`
+ Threshold *int `json:"threshold,omitempty"`
+ Tpm2 *bool `json:"tpm2,omitempty"`
+}
+
+type Config struct {
+ Ignition Ignition `json:"ignition"`
+ Passwd Passwd `json:"passwd,omitempty"`
+ Storage Storage `json:"storage,omitempty"`
+ Systemd Systemd `json:"systemd,omitempty"`
+}
+
+type Custom struct {
+ Config string `json:"config"`
+ NeedsNetwork *bool `json:"needsNetwork,omitempty"`
+ Pin string `json:"pin"`
+}
+
+type Device string
+
+type Directory struct {
+ Node
+ DirectoryEmbedded1
+}
+
+type DirectoryEmbedded1 struct {
+ Mode *int `json:"mode,omitempty"`
+}
+
+type Disk struct {
+ Device string `json:"device"`
+ Partitions []Partition `json:"partitions,omitempty"`
+ WipeTable *bool `json:"wipeTable,omitempty"`
+}
+
+type Dropin struct {
+ Contents *string `json:"contents,omitempty"`
+ Name string `json:"name"`
+}
+
+type File struct {
+ Node
+ FileEmbedded1
+}
+
+type FileEmbedded1 struct {
+ Append []Resource `json:"append,omitempty"`
+ Contents Resource `json:"contents,omitempty"`
+ Mode *int `json:"mode,omitempty"`
+}
+
+type Filesystem struct {
+ Device string `json:"device"`
+ Format *string `json:"format,omitempty"`
+ Label *string `json:"label,omitempty"`
+ MountOptions []MountOption `json:"mountOptions,omitempty"`
+ Options []FilesystemOption `json:"options,omitempty"`
+ Path *string `json:"path,omitempty"`
+ UUID *string `json:"uuid,omitempty"`
+ WipeFilesystem *bool `json:"wipeFilesystem,omitempty"`
+}
+
+type FilesystemOption string
+
+type Group string
+
+type HTTPHeader struct {
+ Name string `json:"name"`
+ Value *string `json:"value,omitempty"`
+}
+
+type HTTPHeaders []HTTPHeader
+
+type Ignition struct {
+ Config IgnitionConfig `json:"config,omitempty"`
+ Proxy Proxy `json:"proxy,omitempty"`
+ Security Security `json:"security,omitempty"`
+ Timeouts Timeouts `json:"timeouts,omitempty"`
+ Version string `json:"version,omitempty"`
+}
+
+type IgnitionConfig struct {
+ Merge []Resource `json:"merge,omitempty"`
+ Replace Resource `json:"replace,omitempty"`
+}
+
+type Link struct {
+ Node
+ LinkEmbedded1
+}
+
+type LinkEmbedded1 struct {
+ Hard *bool `json:"hard,omitempty"`
+ Target string `json:"target"`
+}
+
+type Luks struct {
+ Clevis *Clevis `json:"clevis,omitempty"`
+ Device *string `json:"device,omitempty"`
+ KeyFile Resource `json:"keyFile,omitempty"`
+ Label *string `json:"label,omitempty"`
+ Name string `json:"name"`
+ Options []LuksOption `json:"options,omitempty"`
+ UUID *string `json:"uuid,omitempty"`
+ WipeVolume *bool `json:"wipeVolume,omitempty"`
+}
+
+type LuksOption string
+
+type MountOption string
+
+type NoProxyItem string
+
+type Node struct {
+ Group NodeGroup `json:"group,omitempty"`
+ Overwrite *bool `json:"overwrite,omitempty"`
+ Path string `json:"path"`
+ User NodeUser `json:"user,omitempty"`
+}
+
+type NodeGroup struct {
+ ID *int `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+}
+
+type NodeUser struct {
+ ID *int `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+}
+
+type Partition struct {
+ GUID *string `json:"guid,omitempty"`
+ Label *string `json:"label,omitempty"`
+ Number int `json:"number,omitempty"`
+ Resize *bool `json:"resize,omitempty"`
+ ShouldExist *bool `json:"shouldExist,omitempty"`
+ SizeMiB *int `json:"sizeMiB,omitempty"`
+ StartMiB *int `json:"startMiB,omitempty"`
+ TypeGUID *string `json:"typeGuid,omitempty"`
+ WipePartitionEntry *bool `json:"wipePartitionEntry,omitempty"`
+}
+
+type Passwd struct {
+ Groups []PasswdGroup `json:"groups,omitempty"`
+ Users []PasswdUser `json:"users,omitempty"`
+}
+
+type PasswdGroup struct {
+ Gid *int `json:"gid,omitempty"`
+ Name string `json:"name"`
+ PasswordHash *string `json:"passwordHash,omitempty"`
+ ShouldExist *bool `json:"shouldExist,omitempty"`
+ System *bool `json:"system,omitempty"`
+}
+
+type PasswdUser struct {
+ Gecos *string `json:"gecos,omitempty"`
+ Groups []Group `json:"groups,omitempty"`
+ HomeDir *string `json:"homeDir,omitempty"`
+ Name string `json:"name"`
+ NoCreateHome *bool `json:"noCreateHome,omitempty"`
+ NoLogInit *bool `json:"noLogInit,omitempty"`
+ NoUserGroup *bool `json:"noUserGroup,omitempty"`
+ PasswordHash *string `json:"passwordHash,omitempty"`
+ PrimaryGroup *string `json:"primaryGroup,omitempty"`
+ SSHAuthorizedKeys []SSHAuthorizedKey `json:"sshAuthorizedKeys,omitempty"`
+ Shell *string `json:"shell,omitempty"`
+ ShouldExist *bool `json:"shouldExist,omitempty"`
+ System *bool `json:"system,omitempty"`
+ UID *int `json:"uid,omitempty"`
+}
+
+type Proxy struct {
+ HTTPProxy *string `json:"httpProxy,omitempty"`
+ HTTPSProxy *string `json:"httpsProxy,omitempty"`
+ NoProxy []NoProxyItem `json:"noProxy,omitempty"`
+}
+
+type Raid struct {
+ Devices []Device `json:"devices"`
+ Level string `json:"level"`
+ Name string `json:"name"`
+ Options []RaidOption `json:"options,omitempty"`
+ Spares *int `json:"spares,omitempty"`
+}
+
+type RaidOption string
+
+type Resource struct {
+ Compression *string `json:"compression,omitempty"`
+ HTTPHeaders HTTPHeaders `json:"httpHeaders,omitempty"`
+ Source *string `json:"source,omitempty"`
+ Verification Verification `json:"verification,omitempty"`
+}
+
+type SSHAuthorizedKey string
+
+type Security struct {
+ TLS TLS `json:"tls,omitempty"`
+}
+
+type Storage struct {
+ Directories []Directory `json:"directories,omitempty"`
+ Disks []Disk `json:"disks,omitempty"`
+ Files []File `json:"files,omitempty"`
+ Filesystems []Filesystem `json:"filesystems,omitempty"`
+ Links []Link `json:"links,omitempty"`
+ Luks []Luks `json:"luks,omitempty"`
+ Raid []Raid `json:"raid,omitempty"`
+}
+
+type Systemd struct {
+ Units []Unit `json:"units,omitempty"`
+}
+
+type TLS struct {
+ CertificateAuthorities []Resource `json:"certificateAuthorities,omitempty"`
+}
+
+type Tang struct {
+ Thumbprint *string `json:"thumbprint,omitempty"`
+ URL string `json:"url,omitempty"`
+}
+
+type Timeouts struct {
+ HTTPResponseHeaders *int `json:"httpResponseHeaders,omitempty"`
+ HTTPTotal *int `json:"httpTotal,omitempty"`
+}
+
+type Unit struct {
+ Contents *string `json:"contents,omitempty"`
+ Dropins []Dropin `json:"dropins,omitempty"`
+ Enabled *bool `json:"enabled,omitempty"`
+ Mask *bool `json:"mask,omitempty"`
+ Name string `json:"name"`
+}
+
+type Verification struct {
+ Hash *string `json:"hash,omitempty"`
+}
diff --git a/pkg/machine/keys.go b/pkg/machine/keys.go
new file mode 100644
index 000000000..907e28f55
--- /dev/null
+++ b/pkg/machine/keys.go
@@ -0,0 +1,25 @@
+package machine
+
+import (
+ "io/ioutil"
+ "os/exec"
+ "strings"
+)
+
+// CreateSSHKeys makes a priv and pub ssh key for interacting
+// the a VM.
+func CreateSSHKeys(writeLocation string) (string, error) {
+ if err := generatekeys(writeLocation); err != nil {
+ return "", err
+ }
+ b, err := ioutil.ReadFile(writeLocation + ".pub")
+ if err != nil {
+ return "", err
+ }
+ return strings.TrimSuffix(string(b), "\n"), nil
+}
+
+// generatekeys creates an ed25519 set of keys
+func generatekeys(writeLocation string) error {
+ return exec.Command("ssh-keygen", "-N", "", "-t", "ed25519", "-f", writeLocation).Run()
+}
diff --git a/pkg/machine/libvirt/config.go b/pkg/machine/libvirt/config.go
new file mode 100644
index 000000000..903f15fbc
--- /dev/null
+++ b/pkg/machine/libvirt/config.go
@@ -0,0 +1,4 @@
+package libvirt
+
+type MachineVM struct {
+}
diff --git a/pkg/machine/libvirt/machine.go b/pkg/machine/libvirt/machine.go
new file mode 100644
index 000000000..c38f63853
--- /dev/null
+++ b/pkg/machine/libvirt/machine.go
@@ -0,0 +1,15 @@
+package libvirt
+
+import "github.com/containers/podman/v3/pkg/machine"
+
+func (v *MachineVM) Init(name string, opts machine.InitOptions) error {
+ return nil
+}
+
+func (v *MachineVM) Start(name string) error {
+ return nil
+}
+
+func (v *MachineVM) Stop(name string) error {
+ return nil
+}
diff --git a/pkg/machine/pull.go b/pkg/machine/pull.go
new file mode 100644
index 000000000..39dde15b8
--- /dev/null
+++ b/pkg/machine/pull.go
@@ -0,0 +1,97 @@
+package machine
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "os/exec"
+ "strings"
+ "time"
+
+ "github.com/sirupsen/logrus"
+ "github.com/vbauerster/mpb/v6"
+ "github.com/vbauerster/mpb/v6/decor"
+)
+
+// DownloadVMImage downloads a VM image from url to given path
+// with download status
+func DownloadVMImage(downloadURL fmt.Stringer, localImagePath string) error {
+ out, err := os.Create(localImagePath)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err := out.Close(); err != nil {
+ logrus.Error(err)
+ }
+ }()
+
+ resp, err := http.Get(downloadURL.String())
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err := resp.Body.Close(); err != nil {
+ logrus.Error(err)
+ }
+ }()
+
+ if resp.StatusCode != http.StatusOK {
+ return fmt.Errorf("error downloading VM image: %s", resp.Status)
+ }
+ size := resp.ContentLength
+ urlSplit := strings.Split(downloadURL.String(), "/")
+ prefix := "Downloading VM image: " + urlSplit[len(urlSplit)-1]
+ onComplete := prefix + ": done"
+
+ p := mpb.New(
+ mpb.WithWidth(60),
+ mpb.WithRefreshRate(180*time.Millisecond),
+ )
+
+ bar := p.AddBar(size,
+ mpb.BarFillerClearOnComplete(),
+ mpb.PrependDecorators(
+ decor.OnComplete(decor.Name(prefix), onComplete),
+ ),
+ mpb.AppendDecorators(
+ decor.OnComplete(decor.CountersKibiByte("%.1f / %.1f"), ""),
+ ),
+ )
+
+ proxyReader := bar.ProxyReader(resp.Body)
+ defer func() {
+ if err := proxyReader.Close(); err != nil {
+ logrus.Error(err)
+ }
+ }()
+
+ if _, err := io.Copy(out, proxyReader); err != nil {
+ return err
+ }
+
+ p.Wait()
+ return nil
+}
+
+// Will error out if file without .xz already exists
+// Maybe extracting then renameing is a good idea here..
+// depends on xz: not pre-installed on mac, so it becomes a brew dependecy
+func decompressXZ(src string, output io.Writer) error {
+ fmt.Println("Extracting compressed file")
+ cmd := exec.Command("xzcat", "-k", src)
+ //cmd := exec.Command("xz", "-d", "-k", "-v", src)
+ stdOut, err := cmd.StdoutPipe()
+ if err != nil {
+ return err
+ }
+ //cmd.Stdout = os.Stdout
+ cmd.Stderr = os.Stderr
+ go func() {
+ if _, err := io.Copy(output, stdOut); err != nil {
+ logrus.Error(err)
+ }
+ }()
+ return cmd.Run()
+}
diff --git a/pkg/machine/qemu/config.go b/pkg/machine/qemu/config.go
new file mode 100644
index 000000000..e4687914d
--- /dev/null
+++ b/pkg/machine/qemu/config.go
@@ -0,0 +1,43 @@
+package qemu
+
+import "time"
+
+type MachineVM struct {
+ // CPUs to be assigned to the VM
+ CPUs uint64
+ // The command line representation of the qemu command
+ CmdLine []string
+ // IdentityPath is the fq path to the ssh priv key
+ IdentityPath string
+ // IgnitionFilePath is the fq path to the .ign file
+ IgnitionFilePath string
+ // ImagePath is the fq path to
+ ImagePath string
+ // Memory in megabytes assigned to the vm
+ Memory uint64
+ // Name of the vm
+ Name string
+ // SSH port for user networking
+ Port int
+ // QMPMonitor is the qemu monitor object for sending commands
+ QMPMonitor Monitor
+ // RemoteUsername of the vm user
+ RemoteUsername string
+}
+
+type Monitor struct {
+ // Address portion of the qmp monitor (/tmp/tmp.sock)
+ Address string
+ // Network portion of the qmp monitor (unix)
+ Network string
+ // Timeout in seconds for qmp monitor transactions
+ Timeout time.Duration
+}
+
+var (
+ // defaultQMPTimeout is the timeout duration for the
+ // qmp monitor interactions
+ defaultQMPTimeout time.Duration = 2 * time.Second
+ // defaultRemoteUser describes the ssh username default
+ defaultRemoteUser = "core"
+)
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
new file mode 100644
index 000000000..fe155750f
--- /dev/null
+++ b/pkg/machine/qemu/machine.go
@@ -0,0 +1,374 @@
+package qemu
+
+import (
+ "bufio"
+ "encoding/json"
+ "fmt"
+ "io/ioutil"
+ "net"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "strconv"
+ "time"
+
+ "github.com/containers/podman/v3/utils"
+
+ "github.com/containers/podman/v3/pkg/machine"
+ "github.com/containers/storage/pkg/homedir"
+ "github.com/digitalocean/go-qemu/qmp"
+ "github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
+)
+
+var (
+ // vmtype refers to qemu (vs libvirt, krun, etc)
+ vmtype = "qemu"
+)
+
+// NewMachine initializes an instance of a virtual machine based on the qemu
+// virtualization.
+func NewMachine(opts machine.InitOptions) (machine.VM, error) {
+ vmConfigDir, err := machine.GetConfDir(vmtype)
+ if err != nil {
+ return nil, err
+ }
+ vm := new(MachineVM)
+ if len(opts.Name) > 0 {
+ vm.Name = opts.Name
+ }
+ vm.IgnitionFilePath = opts.IgnitionPath
+ // If no ignitionfilepath was provided, use defaults
+ if len(vm.IgnitionFilePath) < 1 {
+ ignitionFile := filepath.Join(vmConfigDir, vm.Name+".ign")
+ vm.IgnitionFilePath = ignitionFile
+ }
+
+ // An image was specified
+ if len(opts.ImagePath) > 0 {
+ vm.ImagePath = opts.ImagePath
+ }
+
+ // Assign remote user name. if not provided, use default
+ vm.RemoteUsername = opts.Username
+ if len(vm.RemoteUsername) < 1 {
+ vm.RemoteUsername = defaultRemoteUser
+ }
+
+ // Add a random port for ssh
+ port, err := utils.GetRandomPort()
+ if err != nil {
+ return nil, err
+ }
+ vm.Port = port
+
+ vm.CPUs = opts.CPUS
+ vm.Memory = opts.Memory
+
+ // Look up the executable
+ execPath, err := exec.LookPath(QemuCommand)
+ if err != nil {
+ return nil, err
+ }
+ cmd := append([]string{execPath})
+ // Add memory
+ cmd = append(cmd, []string{"-m", strconv.Itoa(int(vm.Memory))}...)
+ // Add cpus
+ cmd = append(cmd, []string{"-smp", strconv.Itoa(int(vm.CPUs))}...)
+ // Add ignition file
+ cmd = append(cmd, []string{"-fw_cfg", "name=opt/com.coreos/config,file=" + vm.IgnitionFilePath}...)
+ // Add qmp socket
+ monitor, err := NewQMPMonitor("unix", vm.Name, defaultQMPTimeout)
+ if err != nil {
+ return nil, err
+ }
+ vm.QMPMonitor = monitor
+ cmd = append(cmd, []string{"-qmp", monitor.Network + ":/" + monitor.Address + ",server,nowait"}...)
+
+ // Add network
+ cmd = append(cmd, "-nic", "user,model=virtio,hostfwd=tcp::"+strconv.Itoa(vm.Port)+"-:22")
+
+ socketPath, err := getSocketDir()
+ if err != nil {
+ return nil, err
+ }
+ virtualSocketPath := filepath.Join(socketPath, "podman", vm.Name+"_ready.sock")
+ // Add serial port for readiness
+ cmd = append(cmd, []string{
+ "-device", "virtio-serial",
+ "-chardev", "socket,path=" + virtualSocketPath + ",server,nowait,id=" + vm.Name + "_ready",
+ "-device", "virtserialport,chardev=" + vm.Name + "_ready" + ",name=org.fedoraproject.port.0"}...)
+ vm.CmdLine = cmd
+ return vm, nil
+}
+
+// LoadByName reads a json file that describes a known qemu vm
+// and returns a vm instance
+func LoadVMByName(name string) (machine.VM, error) {
+ vm := new(MachineVM)
+ vmConfigDir, err := machine.GetConfDir(vmtype)
+ if err != nil {
+ return nil, err
+ }
+ b, err := ioutil.ReadFile(filepath.Join(vmConfigDir, name+".json"))
+ if os.IsNotExist(err) {
+ return nil, errors.Wrap(machine.ErrNoSuchVM, name)
+ }
+ if err != nil {
+ return nil, err
+ }
+ err = json.Unmarshal(b, vm)
+ logrus.Debug(vm.CmdLine)
+ return vm, err
+}
+
+// Init writes the json configuration file to the filesystem for
+// other verbs (start, stop)
+func (v *MachineVM) Init(opts machine.InitOptions) error {
+ sshDir := filepath.Join(homedir.Get(), ".ssh")
+ // GetConfDir creates the directory so no need to check for
+ // its existence
+ vmConfigDir, err := machine.GetConfDir(vmtype)
+ if err != nil {
+ return err
+ }
+ jsonFile := filepath.Join(vmConfigDir, v.Name) + ".json"
+ v.IdentityPath = filepath.Join(sshDir, v.Name)
+
+ dd, err := machine.NewFcosDownloader(vmtype, v.Name)
+ if err != nil {
+ return err
+ }
+
+ v.ImagePath = dd.Get().LocalUncompressedFile
+ if err := dd.DownloadImage(); err != nil {
+ return err
+ }
+ // Add arch specific options including image location
+ v.CmdLine = append(v.CmdLine, v.addArchOptions()...)
+
+ // Add location of bootable image
+ v.CmdLine = append(v.CmdLine, "-drive", "if=virtio,file="+v.ImagePath)
+ // This kind of stinks but no other way around this r/n
+ uri := machine.SSHRemoteConnection.MakeSSHURL("localhost", "/run/user/1000/podman/podman.sock", strconv.Itoa(v.Port), v.RemoteUsername)
+ if err := machine.AddConnection(&uri, v.Name, filepath.Join(sshDir, v.Name), opts.IsDefault); err != nil {
+ return err
+ }
+ // Write the JSON file
+ b, err := json.MarshalIndent(v, "", " ")
+ if err != nil {
+ return err
+ }
+ if err := ioutil.WriteFile(jsonFile, b, 0644); err != nil {
+ return err
+ }
+ key, err := machine.CreateSSHKeys(v.IdentityPath)
+ if err != nil {
+ return err
+ }
+ // Run arch specific things that need to be done
+ if err := v.prepare(); err != nil {
+ return err
+ }
+
+ // Resize the disk image to input disk size
+ resize := exec.Command("qemu-img", []string{"resize", v.ImagePath, strconv.Itoa(int(opts.DiskSize)) + "G"}...)
+ if err := resize.Run(); err != nil {
+ return errors.Errorf("error resizing image: %q", err)
+ }
+ // Write the ignition file
+ ign := machine.DynamicIgnition{
+ Name: opts.Username,
+ Key: key,
+ VMName: v.Name,
+ WritePath: v.IgnitionFilePath,
+ }
+ return machine.NewIgnitionFile(ign)
+}
+
+// Start executes the qemu command line and forks it
+func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
+ var (
+ conn net.Conn
+ err error
+ wait time.Duration = time.Millisecond * 500
+ )
+ attr := new(os.ProcAttr)
+ files := []*os.File{os.Stdin, os.Stdout, os.Stderr}
+ attr.Files = files
+ logrus.Debug(v.CmdLine)
+ cmd := v.CmdLine
+
+ // Disable graphic window when not in debug mode
+ // Done in start, so we're not suck with the debug level we used on init
+ if logrus.GetLevel() != logrus.DebugLevel {
+ cmd = append(cmd, "-display", "none")
+ }
+
+ _, err = os.StartProcess(v.CmdLine[0], cmd, attr)
+ if err != nil {
+ return err
+ }
+ fmt.Println("Waiting for VM ...")
+ socketPath, err := getSocketDir()
+ if err != nil {
+ return err
+ }
+
+ // The socket is not made until the qemu process is running so here
+ // we do a backoff waiting for it. Once we have a conn, we break and
+ // then wait to read it.
+ for i := 0; i < 6; i++ {
+ conn, err = net.Dial("unix", filepath.Join(socketPath, "podman", v.Name+"_ready.sock"))
+ if err == nil {
+ break
+ }
+ time.Sleep(wait)
+ wait++
+ }
+ if err != nil {
+ return err
+ }
+ _, err = bufio.NewReader(conn).ReadString('\n')
+ return err
+}
+
+// Stop uses the qmp monitor to call a system_powerdown
+func (v *MachineVM) Stop(name string, _ machine.StopOptions) error {
+ // check if the qmp socket is there. if not, qemu instance is gone
+ if _, err := os.Stat(v.QMPMonitor.Address); os.IsNotExist(err) {
+ // Right now it is NOT an error to stop a stopped machine
+ logrus.Debugf("QMP monitor socket %v does not exist", v.QMPMonitor.Address)
+ return nil
+ }
+ qmpMonitor, err := qmp.NewSocketMonitor(v.QMPMonitor.Network, v.QMPMonitor.Address, v.QMPMonitor.Timeout)
+ if err != nil {
+ return err
+ }
+ // Simple JSON formation for the QAPI
+ stopCommand := struct {
+ Execute string `json:"execute"`
+ }{
+ Execute: "system_powerdown",
+ }
+ input, err := json.Marshal(stopCommand)
+ if err != nil {
+ return err
+ }
+ if err := qmpMonitor.Connect(); err != nil {
+ return err
+ }
+ defer func() {
+ if err := qmpMonitor.Disconnect(); err != nil {
+ logrus.Error(err)
+ }
+ }()
+ _, err = qmpMonitor.Run(input)
+ return err
+}
+
+// NewQMPMonitor creates the monitor subsection of our vm
+func NewQMPMonitor(network, name string, timeout time.Duration) (Monitor, error) {
+ rtDir, err := getSocketDir()
+ if err != nil {
+ return Monitor{}, err
+ }
+ rtDir = filepath.Join(rtDir, "podman")
+ if _, err := os.Stat(filepath.Join(rtDir)); os.IsNotExist(err) {
+ // TODO 0644 is fine on linux but macos is weird
+ if err := os.MkdirAll(rtDir, 0755); err != nil {
+ return Monitor{}, err
+ }
+ }
+ if timeout == 0 {
+ timeout = defaultQMPTimeout
+ }
+ monitor := Monitor{
+ Network: network,
+ Address: filepath.Join(rtDir, "qmp_"+name+".sock"),
+ Timeout: timeout,
+ }
+ return monitor, nil
+}
+
+func (v *MachineVM) Remove(name string, opts machine.RemoveOptions) (string, func() error, error) {
+ var (
+ files []string
+ )
+
+ // cannot remove a running vm
+ if v.isRunning() {
+ return "", nil, errors.Errorf("running vm %q cannot be destroyed", v.Name)
+ }
+
+ // Collect all the files that need to be destroyed
+ if !opts.SaveKeys {
+ files = append(files, v.IdentityPath, v.IdentityPath+".pub")
+ }
+ if !opts.SaveIgnition {
+ files = append(files, v.IgnitionFilePath)
+ }
+ if !opts.SaveImage {
+ files = append(files, v.ImagePath)
+ }
+ files = append(files, v.archRemovalFiles()...)
+
+ if err := machine.RemoveConnection(v.Name); err != nil {
+ logrus.Error(err)
+ }
+ vmConfigDir, err := machine.GetConfDir(vmtype)
+ if err != nil {
+ return "", nil, err
+ }
+ files = append(files, filepath.Join(vmConfigDir, v.Name+".json"))
+ confirmationMessage := "\nThe following files will be deleted:\n\n"
+ for _, msg := range files {
+ confirmationMessage += msg + "\n"
+ }
+ confirmationMessage += "\n"
+ return confirmationMessage, func() error {
+ for _, f := range files {
+ if err := os.Remove(f); err != nil {
+ logrus.Error(err)
+ }
+ }
+ return nil
+ }, nil
+}
+
+func (v *MachineVM) isRunning() bool {
+ // Check if qmp socket path exists
+ if _, err := os.Stat(v.QMPMonitor.Address); os.IsNotExist(err) {
+ return false
+ }
+ // Check if we can dial it
+ if _, err := qmp.NewSocketMonitor(v.QMPMonitor.Network, v.QMPMonitor.Address, v.QMPMonitor.Timeout); err != nil {
+ return false
+ }
+ return true
+}
+
+// SSH opens an interactive SSH session to the vm specified.
+// Added ssh function to VM interface: pkg/machine/config/go : line 58
+func (v *MachineVM) SSH(name string, opts machine.SSHOptions) error {
+ if !v.isRunning() {
+ return errors.Errorf("vm %q is not running.", v.Name)
+ }
+
+ sshDestination := v.RemoteUsername + "@localhost"
+ port := strconv.Itoa(v.Port)
+
+ args := []string{"-i", v.IdentityPath, "-p", port, sshDestination}
+ if opts.Execute {
+ args = append(args, opts.Args...)
+ } else {
+ fmt.Printf("Connecting to vm %s. To close connection, use `~.` or `exit`\n", v.Name)
+ }
+
+ cmd := exec.Command("ssh", args...)
+ cmd.Stdout = os.Stdout
+ cmd.Stderr = os.Stderr
+ cmd.Stdin = os.Stdin
+
+ return cmd.Run()
+}
diff --git a/pkg/machine/qemu/options_darwin.go b/pkg/machine/qemu/options_darwin.go
new file mode 100644
index 000000000..46ccf24cb
--- /dev/null
+++ b/pkg/machine/qemu/options_darwin.go
@@ -0,0 +1,15 @@
+package qemu
+
+import (
+ "os"
+
+ "github.com/pkg/errors"
+)
+
+func getSocketDir() (string, error) {
+ tmpDir, ok := os.LookupEnv("TMPDIR")
+ if !ok {
+ return "", errors.New("unable to resolve TMPDIR")
+ }
+ return tmpDir, nil
+}
diff --git a/pkg/machine/qemu/options_darwin_amd64.go b/pkg/machine/qemu/options_darwin_amd64.go
new file mode 100644
index 000000000..69f7982b2
--- /dev/null
+++ b/pkg/machine/qemu/options_darwin_amd64.go
@@ -0,0 +1,18 @@
+package qemu
+
+var (
+ QemuCommand = "qemu-system-x86_64"
+)
+
+func (v *MachineVM) addArchOptions() []string {
+ opts := []string{"-cpu", "host"}
+ return opts
+}
+
+func (v *MachineVM) prepare() error {
+ return nil
+}
+
+func (v *MachineVM) archRemovalFiles() []string {
+ return []string{}
+}
diff --git a/pkg/machine/qemu/options_darwin_arm64.go b/pkg/machine/qemu/options_darwin_arm64.go
new file mode 100644
index 000000000..7513b3048
--- /dev/null
+++ b/pkg/machine/qemu/options_darwin_arm64.go
@@ -0,0 +1,36 @@
+package qemu
+
+import (
+ "os/exec"
+ "path/filepath"
+)
+
+var (
+ QemuCommand = "qemu-system-aarch64"
+)
+
+func (v *MachineVM) addArchOptions() []string {
+ ovmfDir := getOvmfDir(v.ImagePath, v.Name)
+ opts := []string{
+ "-accel", "hvf",
+ "-cpu", "cortex-a57",
+ "-M", "virt,highmem=off",
+ "-drive", "file=/usr/local/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on",
+ "-drive", "file=" + ovmfDir + ",if=pflash,format=raw"}
+ return opts
+}
+
+func (v *MachineVM) prepare() error {
+ ovmfDir := getOvmfDir(v.ImagePath, v.Name)
+ cmd := []string{"dd", "if=/dev/zero", "conv=sync", "bs=1m", "count=64", "of=" + ovmfDir}
+ return exec.Command(cmd[0], cmd[1:]...).Run()
+}
+
+func (v *MachineVM) archRemovalFiles() []string {
+ ovmDir := getOvmfDir(v.ImagePath, v.Name)
+ return []string{ovmDir}
+}
+
+func getOvmfDir(imagePath, vmName string) string {
+ return filepath.Join(filepath.Dir(imagePath), vmName+"_ovmf_vars.fd")
+}
diff --git a/pkg/machine/qemu/options_linux.go b/pkg/machine/qemu/options_linux.go
new file mode 100644
index 000000000..0a2e40d8f
--- /dev/null
+++ b/pkg/machine/qemu/options_linux.go
@@ -0,0 +1,7 @@
+package qemu
+
+import "github.com/containers/podman/v3/pkg/util"
+
+func getSocketDir() (string, error) {
+ return util.GetRuntimeDir()
+}
diff --git a/pkg/machine/qemu/options_linux_amd64.go b/pkg/machine/qemu/options_linux_amd64.go
new file mode 100644
index 000000000..3edd97ea1
--- /dev/null
+++ b/pkg/machine/qemu/options_linux_amd64.go
@@ -0,0 +1,21 @@
+package qemu
+
+var (
+ QemuCommand = "qemu-system-x86_64"
+)
+
+func (v *MachineVM) addArchOptions() []string {
+ opts := []string{
+ "-accel", "kvm",
+ "-cpu", "host",
+ }
+ return opts
+}
+
+func (v *MachineVM) prepare() error {
+ return nil
+}
+
+func (v *MachineVM) archRemovalFiles() []string {
+ return []string{}
+}
diff --git a/pkg/namespaces/namespaces.go b/pkg/namespaces/namespaces.go
index c35f68e02..a7736aee0 100644
--- a/pkg/namespaces/namespaces.go
+++ b/pkg/namespaces/namespaces.go
@@ -5,7 +5,7 @@ import (
"strconv"
"strings"
- "github.com/containers/storage"
+ "github.com/containers/storage/types"
)
const (
@@ -109,12 +109,12 @@ func (n UsernsMode) IsDefaultValue() bool {
// GetAutoOptions returns a AutoUserNsOptions with the settings to setup automatically
// a user namespace.
-func (n UsernsMode) GetAutoOptions() (*storage.AutoUserNsOptions, error) {
+func (n UsernsMode) GetAutoOptions() (*types.AutoUserNsOptions, error) {
parts := strings.SplitN(string(n), ":", 2)
if parts[0] != "auto" {
return nil, fmt.Errorf("wrong user namespace mode")
}
- options := storage.AutoUserNsOptions{}
+ options := types.AutoUserNsOptions{}
if len(parts) == 1 {
return &options, nil
}
@@ -131,13 +131,13 @@ func (n UsernsMode) GetAutoOptions() (*storage.AutoUserNsOptions, error) {
}
options.Size = uint32(s)
case "uidmapping":
- mapping, err := storage.ParseIDMapping([]string{v[1]}, nil, "", "")
+ mapping, err := types.ParseIDMapping([]string{v[1]}, nil, "", "")
if err != nil {
return nil, err
}
options.AdditionalUIDMappings = append(options.AdditionalUIDMappings, mapping.UIDMap...)
case "gidmapping":
- mapping, err := storage.ParseIDMapping(nil, []string{v[1]}, "", "")
+ mapping, err := types.ParseIDMapping(nil, []string{v[1]}, "", "")
if err != nil {
return nil, err
}
diff --git a/pkg/rootless/rootless.go b/pkg/rootless/rootless.go
index b5538efc3..0b9d719a9 100644
--- a/pkg/rootless/rootless.go
+++ b/pkg/rootless/rootless.go
@@ -5,7 +5,7 @@ import (
"sort"
"sync"
- "github.com/containers/storage"
+ "github.com/containers/storage/pkg/lockfile"
"github.com/opencontainers/runc/libcontainer/user"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
@@ -25,7 +25,7 @@ func TryJoinPauseProcess(pausePidPath string) (bool, int, error) {
}
// It could not join the pause process, let's lock the file before trying to delete it.
- pidFileLock, err := storage.GetLockfile(pausePidPath)
+ pidFileLock, err := lockfile.GetLockfile(pausePidPath)
if err != nil {
// The file was deleted by another process.
if os.IsNotExist(err) {
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index d93e4c10c..7a2bf0377 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -233,9 +233,8 @@ int
is_fd_inherited(int fd)
{
if (open_files_set == NULL || fd > open_files_max_fd || fd < 0)
- {
return 0;
- }
+
return FD_ISSET(fd % FD_SETSIZE, &(open_files_set[fd / FD_SETSIZE])) ? 1 : 0;
}
@@ -633,9 +632,10 @@ reexec_userns_join (int pid_to_join, char *pause_pid_file_path)
close (user_ns);
close (mnt_ns);
- for (f = 3; f < open_files_max_fd; f++)
- if (open_files_set == NULL || FD_ISSET (f % FD_SETSIZE, &(open_files_set[f / FD_SETSIZE])))
+ for (f = 3; f <= open_files_max_fd; f++)
+ if (is_fd_inherited (f))
close (f);
+
return pid;
}
@@ -813,13 +813,14 @@ reexec_in_user_namespace (int ready, char *pause_pid_file_path, char *file_to_re
if (do_socket_activation)
{
long num_fds;
+
num_fds = strtol (listen_fds, NULL, 10);
if (num_fds != LONG_MIN && num_fds != LONG_MAX)
{
int f;
for (f = 3; f < num_fds + 3; f++)
- if (open_files_set == NULL || FD_ISSET (f % FD_SETSIZE, &(open_files_set[f / FD_SETSIZE])))
+ if (is_fd_inherited (f))
close (f);
}
unsetenv ("LISTEN_PID");
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index 03697b353..1d724ffb0 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -11,7 +11,7 @@ import (
"github.com/containers/podman/v3/libpod/image"
"github.com/containers/podman/v3/pkg/specgen"
"github.com/containers/podman/v3/pkg/util"
- "github.com/containers/storage"
+ "github.com/containers/storage/types"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -367,7 +367,7 @@ func createContainerOptions(ctx context.Context, rt *libpod.Runtime, s *specgen.
return options, nil
}
-func CreateExitCommandArgs(storageConfig storage.StoreOptions, config *config.Config, syslog, rm, exec bool) ([]string, error) {
+func CreateExitCommandArgs(storageConfig types.StoreOptions, config *config.Config, syslog, rm, exec bool) ([]string, error) {
// We need a cleanup process for containers in the current model.
// But we can't assume that the caller is Podman - it could be another
// user of the API.
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go
index d61c8bd19..31ed3fd7c 100644
--- a/pkg/specgen/generate/kube/kube.go
+++ b/pkg/specgen/generate/kube/kube.go
@@ -2,11 +2,13 @@ package kube
import (
"context"
+ "encoding/json"
"fmt"
"net"
"strings"
"github.com/containers/common/pkg/parse"
+ "github.com/containers/common/pkg/secrets"
"github.com/containers/podman/v3/libpod/image"
ann "github.com/containers/podman/v3/pkg/annotations"
"github.com/containers/podman/v3/pkg/specgen"
@@ -94,6 +96,8 @@ type CtrSpecGenOptions struct {
RestartPolicy string
// NetNSIsHost tells the container to use the host netns
NetNSIsHost bool
+ // SecretManager to access the secrets
+ SecretsManager *secrets.SecretsManager
}
func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGenerator, error) {
@@ -210,12 +214,18 @@ func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGener
}
for _, env := range opts.Container.Env {
- value := envVarValue(env, opts.ConfigMaps)
+ value, err := envVarValue(env, opts)
+ if err != nil {
+ return nil, err
+ }
envs[env.Name] = value
}
for _, envFrom := range opts.Container.EnvFrom {
- cmEnvs := envVarsFromConfigMap(envFrom, opts.ConfigMaps)
+ cmEnvs, err := envVarsFrom(envFrom, opts)
+ if err != nil {
+ return nil, err
+ }
for k, v := range cmEnvs {
envs[k] = v
@@ -325,40 +335,96 @@ func quantityToInt64(quantity *resource.Quantity) (int64, error) {
return 0, errors.Errorf("Quantity cannot be represented as int64: %v", quantity)
}
-// envVarsFromConfigMap returns all key-value pairs as env vars from a configMap that matches the envFrom setting of a container
-func envVarsFromConfigMap(envFrom v1.EnvFromSource, configMaps []v1.ConfigMap) map[string]string {
+// read a k8s secret in JSON format from the secret manager
+func k8sSecretFromSecretManager(name string, secretsManager *secrets.SecretsManager) (map[string][]byte, error) {
+ _, jsonSecret, err := secretsManager.LookupSecretData(name)
+ if err != nil {
+ return nil, err
+ }
+
+ var secrets map[string][]byte
+ if err := json.Unmarshal(jsonSecret, &secrets); err != nil {
+ return nil, errors.Errorf("Secret %v is not valid JSON: %v", name, err)
+ }
+ return secrets, nil
+}
+
+// envVarsFrom returns all key-value pairs as env vars from a configMap or secret that matches the envFrom setting of a container
+func envVarsFrom(envFrom v1.EnvFromSource, opts *CtrSpecGenOptions) (map[string]string, error) {
envs := map[string]string{}
if envFrom.ConfigMapRef != nil {
- cmName := envFrom.ConfigMapRef.Name
+ cmRef := envFrom.ConfigMapRef
+ err := errors.Errorf("Configmap %v not found", cmRef.Name)
- for _, c := range configMaps {
- if cmName == c.Name {
+ for _, c := range opts.ConfigMaps {
+ if cmRef.Name == c.Name {
envs = c.Data
+ err = nil
break
}
}
+
+ if err != nil && (cmRef.Optional == nil || !*cmRef.Optional) {
+ return nil, err
+ }
}
- return envs
+ if envFrom.SecretRef != nil {
+ secRef := envFrom.SecretRef
+ secret, err := k8sSecretFromSecretManager(secRef.Name, opts.SecretsManager)
+ if err == nil {
+ for k, v := range secret {
+ envs[k] = string(v)
+ }
+ } else if secRef.Optional == nil || !*secRef.Optional {
+ return nil, err
+ }
+ }
+
+ return envs, nil
}
// envVarValue returns the environment variable value configured within the container's env setting.
-// It gets the value from a configMap if specified, otherwise returns env.Value
-func envVarValue(env v1.EnvVar, configMaps []v1.ConfigMap) string {
- for _, c := range configMaps {
- if env.ValueFrom != nil {
- if env.ValueFrom.ConfigMapKeyRef != nil {
- if env.ValueFrom.ConfigMapKeyRef.Name == c.Name {
- if value, ok := c.Data[env.ValueFrom.ConfigMapKeyRef.Key]; ok {
- return value
+// It gets the value from a configMap or secret if specified, otherwise returns env.Value
+func envVarValue(env v1.EnvVar, opts *CtrSpecGenOptions) (string, error) {
+ if env.ValueFrom != nil {
+ if env.ValueFrom.ConfigMapKeyRef != nil {
+ cmKeyRef := env.ValueFrom.ConfigMapKeyRef
+ err := errors.Errorf("Cannot set env %v: configmap %v not found", env.Name, cmKeyRef.Name)
+
+ for _, c := range opts.ConfigMaps {
+ if cmKeyRef.Name == c.Name {
+ if value, ok := c.Data[cmKeyRef.Key]; ok {
+ return value, nil
}
+ err = errors.Errorf("Cannot set env %v: key %s not found in configmap %v", env.Name, cmKeyRef.Key, cmKeyRef.Name)
+ break
+ }
+ }
+ if cmKeyRef.Optional == nil || !*cmKeyRef.Optional {
+ return "", err
+ }
+ return "", nil
+ }
+
+ if env.ValueFrom.SecretKeyRef != nil {
+ secKeyRef := env.ValueFrom.SecretKeyRef
+ secret, err := k8sSecretFromSecretManager(secKeyRef.Name, opts.SecretsManager)
+ if err == nil {
+ if val, ok := secret[secKeyRef.Key]; ok {
+ return string(val), nil
}
+ err = errors.Errorf("Secret %v has not %v key", secKeyRef.Name, secKeyRef.Key)
+ }
+ if secKeyRef.Optional == nil || !*secKeyRef.Optional {
+ return "", errors.Errorf("Cannot set env %v: %v", env.Name, err)
}
+ return "", nil
}
}
- return env.Value
+ return env.Value, nil
}
// getPodPorts converts a slice of kube container descriptions to an
diff --git a/pkg/specgen/generate/kube/play_test.go b/pkg/specgen/generate/kube/play_test.go
index 148540e9f..f714826f0 100644
--- a/pkg/specgen/generate/kube/play_test.go
+++ b/pkg/specgen/generate/kube/play_test.go
@@ -1,19 +1,49 @@
package kube
import (
+ "encoding/json"
+ "io/ioutil"
+ "os"
"testing"
+ "github.com/containers/common/pkg/secrets"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
v12 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
-func TestEnvVarsFromConfigMap(t *testing.T) {
+func createSecrets(t *testing.T, d string) *secrets.SecretsManager {
+ secretsManager, err := secrets.NewManager(d)
+ assert.NoError(t, err)
+
+ driver := "file"
+ driverOpts := map[string]string{
+ "path": d,
+ }
+
+ for _, s := range k8sSecrets {
+ data, err := json.Marshal(s.Data)
+ assert.NoError(t, err)
+
+ _, err = secretsManager.Store(s.ObjectMeta.Name, data, driver, driverOpts)
+ assert.NoError(t, err)
+ }
+
+ return secretsManager
+}
+
+func TestEnvVarsFrom(t *testing.T) {
+ d, err := ioutil.TempDir("", "secrets")
+ assert.NoError(t, err)
+ defer os.RemoveAll(d)
+ secretsManager := createSecrets(t, d)
+
tests := []struct {
- name string
- envFrom v1.EnvFromSource
- configMapList []v1.ConfigMap
- expected map[string]string
+ name string
+ envFrom v1.EnvFromSource
+ options CtrSpecGenOptions
+ succeed bool
+ expected map[string]string
}{
{
"ConfigMapExists",
@@ -24,7 +54,10 @@ func TestEnvVarsFromConfigMap(t *testing.T) {
},
},
},
- configMapList,
+ CtrSpecGenOptions{
+ ConfigMaps: configMapList,
+ },
+ true,
map[string]string{
"myvar": "foo",
},
@@ -38,7 +71,26 @@ func TestEnvVarsFromConfigMap(t *testing.T) {
},
},
},
- configMapList,
+ CtrSpecGenOptions{
+ ConfigMaps: configMapList,
+ },
+ false,
+ nil,
+ },
+ {
+ "OptionalConfigMapDoesNotExist",
+ v1.EnvFromSource{
+ ConfigMapRef: &v1.ConfigMapEnvSource{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "doesnotexist",
+ },
+ Optional: &optional,
+ },
+ },
+ CtrSpecGenOptions{
+ ConfigMaps: configMapList,
+ },
+ true,
map[string]string{},
},
{
@@ -50,7 +102,74 @@ func TestEnvVarsFromConfigMap(t *testing.T) {
},
},
},
- []v1.ConfigMap{},
+ CtrSpecGenOptions{
+ ConfigMaps: []v1.ConfigMap{},
+ },
+ false,
+ nil,
+ },
+ {
+ "OptionalEmptyConfigMapList",
+ v1.EnvFromSource{
+ ConfigMapRef: &v1.ConfigMapEnvSource{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Optional: &optional,
+ },
+ },
+ CtrSpecGenOptions{
+ ConfigMaps: []v1.ConfigMap{},
+ },
+ true,
+ map[string]string{},
+ },
+ {
+ "SecretExists",
+ v1.EnvFromSource{
+ SecretRef: &v1.SecretEnvSource{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ SecretsManager: secretsManager,
+ },
+ true,
+ map[string]string{
+ "myvar": "foo",
+ },
+ },
+ {
+ "SecretDoesNotExist",
+ v1.EnvFromSource{
+ SecretRef: &v1.SecretEnvSource{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "doesnotexist",
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ SecretsManager: secretsManager,
+ },
+ false,
+ nil,
+ },
+ {
+ "OptionalSecretDoesNotExist",
+ v1.EnvFromSource{
+ SecretRef: &v1.SecretEnvSource{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "doesnotexist",
+ },
+ Optional: &optional,
+ },
+ },
+ CtrSpecGenOptions{
+ SecretsManager: secretsManager,
+ },
+ true,
map[string]string{},
},
}
@@ -58,18 +177,25 @@ func TestEnvVarsFromConfigMap(t *testing.T) {
for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
- result := envVarsFromConfigMap(test.envFrom, test.configMapList)
+ result, err := envVarsFrom(test.envFrom, &test.options)
+ assert.Equal(t, err == nil, test.succeed)
assert.Equal(t, test.expected, result)
})
}
}
func TestEnvVarValue(t *testing.T) {
+ d, err := ioutil.TempDir("", "secrets")
+ assert.NoError(t, err)
+ defer os.RemoveAll(d)
+ secretsManager := createSecrets(t, d)
+
tests := []struct {
- name string
- envVar v1.EnvVar
- configMapList []v1.ConfigMap
- expected string
+ name string
+ envVar v1.EnvVar
+ options CtrSpecGenOptions
+ succeed bool
+ expected string
}{
{
"ConfigMapExists",
@@ -84,7 +210,10 @@ func TestEnvVarValue(t *testing.T) {
},
},
},
- configMapList,
+ CtrSpecGenOptions{
+ ConfigMaps: configMapList,
+ },
+ true,
"foo",
},
{
@@ -100,7 +229,30 @@ func TestEnvVarValue(t *testing.T) {
},
},
},
- configMapList,
+ CtrSpecGenOptions{
+ ConfigMaps: configMapList,
+ },
+ false,
+ "",
+ },
+ {
+ "OptionalContainerKeyDoesNotExistInConfigMap",
+ v1.EnvVar{
+ Name: "FOO",
+ ValueFrom: &v1.EnvVarSource{
+ ConfigMapKeyRef: &v1.ConfigMapKeySelector{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "doesnotexist",
+ Optional: &optional,
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ ConfigMaps: configMapList,
+ },
+ true,
"",
},
{
@@ -116,7 +268,30 @@ func TestEnvVarValue(t *testing.T) {
},
},
},
- configMapList,
+ CtrSpecGenOptions{
+ ConfigMaps: configMapList,
+ },
+ false,
+ "",
+ },
+ {
+ "OptionalConfigMapDoesNotExist",
+ v1.EnvVar{
+ Name: "FOO",
+ ValueFrom: &v1.EnvVarSource{
+ ConfigMapKeyRef: &v1.ConfigMapKeySelector{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "doesnotexist",
+ },
+ Key: "myvar",
+ Optional: &optional,
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ ConfigMaps: configMapList,
+ },
+ true,
"",
},
{
@@ -132,7 +307,127 @@ func TestEnvVarValue(t *testing.T) {
},
},
},
- []v1.ConfigMap{},
+ CtrSpecGenOptions{
+ ConfigMaps: []v1.ConfigMap{},
+ },
+ false,
+ "",
+ },
+ {
+ "OptionalEmptyConfigMapList",
+ v1.EnvVar{
+ Name: "FOO",
+ ValueFrom: &v1.EnvVarSource{
+ ConfigMapKeyRef: &v1.ConfigMapKeySelector{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "myvar",
+ Optional: &optional,
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ ConfigMaps: []v1.ConfigMap{},
+ },
+ true,
+ "",
+ },
+ {
+ "SecretExists",
+ v1.EnvVar{
+ Name: "FOO",
+ ValueFrom: &v1.EnvVarSource{
+ SecretKeyRef: &v1.SecretKeySelector{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "myvar",
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ SecretsManager: secretsManager,
+ },
+ true,
+ "foo",
+ },
+ {
+ "ContainerKeyDoesNotExistInSecret",
+ v1.EnvVar{
+ Name: "FOO",
+ ValueFrom: &v1.EnvVarSource{
+ SecretKeyRef: &v1.SecretKeySelector{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "doesnotexist",
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ SecretsManager: secretsManager,
+ },
+ false,
+ "",
+ },
+ {
+ "OptionalContainerKeyDoesNotExistInSecret",
+ v1.EnvVar{
+ Name: "FOO",
+ ValueFrom: &v1.EnvVarSource{
+ SecretKeyRef: &v1.SecretKeySelector{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "doesnotexist",
+ Optional: &optional,
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ SecretsManager: secretsManager,
+ },
+ true,
+ "",
+ },
+ {
+ "SecretDoesNotExist",
+ v1.EnvVar{
+ Name: "FOO",
+ ValueFrom: &v1.EnvVarSource{
+ SecretKeyRef: &v1.SecretKeySelector{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "doesnotexist",
+ },
+ Key: "myvar",
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ SecretsManager: secretsManager,
+ },
+ false,
+ "",
+ },
+ {
+ "OptionalSecretDoesNotExist",
+ v1.EnvVar{
+ Name: "FOO",
+ ValueFrom: &v1.EnvVarSource{
+ SecretKeyRef: &v1.SecretKeySelector{
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "doesnotexist",
+ },
+ Key: "myvar",
+ Optional: &optional,
+ },
+ },
+ },
+ CtrSpecGenOptions{
+ SecretsManager: secretsManager,
+ },
+ true,
"",
},
}
@@ -140,7 +435,8 @@ func TestEnvVarValue(t *testing.T) {
for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
- result := envVarValue(test.envVar, test.configMapList)
+ result, err := envVarValue(test.envVar, &test.options)
+ assert.Equal(t, err == nil, test.succeed)
assert.Equal(t, test.expected, result)
})
}
@@ -170,3 +466,30 @@ var configMapList = []v1.ConfigMap{
},
},
}
+
+var optional = true
+
+var k8sSecrets = []v1.Secret{
+ {
+ TypeMeta: v12.TypeMeta{
+ Kind: "Secret",
+ },
+ ObjectMeta: v12.ObjectMeta{
+ Name: "bar",
+ },
+ Data: map[string][]byte{
+ "myvar": []byte("bar"),
+ },
+ },
+ {
+ TypeMeta: v12.TypeMeta{
+ Kind: "Secret",
+ },
+ ObjectMeta: v12.ObjectMeta{
+ Name: "foo",
+ },
+ Data: map[string][]byte{
+ "myvar": []byte("foo"),
+ },
+ },
+}
diff --git a/pkg/specgen/generate/kube/volume.go b/pkg/specgen/generate/kube/volume.go
index e4f3eb196..a8042b532 100644
--- a/pkg/specgen/generate/kube/volume.go
+++ b/pkg/specgen/generate/kube/volume.go
@@ -116,7 +116,7 @@ func InitializeVolumes(specVolumes []v1.Volume) (map[string]*KubeVolume, error)
for _, specVolume := range specVolumes {
volume, err := VolumeFromSource(specVolume.VolumeSource)
if err != nil {
- return nil, err
+ return nil, errors.Wrapf(err, "failed to create volume %q", specVolume.Name)
}
volumes[specVolume.Name] = volume
diff --git a/pkg/specgen/generate/ports.go b/pkg/specgen/generate/ports.go
index 6cf83ed81..678e36a70 100644
--- a/pkg/specgen/generate/ports.go
+++ b/pkg/specgen/generate/ports.go
@@ -6,6 +6,8 @@ import (
"strconv"
"strings"
+ "github.com/containers/podman/v3/utils"
+
"github.com/containers/podman/v3/libpod/image"
"github.com/containers/podman/v3/pkg/specgen"
"github.com/cri-o/ocicni/pkg/ocicni"
@@ -218,7 +220,7 @@ func parsePortMapping(portMappings []specgen.PortMapping) ([]ocicni.PortMapping,
// Only get a random candidate for single entries or the start
// of a range. Otherwise we just increment the candidate.
if !tmp.isInRange || tmp.startOfRange {
- candidate, err = getRandomPort()
+ candidate, err = utils.GetRandomPort()
if err != nil {
return nil, nil, nil, errors.Wrapf(err, "error getting candidate host port for container port %d", p.ContainerPort)
}
@@ -344,7 +346,7 @@ func createPortMappings(ctx context.Context, s *specgen.SpecGenerator, img *imag
for hostPort == 0 && tries > 0 {
// We can't select a specific protocol, which is
// unfortunate for the UDP case.
- candidate, err := getRandomPort()
+ candidate, err := utils.GetRandomPort()
if err != nil {
return nil, err
}
@@ -419,21 +421,3 @@ func checkProtocol(protocol string, allowSCTP bool) ([]string, error) {
return finalProto, nil
}
-
-// Find a random, open port on the host
-func getRandomPort() (int, error) {
- l, err := net.Listen("tcp", ":0")
- if err != nil {
- return 0, errors.Wrapf(err, "unable to get free TCP port")
- }
- defer l.Close()
- _, randomPort, err := net.SplitHostPort(l.Addr().String())
- if err != nil {
- return 0, errors.Wrapf(err, "unable to determine free port")
- }
- rp, err := strconv.Atoi(randomPort)
- if err != nil {
- return 0, errors.Wrapf(err, "unable to convert random port to int")
- }
- return rp, nil
-}
diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go
index fb7d65da4..f665fc0be 100644
--- a/pkg/specgen/namespaces.go
+++ b/pkg/specgen/namespaces.go
@@ -54,7 +54,7 @@ const (
// Namespace describes the namespace
type Namespace struct {
NSMode NamespaceMode `json:"nsmode,omitempty"`
- Value string `json:"string,omitempty"`
+ Value string `json:"value,omitempty"`
}
// IsDefault returns whether the namespace is set to the default setting (which
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go
index 732579bf0..c10dc5ef5 100644
--- a/pkg/specgen/specgen.go
+++ b/pkg/specgen/specgen.go
@@ -5,7 +5,7 @@ import (
"syscall"
"github.com/containers/image/v5/manifest"
- "github.com/containers/storage"
+ "github.com/containers/storage/types"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
@@ -302,7 +302,7 @@ type ContainerSecurityConfig struct {
// IDMappings are UID and GID mappings that will be used by user
// namespaces.
// Required if UserNS is private.
- IDMappings *storage.IDMappingOptions `json:"idmappings,omitempty"`
+ IDMappings *types.IDMappingOptions `json:"idmappings,omitempty"`
// ReadOnlyFilesystem indicates that everything will be mounted
// as read-only
ReadOnlyFilesystem bool `json:"read_only_filesystem,omitempty"`
diff --git a/pkg/systemd/generate/common.go b/pkg/systemd/generate/common.go
index 94a6f4cb5..eafd45528 100644
--- a/pkg/systemd/generate/common.go
+++ b/pkg/systemd/generate/common.go
@@ -36,22 +36,49 @@ Description=Podman {{{{.ServiceName}}}}.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor={{{{.GraphRoot}}}} {{{{.RunRoot}}}}
`
-// filterPodFlags removes --pod and --pod-id-file from the specified command.
-func filterPodFlags(command []string) []string {
+// filterPodFlags removes --pod, --pod-id-file and --infra-conmon-pidfile from the specified command.
+// argCount is the number of last arguments which should not be filtered, e.g. the container entrypoint.
+func filterPodFlags(command []string, argCount int) []string {
processed := []string{}
- for i := 0; i < len(command); i++ {
+ for i := 0; i < len(command)-argCount; i++ {
s := command[i]
- if s == "--pod" || s == "--pod-id-file" {
+ if s == "--pod" || s == "--pod-id-file" || s == "--infra-conmon-pidfile" {
i++
continue
}
- if strings.HasPrefix(s, "--pod=") || strings.HasPrefix(s, "--pod-id-file=") {
+ if strings.HasPrefix(s, "--pod=") ||
+ strings.HasPrefix(s, "--pod-id-file=") ||
+ strings.HasPrefix(s, "--infra-conmon-pidfile=") {
continue
}
processed = append(processed, s)
}
+ processed = append(processed, command[len(command)-argCount:]...)
+ return processed
+}
+
+// filterCommonContainerFlags removes --conmon-pidfile, --cidfile and --cgroups from the specified command.
+// argCount is the number of last arguments which should not be filtered, e.g. the container entrypoint.
+func filterCommonContainerFlags(command []string, argCount int) []string {
+ processed := []string{}
+ for i := 0; i < len(command)-argCount; i++ {
+ s := command[i]
+
+ switch {
+ case s == "--conmon-pidfile", s == "--cidfile", s == "--cgroups":
+ i++
+ continue
+ case strings.HasPrefix(s, "--conmon-pidfile="),
+ strings.HasPrefix(s, "--cidfile="),
+ strings.HasPrefix(s, "--cgroups="):
+ continue
+ }
+ processed = append(processed, s)
+ }
+ processed = append(processed, command[len(command)-argCount:]...)
return processed
}
diff --git a/pkg/systemd/generate/common_test.go b/pkg/systemd/generate/common_test.go
index 3787e461e..30e758127 100644
--- a/pkg/systemd/generate/common_test.go
+++ b/pkg/systemd/generate/common_test.go
@@ -1,7 +1,6 @@
package generate
import (
- "strings"
"testing"
"github.com/stretchr/testify/assert"
@@ -9,22 +8,144 @@ import (
func TestFilterPodFlags(t *testing.T) {
tests := []struct {
- input []string
+ input []string
+ output []string
+ argCount int
}{
- {[]string{"podman", "pod", "create"}},
- {[]string{"podman", "pod", "create", "--name", "foo"}},
- {[]string{"podman", "pod", "create", "--pod-id-file", "foo"}},
- {[]string{"podman", "pod", "create", "--pod-id-file=foo"}},
- {[]string{"podman", "run", "--pod", "foo"}},
- {[]string{"podman", "run", "--pod=foo"}},
+ {
+ []string{"podman", "pod", "create"},
+ []string{"podman", "pod", "create"},
+ 0,
+ },
+ {
+ []string{"podman", "pod", "create", "--name", "foo"},
+ []string{"podman", "pod", "create", "--name", "foo"},
+ 0,
+ },
+ {
+ []string{"podman", "pod", "create", "--pod-id-file", "foo"},
+ []string{"podman", "pod", "create"},
+ 0,
+ },
+ {
+ []string{"podman", "pod", "create", "--pod-id-file=foo"},
+ []string{"podman", "pod", "create"},
+ 0,
+ },
+ {
+ []string{"podman", "pod", "create", "--pod-id-file", "foo", "--infra-conmon-pidfile", "foo"},
+ []string{"podman", "pod", "create"},
+ 0,
+ },
+ {
+ []string{"podman", "pod", "create", "--pod-id-file", "foo", "--infra-conmon-pidfile=foo"},
+ []string{"podman", "pod", "create"},
+ 0,
+ },
+ {
+ []string{"podman", "run", "--pod", "foo"},
+ []string{"podman", "run"},
+ 0,
+ },
+ {
+ []string{"podman", "run", "--pod=foo"},
+ []string{"podman", "run"},
+ 0,
+ },
+ {
+ []string{"podman", "run", "--pod=foo", "fedora", "podman", "run", "--pod=test", "alpine"},
+ []string{"podman", "run", "fedora", "podman", "run", "--pod=test", "alpine"},
+ 5,
+ },
+ {
+ []string{"podman", "run", "--pod", "foo", "fedora", "podman", "run", "--pod", "test", "alpine"},
+ []string{"podman", "run", "fedora", "podman", "run", "--pod", "test", "alpine"},
+ 6,
+ },
+ {
+ []string{"podman", "run", "--pod-id-file=foo", "fedora", "podman", "run", "--pod-id-file=test", "alpine"},
+ []string{"podman", "run", "fedora", "podman", "run", "--pod-id-file=test", "alpine"},
+ 5,
+ },
+ {
+ []string{"podman", "run", "--pod-id-file", "foo", "fedora", "podman", "run", "--pod-id-file", "test", "alpine"},
+ []string{"podman", "run", "fedora", "podman", "run", "--pod-id-file", "test", "alpine"},
+ 6,
+ },
+ }
+
+ for _, test := range tests {
+ processed := filterPodFlags(test.input, test.argCount)
+ assert.Equal(t, test.output, processed)
+ }
+}
+
+func TestFilterCommonContainerFlags(t *testing.T) {
+ tests := []struct {
+ input []string
+ output []string
+ argCount int
+ }{
+ {
+ []string{"podman", "run", "alpine"},
+ []string{"podman", "run", "alpine"},
+ 1,
+ },
+ {
+ []string{"podman", "run", "--conmon-pidfile", "foo", "alpine"},
+ []string{"podman", "run", "alpine"},
+ 1,
+ },
+ {
+ []string{"podman", "run", "--conmon-pidfile=foo", "alpine"},
+ []string{"podman", "run", "alpine"},
+ 1,
+ },
+ {
+ []string{"podman", "run", "--cidfile", "foo", "alpine"},
+ []string{"podman", "run", "alpine"},
+ 1,
+ },
+ {
+ []string{"podman", "run", "--cidfile=foo", "alpine"},
+ []string{"podman", "run", "alpine"},
+ 1,
+ },
+ {
+ []string{"podman", "run", "--cgroups", "foo", "alpine"},
+ []string{"podman", "run", "alpine"},
+ 1,
+ },
+ {
+ []string{"podman", "run", "--cgroups=foo", "alpine"},
+ []string{"podman", "run", "alpine"},
+ 1,
+ },
+ {
+ []string{"podman", "run", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo", "alpine"},
+ []string{"podman", "run", "alpine"},
+ 1,
+ },
+ {
+ []string{"podman", "run", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo", "alpine"},
+ []string{"podman", "run", "alpine"},
+ 1,
+ },
+ {
+ []string{"podman", "run", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo", "alpine", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo"},
+ []string{"podman", "run", "alpine", "--cgroups", "foo", "--conmon-pidfile", "foo", "--cidfile", "foo"},
+ 7,
+ },
+ {
+ []string{"podman", "run", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo", "alpine", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo"},
+ []string{"podman", "run", "alpine", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo"},
+ 4,
+ },
}
for _, test := range tests {
- processed := filterPodFlags(test.input)
- for _, s := range processed {
- assert.False(t, strings.HasPrefix(s, "--pod-id-file"))
- assert.False(t, strings.HasPrefix(s, "--pod"))
- }
+ processed := filterCommonContainerFlags(test.input, test.argCount)
+ assert.Equal(t, test.output, processed)
}
}
diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go
index 9343a5067..e06655a8d 100644
--- a/pkg/systemd/generate/containers.go
+++ b/pkg/systemd/generate/containers.go
@@ -71,6 +71,12 @@ type containerInfo struct {
// If not nil, the container is part of the pod. We can use the
// podInfo to extract the relevant data.
Pod *podInfo
+ // Location of the GraphRoot for the container. Required for ensuring the
+ // volume has finished mounting when coming online at boot.
+ GraphRoot string
+ // Location of the RunRoot for the container. Required for ensuring the tmpfs
+ // or volume exists and is mounted when coming online at boot.
+ RunRoot string
}
const containerTemplate = headerTemplate + `
@@ -132,6 +138,21 @@ func generateContainerInfo(ctr *libpod.Container, options entities.GenerateSyste
nameOrID, serviceName := containerServiceName(ctr, options)
+ store := ctr.Runtime().GetStore()
+ if store == nil {
+ return nil, errors.Errorf("could not determine storage store for container")
+ }
+
+ graphRoot := store.GraphRoot()
+ if graphRoot == "" {
+ return nil, errors.Errorf("could not lookup container's graphroot: got empty string")
+ }
+
+ runRoot := store.RunRoot()
+ if runRoot == "" {
+ return nil, errors.Errorf("could not lookup container's runroot: got empty string")
+ }
+
info := containerInfo{
ServiceName: serviceName,
ContainerNameOrID: nameOrID,
@@ -140,6 +161,8 @@ func generateContainerInfo(ctr *libpod.Container, options entities.GenerateSyste
StopTimeout: timeout,
GenerateTimestamp: true,
CreateCommand: createCommand,
+ GraphRoot: graphRoot,
+ RunRoot: runRoot,
}
return &info, nil
@@ -215,13 +238,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
"--cidfile", "{{{{.ContainerIDFile}}}}",
"--cgroups=no-conmon",
)
- // If the container is in a pod, make sure that the
- // --pod-id-file is set correctly.
- if info.Pod != nil {
- podFlags := []string{"--pod-id-file", "{{{{.Pod.PodIDFile}}}}"}
- startCommand = append(startCommand, podFlags...)
- info.CreateCommand = filterPodFlags(info.CreateCommand)
- }
+ remainingCmd := info.CreateCommand[index:]
// Presence check for certain flags/options.
fs := pflag.NewFlagSet("args", pflag.ContinueOnError)
@@ -231,7 +248,16 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
fs.BoolP("detach", "d", false, "")
fs.String("name", "", "")
fs.Bool("replace", false, "")
- fs.Parse(info.CreateCommand[index:])
+ fs.Parse(remainingCmd)
+
+ remainingCmd = filterCommonContainerFlags(remainingCmd, fs.NArg())
+ // If the container is in a pod, make sure that the
+ // --pod-id-file is set correctly.
+ if info.Pod != nil {
+ podFlags := []string{"--pod-id-file", "{{{{.Pod.PodIDFile}}}}"}
+ startCommand = append(startCommand, podFlags...)
+ remainingCmd = filterPodFlags(remainingCmd, fs.NArg())
+ }
hasDetachParam, err := fs.GetBool("detach")
if err != nil {
@@ -243,8 +269,6 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
return "", err
}
- remainingCmd := info.CreateCommand[index:]
-
if !hasDetachParam {
// Enforce detaching
//
diff --git a/pkg/systemd/generate/containers_test.go b/pkg/systemd/generate/containers_test.go
index ebbbdb786..899ba6bfa 100644
--- a/pkg/systemd/generate/containers_test.go
+++ b/pkg/systemd/generate/containers_test.go
@@ -48,6 +48,7 @@ Description=Podman container-639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -73,6 +74,7 @@ Description=Podman container-foobar.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -96,6 +98,7 @@ Description=Podman container-foobar.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
BindsTo=a.service b.service c.service pod.service
After=a.service b.service c.service pod.service
@@ -121,6 +124,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -145,6 +149,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -169,6 +174,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -193,6 +199,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -217,6 +224,7 @@ Description=Podman container-639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -242,6 +250,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -270,6 +279,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -294,6 +304,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -318,6 +329,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -342,6 +354,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -366,6 +379,7 @@ Description=Podman jadda-jadda.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -381,6 +395,56 @@ Type=forking
[Install]
WantedBy=multi-user.target default.target
`
+
+ goodNewWithIDFiles := `# jadda-jadda.service
+# autogenerated by Podman CI
+
+[Unit]
+Description=Podman jadda-jadda.service
+Documentation=man:podman-generate-systemd(1)
+Wants=network.target
+After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
+
+[Service]
+Environment=PODMAN_SYSTEMD_UNIT=%n
+Restart=always
+TimeoutStopSec=70
+ExecStartPre=/bin/rm -f %t/jadda-jadda.pid %t/jadda-jadda.ctr-id
+ExecStart=/usr/bin/podman run --conmon-pidfile %t/jadda-jadda.pid --cidfile %t/jadda-jadda.ctr-id --cgroups=no-conmon -d awesome-image:latest podman run --cgroups=foo --conmon-pidfile=foo --cidfile=foo alpine
+ExecStop=/usr/bin/podman stop --ignore --cidfile %t/jadda-jadda.ctr-id -t 10
+ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/jadda-jadda.ctr-id
+PIDFile=%t/jadda-jadda.pid
+Type=forking
+
+[Install]
+WantedBy=multi-user.target default.target
+`
+
+ goodNewWithPodIDFiles := `# jadda-jadda.service
+# autogenerated by Podman CI
+
+[Unit]
+Description=Podman jadda-jadda.service
+Documentation=man:podman-generate-systemd(1)
+Wants=network.target
+After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
+
+[Service]
+Environment=PODMAN_SYSTEMD_UNIT=%n
+Restart=always
+TimeoutStopSec=70
+ExecStartPre=/bin/rm -f %t/jadda-jadda.pid %t/jadda-jadda.ctr-id
+ExecStart=/usr/bin/podman run --conmon-pidfile %t/jadda-jadda.pid --cidfile %t/jadda-jadda.ctr-id --cgroups=no-conmon --pod-id-file %t/pod-foobar.pod-id-file -d awesome-image:latest podman run --cgroups=foo --conmon-pidfile=foo --cidfile=foo --pod-id-file /tmp/pod-foobar.pod-id-file alpine
+ExecStop=/usr/bin/podman stop --ignore --cidfile %t/jadda-jadda.ctr-id -t 10
+ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/jadda-jadda.ctr-id
+PIDFile=%t/jadda-jadda.pid
+Type=forking
+
+[Install]
+WantedBy=multi-user.target default.target
+`
tests := []struct {
name string
info containerInfo
@@ -400,6 +464,8 @@ WantedBy=multi-user.target default.target
StopTimeout: 22,
PodmanVersion: "CI",
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodID,
false,
@@ -416,6 +482,8 @@ WantedBy=multi-user.target default.target
StopTimeout: 22,
PodmanVersion: "CI",
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodIDNoHeaderInfo,
false,
@@ -432,6 +500,8 @@ WantedBy=multi-user.target default.target
StopTimeout: 10,
PodmanVersion: "CI",
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodName,
false,
@@ -449,6 +519,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
BoundToServices: []string{"pod", "a", "b", "c"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodNameBoundTo,
false,
@@ -464,6 +536,8 @@ WantedBy=multi-user.target default.target
StopTimeout: 10,
PodmanVersion: "CI",
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
"",
false,
@@ -481,6 +555,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "container", "run", "--name", "jadda-jadda", "--hostname", "hello-world", "awesome-image:latest", "command", "arg1", "...", "argN", "foo=arg \"with \" space"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodWithNameAndGeneric,
true,
@@ -498,6 +574,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "-d", "--name", "jadda-jadda", "--hostname", "hello-world", "awesome-image:latest", "command", "arg1", "...", "argN"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodWithExplicitShortDetachParam,
true,
@@ -515,6 +593,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "-d", "--name", "jadda-jadda", "--hostname", "hello-world", "awesome-image:latest", "command", "arg1", "...", "argN"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
Pod: &podInfo{
PodIDFile: "%t/pod-foobar.pod-id-file",
},
@@ -535,6 +615,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "--detach", "--name", "jadda-jadda", "--hostname", "hello-world", "awesome-image:latest", "command", "arg1", "...", "argN"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodNameNewDetach,
true,
@@ -552,6 +634,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "awesome-image:latest"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodIDNew,
true,
@@ -569,6 +653,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "--detach=true", "awesome-image:latest"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
genGoodNewDetach("--detach=true"),
true,
@@ -586,6 +672,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "--detach=false", "awesome-image:latest"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
genGoodNewDetach("-d"),
true,
@@ -603,6 +691,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "--name", "test", "-p", "80:80", "--detach=false", "awesome-image:latest", "somecmd", "--detach=false"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodNameNewDetachFalseWithCmd,
true,
@@ -620,6 +710,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "--name", "test", "-p", "80:80", "--detach=false", "--detach=false", "awesome-image:latest", "somecmd", "--detach=false"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodNameNewDetachFalseWithCmd,
true,
@@ -637,6 +729,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "-dti", "awesome-image:latest"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
genGoodNewDetach("-dti"),
true,
@@ -654,6 +748,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "run", "-tid", "awesome-image:latest"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
genGoodNewDetach("-tid"),
true,
@@ -671,6 +767,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "--events-backend", "none", "--runroot", "/root", "run", "awesome-image:latest"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodNewRootFlags,
true,
@@ -688,6 +786,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "container", "create", "awesome-image:latest"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodContainerCreate,
true,
@@ -705,6 +805,8 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "create", "--name", "test", "--log-driver=journald", "--log-opt=tag={{.Name}}", "awesome-image:latest"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodNewWithJournaldTag,
true,
@@ -722,12 +824,55 @@ WantedBy=multi-user.target default.target
PodmanVersion: "CI",
CreateCommand: []string{"I'll get stripped", "create", "--name", "test", "awesome-image:latest", "sh", "-c", "kill $$ && echo %\\"},
EnvVariable: define.EnvVariable,
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
},
goodNewWithSpecialChars,
true,
false,
false,
},
+ {"good with ID files",
+ containerInfo{
+ Executable: "/usr/bin/podman",
+ ServiceName: "jadda-jadda",
+ ContainerNameOrID: "jadda-jadda",
+ RestartPolicy: "always",
+ PIDFile: "/var/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
+ StopTimeout: 10,
+ PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
+ CreateCommand: []string{"I'll get stripped", "create", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo", "awesome-image:latest", "podman", "run", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo", "alpine"},
+ EnvVariable: define.EnvVariable,
+ },
+ goodNewWithIDFiles,
+ true,
+ false,
+ false,
+ },
+ {"good with pod ID files",
+ containerInfo{
+ Executable: "/usr/bin/podman",
+ ServiceName: "jadda-jadda",
+ ContainerNameOrID: "jadda-jadda",
+ RestartPolicy: "always",
+ PIDFile: "/var/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
+ StopTimeout: 10,
+ PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
+ CreateCommand: []string{"I'll get stripped", "create", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo", "--pod", "test", "awesome-image:latest", "podman", "run", "--cgroups=foo", "--conmon-pidfile=foo", "--cidfile=foo", "--pod-id-file", "/tmp/pod-foobar.pod-id-file", "alpine"},
+ EnvVariable: define.EnvVariable,
+ Pod: &podInfo{
+ PodIDFile: "%t/pod-foobar.pod-id-file",
+ },
+ },
+ goodNewWithPodIDFiles,
+ true,
+ false,
+ false,
+ },
}
for _, tt := range tests {
test := tt
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go
index f96058d36..1b92649e8 100644
--- a/pkg/systemd/generate/pods.go
+++ b/pkg/systemd/generate/pods.go
@@ -73,6 +73,12 @@ type podInfo struct {
ExecStopPost string
// Removes autogenerated by Podman and timestamp if set to true
GenerateNoHeader bool
+ // Location of the GraphRoot for the pod. Required for ensuring the
+ // volume has finished mounting when coming online at boot.
+ GraphRoot string
+ // Location of the RunRoot for the pod. Required for ensuring the tmpfs
+ // or volume exists and is mounted when coming online at boot.
+ RunRoot string
}
const podTemplate = headerTemplate + `Requires={{{{- range $index, $value := .RequiredServices -}}}}{{{{if $index}}}} {{{{end}}}}{{{{ $value }}}}.service{{{{end}}}}
@@ -273,16 +279,16 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions)
}
podRootArgs = info.CreateCommand[1 : podCreateIndex-1]
info.RootFlags = strings.Join(escapeSystemdArguments(podRootArgs), " ")
- podCreateArgs = filterPodFlags(info.CreateCommand[podCreateIndex+1:])
+ podCreateArgs = filterPodFlags(info.CreateCommand[podCreateIndex+1:], 0)
}
// We're hard-coding the first five arguments and append the
// CreateCommand with a stripped command and subcommand.
startCommand := []string{info.Executable}
startCommand = append(startCommand, podRootArgs...)
startCommand = append(startCommand,
- []string{"pod", "create",
- "--infra-conmon-pidfile", "{{{{.PIDFile}}}}",
- "--pod-id-file", "{{{{.PodIDFile}}}}"}...)
+ "pod", "create",
+ "--infra-conmon-pidfile", "{{{{.PIDFile}}}}",
+ "--pod-id-file", "{{{{.PodIDFile}}}}")
// Presence check for certain flags/options.
fs := pflag.NewFlagSet("args", pflag.ContinueOnError)
diff --git a/pkg/systemd/generate/pods_test.go b/pkg/systemd/generate/pods_test.go
index 50c8d4556..0e4d92c50 100644
--- a/pkg/systemd/generate/pods_test.go
+++ b/pkg/systemd/generate/pods_test.go
@@ -47,6 +47,7 @@ Description=Podman pod-123abc.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
Requires=container-1.service container-2.service
Before=container-1.service container-2.service
@@ -74,6 +75,7 @@ Description=Podman pod-123abc.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
Requires=container-1.service container-2.service
Before=container-1.service container-2.service
@@ -101,6 +103,7 @@ Description=Podman pod-123abc.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
Requires=container-1.service container-2.service
Before=container-1.service container-2.service
@@ -128,6 +131,7 @@ Description=Podman pod-123abc.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
Requires=container-1.service container-2.service
Before=container-1.service container-2.service
@@ -155,6 +159,7 @@ Description=Podman pod-123abc.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
Requires=container-1.service container-2.service
Before=container-1.service container-2.service
@@ -191,6 +196,8 @@ WantedBy=multi-user.target default.target
PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
StopTimeout: 42,
PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
RequiredServices: []string{"container-1", "container-2"},
CreateCommand: []string{"podman", "pod", "create", "--name", "foo", "bar=arg with space"},
},
@@ -208,6 +215,8 @@ WantedBy=multi-user.target default.target
PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
StopTimeout: 42,
PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
RequiredServices: []string{"container-1", "container-2"},
CreateCommand: []string{"podman", "pod", "create", "--name", "foo", "bar=arg with space"},
},
@@ -225,6 +234,8 @@ WantedBy=multi-user.target default.target
PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
StopTimeout: 42,
PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
RequiredServices: []string{"container-1", "container-2"},
CreateCommand: []string{"podman", "--events-backend", "none", "--runroot", "/root", "pod", "create", "--name", "foo", "bar=arg with space"},
},
@@ -242,6 +253,8 @@ WantedBy=multi-user.target default.target
PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
StopTimeout: 10,
PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
RequiredServices: []string{"container-1", "container-2"},
CreateCommand: []string{"podman", "pod", "create", "--name", "foo", "bar=arg with space"},
},
@@ -259,6 +272,8 @@ WantedBy=multi-user.target default.target
PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
StopTimeout: 10,
PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
RequiredServices: []string{"container-1", "container-2"},
CreateCommand: []string{"podman", "--events-backend", "none", "--runroot", "/root", "pod", "create", "--name", "foo", "bar=arg with space"},
},
@@ -276,6 +291,8 @@ WantedBy=multi-user.target default.target
PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
StopTimeout: 10,
PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
RequiredServices: []string{"container-1", "container-2"},
CreateCommand: []string{"podman", "pod", "create", "--name", "foo", "--replace=false"},
},
@@ -293,6 +310,8 @@ WantedBy=multi-user.target default.target
PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
StopTimeout: 10,
PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
RequiredServices: []string{"container-1", "container-2"},
CreateCommand: []string{"podman", "pod", "create", "--name", "foo", "--label", "key={{someval}}"},
},
@@ -301,6 +320,25 @@ WantedBy=multi-user.target default.target
false,
false,
},
+ {"pod --new with ID files",
+ podInfo{
+ Executable: "/usr/bin/podman",
+ ServiceName: "pod-123abc",
+ InfraNameOrID: "jadda-jadda-infra",
+ RestartPolicy: "on-failure",
+ PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
+ StopTimeout: 10,
+ PodmanVersion: "CI",
+ GraphRoot: "/var/lib/containers/storage",
+ RunRoot: "/var/run/containers/storage",
+ RequiredServices: []string{"container-1", "container-2"},
+ CreateCommand: []string{"podman", "pod", "create", "--infra-conmon-pidfile", "/tmp/pod-123abc.pid", "--pod-id-file", "/tmp/pod-123abc.pod-id", "--name", "foo", "bar=arg with space"},
+ },
+ podGoodNamedNew,
+ true,
+ false,
+ false,
+ },
}
for _, tt := range tests {
diff --git a/pkg/util/filters.go b/pkg/util/filters.go
index 51b2c5331..43bf646f1 100644
--- a/pkg/util/filters.go
+++ b/pkg/util/filters.go
@@ -11,11 +11,11 @@ import (
"github.com/pkg/errors"
)
-// ComputeUntilTimestamp extracts unitil timestamp from filters
-func ComputeUntilTimestamp(filter string, filterValues []string) (time.Time, error) {
+// ComputeUntilTimestamp extracts until timestamp from filters
+func ComputeUntilTimestamp(filterValues []string) (time.Time, error) {
invalid := time.Time{}
if len(filterValues) != 1 {
- return invalid, errors.Errorf("specify exactly one timestamp for %s", filter)
+ return invalid, errors.Errorf("specify exactly one timestamp for until")
}
ts, err := timetype.GetTimestamp(filterValues[0], time.Now())
if err != nil {
@@ -93,3 +93,24 @@ func PrepareFilters(r *http.Request) (*map[string][]string, error) {
}
return &filterMap, nil
}
+
+// MatchLabelFilters matches labels and returs true if they are valid
+func MatchLabelFilters(filterValues []string, labels map[string]string) bool {
+outer:
+ for _, filterValue := range filterValues {
+ filterArray := strings.SplitN(filterValue, "=", 2)
+ filterKey := filterArray[0]
+ if len(filterArray) > 1 {
+ filterValue = filterArray[1]
+ } else {
+ filterValue = ""
+ }
+ for labelKey, labelValue := range labels {
+ if labelKey == filterKey && (filterValue == "" || labelValue == filterValue) {
+ continue outer
+ }
+ }
+ return false
+ }
+ return true
+}
diff --git a/pkg/util/filters_test.go b/pkg/util/filters_test.go
new file mode 100644
index 000000000..47259013e
--- /dev/null
+++ b/pkg/util/filters_test.go
@@ -0,0 +1,113 @@
+package util
+
+import (
+ "testing"
+)
+
+func TestMatchLabelFilters(t *testing.T) {
+ testLabels := map[string]string{
+ "label1": "",
+ "label2": "test",
+ "label3": "",
+ }
+ type args struct {
+ filterValues []string
+ labels map[string]string
+ }
+ tests := []struct {
+ name string
+ args args
+ want bool
+ }{
+ {
+ name: "Match when all filters the same as labels",
+ args: args{
+ filterValues: []string{"label1", "label3", "label2=test"},
+ labels: testLabels,
+ },
+ want: true,
+ },
+ {
+ name: "Match when filter value not provided in args",
+ args: args{
+ filterValues: []string{"label2"},
+ labels: testLabels,
+ },
+ want: true,
+ },
+ {
+ name: "Match when no filter value is given",
+ args: args{
+ filterValues: []string{"label2="},
+ labels: testLabels,
+ },
+ want: true,
+ },
+ {
+ name: "Do not match when filter value differs",
+ args: args{
+ filterValues: []string{"label2=differs"},
+ labels: testLabels,
+ },
+ want: false,
+ },
+ {
+ name: "Do not match when filter value not listed in labels",
+ args: args{
+ filterValues: []string{"label1=xyz"},
+ labels: testLabels,
+ },
+ want: false,
+ },
+ {
+ name: "Do not match when one from many not ok",
+ args: args{
+ filterValues: []string{"label1=xyz", "invalid=valid"},
+ labels: testLabels,
+ },
+ want: false,
+ },
+ }
+ for _, tt := range tests {
+ tt := tt
+ t.Run(tt.name, func(t *testing.T) {
+ if got := MatchLabelFilters(tt.args.filterValues, tt.args.labels); got != tt.want {
+ t.Errorf("MatchLabelFilters() = %v, want %v", got, tt.want)
+ }
+ })
+ }
+}
+
+func TestComputeUntilTimestamp(t *testing.T) {
+ tests := []struct {
+ name string
+ args []string
+ wantErr bool
+ }{
+ {
+ name: "Return error when more values in list",
+ args: []string{"5h", "6s"},
+ wantErr: true,
+ },
+ {
+ name: "Return error when invalid time",
+ args: []string{"invalidTime"},
+ wantErr: true,
+ },
+ {
+ name: "Do not return error when correct time format supplied",
+ args: []string{"44m"},
+ wantErr: false,
+ },
+ }
+ for _, tt := range tests {
+ tt := tt
+ t.Run(tt.name, func(t *testing.T) {
+ _, err := ComputeUntilTimestamp(tt.args)
+ if (err != nil) != tt.wantErr {
+ t.Errorf("ComputeUntilTimestamp() error = %v, wantErr %v", err, tt.wantErr)
+ return
+ }
+ })
+ }
+}
diff --git a/pkg/util/utils.go b/pkg/util/utils.go
index a4c8f3a64..bbaf72981 100644
--- a/pkg/util/utils.go
+++ b/pkg/util/utils.go
@@ -20,8 +20,8 @@ import (
"github.com/containers/podman/v3/pkg/namespaces"
"github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/podman/v3/pkg/signal"
- "github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
+ stypes "github.com/containers/storage/types"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
@@ -344,8 +344,8 @@ func ParseSignal(rawSignal string) (syscall.Signal, error) {
}
// GetKeepIDMapping returns the mappings and the user to use when keep-id is used
-func GetKeepIDMapping() (*storage.IDMappingOptions, int, int, error) {
- options := storage.IDMappingOptions{
+func GetKeepIDMapping() (*stypes.IDMappingOptions, int, int, error) {
+ options := stypes.IDMappingOptions{
HostUIDMapping: true,
HostGIDMapping: true,
}
@@ -395,8 +395,8 @@ func GetKeepIDMapping() (*storage.IDMappingOptions, int, int, error) {
}
// ParseIDMapping takes idmappings and subuid and subgid maps and returns a storage mapping
-func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []string, subUIDMap, subGIDMap string) (*storage.IDMappingOptions, error) {
- options := storage.IDMappingOptions{
+func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []string, subUIDMap, subGIDMap string) (*stypes.IDMappingOptions, error) {
+ options := stypes.IDMappingOptions{
HostUIDMapping: true,
HostGIDMapping: true,
}
@@ -479,7 +479,7 @@ type tomlConfig struct {
} `toml:"storage"`
}
-func getTomlStorage(storeOptions *storage.StoreOptions) *tomlConfig {
+func getTomlStorage(storeOptions *stypes.StoreOptions) *tomlConfig {
config := new(tomlConfig)
config.Storage.Driver = storeOptions.GraphDriverName
@@ -496,7 +496,7 @@ func getTomlStorage(storeOptions *storage.StoreOptions) *tomlConfig {
}
// WriteStorageConfigFile writes the configuration to a file
-func WriteStorageConfigFile(storageOpts *storage.StoreOptions, storageConf string) error {
+func WriteStorageConfigFile(storageOpts *stypes.StoreOptions, storageConf string) error {
if err := os.MkdirAll(filepath.Dir(storageConf), 0755); err != nil {
return err
}
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index 4ebaeff45..f854d38ab 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -77,6 +77,55 @@ for i in $iid ${iid:0:12} $PODMAN_TEST_IMAGE_NAME; do
t GET "libpod/images/$i/get?compress=false" 200 '[POSIX tar archive]'
done
+#compat api list images sanity checks
+t GET images/json?filters='garb1age}' 500 \
+ .cause="invalid character 'g' looking for beginning of value"
+t GET images/json?filters='{"label":["testl' 500 \
+ .cause="unexpected end of JSON input"
+
+#libpod api list images sanity checks
+t GET libpod/images/json?filters='garb1age}' 500 \
+ .cause="invalid character 'g' looking for beginning of value"
+t GET libpod/images/json?filters='{"label":["testl' 500 \
+ .cause="unexpected end of JSON input"
+
+# Prune images - bad filter input
+t POST images/prune?filters='garb1age}' 500 \
+ .cause="invalid character 'g' looking for beginning of value"
+t POST libpod/images/prune?filters='garb1age}' 500 \
+ .cause="invalid character 'g' looking for beginning of value"
+
+## Prune images with illformed label
+t POST images/prune?filters='{"label":["tes' 500 \
+ .cause="unexpected end of JSON input"
+t POST libpod/images/prune?filters='{"label":["tes' 500 \
+ .cause="unexpected end of JSON input"
+
+
+#create, list and remove dangling image
+podman image build -t test:test -<<EOF
+from alpine
+RUN >file1
+EOF
+
+podman image build -t test:test --label xyz -<<EOF
+from alpine
+RUN >file2
+EOF
+
+t GET images/json?filters='{"dangling":["true"]}' 200 length=1
+t POST images/prune?filters='{"dangling":["true"]}' 200
+t GET images/json?filters='{"dangling":["true"]}' 200 length=0
+
+#label filter check in libpod and compat
+t GET images/json?filters='{"label":["xyz"]}' 200 length=1
+t GET libpod/images/json?filters='{"label":["xyz"]}' 200 length=1
+
+t DELETE libpod/images/test:test 200
+
+t GET images/json?filters='{"label":["xyz"]}' 200 length=0
+t GET libpod/images/json?filters='{"label":["xyz"]}' 200 length=0
+
# Export more than one image
# FIXME FIXME FIXME, this doesn't work:
# not ok 64 [10-images] GET images/get?names=alpine,busybox : status
diff --git a/test/apiv2/40-pods.at b/test/apiv2/40-pods.at
index f3272c41e..94c72dbaa 100644
--- a/test/apiv2/40-pods.at
+++ b/test/apiv2/40-pods.at
@@ -116,6 +116,12 @@ t GET libpod/pods/foo/top?ps_args=args,pid 200 \
.Titles[0]="COMMAND" \
.Titles[1]="PID" \
+#api list pods sanity checks
+t GET libpod/pods/json?filters='garb1age}' 400 \
+ .cause="invalid character 'g' looking for beginning of value"
+t GET libpod/pods/json?filters='{"label":["testl' 400 \
+ .cause="unexpected end of JSON input"
+
# FIXME: I'm not sure what 'prune' is supposed to do; as of 20200224 it
# just returns 200 (ok) with empty result list.
#t POST libpod/pods/prune 200 # FIXME: 2020-02-24 returns 200 {}
diff --git a/test/buildah-bud/buildah-tests.diff b/test/buildah-bud/buildah-tests.diff
index 92adabcac..ad35e5926 100644
--- a/test/buildah-bud/buildah-tests.diff
+++ b/test/buildah-bud/buildah-tests.diff
@@ -1,4 +1,4 @@
-From c85882a8f7fb6efbf4d59dfe8340bfbef57ccd48 Mon Sep 17 00:00:00 2001
+From a49a2e48421c6f3bb1a56ae372de1f3d1a45d1f1 Mon Sep 17 00:00:00 2001
From: Ed Santiago <santiago@redhat.com>
Date: Tue, 9 Feb 2021 17:28:05 -0700
Subject: [PATCH] tweaks for running buildah tests under podman
@@ -10,7 +10,7 @@ Signed-off-by: Ed Santiago <santiago@redhat.com>
2 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/tests/bud.bats b/tests/bud.bats
-index 1efc3c58..9a39d594 100644
+index cf55d9a4..60cb6f96 100644
--- a/tests/bud.bats
+++ b/tests/bud.bats
@@ -4,7 +4,7 @@ load helpers
@@ -22,7 +22,7 @@ index 1efc3c58..9a39d594 100644
}
@test "bud with --dns* flags" {
-@@ -95,6 +95,7 @@ symlink(subdir)"
+@@ -117,6 +117,7 @@ symlink(subdir)"
}
@test "bud-flags-order-verification" {
@@ -30,7 +30,7 @@ index 1efc3c58..9a39d594 100644
run_buildah 125 bud /tmp/tmpdockerfile/ -t blabla
check_options_flag_err "-t"
-@@ -1324,13 +1325,13 @@ function _test_http() {
+@@ -1416,13 +1417,13 @@ function _test_http() {
@test "bud with dir for file but no Dockerfile in dir" {
target=alpine-image
run_buildah 125 bud --signature-policy ${TESTSDIR}/policy.json -t ${target} -f ${TESTSDIR}/bud/empty-dir ${TESTSDIR}/bud/empty-dir
@@ -46,7 +46,7 @@ index 1efc3c58..9a39d594 100644
}
@test "bud with ARG before FROM default value" {
-@@ -1742,7 +1743,9 @@ _EOF
+@@ -1834,7 +1835,9 @@ _EOF
run_buildah bud --signature-policy ${TESTSDIR}/policy.json --layers -t test-img-2 --build-arg TEST=foo -f Dockerfile4 ${TESTSDIR}/bud/build-arg
run_buildah inspect -f '{{.FromImageID}}' test-img-2
argsid="$output"
@@ -57,7 +57,7 @@ index 1efc3c58..9a39d594 100644
# Set the build-arg via an ENV in the local environment and verify that the cached layers are not used
export TEST=bar
-@@ -1795,6 +1798,7 @@ _EOF
+@@ -1887,6 +1890,7 @@ _EOF
}
@test "bud without any arguments should succeed" {
@@ -65,7 +65,7 @@ index 1efc3c58..9a39d594 100644
cd ${TESTSDIR}/bud/from-scratch
run_buildah bud --signature-policy ${TESTSDIR}/policy.json
}
-@@ -1802,7 +1806,7 @@ _EOF
+@@ -1894,7 +1898,7 @@ _EOF
@test "bud without any arguments should fail when no Dockerfile exist" {
cd $(mktemp -d)
run_buildah 125 bud --signature-policy ${TESTSDIR}/policy.json
@@ -74,7 +74,7 @@ index 1efc3c58..9a39d594 100644
}
@test "bud with specified context should fail if directory contains no Dockerfile" {
-@@ -1815,16 +1819,17 @@ _EOF
+@@ -1907,16 +1911,17 @@ _EOF
DIR=$(mktemp -d)
mkdir -p "$DIR"/Dockerfile
run_buildah 125 bud --signature-policy ${TESTSDIR}/policy.json "$DIR"
@@ -94,7 +94,7 @@ index 1efc3c58..9a39d594 100644
DIR=$(mktemp -d)
echo "FROM alpine" > "$DIR"/Dockerfile
run_buildah 0 bud --signature-policy ${TESTSDIR}/policy.json "$DIR"/Dockerfile
-@@ -1876,7 +1881,7 @@ _EOF
+@@ -1968,7 +1973,7 @@ _EOF
@test "bud-squash-hardlinks" {
_prefetch busybox
@@ -103,15 +103,7 @@ index 1efc3c58..9a39d594 100644
}
@test "bud with additional directory of devices" {
-@@ -2023,6 +2028,7 @@ _EOF
- }
-
- @test "bud pull never" {
-+ skip "FIXME: podman issue #9573"
- target=pull
- run_buildah 125 bud --signature-policy ${TESTSDIR}/policy.json -t ${target} --pull-never ${TESTSDIR}/bud/pull
- expect_output --substring "pull policy is \"never\" but \""
-@@ -2042,6 +2048,7 @@ _EOF
+@@ -2134,6 +2139,7 @@ _EOF
}
@test "bud with Containerfile should fail with nonexistent authfile" {
@@ -119,7 +111,7 @@ index 1efc3c58..9a39d594 100644
target=alpine-image
run_buildah 125 bud --authfile /tmp/nonexistent --signature-policy ${TESTSDIR}/policy.json -t ${target} ${TESTSDIR}/bud/containerfile
}
-@@ -2169,6 +2176,7 @@ EOM
+@@ -2261,6 +2267,7 @@ EOM
}
@test "bud with encrypted FROM image" {
@@ -127,7 +119,7 @@ index 1efc3c58..9a39d594 100644
_prefetch busybox
mkdir ${TESTDIR}/tmp
openssl genrsa -out ${TESTDIR}/tmp/mykey.pem 1024
-@@ -2241,8 +2249,6 @@ EOM
+@@ -2333,8 +2340,6 @@ EOM
_prefetch alpine
run_buildah bud --timestamp=0 --quiet --pull=false --signature-policy ${TESTSDIR}/policy.json -t timestamp -f Dockerfile.1 ${TESTSDIR}/bud/cache-stages
cid=$output
@@ -136,8 +128,16 @@ index 1efc3c58..9a39d594 100644
run_buildah inspect --format '{{ .OCIv1.Created }}' timestamp
expect_output --substring "1970-01-01"
run_buildah inspect --format '{{ .History }}' timestamp
+@@ -2594,6 +2599,7 @@ _EOF
+ }
+
+ @test "bud with --arch flag" {
++ skip "FIXME: for podman, emergency skip to get CI going"
+ _prefetch alpine
+ mytmpdir=${TESTDIR}/my-dir
+ mkdir -p ${mytmpdir}
diff --git a/tests/helpers.bash b/tests/helpers.bash
-index 5623a0e7..9683360f 100644
+index b28fd2c3..d42a6b82 100644
--- a/tests/helpers.bash
+++ b/tests/helpers.bash
@@ -70,7 +70,7 @@ function _prefetch() {
diff --git a/test/e2e/build/basicalpine/Containerfile b/test/e2e/build/basicalpine/Containerfile
index 67fd37901..f6e07066c 100644
--- a/test/e2e/build/basicalpine/Containerfile
+++ b/test/e2e/build/basicalpine/Containerfile
@@ -1 +1 @@
-FROM alpine
+FROM quay.io/libpod/alpine:latest
diff --git a/test/e2e/build/basicalpine/Containerfile.path b/test/e2e/build/basicalpine/Containerfile.path
index d2b03a6b8..a1349eb05 100644
--- a/test/e2e/build/basicalpine/Containerfile.path
+++ b/test/e2e/build/basicalpine/Containerfile.path
@@ -1,2 +1,2 @@
-FROM alpine
+FROM quay.io/libpod/alpine:latest
ENV PATH=/tmp:/bin:/usr/bin:/usr/sbin
diff --git a/test/e2e/build/basicalpine/Containerfile.volume b/test/e2e/build/basicalpine/Containerfile.volume
index 6a4fc8242..283d6376e 100644
--- a/test/e2e/build/basicalpine/Containerfile.volume
+++ b/test/e2e/build/basicalpine/Containerfile.volume
@@ -1,2 +1,2 @@
-FROM alpine
+FROM quay.io/libpod/alpine:latest
VOLUME "/volume0"
diff --git a/test/e2e/build/squash/Dockerfile.squash-a b/test/e2e/build/squash/Dockerfile.squash-a
index f084e093d..ade3eafce 100644
--- a/test/e2e/build/squash/Dockerfile.squash-a
+++ b/test/e2e/build/squash/Dockerfile.squash-a
@@ -1,2 +1,2 @@
-FROM busybox:latest
+FROM quay.io/libpod/busybox:latest
ADD alpinetest.tgz /data
diff --git a/test/e2e/build/squash/Dockerfile.squash-c b/test/e2e/build/squash/Dockerfile.squash-c
index df9c90388..63bf84e69 100644
--- a/test/e2e/build/squash/Dockerfile.squash-c
+++ b/test/e2e/build/squash/Dockerfile.squash-c
@@ -1,3 +1,3 @@
-FROM busybox:latest
+FROM quay.io/libpod/busybox:latest
ADD alpinetest.tgz /data
RUN rm -rf /data
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index e061a2154..95ed23313 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "fmt"
"io/ioutil"
"os"
"path/filepath"
@@ -150,7 +151,7 @@ var _ = Describe("Podman build", func() {
}
fakeFile := filepath.Join(os.TempDir(), "Containerfile")
- Expect(ioutil.WriteFile(fakeFile, []byte("FROM alpine"), 0755)).To(BeNil())
+ Expect(ioutil.WriteFile(fakeFile, []byte(fmt.Sprintf("FROM %s", ALPINE)), 0755)).To(BeNil())
targetFile := filepath.Join(targetPath, "Containerfile")
Expect(ioutil.WriteFile(targetFile, []byte("FROM scratch"), 0755)).To(BeNil())
@@ -219,8 +220,8 @@ var _ = Describe("Podman build", func() {
podmanTest.StartRemoteService()
}
podmanTest.AddImageToRWStore(ALPINE)
- dockerfile := `FROM quay.io/libpod/alpine:latest
-RUN printenv http_proxy`
+ dockerfile := fmt.Sprintf(`FROM %s
+RUN printenv http_proxy`, ALPINE)
dockerfilePath := filepath.Join(podmanTest.TempDir, "Dockerfile")
err := ioutil.WriteFile(dockerfilePath, []byte(dockerfile), 0755)
@@ -263,9 +264,9 @@ RUN printenv http_proxy`
err = ioutil.WriteFile(dummyFile, []byte("dummy"), 0644)
Expect(err).To(BeNil())
- containerfile := `FROM quay.io/libpod/alpine:latest
+ containerfile := fmt.Sprintf(`FROM %s
ADD . /test
-RUN find /test`
+RUN find /test`, ALPINE)
containerfilePath := filepath.Join(targetPath, "Containerfile")
err = ioutil.WriteFile(containerfilePath, []byte(containerfile), 0644)
@@ -307,7 +308,7 @@ RUN find /test`
err = os.Mkdir(targetSubPath, 0755)
Expect(err).To(BeNil())
- containerfile := `FROM quay.io/libpod/alpine:latest`
+ containerfile := fmt.Sprintf("FROM %s", ALPINE)
containerfilePath := filepath.Join(targetSubPath, "Containerfile")
err = ioutil.WriteFile(containerfilePath, []byte(containerfile), 0644)
@@ -344,9 +345,9 @@ RUN find /test`
targetPath, err := CreateTempDirInTempDir()
Expect(err).To(BeNil())
- containerfile := `FROM quay.io/libpod/alpine:latest
+ containerfile := fmt.Sprintf(`FROM %s
ADD . /testfilter/
-RUN find /testfilter/`
+RUN find /testfilter/`, ALPINE)
containerfilePath := filepath.Join(targetPath, "Containerfile")
err = ioutil.WriteFile(containerfilePath, []byte(containerfile), 0644)
@@ -428,10 +429,10 @@ subdir**`
Expect(os.Chdir(targetSubPath)).To(BeNil())
Expect(os.Symlink("dummy", "dummy-symlink")).To(BeNil())
- containerfile := `FROM quay.io/libpod/alpine:latest
+ containerfile := fmt.Sprintf(`FROM %s
ADD . /test
RUN find /test
-RUN [[ -L /test/dummy-symlink ]] && echo SYMLNKOK || echo SYMLNKERR`
+RUN [[ -L /test/dummy-symlink ]] && echo SYMLNKOK || echo SYMLNKERR`, ALPINE)
containerfilePath := filepath.Join(targetSubPath, "Containerfile")
err = ioutil.WriteFile(containerfilePath, []byte(containerfile), 0644)
@@ -475,14 +476,14 @@ RUN grep CapEff /proc/self/status`
// When
session := podmanTest.Podman([]string{
- "build", "--pull-never", "--cap-drop=all", "--cap-add=net_bind_service", "--add-host", "testhost:1.2.3.4", "--from", "alpine", targetPath,
+ "build", "--pull-never", "--cap-drop=all", "--cap-add=net_bind_service", "--add-host", "testhost:1.2.3.4", "--from", ALPINE, targetPath,
})
session.WaitWithDefaultTimeout()
// Then
Expect(session.ExitCode()).To(Equal(0))
Expect(strings.Fields(session.OutputToString())).
- To(ContainElement("alpine"))
+ To(ContainElement(ALPINE))
Expect(strings.Fields(session.OutputToString())).
To(ContainElement("testhost"))
Expect(strings.Fields(session.OutputToString())).
@@ -494,7 +495,7 @@ RUN grep CapEff /proc/self/status`
Expect(err).To(BeNil())
containerFile := filepath.Join(targetPath, "Containerfile")
- Expect(ioutil.WriteFile(containerFile, []byte("FROM alpine"), 0755)).To(BeNil())
+ Expect(ioutil.WriteFile(containerFile, []byte(fmt.Sprintf("FROM %s", ALPINE)), 0755)).To(BeNil())
defer func() {
Expect(os.RemoveAll(containerFile)).To(BeNil())
@@ -502,7 +503,7 @@ RUN grep CapEff /proc/self/status`
// When
session := podmanTest.Podman([]string{
- "build", "--pull-never", "--isolation", "oci", "--arch", "arm64", targetPath,
+ "build", "--isolation", "oci", "--arch", "arm64", targetPath,
})
session.WaitWithDefaultTimeout()
// Then
@@ -510,7 +511,7 @@ RUN grep CapEff /proc/self/status`
// When
session = podmanTest.Podman([]string{
- "build", "--pull-never", "--isolation", "chroot", "--arch", "arm64", targetPath,
+ "build", "--isolation", "chroot", "--arch", "arm64", targetPath,
})
session.WaitWithDefaultTimeout()
// Then
@@ -534,8 +535,8 @@ RUN grep CapEff /proc/self/status`
})
It("podman build --timestamp flag", func() {
- containerfile := `FROM quay.io/libpod/alpine:latest
-RUN echo hello`
+ containerfile := fmt.Sprintf(`FROM %s
+RUN echo hello`, ALPINE)
containerfilePath := filepath.Join(podmanTest.TempDir, "Containerfile")
err := ioutil.WriteFile(containerfilePath, []byte(containerfile), 0755)
diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go
index aa2380c51..803124de1 100644
--- a/test/e2e/containers_conf_test.go
+++ b/test/e2e/containers_conf_test.go
@@ -91,7 +91,7 @@ var _ = Describe("Podman run", func() {
if IsRemote() {
podmanTest.RestartRemoteService()
}
- session := podmanTest.Podman([]string{"run", "busybox", "grep", "CapEff", "/proc/self/status"})
+ session := podmanTest.Podman([]string{"run", BB, "grep", "CapEff", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).ToNot(Equal(cap.OutputToString()))
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go
index 2ffb5cd2e..df86eab15 100644
--- a/test/e2e/exec_test.go
+++ b/test/e2e/exec_test.go
@@ -475,10 +475,10 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec preserves container groups with --user and --group-add", func() {
- dockerfile := `FROM registry.fedoraproject.org/fedora-minimal
+ dockerfile := fmt.Sprintf(`FROM %s
RUN groupadd -g 4000 first
RUN groupadd -g 4001 second
-RUN useradd -u 1000 auser`
+RUN useradd -u 1000 auser`, fedoraMinimal)
imgName := "testimg"
podmanTest.BuildImage(dockerfile, imgName, "false")
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index 9cfda0e75..1c53307bd 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -155,6 +155,23 @@ var _ = Describe("Podman generate kube", func() {
Expect(numContainers).To(Equal(1))
})
+ It("podman generate kube multiple pods", func() {
+ pod1 := podmanTest.Podman([]string{"run", "-dt", "--pod", "new:pod1", ALPINE, "top"})
+ pod1.WaitWithDefaultTimeout()
+ Expect(pod1.ExitCode()).To(Equal(0))
+
+ pod2 := podmanTest.Podman([]string{"run", "-dt", "--pod", "new:pod2", ALPINE, "top"})
+ pod2.WaitWithDefaultTimeout()
+ Expect(pod2.ExitCode()).To(Equal(0))
+
+ kube := podmanTest.Podman([]string{"generate", "kube", "pod1", "pod2"})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+
+ Expect(string(kube.Out.Contents())).To(ContainSubstring(`name: pod1`))
+ Expect(string(kube.Out.Contents())).To(ContainSubstring(`name: pod2`))
+ })
+
It("podman generate kube on pod with host network", func() {
podSession := podmanTest.Podman([]string{"pod", "create", "--name", "testHostNetwork", "--network", "host"})
podSession.WaitWithDefaultTimeout()
@@ -537,21 +554,6 @@ var _ = Describe("Podman generate kube", func() {
Expect(inspect.OutputToString()).To(ContainSubstring(`"pid"`))
})
- It("podman generate kube multiple pods should fail", func() {
- SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
- pod1 := podmanTest.Podman([]string{"run", "-dt", "--pod", "new:pod1", ALPINE, "top"})
- pod1.WaitWithDefaultTimeout()
- Expect(pod1.ExitCode()).To(Equal(0))
-
- pod2 := podmanTest.Podman([]string{"run", "-dt", "--pod", "new:pod2", ALPINE, "top"})
- pod2.WaitWithDefaultTimeout()
- Expect(pod2.ExitCode()).To(Equal(0))
-
- kube := podmanTest.Podman([]string{"generate", "kube", "pod1", "pod2"})
- kube.WaitWithDefaultTimeout()
- Expect(kube.ExitCode()).ToNot(Equal(0))
- })
-
It("podman generate kube with pods and containers should fail", func() {
pod1 := podmanTest.Podman([]string{"run", "-dt", "--pod", "new:pod1", ALPINE, "top"})
pod1.WaitWithDefaultTimeout()
@@ -594,7 +596,7 @@ var _ = Describe("Podman generate kube", func() {
Expect(kube.ExitCode()).To(Equal(0))
})
- It("podman generate kube with containers in a pod should fail", func() {
+ It("podman generate kube with containers in pods should fail", func() {
pod1 := podmanTest.Podman([]string{"run", "-dt", "--pod", "new:pod1", "--name", "top1", ALPINE, "top"})
pod1.WaitWithDefaultTimeout()
Expect(pod1.ExitCode()).To(Equal(0))
@@ -603,7 +605,7 @@ var _ = Describe("Podman generate kube", func() {
pod2.WaitWithDefaultTimeout()
Expect(pod2.ExitCode()).To(Equal(0))
- kube := podmanTest.Podman([]string{"generate", "kube", "pod1", "pod2"})
+ kube := podmanTest.Podman([]string{"generate", "kube", "top1", "top2"})
kube.WaitWithDefaultTimeout()
Expect(kube.ExitCode()).ToNot(Equal(0))
})
diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go
index 9260d6cd2..93c8426a7 100644
--- a/test/e2e/play_kube_test.go
+++ b/test/e2e/play_kube_test.go
@@ -141,7 +141,16 @@ spec:
configMapKeyRef:
name: {{ .RefName }}
key: {{ .RefKey }}
- {{ else }}
+ optional: {{ .Optional }}
+ {{ end }}
+ {{ if (eq .ValueFrom "secret") }}
+ valueFrom:
+ secretKeyRef:
+ name: {{ .RefName }}
+ key: {{ .RefKey }}
+ optional: {{ .Optional }}
+ {{ end }}
+ {{ if (eq .ValueFrom "") }}
value: {{ .Value }}
{{ end }}
{{ end }}
@@ -151,6 +160,12 @@ spec:
{{ if (eq .From "configmap") }}
- configMapRef:
name: {{ .Name }}
+ optional: {{ .Optional }}
+ {{ end }}
+ {{ if (eq .From "secret") }}
+ - secretRef:
+ name: {{ .Name }}
+ optional: {{ .Optional }}
{{ end }}
{{ end }}
{{ end }}
@@ -340,6 +355,8 @@ var (
seccompPwdEPERM = []byte(`{"defaultAction":"SCMP_ACT_ALLOW","syscalls":[{"name":"getcwd","action":"SCMP_ACT_ERRNO"}]}`)
// CPU Period in ms
defaultCPUPeriod = 100
+ // Default secret in JSON. Note that the values ("foo" and "bar") are base64 encoded.
+ defaultSecret = []byte(`{"FOO":"Zm9v","BAR":"YmFy"}`)
)
func writeYaml(content string, fileName string) error {
@@ -357,7 +374,8 @@ func writeYaml(content string, fileName string) error {
return nil
}
-func generateKubeYaml(kind string, object interface{}, pathname string) error {
+// getKubeYaml returns a kubernetes YAML document.
+func getKubeYaml(kind string, object interface{}) (string, error) {
var yamlTemplate string
templateBytes := &bytes.Buffer{}
@@ -369,19 +387,51 @@ func generateKubeYaml(kind string, object interface{}, pathname string) error {
case "deployment":
yamlTemplate = deploymentYamlTemplate
default:
- return fmt.Errorf("unsupported kubernetes kind")
+ return "", fmt.Errorf("unsupported kubernetes kind")
}
t, err := template.New(kind).Parse(yamlTemplate)
if err != nil {
- return err
+ return "", err
}
if err := t.Execute(templateBytes, object); err != nil {
+ return "", err
+ }
+
+ return templateBytes.String(), nil
+}
+
+// generateKubeYaml writes a kubernetes YAML document.
+func generateKubeYaml(kind string, object interface{}, pathname string) error {
+ k, err := getKubeYaml(kind, object)
+ if err != nil {
return err
}
- return writeYaml(templateBytes.String(), pathname)
+ return writeYaml(k, pathname)
+}
+
+// generateMultiDocKubeYaml writes multiple kube objects in one Yaml document.
+func generateMultiDocKubeYaml(kubeObjects []string, pathname string) error {
+ var multiKube string
+
+ for _, k := range kubeObjects {
+ multiKube += "---\n"
+ multiKube += k
+ }
+
+ return writeYaml(multiKube, pathname)
+}
+
+func createSecret(podmanTest *PodmanTestIntegration, name string, value []byte) {
+ secretFilePath := filepath.Join(podmanTest.TempDir, "secret")
+ err := ioutil.WriteFile(secretFilePath, value, 0755)
+ Expect(err).To(BeNil())
+
+ secret := podmanTest.Podman([]string{"secret", "create", name, secretFilePath})
+ secret.WaitWithDefaultTimeout()
+ Expect(secret.ExitCode()).To(Equal(0))
}
// ConfigMap describes the options a kube yaml can be configured at configmap level
@@ -723,7 +773,7 @@ func withVolumeMount(mountPath string, readonly bool) ctrOption {
}
}
-func withEnv(name, value, valueFrom, refName, refKey string) ctrOption {
+func withEnv(name, value, valueFrom, refName, refKey string, optional bool) ctrOption {
return func(c *Ctr) {
e := Env{
Name: name,
@@ -731,17 +781,19 @@ func withEnv(name, value, valueFrom, refName, refKey string) ctrOption {
ValueFrom: valueFrom,
RefName: refName,
RefKey: refKey,
+ Optional: optional,
}
c.Env = append(c.Env, e)
}
}
-func withEnvFrom(name, from string) ctrOption {
+func withEnvFrom(name, from string, optional bool) ctrOption {
return func(c *Ctr) {
e := EnvFrom{
- Name: name,
- From: from,
+ Name: name,
+ From: from,
+ Optional: optional,
}
c.EnvFrom = append(c.EnvFrom, e)
@@ -799,11 +851,13 @@ type Env struct {
ValueFrom string
RefName string
RefKey string
+ Optional bool
}
type EnvFrom struct {
- Name string
- From string
+ Name string
+ From string
+ Optional bool
}
func milliCPUToQuota(milliCPU string) int {
@@ -1039,7 +1093,7 @@ var _ = Describe("Podman play kube", func() {
err := generateKubeYaml("configmap", cm, cmYamlPathname)
Expect(err).To(BeNil())
- pod := getPod(withCtr(getCtr(withEnv("FOO", "", "configmap", "foo", "FOO"))))
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "configmap", "foo", "FOO", false))))
err = generateKubeYaml("pod", pod, kubeYaml)
Expect(err).To(BeNil())
@@ -1053,6 +1107,68 @@ var _ = Describe("Podman play kube", func() {
Expect(inspect.OutputToString()).To(ContainSubstring(`FOO=foo`))
})
+ It("podman play kube test required env value from configmap with missing key", func() {
+ SkipIfRemote("configmap list is not supported as a param")
+ cmYamlPathname := filepath.Join(podmanTest.TempDir, "foo-cm.yaml")
+ cm := getConfigMap(withConfigMapName("foo"), withConfigMapData("FOO", "foo"))
+ err := generateKubeYaml("configmap", cm, cmYamlPathname)
+ Expect(err).To(BeNil())
+
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "configmap", "foo", "MISSING_KEY", false))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml, "--configmap", cmYamlPathname})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Not(Equal(0)))
+ })
+
+ It("podman play kube test required env value from missing configmap", func() {
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "configmap", "missing_cm", "FOO", false))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Not(Equal(0)))
+ })
+
+ It("podman play kube test optional env value from configmap with missing key", func() {
+ SkipIfRemote("configmap list is not supported as a param")
+ cmYamlPathname := filepath.Join(podmanTest.TempDir, "foo-cm.yaml")
+ cm := getConfigMap(withConfigMapName("foo"), withConfigMapData("FOO", "foo"))
+ err := generateKubeYaml("configmap", cm, cmYamlPathname)
+ Expect(err).To(BeNil())
+
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "configmap", "foo", "MISSING_KEY", true))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml, "--configmap", cmYamlPathname})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(pod), "--format", "'{{ range .Config.Env }}[{{ . }}]{{end}}'"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+ Expect(inspect.OutputToString()).To(ContainSubstring(`[FOO=]`))
+ })
+
+ It("podman play kube test optional env value from missing configmap", func() {
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "configmap", "missing_cm", "FOO", true))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(pod), "--format", "'{{ range .Config.Env }}[{{ . }}]{{end}}'"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+ Expect(inspect.OutputToString()).To(ContainSubstring(`[FOO=]`))
+ })
+
It("podman play kube test get all key-value pairs from configmap as envs", func() {
SkipIfRemote("configmap list is not supported as a param")
cmYamlPathname := filepath.Join(podmanTest.TempDir, "foo-cm.yaml")
@@ -1060,7 +1176,7 @@ var _ = Describe("Podman play kube", func() {
err := generateKubeYaml("configmap", cm, cmYamlPathname)
Expect(err).To(BeNil())
- pod := getPod(withCtr(getCtr(withEnvFrom("foo", "configmap"))))
+ pod := getPod(withCtr(getCtr(withEnvFrom("foo", "configmap", false))))
err = generateKubeYaml("pod", pod, kubeYaml)
Expect(err).To(BeNil())
@@ -1075,6 +1191,131 @@ var _ = Describe("Podman play kube", func() {
Expect(inspect.OutputToString()).To(ContainSubstring(`FOO2=foo2`))
})
+ It("podman play kube test get all key-value pairs from required configmap as envs", func() {
+ pod := getPod(withCtr(getCtr(withEnvFrom("missing_cm", "configmap", false))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Not(Equal(0)))
+ })
+
+ It("podman play kube test get all key-value pairs from optional configmap as envs", func() {
+ pod := getPod(withCtr(getCtr(withEnvFrom("missing_cm", "configmap", true))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+ })
+
+ It("podman play kube test env value from secret", func() {
+ createSecret(podmanTest, "foo", defaultSecret)
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "secret", "foo", "FOO", false))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(pod), "--format", "'{{ .Config.Env }}'"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+ Expect(inspect.OutputToString()).To(ContainSubstring(`FOO=foo`))
+ })
+
+ It("podman play kube test required env value from missing secret", func() {
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "secret", "foo", "FOO", false))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Not(Equal(0)))
+ })
+
+ It("podman play kube test required env value from secret with missing key", func() {
+ createSecret(podmanTest, "foo", defaultSecret)
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "secret", "foo", "MISSING", false))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Not(Equal(0)))
+ })
+
+ It("podman play kube test optional env value from missing secret", func() {
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "secret", "foo", "FOO", true))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(pod), "--format", "'{{ range .Config.Env }}[{{ . }}]{{end}}'"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+ Expect(inspect.OutputToString()).To(ContainSubstring(`[FOO=]`))
+ })
+
+ It("podman play kube test optional env value from secret with missing key", func() {
+ createSecret(podmanTest, "foo", defaultSecret)
+ pod := getPod(withCtr(getCtr(withEnv("FOO", "", "secret", "foo", "MISSING", true))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(pod), "--format", "'{{ range .Config.Env }}[{{ . }}]{{end}}'"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+ Expect(inspect.OutputToString()).To(ContainSubstring(`[FOO=]`))
+ })
+
+ It("podman play kube test get all key-value pairs from secret as envs", func() {
+ createSecret(podmanTest, "foo", defaultSecret)
+ pod := getPod(withCtr(getCtr(withEnvFrom("foo", "secret", false))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(pod), "--format", "'{{ .Config.Env }}'"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+ Expect(inspect.OutputToString()).To(ContainSubstring(`FOO=foo`))
+ Expect(inspect.OutputToString()).To(ContainSubstring(`BAR=bar`))
+ })
+
+ It("podman play kube test get all key-value pairs from required secret as envs", func() {
+ pod := getPod(withCtr(getCtr(withEnvFrom("missing_secret", "secret", false))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Not(Equal(0)))
+ })
+
+ It("podman play kube test get all key-value pairs from optional secret as envs", func() {
+ pod := getPod(withCtr(getCtr(withEnvFrom("missing_secret", "secret", true))))
+ err = generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+ })
+
It("podman play kube test hostname", func() {
pod := getPod()
err := generateKubeYaml("pod", pod, kubeYaml)
@@ -1426,6 +1667,7 @@ spec:
kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
kube.WaitWithDefaultTimeout()
Expect(kube.ExitCode()).NotTo(Equal(0))
+ Expect(kube.ErrorToString()).To(ContainSubstring(defaultVolName))
})
It("podman play kube test with empty HostPath type volume", func() {
@@ -1698,4 +1940,102 @@ MemoryReservation: {{ .HostConfig.MemoryReservation }}`})
Expect(inspect.ExitCode()).To(Equal(0))
Expect(inspect.OutputToString()).To(Equal("true"))
})
+
+ // Multi doc related tests
+ It("podman play kube multi doc yaml", func() {
+ yamlDocs := []string{}
+ podNames := []string{}
+
+ serviceTemplate := `apiVersion: v1
+kind: Service
+metadata:
+ name: %s
+spec:
+ ports:
+ - port: 80
+ protocol: TCP
+ targetPort: 9376
+ selector:
+ app: %s
+`
+ // generate servies, pods and deployments
+ for i := 0; i < 2; i++ {
+ podName := fmt.Sprintf("testPod%d", i)
+ deploymentName := fmt.Sprintf("testDeploy%d", i)
+ deploymentPodName := fmt.Sprintf("%s-pod-0", deploymentName)
+
+ podNames = append(podNames, podName)
+ podNames = append(podNames, deploymentPodName)
+
+ pod := getPod(withPodName(podName))
+ podDeployment := getPod(withPodName(deploymentName))
+ deployment := getDeployment(withPod(podDeployment))
+ deployment.Name = deploymentName
+
+ // add services
+ yamlDocs = append([]string{
+ fmt.Sprintf(serviceTemplate, podName, podName),
+ fmt.Sprintf(serviceTemplate, deploymentPodName, deploymentPodName)}, yamlDocs...)
+
+ // add pods
+ k, err := getKubeYaml("pod", pod)
+ Expect(err).To(BeNil())
+ yamlDocs = append(yamlDocs, k)
+
+ // add deployments
+ k, err = getKubeYaml("deployment", deployment)
+ Expect(err).To(BeNil())
+ yamlDocs = append(yamlDocs, k)
+ }
+
+ // generate multi doc yaml
+ err = generateMultiDocKubeYaml(yamlDocs, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Equal(0))
+
+ for _, n := range podNames {
+ inspect := podmanTest.Podman([]string{"inspect", n, "--format", "'{{ .State }}'"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+ Expect(inspect.OutputToString()).To(ContainSubstring(`Running`))
+ }
+ })
+
+ It("podman play kube invalid multi doc yaml", func() {
+ yamlDocs := []string{}
+
+ serviceTemplate := `apiVersion: v1
+kind: Service
+metadata:
+ name: %s
+spec:
+ ports:
+ - port: 80
+ protocol: TCP
+ targetPort: 9376
+ selector:
+ app: %s
+---
+invalid kube kind
+`
+ // add invalid multi doc yaml
+ yamlDocs = append(yamlDocs, fmt.Sprintf(serviceTemplate, "foo", "foo"))
+
+ // add pod
+ pod := getPod()
+ k, err := getKubeYaml("pod", pod)
+ Expect(err).To(BeNil())
+ yamlDocs = append(yamlDocs, k)
+
+ // generate multi doc yaml
+ err = generateMultiDocKubeYaml(yamlDocs, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Not(Equal(0)))
+ })
})
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go
index 73da77417..cbe38fc76 100644
--- a/test/e2e/prune_test.go
+++ b/test/e2e/prune_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "fmt"
"os"
. "github.com/containers/podman/v3/test/utils"
@@ -8,11 +9,11 @@ import (
. "github.com/onsi/gomega"
)
-var pruneImage = `
-FROM alpine:latest
+var pruneImage = fmt.Sprintf(`
+FROM %s
LABEL RUN podman --version
RUN apk update
-RUN apk add bash`
+RUN apk add bash`, ALPINE)
var _ = Describe("Podman prune", func() {
var (
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index ac0910a83..37b6516c1 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -351,7 +351,7 @@ var _ = Describe("Podman ps", func() {
})
It("podman --format by size", func() {
- session := podmanTest.Podman([]string{"create", "busybox", "ls"})
+ session := podmanTest.Podman([]string{"create", BB, "ls"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -366,7 +366,7 @@ var _ = Describe("Podman ps", func() {
})
It("podman --sort by size", func() {
- session := podmanTest.Podman([]string{"create", "busybox", "ls"})
+ session := podmanTest.Podman([]string{"create", BB, "ls"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go
index d8367d636..5e6d66d53 100644
--- a/test/e2e/rmi_test.go
+++ b/test/e2e/rmi_test.go
@@ -184,19 +184,20 @@ var _ = Describe("Podman rmi", func() {
It("podman rmi with cached images", func() {
podmanTest.AddImageToRWStore(cirros)
- dockerfile := `FROM quay.io/libpod/cirros:latest
+ dockerfile := fmt.Sprintf(`FROM %s
RUN mkdir hello
RUN touch test.txt
ENV foo=bar
- `
+ `, cirros)
podmanTest.BuildImage(dockerfile, "test", "true")
- dockerfile = `FROM quay.io/libpod/cirros:latest
+ dockerfile = fmt.Sprintf(`FROM %s
RUN mkdir hello
RUN touch test.txt
RUN mkdir blah
ENV foo=bar
- `
+ `, cirros)
+
podmanTest.BuildImage(dockerfile, "test2", "true")
session := podmanTest.Podman([]string{"images", "-q", "-a"})
@@ -249,14 +250,15 @@ var _ = Describe("Podman rmi", func() {
})
It("podman rmi -a with parent|child images", func() {
- dockerfile := `FROM quay.io/libpod/cirros:latest AS base
+ podmanTest.AddImageToRWStore(cirros)
+ dockerfile := fmt.Sprintf(`FROM %s AS base
RUN touch /1
ENV LOCAL=/1
RUN find $LOCAL
FROM base
RUN find $LOCAL
-`
+`, cirros)
podmanTest.BuildImage(dockerfile, "test", "true")
session := podmanTest.Podman([]string{"rmi", "-a"})
session.WaitWithDefaultTimeout()
@@ -284,14 +286,15 @@ RUN find $LOCAL
// a race, we may not hit the condition a 100 percent of times
// but ocal reproducers hit it all the time.
+ podmanTest.AddImageToRWStore(cirros)
var wg sync.WaitGroup
buildAndRemove := func(i int) {
defer GinkgoRecover()
defer wg.Done()
imageName := fmt.Sprintf("rmtest:%d", i)
- containerfile := `FROM quay.io/libpod/cirros:latest
-RUN ` + fmt.Sprintf("touch %s", imageName)
+ containerfile := fmt.Sprintf(`FROM %s
+RUN touch %s`, cirros, imageName)
podmanTest.BuildImage(containerfile, imageName, "false")
session := podmanTest.Podman([]string{"rmi", "-f", imageName})
diff --git a/test/e2e/run_passwd_test.go b/test/e2e/run_passwd_test.go
index 12b6c64df..0d5dd5f3b 100644
--- a/test/e2e/run_passwd_test.go
+++ b/test/e2e/run_passwd_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "fmt"
"os"
. "github.com/containers/podman/v3/test/utils"
@@ -60,9 +61,9 @@ var _ = Describe("Podman run passwd", func() {
})
It("podman can run container without /etc/passwd", func() {
- dockerfile := `FROM alpine
+ dockerfile := fmt.Sprintf(`FROM %s
RUN rm -f /etc/passwd /etc/shadow /etc/group
-USER 1000`
+USER 1000`, ALPINE)
imgName := "testimg"
podmanTest.BuildImage(dockerfile, imgName, "false")
session := podmanTest.Podman([]string{"run", "--rm", imgName, "ls", "/etc/"})
@@ -113,9 +114,9 @@ USER 1000`
})
It("podman run numeric group from image and no group file", func() {
- dockerfile := `FROM alpine
+ dockerfile := fmt.Sprintf(`FROM %s
RUN rm -f /etc/passwd /etc/shadow /etc/group
-USER 1000`
+USER 1000`, ALPINE)
imgName := "testimg"
podmanTest.BuildImage(dockerfile, imgName, "false")
session := podmanTest.Podman([]string{"run", "--rm", imgName, "ls", "/etc/"})
diff --git a/test/e2e/run_privileged_test.go b/test/e2e/run_privileged_test.go
index 33b3b85c5..0bf68e20b 100644
--- a/test/e2e/run_privileged_test.go
+++ b/test/e2e/run_privileged_test.go
@@ -59,7 +59,7 @@ var _ = Describe("Podman privileged container tests", func() {
})
It("podman privileged make sure sys is mounted rw", func() {
- session := podmanTest.Podman([]string{"run", "--privileged", "busybox", "mount"})
+ session := podmanTest.Podman([]string{"run", "--privileged", BB, "mount"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
ok, lines := session.GrepString("sysfs")
@@ -71,7 +71,7 @@ var _ = Describe("Podman privileged container tests", func() {
hostCap := SystemExec("awk", []string{"/^CapEff/ { print $2 }", "/proc/self/status"})
Expect(hostCap.ExitCode()).To(Equal(0))
- session := podmanTest.Podman([]string{"run", "--privileged", "busybox", "awk", "/^CapEff/ { print $2 }", "/proc/self/status"})
+ session := podmanTest.Podman([]string{"run", "--privileged", BB, "awk", "/^CapEff/ { print $2 }", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -83,7 +83,7 @@ var _ = Describe("Podman privileged container tests", func() {
hostCap := SystemExec("awk", []string{"/^CapEff/ { print $2 }", "/proc/self/status"})
Expect(hostCap.ExitCode()).To(Equal(0))
- session := podmanTest.Podman([]string{"run", "--cap-add", "all", "busybox", "awk", "/^CapEff/ { print $2 }", "/proc/self/status"})
+ session := podmanTest.Podman([]string{"run", "--cap-add", "all", BB, "awk", "/^CapEff/ { print $2 }", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -95,7 +95,7 @@ var _ = Describe("Podman privileged container tests", func() {
hostCap := SystemExec("awk", []string{"/^CapEff/ { print $2 }", "/proc/self/status"})
Expect(hostCap.ExitCode()).To(Equal(0))
- session := podmanTest.Podman([]string{"run", "--user=bin", "--cap-add", "all", "busybox", "awk", "/^CapEff/ { print $2 }", "/proc/self/status"})
+ session := podmanTest.Podman([]string{"run", "--user=bin", "--cap-add", "all", BB, "awk", "/^CapEff/ { print $2 }", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -103,7 +103,7 @@ var _ = Describe("Podman privileged container tests", func() {
})
It("podman cap-drop CapEff", func() {
- session := podmanTest.Podman([]string{"run", "--cap-drop", "all", "busybox", "grep", "CapEff", "/proc/self/status"})
+ session := podmanTest.Podman([]string{"run", "--cap-drop", "all", BB, "grep", "CapEff", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
capEff := strings.Split(session.OutputToString(), " ")
@@ -120,7 +120,7 @@ var _ = Describe("Podman privileged container tests", func() {
})
It("podman non-privileged should have very few devices", func() {
- session := podmanTest.Podman([]string{"run", "-t", "busybox", "ls", "-l", "/dev"})
+ session := podmanTest.Podman([]string{"run", "-t", BB, "ls", "-l", "/dev"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(len(session.OutputToStringArray())).To(Equal(17))
@@ -147,12 +147,12 @@ var _ = Describe("Podman privileged container tests", func() {
Skip("Can't determine NoNewPrivs")
}
- session := podmanTest.Podman([]string{"run", "busybox", "grep", "NoNewPrivs", "/proc/self/status"})
+ session := podmanTest.Podman([]string{"run", BB, "grep", "NoNewPrivs", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
privs := strings.Split(session.OutputToString(), ":")
- session = podmanTest.Podman([]string{"run", "--security-opt", "no-new-privileges", "busybox", "grep", "NoNewPrivs", "/proc/self/status"})
+ session = podmanTest.Podman([]string{"run", "--security-opt", "no-new-privileges", BB, "grep", "NoNewPrivs", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/e2e/run_security_labels_test.go b/test/e2e/run_security_labels_test.go
index a2e0b2aab..b714df323 100644
--- a/test/e2e/run_security_labels_test.go
+++ b/test/e2e/run_security_labels_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "fmt"
"os"
"strings"
@@ -128,9 +129,9 @@ var _ = Describe("Podman generate kube", func() {
It("podman container runlabel (podman --version)", func() {
SkipIfRemote("runlabel not supported on podman-remote")
- PodmanDockerfile := `
-FROM alpine:latest
-LABEL io.containers.capabilities=chown,kill`
+ PodmanDockerfile := fmt.Sprintf(`
+FROM %s
+LABEL io.containers.capabilities=chown,kill`, ALPINE)
image := "podman-caps:podman"
podmanTest.BuildImage(PodmanDockerfile, image, "false")
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index bb1f9590d..23930b4f7 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -489,8 +489,8 @@ var _ = Describe("Podman run", func() {
if IsRemote() {
podmanTest.RestartRemoteService()
}
- dockerfile := `FROM busybox
-USER bin`
+ dockerfile := fmt.Sprintf(`FROM %s
+USER bin`, BB)
podmanTest.BuildImage(dockerfile, "test", "false")
session := podmanTest.Podman([]string{"run", "--rm", "--user", "bin", "test", "grep", "CapBnd", "/proc/self/status"})
session.WaitWithDefaultTimeout()
@@ -898,10 +898,10 @@ USER bin`
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- dockerfile := `FROM busybox
+ dockerfile := fmt.Sprintf(`FROM %s
RUN mkdir -p /myvol/data && chown -R mail.0 /myvol
VOLUME ["/myvol/data"]
-USER mail`
+USER mail`, BB)
podmanTest.BuildImage(dockerfile, "test", "false")
session = podmanTest.Podman([]string{"run", "--rm", "test", "ls", "-al", "/myvol/data"})
@@ -1499,8 +1499,8 @@ USER mail`
It("podman run makes workdir from image", func() {
// BuildImage does not seem to work remote
- dockerfile := `FROM busybox
-WORKDIR /madethis`
+ dockerfile := fmt.Sprintf(`FROM %s
+WORKDIR /madethis`, BB)
podmanTest.BuildImage(dockerfile, "test", "false")
session := podmanTest.Podman([]string{"run", "--rm", "test", "pwd"})
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index 454dfdc83..9b77aaef8 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -308,9 +308,9 @@ var _ = Describe("Podman run with volumes", func() {
It("podman named volume copyup symlink", func() {
imgName := "testimg"
- dockerfile := `FROM alpine
+ dockerfile := fmt.Sprintf(`FROM %s
RUN touch /testfile
-RUN sh -c "cd /etc/apk && ln -s ../../testfile"`
+RUN sh -c "cd /etc/apk && ln -s ../../testfile"`, ALPINE)
podmanTest.BuildImage(dockerfile, imgName, "false")
baselineSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", imgName, "ls", "/etc/apk/"})
@@ -479,9 +479,8 @@ RUN sh -c "cd /etc/apk && ln -s ../../testfile"`
It("Podman mount over image volume with trailing /", func() {
image := "podman-volume-test:trailing"
- dockerfile := `
-FROM alpine:latest
-VOLUME /test/`
+ dockerfile := fmt.Sprintf(`FROM %s
+VOLUME /test/`, ALPINE)
podmanTest.BuildImage(dockerfile, image, "false")
ctrName := "testCtr"
@@ -643,4 +642,30 @@ VOLUME /test/`
found, _ = session.GrepString("888:888")
Expect(found).Should(BeTrue())
})
+
+ It("volume permissions after run", func() {
+ imgName := "testimg"
+ dockerfile := fmt.Sprintf(`FROM %s
+RUN useradd -m testuser -u 1005
+USER testuser`, fedoraMinimal)
+ podmanTest.BuildImage(dockerfile, imgName, "false")
+
+ testString := "testuser testuser"
+
+ test1 := podmanTest.Podman([]string{"run", "-v", "testvol1:/test", imgName, "bash", "-c", "ls -al /test | grep -v root | grep -v total"})
+ test1.WaitWithDefaultTimeout()
+ Expect(test1.ExitCode()).To(Equal(0))
+ Expect(strings.Contains(test1.OutputToString(), testString)).To(BeTrue())
+
+ volName := "testvol2"
+ vol := podmanTest.Podman([]string{"volume", "create", volName})
+ vol.WaitWithDefaultTimeout()
+ Expect(vol.ExitCode()).To(Equal(0))
+
+ test2 := podmanTest.Podman([]string{"run", "-v", fmt.Sprintf("%s:/test", volName), imgName, "bash", "-c", "ls -al /test | grep -v root | grep -v total"})
+ test2.WaitWithDefaultTimeout()
+ Expect(test2.ExitCode()).To(Equal(0))
+ Expect(strings.Contains(test2.OutputToString(), testString)).To(BeTrue())
+
+ })
})
diff --git a/test/e2e/run_working_dir_test.go b/test/e2e/run_working_dir_test.go
index 2d16cdc18..de0f55134 100644
--- a/test/e2e/run_working_dir_test.go
+++ b/test/e2e/run_working_dir_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "fmt"
"os"
. "github.com/containers/podman/v3/test/utils"
@@ -46,9 +47,9 @@ var _ = Describe("Podman run", func() {
})
It("podman run a container on an image with a workdir", func() {
- dockerfile := `FROM alpine
+ dockerfile := fmt.Sprintf(`FROM %s
RUN mkdir -p /home/foobar /etc/foobar; chown bin:bin /etc/foobar
-WORKDIR /etc/foobar`
+WORKDIR /etc/foobar`, ALPINE)
podmanTest.BuildImage(dockerfile, "test", "false")
session := podmanTest.Podman([]string{"run", "test", "pwd"})
diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go
index 2eec15c62..54fa7e2f6 100644
--- a/test/e2e/runlabel_test.go
+++ b/test/e2e/runlabel_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "fmt"
"os"
. "github.com/containers/podman/v3/test/utils"
@@ -8,18 +9,17 @@ import (
. "github.com/onsi/gomega"
)
-var PodmanDockerfile = `
-FROM alpine:latest
-LABEL RUN podman --version`
+var PodmanDockerfile = fmt.Sprintf(`
+FROM %s
+LABEL RUN podman --version`, ALPINE)
-var LsDockerfile = `
-FROM alpine:latest
-LABEL RUN ls -la`
+var LsDockerfile = fmt.Sprintf(`
+FROM %s
+LABEL RUN ls -la`, ALPINE)
-var GlobalDockerfile = `
-FROM alpine:latest
-LABEL RUN echo \$GLOBAL_OPTS
-`
+var GlobalDockerfile = fmt.Sprintf(`
+FROM %s
+LABEL RUN echo \$GLOBAL_OPTS`, ALPINE)
var _ = Describe("podman container runlabel", func() {
var (
diff --git a/test/e2e/system_df_test.go b/test/e2e/system_df_test.go
index 9daf3f8f9..9aee85ca3 100644
--- a/test/e2e/system_df_test.go
+++ b/test/e2e/system_df_test.go
@@ -44,7 +44,7 @@ var _ = Describe("podman system df", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- session = podmanTest.Podman([]string{"create", "-v", "data:/data", "--name", "container1", "busybox"})
+ session = podmanTest.Podman([]string{"create", "-v", "data:/data", "--name", "container1", BB})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/python/docker/compat/test_images.py b/test/python/docker/compat/test_images.py
index 571b31881..1e2b531b7 100644
--- a/test/python/docker/compat/test_images.py
+++ b/test/python/docker/compat/test_images.py
@@ -158,7 +158,7 @@ class TestImages(unittest.TestCase):
def test_build_image(self):
labels = {"apple": "red", "grape": "green"}
_ = self.client.images.build(
- path="test/python/docker/build_labels", labels=labels, tag="labels"
+ path="test/python/docker/build_labels", labels=labels, tag="labels", isolation="default"
)
image = self.client.images.get("labels")
self.assertEqual(image.labels["apple"], labels["apple"])
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 8f6cdb46b..e5b68a0d8 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -668,6 +668,33 @@ EOF
run_podman image prune -f
}
+@test "podman build --pull-never" {
+ local tmpdir=$PODMAN_TMPDIR/build-test
+ mkdir -p $tmpdir
+
+ # First, confirm that --pull-never is a NOP if image exists locally
+ local random_string=$(random_string 15)
+
+ cat >$tmpdir/Containerfile <<EOF
+FROM $IMAGE
+RUN echo $random_string
+EOF
+
+ run_podman build -t build_test --pull-never $tmpdir
+ is "$output" ".*$random_string" "pull-never is OK if image already exists"
+ run_podman rmi build_test
+
+ # Now try an image that does not exist locally nor remotely
+ cat >$tmpdir/Containerfile <<EOF
+FROM quay.io/libpod/nosuchimage:nosuchtag
+RUN echo $random_string
+EOF
+
+ run_podman 125 build -t build_test --pull-never $tmpdir
+ is "$output" ".* pull policy is .never. but .* could not be found locally" \
+ "--pull-never fails with expected error message"
+}
+
@test "podman build --logfile test" {
tmpdir=$PODMAN_TMPDIR/build-test
mkdir -p $tmpdir
diff --git a/test/system/120-load.bats b/test/system/120-load.bats
index d29be462d..67687a5b0 100644
--- a/test/system/120-load.bats
+++ b/test/system/120-load.bats
@@ -126,17 +126,6 @@ verify_iid_and_name() {
verify_iid_and_name $img_name
}
-@test "podman load - will not read from tty" {
- if [ ! -t 0 ]; then
- skip "STDIN is not a tty"
- fi
-
- run_podman 125 load
- is "$output" \
- "Error: cannot read from terminal. Use command-line redirection" \
- "Diagnostic from 'podman load' without redirection or -i"
-}
-
@test "podman load - redirect corrupt payload" {
run_podman 125 load <<< "Danger, Will Robinson!! This is a corrupt tarball!"
is "$output" \
diff --git a/test/system/450-interactive.bats b/test/system/450-interactive.bats
new file mode 100644
index 000000000..a9bf52ee8
--- /dev/null
+++ b/test/system/450-interactive.bats
@@ -0,0 +1,87 @@
+# -*- bats -*-
+#
+# tests of podman commands that require an interactive pty
+#
+
+load helpers
+
+###############################################################################
+# BEGIN setup/teardown
+
+# Each test runs with its own PTY, managed by socat.
+PODMAN_TEST_PTY=$(mktemp -u --tmpdir=${BATS_TMPDIR:-/tmp} podman_pty.XXXXXX)
+PODMAN_DUMMY=$(mktemp -u --tmpdir=${BATS_TMPDIR:-/tmp} podman_dummy.XXXXXX)
+PODMAN_SOCAT_PID=
+
+function setup() {
+ basic_setup
+
+ # Create a pty. Run under 'timeout' because BATS reaps child processes
+ # and if we exit before killing socat, bats will hang forever.
+ timeout 10 socat \
+ PTY,link=$PODMAN_TEST_PTY,raw,echo=0 \
+ PTY,link=$PODMAN_DUMMY,raw,echo=0 &
+ PODMAN_SOCAT_PID=$!
+
+ # Wait for pty
+ retries=5
+ while [[ ! -e $PODMAN_TEST_PTY ]]; do
+ retries=$(( retries - 1 ))
+ if [[ $retries -eq 0 ]]; then
+ die "Timed out waiting for $PODMAN_TEST_PTY"
+ fi
+ sleep 0.5
+ done
+}
+
+function teardown() {
+ if [[ -n $PODMAN_SOCAT_PID ]]; then
+ kill $PODMAN_SOCAT_PID
+ PODMAN_SOCAT_PID=
+ fi
+ rm -f $PODMAN_TEST_PTY $PODMAN_DUMMY_PTY
+
+ basic_teardown
+}
+
+# END setup/teardown
+###############################################################################
+# BEGIN tests
+
+@test "podman detects correct tty size" {
+ # Set the pty to a random size. Make rows/columns odd/even, to guarantee
+ # that they can never be the same
+ rows=$(( 15 + RANDOM % 60 | 1 ))
+ cols=$(( 15 + RANDOM % 60 & 126 ))
+ stty rows $rows cols $cols <$PODMAN_TEST_PTY
+
+ # ...and make sure stty under podman reads that.
+ # FIXME: 'sleep 1' is needed for podman-remote; without it, there's
+ run_podman run -it --name mystty $IMAGE sh -c 'sleep 1;stty size' <$PODMAN_TEST_PTY
+ is "$output" "$rows $cols" "stty under podman reads the correct dimensions"
+}
+
+
+@test "podman load - will not read from tty" {
+ run_podman 125 load <$PODMAN_TEST_PTY
+ is "$output" \
+ "Error: cannot read from terminal. Use command-line redirection" \
+ "Diagnostic from 'podman load' without redirection or -i"
+}
+
+
+@test "podman run --tty -i failure with no tty" {
+ run_podman run --tty -i --rm $IMAGE echo hello < /dev/null
+ is "$output" ".*The input device is not a TTY.*" "-it _without_ a tty"
+
+ run_podman run --tty -i --rm $IMAGE echo hello <$PODMAN_TEST_PTY
+ is "$output" "hello" "-it _with_ a pty"
+
+ run_podman run --tty=false -i --rm $IMAGE echo hello < /dev/null
+ is "$output" "hello" "-tty=false: no warning"
+
+ run_podman run --tty -i=false --rm $IMAGE echo hello < /dev/null
+ is "$output" "hello" "-i=false: no warning"
+}
+
+# vim: filetype=sh
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 38e317709..823dc3376 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -72,6 +72,9 @@ function basic_setup() {
# on cleanup.
# TODO: do this outside of setup, so it carries across tests?
PODMAN_TMPDIR=$(mktemp -d --tmpdir=${BATS_TMPDIR:-/tmp} podman_bats.XXXXXX)
+
+ # In the unlikely event that a test runs is() before a run_podman()
+ MOST_RECENT_PODMAN_COMMAND=
}
# Basic teardown: remove all pods and containers
@@ -150,6 +153,9 @@ function run_podman() {
'?') expected_rc= ; shift;; # ignore exit code
esac
+ # Remember command args, for possible use in later diagnostic messages
+ MOST_RECENT_PODMAN_COMMAND="podman $*"
+
# stdout is only emitted upon error; this echo is to help a debugger
echo "$_LOG_PROMPT $PODMAN $*"
# BATS hangs if a subprocess remains and keeps FD 3 open; this happens
@@ -384,7 +390,7 @@ function die() {
function is() {
local actual="$1"
local expect="$2"
- local testname="${3:-FIXME}"
+ local testname="${3:-${MOST_RECENT_PODMAN_COMMAND:-[no test name given]}}"
if [ -z "$expect" ]; then
if [ -z "$actual" ]; then
diff --git a/utils/ports.go b/utils/ports.go
new file mode 100644
index 000000000..0a4f67dcc
--- /dev/null
+++ b/utils/ports.go
@@ -0,0 +1,26 @@
+package utils
+
+import (
+ "net"
+ "strconv"
+
+ "github.com/pkg/errors"
+)
+
+// Find a random, open port on the host
+func GetRandomPort() (int, error) {
+ l, err := net.Listen("tcp", ":0")
+ if err != nil {
+ return 0, errors.Wrapf(err, "unable to get free TCP port")
+ }
+ defer l.Close()
+ _, randomPort, err := net.SplitHostPort(l.Addr().String())
+ if err != nil {
+ return 0, errors.Wrapf(err, "unable to determine free port")
+ }
+ rp, err := strconv.Atoi(randomPort)
+ if err != nil {
+ return 0, errors.Wrapf(err, "unable to convert random port to int")
+ }
+ return rp, nil
+}
diff --git a/vendor/github.com/containers/buildah/.cirrus.yml b/vendor/github.com/containers/buildah/.cirrus.yml
index ed2fac11c..9c875a8fd 100644
--- a/vendor/github.com/containers/buildah/.cirrus.yml
+++ b/vendor/github.com/containers/buildah/.cirrus.yml
@@ -6,7 +6,7 @@ env:
#### Global variables used for all tasks
####
# Name of the ultimate destination branch for this CI run, PR or post-merge.
- DEST_BRANCH: "release-1.19"
+ DEST_BRANCH: "master"
GOPATH: "/var/tmp/go"
GOSRC: "${GOPATH}/src/github.com/containers/buildah"
# Overrides default location (/tmp/cirrus) for repo clone
@@ -19,8 +19,6 @@ env:
CIRRUS_CLONE_DEPTH: 50
# Unless set by in_podman.sh, default to operating outside of a podman container
IN_PODMAN: 'false'
- # Not cross-compiling by default
- CROSS_TARGET: ""
####
#### Cache-image names to test with
@@ -28,16 +26,18 @@ env:
# GCE project where images live
IMAGE_PROJECT: "libpod-218412"
# See https://github.com/containers/podman/blob/master/contrib/cirrus/README.md#test_build_cache_images_task-task
- FEDORA_NAME: "fedora-32"
- PRIOR_FEDORA_NAME: "fedora-31"
- UBUNTU_NAME: "ubuntu-20"
- PRIOR_UBUNTU_NAME: "ubuntu-19"
+ FEDORA_NAME: "fedora-33"
+ PRIOR_FEDORA_NAME: "fedora-32"
+ UBUNTU_NAME: "ubuntu-2010"
+ PRIOR_UBUNTU_NAME: "ubuntu-2004"
- _BUILT_IMAGE_SUFFIX: "podman-6530021898584064"
- FEDORA_CACHE_IMAGE_NAME: "${FEDORA_NAME}-${_BUILT_IMAGE_SUFFIX}"
- PRIOR_FEDORA_CACHE_IMAGE_NAME: "${PRIOR_FEDORA_NAME}-${_BUILT_IMAGE_SUFFIX}"
- UBUNTU_CACHE_IMAGE_NAME: "${UBUNTU_NAME}-${_BUILT_IMAGE_SUFFIX}"
- PRIOR_UBUNTU_CACHE_IMAGE_NAME: "${PRIOR_UBUNTU_NAME}-${_BUILT_IMAGE_SUFFIX}"
+ IMAGE_SUFFIX: "c6102133168668672"
+ FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
+ PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
+ UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}"
+ PRIOR_UBUNTU_CACHE_IMAGE_NAME: "prior-ubuntu-${IMAGE_SUFFIX}"
+
+ IN_PODMAN_IMAGE: "quay.io/libpod/fedora_podman:${IMAGE_SUFFIX}"
####
#### Command variables to help avoid duplication
@@ -62,10 +62,12 @@ gce_instance:
# Update metadata on VM images referenced by this repository state
-'cirrus-ci/only_prs/meta_task':
+meta_task:
+ name: "VM img. keepalive"
+ alias: meta
container:
- image: "quay.io/libpod/imgts:latest" # see contrib/imgts
+ image: "quay.io/libpod/imgts:${IMAGE_SUFFIX}" # see contrib/imgts
cpu: 1
memory: 1
@@ -86,7 +88,10 @@ gce_instance:
script: '/usr/local/bin/entrypoint.sh |& ${_TIMESTAMP}'
-'cirrus-ci/only_prs/gate_task':
+smoke_task:
+ alias: 'smoke'
+ name: "Smoke Test"
+
gce_instance:
memory: "12Gb"
@@ -103,8 +108,37 @@ gce_instance:
binary_artifacts:
path: ./bin/*
+# Check that all included go modules from other sources match
+# # what is expected in `vendor/modules.txt` vs `go.mod`.
+vendor_task:
+ name: "Test Vendoring"
+ alias: vendor
+
+ env:
+ CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/buildah"
+ GOPATH: "/var/tmp/go"
+ GOSRC: "/var/tmp/go/src/github.com/containers/buildah"
+
+ # Runs within Cirrus's "community cluster"
+ container:
+ image: docker.io/library/golang:1.13
+ cpu: 1
+ memory: 1
+
+ timeout_in: 5m
+
+ vendor_script:
+ - 'make vendor'
+ - './hack/tree_status.sh'
+
+
+unit_task:
+ name: "Unit tests"
+ alias: unit
-'cirrus-ci/only_prs/unit_task':
+ depends_on:
+ - smoke
+ - vendor
timeout_in: 45m
@@ -115,9 +149,19 @@ gce_instance:
binary_artifacts:
path: ./bin/*
+ env:
+ matrix:
+ STORAGE_DRIVER: 'vfs'
+ STORAGE_DRIVER: 'overlay'
+
+conformance_task:
+ name: "Docker Build Conformance"
+ alias: conformance
+
+ depends_on:
+ - unit
-'cirrus-ci/only_prs/conformance_task':
- gce_instance: # Only need to specify differences from defaults (above)
+ gce_instance:
image_name: "${UBUNTU_CACHE_IMAGE_NAME}"
timeout_in: 20m
@@ -125,60 +169,94 @@ gce_instance:
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
conformance_test_script: '${SCRIPT_BASE}/test.sh conformance |& ${_TIMESTAMP}'
+ env:
+ matrix:
+ STORAGE_DRIVER: 'vfs'
+ STORAGE_DRIVER: 'overlay'
-# This task runs `make vendor` followed by ./hack/tree_status.sh to check
-# whether the git tree is clean. The reasoning for that is to make sure
-# that the vendor.conf, the code and the vendored packages in ./vendor are
-# in sync at all times.
-'cirrus-ci/only_prs/vendor_task':
+# Confirm cross-compile ALL archetectures on a Mac OS-X VM.
+cross_build_task:
+ name: "Cross Compile"
+ alias: cross_build
- env:
- CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/buildah"
- GOPATH: "/var/tmp/go"
- GOSRC: "/var/tmp/go/src/github.com/containers/buildah"
+ depends_on:
+ - unit
- # Runs within Cirrus's "community cluster"
- container:
- image: docker.io/library/golang:1.13
- cpu: 1
- memory: 1
+ osx_instance:
+ image: 'catalina-base'
- timeout_in: 5m
+ script:
+ - brew install go
+ - brew install go-md2man
+ - brew install gpgme
+ - make cross CGO_ENABLED=0
- vendor_script:
- - 'make vendor'
- - './hack/tree_status.sh'
+ binary_artifacts:
+ path: ./bin/*
-'cirrus-ci/only_prs/cross_task':
+static_build_task:
+ name: "Static Build"
+ alias: static_build
depends_on:
- - 'cirrus-ci/only_prs/gate'
- - 'cirrus-ci/only_prs/vendor'
+ - unit
- env:
- matrix:
- CROSS_TARGET: cross
+ gce_instance:
+ image_name: "${FEDORA_CACHE_IMAGE_NAME}"
+ cpu: 8
+ memory: 12
+ disk: 200
- setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
- build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
+ init_script: |
+ set -ex
+ setenforce 0
+ growpart /dev/sda 1 || true
+ resize2fs /dev/sda1 || true
+ yum -y install podman
- binary_artifacts:
- path: ./bin/*
+ nix_cache:
+ folder: '.cache'
+ fingerprint_script: cat nix/*
+ build_script: |
+ set -ex
+ mkdir -p .cache
+ mv .cache /nix
+ if [[ -z $(ls -A /nix) ]]; then podman run --rm --privileged -ti -v /:/mnt nixos/nix cp -rfT /nix /mnt/nix; fi
+ podman run --rm --privileged -ti -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} nixos/nix nix --print-build-logs --option cores 8 --option max-jobs 8 build --file nix/
-'cirrus-ci/required/testing_task':
+ binaries_artifacts:
+ path: "result/bin/buildah"
+
+ save_cache_script: |
+ mv /nix .cache
+ chown -Rf $(whoami) .cache
+
+
+integration_task:
+ name: "Integration $DISTRO_NV"
+ alias: integration
depends_on:
- - 'cirrus-ci/only_prs/gate'
- - 'cirrus-ci/only_prs/vendor'
+ - unit
+
+ matrix:
+ - env:
+ DISTRO_NV: "${FEDORA_NAME}"
+ IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"
+ # - env:
+ # DISTRO_NV: "${PRIOR_FEDORA_NAME}"
+ # IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
+ - env:
+ DISTRO_NV: "${UBUNTU_NAME}"
+ IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}"
+ - env:
+ DISTRO_NV: "${PRIOR_UBUNTU_NAME}"
+ IMAGE_NAME: "${PRIOR_UBUNTU_CACHE_IMAGE_NAME}"
- gce_instance: # Only need to specify differences from defaults (above)
- matrix: # Duplicate this task for each matrix product.
- image_name: "${FEDORA_CACHE_IMAGE_NAME}"
- image_name: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
- image_name: "${UBUNTU_CACHE_IMAGE_NAME}"
-# image_name: "${PRIOR_UBUNTU_CACHE_IMAGE_NAME}"
+ gce_instance:
+ image_name: "$IMAGE_NAME"
# Separate scripts for separate outputs, makes debugging easier.
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
@@ -198,19 +276,23 @@ gce_instance:
package_versions_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh packages'
golang_version_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh golang'
+ env:
+ matrix:
+ STORAGE_DRIVER: 'vfs'
+ STORAGE_DRIVER: 'overlay'
-'cirrus-ci/required/in_podman_task':
+in_podman_task:
+ name: "Containerized Integration"
+ alias: in_podman
depends_on:
- - 'cirrus-ci/only_prs/gate'
- - 'cirrus-ci/only_prs/vendor'
+ - unit
env:
- # This is key, it causes the scripts to re-execute themselves inside a container.
+ # This is key, cause the scripts to re-execute themselves inside a container.
IN_PODMAN: 'true'
BUILDAH_ISOLATION: 'chroot'
STORAGE_DRIVER: 'vfs'
- STORAGE_OPTIONS: ''
# Separate scripts for separate outputs, makes debugging easier.
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
@@ -223,60 +305,29 @@ gce_instance:
always:
<<: *standardlogs
-# TODO: Bors-ng has trouble interpreting multiple status-checks as being required
-# when their names contain wild-cards (like `testing%`). Until that issue
-# can be fixed, use a single "test" to represent pass/fail status of all
-# required checks.
-'cirrus-ci/success_task':
- depends_on:
- - "cirrus-ci/required/testing"
- - "cirrus-ci/required/in_podman"
+# Status aggregator for all tests. This task simply ensures a defined
+# set of tasks all passed, and allows confirming that based on the status
+# of this task.
+success_task:
+ name: "Total Success"
+ alias: success
- env:
- CIRRUS_WORKING_DIR: /tmp
- CIRRUS_CLONE_DEPTH: 1 # no code is being used by this task
+ depends_on:
+ - meta
+ - smoke
+ - unit
+ - conformance
+ - vendor
+ - cross_build
+ - integration
+ - in_podman
+ - static_build
container:
image: "quay.io/libpod/fedora-minimal:latest"
cpu: 1
memory: 1
+ clone_script: mkdir -p $CIRRUS_WORKING_DIR
script: /bin/true
-
-# Build the static binary
-'cirrus-ci/only_prs/static_binary_task':
- depends_on:
- - "cirrus-ci/only_prs/gate"
-
- gce_instance:
- image_name: "${FEDORA_CACHE_IMAGE_NAME}"
- cpu: 8
- memory: 12
- disk: 200
-
- init_script: |
- set -ex
- setenforce 0
- growpart /dev/sda 1 || true
- resize2fs /dev/sda1 || true
- yum -y install podman
-
- nix_cache:
- folder: '.cache'
- fingerprint_script: |
- echo "nix-v1-$(sha1sum nix/nixpkgs.json | head -c 40)"
-
- build_script: |
- set -ex
- mkdir -p .cache
- mv .cache /nix
- if [[ -z $(ls -A /nix) ]]; then podman run --rm --privileged -ti -v /:/mnt nixos/nix cp -rfT /nix /mnt/nix; fi
- podman run --rm --privileged -ti -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} nixos/nix nix --print-build-logs --option cores 8 --option max-jobs 8 build --file nix/
-
- binaries_artifacts:
- path: "result/bin/buildah"
-
- save_cache_script: |
- mv /nix .cache
- chown -Rf $(whoami) .cache
diff --git a/vendor/github.com/containers/buildah/CHANGELOG.md b/vendor/github.com/containers/buildah/CHANGELOG.md
index 13e7ad24b..25f02db19 100644
--- a/vendor/github.com/containers/buildah/CHANGELOG.md
+++ b/vendor/github.com/containers/buildah/CHANGELOG.md
@@ -2,44 +2,6 @@
# Changelog
-## v1.19.6 (2021-02-18)
- Bump c/containers/storage v1.24.6
- Don't fail copy to emptydir
- Workaround for RHEL gating test failure
- Fix config-flags-verification test on F33
- Fix bud capabilities test
- Stop overriding the location of the blob info cache
- Fix caching layers with build args
-
-## v1.19.5 (2021-02-09)
- Vendor in latest containers/image and common
-
-## v1.19.4 (2021-02-06)
- run: fix check for host pid namespace
- bump containernetworking/cni library to v0.8.1 - fix for CVE-2021-20206
- Finish plumbing for buildah bud --manifest
- buildah manifest add localimage should work
- Fix build arg check
- --iidfile: print hash prefix
-
-## v1.19.3 (2021-01-28)
- [ci:docs] Fix man page for buildah push
- Vendor in containers/image v5.10.1
- Rebuild layer if a change in ARG is detected
- Bump golang.org/x/crypto to latest rel-1.19
- local image lookup by digest
- Use build-arg ENV val from local environment if set
- Pick default OCI Runtime from containers.conf
-
-## v1.19.2 (2021-01-15)
- If overlay mount point destination does not exists, do not throw error
- Vendor in containers/common
-
-## v1.19.1 (2021-01-14)
- Cherry pick localhost fix and update CI configuration for release-1.19
- use local image name for pull policy checks
- Vendor in common 0.33.1
-
## v1.19.0 (2021-01-08)
Update vendor of containers/storage and containers/common
Buildah inspect should be able to inspect manifests
diff --git a/vendor/github.com/containers/buildah/Makefile b/vendor/github.com/containers/buildah/Makefile
index 2768a2917..fad4a2107 100644
--- a/vendor/github.com/containers/buildah/Makefile
+++ b/vendor/github.com/containers/buildah/Makefile
@@ -100,9 +100,10 @@ codespell:
.PHONY: validate
validate: install.tools
- @./tests/validate/whitespace.sh
- @./tests/validate/git-validation.sh
- @./hack/xref-helpmsgs-manpages
+ ./tests/validate/whitespace.sh
+ ./tests/validate/git-validation.sh
+ ./hack/xref-helpmsgs-manpages
+ ./tests/validate/pr-should-include-tests
.PHONY: install.tools
install.tools:
diff --git a/vendor/github.com/containers/buildah/OWNERS b/vendor/github.com/containers/buildah/OWNERS
index 5e6cbfdfa..1e070e396 100644
--- a/vendor/github.com/containers/buildah/OWNERS
+++ b/vendor/github.com/containers/buildah/OWNERS
@@ -1,19 +1,24 @@
approvers:
- TomSweeneyRedHat
+ - ashley-cui
- cevich
- giuseppe
+ - lsm5
- nalind
- rhatdan
+ - umohnani8
- vrothberg
reviewers:
- QiWang19
- TomSweeneyRedHat
+ - ashley-cui
- baude
- cevich
- edsantiago
- giuseppe
- haircommander
- jwhonce
+ - lsm5
- mheon
- mrunalp
- nalind
diff --git a/vendor/github.com/containers/buildah/add.go b/vendor/github.com/containers/buildah/add.go
index cd466ccb3..e81e35c30 100644
--- a/vendor/github.com/containers/buildah/add.go
+++ b/vendor/github.com/containers/buildah/add.go
@@ -10,12 +10,14 @@ import (
"os"
"path"
"path/filepath"
+ "strconv"
"strings"
"sync"
"syscall"
"time"
"github.com/containers/buildah/copier"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/pkg/chrootuser"
"github.com/containers/storage/pkg/fileutils"
"github.com/containers/storage/pkg/idtools"
@@ -28,6 +30,8 @@ import (
// AddAndCopyOptions holds options for add and copy commands.
type AddAndCopyOptions struct {
+ //Chmod sets the access permissions of the destination content.
+ Chmod string
// Chown is a spec for the user who should be given ownership over the
// newly-added content, potentially overriding permissions which would
// otherwise be set to 0:0.
@@ -51,7 +55,7 @@ type AddAndCopyOptions struct {
// ID mapping options to use when contents to be copied are part of
// another container, and need ownerships to be mapped from the host to
// that container's values before copying them into the container.
- IDMappingOptions *IDMappingOptions
+ IDMappingOptions *define.IDMappingOptions
// DryRun indicates that the content should be digested, but not actually
// copied into the container.
DryRun bool
@@ -72,7 +76,7 @@ func sourceIsRemote(source string) bool {
}
// getURL writes a tar archive containing the named content
-func getURL(src string, chown *idtools.IDPair, mountpoint, renameTarget string, writer io.Writer) error {
+func getURL(src string, chown *idtools.IDPair, mountpoint, renameTarget string, writer io.Writer, chmod *os.FileMode) error {
url, err := url.Parse(src)
if err != nil {
return err
@@ -129,13 +133,17 @@ func getURL(src string, chown *idtools.IDPair, mountpoint, renameTarget string,
uid = chown.UID
gid = chown.GID
}
+ var mode int64 = 0600
+ if chmod != nil {
+ mode = int64(*chmod)
+ }
hdr := tar.Header{
Typeflag: tar.TypeReg,
Name: name,
Size: size,
Uid: uid,
Gid: gid,
- Mode: 0600,
+ Mode: mode,
ModTime: date,
}
err = tw.WriteHeader(&hdr)
@@ -243,15 +251,25 @@ func (b *Builder) Add(destination string, extract bool, options AddAndCopyOption
// Find out which user (and group) the destination should belong to.
var chownDirs, chownFiles *idtools.IDPair
- var user specs.User
+ var userUID, userGID uint32
if options.Chown != "" {
- user, _, err = b.user(mountPoint, options.Chown)
+ userUID, userGID, err = b.userForCopy(mountPoint, options.Chown)
if err != nil {
return errors.Wrapf(err, "error looking up UID/GID for %q", options.Chown)
}
}
- chownDirs = &idtools.IDPair{UID: int(user.UID), GID: int(user.GID)}
- chownFiles = &idtools.IDPair{UID: int(user.UID), GID: int(user.GID)}
+ var chmodDirsFiles *os.FileMode
+ if options.Chmod != "" {
+ p, err := strconv.ParseUint(options.Chmod, 8, 32)
+ if err != nil {
+ return errors.Wrapf(err, "error parsing chmod %q", options.Chmod)
+ }
+ perm := os.FileMode(p)
+ chmodDirsFiles = &perm
+ }
+
+ chownDirs = &idtools.IDPair{UID: int(userUID), GID: int(userGID)}
+ chownFiles = &idtools.IDPair{UID: int(userUID), GID: int(userGID)}
if options.Chown == "" && options.PreserveOwnership {
chownDirs = nil
chownFiles = nil
@@ -359,7 +377,7 @@ func (b *Builder) Add(destination string, extract bool, options AddAndCopyOption
pipeReader, pipeWriter := io.Pipe()
wg.Add(1)
go func() {
- getErr = getURL(src, chownFiles, mountPoint, renameTarget, pipeWriter)
+ getErr = getURL(src, chownFiles, mountPoint, renameTarget, pipeWriter, chmodDirsFiles)
pipeWriter.Close()
wg.Done()
}()
@@ -478,9 +496,9 @@ func (b *Builder) Add(destination string, extract bool, options AddAndCopyOption
Excludes: options.Excludes,
ExpandArchives: extract,
ChownDirs: chownDirs,
- ChmodDirs: nil,
+ ChmodDirs: chmodDirsFiles,
ChownFiles: chownFiles,
- ChmodFiles: nil,
+ ChmodFiles: chmodDirsFiles,
StripSetuidBit: options.StripSetuidBit,
StripSetgidBit: options.StripSetgidBit,
StripStickyBit: options.StripStickyBit,
@@ -552,8 +570,9 @@ func (b *Builder) Add(destination string, extract bool, options AddAndCopyOption
return nil
}
-// user returns the user (and group) information which the destination should belong to.
-func (b *Builder) user(mountPoint string, userspec string) (specs.User, string, error) {
+// userForRun returns the user (and group) information which we should use for
+// running commands
+func (b *Builder) userForRun(mountPoint string, userspec string) (specs.User, string, error) {
if userspec == "" {
userspec = b.User()
}
@@ -577,3 +596,18 @@ func (b *Builder) user(mountPoint string, userspec string) (specs.User, string,
}
return u, homeDir, err
}
+
+// userForCopy returns the user (and group) information which we should use for
+// setting ownership of contents being copied. It's just like what
+// userForRun() does, except for the case where we're passed a single numeric
+// value, where we need to use that value for both the UID and the GID.
+func (b *Builder) userForCopy(mountPoint string, userspec string) (uint32, uint32, error) {
+ if id, err := strconv.ParseUint(userspec, 10, 32); err == nil {
+ return uint32(id), uint32(id), nil
+ }
+ user, _, err := b.userForRun(mountPoint, userspec)
+ if err != nil {
+ return 0xffffffff, 0xffffffff, err
+ }
+ return user.UID, user.GID, nil
+}
diff --git a/vendor/github.com/containers/buildah/buildah.go b/vendor/github.com/containers/buildah/buildah.go
index 427950c5c..b0ddd0f72 100644
--- a/vendor/github.com/containers/buildah/buildah.go
+++ b/vendor/github.com/containers/buildah/buildah.go
@@ -25,10 +25,10 @@ import (
const (
// Package is the name of this package, used in help output and to
// identify working containers.
- Package = "buildah"
+ Package = define.Package
// Version for the Package. Bump version in contrib/rpm/buildah.spec
// too.
- Version = "1.19.8"
+ Version = define.Version
// The value we use to identify what type of information, currently a
// serialized Builder structure, we are using as per-container state.
// This should only be changed when we make incompatible changes to
@@ -66,35 +66,22 @@ const (
// NetworkConfigurationPolicy takes the value NetworkDefault, NetworkDisabled,
// or NetworkEnabled.
-type NetworkConfigurationPolicy int
+type NetworkConfigurationPolicy = define.NetworkConfigurationPolicy
const (
// NetworkDefault is one of the values that BuilderOptions.ConfigureNetwork
// can take, signalling that the default behavior should be used.
- NetworkDefault NetworkConfigurationPolicy = iota
+ NetworkDefault = define.NetworkDefault
// NetworkDisabled is one of the values that BuilderOptions.ConfigureNetwork
// can take, signalling that network interfaces should NOT be configured for
// newly-created network namespaces.
- NetworkDisabled
+ NetworkDisabled = define.NetworkDisabled
// NetworkEnabled is one of the values that BuilderOptions.ConfigureNetwork
// can take, signalling that network interfaces should be configured for
// newly-created network namespaces.
- NetworkEnabled
+ NetworkEnabled = define.NetworkEnabled
)
-// String formats a NetworkConfigurationPolicy as a string.
-func (p NetworkConfigurationPolicy) String() string {
- switch p {
- case NetworkDefault:
- return "NetworkDefault"
- case NetworkDisabled:
- return "NetworkDisabled"
- case NetworkEnabled:
- return "NetworkEnabled"
- }
- return fmt.Sprintf("unknown NetworkConfigurationPolicy %d", p)
-}
-
// Builder objects are used to represent containers which are being used to
// build images. They also carry potential updates which will be applied to
// the image's configuration when the container's contents are used to build an
@@ -149,15 +136,15 @@ type Builder struct {
DefaultMountsFilePath string `json:"defaultMountsFilePath,omitempty"`
// Isolation controls how we handle "RUN" statements and the Run() method.
- Isolation Isolation
+ Isolation define.Isolation
// NamespaceOptions controls how we set up the namespaces for processes that we run in the container.
- NamespaceOptions NamespaceOptions
+ NamespaceOptions define.NamespaceOptions
// ConfigureNetwork controls whether or not network interfaces and
// routing are configured for a new network namespace (i.e., when not
// joining another's namespace and not just using the host's
// namespace), effectively deciding whether or not the process has a
// usable network.
- ConfigureNetwork NetworkConfigurationPolicy
+ ConfigureNetwork define.NetworkConfigurationPolicy
// CNIPluginPath is the location of CNI plugin helpers, if they should be
// run from a location other than the default location.
CNIPluginPath string
@@ -165,7 +152,7 @@ type Builder struct {
// the default configuration directory shouldn't be used.
CNIConfigDir string
// ID mapping options to use when running processes in the container with non-host user namespaces.
- IDMappingOptions IDMappingOptions
+ IDMappingOptions define.IDMappingOptions
// Capabilities is a list of capabilities to use when running commands in the container.
Capabilities []string
// PrependedEmptyLayers are history entries that we'll add to a
@@ -177,7 +164,7 @@ type Builder struct {
// committed image after the history item for the layer that we're
// committing.
AppendedEmptyLayers []v1.History
- CommonBuildOpts *CommonBuildOptions
+ CommonBuildOpts *define.CommonBuildOptions
// TopLayer is the top layer of the image
TopLayer string
// Format for the build Image
@@ -187,7 +174,7 @@ type Builder struct {
// ContentDigester counts the digest of all Add()ed content
ContentDigester CompositeDigester
// Devices are the additional devices to add to the containers
- Devices ContainerDevices
+ Devices define.ContainerDevices
}
// BuilderInfo are used as objects to display container information
@@ -209,14 +196,14 @@ type BuilderInfo struct {
Docker docker.V2Image
DefaultMountsFilePath string
Isolation string
- NamespaceOptions NamespaceOptions
+ NamespaceOptions define.NamespaceOptions
Capabilities []string
ConfigureNetwork string
CNIPluginPath string
CNIConfigDir string
- IDMappingOptions IDMappingOptions
+ IDMappingOptions define.IDMappingOptions
History []v1.History
- Devices ContainerDevices
+ Devices define.ContainerDevices
}
// GetBuildInfo gets a pointer to a Builder object and returns a BuilderInfo object from it.
@@ -256,66 +243,7 @@ func GetBuildInfo(b *Builder) BuilderInfo {
}
// CommonBuildOptions are resources that can be defined by flags for both buildah from and build-using-dockerfile
-type CommonBuildOptions struct {
- // AddHost is the list of hostnames to add to the build container's /etc/hosts.
- AddHost []string
- // CgroupParent is the path to cgroups under which the cgroup for the container will be created.
- CgroupParent string
- // CPUPeriod limits the CPU CFS (Completely Fair Scheduler) period
- CPUPeriod uint64
- // CPUQuota limits the CPU CFS (Completely Fair Scheduler) quota
- CPUQuota int64
- // CPUShares (relative weight
- CPUShares uint64
- // CPUSetCPUs in which to allow execution (0-3, 0,1)
- CPUSetCPUs string
- // CPUSetMems memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
- CPUSetMems string
- // HTTPProxy determines whether *_proxy env vars from the build host are passed into the container.
- HTTPProxy bool
- // Memory is the upper limit (in bytes) on how much memory running containers can use.
- Memory int64
- // DNSSearch is the list of DNS search domains to add to the build container's /etc/resolv.conf
- DNSSearch []string
- // DNSServers is the list of DNS servers to add to the build container's /etc/resolv.conf
- DNSServers []string
- // DNSOptions is the list of DNS
- DNSOptions []string
- // MemorySwap limits the amount of memory and swap together.
- MemorySwap int64
- // LabelOpts is the a slice of fields of an SELinux context, given in "field:pair" format, or "disable".
- // Recognized field names are "role", "type", and "level".
- LabelOpts []string
- // OmitTimestamp forces epoch 0 as created timestamp to allow for
- // deterministic, content-addressable builds.
- OmitTimestamp bool
- // SeccompProfilePath is the pathname of a seccomp profile.
- SeccompProfilePath string
- // ApparmorProfile is the name of an apparmor profile.
- ApparmorProfile string
- // ShmSize is the "size" value to use when mounting an shmfs on the container's /dev/shm directory.
- ShmSize string
- // Ulimit specifies resource limit options, in the form type:softlimit[:hardlimit].
- // These types are recognized:
- // "core": maximum core dump size (ulimit -c)
- // "cpu": maximum CPU time (ulimit -t)
- // "data": maximum size of a process's data segment (ulimit -d)
- // "fsize": maximum size of new files (ulimit -f)
- // "locks": maximum number of file locks (ulimit -x)
- // "memlock": maximum amount of locked memory (ulimit -l)
- // "msgqueue": maximum amount of data in message queues (ulimit -q)
- // "nice": niceness adjustment (nice -n, ulimit -e)
- // "nofile": maximum number of open files (ulimit -n)
- // "nproc": maximum number of processes (ulimit -u)
- // "rss": maximum size of a process's (ulimit -m)
- // "rtprio": maximum real-time scheduling priority (ulimit -r)
- // "rttime": maximum amount of real-time execution between blocking syscalls
- // "sigpending": maximum number of pending signals (ulimit -i)
- // "stack": maximum stack size (ulimit -s)
- Ulimit []string
- // Volumes to bind mount into the container
- Volumes []string
-}
+type CommonBuildOptions = define.CommonBuildOptions
// BuilderOptions are used to initialize a new Builder.
type BuilderOptions struct {
@@ -331,7 +259,7 @@ type BuilderOptions struct {
// PullPolicy decides whether or not we should pull the image that
// we're using as a base image. It should be PullIfMissing,
// PullAlways, or PullNever.
- PullPolicy PullPolicy
+ PullPolicy define.PullPolicy
// Registry is a value which is prepended to the image's name, if it
// needs to be pulled and the image name alone can not be resolved to a
// reference to a source image. No separator is implicitly added.
@@ -360,16 +288,16 @@ type BuilderOptions struct {
DefaultMountsFilePath string
// Isolation controls how we handle "RUN" statements and the Run()
// method.
- Isolation Isolation
+ Isolation define.Isolation
// NamespaceOptions controls how we set up namespaces for processes that
// we might need to run using the container's root filesystem.
- NamespaceOptions NamespaceOptions
+ NamespaceOptions define.NamespaceOptions
// ConfigureNetwork controls whether or not network interfaces and
// routing are configured for a new network namespace (i.e., when not
// joining another's namespace and not just using the host's
// namespace), effectively deciding whether or not the process has a
// usable network.
- ConfigureNetwork NetworkConfigurationPolicy
+ ConfigureNetwork define.NetworkConfigurationPolicy
// CNIPluginPath is the location of CNI plugin helpers, if they should be
// run from a location other than the default location.
CNIPluginPath string
@@ -377,15 +305,15 @@ type BuilderOptions struct {
// the default configuration directory shouldn't be used.
CNIConfigDir string
// ID mapping options to use if we're setting up our own user namespace.
- IDMappingOptions *IDMappingOptions
+ IDMappingOptions *define.IDMappingOptions
// Capabilities is a list of capabilities to use when
// running commands in the container.
Capabilities []string
- CommonBuildOpts *CommonBuildOptions
+ CommonBuildOpts *define.CommonBuildOptions
// Format for the container image
Format string
// Devices are the additional devices to add to the containers
- Devices ContainerDevices
+ Devices define.ContainerDevices
//DefaultEnv for containers
DefaultEnv []string
// MaxPullRetries is the maximum number of attempts we'll make to pull
@@ -460,7 +388,7 @@ func OpenBuilder(store storage.Store, container string) (*Builder, error) {
return nil, errors.Wrapf(err, "error parsing %q, read from %q", string(buildstate), filepath.Join(cdir, stateFile))
}
if b.Type != containerType {
- return nil, errors.Errorf("container %q is not a %s container (is a %q container)", container, Package, b.Type)
+ return nil, errors.Errorf("container %q is not a %s container (is a %q container)", container, define.Package, b.Type)
}
b.store = store
b.fixupConfig()
@@ -504,7 +432,7 @@ func OpenBuilderByPath(store storage.Store, path string) (*Builder, error) {
if err != nil {
logrus.Debugf("error parsing %q, read from %q: %v", string(buildstate), filepath.Join(cdir, stateFile), err)
} else if b.Type != containerType {
- logrus.Debugf("container %q is not a %s container (is a %q container)", container.ID, Package, b.Type)
+ logrus.Debugf("container %q is not a %s container (is a %q container)", container.ID, define.Package, b.Type)
}
}
return nil, storage.ErrContainerUnknown
@@ -541,7 +469,7 @@ func OpenAllBuilders(store storage.Store) (builders []*Builder, err error) {
if err != nil {
logrus.Debugf("error parsing %q, read from %q: %v", string(buildstate), filepath.Join(cdir, stateFile), err)
} else if b.Type != containerType {
- logrus.Debugf("container %q is not a %s container (is a %q container)", container.ID, Package, b.Type)
+ logrus.Debugf("container %q is not a %s container (is a %q container)", container.ID, define.Package, b.Type)
}
}
return builders, nil
diff --git a/vendor/github.com/containers/buildah/changelog.txt b/vendor/github.com/containers/buildah/changelog.txt
index 25da04663..74929da78 100644
--- a/vendor/github.com/containers/buildah/changelog.txt
+++ b/vendor/github.com/containers/buildah/changelog.txt
@@ -1,41 +1,109 @@
-
-- Changelog for v1.19.6 (2021-02-18)
- * Bump c/containers/storage v1.24.6
+- Changelog for v1.20.0 (2021-03-25)
+ * vendor in containers/storage v1.28.1
+ * build(deps): bump github.com/containers/common from 0.35.2 to 0.35.3
+ * tests: prefetch: use buildah, not podman, for pulls
+ * Use faster way to check image tag existence during multi-arch build
+ * Add information about multi-arch images to the Readme
+ * COPY --chown: expand the conformance test
+ * pkg/chrootuser: use a bufio.Scanner
+ * [CI:DOCS] Fix rootful typo in docs
+ * build(deps): bump github.com/onsi/ginkgo from 1.15.1 to 1.15.2
+ * Add documentation and testing for .containerignore
+ * build(deps): bump github.com/sirupsen/logrus from 1.8.0 to 1.8.1
+ * build(deps): bump github.com/hashicorp/go-multierror from 1.1.0 to 1.1.1
+ * Lookup Containerfile if user specifies a directory
+ * Add Tag format placeholder to docs
+ * copier: ignore sockets
+ * image: propagate errors from extractRootfs
+ * Remove system test of 'buildah containers -a'
+ * Clarify userns options are usable only as root in man pages
+ * Fix system test of 'containers -a'
+ * Remove duplicated code in addcopy
+ * build(deps): bump github.com/onsi/ginkgo from 1.15.0 to 1.15.1
+ * build(deps): bump github.com/onsi/gomega from 1.10.5 to 1.11.0
+ * build(deps): bump github.com/fsouza/go-dockerclient from 1.7.1 to 1.7.2
+ * Update multi-arch buildah build setup with new logic
+ * Update nix pin with `make nixpkgs`
+ * overlay.bats: fix the "overlay source permissions" test
+ * imagebuildah: use overlay for volumes when using overlay
+ * Make PolicyMap and PullPolicy names align
+ * copier: add GetOptions.IgnoreUnreadable
+ * Check local image to match system context
+ * fix: Containerfiles - smaller set of userns u/gids
+ * Set upperdir permissions based on source
+ * Shrink the vendoring size of pkc/cli
+ * Clarify image name match failure message
+ * ADD/COPY: create the destination directory first, chroot to it
+ * copier.GetOptions: add NoDerefSymLinks
+ * copier: add an Eval function
+ * Update system test for 'from --cap-add/drop'
+ * copier: fix a renaming bug
+ * copier: return child process stderr if we can't JSON decode the response
+ * Add some system tests
+ * build(deps): bump github.com/containers/storage from 1.26.0 to 1.27.0
+ * complement add/copy --chmod documentation
+ * buildah login and logout, do not need to enter user namespace
+ * Add multi-arch image build
+ * chmod/chown added/fixed in bash completions
+ * OWNERS: add @lsm5
+ * buildah add/copy --chmod dockerfile implementation
+ * bump github.com/openshift/imagebuilder from 1.1.8 to 1.2.0
+ * buildah add/copy --chmod cli implementation for files and urls
+ * Make sure we set the buildah version label
+ * Isolation strings, should match user input
+ * [CI:DOCS] buildah-from.md: remove dup arch,os
+ * build(deps): bump github.com/containers/image/v5 from 5.10.2 to 5.10.3
+ * Cirrus: Temp. disable prior-fedora (F32) testing
+ * pr-should-include-tests: recognized "renamed" tests
+ * build(deps): bump github.com/sirupsen/logrus from 1.7.0 to 1.8.0
+ * build(deps): bump github.com/fsouza/go-dockerclient from 1.7.0 to 1.7.1
+ * build(deps): bump github.com/containers/common from 0.34.2 to 0.35.0
+ * Fix reaping of stages with no instructions
+ * add stale bot
+ * Add base image name to comment
+ * build(deps): bump github.com/spf13/cobra from 1.1.1 to 1.1.3
* Don't fail copy to emptydir
- * Workaround for RHEL gating test failure
- * Fix config-flags-verification test on F33
- * Fix bud capabilities test
- * Stop overriding the location of the blob info cache
+ * buildah: use volatile containers
+ * vendor: update containers/storage
+ * Eliminate the use of containers/building import in pkg subdirs
+ * Add more support for removing config
+ * Improve messages about --cache-from not being supported
+ * Revert patch to allow COPY/ADD of empty dirs.
+ * Don't fail copy to emptydir
+ * Fix tutorial for rootless mode
* Fix caching layers with build args
-
-- Changelog for v1.19.5 (2021-02-09)
- * Vendor in latest containers/image and common
-
-- Changelog for v1.19.4 (2021-02-06)
+ * Vendor in containers/image v5.10.2
+ * build(deps): bump github.com/containers/common from 0.34.0 to 0.34.2
+ * build(deps): bump github.com/onsi/ginkgo from 1.14.2 to 1.15.0
+ * 'make validate': require PRs to include tests
+ * build(deps): bump github.com/onsi/gomega from 1.10.4 to 1.10.5
+ * build(deps): bump github.com/containers/storage from 1.24.5 to 1.25.0
+ * Use chown function for U volume flag from containers/common repository
+ * --iidfile: print hash prefix
+ * bump containernetworking/cni to v0.8.1 - fix for CVE-2021-20206
* run: fix check for host pid namespace
- * bump containernetworking/cni library to v0.8.1 - fix for CVE-2021-20206
* Finish plumbing for buildah bud --manifest
* buildah manifest add localimage should work
+ * Stop testing directory permissions with latest docker
* Fix build arg check
- * --iidfile: print hash prefix
-
-- Changelog for v1.19.3 (2021-01-28)
+ * build(deps): bump github.com/containers/ocicrypt from 1.0.3 to 1.1.0
* [ci:docs] Fix man page for buildah push
- * Vendor in containers/image v5.10.1
+ * Update nix pin with `make nixpkgs`
+ * Bump to containers/image v5.10.1
* Rebuild layer if a change in ARG is detected
- * Bump golang.org/x/crypto to latest rel-1.19
+ * Bump golang.org/x/crypto to the latest
+ * Add Ashley and Urvashi to Approvers
* local image lookup by digest
* Use build-arg ENV val from local environment if set
* Pick default OCI Runtime from containers.conf
-
-- Changelog for v1.19.2 (2021-01-15)
- * If overlay mount point destination does not exists, do not throw error
- * Vendor in containers/common
-
-- Changelog for v1.19.1 (2021-01-14)
- * Cherry pick localhost fix and update CI configuration for release-1.19
- * use local image name for pull policy checks
- * Vendor in common 0.33.1
+ * Added required devel packages
+ * Cirrus: Native OSX Build
+ * Cirrus: Two minor cleanup items
+ * Workaround for RHEL gating test failure
+ * build(deps): bump github.com/stretchr/testify from 1.6.1 to 1.7.0
+ * build(deps): bump github.com/mattn/go-shellwords from 1.0.10 to 1.0.11
+ * Reset upstream branch to dev version
+ * If destination does not exists, do not throw error
- Changelog for v1.19.0 (2021-01-08)
* Update vendor of containers/storage and containers/common
diff --git a/vendor/github.com/containers/buildah/common.go b/vendor/github.com/containers/buildah/common.go
index 5219c6b78..ea28be184 100644
--- a/vendor/github.com/containers/buildah/common.go
+++ b/vendor/github.com/containers/buildah/common.go
@@ -7,6 +7,7 @@ import (
"path/filepath"
"time"
+ "github.com/containers/buildah/define"
"github.com/containers/common/pkg/retry"
cp "github.com/containers/image/v5/copy"
"github.com/containers/image/v5/docker"
@@ -19,9 +20,9 @@ import (
const (
// OCI used to define the "oci" image format
- OCI = "oci"
+ OCI = define.OCI
// DOCKER used to define the "docker" image format
- DOCKER = "docker"
+ DOCKER = define.DOCKER
)
func getCopyOptions(store storage.Store, reportWriter io.Writer, sourceSystemContext *types.SystemContext, destinationSystemContext *types.SystemContext, manifestType string, removeSignatures bool, addSigner string, ociEncryptLayers *[]int, ociEncryptConfig *encconfig.EncryptConfig, ociDecryptConfig *encconfig.DecryptConfig) *cp.Options {
diff --git a/vendor/github.com/containers/buildah/config.go b/vendor/github.com/containers/buildah/config.go
index 9bed6542f..99cd40208 100644
--- a/vendor/github.com/containers/buildah/config.go
+++ b/vendor/github.com/containers/buildah/config.go
@@ -7,6 +7,7 @@ import (
"strings"
"time"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/docker"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/transports"
@@ -108,7 +109,7 @@ func (b *Builder) fixupConfig() {
if b.Architecture() == "" {
b.SetArchitecture(runtime.GOARCH)
}
- if b.Format == Dockerv2ImageManifest && b.Hostname() == "" {
+ if b.Format == define.Dockerv2ImageManifest && b.Hostname() == "" {
b.SetHostname(stringid.TruncateID(stringid.GenerateRandomID()))
}
}
@@ -219,7 +220,7 @@ func (b *Builder) ClearOnBuild() {
// Note: this setting is not present in the OCIv1 image format, so it is
// discarded when writing images using OCIv1 formats.
func (b *Builder) SetOnBuild(onBuild string) {
- if onBuild != "" && b.Format != Dockerv2ImageManifest {
+ if onBuild != "" && b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("ONBUILD is not supported for OCI image format, %s will be ignored. Must use `docker` format", onBuild)
}
b.Docker.Config.OnBuild = append(b.Docker.Config.OnBuild, onBuild)
@@ -251,7 +252,7 @@ func (b *Builder) Shell() []string {
// Note: this setting is not present in the OCIv1 image format, so it is
// discarded when writing images using OCIv1 formats.
func (b *Builder) SetShell(shell []string) {
- if len(shell) > 0 && b.Format != Dockerv2ImageManifest {
+ if len(shell) > 0 && b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("SHELL is not supported for OCI image format, %s will be ignored. Must use `docker` format", shell)
}
@@ -488,7 +489,7 @@ func (b *Builder) Domainname() string {
// Note: this setting is not present in the OCIv1 image format, so it is
// discarded when writing images using OCIv1 formats.
func (b *Builder) SetDomainname(name string) {
- if name != "" && b.Format != Dockerv2ImageManifest {
+ if name != "" && b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("DOMAINNAME is not supported for OCI image format, domainname %s will be ignored. Must use `docker` format", name)
}
b.Docker.Config.Domainname = name
@@ -510,7 +511,7 @@ func (b *Builder) Comment() string {
// Note: this setting is not present in the OCIv1 image format, so it is
// discarded when writing images using OCIv1 formats.
func (b *Builder) SetComment(comment string) {
- if comment != "" && b.Format != Dockerv2ImageManifest {
+ if comment != "" && b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("COMMENT is not supported for OCI image format, comment %s will be ignored. Must use `docker` format", comment)
}
b.Docker.Comment = comment
@@ -565,7 +566,7 @@ func (b *Builder) Healthcheck() *docker.HealthConfig {
func (b *Builder) SetHealthcheck(config *docker.HealthConfig) {
b.Docker.Config.Healthcheck = nil
if config != nil {
- if b.Format != Dockerv2ImageManifest {
+ if b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("Healthcheck is not supported for OCI image format and will be ignored. Must use `docker` format")
}
b.Docker.Config.Healthcheck = &docker.HealthConfig{
diff --git a/vendor/github.com/containers/buildah/copier/copier.go b/vendor/github.com/containers/buildah/copier/copier.go
index 52d8133c7..a37d4635e 100644
--- a/vendor/github.com/containers/buildah/copier/copier.go
+++ b/vendor/github.com/containers/buildah/copier/copier.go
@@ -1128,6 +1128,10 @@ func copierHandlerGet(bulkWriter io.Writer, req request, pm *fileutils.PatternMa
}
return errors.Wrapf(err, "copier: get: error reading %q", path)
}
+ if info.Mode()&os.ModeType == os.ModeSocket {
+ logrus.Warningf("buildah/copier: skipping socket %q", info.Name())
+ return nil
+ }
// compute the path of this item
// relative to the top-level directory,
// for the tar header
diff --git a/vendor/github.com/containers/buildah/define/build.go b/vendor/github.com/containers/buildah/define/build.go
new file mode 100644
index 000000000..635626a64
--- /dev/null
+++ b/vendor/github.com/containers/buildah/define/build.go
@@ -0,0 +1,223 @@
+package define
+
+import (
+ "io"
+ "time"
+
+ "github.com/containers/image/v5/types"
+ encconfig "github.com/containers/ocicrypt/config"
+ "github.com/containers/storage/pkg/archive"
+)
+
+// CommonBuildOptions are resources that can be defined by flags for both buildah from and build-using-dockerfile
+type CommonBuildOptions struct {
+ // AddHost is the list of hostnames to add to the build container's /etc/hosts.
+ AddHost []string
+ // CgroupParent is the path to cgroups under which the cgroup for the container will be created.
+ CgroupParent string
+ // CPUPeriod limits the CPU CFS (Completely Fair Scheduler) period
+ CPUPeriod uint64
+ // CPUQuota limits the CPU CFS (Completely Fair Scheduler) quota
+ CPUQuota int64
+ // CPUShares (relative weight
+ CPUShares uint64
+ // CPUSetCPUs in which to allow execution (0-3, 0,1)
+ CPUSetCPUs string
+ // CPUSetMems memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
+ CPUSetMems string
+ // HTTPProxy determines whether *_proxy env vars from the build host are passed into the container.
+ HTTPProxy bool
+ // Memory is the upper limit (in bytes) on how much memory running containers can use.
+ Memory int64
+ // DNSSearch is the list of DNS search domains to add to the build container's /etc/resolv.conf
+ DNSSearch []string
+ // DNSServers is the list of DNS servers to add to the build container's /etc/resolv.conf
+ DNSServers []string
+ // DNSOptions is the list of DNS
+ DNSOptions []string
+ // MemorySwap limits the amount of memory and swap together.
+ MemorySwap int64
+ // LabelOpts is the a slice of fields of an SELinux context, given in "field:pair" format, or "disable".
+ // Recognized field names are "role", "type", and "level".
+ LabelOpts []string
+ // OmitTimestamp forces epoch 0 as created timestamp to allow for
+ // deterministic, content-addressable builds.
+ OmitTimestamp bool
+ // SeccompProfilePath is the pathname of a seccomp profile.
+ SeccompProfilePath string
+ // ApparmorProfile is the name of an apparmor profile.
+ ApparmorProfile string
+ // ShmSize is the "size" value to use when mounting an shmfs on the container's /dev/shm directory.
+ ShmSize string
+ // Ulimit specifies resource limit options, in the form type:softlimit[:hardlimit].
+ // These types are recognized:
+ // "core": maximum core dump size (ulimit -c)
+ // "cpu": maximum CPU time (ulimit -t)
+ // "data": maximum size of a process's data segment (ulimit -d)
+ // "fsize": maximum size of new files (ulimit -f)
+ // "locks": maximum number of file locks (ulimit -x)
+ // "memlock": maximum amount of locked memory (ulimit -l)
+ // "msgqueue": maximum amount of data in message queues (ulimit -q)
+ // "nice": niceness adjustment (nice -n, ulimit -e)
+ // "nofile": maximum number of open files (ulimit -n)
+ // "nproc": maximum number of processes (ulimit -u)
+ // "rss": maximum size of a process's (ulimit -m)
+ // "rtprio": maximum real-time scheduling priority (ulimit -r)
+ // "rttime": maximum amount of real-time execution between blocking syscalls
+ // "sigpending": maximum number of pending signals (ulimit -i)
+ // "stack": maximum stack size (ulimit -s)
+ Ulimit []string
+ // Volumes to bind mount into the container
+ Volumes []string
+}
+
+// BuildOptions can be used to alter how an image is built.
+type BuildOptions struct {
+ // ContextDirectory is the default source location for COPY and ADD
+ // commands.
+ ContextDirectory string
+ // PullPolicy controls whether or not we pull images. It should be one
+ // of PullIfMissing, PullAlways, PullIfNewer, or PullNever.
+ PullPolicy PullPolicy
+ // Registry is a value which is prepended to the image's name, if it
+ // needs to be pulled and the image name alone can not be resolved to a
+ // reference to a source image. No separator is implicitly added.
+ Registry string
+ // IgnoreUnrecognizedInstructions tells us to just log instructions we
+ // don't recognize, and try to keep going.
+ IgnoreUnrecognizedInstructions bool
+ // Manifest Name to which the image will be added.
+ Manifest string
+ // Quiet tells us whether or not to announce steps as we go through them.
+ Quiet bool
+ // Isolation controls how Run() runs things.
+ Isolation Isolation
+ // Runtime is the name of the command to run for RUN instructions when
+ // Isolation is either IsolationDefault or IsolationOCI. It should
+ // accept the same arguments and flags that runc does.
+ Runtime string
+ // RuntimeArgs adds global arguments for the runtime.
+ RuntimeArgs []string
+ // TransientMounts is a list of mounts that won't be kept in the image.
+ TransientMounts []string
+ // Compression specifies the type of compression which is applied to
+ // layer blobs. The default is to not use compression, but
+ // archive.Gzip is recommended.
+ Compression archive.Compression
+ // Arguments which can be interpolated into Dockerfiles
+ Args map[string]string
+ // Name of the image to write to.
+ Output string
+ // Additional tags to add to the image that we write, if we know of a
+ // way to add them.
+ AdditionalTags []string
+ // Log is a callback that will print a progress message. If no value
+ // is supplied, the message will be sent to Err (or os.Stderr, if Err
+ // is nil) by default.
+ Log func(format string, args ...interface{})
+ // In is connected to stdin for RUN instructions.
+ In io.Reader
+ // Out is a place where non-error log messages are sent.
+ Out io.Writer
+ // Err is a place where error log messages should be sent.
+ Err io.Writer
+ // SignaturePolicyPath specifies an override location for the signature
+ // policy which should be used for verifying the new image as it is
+ // being written. Except in specific circumstances, no value should be
+ // specified, indicating that the shared, system-wide default policy
+ // should be used.
+ SignaturePolicyPath string
+ // ReportWriter is an io.Writer which will be used to report the
+ // progress of the (possible) pulling of the source image and the
+ // writing of the new image.
+ ReportWriter io.Writer
+ // OutputFormat is the format of the output image's manifest and
+ // configuration data.
+ // Accepted values are buildah.OCIv1ImageManifest and buildah.Dockerv2ImageManifest.
+ OutputFormat string
+ // SystemContext holds parameters used for authentication.
+ SystemContext *types.SystemContext
+ // NamespaceOptions controls how we set up namespaces processes that we
+ // might need when handling RUN instructions.
+ NamespaceOptions []NamespaceOption
+ // ConfigureNetwork controls whether or not network interfaces and
+ // routing are configured for a new network namespace (i.e., when not
+ // joining another's namespace and not just using the host's
+ // namespace), effectively deciding whether or not the process has a
+ // usable network.
+ ConfigureNetwork NetworkConfigurationPolicy
+ // CNIPluginPath is the location of CNI plugin helpers, if they should be
+ // run from a location other than the default location.
+ CNIPluginPath string
+ // CNIConfigDir is the location of CNI configuration files, if the files in
+ // the default configuration directory shouldn't be used.
+ CNIConfigDir string
+ // ID mapping options to use if we're setting up our own user namespace
+ // when handling RUN instructions.
+ IDMappingOptions *IDMappingOptions
+ // AddCapabilities is a list of capabilities to add to the default set when
+ // handling RUN instructions.
+ AddCapabilities []string
+ // DropCapabilities is a list of capabilities to remove from the default set
+ // when handling RUN instructions. If a capability appears in both lists, it
+ // will be dropped.
+ DropCapabilities []string
+ // CommonBuildOpts is *required*.
+ CommonBuildOpts *CommonBuildOptions
+ // DefaultMountsFilePath is the file path holding the mounts to be mounted in "host-path:container-path" format
+ DefaultMountsFilePath string
+ // IIDFile tells the builder to write the image ID to the specified file
+ IIDFile string
+ // Squash tells the builder to produce an image with a single layer
+ // instead of with possibly more than one layer.
+ Squash bool
+ // Labels metadata for an image
+ Labels []string
+ // Annotation metadata for an image
+ Annotations []string
+ // OnBuild commands to be run by images based on this image
+ OnBuild []string
+ // Layers tells the builder to create a cache of images for each step in the Dockerfile
+ Layers bool
+ // NoCache tells the builder to build the image from scratch without checking for a cache.
+ // It creates a new set of cached images for the build.
+ NoCache bool
+ // RemoveIntermediateCtrs tells the builder whether to remove intermediate containers used
+ // during the build process. Default is true.
+ RemoveIntermediateCtrs bool
+ // ForceRmIntermediateCtrs tells the builder to remove all intermediate containers even if
+ // the build was unsuccessful.
+ ForceRmIntermediateCtrs bool
+ // BlobDirectory is a directory which we'll use for caching layer blobs.
+ BlobDirectory string
+ // Target the targeted FROM in the Dockerfile to build.
+ Target string
+ // Devices are the additional devices to add to the containers.
+ Devices []string
+ // SignBy is the fingerprint of a GPG key to use for signing images.
+ SignBy string
+ // Architecture specifies the target architecture of the image to be built.
+ Architecture string
+ // Timestamp sets the created timestamp to the specified time, allowing
+ // for deterministic, content-addressable builds.
+ Timestamp *time.Time
+ // OS is the specifies the operating system of the image to be built.
+ OS string
+ // MaxPullPushRetries is the maximum number of attempts we'll make to pull or push any one
+ // image from or to an external registry if the first attempt fails.
+ MaxPullPushRetries int
+ // PullPushRetryDelay is how long to wait before retrying a pull or push attempt.
+ PullPushRetryDelay time.Duration
+ // OciDecryptConfig contains the config that can be used to decrypt an image if it is
+ // encrypted if non-nil. If nil, it does not attempt to decrypt an image.
+ OciDecryptConfig *encconfig.DecryptConfig
+ // Jobs is the number of stages to run in parallel. If not specified it defaults to 1.
+ Jobs *int
+ // LogRusage logs resource usage for each step.
+ LogRusage bool
+ // Excludes is a list of excludes to be used instead of the .dockerignore file.
+ Excludes []string
+ // From is the image name to use to replace the value specified in the first
+ // FROM instruction in the Containerfile
+ From string
+}
diff --git a/vendor/github.com/containers/buildah/define/isolation.go b/vendor/github.com/containers/buildah/define/isolation.go
new file mode 100644
index 000000000..53bea85fd
--- /dev/null
+++ b/vendor/github.com/containers/buildah/define/isolation.go
@@ -0,0 +1,32 @@
+package define
+
+import (
+ "fmt"
+)
+
+type Isolation int
+
+const (
+ // IsolationDefault is whatever we think will work best.
+ IsolationDefault Isolation = iota
+ // IsolationOCI is a proper OCI runtime.
+ IsolationOCI
+ // IsolationChroot is a more chroot-like environment: less isolation,
+ // but with fewer requirements.
+ IsolationChroot
+ // IsolationOCIRootless is a proper OCI runtime in rootless mode.
+ IsolationOCIRootless
+)
+
+// String converts a Isolation into a string.
+func (i Isolation) String() string {
+ switch i {
+ case IsolationDefault, IsolationOCI:
+ return "oci"
+ case IsolationChroot:
+ return "chroot"
+ case IsolationOCIRootless:
+ return "rootless"
+ }
+ return fmt.Sprintf("unrecognized isolation type %d", i)
+}
diff --git a/vendor/github.com/containers/buildah/define/namespace.go b/vendor/github.com/containers/buildah/define/namespace.go
new file mode 100644
index 000000000..d0247fe91
--- /dev/null
+++ b/vendor/github.com/containers/buildah/define/namespace.go
@@ -0,0 +1,87 @@
+package define
+
+import (
+ "fmt"
+)
+
+// NamespaceOption controls how we set up a namespace when launching processes.
+type NamespaceOption struct {
+ // Name specifies the type of namespace, typically matching one of the
+ // ...Namespace constants defined in
+ // github.com/opencontainers/runtime-spec/specs-go.
+ Name string
+ // Host is used to force our processes to use the host's namespace of
+ // this type.
+ Host bool
+ // Path is the path of the namespace to attach our process to, if Host
+ // is not set. If Host is not set and Path is also empty, a new
+ // namespace will be created for the process that we're starting.
+ // If Name is specs.NetworkNamespace, if Path doesn't look like an
+ // absolute path, it is treated as a comma-separated list of CNI
+ // configuration names which will be selected from among all of the CNI
+ // network configurations which we find.
+ Path string
+}
+
+// NamespaceOptions provides some helper methods for a slice of NamespaceOption
+// structs.
+type NamespaceOptions []NamespaceOption
+
+// Find the configuration for the namespace of the given type. If there are
+// duplicates, find the _last_ one of the type, since we assume it was appended
+// more recently.
+func (n *NamespaceOptions) Find(namespace string) *NamespaceOption {
+ for i := range *n {
+ j := len(*n) - 1 - i
+ if (*n)[j].Name == namespace {
+ return &((*n)[j])
+ }
+ }
+ return nil
+}
+
+// AddOrReplace either adds or replaces the configuration for a given namespace.
+func (n *NamespaceOptions) AddOrReplace(options ...NamespaceOption) {
+nextOption:
+ for _, option := range options {
+ for i := range *n {
+ j := len(*n) - 1 - i
+ if (*n)[j].Name == option.Name {
+ (*n)[j] = option
+ continue nextOption
+ }
+ }
+ *n = append(*n, option)
+ }
+}
+
+// NetworkConfigurationPolicy takes the value NetworkDefault, NetworkDisabled,
+// or NetworkEnabled.
+type NetworkConfigurationPolicy int
+
+const (
+ // NetworkDefault is one of the values that BuilderOptions.ConfigureNetwork
+ // can take, signalling that the default behavior should be used.
+ NetworkDefault NetworkConfigurationPolicy = iota
+ // NetworkDisabled is one of the values that BuilderOptions.ConfigureNetwork
+ // can take, signalling that network interfaces should NOT be configured for
+ // newly-created network namespaces.
+ NetworkDisabled
+ // NetworkEnabled is one of the values that BuilderOptions.ConfigureNetwork
+ // can take, signalling that network interfaces should be configured for
+ // newly-created network namespaces.
+ NetworkEnabled
+)
+
+// String formats a NetworkConfigurationPolicy as a string.
+func (p NetworkConfigurationPolicy) String() string {
+ switch p {
+ case NetworkDefault:
+ return "NetworkDefault"
+ case NetworkDisabled:
+ return "NetworkDisabled"
+ case NetworkEnabled:
+ return "NetworkEnabled"
+ }
+ return fmt.Sprintf("unknown NetworkConfigurationPolicy %d", p)
+}
diff --git a/vendor/github.com/containers/buildah/define/pull.go b/vendor/github.com/containers/buildah/define/pull.go
new file mode 100644
index 000000000..00787bd9b
--- /dev/null
+++ b/vendor/github.com/containers/buildah/define/pull.go
@@ -0,0 +1,50 @@
+package define
+
+import (
+ "fmt"
+)
+
+// PullPolicy takes the value PullIfMissing, PullAlways, PullIfNewer, or PullNever.
+type PullPolicy int
+
+const (
+ // PullIfMissing is one of the values that BuilderOptions.PullPolicy
+ // can take, signalling that the source image should be pulled from a
+ // registry if a local copy of it is not already present.
+ PullIfMissing PullPolicy = iota
+ // PullAlways is one of the values that BuilderOptions.PullPolicy can
+ // take, signalling that a fresh, possibly updated, copy of the image
+ // should be pulled from a registry before the build proceeds.
+ PullAlways
+ // PullIfNewer is one of the values that BuilderOptions.PullPolicy
+ // can take, signalling that the source image should only be pulled
+ // from a registry if a local copy is not already present or if a
+ // newer version the image is present on the repository.
+ PullIfNewer
+ // PullNever is one of the values that BuilderOptions.PullPolicy can
+ // take, signalling that the source image should not be pulled from a
+ // registry.
+ PullNever
+)
+
+// String converts a PullPolicy into a string.
+func (p PullPolicy) String() string {
+ switch p {
+ case PullIfMissing:
+ return "missing"
+ case PullAlways:
+ return "always"
+ case PullIfNewer:
+ return "ifnewer"
+ case PullNever:
+ return "never"
+ }
+ return fmt.Sprintf("unrecognized policy %d", p)
+}
+
+var PolicyMap = map[string]PullPolicy{
+ "missing": PullIfMissing,
+ "always": PullAlways,
+ "never": PullNever,
+ "ifnewer": PullIfNewer,
+}
diff --git a/vendor/github.com/containers/buildah/define/types.go b/vendor/github.com/containers/buildah/define/types.go
index 62c47d6bc..5f3e29e62 100644
--- a/vendor/github.com/containers/buildah/define/types.go
+++ b/vendor/github.com/containers/buildah/define/types.go
@@ -1,50 +1,219 @@
package define
import (
+ "bufio"
+ "bytes"
"fmt"
-)
+ "io/ioutil"
+ "net/http"
+ "os"
+ "os/exec"
+ "path"
+ "path/filepath"
+ "strings"
-// PullPolicy takes the value PullIfMissing, PullAlways, PullIfNewer, or PullNever.
-type PullPolicy int
+ "github.com/containers/image/v5/manifest"
+ "github.com/containers/storage/pkg/archive"
+ "github.com/containers/storage/pkg/chrootarchive"
+ "github.com/containers/storage/pkg/ioutils"
+ v1 "github.com/opencontainers/image-spec/specs-go/v1"
+ "github.com/opencontainers/runtime-spec/specs-go"
+ "github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
+)
const (
- // PullIfMissing is one of the values that BuilderOptions.PullPolicy
- // can take, signalling that the source image should be pulled from a
- // registry if a local copy of it is not already present.
- PullIfMissing PullPolicy = iota
- // PullAlways is one of the values that BuilderOptions.PullPolicy can
- // take, signalling that a fresh, possibly updated, copy of the image
- // should be pulled from a registry before the build proceeds.
- PullAlways
- // PullIfNewer is one of the values that BuilderOptions.PullPolicy
- // can take, signalling that the source image should only be pulled
- // from a registry if a local copy is not already present or if a
- // newer version the image is present on the repository.
- PullIfNewer
- // PullNever is one of the values that BuilderOptions.PullPolicy can
- // take, signalling that the source image should not be pulled from a
- // registry if a local copy of it is not already present.
- PullNever
+ // Package is the name of this package, used in help output and to
+ // identify working containers.
+ Package = "buildah"
+ // Version for the Package. Bump version in contrib/rpm/buildah.spec
+ // too.
+ Version = "1.20.0"
+
+ // DefaultRuntime if containers.conf fails.
+ DefaultRuntime = "runc"
+
+ DefaultCNIPluginPath = "/usr/libexec/cni:/opt/cni/bin"
+ // DefaultCNIConfigDir is the default location of CNI configuration files.
+ DefaultCNIConfigDir = "/etc/cni/net.d"
+
+ // OCIv1ImageManifest is the MIME type of an OCIv1 image manifest,
+ // suitable for specifying as a value of the PreferredManifestType
+ // member of a CommitOptions structure. It is also the default.
+ OCIv1ImageManifest = v1.MediaTypeImageManifest
+ // Dockerv2ImageManifest is the MIME type of a Docker v2s2 image
+ // manifest, suitable for specifying as a value of the
+ // PreferredManifestType member of a CommitOptions structure.
+ Dockerv2ImageManifest = manifest.DockerV2Schema2MediaType
+
+ // OCI used to define the "oci" image format
+ OCI = "oci"
+ // DOCKER used to define the "docker" image format
+ DOCKER = "docker"
+)
+
+var (
+ // DefaultCapabilities is the list of capabilities which we grant by
+ // default to containers which are running under UID 0.
+ DefaultCapabilities = []string{
+ "CAP_AUDIT_WRITE",
+ "CAP_CHOWN",
+ "CAP_DAC_OVERRIDE",
+ "CAP_FOWNER",
+ "CAP_FSETID",
+ "CAP_KILL",
+ "CAP_MKNOD",
+ "CAP_NET_BIND_SERVICE",
+ "CAP_SETFCAP",
+ "CAP_SETGID",
+ "CAP_SETPCAP",
+ "CAP_SETUID",
+ "CAP_SYS_CHROOT",
+ }
+ // DefaultNetworkSysctl is the list of Kernel parameters which we
+ // grant by default to containers which are running under UID 0.
+ DefaultNetworkSysctl = map[string]string{
+ "net.ipv4.ping_group_range": "0 0",
+ }
+
+ Gzip = archive.Gzip
+ Bzip2 = archive.Bzip2
+ Xz = archive.Xz
+ Zstd = archive.Zstd
+ Uncompressed = archive.Uncompressed
)
-// String converts a PullPolicy into a string.
-func (p PullPolicy) String() string {
- switch p {
- case PullIfMissing:
- return "PullIfMissing"
- case PullAlways:
- return "PullAlways"
- case PullIfNewer:
- return "PullIfNewer"
- case PullNever:
- return "PullNever"
- }
- return fmt.Sprintf("unrecognized policy %d", p)
+// IDMappingOptions controls how we set up UID/GID mapping when we set up a
+// user namespace.
+type IDMappingOptions struct {
+ HostUIDMapping bool
+ HostGIDMapping bool
+ UIDMap []specs.LinuxIDMapping
+ GIDMap []specs.LinuxIDMapping
}
-var PolicyMap = map[string]PullPolicy{
- "missing": PullIfMissing,
- "always": PullAlways,
- "never": PullNever,
- "ifnewer": PullIfNewer,
+// TempDirForURL checks if the passed-in string looks like a URL or -. If it is,
+// TempDirForURL creates a temporary directory, arranges for its contents to be
+// the contents of that URL, and returns the temporary directory's path, along
+// with the name of a subdirectory which should be used as the build context
+// (which may be empty or "."). Removal of the temporary directory is the
+// responsibility of the caller. If the string doesn't look like a URL,
+// TempDirForURL returns empty strings and a nil error code.
+func TempDirForURL(dir, prefix, url string) (name string, subdir string, err error) {
+ if !strings.HasPrefix(url, "http://") &&
+ !strings.HasPrefix(url, "https://") &&
+ !strings.HasPrefix(url, "git://") &&
+ !strings.HasPrefix(url, "github.com/") &&
+ url != "-" {
+ return "", "", nil
+ }
+ name, err = ioutil.TempDir(dir, prefix)
+ if err != nil {
+ return "", "", errors.Wrapf(err, "error creating temporary directory for %q", url)
+ }
+ if strings.HasPrefix(url, "git://") || strings.HasSuffix(url, ".git") {
+ err = cloneToDirectory(url, name)
+ if err != nil {
+ if err2 := os.RemoveAll(name); err2 != nil {
+ logrus.Debugf("error removing temporary directory %q: %v", name, err2)
+ }
+ return "", "", err
+ }
+ return name, "", nil
+ }
+ if strings.HasPrefix(url, "github.com/") {
+ ghurl := url
+ url = fmt.Sprintf("https://%s/archive/master.tar.gz", ghurl)
+ logrus.Debugf("resolving url %q to %q", ghurl, url)
+ subdir = path.Base(ghurl) + "-master"
+ }
+ if strings.HasPrefix(url, "http://") || strings.HasPrefix(url, "https://") {
+ err = downloadToDirectory(url, name)
+ if err != nil {
+ if err2 := os.RemoveAll(name); err2 != nil {
+ logrus.Debugf("error removing temporary directory %q: %v", name, err2)
+ }
+ return "", subdir, err
+ }
+ return name, subdir, nil
+ }
+ if url == "-" {
+ err = stdinToDirectory(name)
+ if err != nil {
+ if err2 := os.RemoveAll(name); err2 != nil {
+ logrus.Debugf("error removing temporary directory %q: %v", name, err2)
+ }
+ return "", subdir, err
+ }
+ logrus.Debugf("Build context is at %q", name)
+ return name, subdir, nil
+ }
+ logrus.Debugf("don't know how to retrieve %q", url)
+ if err2 := os.Remove(name); err2 != nil {
+ logrus.Debugf("error removing temporary directory %q: %v", name, err2)
+ }
+ return "", "", errors.Errorf("unreachable code reached")
+}
+
+func cloneToDirectory(url, dir string) error {
+ if !strings.HasPrefix(url, "git://") && !strings.HasSuffix(url, ".git") {
+ url = "git://" + url
+ }
+ gitBranch := strings.Split(url, "#")
+ var cmd *exec.Cmd
+ if len(gitBranch) < 2 {
+ logrus.Debugf("cloning %q to %q", url, dir)
+ cmd = exec.Command("git", "clone", url, dir)
+ } else {
+ logrus.Debugf("cloning repo %q and branch %q to %q", gitBranch[0], gitBranch[1], dir)
+ cmd = exec.Command("git", "clone", "-b", gitBranch[1], gitBranch[0], dir)
+ }
+ return cmd.Run()
+}
+
+func downloadToDirectory(url, dir string) error {
+ logrus.Debugf("extracting %q to %q", url, dir)
+ resp, err := http.Get(url)
+ if err != nil {
+ return err
+ }
+ defer resp.Body.Close()
+ if resp.ContentLength == 0 {
+ return errors.Errorf("no contents in %q", url)
+ }
+ if err := chrootarchive.Untar(resp.Body, dir, nil); err != nil {
+ resp1, err := http.Get(url)
+ if err != nil {
+ return err
+ }
+ defer resp1.Body.Close()
+ body, err := ioutil.ReadAll(resp1.Body)
+ if err != nil {
+ return err
+ }
+ dockerfile := filepath.Join(dir, "Dockerfile")
+ // Assume this is a Dockerfile
+ if err := ioutils.AtomicWriteFile(dockerfile, body, 0600); err != nil {
+ return errors.Wrapf(err, "Failed to write %q to %q", url, dockerfile)
+ }
+ }
+ return nil
+}
+
+func stdinToDirectory(dir string) error {
+ logrus.Debugf("extracting stdin to %q", dir)
+ r := bufio.NewReader(os.Stdin)
+ b, err := ioutil.ReadAll(r)
+ if err != nil {
+ return errors.Wrapf(err, "Failed to read from stdin")
+ }
+ reader := bytes.NewReader(b)
+ if err := chrootarchive.Untar(reader, dir, nil); err != nil {
+ dockerfile := filepath.Join(dir, "Dockerfile")
+ // Assume this is a Dockerfile
+ if err := ioutils.AtomicWriteFile(dockerfile, b, 0600); err != nil {
+ return errors.Wrapf(err, "Failed to write bytes to %q", dockerfile)
+ }
+ }
+ return nil
}
diff --git a/vendor/github.com/containers/buildah/define/types_unix.go b/vendor/github.com/containers/buildah/define/types_unix.go
new file mode 100644
index 000000000..aedadad36
--- /dev/null
+++ b/vendor/github.com/containers/buildah/define/types_unix.go
@@ -0,0 +1,9 @@
+// +build darwin linux
+
+package define
+
+import (
+ "github.com/opencontainers/runc/libcontainer/devices"
+)
+
+type ContainerDevices = []devices.Device
diff --git a/vendor/github.com/containers/buildah/define/types_unsupported.go b/vendor/github.com/containers/buildah/define/types_unsupported.go
new file mode 100644
index 000000000..64e26d377
--- /dev/null
+++ b/vendor/github.com/containers/buildah/define/types_unsupported.go
@@ -0,0 +1,6 @@
+// +build !linux,!darwin
+
+package define
+
+// ContainerDevices is currently not implemented.
+type ContainerDevices = []struct{}
diff --git a/vendor/github.com/containers/buildah/go.mod b/vendor/github.com/containers/buildah/go.mod
index ee3c28d50..fa37132f4 100644
--- a/vendor/github.com/containers/buildah/go.mod
+++ b/vendor/github.com/containers/buildah/go.mod
@@ -3,43 +3,40 @@ module github.com/containers/buildah
go 1.12
require (
- github.com/containerd/containerd v1.4.1 // indirect
github.com/containernetworking/cni v0.8.1
- github.com/containers/common v0.33.4
- github.com/containers/image/v5 v5.10.2
- github.com/containers/ocicrypt v1.0.3
- github.com/containers/storage v1.24.6
+ github.com/containers/common v0.35.3
+ github.com/containers/image/v5 v5.10.5
+ github.com/containers/ocicrypt v1.1.0
+ github.com/containers/storage v1.28.1
github.com/docker/distribution v2.7.1+incompatible
github.com/docker/go-units v0.4.0
github.com/docker/libnetwork v0.8.0-dev.2.0.20190625141545-5a177b73e316
- github.com/fsouza/go-dockerclient v1.6.6
+ github.com/fsouza/go-dockerclient v1.7.2
github.com/ghodss/yaml v1.0.0
- github.com/hashicorp/go-multierror v1.1.0
+ github.com/hashicorp/go-multierror v1.1.1
github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07 // indirect
- github.com/mattn/go-shellwords v1.0.10
- github.com/moby/sys/mount v0.1.1 // indirect
- github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2 // indirect
- github.com/onsi/ginkgo v1.14.2
- github.com/onsi/gomega v1.10.4
+ github.com/mattn/go-shellwords v1.0.11
+ github.com/onsi/ginkgo v1.15.2
+ github.com/onsi/gomega v1.11.0
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6
- github.com/opencontainers/runc v1.0.0-rc91
- github.com/opencontainers/runtime-spec v1.0.3-0.20200710190001-3e4195d92445
+ github.com/opencontainers/runc v1.0.0-rc93
+ github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d
github.com/opencontainers/runtime-tools v0.9.0
github.com/opencontainers/selinux v1.8.0
- github.com/openshift/imagebuilder v1.1.8
+ github.com/openshift/imagebuilder v1.2.0
github.com/pkg/errors v0.9.1
+ github.com/prometheus/procfs v0.6.0 // indirect
github.com/seccomp/libseccomp-golang v0.9.2-0.20200616122406-847368b35ebf
- github.com/sirupsen/logrus v1.7.0
- github.com/spf13/cobra v1.1.1
+ github.com/sirupsen/logrus v1.8.1
+ github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
- github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
+ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
go.etcd.io/bbolt v1.3.5
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
- golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
- golang.org/x/sys v0.0.0-20201218084310-7d0127a74742
- gotest.tools/v3 v3.0.3 // indirect
+ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
+ golang.org/x/sys v0.0.0-20210216224549-f992740a1bac
k8s.io/klog v1.0.0 // indirect
)
diff --git a/vendor/github.com/containers/buildah/go.sum b/vendor/github.com/containers/buildah/go.sum
index 9b6e62ff4..c20348bb2 100644
--- a/vendor/github.com/containers/buildah/go.sum
+++ b/vendor/github.com/containers/buildah/go.sum
@@ -6,49 +6,99 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
+cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
+cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
+cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
+cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
+cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
+cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
+cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
+cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
+cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
+cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
+cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774 h1:SCbEWT58NSt7d2mcFdvxC9uyrdcTfvBbPLThhkDmXzg=
github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774/go.mod h1:6/0dYRLLXyJjbkIPeeGyoJ/eKOSI0eU6eTlCBYibgd0=
+github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
+github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
+github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
+github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
+github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
+github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
+github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
+github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
-github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873 h1:93nQ7k53GjoMQ07HVP8g6Zj1fQZDDj7Xy2VkNNtvX8o=
-github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
-github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331 h1:3YnB7Hpmh1lPecPE8doMOtYCrMdrpedZOvxfuNES/Vk=
github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
-github.com/Microsoft/hcsshim v0.8.9 h1:VrfodqvztU8YSOvygU+DN1BGaSGxmrNfqOv5oOuX2Bk=
+github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
+github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3 h1:mw6pDQqv38/WGF1cO/jF5t/jyAJ2yi7CmtFLLO5tGFI=
+github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
+github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
+github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
+github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ=
github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8=
-github.com/Microsoft/hcsshim v0.8.14 h1:lbPVK25c1cu5xTLITwpUcxoA9vKrKErASPYygvouJns=
github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
+github.com/Microsoft/hcsshim v0.8.15 h1:Aof83YILRs2Vx3GhHqlvvfyx1asRJKMFIMeVlHsZKtI=
+github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00=
+github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU=
+github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
+github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
+github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
+github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
+github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
+github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
+github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
+github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
+github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
+github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
+github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
+github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
+github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
+github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/checkpoint-restore/go-criu/v4 v4.0.2/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw=
+github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw=
github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
@@ -57,152 +107,275 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWs
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg=
github.com/cilium/ebpf v0.0.0-20200507155900-a9f01edf17e3/go.mod h1:XT+cAw5wfvsodedcijoh1l9cf7v1x9FlFB/3VmF/O8s=
+github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc=
+github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s=
+github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
+github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
+github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E=
+github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI=
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
-github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk=
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
+github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
+github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102 h1:Qf4HiqfvmB7zS6scsmNgTLmByHbq8n9RTF39v+TzP7A=
+github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
+github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
+github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE=
github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE=
+github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw=
+github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.4.1 h1:pASeJT3R3YyVn+94qEPk0SnU1OQ20Jd/T+SPKy9xehY=
-github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.5.0-beta.1 h1:IK6yirB4X7wpKyFSikWiT++nZsyIxGAAgNEv3fEGuls=
+github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ=
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
-github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb h1:nXPkFq8X1a9ycY3GYQpFNxHh3j2JgY7zDZfq2EXMIzk=
-github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY=
+github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
+github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
+github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo=
+github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y=
+github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e h1:6JKvHHt396/qabvMhnhUZvWaHZzfVfldxE60TK8YLhg=
+github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ=
+github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
+github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
+github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
+github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU=
github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
+github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
+github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g=
+github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0=
+github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c=
github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
+github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
+github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8=
+github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y=
+github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y=
github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
+github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk=
+github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg=
+github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw=
+github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
+github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI=
github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
-github.com/containers/common v0.33.4 h1:f1jowItfo6xw0bZGZq8oE5dw1pBIkldqB0FqW+HHzG8=
-github.com/containers/common v0.33.4/go.mod h1:PhgL71XuC4jJ/1BIqeP7doke3aMFkCP90YBXwDeUr9g=
-github.com/containers/image/v5 v5.10.1/go.mod h1:JlRLJZv7elVbtHaaaR6Kz8i6G3k2ttj4t7fubwxD9Hs=
-github.com/containers/image/v5 v5.10.2 h1:STD9GYR9p/X0qTLmBYsyx8dEM7zQW+qZ8KHoL/64fkg=
-github.com/containers/image/v5 v5.10.2/go.mod h1:JlRLJZv7elVbtHaaaR6Kz8i6G3k2ttj4t7fubwxD9Hs=
+github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM=
+github.com/containers/common v0.35.3 h1:6tEBSIHlJzpmt35zA1ZcjBqbtUilAHDWaa7buPvaqWY=
+github.com/containers/common v0.35.3/go.mod h1:rMzxgD7nMGw++cEbsp+NZv0UJO4rgXbm7F7IbJPTwIE=
+github.com/containers/image/v5 v5.10.5 h1:VK1UbsZMzjdw5Xqr3Im9h4iOqHWU0naFs+I78kavc7I=
+github.com/containers/image/v5 v5.10.5/go.mod h1:SgIbWEedCNBbn2FI5cH0/jed1Ecy2s8XK5zTxvJTzII=
github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b h1:Q8ePgVfHDplZ7U33NwHZkrVELsZP5fYj9pM5WBZB2GE=
github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
-github.com/containers/ocicrypt v1.0.3 h1:vYgl+RZ9Q3DPMuTfxmN+qp0X2Bj52uuY2vnt6GzVe1c=
+github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
github.com/containers/ocicrypt v1.0.3/go.mod h1:CUBa+8MRNL/VkpxYIpaMtgn1WgXGyvPQj8jcy0EVG6g=
-github.com/containers/storage v1.24.5 h1:BusfdU0rCS2/Daa/DPw+0iLfGRlYA7UVF7D0el3N7Vk=
-github.com/containers/storage v1.24.5/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
-github.com/containers/storage v1.24.6 h1:9PBb9PoGuj5B/3MGfxx//RmUjMAklmx3rBbuCkuIc94=
-github.com/containers/storage v1.24.6/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
+github.com/containers/ocicrypt v1.1.0 h1:A6UzSUFMla92uxO43O6lm86i7evMGjTY7wTKB2DyGPY=
+github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4=
+github.com/containers/storage v1.24.8/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
+github.com/containers/storage v1.28.0 h1:lA/9i9BIjfmIRxCI8GuzasYHmU4IUXVcfZZiDceD0Eg=
+github.com/containers/storage v1.28.0/go.mod h1:ixAwO7Bj31cigqPEG7aCz+PYmxkDxbIFdUFioYdxbzI=
+github.com/containers/storage v1.28.1 h1:axYBD+c0N0YkHelDoqzdLQXfY3fgb8pqIMsRHqUNGts=
+github.com/containers/storage v1.28.1/go.mod h1:5bwiMh2LkrN3AWIfDFMH7A/xbVNLcve+oeXYvHvW8cc=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
+github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
+github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
+github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28=
github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
+github.com/coreos/go-systemd/v22 v22.1.0 h1:kq/SbG2BCKLkDKkjQf5OWwKWUKj1lgs3lFI4PxnR5lg=
+github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
+github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
-github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
+github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
+github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
+github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
+github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
+github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s=
+github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8=
+github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
+github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
+github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
+github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
+github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker v17.12.0-ce-rc1.0.20200505174321-1655290016ac+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker v17.12.0-ce-rc1.0.20201020191947-73dc6a680cdd+incompatible h1:+0LETFJcCLdIqdtEbVWF1JIxATqM15Y4sLiMcWOYq2U=
github.com/docker/docker v17.12.0-ce-rc1.0.20201020191947-73dc6a680cdd+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker v20.10.3-0.20210216175712-646072ed6524+incompatible h1:Yu2uGErhwEoOT/OxAFe+/SiJCqRLs+pgcS5XKrDXnG4=
+github.com/docker/docker v20.10.3-0.20210216175712-646072ed6524+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ=
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
+github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA=
+github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA=
+github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI=
github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8=
github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/libnetwork v0.8.0-dev.2.0.20190625141545-5a177b73e316 h1:moehPjPiGUaWdwgOl92xRyFHJyaqXDHcCyW9M6nmCK4=
github.com/docker/libnetwork v0.8.0-dev.2.0.20190625141545-5a177b73e316/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8=
+github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4=
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
+github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
+github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
+github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/fsouza/go-dockerclient v1.6.6 h1:9e3xkBrVkPb81gzYq23i7iDUEd6sx2ooeJA/gnYU6R4=
-github.com/fsouza/go-dockerclient v1.6.6/go.mod h1:3/oRIWoe7uT6bwtAayj/EmJmepBjeL4pYvt7ZxC7Rnk=
+github.com/fsouza/go-dockerclient v1.7.2 h1:bBEAcqLTkpq205jooP5RVroUKiVEWgGecHyeZc4OFjo=
+github.com/fsouza/go-dockerclient v1.7.2/go.mod h1:+ugtMCVRwnPfY7d8/baCzZ3uwB0BrG5DB8OzbtxaRz8=
+github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
+github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
+github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
+github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
+github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
+github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
+github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
+github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
+github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
+github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8=
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME=
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU=
+github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
-github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
+github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
+github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
+github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
+github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
+github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
+github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
+github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
+github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI=
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
+github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
+github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
@@ -210,7 +383,6 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
@@ -218,58 +390,81 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07 h1:rw3IAne6CDuVFlZbPOkA7bhxlqawFh7RJJ+CejfMaxE=
github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg=
+github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
+github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
+github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
+github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.11.5 h1:xNCE0uE6yvTPRS+0wGNMHPo3NIpwnk6aluQZ6R6kRcc=
+github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.5/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
-github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg=
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
+github.com/klauspost/compress v1.11.12 h1:famVnQVu7QwryBN4jNseQdUKES71ZAOnB6UQQJPZvqk=
+github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
+github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/manifoldco/promptui v0.8.0 h1:R95mMF+McvXZQ7j1g8ucVZE1gLP3Sv6j9vlF9kyRqQo=
github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ=
+github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
-github.com/mattn/go-shellwords v1.0.10 h1:Y7Xqm8piKOO3v10Thp7Z36h4FYFjt5xB//6XvOrs2Gw=
+github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
-github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
+github.com/mattn/go-shellwords v1.0.11 h1:vCoR9VPpsk/TZFW2JwK5I9S0xdrtUq2bph6/YjEPnaw=
+github.com/mattn/go-shellwords v1.0.11/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
+github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
-github.com/mistifyio/go-zfs v2.1.1+incompatible h1:gAMO1HM9xBRONLHHYnu5iFsOJUiJdNZo6oqSENd4eW8=
+github.com/miekg/pkcs11 v1.0.3 h1:iMwmD7I5225wv84WxIG/bmxz9AXjWvTWIbM/TYHvWtw=
+github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
+github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk=
+github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
@@ -278,16 +473,17 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/moby/sys/mount v0.1.0/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74=
-github.com/moby/sys/mount v0.1.1 h1:mdhBytJ1SMmMat0gtzWWjFX/87K5j6E/7Q5z7rR0cZY=
-github.com/moby/sys/mount v0.1.1/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74=
-github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o=
+github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
+github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM=
+github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM=
github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o=
-github.com/moby/sys/mountinfo v0.4.0 h1:1KInV3Huv18akCu58V7lzNlt+jFmqlu1EaErnEHE/VM=
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
-github.com/moby/term v0.0.0-20200429084858-129dac9f73f6/go.mod h1:or9wGItza1sRcM4Wd3dIv8DsFHYQuFsMHEdxUIlUxms=
-github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2 h1:SPoLlS9qUUnXcIY4pvA4CTwYjk0Is5f4UPEkeESr53k=
-github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ=
+github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM=
+github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
+github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
+github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
+github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk=
+github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
@@ -295,49 +491,73 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
+github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
github.com/mtrmac/gpgme v0.1.2 h1:dNOmvYmsrakgW7LcgiprD0yfRuQQe8/C8F6Z+zogO3s=
github.com/mtrmac/gpgme v0.1.2/go.mod h1:GYYHnGSuS7HK3zVS2n3y73y0okK/BeKzwnn5jgiVFNI=
+github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
+github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
+github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
+github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
+github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
+github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
+github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
+github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
-github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M=
-github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
+github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org=
+github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o=
+github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
+github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
-github.com/onsi/gomega v1.10.4 h1:NiTx7EEvBzu9sFOD1zORteLSt3o8gnlvZZwSE9TnY9U=
-github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ=
+github.com/onsi/gomega v1.11.0 h1:+CqWgvj0OZycCaqclBD1pxKHAU+tOkHmQIWvDHq2aug=
+github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg=
+github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
+github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
+github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 h1:yN8BPXVwMBAm3Cuvh1L5XE8XpvYRMdsVLd82ILprhUU=
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
-github.com/opencontainers/runc v1.0.0-rc91 h1:Tp8LWs5G8rFpzTsbRjAtQkPVexhCu0bnANE5IfIhJ6g=
+github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
+github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runc v1.0.0-rc91/go.mod h1:3Sm6Dt7OT8z88EbdQqqcRN2oCT54jbi72tT/HqgflT8=
+github.com/opencontainers/runc v1.0.0-rc93 h1:x2UMpOOVf3kQ8arv/EsDGwim8PTNqzL1/EYDr/+scOM=
+github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0=
github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/opencontainers/runtime-spec v1.0.3-0.20200710190001-3e4195d92445 h1:y8cfsJRmn8g3VkM4IDpusKSgMUZEXhudm/BuYANLozE=
-github.com/opencontainers/runtime-spec v1.0.3-0.20200710190001-3e4195d92445/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d h1:pNa8metDkwZjb9g4T8s+krQ+HRgZAkqnXml+wNir/+s=
+github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
github.com/opencontainers/runtime-tools v0.9.0 h1:FYgwVsKRI/H9hU32MJ/4MLOzXWodKK5zsQavY8NPMkU=
github.com/opencontainers/runtime-tools v0.9.0/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
github.com/opencontainers/selinux v1.5.1/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g=
+github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE=
github.com/opencontainers/selinux v1.8.0 h1:+77ba4ar4jsCbL1GLbFL8fFM57w6suPfSS9PDLDY7KM=
github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
-github.com/openshift/imagebuilder v1.1.8 h1:gjiIl8pbNj0eC4XWvFJHATdDvYm64p9/pLDLQWoLZPA=
-github.com/openshift/imagebuilder v1.1.8/go.mod h1:9aJRczxCH0mvT6XQ+5STAQaPWz7OsWcU5/mRkt8IWeo=
+github.com/openshift/imagebuilder v1.2.0 h1:uoZFjJICLlTMjlAL/UG2PA2kM8RjAsVflGfHJK7MMDk=
+github.com/openshift/imagebuilder v1.2.0/go.mod h1:9aJRczxCH0mvT6XQ+5STAQaPWz7OsWcU5/mRkt8IWeo=
github.com/ostreedev/ostree-go v0.0.0-20190702140239-759a8c1ac913 h1:TnbXhKzrTOyuvWrjI8W6pcoI9XPbLHFXCdN2dtUw7Rw=
github.com/ostreedev/ostree-go v0.0.0-20190702140239-759a8c1ac913/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -346,34 +566,50 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
+github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9 h1:kyf9snWXHvQc+yxE9imhdI8YAm4oKeZISlaAR+x73zs=
github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
+github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
-github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8=
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
+github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA=
+github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
+github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo=
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
+github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc=
+github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
+github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
+github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
+github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=
+github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
+github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
+github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/seccomp/libseccomp-golang v0.9.2-0.20200616122406-847368b35ebf h1:b0+ZBD3rohnkQ4q5duD1+RyTXTg9yk+qTOPMSQtapO0=
@@ -382,48 +618,67 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
+github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
-github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=
-github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
+github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
+github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
+github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
+github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
+github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I=
+github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8=
+github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
+github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
-github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8=
+github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
+github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
+github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
+github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
github.com/tchap/go-patricia v2.3.0+incompatible h1:GkY4dP3cEfEASBPPkWd+AmjYxhmDkqO9/zg7R0lSQRs=
github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I=
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
+github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8=
+github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vbatts/tar-split v0.11.1 h1:0Odu65rhcZ3JZaPHxl7tCI3V/C/Q9Zf82UFravl02dE=
github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g=
github.com/vbauerster/mpb/v5 v5.4.0 h1:n8JPunifvQvh6P1D1HAl2Ur9YcmKT1tpoUuiea5mlmg=
github.com/vbauerster/mpb/v5 v5.4.0/go.mod h1:fi4wVo7BVQ22QcvFObm+VwliQXlV1eBT8JDaKXR4JGI=
+github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0=
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
+github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
+github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE=
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -431,30 +686,44 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20190809123943-df4f5c81cb3b h1:6cLsL+2FW
github.com/xeipuuv/gojsonpointer v0.0.0-20190809123943-df4f5c81cb3b/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
+github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
+github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
+github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
+go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
+go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M=
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
-go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
+go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
+go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -462,6 +731,11 @@ golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
+golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
+golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -471,13 +745,21 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
+golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -488,24 +770,46 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw=
+golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -520,43 +824,72 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3 h1:kzM6+9dur93BcC2kVlYl34cHU+TYZLanmpSJHVMmL64=
+golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201218084310-7d0127a74742 h1:+CBz4km/0KPU3RGTwARGh/noP3bEwtHcq+0YcBQM2JQ=
+golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
+golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210216224549-f992740a1bac h1:9glrpwtNjBYgRpb67AZJKHfzj1stG/8BL5H7In2oTC4=
+golang.org/x/sys v0.0.0-20210216224549-f992740a1bac/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201113234701-d7a72108b828/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
+golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s=
+golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -570,6 +903,7 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
@@ -577,65 +911,125 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
+google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
-google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
+google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a h1:pOwg4OoaRYScjmR4LlLgdtnyoHYTSAVhhqe5uPdpII8=
+google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
+google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
-google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
+google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o=
+google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
+google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
+google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
+gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
-gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4=
+gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
+gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w=
+gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
@@ -648,6 +1042,26 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
+honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo=
+k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
+k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
+k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y=
+k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk=
+k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM=
+k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI=
+k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
+k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
+k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
+k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
+k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
+k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
+rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
+rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
+sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
+sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
diff --git a/vendor/github.com/containers/buildah/image.go b/vendor/github.com/containers/buildah/image.go
index 7c55020ab..51d18232a 100644
--- a/vendor/github.com/containers/buildah/image.go
+++ b/vendor/github.com/containers/buildah/image.go
@@ -14,6 +14,7 @@ import (
"time"
"github.com/containers/buildah/copier"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/docker"
"github.com/containers/image/v5/docker/reference"
"github.com/containers/image/v5/image"
@@ -35,14 +36,16 @@ const (
// OCIv1ImageManifest is the MIME type of an OCIv1 image manifest,
// suitable for specifying as a value of the PreferredManifestType
// member of a CommitOptions structure. It is also the default.
- OCIv1ImageManifest = v1.MediaTypeImageManifest
+ OCIv1ImageManifest = define.OCIv1ImageManifest
// Dockerv2ImageManifest is the MIME type of a Docker v2s2 image
// manifest, suitable for specifying as a value of the
// PreferredManifestType member of a CommitOptions structure.
- Dockerv2ImageManifest = manifest.DockerV2Schema2MediaType
+ Dockerv2ImageManifest = define.Dockerv2ImageManifest
)
type containerImageRef struct {
+ fromImageName string
+ fromImageID string
store storage.Store
compression archive.Compression
name reference.Named
@@ -60,7 +63,7 @@ type containerImageRef struct {
exporting bool
squash bool
emptyLayer bool
- idMappingOptions *IDMappingOptions
+ idMappingOptions *define.IDMappingOptions
parent string
blobDirectory string
preEmptyLayers []v1.History
@@ -143,14 +146,16 @@ func computeLayerMIMEType(what string, layerCompression archive.Compression) (om
}
// Extract the container's whole filesystem as if it were a single layer.
-func (i *containerImageRef) extractRootfs() (io.ReadCloser, error) {
+func (i *containerImageRef) extractRootfs() (io.ReadCloser, chan error, error) {
var uidMap, gidMap []idtools.IDMap
mountPoint, err := i.store.Mount(i.containerID, i.mountLabel)
if err != nil {
- return nil, errors.Wrapf(err, "error mounting container %q", i.containerID)
+ return nil, nil, errors.Wrapf(err, "error mounting container %q", i.containerID)
}
pipeReader, pipeWriter := io.Pipe()
+ errChan := make(chan error, 1)
go func() {
+ defer close(errChan)
if i.idMappingOptions != nil {
uidMap, gidMap = convertRuntimeIDMaps(i.idMappingOptions.UIDMap, i.idMappingOptions.GIDMap)
}
@@ -159,7 +164,9 @@ func (i *containerImageRef) extractRootfs() (io.ReadCloser, error) {
GIDMap: gidMap,
}
err = copier.Get(mountPoint, mountPoint, copierOptions, []string{"."}, pipeWriter)
+ errChan <- err
pipeWriter.Close()
+
}()
return ioutils.NewReadCloserWrapper(pipeReader, func() error {
if err = pipeReader.Close(); err != nil {
@@ -172,7 +179,7 @@ func (i *containerImageRef) extractRootfs() (io.ReadCloser, error) {
err = err2
}
return err
- }), nil
+ }), errChan, nil
}
// Build fresh copies of the container configuration structures so that we can edit them
@@ -279,7 +286,7 @@ func (i *containerImageRef) NewImageSource(ctx context.Context, sc *types.System
logrus.Debugf("layer list: %q", layers)
// Make a temporary directory to hold blobs.
- path, err := ioutil.TempDir(os.TempDir(), Package)
+ path, err := ioutil.TempDir(os.TempDir(), define.Package)
if err != nil {
return nil, errors.Wrapf(err, "error creating temporary directory to hold layer blobs")
}
@@ -354,9 +361,10 @@ func (i *containerImageRef) NewImageSource(ctx context.Context, sc *types.System
Compression: &noCompression,
}
var rc io.ReadCloser
+ var errChan chan error
if i.squash {
// Extract the root filesystem as a single layer.
- rc, err = i.extractRootfs()
+ rc, errChan, err = i.extractRootfs()
if err != nil {
return nil, err
}
@@ -414,6 +422,14 @@ func (i *containerImageRef) NewImageSource(ctx context.Context, sc *types.System
writeCloser.Close()
layerFile.Close()
rc.Close()
+
+ if errChan != nil {
+ err = <-errChan
+ if err != nil {
+ return nil, err
+ }
+ }
+
if err != nil {
return nil, errors.Wrapf(err, "error storing %s to file", what)
}
@@ -483,11 +499,16 @@ func (i *containerImageRef) NewImageSource(ctx context.Context, sc *types.System
if i.created != nil {
created = (*i.created).UTC()
}
+ comment := i.historyComment
+ // Add a comment for which base image is being used
+ if strings.Contains(i.parent, i.fromImageID) && i.fromImageName != i.fromImageID {
+ comment += "FROM " + i.fromImageName
+ }
onews := v1.History{
Created: &created,
CreatedBy: i.createdBy,
Author: oimage.Author,
- Comment: i.historyComment,
+ Comment: comment,
EmptyLayer: i.emptyLayer,
}
oimage.History = append(oimage.History, onews)
@@ -495,7 +516,7 @@ func (i *containerImageRef) NewImageSource(ctx context.Context, sc *types.System
Created: created,
CreatedBy: i.createdBy,
Author: dimage.Author,
- Comment: i.historyComment,
+ Comment: comment,
EmptyLayer: i.emptyLayer,
}
dimage.History = append(dimage.History, dnews)
@@ -697,7 +718,7 @@ func (b *Builder) makeImageRef(options CommitOptions, exporting bool) (types.Ima
}
manifestType := options.PreferredManifestType
if manifestType == "" {
- manifestType = OCIv1ImageManifest
+ manifestType = define.OCIv1ImageManifest
}
oconfig, err := json.Marshal(&b.OCIv1)
if err != nil {
@@ -729,6 +750,8 @@ func (b *Builder) makeImageRef(options CommitOptions, exporting bool) (types.Ima
}
ref := &containerImageRef{
+ fromImageName: b.FromImage,
+ fromImageID: b.FromImageID,
store: b.store,
compression: options.Compression,
name: name,
diff --git a/vendor/github.com/containers/buildah/imagebuildah/build.go b/vendor/github.com/containers/buildah/imagebuildah/build.go
index 7af3fb8d9..062752274 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/build.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/build.go
@@ -11,13 +11,10 @@ import (
"os/exec"
"path/filepath"
"strings"
- "time"
- "github.com/containers/buildah"
+ "github.com/containers/buildah/define"
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/docker/reference"
- "github.com/containers/image/v5/types"
- encconfig "github.com/containers/ocicrypt/config"
"github.com/containers/storage"
"github.com/containers/storage/pkg/archive"
specs "github.com/opencontainers/runtime-spec/specs-go"
@@ -28,10 +25,10 @@ import (
)
const (
- PullIfMissing = buildah.PullIfMissing
- PullAlways = buildah.PullAlways
- PullIfNewer = buildah.PullIfNewer
- PullNever = buildah.PullNever
+ PullIfMissing = define.PullIfMissing
+ PullAlways = define.PullAlways
+ PullIfNewer = define.PullIfNewer
+ PullNever = define.PullNever
Gzip = archive.Gzip
Bzip2 = archive.Bzip2
@@ -43,161 +40,12 @@ const (
// Mount is a mountpoint for the build container.
type Mount specs.Mount
-// BuildOptions can be used to alter how an image is built.
-type BuildOptions struct {
- // ContextDirectory is the default source location for COPY and ADD
- // commands.
- ContextDirectory string
- // PullPolicy controls whether or not we pull images. It should be one
- // of PullIfMissing, PullAlways, PullIfNewer, or PullNever.
- PullPolicy buildah.PullPolicy
- // Registry is a value which is prepended to the image's name, if it
- // needs to be pulled and the image name alone can not be resolved to a
- // reference to a source image. No separator is implicitly added.
- Registry string
- // IgnoreUnrecognizedInstructions tells us to just log instructions we
- // don't recognize, and try to keep going.
- IgnoreUnrecognizedInstructions bool
- // Manifest Name to which the image will be added.
- Manifest string
- // Quiet tells us whether or not to announce steps as we go through them.
- Quiet bool
- // Isolation controls how Run() runs things.
- Isolation buildah.Isolation
- // Runtime is the name of the command to run for RUN instructions when
- // Isolation is either IsolationDefault or IsolationOCI. It should
- // accept the same arguments and flags that runc does.
- Runtime string
- // RuntimeArgs adds global arguments for the runtime.
- RuntimeArgs []string
- // TransientMounts is a list of mounts that won't be kept in the image.
- TransientMounts []string
- // Compression specifies the type of compression which is applied to
- // layer blobs. The default is to not use compression, but
- // archive.Gzip is recommended.
- Compression archive.Compression
- // Arguments which can be interpolated into Dockerfiles
- Args map[string]string
- // Name of the image to write to.
- Output string
- // Additional tags to add to the image that we write, if we know of a
- // way to add them.
- AdditionalTags []string
- // Log is a callback that will print a progress message. If no value
- // is supplied, the message will be sent to Err (or os.Stderr, if Err
- // is nil) by default.
- Log func(format string, args ...interface{})
- // In is connected to stdin for RUN instructions.
- In io.Reader
- // Out is a place where non-error log messages are sent.
- Out io.Writer
- // Err is a place where error log messages should be sent.
- Err io.Writer
- // SignaturePolicyPath specifies an override location for the signature
- // policy which should be used for verifying the new image as it is
- // being written. Except in specific circumstances, no value should be
- // specified, indicating that the shared, system-wide default policy
- // should be used.
- SignaturePolicyPath string
- // ReportWriter is an io.Writer which will be used to report the
- // progress of the (possible) pulling of the source image and the
- // writing of the new image.
- ReportWriter io.Writer
- // OutputFormat is the format of the output image's manifest and
- // configuration data.
- // Accepted values are buildah.OCIv1ImageManifest and buildah.Dockerv2ImageManifest.
- OutputFormat string
- // SystemContext holds parameters used for authentication.
- SystemContext *types.SystemContext
- // NamespaceOptions controls how we set up namespaces processes that we
- // might need when handling RUN instructions.
- NamespaceOptions []buildah.NamespaceOption
- // ConfigureNetwork controls whether or not network interfaces and
- // routing are configured for a new network namespace (i.e., when not
- // joining another's namespace and not just using the host's
- // namespace), effectively deciding whether or not the process has a
- // usable network.
- ConfigureNetwork buildah.NetworkConfigurationPolicy
- // CNIPluginPath is the location of CNI plugin helpers, if they should be
- // run from a location other than the default location.
- CNIPluginPath string
- // CNIConfigDir is the location of CNI configuration files, if the files in
- // the default configuration directory shouldn't be used.
- CNIConfigDir string
- // ID mapping options to use if we're setting up our own user namespace
- // when handling RUN instructions.
- IDMappingOptions *buildah.IDMappingOptions
- // AddCapabilities is a list of capabilities to add to the default set when
- // handling RUN instructions.
- AddCapabilities []string
- // DropCapabilities is a list of capabilities to remove from the default set
- // when handling RUN instructions. If a capability appears in both lists, it
- // will be dropped.
- DropCapabilities []string
- // CommonBuildOpts is *required*.
- CommonBuildOpts *buildah.CommonBuildOptions
- // DefaultMountsFilePath is the file path holding the mounts to be mounted in "host-path:container-path" format
- DefaultMountsFilePath string
- // IIDFile tells the builder to write the image ID to the specified file
- IIDFile string
- // Squash tells the builder to produce an image with a single layer
- // instead of with possibly more than one layer.
- Squash bool
- // Labels metadata for an image
- Labels []string
- // Annotation metadata for an image
- Annotations []string
- // OnBuild commands to be run by images based on this image
- OnBuild []string
- // Layers tells the builder to create a cache of images for each step in the Dockerfile
- Layers bool
- // NoCache tells the builder to build the image from scratch without checking for a cache.
- // It creates a new set of cached images for the build.
- NoCache bool
- // RemoveIntermediateCtrs tells the builder whether to remove intermediate containers used
- // during the build process. Default is true.
- RemoveIntermediateCtrs bool
- // ForceRmIntermediateCtrs tells the builder to remove all intermediate containers even if
- // the build was unsuccessful.
- ForceRmIntermediateCtrs bool
- // BlobDirectory is a directory which we'll use for caching layer blobs.
- BlobDirectory string
- // Target the targeted FROM in the Dockerfile to build.
- Target string
- // Devices are the additional devices to add to the containers.
- Devices []string
- // SignBy is the fingerprint of a GPG key to use for signing images.
- SignBy string
- // Architecture specifies the target architecture of the image to be built.
- Architecture string
- // Timestamp sets the created timestamp to the specified time, allowing
- // for deterministic, content-addressable builds.
- Timestamp *time.Time
- // OS is the specifies the operating system of the image to be built.
- OS string
- // MaxPullPushRetries is the maximum number of attempts we'll make to pull or push any one
- // image from or to an external registry if the first attempt fails.
- MaxPullPushRetries int
- // PullPushRetryDelay is how long to wait before retrying a pull or push attempt.
- PullPushRetryDelay time.Duration
- // OciDecryptConfig contains the config that can be used to decrypt an image if it is
- // encrypted if non-nil. If nil, it does not attempt to decrypt an image.
- OciDecryptConfig *encconfig.DecryptConfig
- // Jobs is the number of stages to run in parallel. If not specified it defaults to 1.
- Jobs *int
- // LogRusage logs resource usage for each step.
- LogRusage bool
- // Excludes is a list of excludes to be used instead of the .dockerignore file.
- Excludes []string
- // From is the image name to use to replace the value specified in the first
- // FROM instruction in the Containerfile
- From string
-}
+type BuildOptions = define.BuildOptions
// BuildDockerfiles parses a set of one or more Dockerfiles (which may be
// URLs), creates a new Executor, and then runs Prepare/Execute/Commit/Delete
// over the entire set of instructions.
-func BuildDockerfiles(ctx context.Context, store storage.Store, options BuildOptions, paths ...string) (string, reference.Canonical, error) {
+func BuildDockerfiles(ctx context.Context, store storage.Store, options define.BuildOptions, paths ...string) (string, reference.Canonical, error) {
if len(paths) == 0 {
return "", nil, errors.Errorf("error building: no dockerfiles specified")
}
@@ -236,12 +84,21 @@ func BuildDockerfiles(ctx context.Context, store storage.Store, options BuildOpt
return "", nil, err
}
+ var contents *os.File
// If given a directory, add '/Dockerfile' to it.
if dinfo.Mode().IsDir() {
- dfile = filepath.Join(dfile, "Dockerfile")
+ for _, file := range []string{"Containerfile", "Dockerfile"} {
+ f := filepath.Join(dfile, file)
+ logrus.Debugf("reading local %q", f)
+ contents, err = os.Open(f)
+ if err == nil {
+ break
+ }
+ }
+ } else {
+ contents, err = os.Open(dfile)
}
- logrus.Debugf("reading local Dockerfile %q", dfile)
- contents, err := os.Open(dfile)
+
if err != nil {
return "", nil, err
}
diff --git a/vendor/github.com/containers/buildah/imagebuildah/executor.go b/vendor/github.com/containers/buildah/imagebuildah/executor.go
index 74ed9a42b..b7b339961 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/executor.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/executor.go
@@ -13,6 +13,7 @@ import (
"time"
"github.com/containers/buildah"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/pkg/parse"
"github.com/containers/buildah/util"
"github.com/containers/common/pkg/config"
@@ -56,7 +57,7 @@ type Executor struct {
stages map[string]*StageExecutor
store storage.Store
contextDir string
- pullPolicy buildah.PullPolicy
+ pullPolicy define.PullPolicy
registry string
ignoreUnrecognizedInstructions bool
quiet bool
@@ -74,13 +75,13 @@ type Executor struct {
signaturePolicyPath string
systemContext *types.SystemContext
reportWriter io.Writer
- isolation buildah.Isolation
- namespaceOptions []buildah.NamespaceOption
- configureNetwork buildah.NetworkConfigurationPolicy
+ isolation define.Isolation
+ namespaceOptions []define.NamespaceOption
+ configureNetwork define.NetworkConfigurationPolicy
cniPluginPath string
cniConfigDir string
- idmappingOptions *buildah.IDMappingOptions
- commonBuildOptions *buildah.CommonBuildOptions
+ idmappingOptions *define.IDMappingOptions
+ commonBuildOptions *define.CommonBuildOptions
defaultMountsFilePath string
iidfile string
squash bool
@@ -98,7 +99,7 @@ type Executor struct {
excludes []string
unusedArgs map[string]struct{}
capabilities []string
- devices buildah.ContainerDevices
+ devices define.ContainerDevices
signBy string
architecture string
timestamp *time.Time
@@ -126,7 +127,7 @@ type imageTypeAndHistoryAndDiffIDs struct {
}
// NewExecutor creates a new instance of the imagebuilder.Executor interface.
-func NewExecutor(store storage.Store, options BuildOptions, mainNode *parser.Node) (*Executor, error) {
+func NewExecutor(store storage.Store, options define.BuildOptions, mainNode *parser.Node) (*Executor, error) {
defaultContainerConfig, err := config.Default()
if err != nil {
return nil, errors.Wrapf(err, "failed to get container config")
@@ -144,7 +145,7 @@ func NewExecutor(store storage.Store, options BuildOptions, mainNode *parser.Nod
return nil, err
}
- devices := buildah.ContainerDevices{}
+ devices := define.ContainerDevices{}
for _, device := range append(defaultContainerConfig.Containers.Devices, options.Devices...) {
dev, err := parse.DeviceFromPath(device)
if err != nil {
@@ -419,7 +420,8 @@ func (b *Executor) buildStage(ctx context.Context, cleanupStages map[int]*StageE
// build and b.forceRmIntermediateCtrs is set, make sure we
// remove the intermediate/build containers, regardless of
// whether or not the stage's build fails.
- if b.forceRmIntermediateCtrs || !b.layers {
+ // Skip cleanup if the stage has no instructions.
+ if b.forceRmIntermediateCtrs || !b.layers && len(stage.Node.Children) > 0 {
b.stagesLock.Lock()
cleanupStages[stage.Position] = stageExecutor
b.stagesLock.Unlock()
@@ -433,7 +435,8 @@ func (b *Executor) buildStage(ctx context.Context, cleanupStages map[int]*StageE
// The stage succeeded, so remove its build container if we're
// told to delete successful intermediate/build containers for
// multi-layered builds.
- if b.removeIntermediateCtrs {
+ // Skip cleanup if the stage has no instructions.
+ if b.removeIntermediateCtrs && len(stage.Node.Children) > 0 {
b.stagesLock.Lock()
cleanupStages[stage.Position] = stageExecutor
b.stagesLock.Unlock()
diff --git a/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go b/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
index 30c5519f3..ff9abdda8 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
@@ -13,6 +13,7 @@ import (
"github.com/containers/buildah"
"github.com/containers/buildah/copier"
+ "github.com/containers/buildah/define"
buildahdocker "github.com/containers/buildah/docker"
"github.com/containers/buildah/pkg/rusage"
"github.com/containers/buildah/util"
@@ -27,6 +28,7 @@ import (
docker "github.com/fsouza/go-dockerclient"
digest "github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
+ "github.com/opencontainers/runtime-spec/specs-go"
"github.com/openshift/imagebuilder"
"github.com/openshift/imagebuilder/dockerfile/parser"
"github.com/pkg/errors"
@@ -184,7 +186,7 @@ func (s *StageExecutor) volumeCacheInvalidate(path string) error {
// Save the contents of each of the executor's list of volumes for which we
// don't already have a cache file.
-func (s *StageExecutor) volumeCacheSave() error {
+func (s *StageExecutor) volumeCacheSaveVFS() error {
for cachedPath, cacheFile := range s.volumeCache {
archivedPath := filepath.Join(s.mountPoint, cachedPath)
_, err := os.Stat(cacheFile)
@@ -218,7 +220,7 @@ func (s *StageExecutor) volumeCacheSave() error {
}
// Restore the contents of each of the executor's list of volumes.
-func (s *StageExecutor) volumeCacheRestore() error {
+func (s *StageExecutor) volumeCacheRestoreVFS() (err error) {
for cachedPath, cacheFile := range s.volumeCache {
archivedPath := filepath.Join(s.mountPoint, cachedPath)
logrus.Debugf("restoring contents of volume %q from %q", archivedPath, cacheFile)
@@ -258,6 +260,45 @@ func (s *StageExecutor) volumeCacheRestore() error {
return nil
}
+// Save the contents of each of the executor's list of volumes for which we
+// don't already have a cache file.
+func (s *StageExecutor) volumeCacheSaveOverlay() (mounts []specs.Mount, err error) {
+ for cachedPath := range s.volumeCache {
+ volumePath := filepath.Join(s.mountPoint, cachedPath)
+ mount := specs.Mount{
+ Source: volumePath,
+ Destination: cachedPath,
+ Options: []string{"O", "private"},
+ }
+ mounts = append(mounts, mount)
+ }
+ return mounts, nil
+}
+
+// Reset the contents of each of the executor's list of volumes.
+func (s *StageExecutor) volumeCacheRestoreOverlay() error {
+ return nil
+}
+
+// Save the contents of each of the executor's list of volumes for which we
+// don't already have a cache file.
+func (s *StageExecutor) volumeCacheSave() (mounts []specs.Mount, err error) {
+ switch s.executor.store.GraphDriverName() {
+ case "overlay":
+ return s.volumeCacheSaveOverlay()
+ }
+ return nil, s.volumeCacheSaveVFS()
+}
+
+// Reset the contents of each of the executor's list of volumes.
+func (s *StageExecutor) volumeCacheRestore() error {
+ switch s.executor.store.GraphDriverName() {
+ case "overlay":
+ return s.volumeCacheRestoreOverlay()
+ }
+ return s.volumeCacheRestoreVFS()
+}
+
// Copy copies data into the working tree. The "Download" field is how
// imagebuilder tells us the instruction was "ADD" and not "COPY".
func (s *StageExecutor) Copy(excludes []string, copies ...imagebuilder.Copy) error {
@@ -275,7 +316,7 @@ func (s *StageExecutor) Copy(excludes []string, copies ...imagebuilder.Copy) err
// The From field says to read the content from another
// container. Update the ID mappings and
// all-content-comes-from-below-this-directory value.
- var idMappingOptions *buildah.IDMappingOptions
+ var idMappingOptions *define.IDMappingOptions
var copyExcludes []string
stripSetuid := false
stripSetgid := false
@@ -321,6 +362,7 @@ func (s *StageExecutor) Copy(excludes []string, copies ...imagebuilder.Copy) err
}
}
options := buildah.AddAndCopyOptions{
+ Chmod: copy.Chmod,
Chown: copy.Chown,
PreserveOwnership: preserveOwnership,
ContextDir: contextDir,
@@ -378,16 +420,18 @@ func (s *StageExecutor) Run(run imagebuilder.Run, config docker.Config) error {
args := run.Args
if run.Shell {
- if len(config.Shell) > 0 && s.builder.Format == buildah.Dockerv2ImageManifest {
+ if len(config.Shell) > 0 && s.builder.Format == define.Dockerv2ImageManifest {
args = append(config.Shell, args...)
} else {
args = append([]string{"/bin/sh", "-c"}, args...)
}
}
- if err := s.volumeCacheSave(); err != nil {
+ mounts, err := s.volumeCacheSave()
+ if err != nil {
return err
}
- err := s.builder.Run(args, options)
+ options.Mounts = append(options.Mounts, mounts...)
+ err = s.builder.Run(args, options)
if err2 := s.volumeCacheRestore(); err2 != nil {
if err == nil {
return err2
@@ -722,15 +766,15 @@ func (s *StageExecutor) Execute(ctx context.Context, base string) (imgID string,
}
// Check if there's a --from if the step command is COPY.
- // Also check the chown flag for validity.
+ // Also check the chmod and the chown flags for validity.
for _, flag := range step.Flags {
command := strings.ToUpper(step.Command)
- // chown and from flags should have an '=' sign, '--chown=' or '--from='
- if command == "COPY" && (flag == "--chown" || flag == "--from") {
- return "", nil, errors.Errorf("COPY only supports the --chown=<uid:gid> and the --from=<image|stage> flags")
+ // chmod, chown and from flags should have an '=' sign, '--chmod=', '--chown=' or '--from='
+ if command == "COPY" && (flag == "--chmod" || flag == "--chown" || flag == "--from") {
+ return "", nil, errors.Errorf("COPY only supports the --chmod=<permissions> --chown=<uid:gid> and the --from=<image|stage> flags")
}
- if command == "ADD" && flag == "--chown" {
- return "", nil, errors.Errorf("ADD only supports the --chown=<uid:gid> flag")
+ if command == "ADD" && (flag == "--chmod" || flag == "--chown") {
+ return "", nil, errors.Errorf("ADD only supports the --chmod=<permissions> and the --chown=<uid:gid> flags")
}
if strings.Contains(flag, "--from") && command == "COPY" {
arr := strings.Split(flag, "=")
@@ -1234,7 +1278,7 @@ func (s *StageExecutor) commit(ctx context.Context, createdBy string, emptyLayer
s.builder.SetHealthcheck(nil)
}
s.builder.ClearLabels()
- s.builder.SetLabel(buildah.BuilderIdentityAnnotation, buildah.Version)
+
for k, v := range config.Labels {
s.builder.SetLabel(k, v)
}
@@ -1246,6 +1290,7 @@ func (s *StageExecutor) commit(ctx context.Context, createdBy string, emptyLayer
s.builder.SetLabel(label[0], "")
}
}
+ s.builder.SetLabel(buildah.BuilderIdentityAnnotation, define.Version)
for _, annotationSpec := range s.executor.annotations {
annotation := strings.SplitN(annotationSpec, "=", 2)
if len(annotation) > 1 {
diff --git a/vendor/github.com/containers/buildah/imagebuildah/util.go b/vendor/github.com/containers/buildah/imagebuildah/util.go
index 50da74b37..7519672bf 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/util.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/util.go
@@ -1,151 +1,10 @@
package imagebuildah
import (
- "bufio"
- "bytes"
- "fmt"
- "io/ioutil"
- "net/http"
- "os"
- "os/exec"
- "path"
- "path/filepath"
- "strings"
-
"github.com/containers/buildah"
- "github.com/containers/storage/pkg/chrootarchive"
- "github.com/containers/storage/pkg/ioutils"
"github.com/opencontainers/runtime-spec/specs-go"
- "github.com/pkg/errors"
- "github.com/sirupsen/logrus"
)
-func cloneToDirectory(url, dir string) error {
- if !strings.HasPrefix(url, "git://") && !strings.HasSuffix(url, ".git") {
- url = "git://" + url
- }
- gitBranch := strings.Split(url, "#")
- var cmd *exec.Cmd
- if len(gitBranch) < 2 {
- logrus.Debugf("cloning %q to %q", url, dir)
- cmd = exec.Command("git", "clone", url, dir)
- } else {
- logrus.Debugf("cloning repo %q and branch %q to %q", gitBranch[0], gitBranch[1], dir)
- cmd = exec.Command("git", "clone", "-b", gitBranch[1], gitBranch[0], dir)
- }
- return cmd.Run()
-}
-
-func downloadToDirectory(url, dir string) error {
- logrus.Debugf("extracting %q to %q", url, dir)
- resp, err := http.Get(url)
- if err != nil {
- return err
- }
- defer resp.Body.Close()
- if resp.ContentLength == 0 {
- return errors.Errorf("no contents in %q", url)
- }
- if err := chrootarchive.Untar(resp.Body, dir, nil); err != nil {
- resp1, err := http.Get(url)
- if err != nil {
- return err
- }
- defer resp1.Body.Close()
- body, err := ioutil.ReadAll(resp1.Body)
- if err != nil {
- return err
- }
- dockerfile := filepath.Join(dir, "Dockerfile")
- // Assume this is a Dockerfile
- if err := ioutils.AtomicWriteFile(dockerfile, body, 0600); err != nil {
- return errors.Wrapf(err, "Failed to write %q to %q", url, dockerfile)
- }
- }
- return nil
-}
-
-func stdinToDirectory(dir string) error {
- logrus.Debugf("extracting stdin to %q", dir)
- r := bufio.NewReader(os.Stdin)
- b, err := ioutil.ReadAll(r)
- if err != nil {
- return errors.Wrapf(err, "Failed to read from stdin")
- }
- reader := bytes.NewReader(b)
- if err := chrootarchive.Untar(reader, dir, nil); err != nil {
- dockerfile := filepath.Join(dir, "Dockerfile")
- // Assume this is a Dockerfile
- if err := ioutils.AtomicWriteFile(dockerfile, b, 0600); err != nil {
- return errors.Wrapf(err, "Failed to write bytes to %q", dockerfile)
- }
- }
- return nil
-}
-
-// TempDirForURL checks if the passed-in string looks like a URL or -. If it is,
-// TempDirForURL creates a temporary directory, arranges for its contents to be
-// the contents of that URL, and returns the temporary directory's path, along
-// with the name of a subdirectory which should be used as the build context
-// (which may be empty or "."). Removal of the temporary directory is the
-// responsibility of the caller. If the string doesn't look like a URL,
-// TempDirForURL returns empty strings and a nil error code.
-func TempDirForURL(dir, prefix, url string) (name string, subdir string, err error) {
- if !strings.HasPrefix(url, "http://") &&
- !strings.HasPrefix(url, "https://") &&
- !strings.HasPrefix(url, "git://") &&
- !strings.HasPrefix(url, "github.com/") &&
- url != "-" {
- return "", "", nil
- }
- name, err = ioutil.TempDir(dir, prefix)
- if err != nil {
- return "", "", errors.Wrapf(err, "error creating temporary directory for %q", url)
- }
- if strings.HasPrefix(url, "git://") || strings.HasSuffix(url, ".git") {
- err = cloneToDirectory(url, name)
- if err != nil {
- if err2 := os.RemoveAll(name); err2 != nil {
- logrus.Debugf("error removing temporary directory %q: %v", name, err2)
- }
- return "", "", err
- }
- return name, "", nil
- }
- if strings.HasPrefix(url, "github.com/") {
- ghurl := url
- url = fmt.Sprintf("https://%s/archive/master.tar.gz", ghurl)
- logrus.Debugf("resolving url %q to %q", ghurl, url)
- subdir = path.Base(ghurl) + "-master"
- }
- if strings.HasPrefix(url, "http://") || strings.HasPrefix(url, "https://") {
- err = downloadToDirectory(url, name)
- if err != nil {
- if err2 := os.RemoveAll(name); err2 != nil {
- logrus.Debugf("error removing temporary directory %q: %v", name, err2)
- }
- return "", subdir, err
- }
- return name, subdir, nil
- }
- if url == "-" {
- err = stdinToDirectory(name)
- if err != nil {
- if err2 := os.RemoveAll(name); err2 != nil {
- logrus.Debugf("error removing temporary directory %q: %v", name, err2)
- }
- return "", subdir, err
- }
- logrus.Debugf("Build context is at %q", name)
- return name, subdir, nil
- }
- logrus.Debugf("don't know how to retrieve %q", url)
- if err2 := os.Remove(name); err2 != nil {
- logrus.Debugf("error removing temporary directory %q: %v", name, err2)
- }
- return "", "", errors.Errorf("unreachable code reached")
-}
-
// InitReexec is a wrapper for buildah.InitReexec(). It should be called at
// the start of main(), and if it returns true, main() should return
// immediately.
diff --git a/vendor/github.com/containers/buildah/import.go b/vendor/github.com/containers/buildah/import.go
index 0aa1d236d..ae6698c20 100644
--- a/vendor/github.com/containers/buildah/import.go
+++ b/vendor/github.com/containers/buildah/import.go
@@ -3,6 +3,7 @@ package buildah
import (
"context"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/docker"
"github.com/containers/buildah/util"
"github.com/containers/image/v5/image"
@@ -93,7 +94,7 @@ func importBuilderDataFromImage(ctx context.Context, store storage.Store, system
ImageAnnotations: map[string]string{},
ImageCreatedBy: "",
NamespaceOptions: defaultNamespaceOptions,
- IDMappingOptions: IDMappingOptions{
+ IDMappingOptions: define.IDMappingOptions{
HostUIDMapping: len(uidmap) == 0,
HostGIDMapping: len(uidmap) == 0,
UIDMap: uidmap,
diff --git a/vendor/github.com/containers/buildah/new.go b/vendor/github.com/containers/buildah/new.go
index 2ee86dd13..f29af1f5d 100644
--- a/vendor/github.com/containers/buildah/new.go
+++ b/vendor/github.com/containers/buildah/new.go
@@ -4,8 +4,10 @@ import (
"context"
"fmt"
"math/rand"
+ "runtime"
"strings"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/util"
"github.com/containers/image/v5/docker"
"github.com/containers/image/v5/image"
@@ -86,7 +88,7 @@ func imageNamePrefix(imageName string) string {
return prefix
}
-func newContainerIDMappingOptions(idmapOptions *IDMappingOptions) storage.IDMappingOptions {
+func newContainerIDMappingOptions(idmapOptions *define.IDMappingOptions) storage.IDMappingOptions {
var options storage.IDMappingOptions
if idmapOptions != nil {
options.HostUIDMapping = idmapOptions.HostUIDMapping
@@ -126,6 +128,34 @@ func resolveLocalImage(systemContext *types.SystemContext, store storage.Store,
return nil, "", "", nil, nil
}
+func imageMatch(ctx context.Context, ref types.ImageReference, systemContext *types.SystemContext) bool {
+ img, err := ref.NewImage(ctx, systemContext)
+ if err != nil {
+ logrus.Warnf("Failed to create newImage in imageMatch: %v", err)
+ return false
+ }
+ defer img.Close()
+ data, err := img.Inspect(ctx)
+ if err != nil {
+ logrus.Warnf("Failed to inspect img %s: %v", ref, err)
+ return false
+ }
+ os := systemContext.OSChoice
+ if os == "" {
+ os = runtime.GOOS
+ }
+ arch := systemContext.ArchitectureChoice
+ if arch == "" {
+ arch = runtime.GOARCH
+ }
+ if os == data.Os && arch == data.Architecture {
+ if systemContext.VariantChoice == "" || systemContext.VariantChoice == data.Variant {
+ return true
+ }
+ }
+ return false
+}
+
func resolveImage(ctx context.Context, systemContext *types.SystemContext, store storage.Store, options BuilderOptions) (types.ImageReference, string, *storage.Image, error) {
if systemContext == nil {
systemContext = &types.SystemContext{}
@@ -157,11 +187,11 @@ func resolveImage(ctx context.Context, systemContext *types.SystemContext, store
return localImageRef, localImageRef.Transport().Name(), localImage, nil
}
- if options.PullPolicy == PullNever || options.PullPolicy == PullIfMissing {
- if localImage != nil {
+ if options.PullPolicy == define.PullNever || options.PullPolicy == define.PullIfMissing {
+ if localImage != nil && imageMatch(ctx, localImageRef, systemContext) {
return localImageRef, localImageRef.Transport().Name(), localImage, nil
}
- if options.PullPolicy == PullNever {
+ if options.PullPolicy == define.PullNever {
return nil, "", nil, errors.Errorf("pull policy is %q but %q could not be found locally", "never", options.FromImage)
}
}
@@ -183,7 +213,7 @@ func resolveImage(ctx context.Context, systemContext *types.SystemContext, store
// localImage`).
if desc := resolved.Description(); len(desc) > 0 {
logrus.Debug(desc)
- if !(options.PullPolicy == PullIfNewer && localImage != nil) {
+ if !(options.PullPolicy == define.PullIfNewer && localImage != nil) {
if options.ReportWriter != nil {
if _, err := options.ReportWriter.Write([]byte(desc + "\n")); err != nil {
return nil, "", nil, err
@@ -206,7 +236,7 @@ func resolveImage(ctx context.Context, systemContext *types.SystemContext, store
// If there's a local image, the `pullCandidate` is considered
// to be newer if its time stamp differs from the local one.
// Otherwise, we don't pull and skip it.
- if options.PullPolicy == PullIfNewer && localImage != nil {
+ if options.PullPolicy == define.PullIfNewer && localImage != nil {
remoteImage, err := ref.NewImage(ctx, systemContext)
if err != nil {
logrus.Debugf("unable to remote-inspect image %q: %v", pullCandidate.Value.String(), err)
@@ -249,7 +279,7 @@ func resolveImage(ctx context.Context, systemContext *types.SystemContext, store
// If we were looking for a newer image but could not find one, return
// the local image if present.
- if options.PullPolicy == PullIfNewer && localImage != nil {
+ if options.PullPolicy == define.PullIfNewer && localImage != nil {
return localImageRef, localImageRef.Transport().Name(), localImage, nil
}
@@ -359,6 +389,7 @@ func newBuilder(ctx context.Context, store storage.Store, options BuilderOptions
coptions := storage.ContainerOptions{
LabelOpts: options.CommonBuildOpts.LabelOpts,
IDMappingOptions: newContainerIDMappingOptions(options.IDMappingOptions),
+ Volatile: true,
}
container, err = store.CreateContainer("", []string{tmpName}, imageID, "", "", &coptions)
if err == nil {
@@ -407,7 +438,7 @@ func newBuilder(ctx context.Context, store storage.Store, options BuilderOptions
ConfigureNetwork: options.ConfigureNetwork,
CNIPluginPath: options.CNIPluginPath,
CNIConfigDir: options.CNIConfigDir,
- IDMappingOptions: IDMappingOptions{
+ IDMappingOptions: define.IDMappingOptions{
HostUIDMapping: len(uidmap) == 0,
HostGIDMapping: len(uidmap) == 0,
UIDMap: uidmap,
diff --git a/vendor/github.com/containers/buildah/pkg/chrootuser/user_linux.go b/vendor/github.com/containers/buildah/pkg/chrootuser/user_linux.go
index ea20fca80..89b31782e 100644
--- a/vendor/github.com/containers/buildah/pkg/chrootuser/user_linux.go
+++ b/vendor/github.com/containers/buildah/pkg/chrootuser/user_linux.go
@@ -15,7 +15,6 @@ import (
"sync"
"github.com/containers/storage/pkg/reexec"
- "github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)
@@ -92,36 +91,13 @@ type lookupGroupEntry struct {
user string
}
-func readWholeLine(rc *bufio.Reader) ([]byte, error) {
- line, isPrefix, err := rc.ReadLine()
- if err != nil {
- return nil, err
- }
- for isPrefix {
- // We didn't get a whole line. Keep reading chunks until we find an end of line, and discard them.
- for isPrefix {
- logrus.Debugf("discarding partial line %q", string(line))
- _, isPrefix, err = rc.ReadLine()
- if err != nil {
- return nil, err
- }
- }
- // That last read was the end of a line, so now we try to read the (beginning of?) the next line.
- line, isPrefix, err = rc.ReadLine()
- if err != nil {
- return nil, err
- }
- }
- return line, nil
-}
-
-func parseNextPasswd(rc *bufio.Reader) *lookupPasswdEntry {
- line, err := readWholeLine(rc)
- if err != nil {
+func parseNextPasswd(rc *bufio.Scanner) *lookupPasswdEntry {
+ if !rc.Scan() {
return nil
}
- fields := strings.Split(string(line), ":")
- if len(fields) < 7 {
+ line := rc.Text()
+ fields := strings.Split(line, ":")
+ if len(fields) != 7 {
return nil
}
uid, err := strconv.ParseUint(fields[2], 10, 32)
@@ -140,13 +116,13 @@ func parseNextPasswd(rc *bufio.Reader) *lookupPasswdEntry {
}
}
-func parseNextGroup(rc *bufio.Reader) *lookupGroupEntry {
- line, err := readWholeLine(rc)
- if err != nil {
+func parseNextGroup(rc *bufio.Scanner) *lookupGroupEntry {
+ if !rc.Scan() {
return nil
}
- fields := strings.Split(string(line), ":")
- if len(fields) < 4 {
+ line := rc.Text()
+ fields := strings.Split(line, ":")
+ if len(fields) != 4 {
return nil
}
gid, err := strconv.ParseUint(fields[2], 10, 32)
@@ -168,7 +144,7 @@ func lookupUserInContainer(rootdir, username string) (uid uint64, gid uint64, er
defer func() {
_ = cmd.Wait()
}()
- rc := bufio.NewReader(f)
+ rc := bufio.NewScanner(f)
defer f.Close()
lookupUser.Lock()
@@ -194,7 +170,7 @@ func lookupGroupForUIDInContainer(rootdir string, userid uint64) (username strin
defer func() {
_ = cmd.Wait()
}()
- rc := bufio.NewReader(f)
+ rc := bufio.NewScanner(f)
defer f.Close()
lookupUser.Lock()
@@ -226,7 +202,7 @@ func lookupAdditionalGroupsForUIDInContainer(rootdir string, userid uint64) (gid
defer func() {
_ = cmd.Wait()
}()
- rc := bufio.NewReader(f)
+ rc := bufio.NewScanner(f)
defer f.Close()
lookupGroup.Lock()
@@ -250,7 +226,7 @@ func lookupGroupInContainer(rootdir, groupname string) (gid uint64, err error) {
defer func() {
_ = cmd.Wait()
}()
- rc := bufio.NewReader(f)
+ rc := bufio.NewScanner(f)
defer f.Close()
lookupGroup.Lock()
@@ -276,7 +252,7 @@ func lookupUIDInContainer(rootdir string, uid uint64) (string, uint64, error) {
defer func() {
_ = cmd.Wait()
}()
- rc := bufio.NewReader(f)
+ rc := bufio.NewScanner(f)
defer f.Close()
lookupUser.Lock()
@@ -302,7 +278,7 @@ func lookupHomedirInContainer(rootdir string, uid uint64) (string, error) {
defer func() {
_ = cmd.Wait()
}()
- rc := bufio.NewReader(f)
+ rc := bufio.NewScanner(f)
defer f.Close()
lookupUser.Lock()
diff --git a/vendor/github.com/containers/buildah/pkg/cli/common.go b/vendor/github.com/containers/buildah/pkg/cli/common.go
index 59cb0e5a5..9c3c8cfe0 100644
--- a/vendor/github.com/containers/buildah/pkg/cli/common.go
+++ b/vendor/github.com/containers/buildah/pkg/cli/common.go
@@ -10,11 +10,9 @@ import (
"runtime"
"strings"
- "github.com/containers/buildah"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/pkg/completion"
"github.com/containers/buildah/pkg/parse"
- "github.com/containers/buildah/util"
- "github.com/containers/common/pkg/auth"
commonComp "github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/config"
"github.com/containers/storage/pkg/unshare"
@@ -143,8 +141,8 @@ func GetNameSpaceFlags(flags *NameSpaceResults) pflag.FlagSet {
fs := pflag.FlagSet{}
fs.StringVar(&flags.IPC, string(specs.IPCNamespace), "", "'private', `path` of IPC namespace to join, or 'host'")
fs.StringVar(&flags.Network, string(specs.NetworkNamespace), "", "'private', 'none', 'ns:path' of network namespace to join, or 'host'")
- fs.StringVar(&flags.CNIConfigDir, "cni-config-dir", util.DefaultCNIConfigDir, "`directory` of CNI configuration files")
- fs.StringVar(&flags.CNIPlugInPath, "cni-plugin-path", util.DefaultCNIPluginPath, "`path` of CNI network plugins")
+ fs.StringVar(&flags.CNIConfigDir, "cni-config-dir", define.DefaultCNIConfigDir, "`directory` of CNI configuration files")
+ fs.StringVar(&flags.CNIPlugInPath, "cni-plugin-path", define.DefaultCNIPluginPath, "`path` of CNI network plugins")
fs.StringVar(&flags.PID, string(specs.PIDNamespace), "", "private, `path` of PID namespace to join, or 'host'")
fs.StringVar(&flags.UTS, string(specs.UTSNamespace), "", "private, :`path` of UTS namespace to join, or 'host'")
return fs
@@ -177,7 +175,7 @@ func GetBudFlags(flags *BudResults) pflag.FlagSet {
fs := pflag.FlagSet{}
fs.String("arch", runtime.GOARCH, "set the ARCH of the image to the provided value instead of the architecture of the host")
fs.StringArrayVar(&flags.Annotation, "annotation", []string{}, "Set metadata for an image (default [])")
- fs.StringVar(&flags.Authfile, "authfile", auth.GetDefaultAuthFile(), "path of the authentication file.")
+ fs.StringVar(&flags.Authfile, "authfile", "", "path of the authentication file.")
fs.StringArrayVar(&flags.BuildArg, "build-arg", []string{}, "`argument=value` to supply to the builder")
fs.StringVar(&flags.CacheFrom, "cache-from", "", "Images to utilise as potential cache sources. The build process does not currently support caching so this is a NOOP.")
fs.StringVar(&flags.CertDir, "cert-dir", "", "use certificates at the specified path to access the registry")
@@ -361,7 +359,7 @@ func DefaultFormat() string {
if format != "" {
return format
}
- return buildah.OCI
+ return define.OCI
}
// DefaultIsolation returns the default image format
@@ -373,7 +371,7 @@ func DefaultIsolation() string {
if unshare.IsRootless() {
return "rootless"
}
- return buildah.OCI
+ return define.OCI
}
// DefaultHistory returns the default add-history setting
diff --git a/vendor/github.com/containers/buildah/pkg/parse/parse.go b/vendor/github.com/containers/buildah/pkg/parse/parse.go
index b5e30b0d3..9497ca4b6 100644
--- a/vendor/github.com/containers/buildah/pkg/parse/parse.go
+++ b/vendor/github.com/containers/buildah/pkg/parse/parse.go
@@ -14,7 +14,7 @@ import (
"strings"
"unicode"
- "github.com/containers/buildah"
+ "github.com/containers/buildah/define"
"github.com/containers/image/v5/types"
"github.com/containers/storage/pkg/idtools"
"github.com/containers/storage/pkg/unshare"
@@ -45,7 +45,7 @@ var (
)
// CommonBuildOptions parses the build options from the bud cli
-func CommonBuildOptions(c *cobra.Command) (*buildah.CommonBuildOptions, error) {
+func CommonBuildOptions(c *cobra.Command) (*define.CommonBuildOptions, error) {
var (
memoryLimit int64
memorySwap int64
@@ -125,7 +125,7 @@ func CommonBuildOptions(c *cobra.Command) (*buildah.CommonBuildOptions, error) {
ulimit, _ = c.Flags().GetStringSlice("ulimit")
}
- commonOpts := &buildah.CommonBuildOptions{
+ commonOpts := &define.CommonBuildOptions{
AddHost: addHost,
CPUPeriod: cpuPeriod,
CPUQuota: cpuQuota,
@@ -150,7 +150,7 @@ func CommonBuildOptions(c *cobra.Command) (*buildah.CommonBuildOptions, error) {
return commonOpts, nil
}
-func parseSecurityOpts(securityOpts []string, commonOpts *buildah.CommonBuildOptions) error {
+func parseSecurityOpts(securityOpts []string, commonOpts *define.CommonBuildOptions) error {
for _, opt := range securityOpts {
if opt == "no-new-privileges" {
return errors.Errorf("no-new-privileges is not supported")
@@ -611,7 +611,7 @@ func SystemContextFromOptions(c *cobra.Command) (*types.SystemContext, error) {
if err == nil && c.Flag("registries-conf-dir").Changed {
ctx.RegistriesDirPath = regConfDir
}
- ctx.DockerRegistryUserAgent = fmt.Sprintf("Buildah/%s", buildah.Version)
+ ctx.DockerRegistryUserAgent = fmt.Sprintf("Buildah/%s", define.Version)
if c.Flag("os") != nil && c.Flag("os").Changed {
if os, err := c.Flags().GetString("os"); err == nil {
ctx.OSChoice = os
@@ -740,7 +740,7 @@ func getDockerAuth(creds string) (*types.DockerAuthConfig, error) {
}
// IDMappingOptions parses the build options related to user namespaces and ID mapping.
-func IDMappingOptions(c *cobra.Command, isolation buildah.Isolation) (usernsOptions buildah.NamespaceOptions, idmapOptions *buildah.IDMappingOptions, err error) {
+func IDMappingOptions(c *cobra.Command, isolation define.Isolation) (usernsOptions define.NamespaceOptions, idmapOptions *define.IDMappingOptions, err error) {
user := c.Flag("userns-uid-map-user").Value.String()
group := c.Flag("userns-gid-map-group").Value.String()
// If only the user or group was specified, use the same value for the
@@ -815,7 +815,7 @@ func IDMappingOptions(c *cobra.Command, isolation buildah.Isolation) (usernsOpti
// By default, having mappings configured means we use a user
// namespace. Otherwise, we don't.
- usernsOption := buildah.NamespaceOption{
+ usernsOption := define.NamespaceOption{
Name: string(specs.UserNamespace),
Host: len(uidmap) == 0 && len(gidmap) == 0,
}
@@ -837,11 +837,11 @@ func IDMappingOptions(c *cobra.Command, isolation buildah.Isolation) (usernsOpti
usernsOption.Path = how
}
}
- usernsOptions = buildah.NamespaceOptions{usernsOption}
+ usernsOptions = define.NamespaceOptions{usernsOption}
usernetwork := c.Flags().Lookup("network")
if usernetwork != nil && !usernetwork.Changed {
- usernsOptions = append(usernsOptions, buildah.NamespaceOption{
+ usernsOptions = append(usernsOptions, define.NamespaceOption{
Name: string(specs.NetworkNamespace),
Host: usernsOption.Host,
})
@@ -851,7 +851,7 @@ func IDMappingOptions(c *cobra.Command, isolation buildah.Isolation) (usernsOpti
if (len(uidmap) != 0 || len(gidmap) != 0) && usernsOption.Host {
return nil, nil, errors.Errorf("can not specify ID mappings while using host's user namespace")
}
- return usernsOptions, &buildah.IDMappingOptions{
+ return usernsOptions, &define.IDMappingOptions{
HostUIDMapping: usernsOption.Host,
HostGIDMapping: usernsOption.Host,
UIDMap: uidmap,
@@ -886,9 +886,9 @@ func parseIDMap(spec []string) (m [][3]uint32, err error) {
}
// NamespaceOptions parses the build options for all namespaces except for user namespace.
-func NamespaceOptions(c *cobra.Command) (namespaceOptions buildah.NamespaceOptions, networkPolicy buildah.NetworkConfigurationPolicy, err error) {
- options := make(buildah.NamespaceOptions, 0, 7)
- policy := buildah.NetworkDefault
+func NamespaceOptions(c *cobra.Command) (namespaceOptions define.NamespaceOptions, networkPolicy define.NetworkConfigurationPolicy, err error) {
+ options := make(define.NamespaceOptions, 0, 7)
+ policy := define.NetworkDefault
for _, what := range []string{string(specs.IPCNamespace), "network", string(specs.PIDNamespace), string(specs.UTSNamespace)} {
if c.Flags().Lookup(what) != nil && c.Flag(what).Changed {
how := c.Flag(what).Value.String()
@@ -899,33 +899,33 @@ func NamespaceOptions(c *cobra.Command) (namespaceOptions buildah.NamespaceOptio
switch how {
case "", "container", "private":
logrus.Debugf("setting %q namespace to %q", what, "")
- options.AddOrReplace(buildah.NamespaceOption{
+ options.AddOrReplace(define.NamespaceOption{
Name: what,
})
case "host":
logrus.Debugf("setting %q namespace to host", what)
- options.AddOrReplace(buildah.NamespaceOption{
+ options.AddOrReplace(define.NamespaceOption{
Name: what,
Host: true,
})
default:
if what == string(specs.NetworkNamespace) {
if how == "none" {
- options.AddOrReplace(buildah.NamespaceOption{
+ options.AddOrReplace(define.NamespaceOption{
Name: what,
})
- policy = buildah.NetworkDisabled
+ policy = define.NetworkDisabled
logrus.Debugf("setting network to disabled")
break
}
}
how = strings.TrimPrefix(how, "ns:")
if _, err := os.Stat(how); err != nil {
- return nil, buildah.NetworkDefault, errors.Wrapf(err, "error checking for %s namespace", what)
+ return nil, define.NetworkDefault, errors.Wrapf(err, "error checking for %s namespace", what)
}
- policy = buildah.NetworkEnabled
+ policy = define.NetworkEnabled
logrus.Debugf("setting %q namespace to %q", what, how)
- options.AddOrReplace(buildah.NamespaceOption{
+ options.AddOrReplace(define.NamespaceOption{
Name: what,
Path: how,
})
@@ -935,36 +935,36 @@ func NamespaceOptions(c *cobra.Command) (namespaceOptions buildah.NamespaceOptio
return options, policy, nil
}
-func defaultIsolation() (buildah.Isolation, error) {
+func defaultIsolation() (define.Isolation, error) {
isolation, isSet := os.LookupEnv("BUILDAH_ISOLATION")
if isSet {
switch strings.ToLower(isolation) {
case "oci":
- return buildah.IsolationOCI, nil
+ return define.IsolationOCI, nil
case "rootless":
- return buildah.IsolationOCIRootless, nil
+ return define.IsolationOCIRootless, nil
case "chroot":
- return buildah.IsolationChroot, nil
+ return define.IsolationChroot, nil
default:
return 0, errors.Errorf("unrecognized $BUILDAH_ISOLATION value %q", isolation)
}
}
if unshare.IsRootless() {
- return buildah.IsolationOCIRootless, nil
+ return define.IsolationOCIRootless, nil
}
- return buildah.IsolationDefault, nil
+ return define.IsolationDefault, nil
}
// IsolationOption parses the --isolation flag.
-func IsolationOption(isolation string) (buildah.Isolation, error) {
+func IsolationOption(isolation string) (define.Isolation, error) {
if isolation != "" {
switch strings.ToLower(isolation) {
- case "oci":
- return buildah.IsolationOCI, nil
+ case "oci", "default":
+ return define.IsolationOCI, nil
case "rootless":
- return buildah.IsolationOCIRootless, nil
+ return define.IsolationOCIRootless, nil
case "chroot":
- return buildah.IsolationChroot, nil
+ return define.IsolationChroot, nil
default:
return 0, errors.Errorf("unrecognized isolation type %q", isolation)
}
diff --git a/vendor/github.com/containers/buildah/pkg/parse/parse_unix.go b/vendor/github.com/containers/buildah/pkg/parse/parse_unix.go
index 880fbf674..6b0704a06 100644
--- a/vendor/github.com/containers/buildah/pkg/parse/parse_unix.go
+++ b/vendor/github.com/containers/buildah/pkg/parse/parse_unix.go
@@ -6,14 +6,14 @@ import (
"os"
"path/filepath"
+ "github.com/containers/buildah/define"
"github.com/containers/storage/pkg/unshare"
- "github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/devices"
"github.com/pkg/errors"
)
-func DeviceFromPath(device string) ([]configs.Device, error) {
- var devs []configs.Device
+func DeviceFromPath(device string) (define.ContainerDevices, error) {
+ var devs define.ContainerDevices
src, dst, permissions, err := Device(device)
if err != nil {
return nil, err
@@ -44,7 +44,7 @@ func DeviceFromPath(device string) ([]configs.Device, error) {
}
for _, d := range srcDevices {
d.Path = filepath.Join(dst, filepath.Base(d.Path))
- d.Permissions = configs.DevicePermissions(permissions)
+ d.Permissions = devices.Permissions(permissions)
devs = append(devs, *d)
}
return devs, nil
diff --git a/vendor/github.com/containers/buildah/pkg/parse/parse_unsupported.go b/vendor/github.com/containers/buildah/pkg/parse/parse_unsupported.go
index 5e56c1a48..c48b24884 100644
--- a/vendor/github.com/containers/buildah/pkg/parse/parse_unsupported.go
+++ b/vendor/github.com/containers/buildah/pkg/parse/parse_unsupported.go
@@ -3,7 +3,7 @@
package parse
import (
- "github.com/containers/buildah"
+ "github.com/containers/buildah/define"
"github.com/pkg/errors"
)
@@ -11,6 +11,6 @@ func getDefaultProcessLimits() []string {
return []string{}
}
-func DeviceFromPath(device string) (buildah.ContainerDevices, error) {
- return buildah.ContainerDevices{}, errors.Errorf("devices not supported")
+func DeviceFromPath(device string) (define.ContainerDevices, error) {
+ return nil, errors.Errorf("devices not supported")
}
diff --git a/vendor/github.com/containers/buildah/pull.go b/vendor/github.com/containers/buildah/pull.go
index d75011296..04eac5821 100644
--- a/vendor/github.com/containers/buildah/pull.go
+++ b/vendor/github.com/containers/buildah/pull.go
@@ -6,6 +6,7 @@ import (
"strings"
"time"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/pkg/blobcache"
"github.com/containers/image/v5/directory"
"github.com/containers/image/v5/docker"
@@ -61,7 +62,7 @@ type PullOptions struct {
// encrypted if non-nil. If nil, it does not attempt to decrypt an image.
OciDecryptConfig *encconfig.DecryptConfig
// PullPolicy takes the value PullIfMissing, PullAlways, PullIfNewer, or PullNever.
- PullPolicy PullPolicy
+ PullPolicy define.PullPolicy
}
func localImageNameForReference(ctx context.Context, store storage.Store, srcRef types.ImageReference) (string, error) {
diff --git a/vendor/github.com/containers/buildah/release.sh b/vendor/github.com/containers/buildah/release.sh
index 5c09941ba..ef1c248c7 100644
--- a/vendor/github.com/containers/buildah/release.sh
+++ b/vendor/github.com/containers/buildah/release.sh
@@ -18,7 +18,7 @@ LAST_TAG=$(git describe --tags --abbrev=0)
write_go_version()
{
LOCAL_VERSION="$1"
- sed -i "s/^\(.*Version = \"\).*/\1${LOCAL_VERSION}\"/" buildah.go
+ sed -i "s/^\(.*Version = \"\).*/\1${LOCAL_VERSION}\"/" define/types.go
}
write_spec_version()
@@ -27,6 +27,22 @@ write_spec_version()
sed -i "s/^\(Version: *\).*/\1${LOCAL_VERSION}/" contrib/rpm/buildah.spec
}
+write_spec_changelog()
+{
+ sed '/\*.*-dev-1/d' -i ./contrib/rpm/buildah.spec
+ VERSION=$1
+ date=$(date "+%a %b %d, %Y")
+ name=$(getent passwd $USERNAME | cut -d ':' -f 5)
+ echo "* ${date} ${name} <${USER}@redhat.com> ${VERSION}-1" >.changelog.txt
+ if [[ "${VERSION}" != *-dev ]]; then
+ git log --no-merges --format='- %s' "${LAST_TAG}..HEAD" >>.changelog.txt
+ else
+ echo "" >>.changelog.txt
+ fi
+ sed '/^%changelog.*/r .changelog.txt' -i ./contrib/rpm/buildah.spec
+ rm -f .changelog.txt
+}
+
write_makefile_epoch()
{
LOCAL_EPOCH="$1"
@@ -46,6 +62,7 @@ release_commit()
{
write_go_version "${VERSION}" &&
write_spec_version "${VERSION}" &&
+ write_spec_changelog "${VERSION}" &&
write_changelog &&
git commit -asm "Bump to v${VERSION}"
}
@@ -53,7 +70,8 @@ release_commit()
dev_version_commit()
{
write_go_version "${NEXT_VERSION}-dev" &&
- write_spec_version "${NEXT_VERSION}" &&
+ write_spec_version "${NEXT_VERSION}-dev" &&
+ write_spec_changelog "${NEXT_VERSION}-dev" &&
git commit -asm "Bump to v${NEXT_VERSION}-dev"
}
diff --git a/vendor/github.com/containers/buildah/run.go b/vendor/github.com/containers/buildah/run.go
index d1fee2360..876850403 100644
--- a/vendor/github.com/containers/buildah/run.go
+++ b/vendor/github.com/containers/buildah/run.go
@@ -4,12 +4,13 @@ import (
"fmt"
"io"
+ "github.com/containers/buildah/define"
"github.com/opencontainers/runtime-spec/specs-go"
)
const (
// runUsingRuntimeCommand is a command we use as a key for reexec
- runUsingRuntimeCommand = Package + "-oci-runtime"
+ runUsingRuntimeCommand = define.Package + "-oci-runtime"
)
// TerminalPolicy takes the value DefaultTerminal, WithoutTerminal, or WithTerminal.
@@ -41,74 +42,38 @@ func (t TerminalPolicy) String() string {
}
// NamespaceOption controls how we set up a namespace when launching processes.
-type NamespaceOption struct {
- // Name specifies the type of namespace, typically matching one of the
- // ...Namespace constants defined in
- // github.com/opencontainers/runtime-spec/specs-go.
- Name string
- // Host is used to force our processes to use the host's namespace of
- // this type.
- Host bool
- // Path is the path of the namespace to attach our process to, if Host
- // is not set. If Host is not set and Path is also empty, a new
- // namespace will be created for the process that we're starting.
- // If Name is specs.NetworkNamespace, if Path doesn't look like an
- // absolute path, it is treated as a comma-separated list of CNI
- // configuration names which will be selected from among all of the CNI
- // network configurations which we find.
- Path string
-}
+type NamespaceOption = define.NamespaceOption
// NamespaceOptions provides some helper methods for a slice of NamespaceOption
// structs.
-type NamespaceOptions []NamespaceOption
+type NamespaceOptions = define.NamespaceOptions
// IDMappingOptions controls how we set up UID/GID mapping when we set up a
// user namespace.
-type IDMappingOptions struct {
- HostUIDMapping bool
- HostGIDMapping bool
- UIDMap []specs.LinuxIDMapping
- GIDMap []specs.LinuxIDMapping
-}
+type IDMappingOptions = define.IDMappingOptions
// Isolation provides a way to specify whether we're supposed to use a proper
// OCI runtime, or some other method for running commands.
-type Isolation int
+type Isolation = define.Isolation
const (
// IsolationDefault is whatever we think will work best.
- IsolationDefault Isolation = iota
+ IsolationDefault = define.IsolationDefault
// IsolationOCI is a proper OCI runtime.
- IsolationOCI
+ IsolationOCI = define.IsolationOCI
// IsolationChroot is a more chroot-like environment: less isolation,
// but with fewer requirements.
- IsolationChroot
+ IsolationChroot = define.IsolationChroot
// IsolationOCIRootless is a proper OCI runtime in rootless mode.
- IsolationOCIRootless
+ IsolationOCIRootless = define.IsolationOCIRootless
)
-// String converts a Isolation into a string.
-func (i Isolation) String() string {
- switch i {
- case IsolationDefault:
- return "IsolationDefault"
- case IsolationOCI:
- return "IsolationOCI"
- case IsolationChroot:
- return "IsolationChroot"
- case IsolationOCIRootless:
- return "IsolationOCIRootless"
- }
- return fmt.Sprintf("unrecognized isolation type %d", i)
-}
-
// RunOptions can be used to alter how a command is run in the container.
type RunOptions struct {
// Hostname is the hostname we set for the running container.
Hostname string
// Isolation is either IsolationDefault, IsolationOCI, IsolationChroot, or IsolationOCIRootless.
- Isolation Isolation
+ Isolation define.Isolation
// Runtime is the name of the runtime to run. It should accept the
// same arguments that runc does, and produce similar output.
Runtime string
@@ -131,13 +96,13 @@ type RunOptions struct {
// Entrypoint is an override for the configured entry point.
Entrypoint []string
// NamespaceOptions controls how we set up the namespaces for the process.
- NamespaceOptions NamespaceOptions
+ NamespaceOptions define.NamespaceOptions
// ConfigureNetwork controls whether or not network interfaces and
// routing are configured for a new network namespace (i.e., when not
// joining another's namespace and not just using the host's
// namespace), effectively deciding whether or not the process has a
// usable network.
- ConfigureNetwork NetworkConfigurationPolicy
+ ConfigureNetwork define.NetworkConfigurationPolicy
// CNIPluginPath is the location of CNI plugin helpers, if they should be
// run from a location other than the default location.
CNIPluginPath string
@@ -168,33 +133,5 @@ type RunOptions struct {
// lists, it will be dropped.
DropCapabilities []string
// Devices are the additional devices to add to the containers
- Devices ContainerDevices
-}
-
-// Find the configuration for the namespace of the given type. If there are
-// duplicates, find the _last_ one of the type, since we assume it was appended
-// more recently.
-func (n *NamespaceOptions) Find(namespace string) *NamespaceOption {
- for i := range *n {
- j := len(*n) - 1 - i
- if (*n)[j].Name == namespace {
- return &((*n)[j])
- }
- }
- return nil
-}
-
-// AddOrReplace either adds or replaces the configuration for a given namespace.
-func (n *NamespaceOptions) AddOrReplace(options ...NamespaceOption) {
-nextOption:
- for _, option := range options {
- for i := range *n {
- j := len(*n) - 1 - i
- if (*n)[j].Name == option.Name {
- (*n)[j] = option
- continue nextOption
- }
- }
- *n = append(*n, option)
- }
+ Devices define.ContainerDevices
}
diff --git a/vendor/github.com/containers/buildah/run_linux.go b/vendor/github.com/containers/buildah/run_linux.go
index 8c7c1bbc0..ffbb36b7b 100644
--- a/vendor/github.com/containers/buildah/run_linux.go
+++ b/vendor/github.com/containers/buildah/run_linux.go
@@ -24,9 +24,11 @@ import (
"github.com/containers/buildah/bind"
"github.com/containers/buildah/chroot"
"github.com/containers/buildah/copier"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/pkg/overlay"
"github.com/containers/buildah/util"
"github.com/containers/common/pkg/capabilities"
+ "github.com/containers/common/pkg/chown"
"github.com/containers/common/pkg/config"
"github.com/containers/common/pkg/subscriptions"
"github.com/containers/storage/pkg/idtools"
@@ -38,7 +40,6 @@ import (
"github.com/docker/libnetwork/resolvconf"
"github.com/docker/libnetwork/types"
"github.com/opencontainers/go-digest"
- "github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runtime-spec/specs-go"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
@@ -50,7 +51,7 @@ import (
)
// ContainerDevices is an alias for a slice of github.com/opencontainers/runc/libcontainer/configs.Device structures.
-type ContainerDevices = []configs.Device
+type ContainerDevices define.ContainerDevices
func setChildProcess() error {
if err := unix.Prctl(unix.PR_SET_CHILD_SUBREAPER, uintptr(1), 0, 0, 0); err != nil {
@@ -62,7 +63,7 @@ func setChildProcess() error {
// Run runs the specified command in the container's root filesystem.
func (b *Builder) Run(command []string, options RunOptions) error {
- p, err := ioutil.TempDir("", Package)
+ p, err := ioutil.TempDir("", define.Package)
if err != nil {
return err
}
@@ -86,10 +87,10 @@ func (b *Builder) Run(command []string, options RunOptions) error {
g := &gp
isolation := options.Isolation
- if isolation == IsolationDefault {
+ if isolation == define.IsolationDefault {
isolation = b.Isolation
- if isolation == IsolationDefault {
- isolation = IsolationOCI
+ if isolation == define.IsolationDefault {
+ isolation = define.IsolationOCI
}
}
if err := checkAndOverrideIsolationOptions(isolation, &options); err != nil {
@@ -199,7 +200,7 @@ func (b *Builder) Run(command []string, options RunOptions) error {
return err
}
// Only bind /etc/hosts if there's a network
- if options.ConfigureNetwork != NetworkDisabled {
+ if options.ConfigureNetwork != define.NetworkDisabled {
bindFiles["/etc/hosts"] = hostFile
}
}
@@ -210,7 +211,7 @@ func (b *Builder) Run(command []string, options RunOptions) error {
return err
}
// Only bind /etc/resolv.conf if there's a network
- if options.ConfigureNetwork != NetworkDisabled {
+ if options.ConfigureNetwork != define.NetworkDisabled {
bindFiles["/etc/resolv.conf"] = resolvFile
}
}
@@ -233,7 +234,7 @@ id=%q
image=%q
imageid=%q
rootless=%d
-`, Version, b.Container, b.ContainerID, b.FromImage, b.FromImageID, rootless)
+`, define.Version, b.Container, b.ContainerID, b.FromImage, b.FromImageID, rootless)
if err = ioutils.AtomicWriteFile(containerenvPath, []byte(containerenv), 0755); err != nil {
return err
@@ -254,25 +255,25 @@ rootless=%d
if options.CNIConfigDir == "" {
options.CNIConfigDir = b.CNIConfigDir
if b.CNIConfigDir == "" {
- options.CNIConfigDir = util.DefaultCNIConfigDir
+ options.CNIConfigDir = define.DefaultCNIConfigDir
}
}
if options.CNIPluginPath == "" {
options.CNIPluginPath = b.CNIPluginPath
if b.CNIPluginPath == "" {
- options.CNIPluginPath = util.DefaultCNIPluginPath
+ options.CNIPluginPath = define.DefaultCNIPluginPath
}
}
switch isolation {
- case IsolationOCI:
+ case define.IsolationOCI:
var moreCreateArgs []string
if options.NoPivot {
moreCreateArgs = []string{"--no-pivot"}
} else {
moreCreateArgs = nil
}
- err = b.runUsingRuntimeSubproc(isolation, options, configureNetwork, configureNetworks, moreCreateArgs, spec, mountPoint, path, Package+"-"+filepath.Base(path))
+ err = b.runUsingRuntimeSubproc(isolation, options, configureNetwork, configureNetworks, moreCreateArgs, spec, mountPoint, path, define.Package+"-"+filepath.Base(path))
case IsolationChroot:
err = chroot.RunUsingChroot(spec, path, homeDir, options.Stdin, options.Stdout, options.Stderr)
case IsolationOCIRootless:
@@ -283,14 +284,14 @@ rootless=%d
if err := setupRootlessSpecChanges(spec, path, b.CommonBuildOpts.ShmSize); err != nil {
return err
}
- err = b.runUsingRuntimeSubproc(isolation, options, configureNetwork, configureNetworks, moreCreateArgs, spec, mountPoint, path, Package+"-"+filepath.Base(path))
+ err = b.runUsingRuntimeSubproc(isolation, options, configureNetwork, configureNetworks, moreCreateArgs, spec, mountPoint, path, define.Package+"-"+filepath.Base(path))
default:
err = errors.Errorf("don't know how to run this command")
}
return err
}
-func addCommonOptsToSpec(commonOpts *CommonBuildOptions, g *generate.Generator) error {
+func addCommonOptsToSpec(commonOpts *define.CommonBuildOptions, g *generate.Generator) error {
// Resources - CPU
if commonOpts.CPUPeriod != 0 {
g.SetLinuxResourcesCPUPeriod(commonOpts.CPUPeriod)
@@ -392,7 +393,7 @@ func runSetupBuiltinVolumes(mountLabel, mountPoint, containerDir string, builtin
return mounts, nil
}
-func (b *Builder) setupMounts(mountPoint string, spec *specs.Spec, bundlePath string, optionMounts []specs.Mount, bindFiles map[string]string, builtinVolumes, volumeMounts []string, shmSize string, namespaceOptions NamespaceOptions) error {
+func (b *Builder) setupMounts(mountPoint string, spec *specs.Spec, bundlePath string, optionMounts []specs.Mount, bindFiles map[string]string, builtinVolumes, volumeMounts []string, shmSize string, namespaceOptions define.NamespaceOptions) error {
// Start building a new list of mounts.
var mounts []specs.Mount
haveMount := func(destination string) bool {
@@ -534,7 +535,7 @@ func (b *Builder) setupMounts(mountPoint string, spec *specs.Spec, bundlePath st
}
// addNetworkConfig copies files from host and sets them up to bind mount into container
-func (b *Builder) addNetworkConfig(rdir, hostPath string, chownOpts *idtools.IDPair, dnsServers, dnsSearch, dnsOptions []string, namespaceOptions NamespaceOptions) (string, error) {
+func (b *Builder) addNetworkConfig(rdir, hostPath string, chownOpts *idtools.IDPair, dnsServers, dnsSearch, dnsOptions []string, namespaceOptions define.NamespaceOptions) (string, error) {
stat, err := os.Stat(hostPath)
if err != nil {
return "", err
@@ -677,7 +678,7 @@ func setupTerminal(g *generate.Generator, terminalPolicy TerminalPolicy, termina
}
}
-func runUsingRuntime(isolation Isolation, options RunOptions, configureNetwork bool, configureNetworks, moreCreateArgs []string, spec *specs.Spec, bundlePath, containerName string) (wstatus unix.WaitStatus, err error) {
+func runUsingRuntime(isolation define.Isolation, options RunOptions, configureNetwork bool, configureNetworks, moreCreateArgs []string, spec *specs.Spec, bundlePath, containerName string) (wstatus unix.WaitStatus, err error) {
// Lock the caller to a single OS-level thread.
runtime.LockOSThread()
@@ -1039,7 +1040,7 @@ func setupRootlessNetwork(pid int) (teardown func(), err error) {
}, nil
}
-func runConfigureNetwork(isolation Isolation, options RunOptions, configureNetworks []string, pid int, containerName string, command []string) (teardown func(), err error) {
+func runConfigureNetwork(isolation define.Isolation, options RunOptions, configureNetworks []string, pid int, containerName string, command []string) (teardown func(), err error) {
var netconf, undo []*libcni.NetworkConfigList
if isolation == IsolationOCIRootless {
@@ -1503,7 +1504,7 @@ func runUsingRuntimeMain() {
os.Exit(1)
}
-func setupNamespaces(g *generate.Generator, namespaceOptions NamespaceOptions, idmapOptions IDMappingOptions, policy NetworkConfigurationPolicy) (configureNetwork bool, configureNetworks []string, configureUTS bool, err error) {
+func setupNamespaces(g *generate.Generator, namespaceOptions define.NamespaceOptions, idmapOptions define.IDMappingOptions, policy define.NetworkConfigurationPolicy) (configureNetwork bool, configureNetworks []string, configureUTS bool, err error) {
// Set namespace options in the container configuration.
configureUserns := false
specifiedNetwork := false
@@ -1522,7 +1523,7 @@ func setupNamespaces(g *generate.Generator, namespaceOptions NamespaceOptions, i
configureNetworks = strings.Split(namespaceOption.Path, ",")
namespaceOption.Path = ""
}
- configureNetwork = (policy != NetworkDisabled)
+ configureNetwork = (policy != define.NetworkDisabled)
}
case string(specs.UTSNamespace):
configureUTS = false
@@ -1571,7 +1572,7 @@ func setupNamespaces(g *generate.Generator, namespaceOptions NamespaceOptions, i
if err := g.AddOrReplaceLinuxNamespace(string(specs.NetworkNamespace), ""); err != nil {
return false, nil, false, errors.Wrapf(err, "error adding new %q namespace for run", string(specs.NetworkNamespace))
}
- configureNetwork = (policy != NetworkDisabled)
+ configureNetwork = (policy != define.NetworkDisabled)
}
} else {
if err := g.RemoveLinuxNamespace(string(specs.UserNamespace)); err != nil {
@@ -1584,7 +1585,7 @@ func setupNamespaces(g *generate.Generator, namespaceOptions NamespaceOptions, i
}
}
if configureNetwork && !unshare.IsRootless() {
- for name, val := range util.DefaultNetworkSysctl {
+ for name, val := range define.DefaultNetworkSysctl {
// Check that the sysctl we are adding is actually supported
// by the kernel
p := filepath.Join("/proc/sys", strings.Replace(name, ".", "/", -1))
@@ -1739,7 +1740,7 @@ func (b *Builder) runSetupVolumeMounts(mountLabel string, volumeMounts []string,
}
}
if foundU {
- if err := chownSourceVolume(host, processUID, processGID); err != nil {
+ if err := chown.ChangeHostPathOwnership(host, true, processUID, processGID); err != nil {
return specs.Mount{}, err
}
}
@@ -1762,7 +1763,7 @@ func (b *Builder) runSetupVolumeMounts(mountLabel string, volumeMounts []string,
// If chown true, add correct ownership to the overlay temp directories.
if foundU {
- if err := chownSourceVolume(contentDir, processUID, processGID); err != nil {
+ if err := chown.ChangeHostPathOwnership(contentDir, true, processUID, processGID); err != nil {
return specs.Mount{}, err
}
}
@@ -1810,39 +1811,6 @@ func (b *Builder) runSetupVolumeMounts(mountLabel string, volumeMounts []string,
return mounts, nil
}
-// chownSourceVolume changes the ownership of a volume source directory or file within the host.
-func chownSourceVolume(path string, UID, GID int) error {
- fi, err := os.Lstat(path)
- if err != nil {
- // Skip if path does not exist
- if os.IsNotExist(err) {
- logrus.Debugf("error returning file info of %q: %v", path, err)
- return nil
- }
- return err
- }
-
- currentUID := int(fi.Sys().(*syscall.Stat_t).Uid)
- currentGID := int(fi.Sys().(*syscall.Stat_t).Gid)
-
- if UID != currentUID || GID != currentGID {
- err := filepath.Walk(path, func(filePath string, f os.FileInfo, err error) error {
- return os.Lchown(filePath, UID, GID)
- })
-
- if err != nil {
- // Skip if path does not exist
- if os.IsNotExist(err) {
- logrus.Debugf("error changing the uid and gid of %q: %v", path, err)
- return nil
- }
- return err
- }
- }
-
- return nil
-}
-
func setupMaskedPaths(g *generate.Generator) {
for _, mp := range []string{
"/proc/acpi",
@@ -1999,7 +1967,7 @@ func getDNSIP(dnsServers []string) (dns []net.IP, err error) {
func (b *Builder) configureUIDGID(g *generate.Generator, mountPoint string, options RunOptions) (string, error) {
// Set the user UID/GID/supplemental group list/capabilities lists.
- user, homeDir, err := b.user(mountPoint, options.User)
+ user, homeDir, err := b.userForRun(mountPoint, options.User)
if err != nil {
return "", err
}
@@ -2116,7 +2084,7 @@ func setupRootlessSpecChanges(spec *specs.Spec, bundleDir string, shmSize string
return nil
}
-func (b *Builder) runUsingRuntimeSubproc(isolation Isolation, options RunOptions, configureNetwork bool, configureNetworks, moreCreateArgs []string, spec *specs.Spec, rootPath, bundlePath, containerName string) (err error) {
+func (b *Builder) runUsingRuntimeSubproc(isolation define.Isolation, options RunOptions, configureNetwork bool, configureNetworks, moreCreateArgs []string, spec *specs.Spec, rootPath, bundlePath, containerName string) (err error) {
var confwg sync.WaitGroup
config, conferr := json.Marshal(runUsingRuntimeSubprocOptions{
Options: options,
@@ -2176,13 +2144,13 @@ func (b *Builder) runUsingRuntimeSubproc(isolation Isolation, options RunOptions
return err
}
-func checkAndOverrideIsolationOptions(isolation Isolation, options *RunOptions) error {
+func checkAndOverrideIsolationOptions(isolation define.Isolation, options *RunOptions) error {
switch isolation {
case IsolationOCIRootless:
if ns := options.NamespaceOptions.Find(string(specs.IPCNamespace)); ns == nil || ns.Host {
logrus.Debugf("Forcing use of an IPC namespace.")
}
- options.NamespaceOptions.AddOrReplace(NamespaceOption{Name: string(specs.IPCNamespace)})
+ options.NamespaceOptions.AddOrReplace(define.NamespaceOption{Name: string(specs.IPCNamespace)})
_, err := exec.LookPath("slirp4netns")
hostNetworking := err != nil
networkNamespacePath := ""
@@ -2194,7 +2162,7 @@ func checkAndOverrideIsolationOptions(isolation Isolation, options *RunOptions)
networkNamespacePath = ""
}
}
- options.NamespaceOptions.AddOrReplace(NamespaceOption{
+ options.NamespaceOptions.AddOrReplace(define.NamespaceOption{
Name: string(specs.NetworkNamespace),
Host: hostNetworking,
Path: networkNamespacePath,
@@ -2202,11 +2170,11 @@ func checkAndOverrideIsolationOptions(isolation Isolation, options *RunOptions)
if ns := options.NamespaceOptions.Find(string(specs.PIDNamespace)); ns == nil || ns.Host {
logrus.Debugf("Forcing use of a PID namespace.")
}
- options.NamespaceOptions.AddOrReplace(NamespaceOption{Name: string(specs.PIDNamespace), Host: false})
+ options.NamespaceOptions.AddOrReplace(define.NamespaceOption{Name: string(specs.PIDNamespace), Host: false})
if ns := options.NamespaceOptions.Find(string(specs.UserNamespace)); ns == nil || ns.Host {
logrus.Debugf("Forcing use of a user namespace.")
}
- options.NamespaceOptions.AddOrReplace(NamespaceOption{Name: string(specs.UserNamespace)})
+ options.NamespaceOptions.AddOrReplace(define.NamespaceOption{Name: string(specs.UserNamespace)})
case IsolationOCI:
pidns := options.NamespaceOptions.Find(string(specs.PIDNamespace))
userns := options.NamespaceOptions.Find(string(specs.UserNamespace))
@@ -2219,8 +2187,8 @@ func checkAndOverrideIsolationOptions(isolation Isolation, options *RunOptions)
// DefaultNamespaceOptions returns the default namespace settings from the
// runtime-tools generator library.
-func DefaultNamespaceOptions() (NamespaceOptions, error) {
- options := NamespaceOptions{
+func DefaultNamespaceOptions() (define.NamespaceOptions, error) {
+ options := define.NamespaceOptions{
{Name: string(specs.CgroupNamespace), Host: true},
{Name: string(specs.IPCNamespace), Host: true},
{Name: string(specs.MountNamespace), Host: true},
@@ -2236,7 +2204,7 @@ func DefaultNamespaceOptions() (NamespaceOptions, error) {
spec := g.Config
if spec.Linux != nil {
for _, ns := range spec.Linux.Namespaces {
- options.AddOrReplace(NamespaceOption{
+ options.AddOrReplace(define.NamespaceOption{
Name: string(ns.Type),
Path: ns.Path,
})
@@ -2263,7 +2231,7 @@ type runUsingRuntimeSubprocOptions struct {
ConfigureNetworks []string
MoreCreateArgs []string
ContainerName string
- Isolation Isolation
+ Isolation define.Isolation
}
func init() {
diff --git a/vendor/github.com/containers/buildah/run_unsupported.go b/vendor/github.com/containers/buildah/run_unsupported.go
index 04cdc46bb..2a9029e5e 100644
--- a/vendor/github.com/containers/buildah/run_unsupported.go
+++ b/vendor/github.com/containers/buildah/run_unsupported.go
@@ -6,9 +6,6 @@ import (
"github.com/pkg/errors"
)
-// ContainerDevices is currently not implemented.
-type ContainerDevices = []struct{}
-
func setChildProcess() error {
return errors.New("function not supported on non-linux systems")
}
diff --git a/vendor/github.com/containers/buildah/util/types.go b/vendor/github.com/containers/buildah/util/types.go
index ca0f31532..3a23fd690 100644
--- a/vendor/github.com/containers/buildah/util/types.go
+++ b/vendor/github.com/containers/buildah/util/types.go
@@ -1,35 +1,24 @@
package util
+import (
+ "github.com/containers/buildah/define"
+)
+
const (
- // Deprecated: Default runtime should come from containers.conf
- DefaultRuntime = "runc"
+ // DefaultRuntime if containers.conf fails.
+ DefaultRuntime = define.DefaultRuntime
// DefaultCNIPluginPath is the default location of CNI plugin helpers.
- DefaultCNIPluginPath = "/usr/libexec/cni:/opt/cni/bin"
+ DefaultCNIPluginPath = define.DefaultCNIPluginPath
// DefaultCNIConfigDir is the default location of CNI configuration files.
- DefaultCNIConfigDir = "/etc/cni/net.d"
+ DefaultCNIConfigDir = define.DefaultCNIConfigDir
)
var (
// DefaultCapabilities is the list of capabilities which we grant by
// default to containers which are running under UID 0.
- DefaultCapabilities = []string{
- "CAP_AUDIT_WRITE",
- "CAP_CHOWN",
- "CAP_DAC_OVERRIDE",
- "CAP_FOWNER",
- "CAP_FSETID",
- "CAP_KILL",
- "CAP_MKNOD",
- "CAP_NET_BIND_SERVICE",
- "CAP_SETFCAP",
- "CAP_SETGID",
- "CAP_SETPCAP",
- "CAP_SETUID",
- "CAP_SYS_CHROOT",
- }
+ DefaultCapabilities = define.DefaultCapabilities
+
// DefaultNetworkSysctl is the list of Kernel parameters which we
// grant by default to containers which are running under UID 0.
- DefaultNetworkSysctl = map[string]string{
- "net.ipv4.ping_group_range": "0 0",
- }
+ DefaultNetworkSysctl = define.DefaultNetworkSysctl
)
diff --git a/vendor/github.com/containers/buildah/util/util.go b/vendor/github.com/containers/buildah/util/util.go
index 338c4503a..419f905e1 100644
--- a/vendor/github.com/containers/buildah/util/util.go
+++ b/vendor/github.com/containers/buildah/util/util.go
@@ -10,6 +10,7 @@ import (
"sync"
"syscall"
+ "github.com/containers/buildah/define"
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/docker/reference"
"github.com/containers/image/v5/pkg/shortnames"
@@ -280,7 +281,7 @@ func Runtime() string {
conf, err := config.Default()
if err != nil {
logrus.Warnf("Error loading container config when searching for local runtime: %v", err)
- return DefaultRuntime
+ return define.DefaultRuntime
}
return conf.Engine.OCIRuntime
}
diff --git a/vendor/github.com/containers/common/pkg/capabilities/capabilities.go b/vendor/github.com/containers/common/pkg/capabilities/capabilities.go
index 78be4d158..ccdcde877 100644
--- a/vendor/github.com/containers/common/pkg/capabilities/capabilities.go
+++ b/vendor/github.com/containers/common/pkg/capabilities/capabilities.go
@@ -7,6 +7,7 @@ package capabilities
import (
"strings"
+ "sync"
"github.com/pkg/errors"
"github.com/syndtr/gocapability/capability"
@@ -27,7 +28,7 @@ var (
ContainerImageLabels = []string{"io.containers.capabilities"}
)
-// All is a special value used to add/drop all known capababilities.
+// All is a special value used to add/drop all known capabilities.
// Useful on the CLI for `--cap-add=all` etc.
const All = "ALL"
@@ -60,24 +61,36 @@ func stringInSlice(s string, sl []string) bool {
return false
}
+var (
+ boundingSetOnce sync.Once
+ boundingSetRet []string
+ boundingSetErr error
+)
+
// BoundingSet returns the capabilities in the current bounding set
func BoundingSet() ([]string, error) {
- currentCaps, err := capability.NewPid2(0)
- if err != nil {
- return nil, err
- }
- err = currentCaps.Load()
- if err != nil {
- return nil, err
- }
- var r []string
- for _, c := range capsList {
- if !currentCaps.Get(capability.BOUNDING, c) {
- continue
+ boundingSetOnce.Do(func() {
+ currentCaps, err := capability.NewPid2(0)
+ if err != nil {
+ boundingSetErr = err
+ return
}
- r = append(r, getCapName(c))
- }
- return r, nil
+ err = currentCaps.Load()
+ if err != nil {
+ boundingSetErr = err
+ return
+ }
+ var r []string
+ for _, c := range capsList {
+ if !currentCaps.Get(capability.BOUNDING, c) {
+ continue
+ }
+ r = append(r, getCapName(c))
+ }
+ boundingSetRet = r
+ boundingSetErr = err
+ })
+ return boundingSetRet, boundingSetErr
}
// AllCapabilities returns all known capabilities.
@@ -116,7 +129,7 @@ func ValidateCapabilities(caps []string) error {
return nil
}
-// MergeCapabilities computes a set of capabilities by adding capapbitilities
+// MergeCapabilities computes a set of capabilities by adding capabilities
// to or dropping them from base.
//
// Note that:
@@ -150,7 +163,7 @@ func MergeCapabilities(base, adds, drops []string) ([]string, error) {
if stringInSlice(All, capAdd) {
// "Add" all capabilities;
- return capabilityList, nil
+ return BoundingSet()
}
for _, add := range capAdd {
diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go
index 9199a6286..4c55af5c1 100644
--- a/vendor/github.com/containers/common/pkg/config/default.go
+++ b/vendor/github.com/containers/common/pkg/config/default.go
@@ -45,7 +45,7 @@ var (
// DefaultInitPath is the default path to the container-init binary
DefaultInitPath = "/usr/libexec/podman/catatonit"
// DefaultInfraImage to use for infra container
- DefaultInfraImage = "k8s.gcr.io/pause:3.4.1"
+ DefaultInfraImage = "k8s.gcr.io/pause:3.5"
// DefaultRootlessSHMLockPath is the default path for rootless SHM locks
DefaultRootlessSHMLockPath = "/libpod_rootless_lock"
// DefaultDetachKeys is the default keys sequence for detaching a
diff --git a/vendor/github.com/containers/common/pkg/seccomp/supported.go b/vendor/github.com/containers/common/pkg/seccomp/supported.go
index e04324c8a..86e1b66bb 100644
--- a/vendor/github.com/containers/common/pkg/seccomp/supported.go
+++ b/vendor/github.com/containers/common/pkg/seccomp/supported.go
@@ -3,72 +3,47 @@
package seccomp
import (
- "bufio"
- "errors"
- "os"
- "strings"
+ "sync"
- perrors "github.com/pkg/errors"
"golang.org/x/sys/unix"
)
-const statusFilePath = "/proc/self/status"
+var (
+ supported bool
+ supOnce sync.Once
+)
// IsSupported returns true if the system has been configured to support
-// seccomp.
+// seccomp (including the check for CONFIG_SECCOMP_FILTER kernel option).
func IsSupported() bool {
- // Since Linux 3.8, the Seccomp field of the /proc/[pid]/status file
- // provides a method of obtaining the same information, without the risk
- // that the process is killed; see proc(5).
- status, err := parseStatusFile(statusFilePath)
- if err == nil {
- _, ok := status["Seccomp"]
- return ok
- }
-
- // PR_GET_SECCOMP (since Linux 2.6.23)
- // Return (as the function result) the secure computing mode of the calling
- // thread. If the caller is not in secure computing mode, this operation
- // returns 0; if the caller is in strict secure computing mode, then the
- // prctl() call will cause a SIGKILL signal to be sent to the process. If
- // the caller is in filter mode, and this system call is allowed by the
- // seccomp filters, it returns 2; otherwise, the process is killed with a
- // SIGKILL signal. This operation is available only if the kernel is
- // configured with CONFIG_SECCOMP enabled.
- if err := unix.Prctl(unix.PR_GET_SECCOMP, 0, 0, 0, 0); !errors.Is(err, unix.EINVAL) {
- // Make sure the kernel has CONFIG_SECCOMP_FILTER.
- if err := unix.Prctl(unix.PR_SET_SECCOMP, unix.SECCOMP_MODE_FILTER, 0, 0, 0); !errors.Is(err, unix.EINVAL) {
- return true
- }
- }
-
- return false
-}
-
-// parseStatusFile reads the provided `file` into a map of strings.
-func parseStatusFile(file string) (map[string]string, error) {
- f, err := os.Open(file)
- if err != nil {
- return nil, perrors.Wrapf(err, "open status file %s", file)
- }
- defer f.Close()
-
- status := make(map[string]string)
- scanner := bufio.NewScanner(f)
- for scanner.Scan() {
- text := scanner.Text()
- parts := strings.SplitN(text, ":", 2)
-
- if len(parts) <= 1 {
- continue
- }
-
- status[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
- }
-
- if err := scanner.Err(); err != nil {
- return nil, perrors.Wrapf(err, "scan status file %s", file)
- }
-
- return status, nil
+ // Excerpts from prctl(2), section ERRORS:
+ //
+ // EACCES
+ // option is PR_SET_SECCOMP and arg2 is SECCOMP_MODE_FILTER, but
+ // the process does not have the CAP_SYS_ADMIN capability or has
+ // not set the no_new_privs attribute <...>.
+ // <...>
+ // EFAULT
+ // option is PR_SET_SECCOMP, arg2 is SECCOMP_MODE_FILTER, the
+ // system was built with CONFIG_SECCOMP_FILTER, and arg3 is an
+ // invalid address.
+ // <...>
+ // EINVAL
+ // option is PR_SET_SECCOMP or PR_GET_SECCOMP, and the kernel
+ // was not configured with CONFIG_SECCOMP.
+ //
+ // EINVAL
+ // option is PR_SET_SECCOMP, arg2 is SECCOMP_MODE_FILTER,
+ // and the kernel was not configured with CONFIG_SECCOMP_FILTER.
+ // <end of quote>
+ //
+ // Meaning, in case these kernel options are set (this is what we check
+ // for here), we will get some other error (most probably EACCES or
+ // EFAULT). IOW, EINVAL means "seccomp not supported", any other error
+ // means it is supported.
+
+ supOnce.Do(func() {
+ supported = unix.Prctl(unix.PR_SET_SECCOMP, unix.SECCOMP_MODE_FILTER, 0, 0, 0) != unix.EINVAL
+ })
+ return supported
}
diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go
index afe620231..94f2048f3 100644
--- a/vendor/github.com/containers/common/version/version.go
+++ b/vendor/github.com/containers/common/version/version.go
@@ -1,4 +1,4 @@
package version
// Version is the version of the build.
-const Version = "0.35.3"
+const Version = "0.35.4"
diff --git a/vendor/github.com/containers/storage/VERSION b/vendor/github.com/containers/storage/VERSION
index cfc730712..450a687b2 100644
--- a/vendor/github.com/containers/storage/VERSION
+++ b/vendor/github.com/containers/storage/VERSION
@@ -1 +1 @@
-1.28.0
+1.28.1
diff --git a/vendor/github.com/containers/storage/drivers/overlay/overlay.go b/vendor/github.com/containers/storage/drivers/overlay/overlay.go
index 254fd5fab..864da844b 100644
--- a/vendor/github.com/containers/storage/drivers/overlay/overlay.go
+++ b/vendor/github.com/containers/storage/drivers/overlay/overlay.go
@@ -30,7 +30,9 @@ import (
"github.com/containers/storage/pkg/system"
"github.com/containers/storage/pkg/unshare"
units "github.com/docker/go-units"
+ "github.com/hashicorp/go-multierror"
rsystem "github.com/opencontainers/runc/libcontainer/system"
+ "github.com/opencontainers/selinux/go-selinux"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -43,7 +45,10 @@ var (
untar = chrootarchive.UntarUncompressed
)
-const defaultPerms = os.FileMode(0555)
+const (
+ defaultPerms = os.FileMode(0555)
+ selinuxLabelTest = "system_u:object_r:container_file_t:s0"
+)
// This backend uses the overlay union filesystem for containers
// with diff directories for each layer.
@@ -539,6 +544,12 @@ func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGI
_ = idtools.MkdirAs(upperDir, 0700, rootUID, rootGID)
_ = idtools.MkdirAs(workDir, 0700, rootUID, rootGID)
flags := fmt.Sprintf("lowerdir=%s:%s,upperdir=%s,workdir=%s", lower1Dir, lower2Dir, upperDir, workDir)
+ if selinux.GetEnabled() {
+ // Linux 5.11 introduced unprivileged overlay mounts but it has an issue
+ // when used together with selinux labels.
+ // Check that overlay supports selinux labels as well.
+ flags = label.FormatMountLabel(flags, selinuxLabelTest)
+ }
if len(flags) < unix.Getpagesize() {
err := unix.Mount("overlay", mergedDir, "overlay", 0, flags)
if err == nil {
@@ -548,6 +559,9 @@ func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGI
logrus.Debugf("overlay test mount with multiple lowers failed %v", err)
}
flags = fmt.Sprintf("lowerdir=%s,upperdir=%s,workdir=%s", lower1Dir, upperDir, workDir)
+ if selinux.GetEnabled() {
+ flags = label.FormatMountLabel(flags, selinuxLabelTest)
+ }
if len(flags) < unix.Getpagesize() {
err := unix.Mount("overlay", mergedDir, "overlay", 0, flags)
if err == nil {
@@ -824,7 +838,17 @@ func (d *Driver) getLower(parent string) (string, error) {
// Read Parent link fileA
parentLink, err := ioutil.ReadFile(path.Join(parentDir, "link"))
if err != nil {
- return "", err
+ if !os.IsNotExist(err) {
+ return "", err
+ }
+ logrus.Warnf("Can't read parent link %q because it does not exist. Going through storage to recreate the missing links.", path.Join(parentDir, "link"))
+ if err := d.recreateSymlinks(); err != nil {
+ return "", errors.Wrap(err, "error recreating the links")
+ }
+ parentLink, err = ioutil.ReadFile(path.Join(parentDir, "link"))
+ if err != nil {
+ return "", err
+ }
}
lowers := []string{path.Join(linkDir, string(parentLink))}
@@ -946,6 +970,7 @@ func (d *Driver) recreateSymlinks() error {
if err != nil {
return fmt.Errorf("error reading driver home directory %q: %v", d.home, err)
}
+ linksDir := filepath.Join(d.home, "l")
// This makes the link directory if it doesn't exist
rootUID, rootGID, err := idtools.GetRootUIDGID(d.uidMaps, d.gidMaps)
if err != nil {
@@ -954,28 +979,80 @@ func (d *Driver) recreateSymlinks() error {
if err := idtools.MkdirAllAs(path.Join(d.home, linkDir), 0700, rootUID, rootGID); err != nil {
return err
}
- for _, dir := range dirs {
- // Skip over the linkDir and anything that is not a directory
- if dir.Name() == linkDir || !dir.Mode().IsDir() {
- continue
+ // Keep looping as long as we take some corrective action in each iteration
+ var errs *multierror.Error
+ madeProgress := true
+ for madeProgress {
+ errs = nil
+ madeProgress = false
+ // Check that for each layer, there's a link in "l" with the name in
+ // the layer's "link" file that points to the layer's "diff" directory.
+ for _, dir := range dirs {
+ // Skip over the linkDir and anything that is not a directory
+ if dir.Name() == linkDir || !dir.Mode().IsDir() {
+ continue
+ }
+ // Read the "link" file under each layer to get the name of the symlink
+ data, err := ioutil.ReadFile(path.Join(d.dir(dir.Name()), "link"))
+ if err != nil {
+ errs = multierror.Append(errs, errors.Wrapf(err, "error reading name of symlink for %q", dir))
+ continue
+ }
+ linkPath := path.Join(d.home, linkDir, strings.Trim(string(data), "\n"))
+ // Check if the symlink exists, and if it doesn't, create it again with the
+ // name we got from the "link" file
+ _, err = os.Lstat(linkPath)
+ if err != nil && os.IsNotExist(err) {
+ if err := os.Symlink(path.Join("..", dir.Name(), "diff"), linkPath); err != nil {
+ errs = multierror.Append(errs, err)
+ continue
+ }
+ madeProgress = true
+ } else if err != nil {
+ errs = multierror.Append(errs, errors.Wrapf(err, "error trying to stat %q", linkPath))
+ continue
+ }
}
- // Read the "link" file under each layer to get the name of the symlink
- data, err := ioutil.ReadFile(path.Join(d.dir(dir.Name()), "link"))
+ // Now check if we somehow lost a "link" file, by making sure
+ // that each symlink we have corresponds to one.
+ links, err := ioutil.ReadDir(linksDir)
if err != nil {
- return fmt.Errorf("error reading name of symlink for %q: %v", dir, err)
- }
- linkPath := path.Join(d.home, linkDir, strings.Trim(string(data), "\n"))
- // Check if the symlink exists, and if it doesn't create it again with the name we
- // got from the "link" file
- _, err = os.Stat(linkPath)
- if err != nil && os.IsNotExist(err) {
- if err := os.Symlink(path.Join("..", dir.Name(), "diff"), linkPath); err != nil {
- return err
+ errs = multierror.Append(errs, errors.Wrapf(err, "error reading links directory %q", linksDir))
+ continue
+ }
+ // Go through all of the symlinks in the "l" directory
+ for _, link := range links {
+ // Read the symlink's target, which should be "../$layer/diff"
+ target, err := os.Readlink(filepath.Join(linksDir, link.Name()))
+ if err != nil {
+ errs = multierror.Append(errs, errors.Wrapf(err, "error reading target of link %q", link))
+ continue
+ }
+ targetComponents := strings.Split(target, string(os.PathSeparator))
+ if len(targetComponents) != 3 || targetComponents[0] != ".." || targetComponents[2] != "diff" {
+ errs = multierror.Append(errs, errors.Errorf("link target of %q looks weird: %q", link, target))
+ // force the link to be recreated on the next pass
+ os.Remove(filepath.Join(linksDir, link.Name()))
+ madeProgress = true
+ continue
+ }
+ // Reconstruct the name of the target's link file and check that
+ // it has the basename of our symlink in it.
+ targetID := targetComponents[1]
+ linkFile := filepath.Join(d.dir(targetID), "link")
+ data, err := ioutil.ReadFile(linkFile)
+ if err != nil || string(data) != link.Name() {
+ if err := ioutil.WriteFile(linkFile, []byte(link.Name()), 0644); err != nil {
+ errs = multierror.Append(errs, errors.Wrapf(err, "error correcting link for layer %q", targetID))
+ continue
+ }
+ madeProgress = true
}
- } else if err != nil {
- return fmt.Errorf("error trying to stat %q: %v", linkPath, err)
}
}
+ if errs != nil {
+ return errs.ErrorOrNil()
+ }
return nil
}
@@ -1032,7 +1109,17 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
// lists that we're building. "diff" itself is the upper, so it won't be in the lists.
link, err := ioutil.ReadFile(path.Join(dir, "link"))
if err != nil {
- return "", err
+ if !os.IsNotExist(err) {
+ return "", err
+ }
+ logrus.Warnf("Can't read parent link %q because it does not exist. Going through storage to recreate the missing links.", path.Join(dir, "link"))
+ if err := d.recreateSymlinks(); err != nil {
+ return "", errors.Wrap(err, "error recreating the links")
+ }
+ link, err = ioutil.ReadFile(path.Join(dir, "link"))
+ if err != nil {
+ return "", err
+ }
}
diffN := 1
perms := defaultPerms
diff --git a/vendor/github.com/containers/storage/go.mod b/vendor/github.com/containers/storage/go.mod
index 61935457a..1f25390e0 100644
--- a/vendor/github.com/containers/storage/go.mod
+++ b/vendor/github.com/containers/storage/go.mod
@@ -23,6 +23,7 @@ require (
github.com/stretchr/testify v1.7.0
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
github.com/tchap/go-patricia v2.3.0+incompatible
+ github.com/ulikunitz/xz v0.5.10
github.com/vbatts/tar-split v0.11.1
golang.org/x/net v0.0.0-20201224014010-6772e930b67b
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
diff --git a/vendor/github.com/containers/storage/go.sum b/vendor/github.com/containers/storage/go.sum
index fb3c08e0d..d5f2c41fa 100644
--- a/vendor/github.com/containers/storage/go.sum
+++ b/vendor/github.com/containers/storage/go.sum
@@ -476,6 +476,8 @@ github.com/tchap/go-patricia v2.3.0+incompatible h1:GkY4dP3cEfEASBPPkWd+AmjYxhmD
github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8=
+github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
diff --git a/vendor/github.com/containers/storage/pkg/archive/archive.go b/vendor/github.com/containers/storage/pkg/archive/archive.go
index 400a012ea..1d21471eb 100644
--- a/vendor/github.com/containers/storage/pkg/archive/archive.go
+++ b/vendor/github.com/containers/storage/pkg/archive/archive.go
@@ -9,7 +9,6 @@ import (
"io"
"io/ioutil"
"os"
- "os/exec"
"path/filepath"
"runtime"
"strings"
@@ -18,7 +17,6 @@ import (
"github.com/containers/storage/pkg/fileutils"
"github.com/containers/storage/pkg/idtools"
- "github.com/containers/storage/pkg/ioutils"
"github.com/containers/storage/pkg/pools"
"github.com/containers/storage/pkg/promise"
"github.com/containers/storage/pkg/system"
@@ -26,6 +24,7 @@ import (
rsystem "github.com/opencontainers/runc/libcontainer/system"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
+ "github.com/ulikunitz/xz"
)
type (
@@ -173,12 +172,6 @@ func DetectCompression(source []byte) Compression {
return Uncompressed
}
-func xzDecompress(archive io.Reader) (io.ReadCloser, <-chan struct{}, error) {
- args := []string{"xz", "-d", "-c", "-q"}
-
- return cmdStream(exec.Command(args[0], args[1:]...), archive)
-}
-
// DecompressStream decompresses the archive and returns a ReaderCloser with the decompressed archive.
func DecompressStream(archive io.Reader) (io.ReadCloser, error) {
p := pools.BufioReader32KPool
@@ -211,15 +204,12 @@ func DecompressStream(archive io.Reader) (io.ReadCloser, error) {
readBufWrapper := p.NewReadCloserWrapper(buf, bz2Reader)
return readBufWrapper, nil
case Xz:
- xzReader, chdone, err := xzDecompress(buf)
+ xzReader, err := xz.NewReader(buf)
if err != nil {
return nil, err
}
readBufWrapper := p.NewReadCloserWrapper(buf, xzReader)
- return ioutils.NewReadCloserWrapper(readBufWrapper, func() error {
- <-chdone
- return readBufWrapper.Close()
- }), nil
+ return readBufWrapper, nil
case Zstd:
return zstdReader(buf)
default:
@@ -1319,35 +1309,6 @@ func remapIDs(readIDMappings, writeIDMappings *idtools.IDMappings, chownOpts *id
return nil
}
-// cmdStream executes a command, and returns its stdout as a stream.
-// If the command fails to run or doesn't complete successfully, an error
-// will be returned, including anything written on stderr.
-func cmdStream(cmd *exec.Cmd, input io.Reader) (io.ReadCloser, <-chan struct{}, error) {
- chdone := make(chan struct{})
- cmd.Stdin = input
- pipeR, pipeW := io.Pipe()
- cmd.Stdout = pipeW
- var errBuf bytes.Buffer
- cmd.Stderr = &errBuf
-
- // Run the command and return the pipe
- if err := cmd.Start(); err != nil {
- return nil, nil, err
- }
-
- // Copy stdout to the returned pipe
- go func() {
- if err := cmd.Wait(); err != nil {
- pipeW.CloseWithError(fmt.Errorf("%s: %s", err, errBuf.String()))
- } else {
- pipeW.Close()
- }
- close(chdone)
- }()
-
- return pipeR, chdone, nil
-}
-
// NewTempArchive reads the content of src into a temporary file, and returns the contents
// of that file as an archive. The archive can only be read once - as soon as reading completes,
// the file will be deleted.
diff --git a/vendor/github.com/coreos/stream-metadata-go/LICENSE b/vendor/github.com/coreos/stream-metadata-go/LICENSE
new file mode 100644
index 000000000..261eeb9e9
--- /dev/null
+++ b/vendor/github.com/coreos/stream-metadata-go/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/coreos/stream-metadata-go/fedoracoreos/fcos.go b/vendor/github.com/coreos/stream-metadata-go/fedoracoreos/fcos.go
new file mode 100644
index 000000000..9ffc7f7d1
--- /dev/null
+++ b/vendor/github.com/coreos/stream-metadata-go/fedoracoreos/fcos.go
@@ -0,0 +1,27 @@
+// Package fedoracoreos contains APIs defining well-known
+// streams for Fedora CoreOS and a method to retrieve
+// the URL for a stream endpoint.
+package fedoracoreos
+
+import (
+ "fmt"
+ "net/url"
+
+ "github.com/coreos/stream-metadata-go/fedoracoreos/internals"
+)
+
+const (
+ // StreamStable is the default stream
+ StreamStable = "stable"
+ // StreamTesting is what is intended to land in stable
+ StreamTesting = "testing"
+ // StreamNext usually tracks the next Fedora major version
+ StreamNext = "next"
+)
+
+// GetStreamURL returns the URL for the given stream
+func GetStreamURL(stream string) url.URL {
+ u := internals.GetBaseURL()
+ u.Path = fmt.Sprintf("streams/%s.json", stream)
+ return u
+}
diff --git a/vendor/github.com/coreos/stream-metadata-go/fedoracoreos/internals/fcosinternals.go b/vendor/github.com/coreos/stream-metadata-go/fedoracoreos/internals/fcosinternals.go
new file mode 100644
index 000000000..48b6addbc
--- /dev/null
+++ b/vendor/github.com/coreos/stream-metadata-go/fedoracoreos/internals/fcosinternals.go
@@ -0,0 +1,33 @@
+// Package internals contains functions for accessing
+// the underlying "releases" and coreos-assembler builds
+// backing streams. General user code should avoid
+// this package and use streams.
+package internals
+
+import (
+ "fmt"
+ "net/url"
+)
+
+// GetBaseURL returns the base URL
+func GetBaseURL() url.URL {
+ return url.URL{
+ Scheme: "https",
+ Host: "builds.coreos.fedoraproject.org",
+ }
+}
+
+// GetReleaseIndexURL returns the URL for the release index of a given stream.
+// Avoid this unless you have a specific need to test a specific release.
+func GetReleaseIndexURL(stream string) url.URL {
+ u := GetBaseURL()
+ u.Path = fmt.Sprintf("prod/streams/%s/releases.json", stream)
+ return u
+}
+
+// GetCosaBuild returns the coreos-assembler build URL
+func GetCosaBuild(stream, buildID, arch string) url.URL {
+ u := GetBaseURL()
+ u.Path = fmt.Sprintf("prod/streams/%s/builds/%s/%s/", stream, buildID, arch)
+ return u
+}
diff --git a/vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go b/vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go
new file mode 100644
index 000000000..320d84b41
--- /dev/null
+++ b/vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go
@@ -0,0 +1,18 @@
+package rhcos
+
+// Extensions is data specific to Red Hat Enterprise Linux CoreOS
+type Extensions struct {
+ AzureDisk *AzureDisk `json:"azure-disk,omitempty"`
+}
+
+// AzureDisk represents an Azure disk image that can be imported
+// into an image gallery or otherwise replicated, and then used
+// as a boot source for virtual machines.
+type AzureDisk struct {
+ // Release is the source release version
+ Release string `json:"release"`
+ // URL to an image already stored in Azure infrastructure
+ // that can be copied into an image gallery. Avoid creating VMs directly
+ // from this URL as that may lead to performance limitations.
+ URL string `json:"url,omitempty"`
+}
diff --git a/vendor/github.com/coreos/stream-metadata-go/stream/stream.go b/vendor/github.com/coreos/stream-metadata-go/stream/stream.go
new file mode 100644
index 000000000..e3f100cea
--- /dev/null
+++ b/vendor/github.com/coreos/stream-metadata-go/stream/stream.go
@@ -0,0 +1,74 @@
+// Package stream models a CoreOS "stream", which is
+// a description of the recommended set of binary images for CoreOS. Use
+// this API to find cloud images, bare metal disk images, etc.
+package stream
+
+import (
+ "github.com/coreos/stream-metadata-go/stream/rhcos"
+)
+
+// Stream contains artifacts available in a stream
+type Stream struct {
+ Stream string `json:"stream"`
+ Metadata Metadata `json:"metadata"`
+ Architectures map[string]Arch `json:"architectures"`
+}
+
+// Metadata for a release or stream
+type Metadata struct {
+ LastModified string `json:"last-modified"`
+}
+
+// Arch contains release details for a particular hardware architecture
+type Arch struct {
+ Artifacts map[string]PlatformArtifacts `json:"artifacts"`
+ Images Images `json:"images,omitempty"`
+ // RHELCoreOSExtensions is data specific to Red Hat Enterprise Linux CoreOS
+ RHELCoreOSExtensions *rhcos.Extensions `json:"rhel-coreos-extensions,omitempty"`
+}
+
+// PlatformArtifacts contains images for a platform
+type PlatformArtifacts struct {
+ Release string `json:"release"`
+ Formats map[string]ImageFormat `json:"formats"`
+}
+
+// ImageFormat contains all artifacts for a single OS image
+type ImageFormat struct {
+ Disk *Artifact `json:"disk,omitempty"`
+ Kernel *Artifact `json:"kernel,omitempty"`
+ Initramfs *Artifact `json:"initramfs,omitempty"`
+ Rootfs *Artifact `json:"rootfs,omitempty"`
+}
+
+// Artifact represents one image file, plus its metadata
+type Artifact struct {
+ Location string `json:"location"`
+ Signature string `json:"signature"`
+ Sha256 string `json:"sha256"`
+ UncompressedSha256 string `json:"uncompressed-sha256,omitempty"`
+}
+
+// Images contains images available in cloud providers
+type Images struct {
+ Aws *AwsImage `json:"aws,omitempty"`
+ Gcp *GcpImage `json:"gcp,omitempty"`
+}
+
+// AwsImage represents an image across all AWS regions
+type AwsImage struct {
+ Regions map[string]AwsRegionImage `json:"regions,omitempty"`
+}
+
+// AwsRegionImage represents an image in one AWS region
+type AwsRegionImage struct {
+ Release string `json:"release"`
+ Image string `json:"image"`
+}
+
+// GcpImage represents a GCP cloud image
+type GcpImage struct {
+ Project string `json:"project,omitempty"`
+ Family string `json:"family,omitempty"`
+ Name string `json:"name,omitempty"`
+}
diff --git a/vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go b/vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go
new file mode 100644
index 000000000..ffd779c58
--- /dev/null
+++ b/vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go
@@ -0,0 +1,47 @@
+package stream
+
+import "fmt"
+
+// FormatPrefix describes a stream+architecture combination, intended for prepending to error messages
+func (st *Stream) FormatPrefix(archname string) string {
+ return fmt.Sprintf("%s/%s", st.Stream, archname)
+}
+
+// GetArchitecture loads the architecture-specific builds from a stream,
+// with a useful descriptive error message if the architecture is not found.
+func (st *Stream) GetArchitecture(archname string) (*Arch, error) {
+ archdata, ok := st.Architectures[archname]
+ if !ok {
+ return nil, fmt.Errorf("stream:%s does not have architecture '%s'", st.Stream, archname)
+ }
+ return &archdata, nil
+}
+
+// GetAwsRegionImage returns the release data (AMI and release ID) for a particular
+// architecture and region.
+func (st *Stream) GetAwsRegionImage(archname, region string) (*AwsRegionImage, error) {
+ starch, err := st.GetArchitecture(archname)
+ if err != nil {
+ return nil, err
+ }
+ awsimages := starch.Images.Aws
+ if awsimages == nil {
+ return nil, fmt.Errorf("%s: No AWS images", st.FormatPrefix(archname))
+ }
+ var regionVal AwsRegionImage
+ var ok bool
+ if regionVal, ok = awsimages.Regions[region]; !ok {
+ return nil, fmt.Errorf("%s: No AWS images in region %s", st.FormatPrefix(archname), region)
+ }
+
+ return &regionVal, nil
+}
+
+// GetAMI returns the AWS machine image for a particular architecture and region.
+func (st *Stream) GetAMI(archname, region string) (string, error) {
+ regionVal, err := st.GetAwsRegionImage(archname, region)
+ if err != nil {
+ return "", err
+ }
+ return regionVal.Image, nil
+}
diff --git a/vendor/github.com/digitalocean/go-libvirt/.travis.yml b/vendor/github.com/digitalocean/go-libvirt/.travis.yml
new file mode 100644
index 000000000..5852afcfd
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/.travis.yml
@@ -0,0 +1,62 @@
+language: go
+os: linux
+dist: bionic
+sudo: require
+
+cache:
+ directories:
+ - $HOME/.ccache
+
+go:
+ - "1.15"
+
+env:
+ global:
+ - CCACHE_TEMPDIR=/tmp/.ccache-temp
+ matrix:
+ - LIBVIRT=2.3.0 EXT=xz
+ - LIBVIRT=3.1.0 EXT=xz
+ - LIBVIRT=5.1.0 EXT=xz
+
+before_install:
+ - go get golang.org/x/lint/golint
+ - go get golang.org/x/tools/cmd/goyacc
+
+install:
+ # credit here goes to the go-libvirt authors,
+ # see: https://github.com/rgbkrk/libvirt-go/blob/master/.travis.yml
+ - sudo apt-get -qqy build-dep libvirt
+ - sudo apt-get -qqy install curl qemu-system-x86
+ - sudo mkdir -p /usr/src && sudo chown $(id -u) /usr/src
+ - curl -O -s https://libvirt.org/sources/libvirt-${LIBVIRT}.tar.${EXT}
+ - tar -C /usr/src -xf libvirt-${LIBVIRT}.tar.${EXT}
+ - pushd /usr/src/libvirt-${LIBVIRT}
+ - ccache --show-stats
+ - |
+ env PATH=/usr/lib/ccache:$PATH \
+ ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
+ --without-polkit \
+ --without-esx --without-vbox --without-xen --without-libxl --without-lxc \
+ --with-qemu
+ - make
+ - sudo make install
+ - ccache --show-stats
+ - popd
+ - sudo libvirtd -d -l -f libvirtd.conf
+ - sudo virtlogd -d || true
+
+before_script:
+ - go get -d ./...
+ - sudo qemu-img create -f raw -o size=10M /var/lib/libvirt/images/test.raw
+ - sudo virsh define .travis/test-domain.xml
+ - sudo virsh start test
+ - sudo virsh pool-create .travis/test-pool.xml
+ - sudo virsh secret-define .travis/test-secret.xml
+
+script:
+ - ./scripts/licensecheck.sh
+ - LIBVIRT_SOURCE=/usr/src/libvirt-${LIBVIRT} go generate ./...
+ - go build ./...
+ - golint -set_exit_status ./...
+ - go vet ./...
+ - go test -v -tags=integration ./...
diff --git a/vendor/github.com/digitalocean/go-libvirt/AUTHORS b/vendor/github.com/digitalocean/go-libvirt/AUTHORS
new file mode 100644
index 000000000..e004ab7a1
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/AUTHORS
@@ -0,0 +1,24 @@
+Maintainer
+----------
+DigitalOcean, Inc
+
+Original Authors
+----------------
+Ben LeMasurier <blemasurier@digitalocean.com>
+Matt Layher <mlayher@digitalocean.com>
+
+Contributors
+------------
+Justin Kim <justin@digitalocean.com>
+Ricky Medina <rm@do.co>
+Charlie Drage <charlie@charliedrage.com>
+Michael Koppmann <me@mkoppmann.at>
+Simarpreet Singh <simar@linux.com>
+Alexander Polyakov <apolyakov@beget.com>
+Amanda Andrade <amanda.andrade@serpro.gov.br>
+Geoff Hickey <ghickey@digitalocean.com>
+Yuriy Taraday <yorik.sar@gmail.com>
+Sylvain Baubeau <sbaubeau@redhat.com>
+David Schneider <dsbrng25b@gmail.com>
+Alec Hothan <ahothan@gmail.com>
+Akos Varga <vrgakos@gmail.com> \ No newline at end of file
diff --git a/vendor/github.com/digitalocean/go-libvirt/CONTRIBUTING.md b/vendor/github.com/digitalocean/go-libvirt/CONTRIBUTING.md
new file mode 100644
index 000000000..1b5b74106
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/CONTRIBUTING.md
@@ -0,0 +1,30 @@
+Contributing
+============
+
+The `go-libvirt` project makes use of the [GitHub Flow](https://guides.github.com/introduction/flow/)
+for contributions.
+
+If you'd like to contribute to the project, please
+[open an issue](https://github.com/digitalocean/go-libvirt/issues/new) or find an
+[existing issue](https://github.com/digitalocean/go-libvirt/issues) that you'd like
+to take on. This ensures that efforts are not duplicated, and that a new feature
+aligns with the focus of the rest of the repository.
+
+Once your suggestion has been submitted and discussed, please be sure that your
+code meets the following criteria:
+ - code is completely `gofmt`'d
+ - new features or codepaths have appropriate test coverage
+ - `go test ./...` passes
+ - `go vet ./...` passes
+ - `golint ./...` returns no warnings, including documentation comment warnings
+
+In addition, if this is your first time contributing to the `go-libvirt` project,
+add your name and email address to the
+[AUTHORS](https://github.com/digitalocean/go-libvirt/blob/master/AUTHORS) file
+under the "Contributors" section using the format:
+`First Last <email@example.com>`.
+
+Finally, submit a pull request for review!
+
+Questions? Feel free to join us in [`#go-qemu` on freenode](https://webchat.freenode.net/)
+if you'd like to discuss the project.
diff --git a/vendor/github.com/digitalocean/go-libvirt/LICENSE.md b/vendor/github.com/digitalocean/go-libvirt/LICENSE.md
new file mode 100644
index 000000000..f5f4b8b5e
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/LICENSE.md
@@ -0,0 +1,195 @@
+Apache License
+==============
+
+_Version 2.0, January 2004_
+_&lt;<http://www.apache.org/licenses/>&gt;_
+
+### Terms and Conditions for use, reproduction, and distribution
+
+#### 1. Definitions
+
+“License” shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.
+
+“Licensor” shall mean the copyright owner or entity authorized by the copyright
+owner that is granting the License.
+
+“Legal Entity” shall mean the union of the acting entity and all other entities
+that control, are controlled by, or are under common control with that entity.
+For the purposes of this definition, “control” means **(i)** the power, direct or
+indirect, to cause the direction or management of such entity, whether by
+contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
+outstanding shares, or **(iii)** beneficial ownership of such entity.
+
+“You” (or “Your”) shall mean an individual or Legal Entity exercising
+permissions granted by this License.
+
+“Source” form shall mean the preferred form for making modifications, including
+but not limited to software source code, documentation source, and configuration
+files.
+
+“Object” form shall mean any form resulting from mechanical transformation or
+translation of a Source form, including but not limited to compiled object code,
+generated documentation, and conversions to other media types.
+
+“Work” shall mean the work of authorship, whether in Source or Object form, made
+available under the License, as indicated by a copyright notice that is included
+in or attached to the work (an example is provided in the Appendix below).
+
+“Derivative Works” shall mean any work, whether in Source or Object form, that
+is based on (or derived from) the Work and for which the editorial revisions,
+annotations, elaborations, or other modifications represent, as a whole, an
+original work of authorship. For the purposes of this License, Derivative Works
+shall not include works that remain separable from, or merely link (or bind by
+name) to the interfaces of, the Work and Derivative Works thereof.
+
+“Contribution” shall mean any work of authorship, including the original version
+of the Work and any modifications or additions to that Work or Derivative Works
+thereof, that is intentionally submitted to Licensor for inclusion in the Work
+by the copyright owner or by an individual or Legal Entity authorized to submit
+on behalf of the copyright owner. For the purposes of this definition,
+“submitted” means any form of electronic, verbal, or written communication sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems, and
+issue tracking systems that are managed by, or on behalf of, the Licensor for
+the purpose of discussing and improving the Work, but excluding communication
+that is conspicuously marked or otherwise designated in writing by the copyright
+owner as “Not a Contribution.”
+
+“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
+of whom a Contribution has been received by Licensor and subsequently
+incorporated within the Work.
+
+#### 2. Grant of Copyright License
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.
+
+#### 3. Grant of Patent License
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable (except as stated in this section) patent license to make, have
+made, use, offer to sell, sell, import, and otherwise transfer the Work, where
+such license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by combination
+of their Contribution(s) with the Work to which such Contribution(s) was
+submitted. If You institute patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Work or a
+Contribution incorporated within the Work constitutes direct or contributory
+patent infringement, then any patent licenses granted to You under this License
+for that Work shall terminate as of the date such litigation is filed.
+
+#### 4. Redistribution
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof
+in any medium, with or without modifications, and in Source or Object form,
+provided that You meet the following conditions:
+
+* **(a)** You must give any other recipients of the Work or Derivative Works a copy of
+this License; and
+* **(b)** You must cause any modified files to carry prominent notices stating that You
+changed the files; and
+* **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
+all copyright, patent, trademark, and attribution notices from the Source form
+of the Work, excluding those notices that do not pertain to any part of the
+Derivative Works; and
+* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
+Derivative Works that You distribute must include a readable copy of the
+attribution notices contained within such NOTICE file, excluding those notices
+that do not pertain to any part of the Derivative Works, in at least one of the
+following places: within a NOTICE text file distributed as part of the
+Derivative Works; within the Source form or documentation, if provided along
+with the Derivative Works; or, within a display generated by the Derivative
+Works, if and wherever such third-party notices normally appear. The contents of
+the NOTICE file are for informational purposes only and do not modify the
+License. You may add Your own attribution notices within Derivative Works that
+You distribute, alongside or as an addendum to the NOTICE text from the Work,
+provided that such additional attribution notices cannot be construed as
+modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide
+additional or different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works as a whole,
+provided Your use, reproduction, and distribution of the Work otherwise complies
+with the conditions stated in this License.
+
+#### 5. Submission of Contributions
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted
+for inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the terms of
+any separate license agreement you may have executed with Licensor regarding
+such Contributions.
+
+#### 6. Trademarks
+
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+#### 7. Disclaimer of Warranty
+
+Unless required by applicable law or agreed to in writing, Licensor provides the
+Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
+including, without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
+solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise of
+permissions under this License.
+
+#### 8. Limitation of Liability
+
+In no event and under no legal theory, whether in tort (including negligence),
+contract, or otherwise, unless required by applicable law (such as deliberate
+and grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special, incidental,
+or consequential damages of any character arising as a result of this License or
+out of the use or inability to use the Work (including but not limited to
+damages for loss of goodwill, work stoppage, computer failure or malfunction, or
+any and all other commercial damages or losses), even if such Contributor has
+been advised of the possibility of such damages.
+
+#### 9. Accepting Warranty or Additional Liability
+
+While redistributing the Work or Derivative Works thereof, You may choose to
+offer, and charge a fee for, acceptance of support, warranty, indemnity, or
+other liability obligations and/or rights consistent with this License. However,
+in accepting such obligations, You may act only on Your own behalf and on Your
+sole responsibility, not on behalf of any other Contributor, and only if You
+agree to indemnify, defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason of your
+accepting any such warranty or additional liability.
+
+_END OF TERMS AND CONDITIONS_
+
+### APPENDIX: How to apply the Apache License to your work
+
+To apply the Apache License to your work, attach the following boilerplate
+notice, with the fields enclosed by brackets `[]` replaced with your own
+identifying information. (Don't include the brackets!) The text should be
+enclosed in the appropriate comment syntax for the file format. We also
+recommend that a file or class name and description of purpose be included on
+the same “printed page” as the copyright notice for easier identification within
+third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/vendor/github.com/digitalocean/go-libvirt/README.md b/vendor/github.com/digitalocean/go-libvirt/README.md
new file mode 100644
index 000000000..125262612
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/README.md
@@ -0,0 +1,171 @@
+libvirt [![GoDoc](http://godoc.org/github.com/digitalocean/go-libvirt?status.svg)](http://godoc.org/github.com/digitalocean/go-libvirt) [![Build Status](https://travis-ci.org/digitalocean/go-libvirt.svg?branch=master)](https://travis-ci.org/digitalocean/go-libvirt) [![Report Card](https://goreportcard.com/badge/github.com/digitalocean/go-libvirt)](https://goreportcard.com/report/github.com/digitalocean/go-libvirt)
+====
+
+Package `go-libvirt` provides a pure Go interface for interacting with libvirt.
+
+Rather than using libvirt's C bindings, this package makes use of
+libvirt's RPC interface, as documented [here](https://libvirt.org/internals/rpc.html).
+Connections to the libvirt server may be local, or remote. RPC packets are encoded
+using the XDR standard as defined by [RFC 4506](https://tools.ietf.org/html/rfc4506.html).
+
+libvirt's RPC interface is quite extensive, and changes from one version to the
+next, so this project uses a pair of code generators to build the go bindings.
+The code generators should be run whenever you want to build go-libvirt for a
+new version of libvirt. See the next section for directions on re-generating
+go-libvirt.
+
+[Pull requests are welcome](https://github.com/digitalocean/go-libvirt/blob/master/CONTRIBUTING.md)!
+
+Running the Code Generators
+---------------------------
+
+The code generator doesn't run automatically when you build go-libvirt. It's
+meant to be run manually any time you change the version of libvirt you're
+using. When you download go-libvirt it will come with generated files
+corresponding to a particular version of libvirt. You can use the library as-is,
+but the generated code may be missing libvirt functions, if you're using a newer
+version of libvirt, or it may have extra functions that will return
+'unimplemented' errors if you try to call them. If this is a problem, you should
+re-run the code generator. To do this, follow these steps:
+
+- First, download a copy of the libvirt sources corresponding to the version you
+ want to use.
+- Next, run `autogen.sh` in the libvirt directory. The autotools will check for
+ necessary libraries and prepare libvirt for building. We don't actually need
+ to build libvirt, but we do require some header files that are produced in
+ this step.
+- Finally, set the environment variable `LIBVIRT_SOURCE` to the directory you
+ put libvirt into, and run `go generate ./...` from the go-libvirt directory.
+ This runs both of the go-libvirt's code generators.
+
+How to Use This Library
+-----------------------
+
+Once you've vendored go-libvirt into your project, you'll probably want to call
+some libvirt functions. There's some example code below showing how to connect
+to libvirt and make one such call, but once you get past the introduction you'll
+next want to call some other libvirt functions. How do you find them?
+
+Start with the [libvirt API reference](https://libvirt.org/html/index.html).
+Let's say you want to gracefully shutdown a VM, and after reading through the
+libvirt docs you determine that virDomainShutdown() is the function you want to
+call to do that. Where's that function in go-libvirt? We transform the names
+slightly when building the go bindings. There's no need for a global prefix like
+"vir" in Go, since all our functions are inside the package namespace, so we
+drop it. That means the Go function for `virDomainShutdown()` is just `DomainShutdown()`,
+and sure enough, you can find the Go function `DomainShutdown()` in libvirt.gen.go,
+with parameters and return values equivalent to those documented in the API
+reference.
+
+Suppose you then decide you need more control over your shutdown, so you switch
+over to `virDomainShutdownFlags()`. As its name suggests, this function takes a
+flag parameter which has possible values specified in an enum called
+`virDomainShutdownFlagValues`. Flag types like this are a little tricky for the
+code generator, because the C functions just take an integer type - only the
+libvirt documentation actually ties the flags to the enum types. In most cases
+though we're able to generate a wrapper function with a distinct flag type,
+making it easier for Go tooling to suggest possible flag values while you're
+working. Checking the documentation for this function:
+
+`godoc github.com/digitalocean/go-libvirt DomainShutdownFlags`
+
+returns this:
+
+`func (l *Libvirt) DomainShutdownFlags(Dom Domain, Flags DomainShutdownFlagValues) (err error)`
+
+If you want to see the possible flag values, `godoc` can help again:
+
+```
+$ godoc github.com/digitalocean/go-libvirt DomainShutdownFlagValues
+
+type DomainShutdownFlagValues int32
+ DomainShutdownFlagValues as declared in libvirt/libvirt-domain.h:1121
+
+const (
+ DomainShutdownDefault DomainShutdownFlagValues = iota
+ DomainShutdownAcpiPowerBtn DomainShutdownFlagValues = 1
+ DomainShutdownGuestAgent DomainShutdownFlagValues = 2
+ DomainShutdownInitctl DomainShutdownFlagValues = 4
+ DomainShutdownSignal DomainShutdownFlagValues = 8
+ DomainShutdownParavirt DomainShutdownFlagValues = 16
+)
+ DomainShutdownFlagValues enumeration from libvirt/libvirt-domain.h:1121
+```
+
+One other suggestion: most of the code in go-libvirt is now generated, but a few
+hand-written routines still exist in libvirt.go, and wrap calls to the generated
+code with slightly different parameters or return values. We suggest avoiding
+these hand-written routines and calling the generated routines in libvirt.gen.go
+instead. Over time these handwritten routines will be removed from go-libvirt.
+
+Warning
+-------
+
+While these package are reasonably well-tested and have seen some use inside of
+DigitalOcean, there may be subtle bugs which could cause the packages to act
+in unexpected ways. Use at your own risk!
+
+In addition, the API is not considered stable at this time. If you would like
+to include package `libvirt` in a project, we highly recommend vendoring it into
+your project.
+
+Example
+-------
+
+```go
+package main
+
+import (
+ "fmt"
+ "log"
+ "net"
+ "time"
+
+ "github.com/digitalocean/go-libvirt"
+)
+
+func main() {
+ // This dials libvirt on the local machine, but you can substitute the first
+ // two parameters with "tcp", "<ip address>:<port>" to connect to libvirt on
+ // a remote machine.
+ c, err := net.DialTimeout("unix", "/var/run/libvirt/libvirt-sock", 2*time.Second)
+ if err != nil {
+ log.Fatalf("failed to dial libvirt: %v", err)
+ }
+
+ l := libvirt.New(c)
+ if err := l.Connect(); err != nil {
+ log.Fatalf("failed to connect: %v", err)
+ }
+
+ v, err := l.Version()
+ if err != nil {
+ log.Fatalf("failed to retrieve libvirt version: %v", err)
+ }
+ fmt.Println("Version:", v)
+
+ domains, err := l.Domains()
+ if err != nil {
+ log.Fatalf("failed to retrieve domains: %v", err)
+ }
+
+ fmt.Println("ID\tName\t\tUUID")
+ fmt.Printf("--------------------------------------------------------\n")
+ for _, d := range domains {
+ fmt.Printf("%d\t%s\t%x\n", d.ID, d.Name, d.UUID)
+ }
+
+ if err := l.Disconnect(); err != nil {
+ log.Fatalf("failed to disconnect: %v", err)
+ }
+}
+
+```
+
+```
+Version: 1.3.4
+ID Name UUID
+--------------------------------------------------------
+1 Test-1 dc329f87d4de47198cfd2e21c6105b01
+2 Test-2 dc229f87d4de47198cfd2e21c6105b01
+```
diff --git a/vendor/github.com/digitalocean/go-libvirt/const.gen.go b/vendor/github.com/digitalocean/go-libvirt/const.gen.go
new file mode 100644
index 000000000..6e581d22c
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/const.gen.go
@@ -0,0 +1,2414 @@
+// Copyright 2018 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// WARNING: This file has automatically been generated
+// Code generated by https://git.io/c-for-go. DO NOT EDIT.
+
+package libvirt
+
+const (
+ // ExportVar as defined in libvirt/libvirt-common.h:57
+ ExportVar = 0
+ // TypedParamFieldLength as defined in libvirt/libvirt-common.h:170
+ TypedParamFieldLength = 80
+ // SecurityLabelBuflen as defined in libvirt/libvirt-host.h:84
+ SecurityLabelBuflen = 4097
+ // SecurityModelBuflen as defined in libvirt/libvirt-host.h:112
+ SecurityModelBuflen = 257
+ // SecurityDoiBuflen as defined in libvirt/libvirt-host.h:119
+ SecurityDoiBuflen = 257
+ // NodeCPUStatsFieldLength as defined in libvirt/libvirt-host.h:180
+ NodeCPUStatsFieldLength = 80
+ // NodeCPUStatsKernel as defined in libvirt/libvirt-host.h:197
+ NodeCPUStatsKernel = "kernel"
+ // NodeCPUStatsUser as defined in libvirt/libvirt-host.h:205
+ NodeCPUStatsUser = "user"
+ // NodeCPUStatsIdle as defined in libvirt/libvirt-host.h:213
+ NodeCPUStatsIdle = "idle"
+ // NodeCPUStatsIowait as defined in libvirt/libvirt-host.h:221
+ NodeCPUStatsIowait = "iowait"
+ // NodeCPUStatsIntr as defined in libvirt/libvirt-host.h:229
+ NodeCPUStatsIntr = "intr"
+ // NodeCPUStatsUtilization as defined in libvirt/libvirt-host.h:238
+ NodeCPUStatsUtilization = "utilization"
+ // NodeMemoryStatsFieldLength as defined in libvirt/libvirt-host.h:258
+ NodeMemoryStatsFieldLength = 80
+ // NodeMemoryStatsTotal as defined in libvirt/libvirt-host.h:275
+ NodeMemoryStatsTotal = "total"
+ // NodeMemoryStatsFree as defined in libvirt/libvirt-host.h:284
+ NodeMemoryStatsFree = "free"
+ // NodeMemoryStatsBuffers as defined in libvirt/libvirt-host.h:292
+ NodeMemoryStatsBuffers = "buffers"
+ // NodeMemoryStatsCached as defined in libvirt/libvirt-host.h:300
+ NodeMemoryStatsCached = "cached"
+ // NodeMemorySharedPagesToScan as defined in libvirt/libvirt-host.h:321
+ NodeMemorySharedPagesToScan = "shm_pages_to_scan"
+ // NodeMemorySharedSleepMillisecs as defined in libvirt/libvirt-host.h:329
+ NodeMemorySharedSleepMillisecs = "shm_sleep_millisecs"
+ // NodeMemorySharedPagesShared as defined in libvirt/libvirt-host.h:337
+ NodeMemorySharedPagesShared = "shm_pages_shared"
+ // NodeMemorySharedPagesSharing as defined in libvirt/libvirt-host.h:345
+ NodeMemorySharedPagesSharing = "shm_pages_sharing"
+ // NodeMemorySharedPagesUnshared as defined in libvirt/libvirt-host.h:353
+ NodeMemorySharedPagesUnshared = "shm_pages_unshared"
+ // NodeMemorySharedPagesVolatile as defined in libvirt/libvirt-host.h:361
+ NodeMemorySharedPagesVolatile = "shm_pages_volatile"
+ // NodeMemorySharedFullScans as defined in libvirt/libvirt-host.h:369
+ NodeMemorySharedFullScans = "shm_full_scans"
+ // NodeMemorySharedMergeAcrossNodes as defined in libvirt/libvirt-host.h:381
+ NodeMemorySharedMergeAcrossNodes = "shm_merge_across_nodes"
+ // NodeSevPdh as defined in libvirt/libvirt-host.h:449
+ NodeSevPdh = "pdh"
+ // NodeSevCertChain as defined in libvirt/libvirt-host.h:458
+ NodeSevCertChain = "cert-chain"
+ // NodeSevCbitpos as defined in libvirt/libvirt-host.h:465
+ NodeSevCbitpos = "cbitpos"
+ // NodeSevReducedPhysBits as defined in libvirt/libvirt-host.h:473
+ NodeSevReducedPhysBits = "reduced-phys-bits"
+ // UUIDBuflen as defined in libvirt/libvirt-host.h:558
+ UUIDBuflen = 16
+ // UUIDStringBuflen as defined in libvirt/libvirt-host.h:567
+ UUIDStringBuflen = 37
+ // ConnectIdentityUserName as defined in libvirt/libvirt-host.h:592
+ ConnectIdentityUserName = "user-name"
+ // ConnectIdentityUnixUserID as defined in libvirt/libvirt-host.h:599
+ ConnectIdentityUnixUserID = "unix-user-id"
+ // ConnectIdentityGroupName as defined in libvirt/libvirt-host.h:606
+ ConnectIdentityGroupName = "group-name"
+ // ConnectIdentityUnixGroupID as defined in libvirt/libvirt-host.h:613
+ ConnectIdentityUnixGroupID = "unix-group-id"
+ // ConnectIdentityProcessID as defined in libvirt/libvirt-host.h:620
+ ConnectIdentityProcessID = "process-id"
+ // ConnectIdentityProcessTime as defined in libvirt/libvirt-host.h:631
+ ConnectIdentityProcessTime = "process-time"
+ // ConnectIdentitySaslUserName as defined in libvirt/libvirt-host.h:638
+ ConnectIdentitySaslUserName = "sasl-user-name"
+ // ConnectIdentityX509DistinguishedName as defined in libvirt/libvirt-host.h:645
+ ConnectIdentityX509DistinguishedName = "x509-distinguished-name"
+ // ConnectIdentitySelinuxContext as defined in libvirt/libvirt-host.h:652
+ ConnectIdentitySelinuxContext = "selinux-context"
+ // DomainSchedulerCPUShares as defined in libvirt/libvirt-domain.h:316
+ DomainSchedulerCPUShares = "cpu_shares"
+ // DomainSchedulerGlobalPeriod as defined in libvirt/libvirt-domain.h:324
+ DomainSchedulerGlobalPeriod = "global_period"
+ // DomainSchedulerGlobalQuota as defined in libvirt/libvirt-domain.h:332
+ DomainSchedulerGlobalQuota = "global_quota"
+ // DomainSchedulerVCPUPeriod as defined in libvirt/libvirt-domain.h:340
+ DomainSchedulerVCPUPeriod = "vcpu_period"
+ // DomainSchedulerVCPUQuota as defined in libvirt/libvirt-domain.h:348
+ DomainSchedulerVCPUQuota = "vcpu_quota"
+ // DomainSchedulerEmulatorPeriod as defined in libvirt/libvirt-domain.h:357
+ DomainSchedulerEmulatorPeriod = "emulator_period"
+ // DomainSchedulerEmulatorQuota as defined in libvirt/libvirt-domain.h:366
+ DomainSchedulerEmulatorQuota = "emulator_quota"
+ // DomainSchedulerIothreadPeriod as defined in libvirt/libvirt-domain.h:374
+ DomainSchedulerIothreadPeriod = "iothread_period"
+ // DomainSchedulerIothreadQuota as defined in libvirt/libvirt-domain.h:382
+ DomainSchedulerIothreadQuota = "iothread_quota"
+ // DomainSchedulerWeight as defined in libvirt/libvirt-domain.h:390
+ DomainSchedulerWeight = "weight"
+ // DomainSchedulerCap as defined in libvirt/libvirt-domain.h:398
+ DomainSchedulerCap = "cap"
+ // DomainSchedulerReservation as defined in libvirt/libvirt-domain.h:406
+ DomainSchedulerReservation = "reservation"
+ // DomainSchedulerLimit as defined in libvirt/libvirt-domain.h:414
+ DomainSchedulerLimit = "limit"
+ // DomainSchedulerShares as defined in libvirt/libvirt-domain.h:422
+ DomainSchedulerShares = "shares"
+ // DomainBlockStatsFieldLength as defined in libvirt/libvirt-domain.h:480
+ DomainBlockStatsFieldLength = 80
+ // DomainBlockStatsReadBytes as defined in libvirt/libvirt-domain.h:488
+ DomainBlockStatsReadBytes = "rd_bytes"
+ // DomainBlockStatsReadReq as defined in libvirt/libvirt-domain.h:496
+ DomainBlockStatsReadReq = "rd_operations"
+ // DomainBlockStatsReadTotalTimes as defined in libvirt/libvirt-domain.h:504
+ DomainBlockStatsReadTotalTimes = "rd_total_times"
+ // DomainBlockStatsWriteBytes as defined in libvirt/libvirt-domain.h:512
+ DomainBlockStatsWriteBytes = "wr_bytes"
+ // DomainBlockStatsWriteReq as defined in libvirt/libvirt-domain.h:520
+ DomainBlockStatsWriteReq = "wr_operations"
+ // DomainBlockStatsWriteTotalTimes as defined in libvirt/libvirt-domain.h:528
+ DomainBlockStatsWriteTotalTimes = "wr_total_times"
+ // DomainBlockStatsFlushReq as defined in libvirt/libvirt-domain.h:536
+ DomainBlockStatsFlushReq = "flush_operations"
+ // DomainBlockStatsFlushTotalTimes as defined in libvirt/libvirt-domain.h:544
+ DomainBlockStatsFlushTotalTimes = "flush_total_times"
+ // DomainBlockStatsErrs as defined in libvirt/libvirt-domain.h:551
+ DomainBlockStatsErrs = "errs"
+ // MigrateParamURI as defined in libvirt/libvirt-domain.h:868
+ MigrateParamURI = "migrate_uri"
+ // MigrateParamDestName as defined in libvirt/libvirt-domain.h:878
+ MigrateParamDestName = "destination_name"
+ // MigrateParamDestXML as defined in libvirt/libvirt-domain.h:897
+ MigrateParamDestXML = "destination_xml"
+ // MigrateParamPersistXML as defined in libvirt/libvirt-domain.h:912
+ MigrateParamPersistXML = "persistent_xml"
+ // MigrateParamBandwidth as defined in libvirt/libvirt-domain.h:922
+ MigrateParamBandwidth = "bandwidth"
+ // MigrateParamBandwidthPostcopy as defined in libvirt/libvirt-domain.h:931
+ MigrateParamBandwidthPostcopy = "bandwidth.postcopy"
+ // MigrateParamGraphicsURI as defined in libvirt/libvirt-domain.h:952
+ MigrateParamGraphicsURI = "graphics_uri"
+ // MigrateParamListenAddress as defined in libvirt/libvirt-domain.h:963
+ MigrateParamListenAddress = "listen_address"
+ // MigrateParamMigrateDisks as defined in libvirt/libvirt-domain.h:972
+ MigrateParamMigrateDisks = "migrate_disks"
+ // MigrateParamDisksPort as defined in libvirt/libvirt-domain.h:982
+ MigrateParamDisksPort = "disks_port"
+ // MigrateParamCompression as defined in libvirt/libvirt-domain.h:992
+ MigrateParamCompression = "compression"
+ // MigrateParamCompressionMtLevel as defined in libvirt/libvirt-domain.h:1001
+ MigrateParamCompressionMtLevel = "compression.mt.level"
+ // MigrateParamCompressionMtThreads as defined in libvirt/libvirt-domain.h:1009
+ MigrateParamCompressionMtThreads = "compression.mt.threads"
+ // MigrateParamCompressionMtDthreads as defined in libvirt/libvirt-domain.h:1017
+ MigrateParamCompressionMtDthreads = "compression.mt.dthreads"
+ // MigrateParamCompressionXbzrleCache as defined in libvirt/libvirt-domain.h:1025
+ MigrateParamCompressionXbzrleCache = "compression.xbzrle.cache"
+ // MigrateParamAutoConvergeInitial as defined in libvirt/libvirt-domain.h:1034
+ MigrateParamAutoConvergeInitial = "auto_converge.initial"
+ // MigrateParamAutoConvergeIncrement as defined in libvirt/libvirt-domain.h:1044
+ MigrateParamAutoConvergeIncrement = "auto_converge.increment"
+ // MigrateParamParallelConnections as defined in libvirt/libvirt-domain.h:1052
+ MigrateParamParallelConnections = "parallel.connections"
+ // MigrateParamTLSDestination as defined in libvirt/libvirt-domain.h:1066
+ MigrateParamTLSDestination = "tls.destination"
+ // DomainCPUStatsCputime as defined in libvirt/libvirt-domain.h:1326
+ DomainCPUStatsCputime = "cpu_time"
+ // DomainCPUStatsUsertime as defined in libvirt/libvirt-domain.h:1332
+ DomainCPUStatsUsertime = "user_time"
+ // DomainCPUStatsSystemtime as defined in libvirt/libvirt-domain.h:1338
+ DomainCPUStatsSystemtime = "system_time"
+ // DomainCPUStatsVcputime as defined in libvirt/libvirt-domain.h:1345
+ DomainCPUStatsVcputime = "vcpu_time"
+ // DomainBlkioWeight as defined in libvirt/libvirt-domain.h:1374
+ DomainBlkioWeight = "weight"
+ // DomainBlkioDeviceWeight as defined in libvirt/libvirt-domain.h:1384
+ DomainBlkioDeviceWeight = "device_weight"
+ // DomainBlkioDeviceReadIops as defined in libvirt/libvirt-domain.h:1395
+ DomainBlkioDeviceReadIops = "device_read_iops_sec"
+ // DomainBlkioDeviceWriteIops as defined in libvirt/libvirt-domain.h:1406
+ DomainBlkioDeviceWriteIops = "device_write_iops_sec"
+ // DomainBlkioDeviceReadBps as defined in libvirt/libvirt-domain.h:1417
+ DomainBlkioDeviceReadBps = "device_read_bytes_sec"
+ // DomainBlkioDeviceWriteBps as defined in libvirt/libvirt-domain.h:1428
+ DomainBlkioDeviceWriteBps = "device_write_bytes_sec"
+ // DomainMemoryParamUnlimited as defined in libvirt/libvirt-domain.h:1447
+ DomainMemoryParamUnlimited = 9007199254740991
+ // DomainMemoryHardLimit as defined in libvirt/libvirt-domain.h:1456
+ DomainMemoryHardLimit = "hard_limit"
+ // DomainMemorySoftLimit as defined in libvirt/libvirt-domain.h:1465
+ DomainMemorySoftLimit = "soft_limit"
+ // DomainMemoryMinGuarantee as defined in libvirt/libvirt-domain.h:1474
+ DomainMemoryMinGuarantee = "min_guarantee"
+ // DomainMemorySwapHardLimit as defined in libvirt/libvirt-domain.h:1484
+ DomainMemorySwapHardLimit = "swap_hard_limit"
+ // DomainNumaNodeset as defined in libvirt/libvirt-domain.h:1529
+ DomainNumaNodeset = "numa_nodeset"
+ // DomainNumaMode as defined in libvirt/libvirt-domain.h:1537
+ DomainNumaMode = "numa_mode"
+ // DomainBandwidthInAverage as defined in libvirt/libvirt-domain.h:1653
+ DomainBandwidthInAverage = "inbound.average"
+ // DomainBandwidthInPeak as defined in libvirt/libvirt-domain.h:1660
+ DomainBandwidthInPeak = "inbound.peak"
+ // DomainBandwidthInBurst as defined in libvirt/libvirt-domain.h:1667
+ DomainBandwidthInBurst = "inbound.burst"
+ // DomainBandwidthInFloor as defined in libvirt/libvirt-domain.h:1674
+ DomainBandwidthInFloor = "inbound.floor"
+ // DomainBandwidthOutAverage as defined in libvirt/libvirt-domain.h:1681
+ DomainBandwidthOutAverage = "outbound.average"
+ // DomainBandwidthOutPeak as defined in libvirt/libvirt-domain.h:1688
+ DomainBandwidthOutPeak = "outbound.peak"
+ // DomainBandwidthOutBurst as defined in libvirt/libvirt-domain.h:1695
+ DomainBandwidthOutBurst = "outbound.burst"
+ // DomainIothreadPollMaxNs as defined in libvirt/libvirt-domain.h:1995
+ DomainIothreadPollMaxNs = "poll_max_ns"
+ // DomainIothreadPollGrow as defined in libvirt/libvirt-domain.h:2005
+ DomainIothreadPollGrow = "poll_grow"
+ // DomainIothreadPollShrink as defined in libvirt/libvirt-domain.h:2016
+ DomainIothreadPollShrink = "poll_shrink"
+ // PerfParamCmt as defined in libvirt/libvirt-domain.h:2208
+ PerfParamCmt = "cmt"
+ // PerfParamMbmt as defined in libvirt/libvirt-domain.h:2219
+ PerfParamMbmt = "mbmt"
+ // PerfParamMbml as defined in libvirt/libvirt-domain.h:2229
+ PerfParamMbml = "mbml"
+ // PerfParamCacheMisses as defined in libvirt/libvirt-domain.h:2239
+ PerfParamCacheMisses = "cache_misses"
+ // PerfParamCacheReferences as defined in libvirt/libvirt-domain.h:2249
+ PerfParamCacheReferences = "cache_references"
+ // PerfParamInstructions as defined in libvirt/libvirt-domain.h:2259
+ PerfParamInstructions = "instructions"
+ // PerfParamCPUCycles as defined in libvirt/libvirt-domain.h:2269
+ PerfParamCPUCycles = "cpu_cycles"
+ // PerfParamBranchInstructions as defined in libvirt/libvirt-domain.h:2279
+ PerfParamBranchInstructions = "branch_instructions"
+ // PerfParamBranchMisses as defined in libvirt/libvirt-domain.h:2289
+ PerfParamBranchMisses = "branch_misses"
+ // PerfParamBusCycles as defined in libvirt/libvirt-domain.h:2299
+ PerfParamBusCycles = "bus_cycles"
+ // PerfParamStalledCyclesFrontend as defined in libvirt/libvirt-domain.h:2310
+ PerfParamStalledCyclesFrontend = "stalled_cycles_frontend"
+ // PerfParamStalledCyclesBackend as defined in libvirt/libvirt-domain.h:2321
+ PerfParamStalledCyclesBackend = "stalled_cycles_backend"
+ // PerfParamRefCPUCycles as defined in libvirt/libvirt-domain.h:2332
+ PerfParamRefCPUCycles = "ref_cpu_cycles"
+ // PerfParamCPUClock as defined in libvirt/libvirt-domain.h:2343
+ PerfParamCPUClock = "cpu_clock"
+ // PerfParamTaskClock as defined in libvirt/libvirt-domain.h:2354
+ PerfParamTaskClock = "task_clock"
+ // PerfParamPageFaults as defined in libvirt/libvirt-domain.h:2364
+ PerfParamPageFaults = "page_faults"
+ // PerfParamContextSwitches as defined in libvirt/libvirt-domain.h:2374
+ PerfParamContextSwitches = "context_switches"
+ // PerfParamCPUMigrations as defined in libvirt/libvirt-domain.h:2384
+ PerfParamCPUMigrations = "cpu_migrations"
+ // PerfParamPageFaultsMin as defined in libvirt/libvirt-domain.h:2394
+ PerfParamPageFaultsMin = "page_faults_min"
+ // PerfParamPageFaultsMaj as defined in libvirt/libvirt-domain.h:2404
+ PerfParamPageFaultsMaj = "page_faults_maj"
+ // PerfParamAlignmentFaults as defined in libvirt/libvirt-domain.h:2414
+ PerfParamAlignmentFaults = "alignment_faults"
+ // PerfParamEmulationFaults as defined in libvirt/libvirt-domain.h:2424
+ PerfParamEmulationFaults = "emulation_faults"
+ // DomainBlockCopyBandwidth as defined in libvirt/libvirt-domain.h:2592
+ DomainBlockCopyBandwidth = "bandwidth"
+ // DomainBlockCopyGranularity as defined in libvirt/libvirt-domain.h:2603
+ DomainBlockCopyGranularity = "granularity"
+ // DomainBlockCopyBufSize as defined in libvirt/libvirt-domain.h:2612
+ DomainBlockCopyBufSize = "buf-size"
+ // DomainBlockIotuneTotalBytesSec as defined in libvirt/libvirt-domain.h:2653
+ DomainBlockIotuneTotalBytesSec = "total_bytes_sec"
+ // DomainBlockIotuneReadBytesSec as defined in libvirt/libvirt-domain.h:2661
+ DomainBlockIotuneReadBytesSec = "read_bytes_sec"
+ // DomainBlockIotuneWriteBytesSec as defined in libvirt/libvirt-domain.h:2669
+ DomainBlockIotuneWriteBytesSec = "write_bytes_sec"
+ // DomainBlockIotuneTotalIopsSec as defined in libvirt/libvirt-domain.h:2677
+ DomainBlockIotuneTotalIopsSec = "total_iops_sec"
+ // DomainBlockIotuneReadIopsSec as defined in libvirt/libvirt-domain.h:2685
+ DomainBlockIotuneReadIopsSec = "read_iops_sec"
+ // DomainBlockIotuneWriteIopsSec as defined in libvirt/libvirt-domain.h:2692
+ DomainBlockIotuneWriteIopsSec = "write_iops_sec"
+ // DomainBlockIotuneTotalBytesSecMax as defined in libvirt/libvirt-domain.h:2700
+ DomainBlockIotuneTotalBytesSecMax = "total_bytes_sec_max"
+ // DomainBlockIotuneReadBytesSecMax as defined in libvirt/libvirt-domain.h:2708
+ DomainBlockIotuneReadBytesSecMax = "read_bytes_sec_max"
+ // DomainBlockIotuneWriteBytesSecMax as defined in libvirt/libvirt-domain.h:2716
+ DomainBlockIotuneWriteBytesSecMax = "write_bytes_sec_max"
+ // DomainBlockIotuneTotalIopsSecMax as defined in libvirt/libvirt-domain.h:2724
+ DomainBlockIotuneTotalIopsSecMax = "total_iops_sec_max"
+ // DomainBlockIotuneReadIopsSecMax as defined in libvirt/libvirt-domain.h:2732
+ DomainBlockIotuneReadIopsSecMax = "read_iops_sec_max"
+ // DomainBlockIotuneWriteIopsSecMax as defined in libvirt/libvirt-domain.h:2739
+ DomainBlockIotuneWriteIopsSecMax = "write_iops_sec_max"
+ // DomainBlockIotuneTotalBytesSecMaxLength as defined in libvirt/libvirt-domain.h:2747
+ DomainBlockIotuneTotalBytesSecMaxLength = "total_bytes_sec_max_length"
+ // DomainBlockIotuneReadBytesSecMaxLength as defined in libvirt/libvirt-domain.h:2755
+ DomainBlockIotuneReadBytesSecMaxLength = "read_bytes_sec_max_length"
+ // DomainBlockIotuneWriteBytesSecMaxLength as defined in libvirt/libvirt-domain.h:2763
+ DomainBlockIotuneWriteBytesSecMaxLength = "write_bytes_sec_max_length"
+ // DomainBlockIotuneTotalIopsSecMaxLength as defined in libvirt/libvirt-domain.h:2771
+ DomainBlockIotuneTotalIopsSecMaxLength = "total_iops_sec_max_length"
+ // DomainBlockIotuneReadIopsSecMaxLength as defined in libvirt/libvirt-domain.h:2779
+ DomainBlockIotuneReadIopsSecMaxLength = "read_iops_sec_max_length"
+ // DomainBlockIotuneWriteIopsSecMaxLength as defined in libvirt/libvirt-domain.h:2787
+ DomainBlockIotuneWriteIopsSecMaxLength = "write_iops_sec_max_length"
+ // DomainBlockIotuneSizeIopsSec as defined in libvirt/libvirt-domain.h:2794
+ DomainBlockIotuneSizeIopsSec = "size_iops_sec"
+ // DomainBlockIotuneGroupName as defined in libvirt/libvirt-domain.h:2801
+ DomainBlockIotuneGroupName = "group_name"
+ // KeycodeSetRfb as defined in libvirt/libvirt-domain.h:2882
+ KeycodeSetRfb = 0
+ // DomainSendKeyMaxKeys as defined in libvirt/libvirt-domain.h:2889
+ DomainSendKeyMaxKeys = 16
+ // DomainJobOperationStr as defined in libvirt/libvirt-domain.h:3304
+ DomainJobOperationStr = "operation"
+ // DomainJobTimeElapsed as defined in libvirt/libvirt-domain.h:3314
+ DomainJobTimeElapsed = "time_elapsed"
+ // DomainJobTimeElapsedNet as defined in libvirt/libvirt-domain.h:3324
+ DomainJobTimeElapsedNet = "time_elapsed_net"
+ // DomainJobTimeRemaining as defined in libvirt/libvirt-domain.h:3334
+ DomainJobTimeRemaining = "time_remaining"
+ // DomainJobDowntime as defined in libvirt/libvirt-domain.h:3344
+ DomainJobDowntime = "downtime"
+ // DomainJobDowntimeNet as defined in libvirt/libvirt-domain.h:3353
+ DomainJobDowntimeNet = "downtime_net"
+ // DomainJobSetupTime as defined in libvirt/libvirt-domain.h:3362
+ DomainJobSetupTime = "setup_time"
+ // DomainJobDataTotal as defined in libvirt/libvirt-domain.h:3377
+ DomainJobDataTotal = "data_total"
+ // DomainJobDataProcessed as defined in libvirt/libvirt-domain.h:3387
+ DomainJobDataProcessed = "data_processed"
+ // DomainJobDataRemaining as defined in libvirt/libvirt-domain.h:3397
+ DomainJobDataRemaining = "data_remaining"
+ // DomainJobMemoryTotal as defined in libvirt/libvirt-domain.h:3407
+ DomainJobMemoryTotal = "memory_total"
+ // DomainJobMemoryProcessed as defined in libvirt/libvirt-domain.h:3417
+ DomainJobMemoryProcessed = "memory_processed"
+ // DomainJobMemoryRemaining as defined in libvirt/libvirt-domain.h:3427
+ DomainJobMemoryRemaining = "memory_remaining"
+ // DomainJobMemoryConstant as defined in libvirt/libvirt-domain.h:3439
+ DomainJobMemoryConstant = "memory_constant"
+ // DomainJobMemoryNormal as defined in libvirt/libvirt-domain.h:3449
+ DomainJobMemoryNormal = "memory_normal"
+ // DomainJobMemoryNormalBytes as defined in libvirt/libvirt-domain.h:3459
+ DomainJobMemoryNormalBytes = "memory_normal_bytes"
+ // DomainJobMemoryBps as defined in libvirt/libvirt-domain.h:3467
+ DomainJobMemoryBps = "memory_bps"
+ // DomainJobMemoryDirtyRate as defined in libvirt/libvirt-domain.h:3475
+ DomainJobMemoryDirtyRate = "memory_dirty_rate"
+ // DomainJobMemoryPageSize as defined in libvirt/libvirt-domain.h:3486
+ DomainJobMemoryPageSize = "memory_page_size"
+ // DomainJobMemoryIteration as defined in libvirt/libvirt-domain.h:3497
+ DomainJobMemoryIteration = "memory_iteration"
+ // DomainJobMemoryPostcopyReqs as defined in libvirt/libvirt-domain.h:3507
+ DomainJobMemoryPostcopyReqs = "memory_postcopy_requests"
+ // DomainJobDiskTotal as defined in libvirt/libvirt-domain.h:3517
+ DomainJobDiskTotal = "disk_total"
+ // DomainJobDiskProcessed as defined in libvirt/libvirt-domain.h:3527
+ DomainJobDiskProcessed = "disk_processed"
+ // DomainJobDiskRemaining as defined in libvirt/libvirt-domain.h:3537
+ DomainJobDiskRemaining = "disk_remaining"
+ // DomainJobDiskBps as defined in libvirt/libvirt-domain.h:3545
+ DomainJobDiskBps = "disk_bps"
+ // DomainJobCompressionCache as defined in libvirt/libvirt-domain.h:3554
+ DomainJobCompressionCache = "compression_cache"
+ // DomainJobCompressionBytes as defined in libvirt/libvirt-domain.h:3562
+ DomainJobCompressionBytes = "compression_bytes"
+ // DomainJobCompressionPages as defined in libvirt/libvirt-domain.h:3570
+ DomainJobCompressionPages = "compression_pages"
+ // DomainJobCompressionCacheMisses as defined in libvirt/libvirt-domain.h:3579
+ DomainJobCompressionCacheMisses = "compression_cache_misses"
+ // DomainJobCompressionOverflow as defined in libvirt/libvirt-domain.h:3589
+ DomainJobCompressionOverflow = "compression_overflow"
+ // DomainJobAutoConvergeThrottle as defined in libvirt/libvirt-domain.h:3598
+ DomainJobAutoConvergeThrottle = "auto_converge_throttle"
+ // DomainJobSuccess as defined in libvirt/libvirt-domain.h:3606
+ DomainJobSuccess = "success"
+ // DomainJobDiskTempUsed as defined in libvirt/libvirt-domain.h:3613
+ DomainJobDiskTempUsed = "disk_temp_used"
+ // DomainJobDiskTempTotal as defined in libvirt/libvirt-domain.h:3620
+ DomainJobDiskTempTotal = "disk_temp_total"
+ // DomainTunableCPUVcpupin as defined in libvirt/libvirt-domain.h:4175
+ DomainTunableCPUVcpupin = "cputune.vcpupin%u"
+ // DomainTunableCPUEmulatorpin as defined in libvirt/libvirt-domain.h:4183
+ DomainTunableCPUEmulatorpin = "cputune.emulatorpin"
+ // DomainTunableCPUIothreadspin as defined in libvirt/libvirt-domain.h:4192
+ DomainTunableCPUIothreadspin = "cputune.iothreadpin%u"
+ // DomainTunableCPUCpuShares as defined in libvirt/libvirt-domain.h:4200
+ DomainTunableCPUCpuShares = "cputune.cpu_shares"
+ // DomainTunableCPUGlobalPeriod as defined in libvirt/libvirt-domain.h:4208
+ DomainTunableCPUGlobalPeriod = "cputune.global_period"
+ // DomainTunableCPUGlobalQuota as defined in libvirt/libvirt-domain.h:4216
+ DomainTunableCPUGlobalQuota = "cputune.global_quota"
+ // DomainTunableCPUVCPUPeriod as defined in libvirt/libvirt-domain.h:4224
+ DomainTunableCPUVCPUPeriod = "cputune.vcpu_period"
+ // DomainTunableCPUVCPUQuota as defined in libvirt/libvirt-domain.h:4232
+ DomainTunableCPUVCPUQuota = "cputune.vcpu_quota"
+ // DomainTunableCPUEmulatorPeriod as defined in libvirt/libvirt-domain.h:4241
+ DomainTunableCPUEmulatorPeriod = "cputune.emulator_period"
+ // DomainTunableCPUEmulatorQuota as defined in libvirt/libvirt-domain.h:4250
+ DomainTunableCPUEmulatorQuota = "cputune.emulator_quota"
+ // DomainTunableCPUIothreadPeriod as defined in libvirt/libvirt-domain.h:4258
+ DomainTunableCPUIothreadPeriod = "cputune.iothread_period"
+ // DomainTunableCPUIothreadQuota as defined in libvirt/libvirt-domain.h:4266
+ DomainTunableCPUIothreadQuota = "cputune.iothread_quota"
+ // DomainTunableBlkdevDisk as defined in libvirt/libvirt-domain.h:4274
+ DomainTunableBlkdevDisk = "blkdeviotune.disk"
+ // DomainTunableBlkdevTotalBytesSec as defined in libvirt/libvirt-domain.h:4282
+ DomainTunableBlkdevTotalBytesSec = "blkdeviotune.total_bytes_sec"
+ // DomainTunableBlkdevReadBytesSec as defined in libvirt/libvirt-domain.h:4290
+ DomainTunableBlkdevReadBytesSec = "blkdeviotune.read_bytes_sec"
+ // DomainTunableBlkdevWriteBytesSec as defined in libvirt/libvirt-domain.h:4298
+ DomainTunableBlkdevWriteBytesSec = "blkdeviotune.write_bytes_sec"
+ // DomainTunableBlkdevTotalIopsSec as defined in libvirt/libvirt-domain.h:4306
+ DomainTunableBlkdevTotalIopsSec = "blkdeviotune.total_iops_sec"
+ // DomainTunableBlkdevReadIopsSec as defined in libvirt/libvirt-domain.h:4314
+ DomainTunableBlkdevReadIopsSec = "blkdeviotune.read_iops_sec"
+ // DomainTunableBlkdevWriteIopsSec as defined in libvirt/libvirt-domain.h:4322
+ DomainTunableBlkdevWriteIopsSec = "blkdeviotune.write_iops_sec"
+ // DomainTunableBlkdevTotalBytesSecMax as defined in libvirt/libvirt-domain.h:4330
+ DomainTunableBlkdevTotalBytesSecMax = "blkdeviotune.total_bytes_sec_max"
+ // DomainTunableBlkdevReadBytesSecMax as defined in libvirt/libvirt-domain.h:4338
+ DomainTunableBlkdevReadBytesSecMax = "blkdeviotune.read_bytes_sec_max"
+ // DomainTunableBlkdevWriteBytesSecMax as defined in libvirt/libvirt-domain.h:4346
+ DomainTunableBlkdevWriteBytesSecMax = "blkdeviotune.write_bytes_sec_max"
+ // DomainTunableBlkdevTotalIopsSecMax as defined in libvirt/libvirt-domain.h:4354
+ DomainTunableBlkdevTotalIopsSecMax = "blkdeviotune.total_iops_sec_max"
+ // DomainTunableBlkdevReadIopsSecMax as defined in libvirt/libvirt-domain.h:4362
+ DomainTunableBlkdevReadIopsSecMax = "blkdeviotune.read_iops_sec_max"
+ // DomainTunableBlkdevWriteIopsSecMax as defined in libvirt/libvirt-domain.h:4370
+ DomainTunableBlkdevWriteIopsSecMax = "blkdeviotune.write_iops_sec_max"
+ // DomainTunableBlkdevSizeIopsSec as defined in libvirt/libvirt-domain.h:4378
+ DomainTunableBlkdevSizeIopsSec = "blkdeviotune.size_iops_sec"
+ // DomainTunableBlkdevGroupName as defined in libvirt/libvirt-domain.h:4386
+ DomainTunableBlkdevGroupName = "blkdeviotune.group_name"
+ // DomainTunableBlkdevTotalBytesSecMaxLength as defined in libvirt/libvirt-domain.h:4395
+ DomainTunableBlkdevTotalBytesSecMaxLength = "blkdeviotune.total_bytes_sec_max_length"
+ // DomainTunableBlkdevReadBytesSecMaxLength as defined in libvirt/libvirt-domain.h:4404
+ DomainTunableBlkdevReadBytesSecMaxLength = "blkdeviotune.read_bytes_sec_max_length"
+ // DomainTunableBlkdevWriteBytesSecMaxLength as defined in libvirt/libvirt-domain.h:4413
+ DomainTunableBlkdevWriteBytesSecMaxLength = "blkdeviotune.write_bytes_sec_max_length"
+ // DomainTunableBlkdevTotalIopsSecMaxLength as defined in libvirt/libvirt-domain.h:4422
+ DomainTunableBlkdevTotalIopsSecMaxLength = "blkdeviotune.total_iops_sec_max_length"
+ // DomainTunableBlkdevReadIopsSecMaxLength as defined in libvirt/libvirt-domain.h:4431
+ DomainTunableBlkdevReadIopsSecMaxLength = "blkdeviotune.read_iops_sec_max_length"
+ // DomainTunableBlkdevWriteIopsSecMaxLength as defined in libvirt/libvirt-domain.h:4440
+ DomainTunableBlkdevWriteIopsSecMaxLength = "blkdeviotune.write_iops_sec_max_length"
+ // DomainSchedFieldLength as defined in libvirt/libvirt-domain.h:4728
+ DomainSchedFieldLength = 80
+ // DomainBlkioFieldLength as defined in libvirt/libvirt-domain.h:4772
+ DomainBlkioFieldLength = 80
+ // DomainMemoryFieldLength as defined in libvirt/libvirt-domain.h:4816
+ DomainMemoryFieldLength = 80
+ // DomainLaunchSecuritySevMeasurement as defined in libvirt/libvirt-domain.h:4942
+ DomainLaunchSecuritySevMeasurement = "sev-measurement"
+ // NetworkPortBandwidthInAverage as defined in libvirt/libvirt-network.h:391
+ NetworkPortBandwidthInAverage = "inbound.average"
+ // NetworkPortBandwidthInPeak as defined in libvirt/libvirt-network.h:398
+ NetworkPortBandwidthInPeak = "inbound.peak"
+ // NetworkPortBandwidthInBurst as defined in libvirt/libvirt-network.h:405
+ NetworkPortBandwidthInBurst = "inbound.burst"
+ // NetworkPortBandwidthInFloor as defined in libvirt/libvirt-network.h:412
+ NetworkPortBandwidthInFloor = "inbound.floor"
+ // NetworkPortBandwidthOutAverage as defined in libvirt/libvirt-network.h:419
+ NetworkPortBandwidthOutAverage = "outbound.average"
+ // NetworkPortBandwidthOutPeak as defined in libvirt/libvirt-network.h:426
+ NetworkPortBandwidthOutPeak = "outbound.peak"
+ // NetworkPortBandwidthOutBurst as defined in libvirt/libvirt-network.h:433
+ NetworkPortBandwidthOutBurst = "outbound.burst"
+)
+
+// ConnectCloseReason as declared in libvirt/libvirt-common.h:119
+type ConnectCloseReason int32
+
+// ConnectCloseReason enumeration from libvirt/libvirt-common.h:119
+const (
+ ConnectCloseReasonError ConnectCloseReason = iota
+ ConnectCloseReasonEOF ConnectCloseReason = 1
+ ConnectCloseReasonKeepalive ConnectCloseReason = 2
+ ConnectCloseReasonClient ConnectCloseReason = 3
+)
+
+// TypedParameterType as declared in libvirt/libvirt-common.h:138
+type TypedParameterType int32
+
+// TypedParameterType enumeration from libvirt/libvirt-common.h:138
+const (
+ TypedParamInt TypedParameterType = 1
+ TypedParamUint TypedParameterType = 2
+ TypedParamLlong TypedParameterType = 3
+ TypedParamUllong TypedParameterType = 4
+ TypedParamDouble TypedParameterType = 5
+ TypedParamBoolean TypedParameterType = 6
+ TypedParamString TypedParameterType = 7
+)
+
+// TypedParameterFlags as declared in libvirt/libvirt-common.h:163
+type TypedParameterFlags int32
+
+// TypedParameterFlags enumeration from libvirt/libvirt-common.h:163
+const (
+ TypedParamStringOkay TypedParameterFlags = 4
+)
+
+// NodeSuspendTarget as declared in libvirt/libvirt-host.h:61
+type NodeSuspendTarget int32
+
+// NodeSuspendTarget enumeration from libvirt/libvirt-host.h:61
+const (
+ NodeSuspendTargetMem NodeSuspendTarget = iota
+ NodeSuspendTargetDisk NodeSuspendTarget = 1
+ NodeSuspendTargetHybrid NodeSuspendTarget = 2
+)
+
+// NodeGetCPUStatsAllCPUs as declared in libvirt/libvirt-host.h:189
+type NodeGetCPUStatsAllCPUs int32
+
+// NodeGetCPUStatsAllCPUs enumeration from libvirt/libvirt-host.h:189
+const (
+ NodeCPUStatsAllCpus NodeGetCPUStatsAllCPUs = -1
+)
+
+// NodeGetMemoryStatsAllCells as declared in libvirt/libvirt-host.h:267
+type NodeGetMemoryStatsAllCells int32
+
+// NodeGetMemoryStatsAllCells enumeration from libvirt/libvirt-host.h:267
+const (
+ NodeMemoryStatsAllCells NodeGetMemoryStatsAllCells = -1
+)
+
+// ConnectFlags as declared in libvirt/libvirt-host.h:488
+type ConnectFlags int32
+
+// ConnectFlags enumeration from libvirt/libvirt-host.h:488
+const (
+ ConnectRo ConnectFlags = 1
+ ConnectNoAliases ConnectFlags = 2
+)
+
+// ConnectCredentialType as declared in libvirt/libvirt-host.h:505
+type ConnectCredentialType int32
+
+// ConnectCredentialType enumeration from libvirt/libvirt-host.h:505
+const (
+ CredUsername ConnectCredentialType = 1
+ CredAuthname ConnectCredentialType = 2
+ CredLanguage ConnectCredentialType = 3
+ CredCnonce ConnectCredentialType = 4
+ CredPassphrase ConnectCredentialType = 5
+ CredEchoprompt ConnectCredentialType = 6
+ CredNoechoprompt ConnectCredentialType = 7
+ CredRealm ConnectCredentialType = 8
+ CredExternal ConnectCredentialType = 9
+)
+
+// CPUCompareResult as declared in libvirt/libvirt-host.h:752
+type CPUCompareResult int32
+
+// CPUCompareResult enumeration from libvirt/libvirt-host.h:752
+const (
+ CPUCompareError CPUCompareResult = -1
+ CPUCompareIncompatible CPUCompareResult = 0
+ CPUCompareIdentical CPUCompareResult = 1
+ CPUCompareSuperset CPUCompareResult = 2
+)
+
+// ConnectCompareCPUFlags as declared in libvirt/libvirt-host.h:757
+type ConnectCompareCPUFlags int32
+
+// ConnectCompareCPUFlags enumeration from libvirt/libvirt-host.h:757
+const (
+ ConnectCompareCPUFailIncompatible ConnectCompareCPUFlags = 1
+)
+
+// ConnectBaselineCPUFlags as declared in libvirt/libvirt-host.h:783
+type ConnectBaselineCPUFlags int32
+
+// ConnectBaselineCPUFlags enumeration from libvirt/libvirt-host.h:783
+const (
+ ConnectBaselineCPUExpandFeatures ConnectBaselineCPUFlags = 1
+ ConnectBaselineCPUMigratable ConnectBaselineCPUFlags = 2
+)
+
+// NodeAllocPagesFlags as declared in libvirt/libvirt-host.h:813
+type NodeAllocPagesFlags int32
+
+// NodeAllocPagesFlags enumeration from libvirt/libvirt-host.h:813
+const (
+ NodeAllocPagesAdd NodeAllocPagesFlags = iota
+ NodeAllocPagesSet NodeAllocPagesFlags = 1
+)
+
+// DomainState as declared in libvirt/libvirt-domain.h:70
+type DomainState int32
+
+// DomainState enumeration from libvirt/libvirt-domain.h:70
+const (
+ DomainNostate DomainState = iota
+ DomainRunning DomainState = 1
+ DomainBlocked DomainState = 2
+ DomainPaused DomainState = 3
+ DomainShutdown DomainState = 4
+ DomainShutoff DomainState = 5
+ DomainCrashed DomainState = 6
+ DomainPmsuspended DomainState = 7
+)
+
+// DomainNostateReason as declared in libvirt/libvirt-domain.h:78
+type DomainNostateReason int32
+
+// DomainNostateReason enumeration from libvirt/libvirt-domain.h:78
+const (
+ DomainNostateUnknown DomainNostateReason = iota
+)
+
+// DomainRunningReason as declared in libvirt/libvirt-domain.h:97
+type DomainRunningReason int32
+
+// DomainRunningReason enumeration from libvirt/libvirt-domain.h:97
+const (
+ DomainRunningUnknown DomainRunningReason = iota
+ DomainRunningBooted DomainRunningReason = 1
+ DomainRunningMigrated DomainRunningReason = 2
+ DomainRunningRestored DomainRunningReason = 3
+ DomainRunningFromSnapshot DomainRunningReason = 4
+ DomainRunningUnpaused DomainRunningReason = 5
+ DomainRunningMigrationCanceled DomainRunningReason = 6
+ DomainRunningSaveCanceled DomainRunningReason = 7
+ DomainRunningWakeup DomainRunningReason = 8
+ DomainRunningCrashed DomainRunningReason = 9
+ DomainRunningPostcopy DomainRunningReason = 10
+)
+
+// DomainBlockedReason as declared in libvirt/libvirt-domain.h:105
+type DomainBlockedReason int32
+
+// DomainBlockedReason enumeration from libvirt/libvirt-domain.h:105
+const (
+ DomainBlockedUnknown DomainBlockedReason = iota
+)
+
+// DomainPausedReason as declared in libvirt/libvirt-domain.h:126
+type DomainPausedReason int32
+
+// DomainPausedReason enumeration from libvirt/libvirt-domain.h:126
+const (
+ DomainPausedUnknown DomainPausedReason = iota
+ DomainPausedUser DomainPausedReason = 1
+ DomainPausedMigration DomainPausedReason = 2
+ DomainPausedSave DomainPausedReason = 3
+ DomainPausedDump DomainPausedReason = 4
+ DomainPausedIoerror DomainPausedReason = 5
+ DomainPausedWatchdog DomainPausedReason = 6
+ DomainPausedFromSnapshot DomainPausedReason = 7
+ DomainPausedShuttingDown DomainPausedReason = 8
+ DomainPausedSnapshot DomainPausedReason = 9
+ DomainPausedCrashed DomainPausedReason = 10
+ DomainPausedStartingUp DomainPausedReason = 11
+ DomainPausedPostcopy DomainPausedReason = 12
+ DomainPausedPostcopyFailed DomainPausedReason = 13
+)
+
+// DomainShutdownReason as declared in libvirt/libvirt-domain.h:135
+type DomainShutdownReason int32
+
+// DomainShutdownReason enumeration from libvirt/libvirt-domain.h:135
+const (
+ DomainShutdownUnknown DomainShutdownReason = iota
+ DomainShutdownUser DomainShutdownReason = 1
+)
+
+// DomainShutoffReason as declared in libvirt/libvirt-domain.h:152
+type DomainShutoffReason int32
+
+// DomainShutoffReason enumeration from libvirt/libvirt-domain.h:152
+const (
+ DomainShutoffUnknown DomainShutoffReason = iota
+ DomainShutoffShutdown DomainShutoffReason = 1
+ DomainShutoffDestroyed DomainShutoffReason = 2
+ DomainShutoffCrashed DomainShutoffReason = 3
+ DomainShutoffMigrated DomainShutoffReason = 4
+ DomainShutoffSaved DomainShutoffReason = 5
+ DomainShutoffFailed DomainShutoffReason = 6
+ DomainShutoffFromSnapshot DomainShutoffReason = 7
+ DomainShutoffDaemon DomainShutoffReason = 8
+)
+
+// DomainCrashedReason as declared in libvirt/libvirt-domain.h:161
+type DomainCrashedReason int32
+
+// DomainCrashedReason enumeration from libvirt/libvirt-domain.h:161
+const (
+ DomainCrashedUnknown DomainCrashedReason = iota
+ DomainCrashedPanicked DomainCrashedReason = 1
+)
+
+// DomainPMSuspendedReason as declared in libvirt/libvirt-domain.h:169
+type DomainPMSuspendedReason int32
+
+// DomainPMSuspendedReason enumeration from libvirt/libvirt-domain.h:169
+const (
+ DomainPmsuspendedUnknown DomainPMSuspendedReason = iota
+)
+
+// DomainPMSuspendedDiskReason as declared in libvirt/libvirt-domain.h:177
+type DomainPMSuspendedDiskReason int32
+
+// DomainPMSuspendedDiskReason enumeration from libvirt/libvirt-domain.h:177
+const (
+ DomainPmsuspendedDiskUnknown DomainPMSuspendedDiskReason = iota
+)
+
+// DomainControlState as declared in libvirt/libvirt-domain.h:197
+type DomainControlState int32
+
+// DomainControlState enumeration from libvirt/libvirt-domain.h:197
+const (
+ DomainControlOk DomainControlState = iota
+ DomainControlJob DomainControlState = 1
+ DomainControlOccupied DomainControlState = 2
+ DomainControlError DomainControlState = 3
+)
+
+// DomainControlErrorReason as declared in libvirt/libvirt-domain.h:217
+type DomainControlErrorReason int32
+
+// DomainControlErrorReason enumeration from libvirt/libvirt-domain.h:217
+const (
+ DomainControlErrorReasonNone DomainControlErrorReason = iota
+ DomainControlErrorReasonUnknown DomainControlErrorReason = 1
+ DomainControlErrorReasonMonitor DomainControlErrorReason = 2
+ DomainControlErrorReasonInternal DomainControlErrorReason = 3
+)
+
+// DomainModificationImpact as declared in libvirt/libvirt-domain.h:265
+type DomainModificationImpact int32
+
+// DomainModificationImpact enumeration from libvirt/libvirt-domain.h:265
+const (
+ DomainAffectCurrent DomainModificationImpact = iota
+ DomainAffectLive DomainModificationImpact = 1
+ DomainAffectConfig DomainModificationImpact = 2
+)
+
+// DomainCreateFlags as declared in libvirt/libvirt-domain.h:305
+type DomainCreateFlags int32
+
+// DomainCreateFlags enumeration from libvirt/libvirt-domain.h:305
+const (
+ DomainNone DomainCreateFlags = iota
+ DomainStartPaused DomainCreateFlags = 1
+ DomainStartAutodestroy DomainCreateFlags = 2
+ DomainStartBypassCache DomainCreateFlags = 4
+ DomainStartForceBoot DomainCreateFlags = 8
+ DomainStartValidate DomainCreateFlags = 16
+)
+
+// DomainMemoryStatTags as declared in libvirt/libvirt-domain.h:660
+type DomainMemoryStatTags int32
+
+// DomainMemoryStatTags enumeration from libvirt/libvirt-domain.h:660
+const (
+ DomainMemoryStatSwapIn DomainMemoryStatTags = iota
+ DomainMemoryStatSwapOut DomainMemoryStatTags = 1
+ DomainMemoryStatMajorFault DomainMemoryStatTags = 2
+ DomainMemoryStatMinorFault DomainMemoryStatTags = 3
+ DomainMemoryStatUnused DomainMemoryStatTags = 4
+ DomainMemoryStatAvailable DomainMemoryStatTags = 5
+ DomainMemoryStatActualBalloon DomainMemoryStatTags = 6
+ DomainMemoryStatRss DomainMemoryStatTags = 7
+ DomainMemoryStatUsable DomainMemoryStatTags = 8
+ DomainMemoryStatLastUpdate DomainMemoryStatTags = 9
+ DomainMemoryStatDiskCaches DomainMemoryStatTags = 10
+ DomainMemoryStatHugetlbPgalloc DomainMemoryStatTags = 11
+ DomainMemoryStatHugetlbPgfail DomainMemoryStatTags = 12
+ DomainMemoryStatNr DomainMemoryStatTags = 13
+)
+
+// DomainCoreDumpFlags as declared in libvirt/libvirt-domain.h:679
+type DomainCoreDumpFlags int32
+
+// DomainCoreDumpFlags enumeration from libvirt/libvirt-domain.h:679
+const (
+ DumpCrash DomainCoreDumpFlags = 1
+ DumpLive DomainCoreDumpFlags = 2
+ DumpBypassCache DomainCoreDumpFlags = 4
+ DumpReset DomainCoreDumpFlags = 8
+ DumpMemoryOnly DomainCoreDumpFlags = 16
+)
+
+// DomainCoreDumpFormat as declared in libvirt/libvirt-domain.h:702
+type DomainCoreDumpFormat int32
+
+// DomainCoreDumpFormat enumeration from libvirt/libvirt-domain.h:702
+const (
+ DomainCoreDumpFormatRaw DomainCoreDumpFormat = iota
+ DomainCoreDumpFormatKdumpZlib DomainCoreDumpFormat = 1
+ DomainCoreDumpFormatKdumpLzo DomainCoreDumpFormat = 2
+ DomainCoreDumpFormatKdumpSnappy DomainCoreDumpFormat = 3
+)
+
+// DomainMigrateFlags as declared in libvirt/libvirt-domain.h:852
+type DomainMigrateFlags int32
+
+// DomainMigrateFlags enumeration from libvirt/libvirt-domain.h:852
+const (
+ MigrateLive DomainMigrateFlags = 1
+ MigratePeer2peer DomainMigrateFlags = 2
+ MigrateTunnelled DomainMigrateFlags = 4
+ MigratePersistDest DomainMigrateFlags = 8
+ MigrateUndefineSource DomainMigrateFlags = 16
+ MigratePaused DomainMigrateFlags = 32
+ MigrateNonSharedDisk DomainMigrateFlags = 64
+ MigrateNonSharedInc DomainMigrateFlags = 128
+ MigrateChangeProtection DomainMigrateFlags = 256
+ MigrateUnsafe DomainMigrateFlags = 512
+ MigrateOffline DomainMigrateFlags = 1024
+ MigrateCompressed DomainMigrateFlags = 2048
+ MigrateAbortOnError DomainMigrateFlags = 4096
+ MigrateAutoConverge DomainMigrateFlags = 8192
+ MigrateRdmaPinAll DomainMigrateFlags = 16384
+ MigratePostcopy DomainMigrateFlags = 32768
+ MigrateTLS DomainMigrateFlags = 65536
+ MigrateParallel DomainMigrateFlags = 131072
+)
+
+// DomainMigrateMaxSpeedFlags as declared in libvirt/libvirt-domain.h:1118
+type DomainMigrateMaxSpeedFlags int32
+
+// DomainMigrateMaxSpeedFlags enumeration from libvirt/libvirt-domain.h:1118
+const (
+ DomainMigrateMaxSpeedPostcopy DomainMigrateMaxSpeedFlags = 1
+)
+
+// DomainShutdownFlagValues as declared in libvirt/libvirt-domain.h:1184
+type DomainShutdownFlagValues int32
+
+// DomainShutdownFlagValues enumeration from libvirt/libvirt-domain.h:1184
+const (
+ DomainShutdownDefault DomainShutdownFlagValues = iota
+ DomainShutdownAcpiPowerBtn DomainShutdownFlagValues = 1
+ DomainShutdownGuestAgent DomainShutdownFlagValues = 2
+ DomainShutdownInitctl DomainShutdownFlagValues = 4
+ DomainShutdownSignal DomainShutdownFlagValues = 8
+ DomainShutdownParavirt DomainShutdownFlagValues = 16
+)
+
+// DomainRebootFlagValues as declared in libvirt/libvirt-domain.h:1197
+type DomainRebootFlagValues int32
+
+// DomainRebootFlagValues enumeration from libvirt/libvirt-domain.h:1197
+const (
+ DomainRebootDefault DomainRebootFlagValues = iota
+ DomainRebootAcpiPowerBtn DomainRebootFlagValues = 1
+ DomainRebootGuestAgent DomainRebootFlagValues = 2
+ DomainRebootInitctl DomainRebootFlagValues = 4
+ DomainRebootSignal DomainRebootFlagValues = 8
+ DomainRebootParavirt DomainRebootFlagValues = 16
+)
+
+// DomainDestroyFlagsValues as declared in libvirt/libvirt-domain.h:1215
+type DomainDestroyFlagsValues int32
+
+// DomainDestroyFlagsValues enumeration from libvirt/libvirt-domain.h:1215
+const (
+ DomainDestroyDefault DomainDestroyFlagsValues = iota
+ DomainDestroyGraceful DomainDestroyFlagsValues = 1
+)
+
+// DomainSaveRestoreFlags as declared in libvirt/libvirt-domain.h:1247
+type DomainSaveRestoreFlags int32
+
+// DomainSaveRestoreFlags enumeration from libvirt/libvirt-domain.h:1247
+const (
+ DomainSaveBypassCache DomainSaveRestoreFlags = 1
+ DomainSaveRunning DomainSaveRestoreFlags = 2
+ DomainSavePaused DomainSaveRestoreFlags = 4
+)
+
+// DomainMemoryModFlags as declared in libvirt/libvirt-domain.h:1503
+type DomainMemoryModFlags int32
+
+// DomainMemoryModFlags enumeration from libvirt/libvirt-domain.h:1503
+const (
+ DomainMemCurrent DomainMemoryModFlags = iota
+ DomainMemLive DomainMemoryModFlags = 1
+ DomainMemConfig DomainMemoryModFlags = 2
+ DomainMemMaximum DomainMemoryModFlags = 4
+)
+
+// DomainNumatuneMemMode as declared in libvirt/libvirt-domain.h:1521
+type DomainNumatuneMemMode int32
+
+// DomainNumatuneMemMode enumeration from libvirt/libvirt-domain.h:1521
+const (
+ DomainNumatuneMemStrict DomainNumatuneMemMode = iota
+ DomainNumatuneMemPreferred DomainNumatuneMemMode = 1
+ DomainNumatuneMemInterleave DomainNumatuneMemMode = 2
+)
+
+// DomainMetadataType as declared in libvirt/libvirt-domain.h:1583
+type DomainMetadataType int32
+
+// DomainMetadataType enumeration from libvirt/libvirt-domain.h:1583
+const (
+ DomainMetadataDescription DomainMetadataType = iota
+ DomainMetadataTitle DomainMetadataType = 1
+ DomainMetadataElement DomainMetadataType = 2
+)
+
+// DomainXMLFlags as declared in libvirt/libvirt-domain.h:1613
+type DomainXMLFlags int32
+
+// DomainXMLFlags enumeration from libvirt/libvirt-domain.h:1613
+const (
+ DomainXMLSecure DomainXMLFlags = 1
+ DomainXMLInactive DomainXMLFlags = 2
+ DomainXMLUpdateCPU DomainXMLFlags = 4
+ DomainXMLMigratable DomainXMLFlags = 8
+)
+
+// DomainSaveImageXMLFlags as declared in libvirt/libvirt-domain.h:1617
+type DomainSaveImageXMLFlags int32
+
+// DomainSaveImageXMLFlags enumeration from libvirt/libvirt-domain.h:1617
+const (
+ DomainSaveImageXMLSecure DomainSaveImageXMLFlags = 1
+)
+
+// DomainBlockResizeFlags as declared in libvirt/libvirt-domain.h:1722
+type DomainBlockResizeFlags int32
+
+// DomainBlockResizeFlags enumeration from libvirt/libvirt-domain.h:1722
+const (
+ DomainBlockResizeBytes DomainBlockResizeFlags = 1
+)
+
+// DomainMemoryFlags as declared in libvirt/libvirt-domain.h:1785
+type DomainMemoryFlags int32
+
+// DomainMemoryFlags enumeration from libvirt/libvirt-domain.h:1785
+const (
+ MemoryVirtual DomainMemoryFlags = 1
+ MemoryPhysical DomainMemoryFlags = 2
+)
+
+// DomainDefineFlags as declared in libvirt/libvirt-domain.h:1795
+type DomainDefineFlags int32
+
+// DomainDefineFlags enumeration from libvirt/libvirt-domain.h:1795
+const (
+ DomainDefineValidate DomainDefineFlags = 1
+)
+
+// DomainUndefineFlagsValues as declared in libvirt/libvirt-domain.h:1822
+type DomainUndefineFlagsValues int32
+
+// DomainUndefineFlagsValues enumeration from libvirt/libvirt-domain.h:1822
+const (
+ DomainUndefineManagedSave DomainUndefineFlagsValues = 1
+ DomainUndefineSnapshotsMetadata DomainUndefineFlagsValues = 2
+ DomainUndefineNvram DomainUndefineFlagsValues = 4
+ DomainUndefineKeepNvram DomainUndefineFlagsValues = 8
+ DomainUndefineCheckpointsMetadata DomainUndefineFlagsValues = 16
+)
+
+// ConnectListAllDomainsFlags as declared in libvirt/libvirt-domain.h:1861
+type ConnectListAllDomainsFlags int32
+
+// ConnectListAllDomainsFlags enumeration from libvirt/libvirt-domain.h:1861
+const (
+ ConnectListDomainsActive ConnectListAllDomainsFlags = 1
+ ConnectListDomainsInactive ConnectListAllDomainsFlags = 2
+ ConnectListDomainsPersistent ConnectListAllDomainsFlags = 4
+ ConnectListDomainsTransient ConnectListAllDomainsFlags = 8
+ ConnectListDomainsRunning ConnectListAllDomainsFlags = 16
+ ConnectListDomainsPaused ConnectListAllDomainsFlags = 32
+ ConnectListDomainsShutoff ConnectListAllDomainsFlags = 64
+ ConnectListDomainsOther ConnectListAllDomainsFlags = 128
+ ConnectListDomainsManagedsave ConnectListAllDomainsFlags = 256
+ ConnectListDomainsNoManagedsave ConnectListAllDomainsFlags = 512
+ ConnectListDomainsAutostart ConnectListAllDomainsFlags = 1024
+ ConnectListDomainsNoAutostart ConnectListAllDomainsFlags = 2048
+ ConnectListDomainsHasSnapshot ConnectListAllDomainsFlags = 4096
+ ConnectListDomainsNoSnapshot ConnectListAllDomainsFlags = 8192
+ ConnectListDomainsHasCheckpoint ConnectListAllDomainsFlags = 16384
+ ConnectListDomainsNoCheckpoint ConnectListAllDomainsFlags = 32768
+)
+
+// VCPUState as declared in libvirt/libvirt-domain.h:1892
+type VCPUState int32
+
+// VCPUState enumeration from libvirt/libvirt-domain.h:1892
+const (
+ VCPUOffline VCPUState = iota
+ VCPURunning VCPUState = 1
+ VCPUBlocked VCPUState = 2
+)
+
+// DomainVCPUFlags as declared in libvirt/libvirt-domain.h:1914
+type DomainVCPUFlags int32
+
+// DomainVCPUFlags enumeration from libvirt/libvirt-domain.h:1914
+const (
+ DomainVCPUCurrent DomainVCPUFlags = iota
+ DomainVCPULive DomainVCPUFlags = 1
+ DomainVCPUConfig DomainVCPUFlags = 2
+ DomainVCPUMaximum DomainVCPUFlags = 4
+ DomainVCPUGuest DomainVCPUFlags = 8
+ DomainVCPUHotpluggable DomainVCPUFlags = 16
+)
+
+// DomainDeviceModifyFlags as declared in libvirt/libvirt-domain.h:2131
+type DomainDeviceModifyFlags int32
+
+// DomainDeviceModifyFlags enumeration from libvirt/libvirt-domain.h:2131
+const (
+ DomainDeviceModifyCurrent DomainDeviceModifyFlags = iota
+ DomainDeviceModifyLive DomainDeviceModifyFlags = 1
+ DomainDeviceModifyConfig DomainDeviceModifyFlags = 2
+ DomainDeviceModifyForce DomainDeviceModifyFlags = 4
+)
+
+// DomainStatsTypes as declared in libvirt/libvirt-domain.h:2164
+type DomainStatsTypes int32
+
+// DomainStatsTypes enumeration from libvirt/libvirt-domain.h:2164
+const (
+ DomainStatsState DomainStatsTypes = 1
+ DomainStatsCPUTotal DomainStatsTypes = 2
+ DomainStatsBalloon DomainStatsTypes = 4
+ DomainStatsVCPU DomainStatsTypes = 8
+ DomainStatsInterface DomainStatsTypes = 16
+ DomainStatsBlock DomainStatsTypes = 32
+ DomainStatsPerf DomainStatsTypes = 64
+ DomainStatsIothread DomainStatsTypes = 128
+ DomainStatsMemory DomainStatsTypes = 256
+)
+
+// ConnectGetAllDomainStatsFlags as declared in libvirt/libvirt-domain.h:2182
+type ConnectGetAllDomainStatsFlags int32
+
+// ConnectGetAllDomainStatsFlags enumeration from libvirt/libvirt-domain.h:2182
+const (
+ ConnectGetAllDomainsStatsActive ConnectGetAllDomainStatsFlags = 1
+ ConnectGetAllDomainsStatsInactive ConnectGetAllDomainStatsFlags = 2
+ ConnectGetAllDomainsStatsPersistent ConnectGetAllDomainStatsFlags = 4
+ ConnectGetAllDomainsStatsTransient ConnectGetAllDomainStatsFlags = 8
+ ConnectGetAllDomainsStatsRunning ConnectGetAllDomainStatsFlags = 16
+ ConnectGetAllDomainsStatsPaused ConnectGetAllDomainStatsFlags = 32
+ ConnectGetAllDomainsStatsShutoff ConnectGetAllDomainStatsFlags = 64
+ ConnectGetAllDomainsStatsOther ConnectGetAllDomainStatsFlags = 128
+ ConnectGetAllDomainsStatsNowait ConnectGetAllDomainStatsFlags = 536870912
+ ConnectGetAllDomainsStatsBacking ConnectGetAllDomainStatsFlags = 1073741824
+ ConnectGetAllDomainsStatsEnforceStats ConnectGetAllDomainStatsFlags = -2147483648
+)
+
+// DomainBlockJobType as declared in libvirt/libvirt-domain.h:2470
+type DomainBlockJobType int32
+
+// DomainBlockJobType enumeration from libvirt/libvirt-domain.h:2470
+const (
+ DomainBlockJobTypeUnknown DomainBlockJobType = iota
+ DomainBlockJobTypePull DomainBlockJobType = 1
+ DomainBlockJobTypeCopy DomainBlockJobType = 2
+ DomainBlockJobTypeCommit DomainBlockJobType = 3
+ DomainBlockJobTypeActiveCommit DomainBlockJobType = 4
+ DomainBlockJobTypeBackup DomainBlockJobType = 5
+)
+
+// DomainBlockJobAbortFlags as declared in libvirt/libvirt-domain.h:2482
+type DomainBlockJobAbortFlags int32
+
+// DomainBlockJobAbortFlags enumeration from libvirt/libvirt-domain.h:2482
+const (
+ DomainBlockJobAbortAsync DomainBlockJobAbortFlags = 1
+ DomainBlockJobAbortPivot DomainBlockJobAbortFlags = 2
+)
+
+// DomainBlockJobInfoFlags as declared in libvirt/libvirt-domain.h:2491
+type DomainBlockJobInfoFlags int32
+
+// DomainBlockJobInfoFlags enumeration from libvirt/libvirt-domain.h:2491
+const (
+ DomainBlockJobInfoBandwidthBytes DomainBlockJobInfoFlags = 1
+)
+
+// DomainBlockJobSetSpeedFlags as declared in libvirt/libvirt-domain.h:2520
+type DomainBlockJobSetSpeedFlags int32
+
+// DomainBlockJobSetSpeedFlags enumeration from libvirt/libvirt-domain.h:2520
+const (
+ DomainBlockJobSpeedBandwidthBytes DomainBlockJobSetSpeedFlags = 1
+)
+
+// DomainBlockPullFlags as declared in libvirt/libvirt-domain.h:2530
+type DomainBlockPullFlags int32
+
+// DomainBlockPullFlags enumeration from libvirt/libvirt-domain.h:2530
+const (
+ DomainBlockPullBandwidthBytes DomainBlockPullFlags = 64
+)
+
+// DomainBlockRebaseFlags as declared in libvirt/libvirt-domain.h:2554
+type DomainBlockRebaseFlags int32
+
+// DomainBlockRebaseFlags enumeration from libvirt/libvirt-domain.h:2554
+const (
+ DomainBlockRebaseShallow DomainBlockRebaseFlags = 1
+ DomainBlockRebaseReuseExt DomainBlockRebaseFlags = 2
+ DomainBlockRebaseCopyRaw DomainBlockRebaseFlags = 4
+ DomainBlockRebaseCopy DomainBlockRebaseFlags = 8
+ DomainBlockRebaseRelative DomainBlockRebaseFlags = 16
+ DomainBlockRebaseCopyDev DomainBlockRebaseFlags = 32
+ DomainBlockRebaseBandwidthBytes DomainBlockRebaseFlags = 64
+)
+
+// DomainBlockCopyFlags as declared in libvirt/libvirt-domain.h:2573
+type DomainBlockCopyFlags int32
+
+// DomainBlockCopyFlags enumeration from libvirt/libvirt-domain.h:2573
+const (
+ DomainBlockCopyShallow DomainBlockCopyFlags = 1
+ DomainBlockCopyReuseExt DomainBlockCopyFlags = 2
+ DomainBlockCopyTransientJob DomainBlockCopyFlags = 4
+)
+
+// DomainBlockCommitFlags as declared in libvirt/libvirt-domain.h:2638
+type DomainBlockCommitFlags int32
+
+// DomainBlockCommitFlags enumeration from libvirt/libvirt-domain.h:2638
+const (
+ DomainBlockCommitShallow DomainBlockCommitFlags = 1
+ DomainBlockCommitDelete DomainBlockCommitFlags = 2
+ DomainBlockCommitActive DomainBlockCommitFlags = 4
+ DomainBlockCommitRelative DomainBlockCommitFlags = 8
+ DomainBlockCommitBandwidthBytes DomainBlockCommitFlags = 16
+)
+
+// DomainDiskErrorCode as declared in libvirt/libvirt-domain.h:2829
+type DomainDiskErrorCode int32
+
+// DomainDiskErrorCode enumeration from libvirt/libvirt-domain.h:2829
+const (
+ DomainDiskErrorNone DomainDiskErrorCode = iota
+ DomainDiskErrorUnspec DomainDiskErrorCode = 1
+ DomainDiskErrorNoSpace DomainDiskErrorCode = 2
+)
+
+// KeycodeSet as declared in libvirt/libvirt-domain.h:2875
+type KeycodeSet int32
+
+// KeycodeSet enumeration from libvirt/libvirt-domain.h:2875
+const (
+ KeycodeSetLinux KeycodeSet = iota
+ KeycodeSetXt KeycodeSet = 1
+ KeycodeSetAtset1 KeycodeSet = 2
+ KeycodeSetAtset2 KeycodeSet = 3
+ KeycodeSetAtset3 KeycodeSet = 4
+ KeycodeSetOsx KeycodeSet = 5
+ KeycodeSetXtKbd KeycodeSet = 6
+ KeycodeSetUsb KeycodeSet = 7
+ KeycodeSetWin32 KeycodeSet = 8
+ KeycodeSetQnum KeycodeSet = 9
+)
+
+// DomainProcessSignal as declared in libvirt/libvirt-domain.h:2984
+type DomainProcessSignal int32
+
+// DomainProcessSignal enumeration from libvirt/libvirt-domain.h:2984
+const (
+ DomainProcessSignalNop DomainProcessSignal = iota
+ DomainProcessSignalHup DomainProcessSignal = 1
+ DomainProcessSignalInt DomainProcessSignal = 2
+ DomainProcessSignalQuit DomainProcessSignal = 3
+ DomainProcessSignalIll DomainProcessSignal = 4
+ DomainProcessSignalTrap DomainProcessSignal = 5
+ DomainProcessSignalAbrt DomainProcessSignal = 6
+ DomainProcessSignalBus DomainProcessSignal = 7
+ DomainProcessSignalFpe DomainProcessSignal = 8
+ DomainProcessSignalKill DomainProcessSignal = 9
+ DomainProcessSignalUsr1 DomainProcessSignal = 10
+ DomainProcessSignalSegv DomainProcessSignal = 11
+ DomainProcessSignalUsr2 DomainProcessSignal = 12
+ DomainProcessSignalPipe DomainProcessSignal = 13
+ DomainProcessSignalAlrm DomainProcessSignal = 14
+ DomainProcessSignalTerm DomainProcessSignal = 15
+ DomainProcessSignalStkflt DomainProcessSignal = 16
+ DomainProcessSignalChld DomainProcessSignal = 17
+ DomainProcessSignalCont DomainProcessSignal = 18
+ DomainProcessSignalStop DomainProcessSignal = 19
+ DomainProcessSignalTstp DomainProcessSignal = 20
+ DomainProcessSignalTtin DomainProcessSignal = 21
+ DomainProcessSignalTtou DomainProcessSignal = 22
+ DomainProcessSignalUrg DomainProcessSignal = 23
+ DomainProcessSignalXcpu DomainProcessSignal = 24
+ DomainProcessSignalXfsz DomainProcessSignal = 25
+ DomainProcessSignalVtalrm DomainProcessSignal = 26
+ DomainProcessSignalProf DomainProcessSignal = 27
+ DomainProcessSignalWinch DomainProcessSignal = 28
+ DomainProcessSignalPoll DomainProcessSignal = 29
+ DomainProcessSignalPwr DomainProcessSignal = 30
+ DomainProcessSignalSys DomainProcessSignal = 31
+ DomainProcessSignalRt0 DomainProcessSignal = 32
+ DomainProcessSignalRt1 DomainProcessSignal = 33
+ DomainProcessSignalRt2 DomainProcessSignal = 34
+ DomainProcessSignalRt3 DomainProcessSignal = 35
+ DomainProcessSignalRt4 DomainProcessSignal = 36
+ DomainProcessSignalRt5 DomainProcessSignal = 37
+ DomainProcessSignalRt6 DomainProcessSignal = 38
+ DomainProcessSignalRt7 DomainProcessSignal = 39
+ DomainProcessSignalRt8 DomainProcessSignal = 40
+ DomainProcessSignalRt9 DomainProcessSignal = 41
+ DomainProcessSignalRt10 DomainProcessSignal = 42
+ DomainProcessSignalRt11 DomainProcessSignal = 43
+ DomainProcessSignalRt12 DomainProcessSignal = 44
+ DomainProcessSignalRt13 DomainProcessSignal = 45
+ DomainProcessSignalRt14 DomainProcessSignal = 46
+ DomainProcessSignalRt15 DomainProcessSignal = 47
+ DomainProcessSignalRt16 DomainProcessSignal = 48
+ DomainProcessSignalRt17 DomainProcessSignal = 49
+ DomainProcessSignalRt18 DomainProcessSignal = 50
+ DomainProcessSignalRt19 DomainProcessSignal = 51
+ DomainProcessSignalRt20 DomainProcessSignal = 52
+ DomainProcessSignalRt21 DomainProcessSignal = 53
+ DomainProcessSignalRt22 DomainProcessSignal = 54
+ DomainProcessSignalRt23 DomainProcessSignal = 55
+ DomainProcessSignalRt24 DomainProcessSignal = 56
+ DomainProcessSignalRt25 DomainProcessSignal = 57
+ DomainProcessSignalRt26 DomainProcessSignal = 58
+ DomainProcessSignalRt27 DomainProcessSignal = 59
+ DomainProcessSignalRt28 DomainProcessSignal = 60
+ DomainProcessSignalRt29 DomainProcessSignal = 61
+ DomainProcessSignalRt30 DomainProcessSignal = 62
+ DomainProcessSignalRt31 DomainProcessSignal = 63
+ DomainProcessSignalRt32 DomainProcessSignal = 64
+)
+
+// DomainEventType as declared in libvirt/libvirt-domain.h:3022
+type DomainEventType int32
+
+// DomainEventType enumeration from libvirt/libvirt-domain.h:3022
+const (
+ DomainEventDefined DomainEventType = iota
+ DomainEventUndefined DomainEventType = 1
+ DomainEventStarted DomainEventType = 2
+ DomainEventSuspended DomainEventType = 3
+ DomainEventResumed DomainEventType = 4
+ DomainEventStopped DomainEventType = 5
+ DomainEventShutdown DomainEventType = 6
+ DomainEventPmsuspended DomainEventType = 7
+ DomainEventCrashed DomainEventType = 8
+)
+
+// DomainEventDefinedDetailType as declared in libvirt/libvirt-domain.h:3038
+type DomainEventDefinedDetailType int32
+
+// DomainEventDefinedDetailType enumeration from libvirt/libvirt-domain.h:3038
+const (
+ DomainEventDefinedAdded DomainEventDefinedDetailType = iota
+ DomainEventDefinedUpdated DomainEventDefinedDetailType = 1
+ DomainEventDefinedRenamed DomainEventDefinedDetailType = 2
+ DomainEventDefinedFromSnapshot DomainEventDefinedDetailType = 3
+)
+
+// DomainEventUndefinedDetailType as declared in libvirt/libvirt-domain.h:3052
+type DomainEventUndefinedDetailType int32
+
+// DomainEventUndefinedDetailType enumeration from libvirt/libvirt-domain.h:3052
+const (
+ DomainEventUndefinedRemoved DomainEventUndefinedDetailType = iota
+ DomainEventUndefinedRenamed DomainEventUndefinedDetailType = 1
+)
+
+// DomainEventStartedDetailType as declared in libvirt/libvirt-domain.h:3069
+type DomainEventStartedDetailType int32
+
+// DomainEventStartedDetailType enumeration from libvirt/libvirt-domain.h:3069
+const (
+ DomainEventStartedBooted DomainEventStartedDetailType = iota
+ DomainEventStartedMigrated DomainEventStartedDetailType = 1
+ DomainEventStartedRestored DomainEventStartedDetailType = 2
+ DomainEventStartedFromSnapshot DomainEventStartedDetailType = 3
+ DomainEventStartedWakeup DomainEventStartedDetailType = 4
+)
+
+// DomainEventSuspendedDetailType as declared in libvirt/libvirt-domain.h:3090
+type DomainEventSuspendedDetailType int32
+
+// DomainEventSuspendedDetailType enumeration from libvirt/libvirt-domain.h:3090
+const (
+ DomainEventSuspendedPaused DomainEventSuspendedDetailType = iota
+ DomainEventSuspendedMigrated DomainEventSuspendedDetailType = 1
+ DomainEventSuspendedIoerror DomainEventSuspendedDetailType = 2
+ DomainEventSuspendedWatchdog DomainEventSuspendedDetailType = 3
+ DomainEventSuspendedRestored DomainEventSuspendedDetailType = 4
+ DomainEventSuspendedFromSnapshot DomainEventSuspendedDetailType = 5
+ DomainEventSuspendedAPIError DomainEventSuspendedDetailType = 6
+ DomainEventSuspendedPostcopy DomainEventSuspendedDetailType = 7
+ DomainEventSuspendedPostcopyFailed DomainEventSuspendedDetailType = 8
+)
+
+// DomainEventResumedDetailType as declared in libvirt/libvirt-domain.h:3107
+type DomainEventResumedDetailType int32
+
+// DomainEventResumedDetailType enumeration from libvirt/libvirt-domain.h:3107
+const (
+ DomainEventResumedUnpaused DomainEventResumedDetailType = iota
+ DomainEventResumedMigrated DomainEventResumedDetailType = 1
+ DomainEventResumedFromSnapshot DomainEventResumedDetailType = 2
+ DomainEventResumedPostcopy DomainEventResumedDetailType = 3
+)
+
+// DomainEventStoppedDetailType as declared in libvirt/libvirt-domain.h:3126
+type DomainEventStoppedDetailType int32
+
+// DomainEventStoppedDetailType enumeration from libvirt/libvirt-domain.h:3126
+const (
+ DomainEventStoppedShutdown DomainEventStoppedDetailType = iota
+ DomainEventStoppedDestroyed DomainEventStoppedDetailType = 1
+ DomainEventStoppedCrashed DomainEventStoppedDetailType = 2
+ DomainEventStoppedMigrated DomainEventStoppedDetailType = 3
+ DomainEventStoppedSaved DomainEventStoppedDetailType = 4
+ DomainEventStoppedFailed DomainEventStoppedDetailType = 5
+ DomainEventStoppedFromSnapshot DomainEventStoppedDetailType = 6
+)
+
+// DomainEventShutdownDetailType as declared in libvirt/libvirt-domain.h:3149
+type DomainEventShutdownDetailType int32
+
+// DomainEventShutdownDetailType enumeration from libvirt/libvirt-domain.h:3149
+const (
+ DomainEventShutdownFinished DomainEventShutdownDetailType = iota
+ DomainEventShutdownGuest DomainEventShutdownDetailType = 1
+ DomainEventShutdownHost DomainEventShutdownDetailType = 2
+)
+
+// DomainEventPMSuspendedDetailType as declared in libvirt/libvirt-domain.h:3163
+type DomainEventPMSuspendedDetailType int32
+
+// DomainEventPMSuspendedDetailType enumeration from libvirt/libvirt-domain.h:3163
+const (
+ DomainEventPmsuspendedMemory DomainEventPMSuspendedDetailType = iota
+ DomainEventPmsuspendedDisk DomainEventPMSuspendedDetailType = 1
+)
+
+// DomainEventCrashedDetailType as declared in libvirt/libvirt-domain.h:3176
+type DomainEventCrashedDetailType int32
+
+// DomainEventCrashedDetailType enumeration from libvirt/libvirt-domain.h:3176
+const (
+ DomainEventCrashedPanicked DomainEventCrashedDetailType = iota
+)
+
+// DomainJobType as declared in libvirt/libvirt-domain.h:3220
+type DomainJobType int32
+
+// DomainJobType enumeration from libvirt/libvirt-domain.h:3220
+const (
+ DomainJobNone DomainJobType = iota
+ DomainJobBounded DomainJobType = 1
+ DomainJobUnbounded DomainJobType = 2
+ DomainJobCompleted DomainJobType = 3
+ DomainJobFailed DomainJobType = 4
+ DomainJobCancelled DomainJobType = 5
+)
+
+// DomainGetJobStatsFlags as declared in libvirt/libvirt-domain.h:3269
+type DomainGetJobStatsFlags int32
+
+// DomainGetJobStatsFlags enumeration from libvirt/libvirt-domain.h:3269
+const (
+ DomainJobStatsCompleted DomainGetJobStatsFlags = 1
+ DomainJobStatsKeepCompleted DomainGetJobStatsFlags = 2
+)
+
+// DomainJobOperation as declared in libvirt/libvirt-domain.h:3295
+type DomainJobOperation int32
+
+// DomainJobOperation enumeration from libvirt/libvirt-domain.h:3295
+const (
+ DomainJobOperationStrUnknown DomainJobOperation = iota
+ DomainJobOperationStrStart DomainJobOperation = 1
+ DomainJobOperationStrSave DomainJobOperation = 2
+ DomainJobOperationStrRestore DomainJobOperation = 3
+ DomainJobOperationStrMigrationIn DomainJobOperation = 4
+ DomainJobOperationStrMigrationOut DomainJobOperation = 5
+ DomainJobOperationStrSnapshot DomainJobOperation = 6
+ DomainJobOperationStrSnapshotRevert DomainJobOperation = 7
+ DomainJobOperationStrDump DomainJobOperation = 8
+ DomainJobOperationStrBackup DomainJobOperation = 9
+)
+
+// DomainEventWatchdogAction as declared in libvirt/libvirt-domain.h:3670
+type DomainEventWatchdogAction int32
+
+// DomainEventWatchdogAction enumeration from libvirt/libvirt-domain.h:3670
+const (
+ DomainEventWatchdogNone DomainEventWatchdogAction = iota
+ DomainEventWatchdogPause DomainEventWatchdogAction = 1
+ DomainEventWatchdogReset DomainEventWatchdogAction = 2
+ DomainEventWatchdogPoweroff DomainEventWatchdogAction = 3
+ DomainEventWatchdogShutdown DomainEventWatchdogAction = 4
+ DomainEventWatchdogDebug DomainEventWatchdogAction = 5
+ DomainEventWatchdogInjectnmi DomainEventWatchdogAction = 6
+)
+
+// DomainEventIOErrorAction as declared in libvirt/libvirt-domain.h:3701
+type DomainEventIOErrorAction int32
+
+// DomainEventIOErrorAction enumeration from libvirt/libvirt-domain.h:3701
+const (
+ DomainEventIoErrorNone DomainEventIOErrorAction = iota
+ DomainEventIoErrorPause DomainEventIOErrorAction = 1
+ DomainEventIoErrorReport DomainEventIOErrorAction = 2
+)
+
+// DomainEventGraphicsPhase as declared in libvirt/libvirt-domain.h:3764
+type DomainEventGraphicsPhase int32
+
+// DomainEventGraphicsPhase enumeration from libvirt/libvirt-domain.h:3764
+const (
+ DomainEventGraphicsConnect DomainEventGraphicsPhase = iota
+ DomainEventGraphicsInitialize DomainEventGraphicsPhase = 1
+ DomainEventGraphicsDisconnect DomainEventGraphicsPhase = 2
+)
+
+// DomainEventGraphicsAddressType as declared in libvirt/libvirt-domain.h:3779
+type DomainEventGraphicsAddressType int32
+
+// DomainEventGraphicsAddressType enumeration from libvirt/libvirt-domain.h:3779
+const (
+ DomainEventGraphicsAddressIpv4 DomainEventGraphicsAddressType = iota
+ DomainEventGraphicsAddressIpv6 DomainEventGraphicsAddressType = 1
+ DomainEventGraphicsAddressUnix DomainEventGraphicsAddressType = 2
+)
+
+// ConnectDomainEventBlockJobStatus as declared in libvirt/libvirt-domain.h:3867
+type ConnectDomainEventBlockJobStatus int32
+
+// ConnectDomainEventBlockJobStatus enumeration from libvirt/libvirt-domain.h:3867
+const (
+ DomainBlockJobCompleted ConnectDomainEventBlockJobStatus = iota
+ DomainBlockJobFailed ConnectDomainEventBlockJobStatus = 1
+ DomainBlockJobCanceled ConnectDomainEventBlockJobStatus = 2
+ DomainBlockJobReady ConnectDomainEventBlockJobStatus = 3
+)
+
+// ConnectDomainEventDiskChangeReason as declared in libvirt/libvirt-domain.h:3917
+type ConnectDomainEventDiskChangeReason int32
+
+// ConnectDomainEventDiskChangeReason enumeration from libvirt/libvirt-domain.h:3917
+const (
+ DomainEventDiskChangeMissingOnStart ConnectDomainEventDiskChangeReason = iota
+ DomainEventDiskDropMissingOnStart ConnectDomainEventDiskChangeReason = 1
+)
+
+// DomainEventTrayChangeReason as declared in libvirt/libvirt-domain.h:3958
+type DomainEventTrayChangeReason int32
+
+// DomainEventTrayChangeReason enumeration from libvirt/libvirt-domain.h:3958
+const (
+ DomainEventTrayChangeOpen DomainEventTrayChangeReason = iota
+ DomainEventTrayChangeClose DomainEventTrayChangeReason = 1
+)
+
+// ConnectDomainEventAgentLifecycleState as declared in libvirt/libvirt-domain.h:4475
+type ConnectDomainEventAgentLifecycleState int32
+
+// ConnectDomainEventAgentLifecycleState enumeration from libvirt/libvirt-domain.h:4475
+const (
+ ConnectDomainEventAgentLifecycleStateConnected ConnectDomainEventAgentLifecycleState = 1
+ ConnectDomainEventAgentLifecycleStateDisconnected ConnectDomainEventAgentLifecycleState = 2
+)
+
+// ConnectDomainEventAgentLifecycleReason as declared in libvirt/libvirt-domain.h:4485
+type ConnectDomainEventAgentLifecycleReason int32
+
+// ConnectDomainEventAgentLifecycleReason enumeration from libvirt/libvirt-domain.h:4485
+const (
+ ConnectDomainEventAgentLifecycleReasonUnknown ConnectDomainEventAgentLifecycleReason = iota
+ ConnectDomainEventAgentLifecycleReasonDomainStarted ConnectDomainEventAgentLifecycleReason = 1
+ ConnectDomainEventAgentLifecycleReasonChannel ConnectDomainEventAgentLifecycleReason = 2
+)
+
+// DomainEventID as declared in libvirt/libvirt-domain.h:4589
+type DomainEventID int32
+
+// DomainEventID enumeration from libvirt/libvirt-domain.h:4589
+const (
+ DomainEventIDLifecycle DomainEventID = iota
+ DomainEventIDReboot DomainEventID = 1
+ DomainEventIDRtcChange DomainEventID = 2
+ DomainEventIDWatchdog DomainEventID = 3
+ DomainEventIDIoError DomainEventID = 4
+ DomainEventIDGraphics DomainEventID = 5
+ DomainEventIDIoErrorReason DomainEventID = 6
+ DomainEventIDControlError DomainEventID = 7
+ DomainEventIDBlockJob DomainEventID = 8
+ DomainEventIDDiskChange DomainEventID = 9
+ DomainEventIDTrayChange DomainEventID = 10
+ DomainEventIDPmwakeup DomainEventID = 11
+ DomainEventIDPmsuspend DomainEventID = 12
+ DomainEventIDBalloonChange DomainEventID = 13
+ DomainEventIDPmsuspendDisk DomainEventID = 14
+ DomainEventIDDeviceRemoved DomainEventID = 15
+ DomainEventIDBlockJob2 DomainEventID = 16
+ DomainEventIDTunable DomainEventID = 17
+ DomainEventIDAgentLifecycle DomainEventID = 18
+ DomainEventIDDeviceAdded DomainEventID = 19
+ DomainEventIDMigrationIteration DomainEventID = 20
+ DomainEventIDJobCompleted DomainEventID = 21
+ DomainEventIDDeviceRemovalFailed DomainEventID = 22
+ DomainEventIDMetadataChange DomainEventID = 23
+ DomainEventIDBlockThreshold DomainEventID = 24
+)
+
+// DomainConsoleFlags as declared in libvirt/libvirt-domain.h:4616
+type DomainConsoleFlags int32
+
+// DomainConsoleFlags enumeration from libvirt/libvirt-domain.h:4616
+const (
+ DomainConsoleForce DomainConsoleFlags = 1
+ DomainConsoleSafe DomainConsoleFlags = 2
+)
+
+// DomainChannelFlags as declared in libvirt/libvirt-domain.h:4632
+type DomainChannelFlags int32
+
+// DomainChannelFlags enumeration from libvirt/libvirt-domain.h:4632
+const (
+ DomainChannelForce DomainChannelFlags = 1
+)
+
+// DomainOpenGraphicsFlags as declared in libvirt/libvirt-domain.h:4641
+type DomainOpenGraphicsFlags int32
+
+// DomainOpenGraphicsFlags enumeration from libvirt/libvirt-domain.h:4641
+const (
+ DomainOpenGraphicsSkipauth DomainOpenGraphicsFlags = 1
+)
+
+// DomainSetTimeFlags as declared in libvirt/libvirt-domain.h:4698
+type DomainSetTimeFlags int32
+
+// DomainSetTimeFlags enumeration from libvirt/libvirt-domain.h:4698
+const (
+ DomainTimeSync DomainSetTimeFlags = 1
+)
+
+// SchedParameterType as declared in libvirt/libvirt-domain.h:4719
+type SchedParameterType int32
+
+// SchedParameterType enumeration from libvirt/libvirt-domain.h:4719
+const (
+ DomainSchedFieldInt SchedParameterType = 1
+ DomainSchedFieldUint SchedParameterType = 2
+ DomainSchedFieldLlong SchedParameterType = 3
+ DomainSchedFieldUllong SchedParameterType = 4
+ DomainSchedFieldDouble SchedParameterType = 5
+ DomainSchedFieldBoolean SchedParameterType = 6
+)
+
+// BlkioParameterType as declared in libvirt/libvirt-domain.h:4763
+type BlkioParameterType int32
+
+// BlkioParameterType enumeration from libvirt/libvirt-domain.h:4763
+const (
+ DomainBlkioParamInt BlkioParameterType = 1
+ DomainBlkioParamUint BlkioParameterType = 2
+ DomainBlkioParamLlong BlkioParameterType = 3
+ DomainBlkioParamUllong BlkioParameterType = 4
+ DomainBlkioParamDouble BlkioParameterType = 5
+ DomainBlkioParamBoolean BlkioParameterType = 6
+)
+
+// MemoryParameterType as declared in libvirt/libvirt-domain.h:4807
+type MemoryParameterType int32
+
+// MemoryParameterType enumeration from libvirt/libvirt-domain.h:4807
+const (
+ DomainMemoryParamInt MemoryParameterType = 1
+ DomainMemoryParamUint MemoryParameterType = 2
+ DomainMemoryParamLlong MemoryParameterType = 3
+ DomainMemoryParamUllong MemoryParameterType = 4
+ DomainMemoryParamDouble MemoryParameterType = 5
+ DomainMemoryParamBoolean MemoryParameterType = 6
+)
+
+// DomainInterfaceAddressesSource as declared in libvirt/libvirt-domain.h:4845
+type DomainInterfaceAddressesSource int32
+
+// DomainInterfaceAddressesSource enumeration from libvirt/libvirt-domain.h:4845
+const (
+ DomainInterfaceAddressesSrcLease DomainInterfaceAddressesSource = iota
+ DomainInterfaceAddressesSrcAgent DomainInterfaceAddressesSource = 1
+ DomainInterfaceAddressesSrcArp DomainInterfaceAddressesSource = 2
+)
+
+// DomainSetUserPasswordFlags as declared in libvirt/libvirt-domain.h:4873
+type DomainSetUserPasswordFlags int32
+
+// DomainSetUserPasswordFlags enumeration from libvirt/libvirt-domain.h:4873
+const (
+ DomainPasswordEncrypted DomainSetUserPasswordFlags = 1
+)
+
+// DomainLifecycle as declared in libvirt/libvirt-domain.h:4912
+type DomainLifecycle int32
+
+// DomainLifecycle enumeration from libvirt/libvirt-domain.h:4912
+const (
+ DomainLifecyclePoweroff DomainLifecycle = iota
+ DomainLifecycleReboot DomainLifecycle = 1
+ DomainLifecycleCrash DomainLifecycle = 2
+)
+
+// DomainLifecycleAction as declared in libvirt/libvirt-domain.h:4925
+type DomainLifecycleAction int32
+
+// DomainLifecycleAction enumeration from libvirt/libvirt-domain.h:4925
+const (
+ DomainLifecycleActionDestroy DomainLifecycleAction = iota
+ DomainLifecycleActionRestart DomainLifecycleAction = 1
+ DomainLifecycleActionRestartRename DomainLifecycleAction = 2
+ DomainLifecycleActionPreserve DomainLifecycleAction = 3
+ DomainLifecycleActionCoredumpDestroy DomainLifecycleAction = 4
+ DomainLifecycleActionCoredumpRestart DomainLifecycleAction = 5
+)
+
+// DomainGuestInfoTypes as declared in libvirt/libvirt-domain.h:4955
+type DomainGuestInfoTypes int32
+
+// DomainGuestInfoTypes enumeration from libvirt/libvirt-domain.h:4955
+const (
+ DomainGuestInfoUsers DomainGuestInfoTypes = 1
+ DomainGuestInfoOs DomainGuestInfoTypes = 2
+ DomainGuestInfoTimezone DomainGuestInfoTypes = 4
+ DomainGuestInfoHostname DomainGuestInfoTypes = 8
+ DomainGuestInfoFilesystem DomainGuestInfoTypes = 16
+)
+
+// DomainAgentResponseTimeoutValues as declared in libvirt/libvirt-domain.h:4967
+type DomainAgentResponseTimeoutValues int32
+
+// DomainAgentResponseTimeoutValues enumeration from libvirt/libvirt-domain.h:4967
+const (
+ DomainAgentResponseTimeoutBlock DomainAgentResponseTimeoutValues = -2
+ DomainAgentResponseTimeoutDefault DomainAgentResponseTimeoutValues = -1
+ DomainAgentResponseTimeoutNowait DomainAgentResponseTimeoutValues = 0
+)
+
+// DomainBackupBeginFlags as declared in libvirt/libvirt-domain.h:4976
+type DomainBackupBeginFlags int32
+
+// DomainBackupBeginFlags enumeration from libvirt/libvirt-domain.h:4976
+const (
+ DomainBackupBeginReuseExternal DomainBackupBeginFlags = 1
+)
+
+// DomainCheckpointCreateFlags as declared in libvirt/libvirt-domain-checkpoint.h:60
+type DomainCheckpointCreateFlags int32
+
+// DomainCheckpointCreateFlags enumeration from libvirt/libvirt-domain-checkpoint.h:60
+const (
+ DomainCheckpointCreateRedefine DomainCheckpointCreateFlags = 1
+ DomainCheckpointCreateQuiesce DomainCheckpointCreateFlags = 2
+)
+
+// DomainCheckpointXMLFlags as declared in libvirt/libvirt-domain-checkpoint.h:73
+type DomainCheckpointXMLFlags int32
+
+// DomainCheckpointXMLFlags enumeration from libvirt/libvirt-domain-checkpoint.h:73
+const (
+ DomainCheckpointXMLSecure DomainCheckpointXMLFlags = 1
+ DomainCheckpointXMLNoDomain DomainCheckpointXMLFlags = 2
+ DomainCheckpointXMLSize DomainCheckpointXMLFlags = 4
+)
+
+// DomainCheckpointListFlags as declared in libvirt/libvirt-domain-checkpoint.h:103
+type DomainCheckpointListFlags int32
+
+// DomainCheckpointListFlags enumeration from libvirt/libvirt-domain-checkpoint.h:103
+const (
+ DomainCheckpointListRoots DomainCheckpointListFlags = 1
+ DomainCheckpointListDescendants DomainCheckpointListFlags = 1
+ DomainCheckpointListTopological DomainCheckpointListFlags = 2
+ DomainCheckpointListLeaves DomainCheckpointListFlags = 4
+ DomainCheckpointListNoLeaves DomainCheckpointListFlags = 8
+)
+
+// DomainCheckpointDeleteFlags as declared in libvirt/libvirt-domain-checkpoint.h:129
+type DomainCheckpointDeleteFlags int32
+
+// DomainCheckpointDeleteFlags enumeration from libvirt/libvirt-domain-checkpoint.h:129
+const (
+ DomainCheckpointDeleteChildren DomainCheckpointDeleteFlags = 1
+ DomainCheckpointDeleteMetadataOnly DomainCheckpointDeleteFlags = 2
+ DomainCheckpointDeleteChildrenOnly DomainCheckpointDeleteFlags = 4
+)
+
+// DomainSnapshotCreateFlags as declared in libvirt/libvirt-domain-snapshot.h:76
+type DomainSnapshotCreateFlags int32
+
+// DomainSnapshotCreateFlags enumeration from libvirt/libvirt-domain-snapshot.h:76
+const (
+ DomainSnapshotCreateRedefine DomainSnapshotCreateFlags = 1
+ DomainSnapshotCreateCurrent DomainSnapshotCreateFlags = 2
+ DomainSnapshotCreateNoMetadata DomainSnapshotCreateFlags = 4
+ DomainSnapshotCreateHalt DomainSnapshotCreateFlags = 8
+ DomainSnapshotCreateDiskOnly DomainSnapshotCreateFlags = 16
+ DomainSnapshotCreateReuseExt DomainSnapshotCreateFlags = 32
+ DomainSnapshotCreateQuiesce DomainSnapshotCreateFlags = 64
+ DomainSnapshotCreateAtomic DomainSnapshotCreateFlags = 128
+ DomainSnapshotCreateLive DomainSnapshotCreateFlags = 256
+ DomainSnapshotCreateValidate DomainSnapshotCreateFlags = 512
+)
+
+// DomainSnapshotXMLFlags as declared in libvirt/libvirt-domain-snapshot.h:85
+type DomainSnapshotXMLFlags int32
+
+// DomainSnapshotXMLFlags enumeration from libvirt/libvirt-domain-snapshot.h:85
+const (
+ DomainSnapshotXMLSecure DomainSnapshotXMLFlags = 1
+)
+
+// DomainSnapshotListFlags as declared in libvirt/libvirt-domain-snapshot.h:144
+type DomainSnapshotListFlags int32
+
+// DomainSnapshotListFlags enumeration from libvirt/libvirt-domain-snapshot.h:144
+const (
+ DomainSnapshotListRoots DomainSnapshotListFlags = 1
+ DomainSnapshotListDescendants DomainSnapshotListFlags = 1
+ DomainSnapshotListLeaves DomainSnapshotListFlags = 4
+ DomainSnapshotListNoLeaves DomainSnapshotListFlags = 8
+ DomainSnapshotListMetadata DomainSnapshotListFlags = 2
+ DomainSnapshotListNoMetadata DomainSnapshotListFlags = 16
+ DomainSnapshotListInactive DomainSnapshotListFlags = 32
+ DomainSnapshotListActive DomainSnapshotListFlags = 64
+ DomainSnapshotListDiskOnly DomainSnapshotListFlags = 128
+ DomainSnapshotListInternal DomainSnapshotListFlags = 256
+ DomainSnapshotListExternal DomainSnapshotListFlags = 512
+ DomainSnapshotListTopological DomainSnapshotListFlags = 1024
+)
+
+// DomainSnapshotRevertFlags as declared in libvirt/libvirt-domain-snapshot.h:201
+type DomainSnapshotRevertFlags int32
+
+// DomainSnapshotRevertFlags enumeration from libvirt/libvirt-domain-snapshot.h:201
+const (
+ DomainSnapshotRevertRunning DomainSnapshotRevertFlags = 1
+ DomainSnapshotRevertPaused DomainSnapshotRevertFlags = 2
+ DomainSnapshotRevertForce DomainSnapshotRevertFlags = 4
+)
+
+// DomainSnapshotDeleteFlags as declared in libvirt/libvirt-domain-snapshot.h:215
+type DomainSnapshotDeleteFlags int32
+
+// DomainSnapshotDeleteFlags enumeration from libvirt/libvirt-domain-snapshot.h:215
+const (
+ DomainSnapshotDeleteChildren DomainSnapshotDeleteFlags = 1
+ DomainSnapshotDeleteMetadataOnly DomainSnapshotDeleteFlags = 2
+ DomainSnapshotDeleteChildrenOnly DomainSnapshotDeleteFlags = 4
+)
+
+// EventHandleType as declared in libvirt/libvirt-event.h:43
+type EventHandleType int32
+
+// EventHandleType enumeration from libvirt/libvirt-event.h:43
+const (
+ EventHandleReadable EventHandleType = 1
+ EventHandleWritable EventHandleType = 2
+ EventHandleError EventHandleType = 4
+ EventHandleHangup EventHandleType = 8
+)
+
+// ConnectListAllInterfacesFlags as declared in libvirt/libvirt-interface.h:64
+type ConnectListAllInterfacesFlags int32
+
+// ConnectListAllInterfacesFlags enumeration from libvirt/libvirt-interface.h:64
+const (
+ ConnectListInterfacesInactive ConnectListAllInterfacesFlags = 1
+ ConnectListInterfacesActive ConnectListAllInterfacesFlags = 2
+)
+
+// InterfaceXMLFlags as declared in libvirt/libvirt-interface.h:80
+type InterfaceXMLFlags int32
+
+// InterfaceXMLFlags enumeration from libvirt/libvirt-interface.h:80
+const (
+ InterfaceXMLInactive InterfaceXMLFlags = 1
+)
+
+// NetworkXMLFlags as declared in libvirt/libvirt-network.h:32
+type NetworkXMLFlags int32
+
+// NetworkXMLFlags enumeration from libvirt/libvirt-network.h:32
+const (
+ NetworkXMLInactive NetworkXMLFlags = 1
+)
+
+// ConnectListAllNetworksFlags as declared in libvirt/libvirt-network.h:100
+type ConnectListAllNetworksFlags int32
+
+// ConnectListAllNetworksFlags enumeration from libvirt/libvirt-network.h:100
+const (
+ ConnectListNetworksInactive ConnectListAllNetworksFlags = 1
+ ConnectListNetworksActive ConnectListAllNetworksFlags = 2
+ ConnectListNetworksPersistent ConnectListAllNetworksFlags = 4
+ ConnectListNetworksTransient ConnectListAllNetworksFlags = 8
+ ConnectListNetworksAutostart ConnectListAllNetworksFlags = 16
+ ConnectListNetworksNoAutostart ConnectListAllNetworksFlags = 32
+)
+
+// NetworkUpdateCommand as declared in libvirt/libvirt-network.h:149
+type NetworkUpdateCommand int32
+
+// NetworkUpdateCommand enumeration from libvirt/libvirt-network.h:149
+const (
+ NetworkUpdateCommandNone NetworkUpdateCommand = iota
+ NetworkUpdateCommandModify NetworkUpdateCommand = 1
+ NetworkUpdateCommandDelete NetworkUpdateCommand = 2
+ NetworkUpdateCommandAddLast NetworkUpdateCommand = 3
+ NetworkUpdateCommandAddFirst NetworkUpdateCommand = 4
+)
+
+// NetworkUpdateSection as declared in libvirt/libvirt-network.h:175
+type NetworkUpdateSection int32
+
+// NetworkUpdateSection enumeration from libvirt/libvirt-network.h:175
+const (
+ NetworkSectionNone NetworkUpdateSection = iota
+ NetworkSectionBridge NetworkUpdateSection = 1
+ NetworkSectionDomain NetworkUpdateSection = 2
+ NetworkSectionIP NetworkUpdateSection = 3
+ NetworkSectionIPDhcpHost NetworkUpdateSection = 4
+ NetworkSectionIPDhcpRange NetworkUpdateSection = 5
+ NetworkSectionForward NetworkUpdateSection = 6
+ NetworkSectionForwardInterface NetworkUpdateSection = 7
+ NetworkSectionForwardPf NetworkUpdateSection = 8
+ NetworkSectionPortgroup NetworkUpdateSection = 9
+ NetworkSectionDNSHost NetworkUpdateSection = 10
+ NetworkSectionDNSTxt NetworkUpdateSection = 11
+ NetworkSectionDNSSrv NetworkUpdateSection = 12
+)
+
+// NetworkUpdateFlags as declared in libvirt/libvirt-network.h:187
+type NetworkUpdateFlags int32
+
+// NetworkUpdateFlags enumeration from libvirt/libvirt-network.h:187
+const (
+ NetworkUpdateAffectCurrent NetworkUpdateFlags = iota
+ NetworkUpdateAffectLive NetworkUpdateFlags = 1
+ NetworkUpdateAffectConfig NetworkUpdateFlags = 2
+)
+
+// NetworkEventLifecycleType as declared in libvirt/libvirt-network.h:245
+type NetworkEventLifecycleType int32
+
+// NetworkEventLifecycleType enumeration from libvirt/libvirt-network.h:245
+const (
+ NetworkEventDefined NetworkEventLifecycleType = iota
+ NetworkEventUndefined NetworkEventLifecycleType = 1
+ NetworkEventStarted NetworkEventLifecycleType = 2
+ NetworkEventStopped NetworkEventLifecycleType = 3
+)
+
+// NetworkEventID as declared in libvirt/libvirt-network.h:293
+type NetworkEventID int32
+
+// NetworkEventID enumeration from libvirt/libvirt-network.h:293
+const (
+ NetworkEventIDLifecycle NetworkEventID = iota
+)
+
+// IPAddrType as declared in libvirt/libvirt-network.h:302
+type IPAddrType int32
+
+// IPAddrType enumeration from libvirt/libvirt-network.h:302
+const (
+ IPAddrTypeIpv4 IPAddrType = iota
+ IPAddrTypeIpv6 IPAddrType = 1
+)
+
+// NetworkPortCreateFlags as declared in libvirt/libvirt-network.h:363
+type NetworkPortCreateFlags int32
+
+// NetworkPortCreateFlags enumeration from libvirt/libvirt-network.h:363
+const (
+ NetworkPortCreateReclaim NetworkPortCreateFlags = 1
+)
+
+// ConnectListAllNodeDeviceFlags as declared in libvirt/libvirt-nodedev.h:84
+type ConnectListAllNodeDeviceFlags int32
+
+// ConnectListAllNodeDeviceFlags enumeration from libvirt/libvirt-nodedev.h:84
+const (
+ ConnectListNodeDevicesCapSystem ConnectListAllNodeDeviceFlags = 1
+ ConnectListNodeDevicesCapPciDev ConnectListAllNodeDeviceFlags = 2
+ ConnectListNodeDevicesCapUsbDev ConnectListAllNodeDeviceFlags = 4
+ ConnectListNodeDevicesCapUsbInterface ConnectListAllNodeDeviceFlags = 8
+ ConnectListNodeDevicesCapNet ConnectListAllNodeDeviceFlags = 16
+ ConnectListNodeDevicesCapScsiHost ConnectListAllNodeDeviceFlags = 32
+ ConnectListNodeDevicesCapScsiTarget ConnectListAllNodeDeviceFlags = 64
+ ConnectListNodeDevicesCapScsi ConnectListAllNodeDeviceFlags = 128
+ ConnectListNodeDevicesCapStorage ConnectListAllNodeDeviceFlags = 256
+ ConnectListNodeDevicesCapFcHost ConnectListAllNodeDeviceFlags = 512
+ ConnectListNodeDevicesCapVports ConnectListAllNodeDeviceFlags = 1024
+ ConnectListNodeDevicesCapScsiGeneric ConnectListAllNodeDeviceFlags = 2048
+ ConnectListNodeDevicesCapDrm ConnectListAllNodeDeviceFlags = 4096
+ ConnectListNodeDevicesCapMdevTypes ConnectListAllNodeDeviceFlags = 8192
+ ConnectListNodeDevicesCapMdev ConnectListAllNodeDeviceFlags = 16384
+ ConnectListNodeDevicesCapCcwDev ConnectListAllNodeDeviceFlags = 32768
+)
+
+// NodeDeviceEventID as declared in libvirt/libvirt-nodedev.h:154
+type NodeDeviceEventID int32
+
+// NodeDeviceEventID enumeration from libvirt/libvirt-nodedev.h:154
+const (
+ NodeDeviceEventIDLifecycle NodeDeviceEventID = iota
+ NodeDeviceEventIDUpdate NodeDeviceEventID = 1
+)
+
+// NodeDeviceEventLifecycleType as declared in libvirt/libvirt-nodedev.h:196
+type NodeDeviceEventLifecycleType int32
+
+// NodeDeviceEventLifecycleType enumeration from libvirt/libvirt-nodedev.h:196
+const (
+ NodeDeviceEventCreated NodeDeviceEventLifecycleType = iota
+ NodeDeviceEventDeleted NodeDeviceEventLifecycleType = 1
+)
+
+// SecretUsageType as declared in libvirt/libvirt-secret.h:56
+type SecretUsageType int32
+
+// SecretUsageType enumeration from libvirt/libvirt-secret.h:56
+const (
+ SecretUsageTypeNone SecretUsageType = iota
+ SecretUsageTypeVolume SecretUsageType = 1
+ SecretUsageTypeCeph SecretUsageType = 2
+ SecretUsageTypeIscsi SecretUsageType = 3
+ SecretUsageTypeTLS SecretUsageType = 4
+ SecretUsageTypeVtpm SecretUsageType = 5
+)
+
+// ConnectListAllSecretsFlags as declared in libvirt/libvirt-secret.h:79
+type ConnectListAllSecretsFlags int32
+
+// ConnectListAllSecretsFlags enumeration from libvirt/libvirt-secret.h:79
+const (
+ ConnectListSecretsEphemeral ConnectListAllSecretsFlags = 1
+ ConnectListSecretsNoEphemeral ConnectListAllSecretsFlags = 2
+ ConnectListSecretsPrivate ConnectListAllSecretsFlags = 4
+ ConnectListSecretsNoPrivate ConnectListAllSecretsFlags = 8
+)
+
+// SecretEventID as declared in libvirt/libvirt-secret.h:140
+type SecretEventID int32
+
+// SecretEventID enumeration from libvirt/libvirt-secret.h:140
+const (
+ SecretEventIDLifecycle SecretEventID = iota
+ SecretEventIDValueChanged SecretEventID = 1
+)
+
+// SecretEventLifecycleType as declared in libvirt/libvirt-secret.h:182
+type SecretEventLifecycleType int32
+
+// SecretEventLifecycleType enumeration from libvirt/libvirt-secret.h:182
+const (
+ SecretEventDefined SecretEventLifecycleType = iota
+ SecretEventUndefined SecretEventLifecycleType = 1
+)
+
+// StoragePoolState as declared in libvirt/libvirt-storage.h:57
+type StoragePoolState int32
+
+// StoragePoolState enumeration from libvirt/libvirt-storage.h:57
+const (
+ StoragePoolInactive StoragePoolState = iota
+ StoragePoolBuilding StoragePoolState = 1
+ StoragePoolRunning StoragePoolState = 2
+ StoragePoolDegraded StoragePoolState = 3
+ StoragePoolInaccessible StoragePoolState = 4
+)
+
+// StoragePoolBuildFlags as declared in libvirt/libvirt-storage.h:65
+type StoragePoolBuildFlags int32
+
+// StoragePoolBuildFlags enumeration from libvirt/libvirt-storage.h:65
+const (
+ StoragePoolBuildNew StoragePoolBuildFlags = iota
+ StoragePoolBuildRepair StoragePoolBuildFlags = 1
+ StoragePoolBuildResize StoragePoolBuildFlags = 2
+ StoragePoolBuildNoOverwrite StoragePoolBuildFlags = 4
+ StoragePoolBuildOverwrite StoragePoolBuildFlags = 8
+)
+
+// StoragePoolDeleteFlags as declared in libvirt/libvirt-storage.h:70
+type StoragePoolDeleteFlags int32
+
+// StoragePoolDeleteFlags enumeration from libvirt/libvirt-storage.h:70
+const (
+ StoragePoolDeleteNormal StoragePoolDeleteFlags = iota
+ StoragePoolDeleteZeroed StoragePoolDeleteFlags = 1
+)
+
+// StoragePoolCreateFlags as declared in libvirt/libvirt-storage.h:87
+type StoragePoolCreateFlags int32
+
+// StoragePoolCreateFlags enumeration from libvirt/libvirt-storage.h:87
+const (
+ StoragePoolCreateNormal StoragePoolCreateFlags = iota
+ StoragePoolCreateWithBuild StoragePoolCreateFlags = 1
+ StoragePoolCreateWithBuildOverwrite StoragePoolCreateFlags = 2
+ StoragePoolCreateWithBuildNoOverwrite StoragePoolCreateFlags = 4
+)
+
+// StorageVolType as declared in libvirt/libvirt-storage.h:129
+type StorageVolType int32
+
+// StorageVolType enumeration from libvirt/libvirt-storage.h:129
+const (
+ StorageVolFile StorageVolType = iota
+ StorageVolBlock StorageVolType = 1
+ StorageVolDir StorageVolType = 2
+ StorageVolNetwork StorageVolType = 3
+ StorageVolNetdir StorageVolType = 4
+ StorageVolPloop StorageVolType = 5
+)
+
+// StorageVolDeleteFlags as declared in libvirt/libvirt-storage.h:135
+type StorageVolDeleteFlags int32
+
+// StorageVolDeleteFlags enumeration from libvirt/libvirt-storage.h:135
+const (
+ StorageVolDeleteNormal StorageVolDeleteFlags = iota
+ StorageVolDeleteZeroed StorageVolDeleteFlags = 1
+ StorageVolDeleteWithSnapshots StorageVolDeleteFlags = 2
+)
+
+// StorageVolWipeAlgorithm as declared in libvirt/libvirt-storage.h:167
+type StorageVolWipeAlgorithm int32
+
+// StorageVolWipeAlgorithm enumeration from libvirt/libvirt-storage.h:167
+const (
+ StorageVolWipeAlgZero StorageVolWipeAlgorithm = iota
+ StorageVolWipeAlgNnsa StorageVolWipeAlgorithm = 1
+ StorageVolWipeAlgDod StorageVolWipeAlgorithm = 2
+ StorageVolWipeAlgBsi StorageVolWipeAlgorithm = 3
+ StorageVolWipeAlgGutmann StorageVolWipeAlgorithm = 4
+ StorageVolWipeAlgSchneier StorageVolWipeAlgorithm = 5
+ StorageVolWipeAlgPfitzner7 StorageVolWipeAlgorithm = 6
+ StorageVolWipeAlgPfitzner33 StorageVolWipeAlgorithm = 7
+ StorageVolWipeAlgRandom StorageVolWipeAlgorithm = 8
+ StorageVolWipeAlgTrim StorageVolWipeAlgorithm = 9
+)
+
+// StorageVolInfoFlags as declared in libvirt/libvirt-storage.h:175
+type StorageVolInfoFlags int32
+
+// StorageVolInfoFlags enumeration from libvirt/libvirt-storage.h:175
+const (
+ StorageVolUseAllocation StorageVolInfoFlags = iota
+ StorageVolGetPhysical StorageVolInfoFlags = 1
+)
+
+// StorageXMLFlags as declared in libvirt/libvirt-storage.h:189
+type StorageXMLFlags int32
+
+// StorageXMLFlags enumeration from libvirt/libvirt-storage.h:189
+const (
+ StorageXMLInactive StorageXMLFlags = 1
+)
+
+// ConnectListAllStoragePoolsFlags as declared in libvirt/libvirt-storage.h:248
+type ConnectListAllStoragePoolsFlags int32
+
+// ConnectListAllStoragePoolsFlags enumeration from libvirt/libvirt-storage.h:248
+const (
+ ConnectListStoragePoolsInactive ConnectListAllStoragePoolsFlags = 1
+ ConnectListStoragePoolsActive ConnectListAllStoragePoolsFlags = 2
+ ConnectListStoragePoolsPersistent ConnectListAllStoragePoolsFlags = 4
+ ConnectListStoragePoolsTransient ConnectListAllStoragePoolsFlags = 8
+ ConnectListStoragePoolsAutostart ConnectListAllStoragePoolsFlags = 16
+ ConnectListStoragePoolsNoAutostart ConnectListAllStoragePoolsFlags = 32
+ ConnectListStoragePoolsDir ConnectListAllStoragePoolsFlags = 64
+ ConnectListStoragePoolsFs ConnectListAllStoragePoolsFlags = 128
+ ConnectListStoragePoolsNetfs ConnectListAllStoragePoolsFlags = 256
+ ConnectListStoragePoolsLogical ConnectListAllStoragePoolsFlags = 512
+ ConnectListStoragePoolsDisk ConnectListAllStoragePoolsFlags = 1024
+ ConnectListStoragePoolsIscsi ConnectListAllStoragePoolsFlags = 2048
+ ConnectListStoragePoolsScsi ConnectListAllStoragePoolsFlags = 4096
+ ConnectListStoragePoolsMpath ConnectListAllStoragePoolsFlags = 8192
+ ConnectListStoragePoolsRbd ConnectListAllStoragePoolsFlags = 16384
+ ConnectListStoragePoolsSheepdog ConnectListAllStoragePoolsFlags = 32768
+ ConnectListStoragePoolsGluster ConnectListAllStoragePoolsFlags = 65536
+ ConnectListStoragePoolsZfs ConnectListAllStoragePoolsFlags = 131072
+ ConnectListStoragePoolsVstorage ConnectListAllStoragePoolsFlags = 262144
+ ConnectListStoragePoolsIscsiDirect ConnectListAllStoragePoolsFlags = 524288
+)
+
+// StorageVolCreateFlags as declared in libvirt/libvirt-storage.h:346
+type StorageVolCreateFlags int32
+
+// StorageVolCreateFlags enumeration from libvirt/libvirt-storage.h:346
+const (
+ StorageVolCreatePreallocMetadata StorageVolCreateFlags = 1
+ StorageVolCreateReflink StorageVolCreateFlags = 2
+)
+
+// StorageVolDownloadFlags as declared in libvirt/libvirt-storage.h:358
+type StorageVolDownloadFlags int32
+
+// StorageVolDownloadFlags enumeration from libvirt/libvirt-storage.h:358
+const (
+ StorageVolDownloadSparseStream StorageVolDownloadFlags = 1
+)
+
+// StorageVolUploadFlags as declared in libvirt/libvirt-storage.h:367
+type StorageVolUploadFlags int32
+
+// StorageVolUploadFlags enumeration from libvirt/libvirt-storage.h:367
+const (
+ StorageVolUploadSparseStream StorageVolUploadFlags = 1
+)
+
+// StorageVolResizeFlags as declared in libvirt/libvirt-storage.h:398
+type StorageVolResizeFlags int32
+
+// StorageVolResizeFlags enumeration from libvirt/libvirt-storage.h:398
+const (
+ StorageVolResizeAllocate StorageVolResizeFlags = 1
+ StorageVolResizeDelta StorageVolResizeFlags = 2
+ StorageVolResizeShrink StorageVolResizeFlags = 4
+)
+
+// StoragePoolEventID as declared in libvirt/libvirt-storage.h:434
+type StoragePoolEventID int32
+
+// StoragePoolEventID enumeration from libvirt/libvirt-storage.h:434
+const (
+ StoragePoolEventIDLifecycle StoragePoolEventID = iota
+ StoragePoolEventIDRefresh StoragePoolEventID = 1
+)
+
+// StoragePoolEventLifecycleType as declared in libvirt/libvirt-storage.h:480
+type StoragePoolEventLifecycleType int32
+
+// StoragePoolEventLifecycleType enumeration from libvirt/libvirt-storage.h:480
+const (
+ StoragePoolEventDefined StoragePoolEventLifecycleType = iota
+ StoragePoolEventUndefined StoragePoolEventLifecycleType = 1
+ StoragePoolEventStarted StoragePoolEventLifecycleType = 2
+ StoragePoolEventStopped StoragePoolEventLifecycleType = 3
+ StoragePoolEventCreated StoragePoolEventLifecycleType = 4
+ StoragePoolEventDeleted StoragePoolEventLifecycleType = 5
+)
+
+// StreamFlags as declared in libvirt/libvirt-stream.h:33
+type StreamFlags int32
+
+// StreamFlags enumeration from libvirt/libvirt-stream.h:33
+const (
+ StreamNonblock StreamFlags = 1
+)
+
+// StreamRecvFlagsValues as declared in libvirt/libvirt-stream.h:49
+type StreamRecvFlagsValues int32
+
+// StreamRecvFlagsValues enumeration from libvirt/libvirt-stream.h:49
+const (
+ StreamRecvStopAtHole StreamRecvFlagsValues = 1
+)
+
+// StreamEventType as declared in libvirt/libvirt-stream.h:237
+type StreamEventType int32
+
+// StreamEventType enumeration from libvirt/libvirt-stream.h:237
+const (
+ StreamEventReadable StreamEventType = 1
+ StreamEventWritable StreamEventType = 2
+ StreamEventError StreamEventType = 4
+ StreamEventHangup StreamEventType = 8
+)
+
+// errorLevel as declared in libvirt/virterror.h:42
+type errorLevel int32
+
+// errorLevel enumeration from libvirt/virterror.h:42
+const (
+ errNone errorLevel = iota
+ errWarning errorLevel = 1
+ errError errorLevel = 2
+)
+
+// errorDomain as declared in libvirt/virterror.h:143
+type errorDomain int32
+
+// errorDomain enumeration from libvirt/virterror.h:143
+const (
+ fromNone errorDomain = iota
+ fromXen errorDomain = 1
+ fromXend errorDomain = 2
+ fromXenstore errorDomain = 3
+ fromSexpr errorDomain = 4
+ fromXML errorDomain = 5
+ fromDom errorDomain = 6
+ fromRPC errorDomain = 7
+ fromProxy errorDomain = 8
+ fromConf errorDomain = 9
+ fromQemu errorDomain = 10
+ fromNet errorDomain = 11
+ fromTest errorDomain = 12
+ fromRemote errorDomain = 13
+ fromOpenvz errorDomain = 14
+ fromXenxm errorDomain = 15
+ fromStatsLinux errorDomain = 16
+ fromLxc errorDomain = 17
+ fromStorage errorDomain = 18
+ fromNetwork errorDomain = 19
+ fromDomain errorDomain = 20
+ fromUml errorDomain = 21
+ fromNodedev errorDomain = 22
+ fromXenInotify errorDomain = 23
+ fromSecurity errorDomain = 24
+ fromVbox errorDomain = 25
+ fromInterface errorDomain = 26
+ fromOne errorDomain = 27
+ fromEsx errorDomain = 28
+ fromPhyp errorDomain = 29
+ fromSecret errorDomain = 30
+ fromCPU errorDomain = 31
+ fromXenapi errorDomain = 32
+ fromNwfilter errorDomain = 33
+ fromHook errorDomain = 34
+ fromDomainSnapshot errorDomain = 35
+ fromAudit errorDomain = 36
+ fromSysinfo errorDomain = 37
+ fromStreams errorDomain = 38
+ fromVmware errorDomain = 39
+ fromEvent errorDomain = 40
+ fromLibxl errorDomain = 41
+ fromLocking errorDomain = 42
+ fromHyperv errorDomain = 43
+ fromCapabilities errorDomain = 44
+ fromURI errorDomain = 45
+ fromAuth errorDomain = 46
+ fromDbus errorDomain = 47
+ fromParallels errorDomain = 48
+ fromDevice errorDomain = 49
+ fromSSH errorDomain = 50
+ fromLockspace errorDomain = 51
+ fromInitctl errorDomain = 52
+ fromIdentity errorDomain = 53
+ fromCgroup errorDomain = 54
+ fromAccess errorDomain = 55
+ fromSystemd errorDomain = 56
+ fromBhyve errorDomain = 57
+ fromCrypto errorDomain = 58
+ fromFirewall errorDomain = 59
+ fromPolkit errorDomain = 60
+ fromThread errorDomain = 61
+ fromAdmin errorDomain = 62
+ fromLogging errorDomain = 63
+ fromXenxl errorDomain = 64
+ fromPerf errorDomain = 65
+ fromLibssh errorDomain = 66
+ fromResctrl errorDomain = 67
+ fromFirewalld errorDomain = 68
+ fromDomainCheckpoint errorDomain = 69
+ fromTpm errorDomain = 70
+ fromBpf errorDomain = 71
+)
+
+// errorNumber as declared in libvirt/virterror.h:340
+type errorNumber int32
+
+// errorNumber enumeration from libvirt/virterror.h:340
+const (
+ errOk errorNumber = iota
+ errInternalError errorNumber = 1
+ errNoMemory errorNumber = 2
+ errNoSupport errorNumber = 3
+ errUnknownHost errorNumber = 4
+ errNoConnect errorNumber = 5
+ errInvalidConn errorNumber = 6
+ errInvalidDomain errorNumber = 7
+ errInvalidArg errorNumber = 8
+ errOperationFailed errorNumber = 9
+ errGetFailed errorNumber = 10
+ errPostFailed errorNumber = 11
+ errHTTPError errorNumber = 12
+ errSexprSerial errorNumber = 13
+ errNoXen errorNumber = 14
+ errXenCall errorNumber = 15
+ errOsType errorNumber = 16
+ errNoKernel errorNumber = 17
+ errNoRoot errorNumber = 18
+ errNoSource errorNumber = 19
+ errNoTarget errorNumber = 20
+ errNoName errorNumber = 21
+ errNoOs errorNumber = 22
+ errNoDevice errorNumber = 23
+ errNoXenstore errorNumber = 24
+ errDriverFull errorNumber = 25
+ errCallFailed errorNumber = 26
+ errXMLError errorNumber = 27
+ errDomExist errorNumber = 28
+ errOperationDenied errorNumber = 29
+ errOpenFailed errorNumber = 30
+ errReadFailed errorNumber = 31
+ errParseFailed errorNumber = 32
+ errConfSyntax errorNumber = 33
+ errWriteFailed errorNumber = 34
+ errXMLDetail errorNumber = 35
+ errInvalidNetwork errorNumber = 36
+ errNetworkExist errorNumber = 37
+ errSystemError errorNumber = 38
+ errRPC errorNumber = 39
+ errGnutlsError errorNumber = 40
+ warNoNetwork errorNumber = 41
+ errNoDomain errorNumber = 42
+ errNoNetwork errorNumber = 43
+ errInvalidMac errorNumber = 44
+ errAuthFailed errorNumber = 45
+ errInvalidStoragePool errorNumber = 46
+ errInvalidStorageVol errorNumber = 47
+ warNoStorage errorNumber = 48
+ errNoStoragePool errorNumber = 49
+ errNoStorageVol errorNumber = 50
+ warNoNode errorNumber = 51
+ errInvalidNodeDevice errorNumber = 52
+ errNoNodeDevice errorNumber = 53
+ errNoSecurityModel errorNumber = 54
+ errOperationInvalid errorNumber = 55
+ warNoInterface errorNumber = 56
+ errNoInterface errorNumber = 57
+ errInvalidInterface errorNumber = 58
+ errMultipleInterfaces errorNumber = 59
+ warNoNwfilter errorNumber = 60
+ errInvalidNwfilter errorNumber = 61
+ errNoNwfilter errorNumber = 62
+ errBuildFirewall errorNumber = 63
+ warNoSecret errorNumber = 64
+ errInvalidSecret errorNumber = 65
+ errNoSecret errorNumber = 66
+ errConfigUnsupported errorNumber = 67
+ errOperationTimeout errorNumber = 68
+ errMigratePersistFailed errorNumber = 69
+ errHookScriptFailed errorNumber = 70
+ errInvalidDomainSnapshot errorNumber = 71
+ errNoDomainSnapshot errorNumber = 72
+ errInvalidStream errorNumber = 73
+ errArgumentUnsupported errorNumber = 74
+ errStorageProbeFailed errorNumber = 75
+ errStoragePoolBuilt errorNumber = 76
+ errSnapshotRevertRisky errorNumber = 77
+ errOperationAborted errorNumber = 78
+ errAuthCancelled errorNumber = 79
+ errNoDomainMetadata errorNumber = 80
+ errMigrateUnsafe errorNumber = 81
+ errOverflow errorNumber = 82
+ errBlockCopyActive errorNumber = 83
+ errOperationUnsupported errorNumber = 84
+ errSSH errorNumber = 85
+ errAgentUnresponsive errorNumber = 86
+ errResourceBusy errorNumber = 87
+ errAccessDenied errorNumber = 88
+ errDbusService errorNumber = 89
+ errStorageVolExist errorNumber = 90
+ errCPUIncompatible errorNumber = 91
+ errXMLInvalidSchema errorNumber = 92
+ errMigrateFinishOk errorNumber = 93
+ errAuthUnavailable errorNumber = 94
+ errNoServer errorNumber = 95
+ errNoClient errorNumber = 96
+ errAgentUnsynced errorNumber = 97
+ errLibssh errorNumber = 98
+ errDeviceMissing errorNumber = 99
+ errInvalidNwfilterBinding errorNumber = 100
+ errNoNwfilterBinding errorNumber = 101
+ errInvalidDomainCheckpoint errorNumber = 102
+ errNoDomainCheckpoint errorNumber = 103
+ errNoDomainBackup errorNumber = 104
+ errInvalidNetworkPort errorNumber = 105
+ errNetworkPortExist errorNumber = 106
+ errNoNetworkPort errorNumber = 107
+ errNoHostname errorNumber = 108
+ errCheckpointInconsistent errorNumber = 109
+)
diff --git a/vendor/github.com/digitalocean/go-libvirt/doc.go b/vendor/github.com/digitalocean/go-libvirt/doc.go
new file mode 100644
index 000000000..1229f30c8
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/doc.go
@@ -0,0 +1,76 @@
+// Copyright 2016 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/*
+ Package libvirt provides a pure Go interface for Libvirt.
+
+ Rather than using Libvirt's C bindings, this package makes use of
+ Libvirt's RPC interface, as documented here: https://libvirt.org/internals/rpc.html.
+ Connections to the libvirt server may be local, or remote. RPC packets are encoded
+ using the XDR standard as defined by RFC 4506.
+
+ This should be considered a work in progress. Most functionaly provided by the C
+ bindings have not yet made their way into this library. Pull requests are welcome!
+ The definition of the RPC protocol is in the libvirt source tree under src/rpc/virnetprotocol.x.
+
+ Example usage:
+
+ package main
+
+ import (
+ "fmt"
+ "log"
+ "net"
+ "time"
+
+ "github.com/digitalocean/go-libvirt"
+ )
+
+ func main() {
+ //c, err := net.DialTimeout("tcp", "127.0.0.1:16509", 2*time.Second)
+ //c, err := net.DialTimeout("tcp", "192.168.1.12:16509", 2*time.Second)
+ c, err := net.DialTimeout("unix", "/var/run/libvirt/libvirt-sock", 2*time.Second)
+ if err != nil {
+ log.Fatalf("failed to dial libvirt: %v", err)
+ }
+
+ l := libvirt.New(c)
+ if err := l.Connect(); err != nil {
+ log.Fatalf("failed to connect: %v", err)
+ }
+
+ v, err := l.Version()
+ if err != nil {
+ log.Fatalf("failed to retrieve libvirt version: %v", err)
+ }
+ fmt.Println("Version:", v)
+
+ domains, err := l.Domains()
+ if err != nil {
+ log.Fatalf("failed to retrieve domains: %v", err)
+ }
+
+ fmt.Println("ID\tName\t\tUUID")
+ fmt.Printf("--------------------------------------------------------\n")
+ for _, d := range domains {
+ fmt.Printf("%d\t%s\t%x\n", d.ID, d.Name, d.UUID)
+ }
+
+ if err := l.Disconnect(); err != nil {
+ log.Fatal("failed to disconnect: %v", err)
+ }
+ }
+*/
+
+package libvirt
diff --git a/vendor/github.com/digitalocean/go-libvirt/go.mod b/vendor/github.com/digitalocean/go-libvirt/go.mod
new file mode 100644
index 000000000..b0957576a
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/go.mod
@@ -0,0 +1,9 @@
+module github.com/digitalocean/go-libvirt
+
+go 1.14
+
+require (
+ github.com/stretchr/testify v1.6.1
+ golang.org/x/net v0.0.0-20200625001655-4c5254603344
+ golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d
+)
diff --git a/vendor/github.com/digitalocean/go-libvirt/go.sum b/vendor/github.com/digitalocean/go-libvirt/go.sum
new file mode 100644
index 000000000..a213b4803
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/go.sum
@@ -0,0 +1,35 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d h1:F3OmlXCzYtG9YE6tXDnUOlJBzVzHF8EcmZ1yTJlcgIk=
+golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/digitalocean/go-libvirt/internal/constants/qemu_protocol.gen.go b/vendor/github.com/digitalocean/go-libvirt/internal/constants/qemu_protocol.gen.go
new file mode 100644
index 000000000..208986dee
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/internal/constants/qemu_protocol.gen.go
@@ -0,0 +1,47 @@
+// Copyright 2018 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//
+// Code generated by internal/lvgen/generate.go. DO NOT EDIT.
+//
+// To regenerate, run 'go generate' in internal/lvgen.
+//
+
+package constants
+
+// These are libvirt procedure numbers which correspond to each respective
+// API call between remote_internal driver and libvirtd. Each procedure is
+// identified by a unique number.
+const (
+ // From enums:
+ // QEMUProcDomainMonitorCommand is libvirt's QEMU_PROC_DOMAIN_MONITOR_COMMAND
+ QEMUProcDomainMonitorCommand = 1
+ // QEMUProcDomainAttach is libvirt's QEMU_PROC_DOMAIN_ATTACH
+ QEMUProcDomainAttach = 2
+ // QEMUProcDomainAgentCommand is libvirt's QEMU_PROC_DOMAIN_AGENT_COMMAND
+ QEMUProcDomainAgentCommand = 3
+ // QEMUProcConnectDomainMonitorEventRegister is libvirt's QEMU_PROC_CONNECT_DOMAIN_MONITOR_EVENT_REGISTER
+ QEMUProcConnectDomainMonitorEventRegister = 4
+ // QEMUProcConnectDomainMonitorEventDeregister is libvirt's QEMU_PROC_CONNECT_DOMAIN_MONITOR_EVENT_DEREGISTER
+ QEMUProcConnectDomainMonitorEventDeregister = 5
+ // QEMUProcDomainMonitorEvent is libvirt's QEMU_PROC_DOMAIN_MONITOR_EVENT
+ QEMUProcDomainMonitorEvent = 6
+
+
+ // From consts:
+ // QEMUProgram is libvirt's QEMU_PROGRAM
+ QEMUProgram = 0x20008087
+ // QEMUProtocolVersion is libvirt's QEMU_PROTOCOL_VERSION
+ QEMUProtocolVersion = 1
+)
diff --git a/vendor/github.com/digitalocean/go-libvirt/internal/constants/remote_protocol.gen.go b/vendor/github.com/digitalocean/go-libvirt/internal/constants/remote_protocol.gen.go
new file mode 100644
index 000000000..9b9601cb9
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/internal/constants/remote_protocol.gen.go
@@ -0,0 +1,1019 @@
+// Copyright 2018 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//
+// Code generated by internal/lvgen/generate.go. DO NOT EDIT.
+//
+// To regenerate, run 'go generate' in internal/lvgen.
+//
+
+package constants
+
+// These are libvirt procedure numbers which correspond to each respective
+// API call between remote_internal driver and libvirtd. Each procedure is
+// identified by a unique number.
+const (
+ // From enums:
+ // AuthNone is libvirt's REMOTE_AUTH_NONE
+ AuthNone = 0
+ // AuthSasl is libvirt's REMOTE_AUTH_SASL
+ AuthSasl = 1
+ // AuthPolkit is libvirt's REMOTE_AUTH_POLKIT
+ AuthPolkit = 2
+ // ProcConnectOpen is libvirt's REMOTE_PROC_CONNECT_OPEN
+ ProcConnectOpen = 1
+ // ProcConnectClose is libvirt's REMOTE_PROC_CONNECT_CLOSE
+ ProcConnectClose = 2
+ // ProcConnectGetType is libvirt's REMOTE_PROC_CONNECT_GET_TYPE
+ ProcConnectGetType = 3
+ // ProcConnectGetVersion is libvirt's REMOTE_PROC_CONNECT_GET_VERSION
+ ProcConnectGetVersion = 4
+ // ProcConnectGetMaxVcpus is libvirt's REMOTE_PROC_CONNECT_GET_MAX_VCPUS
+ ProcConnectGetMaxVcpus = 5
+ // ProcNodeGetInfo is libvirt's REMOTE_PROC_NODE_GET_INFO
+ ProcNodeGetInfo = 6
+ // ProcConnectGetCapabilities is libvirt's REMOTE_PROC_CONNECT_GET_CAPABILITIES
+ ProcConnectGetCapabilities = 7
+ // ProcDomainAttachDevice is libvirt's REMOTE_PROC_DOMAIN_ATTACH_DEVICE
+ ProcDomainAttachDevice = 8
+ // ProcDomainCreate is libvirt's REMOTE_PROC_DOMAIN_CREATE
+ ProcDomainCreate = 9
+ // ProcDomainCreateXML is libvirt's REMOTE_PROC_DOMAIN_CREATE_XML
+ ProcDomainCreateXML = 10
+ // ProcDomainDefineXML is libvirt's REMOTE_PROC_DOMAIN_DEFINE_XML
+ ProcDomainDefineXML = 11
+ // ProcDomainDestroy is libvirt's REMOTE_PROC_DOMAIN_DESTROY
+ ProcDomainDestroy = 12
+ // ProcDomainDetachDevice is libvirt's REMOTE_PROC_DOMAIN_DETACH_DEVICE
+ ProcDomainDetachDevice = 13
+ // ProcDomainGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_GET_XML_DESC
+ ProcDomainGetXMLDesc = 14
+ // ProcDomainGetAutostart is libvirt's REMOTE_PROC_DOMAIN_GET_AUTOSTART
+ ProcDomainGetAutostart = 15
+ // ProcDomainGetInfo is libvirt's REMOTE_PROC_DOMAIN_GET_INFO
+ ProcDomainGetInfo = 16
+ // ProcDomainGetMaxMemory is libvirt's REMOTE_PROC_DOMAIN_GET_MAX_MEMORY
+ ProcDomainGetMaxMemory = 17
+ // ProcDomainGetMaxVcpus is libvirt's REMOTE_PROC_DOMAIN_GET_MAX_VCPUS
+ ProcDomainGetMaxVcpus = 18
+ // ProcDomainGetOsType is libvirt's REMOTE_PROC_DOMAIN_GET_OS_TYPE
+ ProcDomainGetOsType = 19
+ // ProcDomainGetVcpus is libvirt's REMOTE_PROC_DOMAIN_GET_VCPUS
+ ProcDomainGetVcpus = 20
+ // ProcConnectListDefinedDomains is libvirt's REMOTE_PROC_CONNECT_LIST_DEFINED_DOMAINS
+ ProcConnectListDefinedDomains = 21
+ // ProcDomainLookupByID is libvirt's REMOTE_PROC_DOMAIN_LOOKUP_BY_ID
+ ProcDomainLookupByID = 22
+ // ProcDomainLookupByName is libvirt's REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME
+ ProcDomainLookupByName = 23
+ // ProcDomainLookupByUUID is libvirt's REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID
+ ProcDomainLookupByUUID = 24
+ // ProcConnectNumOfDefinedDomains is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DEFINED_DOMAINS
+ ProcConnectNumOfDefinedDomains = 25
+ // ProcDomainPinVcpu is libvirt's REMOTE_PROC_DOMAIN_PIN_VCPU
+ ProcDomainPinVcpu = 26
+ // ProcDomainReboot is libvirt's REMOTE_PROC_DOMAIN_REBOOT
+ ProcDomainReboot = 27
+ // ProcDomainResume is libvirt's REMOTE_PROC_DOMAIN_RESUME
+ ProcDomainResume = 28
+ // ProcDomainSetAutostart is libvirt's REMOTE_PROC_DOMAIN_SET_AUTOSTART
+ ProcDomainSetAutostart = 29
+ // ProcDomainSetMaxMemory is libvirt's REMOTE_PROC_DOMAIN_SET_MAX_MEMORY
+ ProcDomainSetMaxMemory = 30
+ // ProcDomainSetMemory is libvirt's REMOTE_PROC_DOMAIN_SET_MEMORY
+ ProcDomainSetMemory = 31
+ // ProcDomainSetVcpus is libvirt's REMOTE_PROC_DOMAIN_SET_VCPUS
+ ProcDomainSetVcpus = 32
+ // ProcDomainShutdown is libvirt's REMOTE_PROC_DOMAIN_SHUTDOWN
+ ProcDomainShutdown = 33
+ // ProcDomainSuspend is libvirt's REMOTE_PROC_DOMAIN_SUSPEND
+ ProcDomainSuspend = 34
+ // ProcDomainUndefine is libvirt's REMOTE_PROC_DOMAIN_UNDEFINE
+ ProcDomainUndefine = 35
+ // ProcConnectListDefinedNetworks is libvirt's REMOTE_PROC_CONNECT_LIST_DEFINED_NETWORKS
+ ProcConnectListDefinedNetworks = 36
+ // ProcConnectListDomains is libvirt's REMOTE_PROC_CONNECT_LIST_DOMAINS
+ ProcConnectListDomains = 37
+ // ProcConnectListNetworks is libvirt's REMOTE_PROC_CONNECT_LIST_NETWORKS
+ ProcConnectListNetworks = 38
+ // ProcNetworkCreate is libvirt's REMOTE_PROC_NETWORK_CREATE
+ ProcNetworkCreate = 39
+ // ProcNetworkCreateXML is libvirt's REMOTE_PROC_NETWORK_CREATE_XML
+ ProcNetworkCreateXML = 40
+ // ProcNetworkDefineXML is libvirt's REMOTE_PROC_NETWORK_DEFINE_XML
+ ProcNetworkDefineXML = 41
+ // ProcNetworkDestroy is libvirt's REMOTE_PROC_NETWORK_DESTROY
+ ProcNetworkDestroy = 42
+ // ProcNetworkGetXMLDesc is libvirt's REMOTE_PROC_NETWORK_GET_XML_DESC
+ ProcNetworkGetXMLDesc = 43
+ // ProcNetworkGetAutostart is libvirt's REMOTE_PROC_NETWORK_GET_AUTOSTART
+ ProcNetworkGetAutostart = 44
+ // ProcNetworkGetBridgeName is libvirt's REMOTE_PROC_NETWORK_GET_BRIDGE_NAME
+ ProcNetworkGetBridgeName = 45
+ // ProcNetworkLookupByName is libvirt's REMOTE_PROC_NETWORK_LOOKUP_BY_NAME
+ ProcNetworkLookupByName = 46
+ // ProcNetworkLookupByUUID is libvirt's REMOTE_PROC_NETWORK_LOOKUP_BY_UUID
+ ProcNetworkLookupByUUID = 47
+ // ProcNetworkSetAutostart is libvirt's REMOTE_PROC_NETWORK_SET_AUTOSTART
+ ProcNetworkSetAutostart = 48
+ // ProcNetworkUndefine is libvirt's REMOTE_PROC_NETWORK_UNDEFINE
+ ProcNetworkUndefine = 49
+ // ProcConnectNumOfDefinedNetworks is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DEFINED_NETWORKS
+ ProcConnectNumOfDefinedNetworks = 50
+ // ProcConnectNumOfDomains is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DOMAINS
+ ProcConnectNumOfDomains = 51
+ // ProcConnectNumOfNetworks is libvirt's REMOTE_PROC_CONNECT_NUM_OF_NETWORKS
+ ProcConnectNumOfNetworks = 52
+ // ProcDomainCoreDump is libvirt's REMOTE_PROC_DOMAIN_CORE_DUMP
+ ProcDomainCoreDump = 53
+ // ProcDomainRestore is libvirt's REMOTE_PROC_DOMAIN_RESTORE
+ ProcDomainRestore = 54
+ // ProcDomainSave is libvirt's REMOTE_PROC_DOMAIN_SAVE
+ ProcDomainSave = 55
+ // ProcDomainGetSchedulerType is libvirt's REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE
+ ProcDomainGetSchedulerType = 56
+ // ProcDomainGetSchedulerParameters is libvirt's REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS
+ ProcDomainGetSchedulerParameters = 57
+ // ProcDomainSetSchedulerParameters is libvirt's REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS
+ ProcDomainSetSchedulerParameters = 58
+ // ProcConnectGetHostname is libvirt's REMOTE_PROC_CONNECT_GET_HOSTNAME
+ ProcConnectGetHostname = 59
+ // ProcConnectSupportsFeature is libvirt's REMOTE_PROC_CONNECT_SUPPORTS_FEATURE
+ ProcConnectSupportsFeature = 60
+ // ProcDomainMigratePrepare is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE
+ ProcDomainMigratePrepare = 61
+ // ProcDomainMigratePerform is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PERFORM
+ ProcDomainMigratePerform = 62
+ // ProcDomainMigrateFinish is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_FINISH
+ ProcDomainMigrateFinish = 63
+ // ProcDomainBlockStats is libvirt's REMOTE_PROC_DOMAIN_BLOCK_STATS
+ ProcDomainBlockStats = 64
+ // ProcDomainInterfaceStats is libvirt's REMOTE_PROC_DOMAIN_INTERFACE_STATS
+ ProcDomainInterfaceStats = 65
+ // ProcAuthList is libvirt's REMOTE_PROC_AUTH_LIST
+ ProcAuthList = 66
+ // ProcAuthSaslInit is libvirt's REMOTE_PROC_AUTH_SASL_INIT
+ ProcAuthSaslInit = 67
+ // ProcAuthSaslStart is libvirt's REMOTE_PROC_AUTH_SASL_START
+ ProcAuthSaslStart = 68
+ // ProcAuthSaslStep is libvirt's REMOTE_PROC_AUTH_SASL_STEP
+ ProcAuthSaslStep = 69
+ // ProcAuthPolkit is libvirt's REMOTE_PROC_AUTH_POLKIT
+ ProcAuthPolkit = 70
+ // ProcConnectNumOfStoragePools is libvirt's REMOTE_PROC_CONNECT_NUM_OF_STORAGE_POOLS
+ ProcConnectNumOfStoragePools = 71
+ // ProcConnectListStoragePools is libvirt's REMOTE_PROC_CONNECT_LIST_STORAGE_POOLS
+ ProcConnectListStoragePools = 72
+ // ProcConnectNumOfDefinedStoragePools is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DEFINED_STORAGE_POOLS
+ ProcConnectNumOfDefinedStoragePools = 73
+ // ProcConnectListDefinedStoragePools is libvirt's REMOTE_PROC_CONNECT_LIST_DEFINED_STORAGE_POOLS
+ ProcConnectListDefinedStoragePools = 74
+ // ProcConnectFindStoragePoolSources is libvirt's REMOTE_PROC_CONNECT_FIND_STORAGE_POOL_SOURCES
+ ProcConnectFindStoragePoolSources = 75
+ // ProcStoragePoolCreateXML is libvirt's REMOTE_PROC_STORAGE_POOL_CREATE_XML
+ ProcStoragePoolCreateXML = 76
+ // ProcStoragePoolDefineXML is libvirt's REMOTE_PROC_STORAGE_POOL_DEFINE_XML
+ ProcStoragePoolDefineXML = 77
+ // ProcStoragePoolCreate is libvirt's REMOTE_PROC_STORAGE_POOL_CREATE
+ ProcStoragePoolCreate = 78
+ // ProcStoragePoolBuild is libvirt's REMOTE_PROC_STORAGE_POOL_BUILD
+ ProcStoragePoolBuild = 79
+ // ProcStoragePoolDestroy is libvirt's REMOTE_PROC_STORAGE_POOL_DESTROY
+ ProcStoragePoolDestroy = 80
+ // ProcStoragePoolDelete is libvirt's REMOTE_PROC_STORAGE_POOL_DELETE
+ ProcStoragePoolDelete = 81
+ // ProcStoragePoolUndefine is libvirt's REMOTE_PROC_STORAGE_POOL_UNDEFINE
+ ProcStoragePoolUndefine = 82
+ // ProcStoragePoolRefresh is libvirt's REMOTE_PROC_STORAGE_POOL_REFRESH
+ ProcStoragePoolRefresh = 83
+ // ProcStoragePoolLookupByName is libvirt's REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME
+ ProcStoragePoolLookupByName = 84
+ // ProcStoragePoolLookupByUUID is libvirt's REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID
+ ProcStoragePoolLookupByUUID = 85
+ // ProcStoragePoolLookupByVolume is libvirt's REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME
+ ProcStoragePoolLookupByVolume = 86
+ // ProcStoragePoolGetInfo is libvirt's REMOTE_PROC_STORAGE_POOL_GET_INFO
+ ProcStoragePoolGetInfo = 87
+ // ProcStoragePoolGetXMLDesc is libvirt's REMOTE_PROC_STORAGE_POOL_GET_XML_DESC
+ ProcStoragePoolGetXMLDesc = 88
+ // ProcStoragePoolGetAutostart is libvirt's REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART
+ ProcStoragePoolGetAutostart = 89
+ // ProcStoragePoolSetAutostart is libvirt's REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART
+ ProcStoragePoolSetAutostart = 90
+ // ProcStoragePoolNumOfVolumes is libvirt's REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES
+ ProcStoragePoolNumOfVolumes = 91
+ // ProcStoragePoolListVolumes is libvirt's REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES
+ ProcStoragePoolListVolumes = 92
+ // ProcStorageVolCreateXML is libvirt's REMOTE_PROC_STORAGE_VOL_CREATE_XML
+ ProcStorageVolCreateXML = 93
+ // ProcStorageVolDelete is libvirt's REMOTE_PROC_STORAGE_VOL_DELETE
+ ProcStorageVolDelete = 94
+ // ProcStorageVolLookupByName is libvirt's REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME
+ ProcStorageVolLookupByName = 95
+ // ProcStorageVolLookupByKey is libvirt's REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY
+ ProcStorageVolLookupByKey = 96
+ // ProcStorageVolLookupByPath is libvirt's REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH
+ ProcStorageVolLookupByPath = 97
+ // ProcStorageVolGetInfo is libvirt's REMOTE_PROC_STORAGE_VOL_GET_INFO
+ ProcStorageVolGetInfo = 98
+ // ProcStorageVolGetXMLDesc is libvirt's REMOTE_PROC_STORAGE_VOL_GET_XML_DESC
+ ProcStorageVolGetXMLDesc = 99
+ // ProcStorageVolGetPath is libvirt's REMOTE_PROC_STORAGE_VOL_GET_PATH
+ ProcStorageVolGetPath = 100
+ // ProcNodeGetCellsFreeMemory is libvirt's REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY
+ ProcNodeGetCellsFreeMemory = 101
+ // ProcNodeGetFreeMemory is libvirt's REMOTE_PROC_NODE_GET_FREE_MEMORY
+ ProcNodeGetFreeMemory = 102
+ // ProcDomainBlockPeek is libvirt's REMOTE_PROC_DOMAIN_BLOCK_PEEK
+ ProcDomainBlockPeek = 103
+ // ProcDomainMemoryPeek is libvirt's REMOTE_PROC_DOMAIN_MEMORY_PEEK
+ ProcDomainMemoryPeek = 104
+ // ProcConnectDomainEventRegister is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER
+ ProcConnectDomainEventRegister = 105
+ // ProcConnectDomainEventDeregister is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER
+ ProcConnectDomainEventDeregister = 106
+ // ProcDomainEventLifecycle is libvirt's REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE
+ ProcDomainEventLifecycle = 107
+ // ProcDomainMigratePrepare2 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2
+ ProcDomainMigratePrepare2 = 108
+ // ProcDomainMigrateFinish2 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_FINISH2
+ ProcDomainMigrateFinish2 = 109
+ // ProcConnectGetUri is libvirt's REMOTE_PROC_CONNECT_GET_URI
+ ProcConnectGetUri = 110
+ // ProcNodeNumOfDevices is libvirt's REMOTE_PROC_NODE_NUM_OF_DEVICES
+ ProcNodeNumOfDevices = 111
+ // ProcNodeListDevices is libvirt's REMOTE_PROC_NODE_LIST_DEVICES
+ ProcNodeListDevices = 112
+ // ProcNodeDeviceLookupByName is libvirt's REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME
+ ProcNodeDeviceLookupByName = 113
+ // ProcNodeDeviceGetXMLDesc is libvirt's REMOTE_PROC_NODE_DEVICE_GET_XML_DESC
+ ProcNodeDeviceGetXMLDesc = 114
+ // ProcNodeDeviceGetParent is libvirt's REMOTE_PROC_NODE_DEVICE_GET_PARENT
+ ProcNodeDeviceGetParent = 115
+ // ProcNodeDeviceNumOfCaps is libvirt's REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS
+ ProcNodeDeviceNumOfCaps = 116
+ // ProcNodeDeviceListCaps is libvirt's REMOTE_PROC_NODE_DEVICE_LIST_CAPS
+ ProcNodeDeviceListCaps = 117
+ // ProcNodeDeviceDettach is libvirt's REMOTE_PROC_NODE_DEVICE_DETTACH
+ ProcNodeDeviceDettach = 118
+ // ProcNodeDeviceReAttach is libvirt's REMOTE_PROC_NODE_DEVICE_RE_ATTACH
+ ProcNodeDeviceReAttach = 119
+ // ProcNodeDeviceReset is libvirt's REMOTE_PROC_NODE_DEVICE_RESET
+ ProcNodeDeviceReset = 120
+ // ProcDomainGetSecurityLabel is libvirt's REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL
+ ProcDomainGetSecurityLabel = 121
+ // ProcNodeGetSecurityModel is libvirt's REMOTE_PROC_NODE_GET_SECURITY_MODEL
+ ProcNodeGetSecurityModel = 122
+ // ProcNodeDeviceCreateXML is libvirt's REMOTE_PROC_NODE_DEVICE_CREATE_XML
+ ProcNodeDeviceCreateXML = 123
+ // ProcNodeDeviceDestroy is libvirt's REMOTE_PROC_NODE_DEVICE_DESTROY
+ ProcNodeDeviceDestroy = 124
+ // ProcStorageVolCreateXMLFrom is libvirt's REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM
+ ProcStorageVolCreateXMLFrom = 125
+ // ProcConnectNumOfInterfaces is libvirt's REMOTE_PROC_CONNECT_NUM_OF_INTERFACES
+ ProcConnectNumOfInterfaces = 126
+ // ProcConnectListInterfaces is libvirt's REMOTE_PROC_CONNECT_LIST_INTERFACES
+ ProcConnectListInterfaces = 127
+ // ProcInterfaceLookupByName is libvirt's REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME
+ ProcInterfaceLookupByName = 128
+ // ProcInterfaceLookupByMacString is libvirt's REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING
+ ProcInterfaceLookupByMacString = 129
+ // ProcInterfaceGetXMLDesc is libvirt's REMOTE_PROC_INTERFACE_GET_XML_DESC
+ ProcInterfaceGetXMLDesc = 130
+ // ProcInterfaceDefineXML is libvirt's REMOTE_PROC_INTERFACE_DEFINE_XML
+ ProcInterfaceDefineXML = 131
+ // ProcInterfaceUndefine is libvirt's REMOTE_PROC_INTERFACE_UNDEFINE
+ ProcInterfaceUndefine = 132
+ // ProcInterfaceCreate is libvirt's REMOTE_PROC_INTERFACE_CREATE
+ ProcInterfaceCreate = 133
+ // ProcInterfaceDestroy is libvirt's REMOTE_PROC_INTERFACE_DESTROY
+ ProcInterfaceDestroy = 134
+ // ProcConnectDomainXMLFromNative is libvirt's REMOTE_PROC_CONNECT_DOMAIN_XML_FROM_NATIVE
+ ProcConnectDomainXMLFromNative = 135
+ // ProcConnectDomainXMLToNative is libvirt's REMOTE_PROC_CONNECT_DOMAIN_XML_TO_NATIVE
+ ProcConnectDomainXMLToNative = 136
+ // ProcConnectNumOfDefinedInterfaces is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DEFINED_INTERFACES
+ ProcConnectNumOfDefinedInterfaces = 137
+ // ProcConnectListDefinedInterfaces is libvirt's REMOTE_PROC_CONNECT_LIST_DEFINED_INTERFACES
+ ProcConnectListDefinedInterfaces = 138
+ // ProcConnectNumOfSecrets is libvirt's REMOTE_PROC_CONNECT_NUM_OF_SECRETS
+ ProcConnectNumOfSecrets = 139
+ // ProcConnectListSecrets is libvirt's REMOTE_PROC_CONNECT_LIST_SECRETS
+ ProcConnectListSecrets = 140
+ // ProcSecretLookupByUUID is libvirt's REMOTE_PROC_SECRET_LOOKUP_BY_UUID
+ ProcSecretLookupByUUID = 141
+ // ProcSecretDefineXML is libvirt's REMOTE_PROC_SECRET_DEFINE_XML
+ ProcSecretDefineXML = 142
+ // ProcSecretGetXMLDesc is libvirt's REMOTE_PROC_SECRET_GET_XML_DESC
+ ProcSecretGetXMLDesc = 143
+ // ProcSecretSetValue is libvirt's REMOTE_PROC_SECRET_SET_VALUE
+ ProcSecretSetValue = 144
+ // ProcSecretGetValue is libvirt's REMOTE_PROC_SECRET_GET_VALUE
+ ProcSecretGetValue = 145
+ // ProcSecretUndefine is libvirt's REMOTE_PROC_SECRET_UNDEFINE
+ ProcSecretUndefine = 146
+ // ProcSecretLookupByUsage is libvirt's REMOTE_PROC_SECRET_LOOKUP_BY_USAGE
+ ProcSecretLookupByUsage = 147
+ // ProcDomainMigratePrepareTunnel is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL
+ ProcDomainMigratePrepareTunnel = 148
+ // ProcConnectIsSecure is libvirt's REMOTE_PROC_CONNECT_IS_SECURE
+ ProcConnectIsSecure = 149
+ // ProcDomainIsActive is libvirt's REMOTE_PROC_DOMAIN_IS_ACTIVE
+ ProcDomainIsActive = 150
+ // ProcDomainIsPersistent is libvirt's REMOTE_PROC_DOMAIN_IS_PERSISTENT
+ ProcDomainIsPersistent = 151
+ // ProcNetworkIsActive is libvirt's REMOTE_PROC_NETWORK_IS_ACTIVE
+ ProcNetworkIsActive = 152
+ // ProcNetworkIsPersistent is libvirt's REMOTE_PROC_NETWORK_IS_PERSISTENT
+ ProcNetworkIsPersistent = 153
+ // ProcStoragePoolIsActive is libvirt's REMOTE_PROC_STORAGE_POOL_IS_ACTIVE
+ ProcStoragePoolIsActive = 154
+ // ProcStoragePoolIsPersistent is libvirt's REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT
+ ProcStoragePoolIsPersistent = 155
+ // ProcInterfaceIsActive is libvirt's REMOTE_PROC_INTERFACE_IS_ACTIVE
+ ProcInterfaceIsActive = 156
+ // ProcConnectGetLibVersion is libvirt's REMOTE_PROC_CONNECT_GET_LIB_VERSION
+ ProcConnectGetLibVersion = 157
+ // ProcConnectCompareCPU is libvirt's REMOTE_PROC_CONNECT_COMPARE_CPU
+ ProcConnectCompareCPU = 158
+ // ProcDomainMemoryStats is libvirt's REMOTE_PROC_DOMAIN_MEMORY_STATS
+ ProcDomainMemoryStats = 159
+ // ProcDomainAttachDeviceFlags is libvirt's REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS
+ ProcDomainAttachDeviceFlags = 160
+ // ProcDomainDetachDeviceFlags is libvirt's REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS
+ ProcDomainDetachDeviceFlags = 161
+ // ProcConnectBaselineCPU is libvirt's REMOTE_PROC_CONNECT_BASELINE_CPU
+ ProcConnectBaselineCPU = 162
+ // ProcDomainGetJobInfo is libvirt's REMOTE_PROC_DOMAIN_GET_JOB_INFO
+ ProcDomainGetJobInfo = 163
+ // ProcDomainAbortJob is libvirt's REMOTE_PROC_DOMAIN_ABORT_JOB
+ ProcDomainAbortJob = 164
+ // ProcStorageVolWipe is libvirt's REMOTE_PROC_STORAGE_VOL_WIPE
+ ProcStorageVolWipe = 165
+ // ProcDomainMigrateSetMaxDowntime is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME
+ ProcDomainMigrateSetMaxDowntime = 166
+ // ProcConnectDomainEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER_ANY
+ ProcConnectDomainEventRegisterAny = 167
+ // ProcConnectDomainEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER_ANY
+ ProcConnectDomainEventDeregisterAny = 168
+ // ProcDomainEventReboot is libvirt's REMOTE_PROC_DOMAIN_EVENT_REBOOT
+ ProcDomainEventReboot = 169
+ // ProcDomainEventRtcChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE
+ ProcDomainEventRtcChange = 170
+ // ProcDomainEventWatchdog is libvirt's REMOTE_PROC_DOMAIN_EVENT_WATCHDOG
+ ProcDomainEventWatchdog = 171
+ // ProcDomainEventIOError is libvirt's REMOTE_PROC_DOMAIN_EVENT_IO_ERROR
+ ProcDomainEventIOError = 172
+ // ProcDomainEventGraphics is libvirt's REMOTE_PROC_DOMAIN_EVENT_GRAPHICS
+ ProcDomainEventGraphics = 173
+ // ProcDomainUpdateDeviceFlags is libvirt's REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS
+ ProcDomainUpdateDeviceFlags = 174
+ // ProcNwfilterLookupByName is libvirt's REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME
+ ProcNwfilterLookupByName = 175
+ // ProcNwfilterLookupByUUID is libvirt's REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID
+ ProcNwfilterLookupByUUID = 176
+ // ProcNwfilterGetXMLDesc is libvirt's REMOTE_PROC_NWFILTER_GET_XML_DESC
+ ProcNwfilterGetXMLDesc = 177
+ // ProcConnectNumOfNwfilters is libvirt's REMOTE_PROC_CONNECT_NUM_OF_NWFILTERS
+ ProcConnectNumOfNwfilters = 178
+ // ProcConnectListNwfilters is libvirt's REMOTE_PROC_CONNECT_LIST_NWFILTERS
+ ProcConnectListNwfilters = 179
+ // ProcNwfilterDefineXML is libvirt's REMOTE_PROC_NWFILTER_DEFINE_XML
+ ProcNwfilterDefineXML = 180
+ // ProcNwfilterUndefine is libvirt's REMOTE_PROC_NWFILTER_UNDEFINE
+ ProcNwfilterUndefine = 181
+ // ProcDomainManagedSave is libvirt's REMOTE_PROC_DOMAIN_MANAGED_SAVE
+ ProcDomainManagedSave = 182
+ // ProcDomainHasManagedSaveImage is libvirt's REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE
+ ProcDomainHasManagedSaveImage = 183
+ // ProcDomainManagedSaveRemove is libvirt's REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE
+ ProcDomainManagedSaveRemove = 184
+ // ProcDomainSnapshotCreateXML is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML
+ ProcDomainSnapshotCreateXML = 185
+ // ProcDomainSnapshotGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC
+ ProcDomainSnapshotGetXMLDesc = 186
+ // ProcDomainSnapshotNum is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_NUM
+ ProcDomainSnapshotNum = 187
+ // ProcDomainSnapshotListNames is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES
+ ProcDomainSnapshotListNames = 188
+ // ProcDomainSnapshotLookupByName is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME
+ ProcDomainSnapshotLookupByName = 189
+ // ProcDomainHasCurrentSnapshot is libvirt's REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT
+ ProcDomainHasCurrentSnapshot = 190
+ // ProcDomainSnapshotCurrent is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT
+ ProcDomainSnapshotCurrent = 191
+ // ProcDomainRevertToSnapshot is libvirt's REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT
+ ProcDomainRevertToSnapshot = 192
+ // ProcDomainSnapshotDelete is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE
+ ProcDomainSnapshotDelete = 193
+ // ProcDomainGetBlockInfo is libvirt's REMOTE_PROC_DOMAIN_GET_BLOCK_INFO
+ ProcDomainGetBlockInfo = 194
+ // ProcDomainEventIOErrorReason is libvirt's REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON
+ ProcDomainEventIOErrorReason = 195
+ // ProcDomainCreateWithFlags is libvirt's REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS
+ ProcDomainCreateWithFlags = 196
+ // ProcDomainSetMemoryParameters is libvirt's REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS
+ ProcDomainSetMemoryParameters = 197
+ // ProcDomainGetMemoryParameters is libvirt's REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS
+ ProcDomainGetMemoryParameters = 198
+ // ProcDomainSetVcpusFlags is libvirt's REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS
+ ProcDomainSetVcpusFlags = 199
+ // ProcDomainGetVcpusFlags is libvirt's REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS
+ ProcDomainGetVcpusFlags = 200
+ // ProcDomainOpenConsole is libvirt's REMOTE_PROC_DOMAIN_OPEN_CONSOLE
+ ProcDomainOpenConsole = 201
+ // ProcDomainIsUpdated is libvirt's REMOTE_PROC_DOMAIN_IS_UPDATED
+ ProcDomainIsUpdated = 202
+ // ProcConnectGetSysinfo is libvirt's REMOTE_PROC_CONNECT_GET_SYSINFO
+ ProcConnectGetSysinfo = 203
+ // ProcDomainSetMemoryFlags is libvirt's REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS
+ ProcDomainSetMemoryFlags = 204
+ // ProcDomainSetBlkioParameters is libvirt's REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS
+ ProcDomainSetBlkioParameters = 205
+ // ProcDomainGetBlkioParameters is libvirt's REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS
+ ProcDomainGetBlkioParameters = 206
+ // ProcDomainMigrateSetMaxSpeed is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED
+ ProcDomainMigrateSetMaxSpeed = 207
+ // ProcStorageVolUpload is libvirt's REMOTE_PROC_STORAGE_VOL_UPLOAD
+ ProcStorageVolUpload = 208
+ // ProcStorageVolDownload is libvirt's REMOTE_PROC_STORAGE_VOL_DOWNLOAD
+ ProcStorageVolDownload = 209
+ // ProcDomainInjectNmi is libvirt's REMOTE_PROC_DOMAIN_INJECT_NMI
+ ProcDomainInjectNmi = 210
+ // ProcDomainScreenshot is libvirt's REMOTE_PROC_DOMAIN_SCREENSHOT
+ ProcDomainScreenshot = 211
+ // ProcDomainGetState is libvirt's REMOTE_PROC_DOMAIN_GET_STATE
+ ProcDomainGetState = 212
+ // ProcDomainMigrateBegin3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3
+ ProcDomainMigrateBegin3 = 213
+ // ProcDomainMigratePrepare3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3
+ ProcDomainMigratePrepare3 = 214
+ // ProcDomainMigratePrepareTunnel3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3
+ ProcDomainMigratePrepareTunnel3 = 215
+ // ProcDomainMigratePerform3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3
+ ProcDomainMigratePerform3 = 216
+ // ProcDomainMigrateFinish3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_FINISH3
+ ProcDomainMigrateFinish3 = 217
+ // ProcDomainMigrateConfirm3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3
+ ProcDomainMigrateConfirm3 = 218
+ // ProcDomainSetSchedulerParametersFlags is libvirt's REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS
+ ProcDomainSetSchedulerParametersFlags = 219
+ // ProcInterfaceChangeBegin is libvirt's REMOTE_PROC_INTERFACE_CHANGE_BEGIN
+ ProcInterfaceChangeBegin = 220
+ // ProcInterfaceChangeCommit is libvirt's REMOTE_PROC_INTERFACE_CHANGE_COMMIT
+ ProcInterfaceChangeCommit = 221
+ // ProcInterfaceChangeRollback is libvirt's REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK
+ ProcInterfaceChangeRollback = 222
+ // ProcDomainGetSchedulerParametersFlags is libvirt's REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS
+ ProcDomainGetSchedulerParametersFlags = 223
+ // ProcDomainEventControlError is libvirt's REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR
+ ProcDomainEventControlError = 224
+ // ProcDomainPinVcpuFlags is libvirt's REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS
+ ProcDomainPinVcpuFlags = 225
+ // ProcDomainSendKey is libvirt's REMOTE_PROC_DOMAIN_SEND_KEY
+ ProcDomainSendKey = 226
+ // ProcNodeGetCPUStats is libvirt's REMOTE_PROC_NODE_GET_CPU_STATS
+ ProcNodeGetCPUStats = 227
+ // ProcNodeGetMemoryStats is libvirt's REMOTE_PROC_NODE_GET_MEMORY_STATS
+ ProcNodeGetMemoryStats = 228
+ // ProcDomainGetControlInfo is libvirt's REMOTE_PROC_DOMAIN_GET_CONTROL_INFO
+ ProcDomainGetControlInfo = 229
+ // ProcDomainGetVcpuPinInfo is libvirt's REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO
+ ProcDomainGetVcpuPinInfo = 230
+ // ProcDomainUndefineFlags is libvirt's REMOTE_PROC_DOMAIN_UNDEFINE_FLAGS
+ ProcDomainUndefineFlags = 231
+ // ProcDomainSaveFlags is libvirt's REMOTE_PROC_DOMAIN_SAVE_FLAGS
+ ProcDomainSaveFlags = 232
+ // ProcDomainRestoreFlags is libvirt's REMOTE_PROC_DOMAIN_RESTORE_FLAGS
+ ProcDomainRestoreFlags = 233
+ // ProcDomainDestroyFlags is libvirt's REMOTE_PROC_DOMAIN_DESTROY_FLAGS
+ ProcDomainDestroyFlags = 234
+ // ProcDomainSaveImageGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC
+ ProcDomainSaveImageGetXMLDesc = 235
+ // ProcDomainSaveImageDefineXML is libvirt's REMOTE_PROC_DOMAIN_SAVE_IMAGE_DEFINE_XML
+ ProcDomainSaveImageDefineXML = 236
+ // ProcDomainBlockJobAbort is libvirt's REMOTE_PROC_DOMAIN_BLOCK_JOB_ABORT
+ ProcDomainBlockJobAbort = 237
+ // ProcDomainGetBlockJobInfo is libvirt's REMOTE_PROC_DOMAIN_GET_BLOCK_JOB_INFO
+ ProcDomainGetBlockJobInfo = 238
+ // ProcDomainBlockJobSetSpeed is libvirt's REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED
+ ProcDomainBlockJobSetSpeed = 239
+ // ProcDomainBlockPull is libvirt's REMOTE_PROC_DOMAIN_BLOCK_PULL
+ ProcDomainBlockPull = 240
+ // ProcDomainEventBlockJob is libvirt's REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB
+ ProcDomainEventBlockJob = 241
+ // ProcDomainMigrateGetMaxSpeed is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED
+ ProcDomainMigrateGetMaxSpeed = 242
+ // ProcDomainBlockStatsFlags is libvirt's REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS
+ ProcDomainBlockStatsFlags = 243
+ // ProcDomainSnapshotGetParent is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT
+ ProcDomainSnapshotGetParent = 244
+ // ProcDomainReset is libvirt's REMOTE_PROC_DOMAIN_RESET
+ ProcDomainReset = 245
+ // ProcDomainSnapshotNumChildren is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN
+ ProcDomainSnapshotNumChildren = 246
+ // ProcDomainSnapshotListChildrenNames is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES
+ ProcDomainSnapshotListChildrenNames = 247
+ // ProcDomainEventDiskChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE
+ ProcDomainEventDiskChange = 248
+ // ProcDomainOpenGraphics is libvirt's REMOTE_PROC_DOMAIN_OPEN_GRAPHICS
+ ProcDomainOpenGraphics = 249
+ // ProcNodeSuspendForDuration is libvirt's REMOTE_PROC_NODE_SUSPEND_FOR_DURATION
+ ProcNodeSuspendForDuration = 250
+ // ProcDomainBlockResize is libvirt's REMOTE_PROC_DOMAIN_BLOCK_RESIZE
+ ProcDomainBlockResize = 251
+ // ProcDomainSetBlockIOTune is libvirt's REMOTE_PROC_DOMAIN_SET_BLOCK_IO_TUNE
+ ProcDomainSetBlockIOTune = 252
+ // ProcDomainGetBlockIOTune is libvirt's REMOTE_PROC_DOMAIN_GET_BLOCK_IO_TUNE
+ ProcDomainGetBlockIOTune = 253
+ // ProcDomainSetNumaParameters is libvirt's REMOTE_PROC_DOMAIN_SET_NUMA_PARAMETERS
+ ProcDomainSetNumaParameters = 254
+ // ProcDomainGetNumaParameters is libvirt's REMOTE_PROC_DOMAIN_GET_NUMA_PARAMETERS
+ ProcDomainGetNumaParameters = 255
+ // ProcDomainSetInterfaceParameters is libvirt's REMOTE_PROC_DOMAIN_SET_INTERFACE_PARAMETERS
+ ProcDomainSetInterfaceParameters = 256
+ // ProcDomainGetInterfaceParameters is libvirt's REMOTE_PROC_DOMAIN_GET_INTERFACE_PARAMETERS
+ ProcDomainGetInterfaceParameters = 257
+ // ProcDomainShutdownFlags is libvirt's REMOTE_PROC_DOMAIN_SHUTDOWN_FLAGS
+ ProcDomainShutdownFlags = 258
+ // ProcStorageVolWipePattern is libvirt's REMOTE_PROC_STORAGE_VOL_WIPE_PATTERN
+ ProcStorageVolWipePattern = 259
+ // ProcStorageVolResize is libvirt's REMOTE_PROC_STORAGE_VOL_RESIZE
+ ProcStorageVolResize = 260
+ // ProcDomainPmSuspendForDuration is libvirt's REMOTE_PROC_DOMAIN_PM_SUSPEND_FOR_DURATION
+ ProcDomainPmSuspendForDuration = 261
+ // ProcDomainGetCPUStats is libvirt's REMOTE_PROC_DOMAIN_GET_CPU_STATS
+ ProcDomainGetCPUStats = 262
+ // ProcDomainGetDiskErrors is libvirt's REMOTE_PROC_DOMAIN_GET_DISK_ERRORS
+ ProcDomainGetDiskErrors = 263
+ // ProcDomainSetMetadata is libvirt's REMOTE_PROC_DOMAIN_SET_METADATA
+ ProcDomainSetMetadata = 264
+ // ProcDomainGetMetadata is libvirt's REMOTE_PROC_DOMAIN_GET_METADATA
+ ProcDomainGetMetadata = 265
+ // ProcDomainBlockRebase is libvirt's REMOTE_PROC_DOMAIN_BLOCK_REBASE
+ ProcDomainBlockRebase = 266
+ // ProcDomainPmWakeup is libvirt's REMOTE_PROC_DOMAIN_PM_WAKEUP
+ ProcDomainPmWakeup = 267
+ // ProcDomainEventTrayChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE
+ ProcDomainEventTrayChange = 268
+ // ProcDomainEventPmwakeup is libvirt's REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP
+ ProcDomainEventPmwakeup = 269
+ // ProcDomainEventPmsuspend is libvirt's REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND
+ ProcDomainEventPmsuspend = 270
+ // ProcDomainSnapshotIsCurrent is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_IS_CURRENT
+ ProcDomainSnapshotIsCurrent = 271
+ // ProcDomainSnapshotHasMetadata is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_HAS_METADATA
+ ProcDomainSnapshotHasMetadata = 272
+ // ProcConnectListAllDomains is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS
+ ProcConnectListAllDomains = 273
+ // ProcDomainListAllSnapshots is libvirt's REMOTE_PROC_DOMAIN_LIST_ALL_SNAPSHOTS
+ ProcDomainListAllSnapshots = 274
+ // ProcDomainSnapshotListAllChildren is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_ALL_CHILDREN
+ ProcDomainSnapshotListAllChildren = 275
+ // ProcDomainEventBalloonChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_BALLOON_CHANGE
+ ProcDomainEventBalloonChange = 276
+ // ProcDomainGetHostname is libvirt's REMOTE_PROC_DOMAIN_GET_HOSTNAME
+ ProcDomainGetHostname = 277
+ // ProcDomainGetSecurityLabelList is libvirt's REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL_LIST
+ ProcDomainGetSecurityLabelList = 278
+ // ProcDomainPinEmulator is libvirt's REMOTE_PROC_DOMAIN_PIN_EMULATOR
+ ProcDomainPinEmulator = 279
+ // ProcDomainGetEmulatorPinInfo is libvirt's REMOTE_PROC_DOMAIN_GET_EMULATOR_PIN_INFO
+ ProcDomainGetEmulatorPinInfo = 280
+ // ProcConnectListAllStoragePools is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_STORAGE_POOLS
+ ProcConnectListAllStoragePools = 281
+ // ProcStoragePoolListAllVolumes is libvirt's REMOTE_PROC_STORAGE_POOL_LIST_ALL_VOLUMES
+ ProcStoragePoolListAllVolumes = 282
+ // ProcConnectListAllNetworks is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_NETWORKS
+ ProcConnectListAllNetworks = 283
+ // ProcConnectListAllInterfaces is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES
+ ProcConnectListAllInterfaces = 284
+ // ProcConnectListAllNodeDevices is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_NODE_DEVICES
+ ProcConnectListAllNodeDevices = 285
+ // ProcConnectListAllNwfilters is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS
+ ProcConnectListAllNwfilters = 286
+ // ProcConnectListAllSecrets is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_SECRETS
+ ProcConnectListAllSecrets = 287
+ // ProcNodeSetMemoryParameters is libvirt's REMOTE_PROC_NODE_SET_MEMORY_PARAMETERS
+ ProcNodeSetMemoryParameters = 288
+ // ProcNodeGetMemoryParameters is libvirt's REMOTE_PROC_NODE_GET_MEMORY_PARAMETERS
+ ProcNodeGetMemoryParameters = 289
+ // ProcDomainBlockCommit is libvirt's REMOTE_PROC_DOMAIN_BLOCK_COMMIT
+ ProcDomainBlockCommit = 290
+ // ProcNetworkUpdate is libvirt's REMOTE_PROC_NETWORK_UPDATE
+ ProcNetworkUpdate = 291
+ // ProcDomainEventPmsuspendDisk is libvirt's REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND_DISK
+ ProcDomainEventPmsuspendDisk = 292
+ // ProcNodeGetCPUMap is libvirt's REMOTE_PROC_NODE_GET_CPU_MAP
+ ProcNodeGetCPUMap = 293
+ // ProcDomainFstrim is libvirt's REMOTE_PROC_DOMAIN_FSTRIM
+ ProcDomainFstrim = 294
+ // ProcDomainSendProcessSignal is libvirt's REMOTE_PROC_DOMAIN_SEND_PROCESS_SIGNAL
+ ProcDomainSendProcessSignal = 295
+ // ProcDomainOpenChannel is libvirt's REMOTE_PROC_DOMAIN_OPEN_CHANNEL
+ ProcDomainOpenChannel = 296
+ // ProcNodeDeviceLookupScsiHostByWwn is libvirt's REMOTE_PROC_NODE_DEVICE_LOOKUP_SCSI_HOST_BY_WWN
+ ProcNodeDeviceLookupScsiHostByWwn = 297
+ // ProcDomainGetJobStats is libvirt's REMOTE_PROC_DOMAIN_GET_JOB_STATS
+ ProcDomainGetJobStats = 298
+ // ProcDomainMigrateGetCompressionCache is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_GET_COMPRESSION_CACHE
+ ProcDomainMigrateGetCompressionCache = 299
+ // ProcDomainMigrateSetCompressionCache is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_SET_COMPRESSION_CACHE
+ ProcDomainMigrateSetCompressionCache = 300
+ // ProcNodeDeviceDetachFlags is libvirt's REMOTE_PROC_NODE_DEVICE_DETACH_FLAGS
+ ProcNodeDeviceDetachFlags = 301
+ // ProcDomainMigrateBegin3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3_PARAMS
+ ProcDomainMigrateBegin3Params = 302
+ // ProcDomainMigratePrepare3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3_PARAMS
+ ProcDomainMigratePrepare3Params = 303
+ // ProcDomainMigratePrepareTunnel3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3_PARAMS
+ ProcDomainMigratePrepareTunnel3Params = 304
+ // ProcDomainMigratePerform3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3_PARAMS
+ ProcDomainMigratePerform3Params = 305
+ // ProcDomainMigrateFinish3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_FINISH3_PARAMS
+ ProcDomainMigrateFinish3Params = 306
+ // ProcDomainMigrateConfirm3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3_PARAMS
+ ProcDomainMigrateConfirm3Params = 307
+ // ProcDomainSetMemoryStatsPeriod is libvirt's REMOTE_PROC_DOMAIN_SET_MEMORY_STATS_PERIOD
+ ProcDomainSetMemoryStatsPeriod = 308
+ // ProcDomainCreateXMLWithFiles is libvirt's REMOTE_PROC_DOMAIN_CREATE_XML_WITH_FILES
+ ProcDomainCreateXMLWithFiles = 309
+ // ProcDomainCreateWithFiles is libvirt's REMOTE_PROC_DOMAIN_CREATE_WITH_FILES
+ ProcDomainCreateWithFiles = 310
+ // ProcDomainEventDeviceRemoved is libvirt's REMOTE_PROC_DOMAIN_EVENT_DEVICE_REMOVED
+ ProcDomainEventDeviceRemoved = 311
+ // ProcConnectGetCPUModelNames is libvirt's REMOTE_PROC_CONNECT_GET_CPU_MODEL_NAMES
+ ProcConnectGetCPUModelNames = 312
+ // ProcConnectNetworkEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_NETWORK_EVENT_REGISTER_ANY
+ ProcConnectNetworkEventRegisterAny = 313
+ // ProcConnectNetworkEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_NETWORK_EVENT_DEREGISTER_ANY
+ ProcConnectNetworkEventDeregisterAny = 314
+ // ProcNetworkEventLifecycle is libvirt's REMOTE_PROC_NETWORK_EVENT_LIFECYCLE
+ ProcNetworkEventLifecycle = 315
+ // ProcConnectDomainEventCallbackRegisterAny is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_REGISTER_ANY
+ ProcConnectDomainEventCallbackRegisterAny = 316
+ // ProcConnectDomainEventCallbackDeregisterAny is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_DEREGISTER_ANY
+ ProcConnectDomainEventCallbackDeregisterAny = 317
+ // ProcDomainEventCallbackLifecycle is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_LIFECYCLE
+ ProcDomainEventCallbackLifecycle = 318
+ // ProcDomainEventCallbackReboot is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_REBOOT
+ ProcDomainEventCallbackReboot = 319
+ // ProcDomainEventCallbackRtcChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_RTC_CHANGE
+ ProcDomainEventCallbackRtcChange = 320
+ // ProcDomainEventCallbackWatchdog is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_WATCHDOG
+ ProcDomainEventCallbackWatchdog = 321
+ // ProcDomainEventCallbackIOError is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR
+ ProcDomainEventCallbackIOError = 322
+ // ProcDomainEventCallbackGraphics is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_GRAPHICS
+ ProcDomainEventCallbackGraphics = 323
+ // ProcDomainEventCallbackIOErrorReason is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR_REASON
+ ProcDomainEventCallbackIOErrorReason = 324
+ // ProcDomainEventCallbackControlError is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_CONTROL_ERROR
+ ProcDomainEventCallbackControlError = 325
+ // ProcDomainEventCallbackBlockJob is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BLOCK_JOB
+ ProcDomainEventCallbackBlockJob = 326
+ // ProcDomainEventCallbackDiskChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DISK_CHANGE
+ ProcDomainEventCallbackDiskChange = 327
+ // ProcDomainEventCallbackTrayChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TRAY_CHANGE
+ ProcDomainEventCallbackTrayChange = 328
+ // ProcDomainEventCallbackPmwakeup is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMWAKEUP
+ ProcDomainEventCallbackPmwakeup = 329
+ // ProcDomainEventCallbackPmsuspend is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND
+ ProcDomainEventCallbackPmsuspend = 330
+ // ProcDomainEventCallbackBalloonChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BALLOON_CHANGE
+ ProcDomainEventCallbackBalloonChange = 331
+ // ProcDomainEventCallbackPmsuspendDisk is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND_DISK
+ ProcDomainEventCallbackPmsuspendDisk = 332
+ // ProcDomainEventCallbackDeviceRemoved is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVED
+ ProcDomainEventCallbackDeviceRemoved = 333
+ // ProcDomainCoreDumpWithFormat is libvirt's REMOTE_PROC_DOMAIN_CORE_DUMP_WITH_FORMAT
+ ProcDomainCoreDumpWithFormat = 334
+ // ProcDomainFsfreeze is libvirt's REMOTE_PROC_DOMAIN_FSFREEZE
+ ProcDomainFsfreeze = 335
+ // ProcDomainFsthaw is libvirt's REMOTE_PROC_DOMAIN_FSTHAW
+ ProcDomainFsthaw = 336
+ // ProcDomainGetTime is libvirt's REMOTE_PROC_DOMAIN_GET_TIME
+ ProcDomainGetTime = 337
+ // ProcDomainSetTime is libvirt's REMOTE_PROC_DOMAIN_SET_TIME
+ ProcDomainSetTime = 338
+ // ProcDomainEventBlockJob2 is libvirt's REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_2
+ ProcDomainEventBlockJob2 = 339
+ // ProcNodeGetFreePages is libvirt's REMOTE_PROC_NODE_GET_FREE_PAGES
+ ProcNodeGetFreePages = 340
+ // ProcNetworkGetDhcpLeases is libvirt's REMOTE_PROC_NETWORK_GET_DHCP_LEASES
+ ProcNetworkGetDhcpLeases = 341
+ // ProcConnectGetDomainCapabilities is libvirt's REMOTE_PROC_CONNECT_GET_DOMAIN_CAPABILITIES
+ ProcConnectGetDomainCapabilities = 342
+ // ProcDomainOpenGraphicsFd is libvirt's REMOTE_PROC_DOMAIN_OPEN_GRAPHICS_FD
+ ProcDomainOpenGraphicsFd = 343
+ // ProcConnectGetAllDomainStats is libvirt's REMOTE_PROC_CONNECT_GET_ALL_DOMAIN_STATS
+ ProcConnectGetAllDomainStats = 344
+ // ProcDomainBlockCopy is libvirt's REMOTE_PROC_DOMAIN_BLOCK_COPY
+ ProcDomainBlockCopy = 345
+ // ProcDomainEventCallbackTunable is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TUNABLE
+ ProcDomainEventCallbackTunable = 346
+ // ProcNodeAllocPages is libvirt's REMOTE_PROC_NODE_ALLOC_PAGES
+ ProcNodeAllocPages = 347
+ // ProcDomainEventCallbackAgentLifecycle is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_AGENT_LIFECYCLE
+ ProcDomainEventCallbackAgentLifecycle = 348
+ // ProcDomainGetFsinfo is libvirt's REMOTE_PROC_DOMAIN_GET_FSINFO
+ ProcDomainGetFsinfo = 349
+ // ProcDomainDefineXMLFlags is libvirt's REMOTE_PROC_DOMAIN_DEFINE_XML_FLAGS
+ ProcDomainDefineXMLFlags = 350
+ // ProcDomainGetIothreadInfo is libvirt's REMOTE_PROC_DOMAIN_GET_IOTHREAD_INFO
+ ProcDomainGetIothreadInfo = 351
+ // ProcDomainPinIothread is libvirt's REMOTE_PROC_DOMAIN_PIN_IOTHREAD
+ ProcDomainPinIothread = 352
+ // ProcDomainInterfaceAddresses is libvirt's REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES
+ ProcDomainInterfaceAddresses = 353
+ // ProcDomainEventCallbackDeviceAdded is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_ADDED
+ ProcDomainEventCallbackDeviceAdded = 354
+ // ProcDomainAddIothread is libvirt's REMOTE_PROC_DOMAIN_ADD_IOTHREAD
+ ProcDomainAddIothread = 355
+ // ProcDomainDelIothread is libvirt's REMOTE_PROC_DOMAIN_DEL_IOTHREAD
+ ProcDomainDelIothread = 356
+ // ProcDomainSetUserPassword is libvirt's REMOTE_PROC_DOMAIN_SET_USER_PASSWORD
+ ProcDomainSetUserPassword = 357
+ // ProcDomainRename is libvirt's REMOTE_PROC_DOMAIN_RENAME
+ ProcDomainRename = 358
+ // ProcDomainEventCallbackMigrationIteration is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_MIGRATION_ITERATION
+ ProcDomainEventCallbackMigrationIteration = 359
+ // ProcConnectRegisterCloseCallback is libvirt's REMOTE_PROC_CONNECT_REGISTER_CLOSE_CALLBACK
+ ProcConnectRegisterCloseCallback = 360
+ // ProcConnectUnregisterCloseCallback is libvirt's REMOTE_PROC_CONNECT_UNREGISTER_CLOSE_CALLBACK
+ ProcConnectUnregisterCloseCallback = 361
+ // ProcConnectEventConnectionClosed is libvirt's REMOTE_PROC_CONNECT_EVENT_CONNECTION_CLOSED
+ ProcConnectEventConnectionClosed = 362
+ // ProcDomainEventCallbackJobCompleted is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_JOB_COMPLETED
+ ProcDomainEventCallbackJobCompleted = 363
+ // ProcDomainMigrateStartPostCopy is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_START_POST_COPY
+ ProcDomainMigrateStartPostCopy = 364
+ // ProcDomainGetPerfEvents is libvirt's REMOTE_PROC_DOMAIN_GET_PERF_EVENTS
+ ProcDomainGetPerfEvents = 365
+ // ProcDomainSetPerfEvents is libvirt's REMOTE_PROC_DOMAIN_SET_PERF_EVENTS
+ ProcDomainSetPerfEvents = 366
+ // ProcDomainEventCallbackDeviceRemovalFailed is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVAL_FAILED
+ ProcDomainEventCallbackDeviceRemovalFailed = 367
+ // ProcConnectStoragePoolEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_REGISTER_ANY
+ ProcConnectStoragePoolEventRegisterAny = 368
+ // ProcConnectStoragePoolEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_DEREGISTER_ANY
+ ProcConnectStoragePoolEventDeregisterAny = 369
+ // ProcStoragePoolEventLifecycle is libvirt's REMOTE_PROC_STORAGE_POOL_EVENT_LIFECYCLE
+ ProcStoragePoolEventLifecycle = 370
+ // ProcDomainGetGuestVcpus is libvirt's REMOTE_PROC_DOMAIN_GET_GUEST_VCPUS
+ ProcDomainGetGuestVcpus = 371
+ // ProcDomainSetGuestVcpus is libvirt's REMOTE_PROC_DOMAIN_SET_GUEST_VCPUS
+ ProcDomainSetGuestVcpus = 372
+ // ProcStoragePoolEventRefresh is libvirt's REMOTE_PROC_STORAGE_POOL_EVENT_REFRESH
+ ProcStoragePoolEventRefresh = 373
+ // ProcConnectNodeDeviceEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_REGISTER_ANY
+ ProcConnectNodeDeviceEventRegisterAny = 374
+ // ProcConnectNodeDeviceEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_DEREGISTER_ANY
+ ProcConnectNodeDeviceEventDeregisterAny = 375
+ // ProcNodeDeviceEventLifecycle is libvirt's REMOTE_PROC_NODE_DEVICE_EVENT_LIFECYCLE
+ ProcNodeDeviceEventLifecycle = 376
+ // ProcNodeDeviceEventUpdate is libvirt's REMOTE_PROC_NODE_DEVICE_EVENT_UPDATE
+ ProcNodeDeviceEventUpdate = 377
+ // ProcStorageVolGetInfoFlags is libvirt's REMOTE_PROC_STORAGE_VOL_GET_INFO_FLAGS
+ ProcStorageVolGetInfoFlags = 378
+ // ProcDomainEventCallbackMetadataChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_METADATA_CHANGE
+ ProcDomainEventCallbackMetadataChange = 379
+ // ProcConnectSecretEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_SECRET_EVENT_REGISTER_ANY
+ ProcConnectSecretEventRegisterAny = 380
+ // ProcConnectSecretEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_SECRET_EVENT_DEREGISTER_ANY
+ ProcConnectSecretEventDeregisterAny = 381
+ // ProcSecretEventLifecycle is libvirt's REMOTE_PROC_SECRET_EVENT_LIFECYCLE
+ ProcSecretEventLifecycle = 382
+ // ProcSecretEventValueChanged is libvirt's REMOTE_PROC_SECRET_EVENT_VALUE_CHANGED
+ ProcSecretEventValueChanged = 383
+ // ProcDomainSetVcpu is libvirt's REMOTE_PROC_DOMAIN_SET_VCPU
+ ProcDomainSetVcpu = 384
+ // ProcDomainEventBlockThreshold is libvirt's REMOTE_PROC_DOMAIN_EVENT_BLOCK_THRESHOLD
+ ProcDomainEventBlockThreshold = 385
+ // ProcDomainSetBlockThreshold is libvirt's REMOTE_PROC_DOMAIN_SET_BLOCK_THRESHOLD
+ ProcDomainSetBlockThreshold = 386
+ // ProcDomainMigrateGetMaxDowntime is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_DOWNTIME
+ ProcDomainMigrateGetMaxDowntime = 387
+ // ProcDomainManagedSaveGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_MANAGED_SAVE_GET_XML_DESC
+ ProcDomainManagedSaveGetXMLDesc = 388
+ // ProcDomainManagedSaveDefineXML is libvirt's REMOTE_PROC_DOMAIN_MANAGED_SAVE_DEFINE_XML
+ ProcDomainManagedSaveDefineXML = 389
+ // ProcDomainSetLifecycleAction is libvirt's REMOTE_PROC_DOMAIN_SET_LIFECYCLE_ACTION
+ ProcDomainSetLifecycleAction = 390
+ // ProcStoragePoolLookupByTargetPath is libvirt's REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH
+ ProcStoragePoolLookupByTargetPath = 391
+ // ProcDomainDetachDeviceAlias is libvirt's REMOTE_PROC_DOMAIN_DETACH_DEVICE_ALIAS
+ ProcDomainDetachDeviceAlias = 392
+ // ProcConnectCompareHypervisorCPU is libvirt's REMOTE_PROC_CONNECT_COMPARE_HYPERVISOR_CPU
+ ProcConnectCompareHypervisorCPU = 393
+ // ProcConnectBaselineHypervisorCPU is libvirt's REMOTE_PROC_CONNECT_BASELINE_HYPERVISOR_CPU
+ ProcConnectBaselineHypervisorCPU = 394
+ // ProcNodeGetSevInfo is libvirt's REMOTE_PROC_NODE_GET_SEV_INFO
+ ProcNodeGetSevInfo = 395
+ // ProcDomainGetLaunchSecurityInfo is libvirt's REMOTE_PROC_DOMAIN_GET_LAUNCH_SECURITY_INFO
+ ProcDomainGetLaunchSecurityInfo = 396
+ // ProcNwfilterBindingLookupByPortDev is libvirt's REMOTE_PROC_NWFILTER_BINDING_LOOKUP_BY_PORT_DEV
+ ProcNwfilterBindingLookupByPortDev = 397
+ // ProcNwfilterBindingGetXMLDesc is libvirt's REMOTE_PROC_NWFILTER_BINDING_GET_XML_DESC
+ ProcNwfilterBindingGetXMLDesc = 398
+ // ProcNwfilterBindingCreateXML is libvirt's REMOTE_PROC_NWFILTER_BINDING_CREATE_XML
+ ProcNwfilterBindingCreateXML = 399
+ // ProcNwfilterBindingDelete is libvirt's REMOTE_PROC_NWFILTER_BINDING_DELETE
+ ProcNwfilterBindingDelete = 400
+ // ProcConnectListAllNwfilterBindings is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_NWFILTER_BINDINGS
+ ProcConnectListAllNwfilterBindings = 401
+ // ProcDomainSetIothreadParams is libvirt's REMOTE_PROC_DOMAIN_SET_IOTHREAD_PARAMS
+ ProcDomainSetIothreadParams = 402
+ // ProcConnectGetStoragePoolCapabilities is libvirt's REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES
+ ProcConnectGetStoragePoolCapabilities = 403
+ // ProcNetworkListAllPorts is libvirt's REMOTE_PROC_NETWORK_LIST_ALL_PORTS
+ ProcNetworkListAllPorts = 404
+ // ProcNetworkPortLookupByUUID is libvirt's REMOTE_PROC_NETWORK_PORT_LOOKUP_BY_UUID
+ ProcNetworkPortLookupByUUID = 405
+ // ProcNetworkPortCreateXML is libvirt's REMOTE_PROC_NETWORK_PORT_CREATE_XML
+ ProcNetworkPortCreateXML = 406
+ // ProcNetworkPortGetParameters is libvirt's REMOTE_PROC_NETWORK_PORT_GET_PARAMETERS
+ ProcNetworkPortGetParameters = 407
+ // ProcNetworkPortSetParameters is libvirt's REMOTE_PROC_NETWORK_PORT_SET_PARAMETERS
+ ProcNetworkPortSetParameters = 408
+ // ProcNetworkPortGetXMLDesc is libvirt's REMOTE_PROC_NETWORK_PORT_GET_XML_DESC
+ ProcNetworkPortGetXMLDesc = 409
+ // ProcNetworkPortDelete is libvirt's REMOTE_PROC_NETWORK_PORT_DELETE
+ ProcNetworkPortDelete = 410
+ // ProcDomainCheckpointCreateXML is libvirt's REMOTE_PROC_DOMAIN_CHECKPOINT_CREATE_XML
+ ProcDomainCheckpointCreateXML = 411
+ // ProcDomainCheckpointGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_CHECKPOINT_GET_XML_DESC
+ ProcDomainCheckpointGetXMLDesc = 412
+ // ProcDomainListAllCheckpoints is libvirt's REMOTE_PROC_DOMAIN_LIST_ALL_CHECKPOINTS
+ ProcDomainListAllCheckpoints = 413
+ // ProcDomainCheckpointListAllChildren is libvirt's REMOTE_PROC_DOMAIN_CHECKPOINT_LIST_ALL_CHILDREN
+ ProcDomainCheckpointListAllChildren = 414
+ // ProcDomainCheckpointLookupByName is libvirt's REMOTE_PROC_DOMAIN_CHECKPOINT_LOOKUP_BY_NAME
+ ProcDomainCheckpointLookupByName = 415
+ // ProcDomainCheckpointGetParent is libvirt's REMOTE_PROC_DOMAIN_CHECKPOINT_GET_PARENT
+ ProcDomainCheckpointGetParent = 416
+ // ProcDomainCheckpointDelete is libvirt's REMOTE_PROC_DOMAIN_CHECKPOINT_DELETE
+ ProcDomainCheckpointDelete = 417
+ // ProcDomainGetGuestInfo is libvirt's REMOTE_PROC_DOMAIN_GET_GUEST_INFO
+ ProcDomainGetGuestInfo = 418
+ // ProcConnectSetIdentity is libvirt's REMOTE_PROC_CONNECT_SET_IDENTITY
+ ProcConnectSetIdentity = 419
+ // ProcDomainAgentSetResponseTimeout is libvirt's REMOTE_PROC_DOMAIN_AGENT_SET_RESPONSE_TIMEOUT
+ ProcDomainAgentSetResponseTimeout = 420
+ // ProcDomainBackupBegin is libvirt's REMOTE_PROC_DOMAIN_BACKUP_BEGIN
+ ProcDomainBackupBegin = 421
+ // ProcDomainBackupGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_BACKUP_GET_XML_DESC
+ ProcDomainBackupGetXMLDesc = 422
+ // ProcDomainEventMemoryFailure is libvirt's REMOTE_PROC_DOMAIN_EVENT_MEMORY_FAILURE
+ ProcDomainEventMemoryFailure = 423
+ // ProcDomainAuthorizedSshKeysGet is libvirt's REMOTE_PROC_DOMAIN_AUTHORIZED_SSH_KEYS_GET
+ ProcDomainAuthorizedSshKeysGet = 424
+ // ProcDomainAuthorizedSshKeysSet is libvirt's REMOTE_PROC_DOMAIN_AUTHORIZED_SSH_KEYS_SET
+ ProcDomainAuthorizedSshKeysSet = 425
+
+
+ // From consts:
+ // StringMax is libvirt's REMOTE_STRING_MAX
+ StringMax = 4194304
+ // ConnectIdentityParamsMax is libvirt's REMOTE_CONNECT_IDENTITY_PARAMS_MAX
+ ConnectIdentityParamsMax = 20
+ // DomainListMax is libvirt's REMOTE_DOMAIN_LIST_MAX
+ DomainListMax = 16384
+ // CpumapMax is libvirt's REMOTE_CPUMAP_MAX
+ CpumapMax = 2048
+ // VcpuinfoMax is libvirt's REMOTE_VCPUINFO_MAX
+ VcpuinfoMax = 16384
+ // CpumapsMax is libvirt's REMOTE_CPUMAPS_MAX
+ CpumapsMax = 8388608
+ // IothreadInfoMax is libvirt's REMOTE_IOTHREAD_INFO_MAX
+ IothreadInfoMax = 16384
+ // MigrateCookieMax is libvirt's REMOTE_MIGRATE_COOKIE_MAX
+ MigrateCookieMax = 4194304
+ // NetworkListMax is libvirt's REMOTE_NETWORK_LIST_MAX
+ NetworkListMax = 16384
+ // NetworkPortListMax is libvirt's REMOTE_NETWORK_PORT_LIST_MAX
+ NetworkPortListMax = 16384
+ // InterfaceListMax is libvirt's REMOTE_INTERFACE_LIST_MAX
+ InterfaceListMax = 16384
+ // StoragePoolListMax is libvirt's REMOTE_STORAGE_POOL_LIST_MAX
+ StoragePoolListMax = 16384
+ // StorageVolListMax is libvirt's REMOTE_STORAGE_VOL_LIST_MAX
+ StorageVolListMax = 16384
+ // NodeDeviceListMax is libvirt's REMOTE_NODE_DEVICE_LIST_MAX
+ NodeDeviceListMax = 65536
+ // NodeDeviceCapsListMax is libvirt's REMOTE_NODE_DEVICE_CAPS_LIST_MAX
+ NodeDeviceCapsListMax = 65536
+ // NwfilterListMax is libvirt's REMOTE_NWFILTER_LIST_MAX
+ NwfilterListMax = 16384
+ // NwfilterBindingListMax is libvirt's REMOTE_NWFILTER_BINDING_LIST_MAX
+ NwfilterBindingListMax = 16384
+ // DomainSchedulerParametersMax is libvirt's REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX
+ DomainSchedulerParametersMax = 16
+ // DomainBlkioParametersMax is libvirt's REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX
+ DomainBlkioParametersMax = 16
+ // DomainMemoryParametersMax is libvirt's REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX
+ DomainMemoryParametersMax = 16
+ // DomainBlockIOTuneParametersMax is libvirt's REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX
+ DomainBlockIOTuneParametersMax = 32
+ // DomainNumaParametersMax is libvirt's REMOTE_DOMAIN_NUMA_PARAMETERS_MAX
+ DomainNumaParametersMax = 16
+ // DomainPerfEventsMax is libvirt's REMOTE_DOMAIN_PERF_EVENTS_MAX
+ DomainPerfEventsMax = 64
+ // DomainBlockCopyParametersMax is libvirt's REMOTE_DOMAIN_BLOCK_COPY_PARAMETERS_MAX
+ DomainBlockCopyParametersMax = 16
+ // NodeCPUStatsMax is libvirt's REMOTE_NODE_CPU_STATS_MAX
+ NodeCPUStatsMax = 16
+ // NodeMemoryStatsMax is libvirt's REMOTE_NODE_MEMORY_STATS_MAX
+ NodeMemoryStatsMax = 16
+ // DomainBlockStatsParametersMax is libvirt's REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX
+ DomainBlockStatsParametersMax = 16
+ // NodeMaxCells is libvirt's REMOTE_NODE_MAX_CELLS
+ NodeMaxCells = 1024
+ // AuthSaslDataMax is libvirt's REMOTE_AUTH_SASL_DATA_MAX
+ AuthSaslDataMax = 65536
+ // AuthTypeListMax is libvirt's REMOTE_AUTH_TYPE_LIST_MAX
+ AuthTypeListMax = 20
+ // DomainMemoryStatsMax is libvirt's REMOTE_DOMAIN_MEMORY_STATS_MAX
+ DomainMemoryStatsMax = 1024
+ // DomainCheckpointListMax is libvirt's REMOTE_DOMAIN_CHECKPOINT_LIST_MAX
+ DomainCheckpointListMax = 16384
+ // DomainSnapshotListMax is libvirt's REMOTE_DOMAIN_SNAPSHOT_LIST_MAX
+ DomainSnapshotListMax = 16384
+ // DomainBlockPeekBufferMax is libvirt's REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX
+ DomainBlockPeekBufferMax = 4194304
+ // DomainMemoryPeekBufferMax is libvirt's REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX
+ DomainMemoryPeekBufferMax = 4194304
+ // SecurityLabelListMax is libvirt's REMOTE_SECURITY_LABEL_LIST_MAX
+ SecurityLabelListMax = 64
+ // SecretValueMax is libvirt's REMOTE_SECRET_VALUE_MAX
+ SecretValueMax = 65536
+ // SecretListMax is libvirt's REMOTE_SECRET_LIST_MAX
+ SecretListMax = 16384
+ // CPUBaselineMax is libvirt's REMOTE_CPU_BASELINE_MAX
+ CPUBaselineMax = 256
+ // DomainSendKeyMax is libvirt's REMOTE_DOMAIN_SEND_KEY_MAX
+ DomainSendKeyMax = 16
+ // DomainInterfaceParametersMax is libvirt's REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX
+ DomainInterfaceParametersMax = 16
+ // DomainGetCPUStatsNcpusMax is libvirt's REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX
+ DomainGetCPUStatsNcpusMax = 128
+ // DomainGetCPUStatsMax is libvirt's REMOTE_DOMAIN_GET_CPU_STATS_MAX
+ DomainGetCPUStatsMax = 2048
+ // DomainDiskErrorsMax is libvirt's REMOTE_DOMAIN_DISK_ERRORS_MAX
+ DomainDiskErrorsMax = 256
+ // NodeMemoryParametersMax is libvirt's REMOTE_NODE_MEMORY_PARAMETERS_MAX
+ NodeMemoryParametersMax = 64
+ // DomainMigrateParamListMax is libvirt's REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX
+ DomainMigrateParamListMax = 64
+ // DomainJobStatsMax is libvirt's REMOTE_DOMAIN_JOB_STATS_MAX
+ DomainJobStatsMax = 64
+ // ConnectCPUModelsMax is libvirt's REMOTE_CONNECT_CPU_MODELS_MAX
+ ConnectCPUModelsMax = 8192
+ // DomainFsfreezeMountpointsMax is libvirt's REMOTE_DOMAIN_FSFREEZE_MOUNTPOINTS_MAX
+ DomainFsfreezeMountpointsMax = 256
+ // NetworkDhcpLeasesMax is libvirt's REMOTE_NETWORK_DHCP_LEASES_MAX
+ NetworkDhcpLeasesMax = 65536
+ // ConnectGetAllDomainStatsMax is libvirt's REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX
+ ConnectGetAllDomainStatsMax = 262144
+ // DomainEventTunableMax is libvirt's REMOTE_DOMAIN_EVENT_TUNABLE_MAX
+ DomainEventTunableMax = 2048
+ // DomainFsinfoMax is libvirt's REMOTE_DOMAIN_FSINFO_MAX
+ DomainFsinfoMax = 256
+ // DomainFsinfoDisksMax is libvirt's REMOTE_DOMAIN_FSINFO_DISKS_MAX
+ DomainFsinfoDisksMax = 256
+ // DomainInterfaceMax is libvirt's REMOTE_DOMAIN_INTERFACE_MAX
+ DomainInterfaceMax = 2048
+ // DomainIPAddrMax is libvirt's REMOTE_DOMAIN_IP_ADDR_MAX
+ DomainIPAddrMax = 2048
+ // DomainGuestVcpuParamsMax is libvirt's REMOTE_DOMAIN_GUEST_VCPU_PARAMS_MAX
+ DomainGuestVcpuParamsMax = 64
+ // DomainIothreadParamsMax is libvirt's REMOTE_DOMAIN_IOTHREAD_PARAMS_MAX
+ DomainIothreadParamsMax = 64
+ // NodeSevInfoMax is libvirt's REMOTE_NODE_SEV_INFO_MAX
+ NodeSevInfoMax = 64
+ // DomainLaunchSecurityInfoParamsMax is libvirt's REMOTE_DOMAIN_LAUNCH_SECURITY_INFO_PARAMS_MAX
+ DomainLaunchSecurityInfoParamsMax = 64
+ // DomainGuestInfoParamsMax is libvirt's REMOTE_DOMAIN_GUEST_INFO_PARAMS_MAX
+ DomainGuestInfoParamsMax = 2048
+ // NetworkPortParametersMax is libvirt's REMOTE_NETWORK_PORT_PARAMETERS_MAX
+ NetworkPortParametersMax = 16
+ // DomainAuthorizedSshKeysMax is libvirt's REMOTE_DOMAIN_AUTHORIZED_SSH_KEYS_MAX
+ DomainAuthorizedSshKeysMax = 2048
+ // DomainEventGraphicsIdentityMax is libvirt's REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX
+ DomainEventGraphicsIdentityMax = 20
+ // Program is libvirt's REMOTE_PROGRAM
+ Program = 0x20008086
+ // ProtocolVersion is libvirt's REMOTE_PROTOCOL_VERSION
+ ProtocolVersion = 1
+)
diff --git a/vendor/github.com/digitalocean/go-libvirt/internal/event/event.go b/vendor/github.com/digitalocean/go-libvirt/internal/event/event.go
new file mode 100644
index 000000000..67a1885b9
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/internal/event/event.go
@@ -0,0 +1,20 @@
+// Copyright 2020 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package event
+
+// Event represents an internal Event.
+type Event interface {
+ GetCallbackID() int32
+}
diff --git a/vendor/github.com/digitalocean/go-libvirt/internal/event/stream.go b/vendor/github.com/digitalocean/go-libvirt/internal/event/stream.go
new file mode 100644
index 000000000..b14e41b64
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/internal/event/stream.go
@@ -0,0 +1,145 @@
+// Copyright 2020 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package event
+
+import "context"
+
+// Stream is an unbounded buffered event channel. The implementation
+// consists of a pair of unbuffered channels and a goroutine to manage them.
+// Client behavior will not cause incoming events to block.
+type Stream struct {
+ // Program specifies the source of the events - libvirt or QEMU.
+ Program uint32
+
+ // CallbackID is returned by the event registration call.
+ CallbackID int32
+
+ // manage unbounded channel behavior.
+ queue []Event
+ in, out chan Event
+
+ // terminates processing
+ shutdown context.CancelFunc
+}
+
+// Recv returns the next available event from the Stream's queue.
+func (s *Stream) Recv() chan Event {
+ return s.out
+}
+
+// Push appends a new event to the queue.
+func (s *Stream) Push(e Event) {
+ s.in <- e
+}
+
+// Shutdown gracefully terminates Stream processing, releasing all
+// internal resources. Events which have not yet been received by the client
+// will be dropped. Subsequent calls to Shutdown() are idempotent.
+func (s *Stream) Shutdown() {
+ if s.shutdown != nil {
+ s.shutdown()
+ }
+}
+
+// start starts the event processing loop, which will continue to run until
+// terminated by the returned context.CancelFunc. Starting a previously started
+// Stream is an idempotent operation.
+func (s *Stream) start() context.CancelFunc {
+ ctx, cancel := context.WithCancel(context.Background())
+
+ go s.process(ctx)
+
+ return cancel
+}
+
+// process manages an Stream's lifecycle until canceled by the provided
+// context. Incoming events are appended to a queue which is then relayed to
+// the a listening client. New events pushed onto the queue will not block due
+// to client behavior.
+func (s *Stream) process(ctx context.Context) {
+ defer func() {
+ close(s.in)
+ close(s.out)
+ }()
+
+ for {
+ // informs send() to stop trying
+ nctx, next := context.WithCancel(ctx)
+ defer next()
+
+ select {
+ // new event received, append to queue
+ case e := <-s.in:
+ s.queue = append(s.queue, e)
+
+ // client recieved an event, pop from queue
+ case <-s.send(nctx):
+ if len(s.queue) > 1 {
+ s.queue = s.queue[1:]
+ } else {
+ s.queue = []Event{}
+ }
+
+ // shutdown requested
+ case <-ctx.Done():
+ return
+
+ }
+
+ next()
+ }
+}
+
+// send returns a channel which blocks until either the first item on the queue
+// (if existing) is sent to the client, or the provided context is canceled.
+// The stream's queue is never modified.
+func (s *Stream) send(ctx context.Context) <-chan struct{} {
+ ch := make(chan struct{})
+
+ go func() {
+ defer close(ch)
+
+ // do nothing and block if the queue is empty
+ if len(s.queue) == 0 {
+ <-ctx.Done()
+ return
+ }
+
+ // otherwise, attempt to send the event
+ select {
+ case s.out <- s.queue[0]:
+ case <-ctx.Done():
+ }
+ }()
+
+ return ch
+}
+
+// NewStream configures a new Event Stream. Incoming events are appended to a
+// queue, which is then relayed to the listening client. Client behavior will
+// not cause incoming events to block. It is the responsibility of the caller
+// to terminate the Stream via Shutdown() when no longer in use.
+func NewStream(program uint32, cbID int32) *Stream {
+ ic := &Stream{
+ Program: program,
+ CallbackID: cbID,
+ in: make(chan Event),
+ out: make(chan Event),
+ }
+
+ ic.shutdown = ic.start()
+
+ return ic
+}
diff --git a/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/LICENSE b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/LICENSE
new file mode 100644
index 000000000..0cc3543ce
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2012-2014 Dave Collins <dave@davec.name>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file
diff --git a/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/decode.go b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/decode.go
new file mode 100644
index 000000000..7f33f7d32
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/decode.go
@@ -0,0 +1,896 @@
+/*
+ * Copyright (c) 2012-2014 Dave Collins <dave@davec.name>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+package xdr
+
+import (
+ "fmt"
+ "io"
+ "math"
+ "reflect"
+ "time"
+)
+
+var (
+ errMaxSlice = "data exceeds max slice limit"
+ errIODecode = "%s while decoding %d bytes"
+)
+
+/*
+Unmarshal parses XDR-encoded data into the value pointed to by v reading from
+reader r and returning the total number of bytes read. An addressable pointer
+must be provided since Unmarshal needs to both store the result of the decode as
+well as obtain target type information. Unmarhsal traverses v recursively and
+automatically indirects pointers through arbitrary depth, allocating them as
+necessary, to decode the data into the underlying value pointed to.
+
+Unmarshal uses reflection to determine the type of the concrete value contained
+by v and performs a mapping of underlying XDR types to Go types as follows:
+
+ Go Type <- XDR Type
+ --------------------
+ int8, int16, int32, int <- XDR Integer
+ uint8, uint16, uint32, uint <- XDR Unsigned Integer
+ int64 <- XDR Hyper Integer
+ uint64 <- XDR Unsigned Hyper Integer
+ bool <- XDR Boolean
+ float32 <- XDR Floating-Point
+ float64 <- XDR Double-Precision Floating-Point
+ string <- XDR String
+ byte <- XDR Integer
+ []byte <- XDR Variable-Length Opaque Data
+ [#]byte <- XDR Fixed-Length Opaque Data
+ []<type> <- XDR Variable-Length Array
+ [#]<type> <- XDR Fixed-Length Array
+ struct <- XDR Structure
+ map <- XDR Variable-Length Array of two-element XDR Structures
+ time.Time <- XDR String encoded with RFC3339 nanosecond precision
+
+Notes and Limitations:
+
+ * Automatic unmarshalling of variable and fixed-length arrays of uint8s
+ requires a special struct tag `xdropaque:"false"` since byte slices
+ and byte arrays are assumed to be opaque data and byte is a Go alias
+ for uint8 thus indistinguishable under reflection
+ * Cyclic data structures are not supported and will result in infinite
+ loops
+
+If any issues are encountered during the unmarshalling process, an
+UnmarshalError is returned with a human readable description as well as
+an ErrorCode value for further inspection from sophisticated callers. Some
+potential issues are unsupported Go types, attempting to decode a value which is
+too large to fit into a specified Go type, and exceeding max slice limitations.
+*/
+func Unmarshal(r io.Reader, v interface{}) (int, error) {
+ d := Decoder{r: r}
+ return d.Decode(v)
+}
+
+// UnmarshalLimited is identical to Unmarshal but it sets maxReadSize in order
+// to cap reads.
+func UnmarshalLimited(r io.Reader, v interface{}, maxSize uint) (int, error) {
+ d := Decoder{r: r, maxReadSize: maxSize}
+ return d.Decode(v)
+}
+
+// TypeDecoder lets a caller provide a custom decode routine for a custom type.
+type TypeDecoder interface {
+ Decode(*Decoder, reflect.Value) (int, error)
+}
+
+// A Decoder wraps an io.Reader that is expected to provide an XDR-encoded byte
+// stream and provides several exposed methods to manually decode various XDR
+// primitives without relying on reflection. The NewDecoder function can be
+// used to get a new Decoder directly.
+//
+// Typically, Unmarshal should be used instead of manual decoding. A Decoder
+// is exposed so it is possible to perform manual decoding should it be
+// necessary in complex scenarios where automatic reflection-based decoding
+// won't work.
+type Decoder struct {
+ r io.Reader
+
+ // maxReadSize is the default maximum bytes an element can contain. 0
+ // is unlimited and provides backwards compatability. Setting it to a
+ // non-zero value caps reads.
+ maxReadSize uint
+
+ // customTypes is a map allowing the caller to provide decoder routines for
+ // custom types known only to itself.
+ customTypes map[string]TypeDecoder
+}
+
+// DecodeInt treats the next 4 bytes as an XDR encoded integer and returns the
+// result as an int32 along with the number of bytes actually read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining.
+//
+// Reference:
+// RFC Section 4.1 - Integer
+// 32-bit big-endian signed integer in range [-2147483648, 2147483647]
+func (d *Decoder) DecodeInt() (int32, int, error) {
+ var buf [4]byte
+ n, err := io.ReadFull(d.r, buf[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIODecode, err.Error(), 4)
+ err := unmarshalError("DecodeInt", ErrIO, msg, buf[:n], err)
+ return 0, n, err
+ }
+
+ rv := int32(buf[3]) | int32(buf[2])<<8 |
+ int32(buf[1])<<16 | int32(buf[0])<<24
+ return rv, n, nil
+}
+
+// DecodeUint treats the next 4 bytes as an XDR encoded unsigned integer and
+// returns the result as a uint32 along with the number of bytes actually read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining.
+//
+// Reference:
+// RFC Section 4.2 - Unsigned Integer
+// 32-bit big-endian unsigned integer in range [0, 4294967295]
+func (d *Decoder) DecodeUint() (uint32, int, error) {
+ var buf [4]byte
+ n, err := io.ReadFull(d.r, buf[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIODecode, err.Error(), 4)
+ err := unmarshalError("DecodeUint", ErrIO, msg, buf[:n], err)
+ return 0, n, err
+ }
+
+ rv := uint32(buf[3]) | uint32(buf[2])<<8 |
+ uint32(buf[1])<<16 | uint32(buf[0])<<24
+ return rv, n, nil
+}
+
+// DecodeEnum treats the next 4 bytes as an XDR encoded enumeration value and
+// returns the result as an int32 after verifying that the value is in the
+// provided map of valid values. It also returns the number of bytes actually
+// read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining or
+// the parsed enumeration value is not one of the provided valid values.
+//
+// Reference:
+// RFC Section 4.3 - Enumeration
+// Represented as an XDR encoded signed integer
+func (d *Decoder) DecodeEnum(validEnums map[int32]bool) (int32, int, error) {
+ val, n, err := d.DecodeInt()
+ if err != nil {
+ return 0, n, err
+ }
+
+ if !validEnums[val] {
+ err := unmarshalError("DecodeEnum", ErrBadEnumValue,
+ "invalid enum", val, nil)
+ return 0, n, err
+ }
+ return val, n, nil
+}
+
+// DecodeBool treats the next 4 bytes as an XDR encoded boolean value and
+// returns the result as a bool along with the number of bytes actually read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining or
+// the parsed value is not a 0 or 1.
+//
+// Reference:
+// RFC Section 4.4 - Boolean
+// Represented as an XDR encoded enumeration where 0 is false and 1 is true
+func (d *Decoder) DecodeBool() (bool, int, error) {
+ val, n, err := d.DecodeInt()
+ if err != nil {
+ return false, n, err
+ }
+ switch val {
+ case 0:
+ return false, n, nil
+ case 1:
+ return true, n, nil
+ }
+
+ err = unmarshalError("DecodeBool", ErrBadEnumValue, "bool not 0 or 1",
+ val, nil)
+ return false, n, err
+}
+
+// DecodeHyper treats the next 8 bytes as an XDR encoded hyper value and
+// returns the result as an int64 along with the number of bytes actually read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining.
+//
+// Reference:
+// RFC Section 4.5 - Hyper Integer
+// 64-bit big-endian signed integer in range [-9223372036854775808, 9223372036854775807]
+func (d *Decoder) DecodeHyper() (int64, int, error) {
+ var buf [8]byte
+ n, err := io.ReadFull(d.r, buf[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIODecode, err.Error(), 8)
+ err := unmarshalError("DecodeHyper", ErrIO, msg, buf[:n], err)
+ return 0, n, err
+ }
+
+ rv := int64(buf[7]) | int64(buf[6])<<8 |
+ int64(buf[5])<<16 | int64(buf[4])<<24 |
+ int64(buf[3])<<32 | int64(buf[2])<<40 |
+ int64(buf[1])<<48 | int64(buf[0])<<56
+ return rv, n, err
+}
+
+// DecodeUhyper treats the next 8 bytes as an XDR encoded unsigned hyper value
+// and returns the result as a uint64 along with the number of bytes actually
+// read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining.
+//
+// Reference:
+// RFC Section 4.5 - Unsigned Hyper Integer
+// 64-bit big-endian unsigned integer in range [0, 18446744073709551615]
+func (d *Decoder) DecodeUhyper() (uint64, int, error) {
+ var buf [8]byte
+ n, err := io.ReadFull(d.r, buf[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIODecode, err.Error(), 8)
+ err := unmarshalError("DecodeUhyper", ErrIO, msg, buf[:n], err)
+ return 0, n, err
+ }
+
+ rv := uint64(buf[7]) | uint64(buf[6])<<8 |
+ uint64(buf[5])<<16 | uint64(buf[4])<<24 |
+ uint64(buf[3])<<32 | uint64(buf[2])<<40 |
+ uint64(buf[1])<<48 | uint64(buf[0])<<56
+ return rv, n, nil
+}
+
+// DecodeFloat treats the next 4 bytes as an XDR encoded floating point and
+// returns the result as a float32 along with the number of bytes actually read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining.
+//
+// Reference:
+// RFC Section 4.6 - Floating Point
+// 32-bit single-precision IEEE 754 floating point
+func (d *Decoder) DecodeFloat() (float32, int, error) {
+ var buf [4]byte
+ n, err := io.ReadFull(d.r, buf[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIODecode, err.Error(), 4)
+ err := unmarshalError("DecodeFloat", ErrIO, msg, buf[:n], err)
+ return 0, n, err
+ }
+
+ val := uint32(buf[3]) | uint32(buf[2])<<8 |
+ uint32(buf[1])<<16 | uint32(buf[0])<<24
+ return math.Float32frombits(val), n, nil
+}
+
+// DecodeDouble treats the next 8 bytes as an XDR encoded double-precision
+// floating point and returns the result as a float64 along with the number of
+// bytes actually read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining.
+//
+// Reference:
+// RFC Section 4.7 - Double-Precision Floating Point
+// 64-bit double-precision IEEE 754 floating point
+func (d *Decoder) DecodeDouble() (float64, int, error) {
+ var buf [8]byte
+ n, err := io.ReadFull(d.r, buf[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIODecode, err.Error(), 8)
+ err := unmarshalError("DecodeDouble", ErrIO, msg, buf[:n], err)
+ return 0, n, err
+ }
+
+ val := uint64(buf[7]) | uint64(buf[6])<<8 |
+ uint64(buf[5])<<16 | uint64(buf[4])<<24 |
+ uint64(buf[3])<<32 | uint64(buf[2])<<40 |
+ uint64(buf[1])<<48 | uint64(buf[0])<<56
+ return math.Float64frombits(val), n, nil
+}
+
+// RFC Section 4.8 - Quadruple-Precision Floating Point
+// 128-bit quadruple-precision floating point
+// Not Implemented
+
+// DecodeFixedOpaque treats the next 'size' bytes as XDR encoded opaque data and
+// returns the result as a byte slice along with the number of bytes actually
+// read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining to
+// satisfy the passed size, including the necessary padding to make it a
+// multiple of 4.
+//
+// Reference:
+// RFC Section 4.9 - Fixed-Length Opaque Data
+// Fixed-length uninterpreted data zero-padded to a multiple of four
+func (d *Decoder) DecodeFixedOpaque(size int32) ([]byte, int, error) {
+ // Nothing to do if size is 0.
+ if size == 0 {
+ return nil, 0, nil
+ }
+
+ pad := (4 - (size % 4)) % 4
+ paddedSize := size + pad
+ if uint(paddedSize) > uint(math.MaxInt32) {
+ err := unmarshalError("DecodeFixedOpaque", ErrOverflow,
+ errMaxSlice, paddedSize, nil)
+ return nil, 0, err
+ }
+
+ buf := make([]byte, paddedSize)
+ n, err := io.ReadFull(d.r, buf)
+ if err != nil {
+ msg := fmt.Sprintf(errIODecode, err.Error(), paddedSize)
+ err := unmarshalError("DecodeFixedOpaque", ErrIO, msg, buf[:n],
+ err)
+ return nil, n, err
+ }
+ return buf[0:size], n, nil
+}
+
+// DecodeOpaque treats the next bytes as variable length XDR encoded opaque
+// data and returns the result as a byte slice along with the number of bytes
+// actually read.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining or
+// the opaque data is larger than the max length of a Go slice.
+//
+// Reference:
+// RFC Section 4.10 - Variable-Length Opaque Data
+// Unsigned integer length followed by fixed opaque data of that length
+func (d *Decoder) DecodeOpaque() ([]byte, int, error) {
+ dataLen, n, err := d.DecodeUint()
+ if err != nil {
+ return nil, n, err
+ }
+ if uint(dataLen) > uint(math.MaxInt32) ||
+ (d.maxReadSize != 0 && uint(dataLen) > d.maxReadSize) {
+ err := unmarshalError("DecodeOpaque", ErrOverflow, errMaxSlice,
+ dataLen, nil)
+ return nil, n, err
+ }
+
+ rv, n2, err := d.DecodeFixedOpaque(int32(dataLen))
+ n += n2
+ if err != nil {
+ return nil, n, err
+ }
+ return rv, n, nil
+}
+
+// DecodeString treats the next bytes as a variable length XDR encoded string
+// and returns the result as a string along with the number of bytes actually
+// read. Character encoding is assumed to be UTF-8 and therefore ASCII
+// compatible. If the underlying character encoding is not compatibile with
+// this assumption, the data can instead be read as variable-length opaque data
+// (DecodeOpaque) and manually converted as needed.
+//
+// An UnmarshalError is returned if there are insufficient bytes remaining or
+// the string data is larger than the max length of a Go slice.
+//
+// Reference:
+// RFC Section 4.11 - String
+// Unsigned integer length followed by bytes zero-padded to a multiple of
+// four
+func (d *Decoder) DecodeString() (string, int, error) {
+ dataLen, n, err := d.DecodeUint()
+ if err != nil {
+ return "", n, err
+ }
+ if uint(dataLen) > uint(math.MaxInt32) ||
+ (d.maxReadSize != 0 && uint(dataLen) > d.maxReadSize) {
+ err = unmarshalError("DecodeString", ErrOverflow, errMaxSlice,
+ dataLen, nil)
+ return "", n, err
+ }
+
+ opaque, n2, err := d.DecodeFixedOpaque(int32(dataLen))
+ n += n2
+ if err != nil {
+ return "", n, err
+ }
+ return string(opaque), n, nil
+}
+
+// decodeFixedArray treats the next bytes as a series of XDR encoded elements
+// of the same type as the array represented by the reflection value and decodes
+// each element into the passed array. The ignoreOpaque flag controls whether
+// or not uint8 (byte) elements should be decoded individually or as a fixed
+// sequence of opaque data. It returns the the number of bytes actually read.
+//
+// An UnmarshalError is returned if any issues are encountered while decoding
+// the array elements.
+//
+// Reference:
+// RFC Section 4.12 - Fixed-Length Array
+// Individually XDR encoded array elements
+func (d *Decoder) decodeFixedArray(v reflect.Value, ignoreOpaque bool) (int, error) {
+ // Treat [#]byte (byte is alias for uint8) as opaque data unless
+ // ignored.
+ if !ignoreOpaque && v.Type().Elem().Kind() == reflect.Uint8 {
+ data, n, err := d.DecodeFixedOpaque(int32(v.Len()))
+ if err != nil {
+ return n, err
+ }
+ reflect.Copy(v, reflect.ValueOf(data))
+ return n, nil
+ }
+
+ // Decode each array element.
+ var n int
+ for i := 0; i < v.Len(); i++ {
+ n2, err := d.decode(v.Index(i))
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ }
+ return n, nil
+}
+
+// decodeArray treats the next bytes as a variable length series of XDR encoded
+// elements of the same type as the array represented by the reflection value.
+// The number of elements is obtained by first decoding the unsigned integer
+// element count. Then each element is decoded into the passed array. The
+// ignoreOpaque flag controls whether or not uint8 (byte) elements should be
+// decoded individually or as a variable sequence of opaque data. It returns
+// the number of bytes actually read.
+//
+// An UnmarshalError is returned if any issues are encountered while decoding
+// the array elements.
+//
+// Reference:
+// RFC Section 4.13 - Variable-Length Array
+// Unsigned integer length followed by individually XDR encoded array
+// elements
+func (d *Decoder) decodeArray(v reflect.Value, ignoreOpaque bool) (int, error) {
+ dataLen, n, err := d.DecodeUint()
+ if err != nil {
+ return n, err
+ }
+ if uint(dataLen) > uint(math.MaxInt32) ||
+ (d.maxReadSize != 0 && uint(dataLen) > d.maxReadSize) {
+ err := unmarshalError("decodeArray", ErrOverflow, errMaxSlice,
+ dataLen, nil)
+ return n, err
+ }
+
+ // Allocate storage for the slice elements (the underlying array) if
+ // existing slice does not have enough capacity.
+ sliceLen := int(dataLen)
+ if v.Cap() < sliceLen {
+ v.Set(reflect.MakeSlice(v.Type(), sliceLen, sliceLen))
+ }
+ if v.Len() < sliceLen {
+ v.SetLen(sliceLen)
+ }
+
+ // Treat []byte (byte is alias for uint8) as opaque data unless ignored.
+ if !ignoreOpaque && v.Type().Elem().Kind() == reflect.Uint8 {
+ data, n2, err := d.DecodeFixedOpaque(int32(sliceLen))
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ v.SetBytes(data)
+ return n, nil
+ }
+
+ // Decode each slice element.
+ for i := 0; i < sliceLen; i++ {
+ n2, err := d.decode(v.Index(i))
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ }
+ return n, nil
+}
+
+// decodeStruct treats the next bytes as a series of XDR encoded elements
+// of the same type as the exported fields of the struct represented by the
+// passed reflection value. Pointers are automatically indirected and
+// allocated as necessary. It returns the the number of bytes actually read.
+//
+// An UnmarshalError is returned if any issues are encountered while decoding
+// the elements.
+//
+// Reference:
+// RFC Section 4.14 - Structure
+// XDR encoded elements in the order of their declaration in the struct
+func (d *Decoder) decodeStruct(v reflect.Value) (int, error) {
+ var n int
+ vt := v.Type()
+ for i := 0; i < v.NumField(); i++ {
+ // Skip unexported fields.
+ vtf := vt.Field(i)
+ if vtf.PkgPath != "" {
+ continue
+ }
+
+ // Indirect through pointers allocating them as needed and
+ // ensure the field is settable.
+ vf := v.Field(i)
+ vf, err := d.indirect(vf)
+ if err != nil {
+ return n, err
+ }
+ if !vf.CanSet() {
+ msg := fmt.Sprintf("can't decode to unsettable '%v'",
+ vf.Type().String())
+ err := unmarshalError("decodeStruct", ErrNotSettable,
+ msg, nil, nil)
+ return n, err
+ }
+
+ // Handle non-opaque data to []uint8 and [#]uint8 based on
+ // struct tag.
+ tag := vtf.Tag.Get("xdropaque")
+ if tag == "false" {
+ switch vf.Kind() {
+ case reflect.Slice:
+ n2, err := d.decodeArray(vf, true)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ continue
+
+ case reflect.Array:
+ n2, err := d.decodeFixedArray(vf, true)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ continue
+ }
+ }
+
+ // Decode each struct field.
+ n2, err := d.decode(vf)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ }
+
+ return n, nil
+}
+
+// RFC Section 4.15 - Discriminated Union
+// RFC Section 4.16 - Void
+// RFC Section 4.17 - Constant
+// RFC Section 4.18 - Typedef
+// RFC Section 4.19 - Optional data
+// RFC Sections 4.15 though 4.19 only apply to the data specification language
+// which is not implemented by this package. In the case of discriminated
+// unions, struct tags are used to perform a similar function.
+
+// decodeMap treats the next bytes as an XDR encoded variable array of 2-element
+// structures whose fields are of the same type as the map keys and elements
+// represented by the passed reflection value. Pointers are automatically
+// indirected and allocated as necessary. It returns the the number of bytes
+// actually read.
+//
+// An UnmarshalError is returned if any issues are encountered while decoding
+// the elements.
+func (d *Decoder) decodeMap(v reflect.Value) (int, error) {
+ dataLen, n, err := d.DecodeUint()
+ if err != nil {
+ return n, err
+ }
+
+ // Allocate storage for the underlying map if needed.
+ vt := v.Type()
+ if v.IsNil() {
+ v.Set(reflect.MakeMap(vt))
+ }
+
+ // Decode each key and value according to their type.
+ keyType := vt.Key()
+ elemType := vt.Elem()
+ for i := uint32(0); i < dataLen; i++ {
+ key := reflect.New(keyType).Elem()
+ n2, err := d.decode(key)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+
+ val := reflect.New(elemType).Elem()
+ n2, err = d.decode(val)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ v.SetMapIndex(key, val)
+ }
+ return n, nil
+}
+
+// decodeInterface examines the interface represented by the passed reflection
+// value to detect whether it is an interface that can be decoded into and
+// if it is, extracts the underlying value to pass back into the decode function
+// for decoding according to its type. It returns the the number of bytes
+// actually read.
+//
+// An UnmarshalError is returned if any issues are encountered while decoding
+// the interface.
+func (d *Decoder) decodeInterface(v reflect.Value) (int, error) {
+ if v.IsNil() || !v.CanInterface() {
+ msg := fmt.Sprintf("can't decode to nil interface")
+ err := unmarshalError("decodeInterface", ErrNilInterface, msg,
+ nil, nil)
+ return 0, err
+ }
+
+ // Extract underlying value from the interface and indirect through
+ // pointers allocating them as needed.
+ ve := reflect.ValueOf(v.Interface())
+ ve, err := d.indirect(ve)
+ if err != nil {
+ return 0, err
+ }
+ if !ve.CanSet() {
+ msg := fmt.Sprintf("can't decode to unsettable '%v'",
+ ve.Type().String())
+ err := unmarshalError("decodeInterface", ErrNotSettable, msg,
+ nil, nil)
+ return 0, err
+ }
+ return d.decode(ve)
+}
+
+// decode is the main workhorse for unmarshalling via reflection. It uses
+// the passed reflection value to choose the XDR primitives to decode from
+// the encapsulated reader. It is a recursive function,
+// so cyclic data structures are not supported and will result in an infinite
+// loop. It returns the the number of bytes actually read.
+func (d *Decoder) decode(v reflect.Value) (int, error) {
+ if !v.IsValid() {
+ msg := fmt.Sprintf("type '%s' is not valid", v.Kind().String())
+ err := unmarshalError("decode", ErrUnsupportedType, msg, nil, nil)
+ return 0, err
+ }
+
+ // Indirect through pointers allocating them as needed.
+ ve, err := d.indirect(v)
+ if err != nil {
+ return 0, err
+ }
+
+ // Handle time.Time values by decoding them as an RFC3339 formatted
+ // string with nanosecond precision. Check the type string rather
+ // than doing a full blown conversion to interface and type assertion
+ // since checking a string is much quicker.
+ switch ve.Type().String() {
+ case "time.Time":
+ // Read the value as a string and parse it.
+ timeString, n, err := d.DecodeString()
+ if err != nil {
+ return n, err
+ }
+ ttv, err := time.Parse(time.RFC3339, timeString)
+ if err != nil {
+ err := unmarshalError("decode", ErrParseTime,
+ err.Error(), timeString, err)
+ return n, err
+ }
+ ve.Set(reflect.ValueOf(ttv))
+ return n, nil
+ }
+ // If this type is in our custom types map, call the decode routine set up
+ // for it.
+ if dt, ok := d.customTypes[ve.Type().String()]; ok {
+ return dt.Decode(d, v)
+ }
+
+ // Handle native Go types.
+ switch ve.Kind() {
+ case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int:
+ i, n, err := d.DecodeInt()
+ if err != nil {
+ return n, err
+ }
+ if ve.OverflowInt(int64(i)) {
+ msg := fmt.Sprintf("signed integer too large to fit '%s'",
+ ve.Kind().String())
+ err = unmarshalError("decode", ErrOverflow, msg, i, nil)
+ return n, err
+ }
+ ve.SetInt(int64(i))
+ return n, nil
+
+ case reflect.Int64:
+ i, n, err := d.DecodeHyper()
+ if err != nil {
+ return n, err
+ }
+ ve.SetInt(i)
+ return n, nil
+
+ case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint:
+ ui, n, err := d.DecodeUint()
+ if err != nil {
+ return n, err
+ }
+ if ve.OverflowUint(uint64(ui)) {
+ msg := fmt.Sprintf("unsigned integer too large to fit '%s'",
+ ve.Kind().String())
+ err = unmarshalError("decode", ErrOverflow, msg, ui, nil)
+ return n, err
+ }
+ ve.SetUint(uint64(ui))
+ return n, nil
+
+ case reflect.Uint64:
+ ui, n, err := d.DecodeUhyper()
+ if err != nil {
+ return n, err
+ }
+ ve.SetUint(ui)
+ return n, nil
+
+ case reflect.Bool:
+ b, n, err := d.DecodeBool()
+ if err != nil {
+ return n, err
+ }
+ ve.SetBool(b)
+ return n, nil
+
+ case reflect.Float32:
+ f, n, err := d.DecodeFloat()
+ if err != nil {
+ return n, err
+ }
+ ve.SetFloat(float64(f))
+ return n, nil
+
+ case reflect.Float64:
+ f, n, err := d.DecodeDouble()
+ if err != nil {
+ return n, err
+ }
+ ve.SetFloat(f)
+ return n, nil
+
+ case reflect.String:
+ s, n, err := d.DecodeString()
+ if err != nil {
+ return n, err
+ }
+ ve.SetString(s)
+ return n, nil
+
+ case reflect.Array:
+ n, err := d.decodeFixedArray(ve, false)
+ if err != nil {
+ return n, err
+ }
+ return n, nil
+
+ case reflect.Slice:
+ n, err := d.decodeArray(ve, false)
+ if err != nil {
+ return n, err
+ }
+ return n, nil
+
+ case reflect.Struct:
+ n, err := d.decodeStruct(ve)
+ if err != nil {
+ return n, err
+ }
+ return n, nil
+
+ case reflect.Map:
+ n, err := d.decodeMap(ve)
+ if err != nil {
+ return n, err
+ }
+ return n, nil
+
+ case reflect.Interface:
+ n, err := d.decodeInterface(ve)
+ if err != nil {
+ return n, err
+ }
+ return n, nil
+ }
+
+ // The only unhandled types left are unsupported. At the time of this
+ // writing the only remaining unsupported types that exist are
+ // reflect.Uintptr and reflect.UnsafePointer.
+ msg := fmt.Sprintf("unsupported Go type '%s'", ve.Kind().String())
+ err = unmarshalError("decode", ErrUnsupportedType, msg, nil, nil)
+ return 0, err
+}
+
+// indirect dereferences pointers allocating them as needed until it reaches
+// a non-pointer. This allows transparent decoding through arbitrary levels
+// of indirection.
+func (d *Decoder) indirect(v reflect.Value) (reflect.Value, error) {
+ rv := v
+ for rv.Kind() == reflect.Ptr {
+ // Allocate pointer if needed.
+ isNil := rv.IsNil()
+ if isNil && !rv.CanSet() {
+ msg := fmt.Sprintf("unable to allocate pointer for '%v'",
+ rv.Type().String())
+ err := unmarshalError("indirect", ErrNotSettable, msg,
+ nil, nil)
+ return rv, err
+ }
+ if isNil {
+ rv.Set(reflect.New(rv.Type().Elem()))
+ }
+ rv = rv.Elem()
+ }
+ return rv, nil
+}
+
+// Decode operates identically to the Unmarshal function with the exception of
+// using the reader associated with the Decoder as the source of XDR-encoded
+// data instead of a user-supplied reader. See the Unmarhsal documentation for
+// specifics.
+func (d *Decoder) Decode(v interface{}) (int, error) {
+ if v == nil {
+ msg := "can't unmarshal to nil interface"
+ return 0, unmarshalError("Unmarshal", ErrNilInterface, msg, nil,
+ nil)
+ }
+
+ vv := reflect.ValueOf(v)
+ if vv.Kind() != reflect.Ptr {
+ msg := fmt.Sprintf("can't unmarshal to non-pointer '%v' - use "+
+ "& operator", vv.Type().String())
+ err := unmarshalError("Unmarshal", ErrBadArguments, msg, nil, nil)
+ return 0, err
+ }
+ if vv.IsNil() && !vv.CanSet() {
+ msg := fmt.Sprintf("can't unmarshal to unsettable '%v' - use "+
+ "& operator", vv.Type().String())
+ err := unmarshalError("Unmarshal", ErrNotSettable, msg, nil, nil)
+ return 0, err
+ }
+
+ return d.decode(vv)
+}
+
+// NewDecoder returns a Decoder that can be used to manually decode XDR data
+// from a provided reader. Typically, Unmarshal should be used instead of
+// manually creating a Decoder.
+func NewDecoder(r io.Reader) *Decoder {
+ return &Decoder{r: r}
+}
+
+// NewDecoderLimited is identical to NewDecoder but it sets maxReadSize in
+// order to cap reads.
+func NewDecoderLimited(r io.Reader, maxSize uint) *Decoder {
+ return &Decoder{r: r, maxReadSize: maxSize}
+}
+
+// NewDecoderCustomTypes returns a decoder with support for custom types known
+// to the caller. The second parameter is a map of the type name to the decoder
+// routine. When the decoder finds a type matching one of the entries in the map
+// it will call the custom routine for that type.
+func NewDecoderCustomTypes(r io.Reader, maxSize uint, ct map[string]TypeDecoder) *Decoder {
+ return &Decoder{r: r, maxReadSize: maxSize, customTypes: ct}
+}
diff --git a/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/doc.go b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/doc.go
new file mode 100644
index 000000000..8823d62f3
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/doc.go
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2012-2014 Dave Collins <dave@davec.name>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+Package xdr implements the data representation portion of the External Data
+Representation (XDR) standard protocol as specified in RFC 4506 (obsoletes
+RFC 1832 and RFC 1014).
+
+The XDR RFC defines both a data specification language and a data
+representation standard. This package implements methods to encode and decode
+XDR data per the data representation standard with the exception of 128-bit
+quadruple-precision floating points. It does not currently implement parsing of
+the data specification language. In other words, the ability to automatically
+generate Go code by parsing an XDR data specification file (typically .x
+extension) is not supported. In practice, this limitation of the package is
+fairly minor since it is largely unnecessary due to the reflection capabilities
+of Go as described below.
+
+This package provides two approaches for encoding and decoding XDR data:
+
+ 1) Marshal/Unmarshal functions which automatically map between XDR and Go types
+ 2) Individual Encoder/Decoder objects to manually work with XDR primitives
+
+For the Marshal/Unmarshal functions, Go reflection capabilities are used to
+choose the type of the underlying XDR data based upon the Go type to encode or
+the target Go type to decode into. A description of how each type is mapped is
+provided below, however one important type worth reviewing is Go structs. In
+the case of structs, each exported field (first letter capitalized) is reflected
+and mapped in order. As a result, this means a Go struct with exported fields
+of the appropriate types listed in the expected order can be used to
+automatically encode / decode the XDR data thereby eliminating the need to write
+a lot of boilerplate code to encode/decode and error check each piece of XDR
+data as is typically required with C based XDR libraries.
+
+Go Type to XDR Type Mappings
+
+The following chart shows an overview of how Go types are mapped to XDR types
+for automatic marshalling and unmarshalling. The documentation for the Marshal
+and Unmarshal functions has specific details of how the mapping proceeds.
+
+ Go Type <-> XDR Type
+ --------------------
+ int8, int16, int32, int <-> XDR Integer
+ uint8, uint16, uint32, uint <-> XDR Unsigned Integer
+ int64 <-> XDR Hyper Integer
+ uint64 <-> XDR Unsigned Hyper Integer
+ bool <-> XDR Boolean
+ float32 <-> XDR Floating-Point
+ float64 <-> XDR Double-Precision Floating-Point
+ string <-> XDR String
+ byte <-> XDR Integer
+ []byte <-> XDR Variable-Length Opaque Data
+ [#]byte <-> XDR Fixed-Length Opaque Data
+ []<type> <-> XDR Variable-Length Array
+ [#]<type> <-> XDR Fixed-Length Array
+ struct <-> XDR Structure
+ map <-> XDR Variable-Length Array of two-element XDR Structures
+ time.Time <-> XDR String encoded with RFC3339 nanosecond precision
+
+Notes and Limitations:
+
+ * Automatic marshalling and unmarshalling of variable and fixed-length
+ arrays of uint8s require a special struct tag `xdropaque:"false"`
+ since byte slices and byte arrays are assumed to be opaque data and
+ byte is a Go alias for uint8 thus indistinguishable under reflection
+ * Channel, complex, and function types cannot be encoded
+ * Interfaces without a concrete value cannot be encoded
+ * Cyclic data structures are not supported and will result in infinite
+ loops
+ * Strings are marshalled and unmarshalled with UTF-8 character encoding
+ which differs from the XDR specification of ASCII, however UTF-8 is
+ backwards compatible with ASCII so this should rarely cause issues
+
+
+Encoding
+
+To encode XDR data, use the Marshal function.
+ func Marshal(w io.Writer, v interface{}) (int, error)
+
+For example, given the following code snippet:
+
+ type ImageHeader struct {
+ Signature [3]byte
+ Version uint32
+ IsGrayscale bool
+ NumSections uint32
+ }
+ h := ImageHeader{[3]byte{0xAB, 0xCD, 0xEF}, 2, true, 10}
+
+ var w bytes.Buffer
+ bytesWritten, err := xdr.Marshal(&w, &h)
+ // Error check elided
+
+The result, encodedData, will then contain the following XDR encoded byte
+sequence:
+
+ 0xAB, 0xCD, 0xEF, 0x00,
+ 0x00, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x0A
+
+
+In addition, while the automatic marshalling discussed above will work for the
+vast majority of cases, an Encoder object is provided that can be used to
+manually encode XDR primitives for complex scenarios where automatic
+reflection-based encoding won't work. The included examples provide a sample of
+manual usage via an Encoder.
+
+
+Decoding
+
+To decode XDR data, use the Unmarshal function.
+ func Unmarshal(r io.Reader, v interface{}) (int, error)
+
+For example, given the following code snippet:
+
+ type ImageHeader struct {
+ Signature [3]byte
+ Version uint32
+ IsGrayscale bool
+ NumSections uint32
+ }
+
+ // Using output from the Encoding section above.
+ encodedData := []byte{
+ 0xAB, 0xCD, 0xEF, 0x00,
+ 0x00, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x0A,
+ }
+
+ var h ImageHeader
+ bytesRead, err := xdr.Unmarshal(bytes.NewReader(encodedData), &h)
+ // Error check elided
+
+The struct instance, h, will then contain the following values:
+
+ h.Signature = [3]byte{0xAB, 0xCD, 0xEF}
+ h.Version = 2
+ h.IsGrayscale = true
+ h.NumSections = 10
+
+In addition, while the automatic unmarshalling discussed above will work for the
+vast majority of cases, a Decoder object is provided that can be used to
+manually decode XDR primitives for complex scenarios where automatic
+reflection-based decoding won't work. The included examples provide a sample of
+manual usage via a Decoder.
+
+Errors
+
+All errors are either of type UnmarshalError or MarshalError. Both provide
+human-readable output as well as an ErrorCode field which can be inspected by
+sophisticated callers if necessary.
+
+See the documentation of UnmarshalError, MarshalError, and ErrorCode for further
+details.
+*/
+package xdr
diff --git a/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/encode.go b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/encode.go
new file mode 100644
index 000000000..7bac2681d
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/encode.go
@@ -0,0 +1,669 @@
+/*
+ * Copyright (c) 2012-2014 Dave Collins <dave@davec.name>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+package xdr
+
+import (
+ "fmt"
+ "io"
+ "math"
+ "reflect"
+ "time"
+)
+
+var errIOEncode = "%s while encoding %d bytes"
+
+/*
+Marshal writes the XDR encoding of v to writer w and returns the number of bytes
+written. It traverses v recursively and automatically indirects pointers
+through arbitrary depth to encode the actual value pointed to.
+
+Marshal uses reflection to determine the type of the concrete value contained by
+v and performs a mapping of Go types to the underlying XDR types as follows:
+
+ Go Type -> XDR Type
+ --------------------
+ int8, int16, int32, int -> XDR Integer
+ uint8, uint16, uint32, uint -> XDR Unsigned Integer
+ int64 -> XDR Hyper Integer
+ uint64 -> XDR Unsigned Hyper Integer
+ bool -> XDR Boolean
+ float32 -> XDR Floating-Point
+ float64 -> XDR Double-Precision Floating-Point
+ string -> XDR String
+ byte -> XDR Integer
+ []byte -> XDR Variable-Length Opaque Data
+ [#]byte -> XDR Fixed-Length Opaque Data
+ []<type> -> XDR Variable-Length Array
+ [#]<type> -> XDR Fixed-Length Array
+ struct -> XDR Structure
+ map -> XDR Variable-Length Array of two-element XDR Structures
+ time.Time -> XDR String encoded with RFC3339 nanosecond precision
+
+Notes and Limitations:
+
+ * Automatic marshalling of variable and fixed-length arrays of uint8s
+ requires a special struct tag `xdropaque:"false"` since byte slices and
+ byte arrays are assumed to be opaque data and byte is a Go alias for uint8
+ thus indistinguishable under reflection
+ * Channel, complex, and function types cannot be encoded
+ * Interfaces without a concrete value cannot be encoded
+ * Cyclic data structures are not supported and will result in infinite loops
+ * Strings are marshalled with UTF-8 character encoding which differs from
+ the XDR specification of ASCII, however UTF-8 is backwards compatible with
+ ASCII so this should rarely cause issues
+
+If any issues are encountered during the marshalling process, a MarshalError is
+returned with a human readable description as well as an ErrorCode value for
+further inspection from sophisticated callers. Some potential issues are
+unsupported Go types, attempting to encode more opaque data than can be
+represented by a single opaque XDR entry, and exceeding max slice limitations.
+*/
+func Marshal(w io.Writer, v interface{}) (int, error) {
+ enc := Encoder{w: w}
+ return enc.Encode(v)
+}
+
+// An Encoder wraps an io.Writer that will receive the XDR encoded byte stream.
+// See NewEncoder.
+type Encoder struct {
+ w io.Writer
+}
+
+// EncodeInt writes the XDR encoded representation of the passed 32-bit signed
+// integer to the encapsulated writer and returns the number of bytes written.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.1 - Integer
+// 32-bit big-endian signed integer in range [-2147483648, 2147483647]
+func (enc *Encoder) EncodeInt(v int32) (int, error) {
+ var b [4]byte
+ b[0] = byte(v >> 24)
+ b[1] = byte(v >> 16)
+ b[2] = byte(v >> 8)
+ b[3] = byte(v)
+
+ n, err := enc.w.Write(b[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIOEncode, err.Error(), 4)
+ err := marshalError("EncodeInt", ErrIO, msg, b[:n], err)
+ return n, err
+ }
+
+ return n, nil
+}
+
+// EncodeUint writes the XDR encoded representation of the passed 32-bit
+// unsigned integer to the encapsulated writer and returns the number of bytes
+// written.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.2 - Unsigned Integer
+// 32-bit big-endian unsigned integer in range [0, 4294967295]
+func (enc *Encoder) EncodeUint(v uint32) (int, error) {
+ var b [4]byte
+ b[0] = byte(v >> 24)
+ b[1] = byte(v >> 16)
+ b[2] = byte(v >> 8)
+ b[3] = byte(v)
+
+ n, err := enc.w.Write(b[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIOEncode, err.Error(), 4)
+ err := marshalError("EncodeUint", ErrIO, msg, b[:n], err)
+ return n, err
+ }
+
+ return n, nil
+}
+
+// EncodeEnum treats the passed 32-bit signed integer as an enumeration value
+// and, if it is in the list of passed valid enumeration values, writes the XDR
+// encoded representation of it to the encapsulated writer. It returns the
+// number of bytes written.
+//
+// A MarshalError is returned if the enumeration value is not one of the
+// provided valid values or if writing the data fails.
+//
+// Reference:
+// RFC Section 4.3 - Enumeration
+// Represented as an XDR encoded signed integer
+func (enc *Encoder) EncodeEnum(v int32, validEnums map[int32]bool) (int, error) {
+ if !validEnums[v] {
+ err := marshalError("EncodeEnum", ErrBadEnumValue,
+ "invalid enum", v, nil)
+ return 0, err
+ }
+ return enc.EncodeInt(v)
+}
+
+// EncodeBool writes the XDR encoded representation of the passed boolean to the
+// encapsulated writer and returns the number of bytes written.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.4 - Boolean
+// Represented as an XDR encoded enumeration where 0 is false and 1 is true
+func (enc *Encoder) EncodeBool(v bool) (int, error) {
+ i := int32(0)
+ if v == true {
+ i = 1
+ }
+ return enc.EncodeInt(i)
+}
+
+// EncodeHyper writes the XDR encoded representation of the passed 64-bit
+// signed integer to the encapsulated writer and returns the number of bytes
+// written.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.5 - Hyper Integer
+// 64-bit big-endian signed integer in range [-9223372036854775808, 9223372036854775807]
+func (enc *Encoder) EncodeHyper(v int64) (int, error) {
+ var b [8]byte
+ b[0] = byte(v >> 56)
+ b[1] = byte(v >> 48)
+ b[2] = byte(v >> 40)
+ b[3] = byte(v >> 32)
+ b[4] = byte(v >> 24)
+ b[5] = byte(v >> 16)
+ b[6] = byte(v >> 8)
+ b[7] = byte(v)
+
+ n, err := enc.w.Write(b[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIOEncode, err.Error(), 8)
+ err := marshalError("EncodeHyper", ErrIO, msg, b[:n], err)
+ return n, err
+ }
+
+ return n, nil
+}
+
+// EncodeUhyper writes the XDR encoded representation of the passed 64-bit
+// unsigned integer to the encapsulated writer and returns the number of bytes
+// written.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.5 - Unsigned Hyper Integer
+// 64-bit big-endian unsigned integer in range [0, 18446744073709551615]
+func (enc *Encoder) EncodeUhyper(v uint64) (int, error) {
+ var b [8]byte
+ b[0] = byte(v >> 56)
+ b[1] = byte(v >> 48)
+ b[2] = byte(v >> 40)
+ b[3] = byte(v >> 32)
+ b[4] = byte(v >> 24)
+ b[5] = byte(v >> 16)
+ b[6] = byte(v >> 8)
+ b[7] = byte(v)
+
+ n, err := enc.w.Write(b[:])
+ if err != nil {
+ msg := fmt.Sprintf(errIOEncode, err.Error(), 8)
+ err := marshalError("EncodeUhyper", ErrIO, msg, b[:n], err)
+ return n, err
+ }
+
+ return n, nil
+}
+
+// EncodeFloat writes the XDR encoded representation of the passed 32-bit
+// (single-precision) floating point to the encapsulated writer and returns the
+// number of bytes written.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.6 - Floating Point
+// 32-bit single-precision IEEE 754 floating point
+func (enc *Encoder) EncodeFloat(v float32) (int, error) {
+ ui := math.Float32bits(v)
+ return enc.EncodeUint(ui)
+}
+
+// EncodeDouble writes the XDR encoded representation of the passed 64-bit
+// (double-precision) floating point to the encapsulated writer and returns the
+// number of bytes written.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.7 - Double-Precision Floating Point
+// 64-bit double-precision IEEE 754 floating point
+func (enc *Encoder) EncodeDouble(v float64) (int, error) {
+ ui := math.Float64bits(v)
+ return enc.EncodeUhyper(ui)
+}
+
+// RFC Section 4.8 - Quadruple-Precision Floating Point
+// 128-bit quadruple-precision floating point
+// Not Implemented
+
+// EncodeFixedOpaque treats the passed byte slice as opaque data of a fixed
+// size and writes the XDR encoded representation of it to the encapsulated
+// writer. It returns the number of bytes written.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.9 - Fixed-Length Opaque Data
+// Fixed-length uninterpreted data zero-padded to a multiple of four
+func (enc *Encoder) EncodeFixedOpaque(v []byte) (int, error) {
+ l := len(v)
+ pad := (4 - (l % 4)) % 4
+
+ // Write the actual bytes.
+ n, err := enc.w.Write(v)
+ if err != nil {
+ msg := fmt.Sprintf(errIOEncode, err.Error(), len(v))
+ err := marshalError("EncodeFixedOpaque", ErrIO, msg, v[:n], err)
+ return n, err
+ }
+
+ // Write any padding if needed.
+ if pad > 0 {
+ b := make([]byte, pad)
+ n2, err := enc.w.Write(b)
+ n += n2
+ if err != nil {
+ written := make([]byte, l+n2)
+ copy(written, v)
+ copy(written[l:], b[:n2])
+ msg := fmt.Sprintf(errIOEncode, err.Error(), l+pad)
+ err := marshalError("EncodeFixedOpaque", ErrIO, msg,
+ written, err)
+ return n, err
+ }
+ }
+
+ return n, nil
+}
+
+// EncodeOpaque treats the passed byte slice as opaque data of a variable
+// size and writes the XDR encoded representation of it to the encapsulated
+// writer. It returns the number of bytes written.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.10 - Variable-Length Opaque Data
+// Unsigned integer length followed by fixed opaque data of that length
+func (enc *Encoder) EncodeOpaque(v []byte) (int, error) {
+ // Length of opaque data.
+ n, err := enc.EncodeUint(uint32(len(v)))
+ if err != nil {
+ return n, err
+ }
+
+ n2, err := enc.EncodeFixedOpaque(v)
+ n += n2
+ return n, err
+}
+
+// EncodeString writes the XDR encoded representation of the passed string
+// to the encapsulated writer and returns the number of bytes written.
+// Character encoding is assumed to be UTF-8 and therefore ASCII compatible. If
+// the underlying character encoding is not compatible with this assumption, the
+// data can instead be written as variable-length opaque data (EncodeOpaque) and
+// manually converted as needed.
+//
+// A MarshalError with an error code of ErrIO is returned if writing the data
+// fails.
+//
+// Reference:
+// RFC Section 4.11 - String
+// Unsigned integer length followed by bytes zero-padded to a multiple of four
+func (enc *Encoder) EncodeString(v string) (int, error) {
+ // Length of string.
+ n, err := enc.EncodeUint(uint32(len(v)))
+ if err != nil {
+ return n, err
+ }
+
+ n2, err := enc.EncodeFixedOpaque([]byte(v))
+ n += n2
+ return n, err
+}
+
+// encodeFixedArray writes the XDR encoded representation of each element
+// in the passed array represented by the reflection value to the encapsulated
+// writer and returns the number of bytes written. The ignoreOpaque flag
+// controls whether or not uint8 (byte) elements should be encoded individually
+// or as a fixed sequence of opaque data.
+//
+// A MarshalError is returned if any issues are encountered while encoding
+// the array elements.
+//
+// Reference:
+// RFC Section 4.12 - Fixed-Length Array
+// Individually XDR encoded array elements
+func (enc *Encoder) encodeFixedArray(v reflect.Value, ignoreOpaque bool) (int, error) {
+ // Treat [#]byte (byte is alias for uint8) as opaque data unless ignored.
+ if !ignoreOpaque && v.Type().Elem().Kind() == reflect.Uint8 {
+ // Create a slice of the underlying array for better efficiency
+ // when possible. Can't create a slice of an unaddressable
+ // value.
+ if v.CanAddr() {
+ return enc.EncodeFixedOpaque(v.Slice(0, v.Len()).Bytes())
+ }
+
+ // When the underlying array isn't addressable fall back to
+ // copying the array into a new slice. This is rather ugly, but
+ // the inability to create a constant slice from an
+ // unaddressable array is a limitation of Go.
+ slice := make([]byte, v.Len(), v.Len())
+ reflect.Copy(reflect.ValueOf(slice), v)
+ return enc.EncodeFixedOpaque(slice)
+ }
+
+ // Encode each array element.
+ var n int
+ for i := 0; i < v.Len(); i++ {
+ n2, err := enc.encode(v.Index(i))
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ }
+
+ return n, nil
+}
+
+// encodeArray writes an XDR encoded integer representing the number of
+// elements in the passed slice represented by the reflection value followed by
+// the XDR encoded representation of each element in slice to the encapsulated
+// writer and returns the number of bytes written. The ignoreOpaque flag
+// controls whether or not uint8 (byte) elements should be encoded individually
+// or as a variable sequence of opaque data.
+//
+// A MarshalError is returned if any issues are encountered while encoding
+// the array elements.
+//
+// Reference:
+// RFC Section 4.13 - Variable-Length Array
+// Unsigned integer length followed by individually XDR encoded array elements
+func (enc *Encoder) encodeArray(v reflect.Value, ignoreOpaque bool) (int, error) {
+ numItems := uint32(v.Len())
+ n, err := enc.EncodeUint(numItems)
+ if err != nil {
+ return n, err
+ }
+
+ n2, err := enc.encodeFixedArray(v, ignoreOpaque)
+ n += n2
+ return n, err
+}
+
+// encodeStruct writes an XDR encoded representation of each value in the
+// exported fields of the struct represented by the passed reflection value to
+// the encapsulated writer and returns the number of bytes written. Pointers
+// are automatically indirected through arbitrary depth to encode the actual
+// value pointed to.
+//
+// A MarshalError is returned if any issues are encountered while encoding
+// the elements.
+//
+// Reference:
+// RFC Section 4.14 - Structure
+// XDR encoded elements in the order of their declaration in the struct
+func (enc *Encoder) encodeStruct(v reflect.Value) (int, error) {
+ var n int
+ vt := v.Type()
+ for i := 0; i < v.NumField(); i++ {
+ // Skip unexported fields and indirect through pointers.
+ vtf := vt.Field(i)
+ if vtf.PkgPath != "" {
+ continue
+ }
+ vf := v.Field(i)
+ vf = enc.indirect(vf)
+
+ // Handle non-opaque data to []uint8 and [#]uint8 based on struct tag.
+ tag := vtf.Tag.Get("xdropaque")
+ if tag == "false" {
+ switch vf.Kind() {
+ case reflect.Slice:
+ n2, err := enc.encodeArray(vf, true)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ continue
+
+ case reflect.Array:
+ n2, err := enc.encodeFixedArray(vf, true)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ continue
+ }
+ }
+
+ // Encode each struct field.
+ n2, err := enc.encode(vf)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ }
+
+ return n, nil
+}
+
+// RFC Section 4.15 - Discriminated Union
+// RFC Section 4.16 - Void
+// RFC Section 4.17 - Constant
+// RFC Section 4.18 - Typedef
+// RFC Section 4.19 - Optional data
+// RFC Sections 4.15 though 4.19 only apply to the data specification language
+// which is not implemented by this package. In the case of discriminated
+// unions, struct tags are used to perform a similar function.
+
+// encodeMap treats the map represented by the passed reflection value as a
+// variable-length array of 2-element structures whose fields are of the same
+// type as the map keys and elements and writes its XDR encoded representation
+// to the encapsulated writer. It returns the number of bytes written.
+//
+// A MarshalError is returned if any issues are encountered while encoding
+// the elements.
+func (enc *Encoder) encodeMap(v reflect.Value) (int, error) {
+ // Number of elements.
+ n, err := enc.EncodeUint(uint32(v.Len()))
+ if err != nil {
+ return n, err
+ }
+
+ // Encode each key and value according to their type.
+ for _, key := range v.MapKeys() {
+ n2, err := enc.encode(key)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+
+ n2, err = enc.encode(v.MapIndex(key))
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ }
+
+ return n, nil
+}
+
+// encodeInterface examines the interface represented by the passed reflection
+// value to detect whether it is an interface that can be encoded if it is,
+// extracts the underlying value to pass back into the encode function for
+// encoding according to its type.
+//
+// A MarshalError is returned if any issues are encountered while encoding
+// the interface.
+func (enc *Encoder) encodeInterface(v reflect.Value) (int, error) {
+ if v.IsNil() || !v.CanInterface() {
+ msg := fmt.Sprintf("can't encode nil interface")
+ err := marshalError("encodeInterface", ErrNilInterface, msg,
+ nil, nil)
+ return 0, err
+ }
+
+ // Extract underlying value from the interface and indirect through pointers.
+ ve := reflect.ValueOf(v.Interface())
+ ve = enc.indirect(ve)
+ return enc.encode(ve)
+}
+
+// encode is the main workhorse for marshalling via reflection. It uses
+// the passed reflection value to choose the XDR primitives to encode into
+// the encapsulated writer and returns the number of bytes written. It is a
+// recursive function, so cyclic data structures are not supported and will
+// result in an infinite loop.
+func (enc *Encoder) encode(v reflect.Value) (int, error) {
+ if !v.IsValid() {
+ msg := fmt.Sprintf("type '%s' is not valid", v.Kind().String())
+ err := marshalError("encode", ErrUnsupportedType, msg, nil, nil)
+ return 0, err
+ }
+
+ // Indirect through pointers to get at the concrete value.
+ ve := enc.indirect(v)
+
+ // Handle time.Time values by encoding them as an RFC3339 formatted
+ // string with nanosecond precision. Check the type string before
+ // doing a full blown conversion to interface and type assertion since
+ // checking a string is much quicker.
+ if ve.Type().String() == "time.Time" && ve.CanInterface() {
+ viface := ve.Interface()
+ if tv, ok := viface.(time.Time); ok {
+ return enc.EncodeString(tv.Format(time.RFC3339Nano))
+ }
+ }
+
+ // Handle native Go types.
+ switch ve.Kind() {
+ case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int:
+ return enc.EncodeInt(int32(ve.Int()))
+
+ case reflect.Int64:
+ return enc.EncodeHyper(ve.Int())
+
+ case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint:
+ return enc.EncodeUint(uint32(ve.Uint()))
+
+ case reflect.Uint64:
+ return enc.EncodeUhyper(ve.Uint())
+
+ case reflect.Bool:
+ return enc.EncodeBool(ve.Bool())
+
+ case reflect.Float32:
+ return enc.EncodeFloat(float32(ve.Float()))
+
+ case reflect.Float64:
+ return enc.EncodeDouble(ve.Float())
+
+ case reflect.String:
+ return enc.EncodeString(ve.String())
+
+ case reflect.Array:
+ return enc.encodeFixedArray(ve, false)
+
+ case reflect.Slice:
+ return enc.encodeArray(ve, false)
+
+ case reflect.Struct:
+ return enc.encodeStruct(ve)
+
+ case reflect.Map:
+ return enc.encodeMap(ve)
+
+ case reflect.Interface:
+ return enc.encodeInterface(ve)
+ }
+
+ // The only unhandled types left are unsupported. At the time of this
+ // writing the only remaining unsupported types that exist are
+ // reflect.Uintptr and reflect.UnsafePointer.
+ msg := fmt.Sprintf("unsupported Go type '%s'", ve.Kind().String())
+ err := marshalError("encode", ErrUnsupportedType, msg, nil, nil)
+ return 0, err
+}
+
+// indirect dereferences pointers until it reaches a non-pointer. This allows
+// transparent encoding through arbitrary levels of indirection.
+func (enc *Encoder) indirect(v reflect.Value) reflect.Value {
+ rv := v
+ for rv.Kind() == reflect.Ptr {
+ rv = rv.Elem()
+ }
+ return rv
+}
+
+// Encode operates identically to the Marshal function with the exception of
+// using the writer associated with the Encoder for the destination of the
+// XDR-encoded data instead of a user-supplied writer. See the Marshal
+// documentation for specifics.
+func (enc *Encoder) Encode(v interface{}) (int, error) {
+ if v == nil {
+ msg := "can't marshal nil interface"
+ err := marshalError("Marshal", ErrNilInterface, msg, nil, nil)
+ return 0, err
+ }
+
+ vv := reflect.ValueOf(v)
+ vve := vv
+ for vve.Kind() == reflect.Ptr {
+ if vve.IsNil() {
+ msg := fmt.Sprintf("can't marshal nil pointer '%v'",
+ vv.Type().String())
+ err := marshalError("Marshal", ErrBadArguments, msg,
+ nil, nil)
+ return 0, err
+ }
+ vve = vve.Elem()
+ }
+
+ return enc.encode(vve)
+}
+
+// NewEncoder returns an object that can be used to manually choose fields to
+// XDR encode to the passed writer w. Typically, Marshal should be used instead
+// of manually creating an Encoder. An Encoder, along with several of its
+// methods to encode XDR primitives, is exposed so it is possible to perform
+// manual encoding of data without relying on reflection should it be necessary
+// in complex scenarios where automatic reflection-based encoding won't work.
+func NewEncoder(w io.Writer) *Encoder {
+ return &Encoder{w: w}
+}
diff --git a/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/error.go b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/error.go
new file mode 100644
index 000000000..42079ad35
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2/error.go
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2012-2014 Dave Collins <dave@davec.name>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+package xdr
+
+import "fmt"
+
+// ErrorCode identifies a kind of error.
+type ErrorCode int
+
+const (
+ // ErrBadArguments indicates arguments passed to the function are not
+ // what was expected.
+ ErrBadArguments ErrorCode = iota
+
+ // ErrUnsupportedType indicates the Go type is not a supported type for
+ // marshalling and unmarshalling XDR data.
+ ErrUnsupportedType
+
+ // ErrBadEnumValue indicates an enumeration value is not in the list of
+ // valid values.
+ ErrBadEnumValue
+
+ // ErrNotSettable indicates an interface value cannot be written to.
+ // This usually means the interface value was not passed with the &
+ // operator, but it can also happen if automatic pointer allocation
+ // fails.
+ ErrNotSettable
+
+ // ErrOverflow indicates that the data in question is too large to fit
+ // into the corresponding Go or XDR data type. For example, an integer
+ // decoded from XDR that is too large to fit into a target type of int8,
+ // or opaque data that exceeds the max length of a Go slice.
+ ErrOverflow
+
+ // ErrNilInterface indicates an interface with no concrete type
+ // information was encountered. Type information is necessary to
+ // perform mapping between XDR and Go types.
+ ErrNilInterface
+
+ // ErrIO indicates an error was encountered while reading or writing to
+ // an io.Reader or io.Writer, respectively. The actual underlying error
+ // will be available via the Err field of the MarshalError or
+ // UnmarshalError struct.
+ ErrIO
+
+ // ErrParseTime indicates an error was encountered while parsing an
+ // RFC3339 formatted time value. The actual underlying error will be
+ // available via the Err field of the UnmarshalError struct.
+ ErrParseTime
+)
+
+// Map of ErrorCode values back to their constant names for pretty printing.
+var errorCodeStrings = map[ErrorCode]string{
+ ErrBadArguments: "ErrBadArguments",
+ ErrUnsupportedType: "ErrUnsupportedType",
+ ErrBadEnumValue: "ErrBadEnumValue",
+ ErrNotSettable: "ErrNotSettable",
+ ErrOverflow: "ErrOverflow",
+ ErrNilInterface: "ErrNilInterface",
+ ErrIO: "ErrIO",
+ ErrParseTime: "ErrParseTime",
+}
+
+// String returns the ErrorCode as a human-readable name.
+func (e ErrorCode) String() string {
+ if s := errorCodeStrings[e]; s != "" {
+ return s
+ }
+ return fmt.Sprintf("Unknown ErrorCode (%d)", e)
+}
+
+// UnmarshalError describes a problem encountered while unmarshaling data.
+// Some potential issues are unsupported Go types, attempting to decode a value
+// which is too large to fit into a specified Go type, and exceeding max slice
+// limitations.
+type UnmarshalError struct {
+ ErrorCode ErrorCode // Describes the kind of error
+ Func string // Function name
+ Value interface{} // Value actually parsed where appropriate
+ Description string // Human readable description of the issue
+ Err error // The underlying error for IO errors
+}
+
+// Error satisfies the error interface and prints human-readable errors.
+func (e *UnmarshalError) Error() string {
+ switch e.ErrorCode {
+ case ErrBadEnumValue, ErrOverflow, ErrIO, ErrParseTime:
+ return fmt.Sprintf("xdr:%s: %s - read: '%v'", e.Func,
+ e.Description, e.Value)
+ }
+ return fmt.Sprintf("xdr:%s: %s", e.Func, e.Description)
+}
+
+// unmarshalError creates an error given a set of arguments and will copy byte
+// slices into the Value field since they might otherwise be changed from from
+// the original value.
+func unmarshalError(f string, c ErrorCode, desc string, v interface{}, err error) *UnmarshalError {
+ e := &UnmarshalError{ErrorCode: c, Func: f, Description: desc, Err: err}
+ switch t := v.(type) {
+ case []byte:
+ slice := make([]byte, len(t))
+ copy(slice, t)
+ e.Value = slice
+ default:
+ e.Value = v
+ }
+
+ return e
+}
+
+// IsIO returns a boolean indicating whether the error is known to report that
+// the underlying reader or writer encountered an ErrIO.
+func IsIO(err error) bool {
+ switch e := err.(type) {
+ case *UnmarshalError:
+ return e.ErrorCode == ErrIO
+ case *MarshalError:
+ return e.ErrorCode == ErrIO
+ }
+ return false
+}
+
+// MarshalError describes a problem encountered while marshaling data.
+// Some potential issues are unsupported Go types, attempting to encode more
+// opaque data than can be represented by a single opaque XDR entry, and
+// exceeding max slice limitations.
+type MarshalError struct {
+ ErrorCode ErrorCode // Describes the kind of error
+ Func string // Function name
+ Value interface{} // Value actually parsed where appropriate
+ Description string // Human readable description of the issue
+ Err error // The underlying error for IO errors
+}
+
+// Error satisfies the error interface and prints human-readable errors.
+func (e *MarshalError) Error() string {
+ switch e.ErrorCode {
+ case ErrIO:
+ return fmt.Sprintf("xdr:%s: %s - wrote: '%v'", e.Func,
+ e.Description, e.Value)
+ case ErrBadEnumValue:
+ return fmt.Sprintf("xdr:%s: %s - value: '%v'", e.Func,
+ e.Description, e.Value)
+ }
+ return fmt.Sprintf("xdr:%s: %s", e.Func, e.Description)
+}
+
+// marshalError creates an error given a set of arguments and will copy byte
+// slices into the Value field since they might otherwise be changed from from
+// the original value.
+func marshalError(f string, c ErrorCode, desc string, v interface{}, err error) *MarshalError {
+ e := &MarshalError{ErrorCode: c, Func: f, Description: desc, Err: err}
+ switch t := v.(type) {
+ case []byte:
+ slice := make([]byte, len(t))
+ copy(slice, t)
+ e.Value = slice
+ default:
+ e.Value = v
+ }
+
+ return e
+}
diff --git a/vendor/github.com/digitalocean/go-libvirt/libvirt.go b/vendor/github.com/digitalocean/go-libvirt/libvirt.go
new file mode 100644
index 000000000..a76eafdd2
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/libvirt.go
@@ -0,0 +1,608 @@
+// Copyright 2018 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package libvirt is a pure Go implementation of the libvirt RPC protocol.
+// For more information on the protocol, see https://libvirt.org/internals/l.html
+package libvirt
+
+// We'll use c-for-go to extract the consts and typedefs from the libvirt
+// sources so we don't have to duplicate them here.
+//go:generate scripts/gen-consts.sh
+
+import (
+ "bufio"
+ "bytes"
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "net"
+ "sync"
+
+ "github.com/digitalocean/go-libvirt/internal/constants"
+ "github.com/digitalocean/go-libvirt/internal/event"
+ xdr "github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2"
+)
+
+// ErrEventsNotSupported is returned by Events() if event streams
+// are unsupported by either QEMU or libvirt.
+var ErrEventsNotSupported = errors.New("event monitor is not supported")
+
+// Libvirt implements libvirt's remote procedure call protocol.
+type Libvirt struct {
+ conn net.Conn
+ r *bufio.Reader
+ w *bufio.Writer
+ mu *sync.Mutex
+
+ // method callbacks
+ cmux sync.RWMutex
+ callbacks map[int32]chan response
+
+ // event listeners
+ emux sync.RWMutex
+ events map[int32]*event.Stream
+
+ // next request serial number
+ s int32
+}
+
+// DomainEvent represents a libvirt domain event.
+type DomainEvent struct {
+ CallbackID int32
+ Domain Domain
+ Event string
+ Seconds uint64
+ Microseconds uint32
+ Padding uint8
+ Details []byte
+}
+
+// GetCallbackID returns the callback ID of a QEMU domain event.
+func (de DomainEvent) GetCallbackID() int32 {
+ return de.CallbackID
+}
+
+// GetCallbackID returns the callback ID of a libvirt lifecycle event.
+func (m DomainEventCallbackLifecycleMsg) GetCallbackID() int32 {
+ return m.CallbackID
+}
+
+// qemuError represents a QEMU process error.
+type qemuError struct {
+ Error struct {
+ Class string `json:"class"`
+ Description string `json:"desc"`
+ } `json:"error"`
+}
+
+// Capabilities returns an XML document describing the host's capabilties.
+func (l *Libvirt) Capabilities() ([]byte, error) {
+ caps, err := l.ConnectGetCapabilities()
+ return []byte(caps), err
+}
+
+// Connect establishes communication with the libvirt server.
+// The underlying libvirt socket connection must be previously established.
+func (l *Libvirt) Connect() error {
+ payload := struct {
+ Padding [3]byte
+ Name string
+ Flags uint32
+ }{
+ Padding: [3]byte{0x1, 0x0, 0x0},
+ Name: "qemu:///system",
+ Flags: 0,
+ }
+
+ buf, err := encode(&payload)
+ if err != nil {
+ return err
+ }
+
+ // libvirt requires that we call auth-list prior to connecting,
+ // event when no authentication is used.
+ _, err = l.request(constants.ProcAuthList, constants.Program, buf)
+ if err != nil {
+ return err
+ }
+
+ _, err = l.request(constants.ProcConnectOpen, constants.Program, buf)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Disconnect shuts down communication with the libvirt server and closes the
+// underlying net.Conn.
+func (l *Libvirt) Disconnect() error {
+ // close event streams
+ for _, ev := range l.events {
+ l.unsubscribeEvents(ev)
+ }
+
+ // Deregister all callbacks to prevent blocking on clients with
+ // outstanding requests
+ l.deregisterAll()
+
+ _, err := l.request(constants.ProcConnectClose, constants.Program, nil)
+ if err != nil {
+ return err
+ }
+
+ return l.conn.Close()
+}
+
+// Domains returns a list of all domains managed by libvirt.
+//
+// Deprecated: use ConnectListAllDomains instead.
+func (l *Libvirt) Domains() ([]Domain, error) {
+ // these are the flags as passed by `virsh list --all`
+ flags := ConnectListDomainsActive | ConnectListDomainsInactive
+ domains, _, err := l.ConnectListAllDomains(1, flags)
+ return domains, err
+}
+
+// DomainState returns state of the domain managed by libvirt.
+//
+// Deprecated: use DomainGetState instead.
+func (l *Libvirt) DomainState(dom string) (DomainState, error) {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return DomainNostate, err
+ }
+
+ state, _, err := l.DomainGetState(d, 0)
+ return DomainState(state), err
+}
+
+// SubscribeQEMUEvents streams domain events until the provided context is
+// cancelled. If a problem is encountered setting up the event monitor
+// connection an error will be returned. Errors encountered during streaming
+// will cause the returned event channel to be closed. QEMU domain events.
+func (l *Libvirt) SubscribeQEMUEvents(ctx context.Context, dom string) (<-chan DomainEvent, error) {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return nil, err
+ }
+
+ callbackID, err := l.QEMUConnectDomainMonitorEventRegister([]Domain{d}, nil, 0)
+ if err != nil {
+ return nil, err
+ }
+
+ stream := event.NewStream(constants.QEMUProgram, callbackID)
+ l.addStream(stream)
+ ch := make(chan DomainEvent)
+ go func() {
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+ defer l.unsubscribeQEMUEvents(stream)
+ defer stream.Shutdown()
+ defer func() { close(ch) }()
+
+ for {
+ select {
+ case ev, ok := <-stream.Recv():
+ if !ok {
+ return
+ }
+ ch <- *ev.(*DomainEvent)
+ case <-ctx.Done():
+ return
+ }
+ }
+ }()
+
+ return ch, nil
+}
+
+// unsubscribeQEMUEvents stops the flow of events from QEMU through libvirt.
+func (l *Libvirt) unsubscribeQEMUEvents(stream *event.Stream) error {
+ err := l.QEMUConnectDomainMonitorEventDeregister(stream.CallbackID)
+ l.removeStream(stream.CallbackID)
+
+ return err
+}
+
+// SubscribeEvents allows the caller to subscribe to any of the event types
+// supported by libvirt. The events will continue to be streamed until the
+// caller cancels the provided context. After canceling the context, callers
+// should wait until the channel is closed to be sure they're collected all the
+// events.
+func (l *Libvirt) SubscribeEvents(ctx context.Context, eventID DomainEventID,
+ dom OptDomain) (<-chan interface{}, error) {
+
+ callbackID, err := l.ConnectDomainEventCallbackRegisterAny(int32(eventID), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ stream := event.NewStream(constants.QEMUProgram, callbackID)
+ l.addStream(stream)
+
+ ch := make(chan interface{})
+ go func() {
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+ defer l.unsubscribeEvents(stream)
+ defer stream.Shutdown()
+ defer func() { close(ch) }()
+
+ for {
+ select {
+ case ev, ok := <-stream.Recv():
+ if !ok {
+ return
+ }
+ ch <- ev
+ case <-ctx.Done():
+ return
+ }
+ }
+ }()
+
+ return ch, nil
+}
+
+// unsubscribeEvents stops the flow of the specified events from libvirt. There
+// are two steps to this process: a call to libvirt to deregister our callback,
+// and then removing the callback from the list used by the `route` fucntion. If
+// the deregister call fails, we'll return the error, but still remove the
+// callback from the list. That's ok; if any events arrive after this point, the
+// route function will drop them when it finds no registered handler.
+func (l *Libvirt) unsubscribeEvents(stream *event.Stream) error {
+ err := l.ConnectDomainEventCallbackDeregisterAny(stream.CallbackID)
+ l.removeStream(stream.CallbackID)
+
+ return err
+}
+
+// LifecycleEvents streams lifecycle events until the provided context is
+// cancelled. If a problem is encountered setting up the event monitor
+// connection, an error will be returned. Errors encountered during streaming
+// will cause the returned event channel to be closed.
+func (l *Libvirt) LifecycleEvents(ctx context.Context) (<-chan DomainEventLifecycleMsg, error) {
+ callbackID, err := l.ConnectDomainEventCallbackRegisterAny(int32(DomainEventIDLifecycle), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ stream := event.NewStream(constants.Program, callbackID)
+ l.addStream(stream)
+
+ ch := make(chan DomainEventLifecycleMsg)
+
+ go func() {
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+ defer l.unsubscribeEvents(stream)
+ defer stream.Shutdown()
+ defer func() { close(ch) }()
+
+ for {
+ select {
+ case ev, ok := <-stream.Recv():
+ if !ok {
+ return
+ }
+ ch <- ev.(*DomainEventCallbackLifecycleMsg).Msg
+ case <-ctx.Done():
+ return
+ }
+ }
+ }()
+
+ return ch, nil
+}
+
+// Run executes the given QAPI command against a domain's QEMU instance.
+// For a list of available QAPI commands, see:
+// http://git.qemu.org/?p=qemu.git;a=blob;f=qapi-schema.json;hb=HEAD
+func (l *Libvirt) Run(dom string, cmd []byte) ([]byte, error) {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return nil, err
+ }
+
+ payload := struct {
+ Domain Domain
+ Command []byte
+ Flags uint32
+ }{
+ Domain: d,
+ Command: cmd,
+ Flags: 0,
+ }
+
+ buf, err := encode(&payload)
+ if err != nil {
+ return nil, err
+ }
+
+ res, err := l.request(constants.QEMUProcDomainMonitorCommand, constants.QEMUProgram, buf)
+ if err != nil {
+ return nil, err
+ }
+
+ // check for QEMU process errors
+ if err = getQEMUError(res); err != nil {
+ return nil, err
+ }
+
+ r := bytes.NewReader(res.Payload)
+ dec := xdr.NewDecoder(r)
+ data, _, err := dec.DecodeFixedOpaque(int32(r.Len()))
+ if err != nil {
+ return nil, err
+ }
+
+ // drop QMP control characters from start of line, and drop
+ // any trailing NULL characters from the end
+ return bytes.TrimRight(data[4:], "\x00"), nil
+}
+
+// Secrets returns all secrets managed by the libvirt daemon.
+//
+// Deprecated: use ConnectListAllSecrets instead.
+func (l *Libvirt) Secrets() ([]Secret, error) {
+ secrets, _, err := l.ConnectListAllSecrets(1, 0)
+ return secrets, err
+}
+
+// StoragePool returns the storage pool associated with the provided name.
+// An error is returned if the requested storage pool is not found.
+//
+// Deprecated: use StoragePoolLookupByName instead.
+func (l *Libvirt) StoragePool(name string) (StoragePool, error) {
+ return l.StoragePoolLookupByName(name)
+}
+
+// StoragePools returns a list of defined storage pools. Pools are filtered by
+// the provided flags. See StoragePools*.
+//
+// Deprecated: use ConnectListAllStoragePools instead.
+func (l *Libvirt) StoragePools(flags ConnectListAllStoragePoolsFlags) ([]StoragePool, error) {
+ pools, _, err := l.ConnectListAllStoragePools(1, flags)
+ return pools, err
+}
+
+// Undefine undefines the domain specified by dom, e.g., 'prod-lb-01'.
+// The flags argument allows additional options to be specified such as
+// cleaning up snapshot metadata. For more information on available
+// flags, see DomainUndefine*.
+//
+// Deprecated: use DomainUndefineFlags instead.
+func (l *Libvirt) Undefine(dom string, flags DomainUndefineFlagsValues) error {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return err
+ }
+
+ return l.DomainUndefineFlags(d, flags)
+}
+
+// Destroy destroys the domain specified by dom, e.g., 'prod-lb-01'.
+// The flags argument allows additional options to be specified such as
+// allowing a graceful shutdown with SIGTERM than SIGKILL.
+// For more information on available flags, see DomainDestroy*.
+//
+// Deprecated: use DomainDestroyFlags instead.
+func (l *Libvirt) Destroy(dom string, flags DomainDestroyFlagsValues) error {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return err
+ }
+
+ return l.DomainDestroyFlags(d, flags)
+}
+
+// XML returns a domain's raw XML definition, akin to `virsh dumpxml <domain>`.
+// See DomainXMLFlag* for optional flags.
+//
+// Deprecated: use DomainGetXMLDesc instead.
+func (l *Libvirt) XML(dom string, flags DomainXMLFlags) ([]byte, error) {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return nil, err
+ }
+
+ xml, err := l.DomainGetXMLDesc(d, flags)
+ return []byte(xml), err
+}
+
+// DefineXML defines a domain, but does not start it.
+//
+// Deprecated: use DomainDefineXMLFlags instead.
+func (l *Libvirt) DefineXML(x []byte, flags DomainDefineFlags) error {
+ _, err := l.DomainDefineXMLFlags(string(x), flags)
+ return err
+}
+
+// Version returns the version of the libvirt daemon.
+//
+// Deprecated: use ConnectGetLibVersion instead.
+func (l *Libvirt) Version() (string, error) {
+ ver, err := l.ConnectGetLibVersion()
+ if err != nil {
+ return "", err
+ }
+
+ // The version is provided as an int following this formula:
+ // version * 1,000,000 + minor * 1000 + micro
+ // See src/libvirt-host.c # virConnectGetLibVersion
+ major := ver / 1000000
+ ver %= 1000000
+ minor := ver / 1000
+ ver %= 1000
+ micro := ver
+
+ versionString := fmt.Sprintf("%d.%d.%d", major, minor, micro)
+ return versionString, nil
+}
+
+// Shutdown shuts down a domain. Note that the guest OS may ignore the request.
+// If flags is set to 0 then the hypervisor will choose the method of shutdown it considers best.
+//
+// Deprecated: use DomainShutdownFlags instead.
+func (l *Libvirt) Shutdown(dom string, flags DomainShutdownFlagValues) error {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return err
+ }
+
+ return l.DomainShutdownFlags(d, flags)
+}
+
+// Reboot reboots the domain. Note that the guest OS may ignore the request.
+// If flags is set to zero, then the hypervisor will choose the method of shutdown it considers best.
+//
+// Deprecated: use DomainReboot instead.
+func (l *Libvirt) Reboot(dom string, flags DomainRebootFlagValues) error {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return err
+ }
+
+ return l.DomainReboot(d, flags)
+}
+
+// Reset resets domain immediately without any guest OS shutdown
+//
+// Deprecated: use DomainReset instead.
+func (l *Libvirt) Reset(dom string) error {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return err
+ }
+
+ return l.DomainReset(d, 0)
+}
+
+// BlockLimit contains a name and value pair for a Get/SetBlockIOTune limit. The
+// Name field is the name of the limit (to see a list of the limits that can be
+// applied, execute the 'blkdeviotune' command on a VM in virsh). Callers can
+// use the QEMUBlockIO... constants below for the Name value. The Value field is
+// the limit to apply.
+type BlockLimit struct {
+ Name string
+ Value uint64
+}
+
+// SetBlockIOTune changes the per-device block I/O tunables within a guest.
+// Parameters are the name of the VM, the name of the disk device to which the
+// limits should be applied, and 1 or more BlockLimit structs containing the
+// actual limits.
+//
+// The limits which can be applied here are enumerated in the QEMUBlockIO...
+// constants above, and you can also see the full list by executing the
+// 'blkdeviotune' command on a VM in virsh.
+//
+// Example usage:
+// SetBlockIOTune("vm-name", "vda", BlockLimit{libvirt.QEMUBlockIOWriteBytesSec, 1000000})
+//
+// Deprecated: use DomainSetBlockIOTune instead.
+func (l *Libvirt) SetBlockIOTune(dom string, disk string, limits ...BlockLimit) error {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return err
+ }
+
+ params := make([]TypedParam, len(limits))
+ for ix, limit := range limits {
+ tpval := NewTypedParamValueUllong(limit.Value)
+ params[ix] = TypedParam{Field: limit.Name, Value: *tpval}
+ }
+
+ return l.DomainSetBlockIOTune(d, disk, params, uint32(DomainAffectLive))
+}
+
+// GetBlockIOTune returns a slice containing the current block I/O tunables for
+// a disk.
+//
+// Deprecated: use DomainGetBlockIOTune instead.
+func (l *Libvirt) GetBlockIOTune(dom string, disk string) ([]BlockLimit, error) {
+ d, err := l.lookup(dom)
+ if err != nil {
+ return nil, err
+ }
+
+ lims, _, err := l.DomainGetBlockIOTune(d, []string{disk}, 32, uint32(TypedParamStringOkay))
+ if err != nil {
+ return nil, err
+ }
+
+ var limits []BlockLimit
+
+ // now decode each of the returned TypedParams. To do this we read the field
+ // name and type, then use the type information to decode the value.
+ for _, lim := range lims {
+ var l BlockLimit
+ name := lim.Field
+ switch lim.Value.I.(type) {
+ case uint64:
+ l = BlockLimit{Name: name, Value: lim.Value.I.(uint64)}
+ }
+ limits = append(limits, l)
+ }
+
+ return limits, nil
+}
+
+// lookup returns a domain as seen by libvirt.
+func (l *Libvirt) lookup(name string) (Domain, error) {
+ return l.DomainLookupByName(name)
+}
+
+// getQEMUError checks the provided response for QEMU process errors.
+// If an error is found, it is extracted an returned, otherwise nil.
+func getQEMUError(r response) error {
+ pl := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoder(pl)
+
+ s, _, err := dec.DecodeString()
+ if err != nil {
+ return err
+ }
+
+ var e qemuError
+ if err = json.Unmarshal([]byte(s), &e); err != nil {
+ return err
+ }
+
+ if e.Error.Description != "" {
+ return errors.New(e.Error.Description)
+ }
+
+ return nil
+}
+
+// New configures a new Libvirt RPC connection.
+func New(conn net.Conn) *Libvirt {
+ l := &Libvirt{
+ conn: conn,
+ s: 0,
+ r: bufio.NewReader(conn),
+ w: bufio.NewWriter(conn),
+ mu: &sync.Mutex{},
+ callbacks: make(map[int32]chan response),
+ events: make(map[int32]*event.Stream),
+ }
+
+ go l.listen()
+
+ return l
+}
diff --git a/vendor/github.com/digitalocean/go-libvirt/libvirt.yml b/vendor/github.com/digitalocean/go-libvirt/libvirt.yml
new file mode 100644
index 000000000..4d6cc2d50
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/libvirt.yml
@@ -0,0 +1,64 @@
+# Configuration file for c-for-go, which go-libvirt uses to translate the const
+# and type definitions from the C-language sources in the libvirt project into
+# Go. This file is used by the c-for-go binary (github.com/xlab/c-for-go), which
+# is called when 'go generate' is run. See libvirt.go for the command line used.
+---
+GENERATOR:
+ PackageName: libvirt
+ PackageLicense: |
+ Copyright 2018 The go-libvirt Authors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ Includes: []
+
+PARSER:
+ # We can't use environment variables here, but we don't want to process the
+ # libvirt version installed in the system folders (if any). Instead we'll
+ # rely on our caller to link the libvirt source directory to lv_source/, and
+ # run on that code. This isn't ideal, but changes to c-for-go are needed to
+ # fix it.
+ IncludePaths: [./lv_source/include]
+ SourcesPaths:
+ - libvirt/libvirt.h
+ - libvirt/virterror.h
+
+TRANSLATOR:
+ ConstRules:
+ defines: eval
+ Rules:
+ global:
+ - {action: accept, from: "^vir"}
+ post-global:
+ - {action: replace, from: "^vir"}
+ - {load: snakecase}
+ # Follow golint's capitalization conventions.
+ - {action: replace, from: "Api([A-Z]|$)", to: "API$1"}
+ - {action: replace, from: "Cpu([A-Z]|$)", to: "CPU$1"}
+ - {action: replace, from: "Dns([A-Z]|$)", to: "DNS$1"}
+ - {action: replace, from: "Eof([A-Z]|$)", to: "EOF$1"}
+ - {action: replace, from: "Id([A-Z]|$)", to: "ID$1"}
+ - {action: replace, from: "Ip([A-Z]|$)", to: "IP$1"}
+ - {action: replace, from: "Tls([A-Z]|$)", to: "TLS$1"}
+ - {action: replace, from: "Uuid([A-Z]|$)", to: "UUID$1"}
+ - {action: replace, from: "Uri([A-Z]|$)", to: "URI$1"}
+ - {action: replace, from: "Vcpu([A-Z]|$)", to: "VCPU$1"}
+ - {action: replace, from: "Xml([A-Z]|$)", to: "XML$1"}
+ - {action: replace, from: "Rpc([A-Z]|$)", to: "RPC$1"}
+ - {action: replace, from: "Ssh([A-Z]|$)", to: "SSH$1"}
+ - {action: replace, from: "Http([A-Z]|$)", to: "HTTP$1"}
+ - {transform: unexport, from: "^(Err|From|War)"}
+ const:
+ - {action: accept, from: "^VIR_"}
+ # Special case to prevent a collision with a type:
+ - {action: replace, from: "^VIR_DOMAIN_JOB_OPERATION", to: "VIR_DOMAIN_JOB_OPERATION_STR"}
+ - {transform: lower}
diff --git a/vendor/github.com/digitalocean/go-libvirt/libvirtd.conf b/vendor/github.com/digitalocean/go-libvirt/libvirtd.conf
new file mode 100644
index 000000000..d416d7ba3
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/libvirtd.conf
@@ -0,0 +1,7 @@
+# libvirtd configuration for travis-ci
+listen_tls = 0
+listen_tcp = 1
+tcp_port = "16509"
+listen_addr = "127.0.0.1"
+auth_unix_rw = "none"
+auth_tcp = "none"
diff --git a/vendor/github.com/digitalocean/go-libvirt/qemu_protocol.gen.go b/vendor/github.com/digitalocean/go-libvirt/qemu_protocol.gen.go
new file mode 100644
index 000000000..7666a63cd
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/qemu_protocol.gen.go
@@ -0,0 +1,292 @@
+// Copyright 2018 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//
+// Code generated by internal/lvgen/generate.go. DO NOT EDIT.
+//
+// To regenerate, run 'go generate' in internal/lvgen.
+//
+
+package libvirt
+
+import (
+ "bytes"
+ "io"
+
+ "github.com/digitalocean/go-libvirt/internal/constants"
+ "github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2"
+)
+
+// References to prevent "imported and not used" errors.
+var (
+ _ = bytes.Buffer{}
+ _ = io.Copy
+ _ = constants.Program
+ _ = xdr.Unmarshal
+)
+
+//
+// Typedefs:
+//
+
+//
+// Enums:
+//
+// QEMUProcedure is libvirt's qemu_procedure
+type QEMUProcedure int32
+
+//
+// Structs:
+//
+// QEMUDomainMonitorCommandArgs is libvirt's qemu_domain_monitor_command_args
+type QEMUDomainMonitorCommandArgs struct {
+ Dom Domain
+ Cmd string
+ Flags uint32
+}
+
+// QEMUDomainMonitorCommandRet is libvirt's qemu_domain_monitor_command_ret
+type QEMUDomainMonitorCommandRet struct {
+ Result string
+}
+
+// QEMUDomainAttachArgs is libvirt's qemu_domain_attach_args
+type QEMUDomainAttachArgs struct {
+ PidValue uint32
+ Flags uint32
+}
+
+// QEMUDomainAttachRet is libvirt's qemu_domain_attach_ret
+type QEMUDomainAttachRet struct {
+ Dom Domain
+}
+
+// QEMUDomainAgentCommandArgs is libvirt's qemu_domain_agent_command_args
+type QEMUDomainAgentCommandArgs struct {
+ Dom Domain
+ Cmd string
+ Timeout int32
+ Flags uint32
+}
+
+// QEMUDomainAgentCommandRet is libvirt's qemu_domain_agent_command_ret
+type QEMUDomainAgentCommandRet struct {
+ Result OptString
+}
+
+// QEMUConnectDomainMonitorEventRegisterArgs is libvirt's qemu_connect_domain_monitor_event_register_args
+type QEMUConnectDomainMonitorEventRegisterArgs struct {
+ Dom OptDomain
+ Event OptString
+ Flags uint32
+}
+
+// QEMUConnectDomainMonitorEventRegisterRet is libvirt's qemu_connect_domain_monitor_event_register_ret
+type QEMUConnectDomainMonitorEventRegisterRet struct {
+ CallbackID int32
+}
+
+// QEMUConnectDomainMonitorEventDeregisterArgs is libvirt's qemu_connect_domain_monitor_event_deregister_args
+type QEMUConnectDomainMonitorEventDeregisterArgs struct {
+ CallbackID int32
+}
+
+// QEMUDomainMonitorEventMsg is libvirt's qemu_domain_monitor_event_msg
+type QEMUDomainMonitorEventMsg struct {
+ CallbackID int32
+ Dom Domain
+ Event string
+ Seconds int64
+ Micros uint32
+ Details OptString
+}
+
+
+
+
+// QEMUDomainMonitorCommand is the go wrapper for QEMU_PROC_DOMAIN_MONITOR_COMMAND.
+func (l *Libvirt) QEMUDomainMonitorCommand(Dom Domain, Cmd string, Flags uint32) (rResult string, err error) {
+ var buf []byte
+
+ args := QEMUDomainMonitorCommandArgs {
+ Dom: Dom,
+ Cmd: Cmd,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(1, constants.QEMUProgram, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Result: string
+ _, err = dec.Decode(&rResult)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// QEMUDomainAttach is the go wrapper for QEMU_PROC_DOMAIN_ATTACH.
+func (l *Libvirt) QEMUDomainAttach(PidValue uint32, Flags uint32) (rDom Domain, err error) {
+ var buf []byte
+
+ args := QEMUDomainAttachArgs {
+ PidValue: PidValue,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(2, constants.QEMUProgram, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// QEMUDomainAgentCommand is the go wrapper for QEMU_PROC_DOMAIN_AGENT_COMMAND.
+func (l *Libvirt) QEMUDomainAgentCommand(Dom Domain, Cmd string, Timeout int32, Flags uint32) (rResult OptString, err error) {
+ var buf []byte
+
+ args := QEMUDomainAgentCommandArgs {
+ Dom: Dom,
+ Cmd: Cmd,
+ Timeout: Timeout,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(3, constants.QEMUProgram, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Result: OptString
+ _, err = dec.Decode(&rResult)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// QEMUConnectDomainMonitorEventRegister is the go wrapper for QEMU_PROC_CONNECT_DOMAIN_MONITOR_EVENT_REGISTER.
+func (l *Libvirt) QEMUConnectDomainMonitorEventRegister(Dom OptDomain, Event OptString, Flags uint32) (rCallbackID int32, err error) {
+ var buf []byte
+
+ args := QEMUConnectDomainMonitorEventRegisterArgs {
+ Dom: Dom,
+ Event: Event,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(4, constants.QEMUProgram, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CallbackID: int32
+ _, err = dec.Decode(&rCallbackID)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// QEMUConnectDomainMonitorEventDeregister is the go wrapper for QEMU_PROC_CONNECT_DOMAIN_MONITOR_EVENT_DEREGISTER.
+func (l *Libvirt) QEMUConnectDomainMonitorEventDeregister(CallbackID int32) (err error) {
+ var buf []byte
+
+ args := QEMUConnectDomainMonitorEventDeregisterArgs {
+ CallbackID: CallbackID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(5, constants.QEMUProgram, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// QEMUDomainMonitorEvent is the go wrapper for QEMU_PROC_DOMAIN_MONITOR_EVENT.
+func (l *Libvirt) QEMUDomainMonitorEvent() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(6, constants.QEMUProgram, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
diff --git a/vendor/github.com/digitalocean/go-libvirt/remote_protocol.gen.go b/vendor/github.com/digitalocean/go-libvirt/remote_protocol.gen.go
new file mode 100644
index 000000000..0021e866e
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/remote_protocol.gen.go
@@ -0,0 +1,16449 @@
+// Copyright 2018 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//
+// Code generated by internal/lvgen/generate.go. DO NOT EDIT.
+//
+// To regenerate, run 'go generate' in internal/lvgen.
+//
+
+package libvirt
+
+import (
+ "bytes"
+ "io"
+
+ "github.com/digitalocean/go-libvirt/internal/constants"
+ "github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2"
+)
+
+// References to prevent "imported and not used" errors.
+var (
+ _ = bytes.Buffer{}
+ _ = io.Copy
+ _ = constants.Program
+ _ = xdr.Unmarshal
+)
+
+//
+// Typedefs:
+//
+// OptString is libvirt's remote_string
+type OptString []string
+// UUID is libvirt's remote_uuid
+type UUID [UUIDBuflen]byte
+// OptDomain is libvirt's remote_domain
+type OptDomain []Domain
+// OptNetwork is libvirt's remote_network
+type OptNetwork []Network
+// OptNetworkPort is libvirt's remote_network_port
+type OptNetworkPort []NetworkPort
+// OptNwfilter is libvirt's remote_nwfilter
+type OptNwfilter []Nwfilter
+// OptNwfilterBinding is libvirt's remote_nwfilter_binding
+type OptNwfilterBinding []NwfilterBinding
+// OptStoragePool is libvirt's remote_storage_pool
+type OptStoragePool []StoragePool
+// OptStorageVol is libvirt's remote_storage_vol
+type OptStorageVol []StorageVol
+// OptNodeDevice is libvirt's remote_node_device
+type OptNodeDevice []NodeDevice
+// OptSecret is libvirt's remote_secret
+type OptSecret []Secret
+
+//
+// Enums:
+//
+// AuthType is libvirt's remote_auth_type
+type AuthType int32
+// Procedure is libvirt's remote_procedure
+type Procedure int32
+
+//
+// Structs:
+//
+// Domain is libvirt's remote_nonnull_domain
+type Domain struct {
+ Name string
+ UUID UUID
+ ID int32
+}
+
+// Network is libvirt's remote_nonnull_network
+type Network struct {
+ Name string
+ UUID UUID
+}
+
+// NetworkPort is libvirt's remote_nonnull_network_port
+type NetworkPort struct {
+ Net Network
+ UUID UUID
+}
+
+// Nwfilter is libvirt's remote_nonnull_nwfilter
+type Nwfilter struct {
+ Name string
+ UUID UUID
+}
+
+// NwfilterBinding is libvirt's remote_nonnull_nwfilter_binding
+type NwfilterBinding struct {
+ Portdev string
+ Filtername string
+}
+
+// Interface is libvirt's remote_nonnull_interface
+type Interface struct {
+ Name string
+ Mac string
+}
+
+// StoragePool is libvirt's remote_nonnull_storage_pool
+type StoragePool struct {
+ Name string
+ UUID UUID
+}
+
+// StorageVol is libvirt's remote_nonnull_storage_vol
+type StorageVol struct {
+ Pool string
+ Name string
+ Key string
+}
+
+// NodeDevice is libvirt's remote_nonnull_node_device
+type NodeDevice struct {
+ Name string
+}
+
+// Secret is libvirt's remote_nonnull_secret
+type Secret struct {
+ UUID UUID
+ UsageType int32
+ UsageID string
+}
+
+// DomainCheckpoint is libvirt's remote_nonnull_domain_checkpoint
+type DomainCheckpoint struct {
+ Name string
+ Dom Domain
+}
+
+// DomainSnapshot is libvirt's remote_nonnull_domain_snapshot
+type DomainSnapshot struct {
+ Name string
+ Dom Domain
+}
+
+// Error is libvirt's remote_error
+type Error struct {
+ Code int32
+ OptDomain int32
+ Message OptString
+ Level int32
+ Dom OptDomain
+ Str1 OptString
+ Str2 OptString
+ Str3 OptString
+ Int1 int32
+ Int2 int32
+ Net OptNetwork
+}
+
+// VcpuInfo is libvirt's remote_vcpu_info
+type VcpuInfo struct {
+ Number uint32
+ State int32
+ CPUTime uint64
+ CPU int32
+}
+
+// TypedParam is libvirt's remote_typed_param
+type TypedParam struct {
+ Field string
+ Value TypedParamValue
+}
+
+// NodeGetCPUStats is libvirt's remote_node_get_cpu_stats
+type NodeGetCPUStats struct {
+ Field string
+ Value uint64
+}
+
+// NodeGetMemoryStats is libvirt's remote_node_get_memory_stats
+type NodeGetMemoryStats struct {
+ Field string
+ Value uint64
+}
+
+// DomainDiskError is libvirt's remote_domain_disk_error
+type DomainDiskError struct {
+ Disk string
+ Error int32
+}
+
+// ConnectOpenArgs is libvirt's remote_connect_open_args
+type ConnectOpenArgs struct {
+ Name OptString
+ Flags ConnectFlags
+}
+
+// ConnectSupportsFeatureArgs is libvirt's remote_connect_supports_feature_args
+type ConnectSupportsFeatureArgs struct {
+ Feature int32
+}
+
+// ConnectSupportsFeatureRet is libvirt's remote_connect_supports_feature_ret
+type ConnectSupportsFeatureRet struct {
+ Supported int32
+}
+
+// ConnectGetTypeRet is libvirt's remote_connect_get_type_ret
+type ConnectGetTypeRet struct {
+ Type string
+}
+
+// ConnectGetVersionRet is libvirt's remote_connect_get_version_ret
+type ConnectGetVersionRet struct {
+ HvVer uint64
+}
+
+// ConnectGetLibVersionRet is libvirt's remote_connect_get_lib_version_ret
+type ConnectGetLibVersionRet struct {
+ LibVer uint64
+}
+
+// ConnectGetHostnameRet is libvirt's remote_connect_get_hostname_ret
+type ConnectGetHostnameRet struct {
+ Hostname string
+}
+
+// ConnectGetSysinfoArgs is libvirt's remote_connect_get_sysinfo_args
+type ConnectGetSysinfoArgs struct {
+ Flags uint32
+}
+
+// ConnectGetSysinfoRet is libvirt's remote_connect_get_sysinfo_ret
+type ConnectGetSysinfoRet struct {
+ Sysinfo string
+}
+
+// ConnectGetUriRet is libvirt's remote_connect_get_uri_ret
+type ConnectGetUriRet struct {
+ Uri string
+}
+
+// ConnectGetMaxVcpusArgs is libvirt's remote_connect_get_max_vcpus_args
+type ConnectGetMaxVcpusArgs struct {
+ Type OptString
+}
+
+// ConnectGetMaxVcpusRet is libvirt's remote_connect_get_max_vcpus_ret
+type ConnectGetMaxVcpusRet struct {
+ MaxVcpus int32
+}
+
+// NodeGetInfoRet is libvirt's remote_node_get_info_ret
+type NodeGetInfoRet struct {
+ Model [32]int8
+ Memory uint64
+ Cpus int32
+ Mhz int32
+ Nodes int32
+ Sockets int32
+ Cores int32
+ Threads int32
+}
+
+// ConnectGetCapabilitiesRet is libvirt's remote_connect_get_capabilities_ret
+type ConnectGetCapabilitiesRet struct {
+ Capabilities string
+}
+
+// ConnectGetDomainCapabilitiesArgs is libvirt's remote_connect_get_domain_capabilities_args
+type ConnectGetDomainCapabilitiesArgs struct {
+ Emulatorbin OptString
+ Arch OptString
+ Machine OptString
+ Virttype OptString
+ Flags uint32
+}
+
+// ConnectGetDomainCapabilitiesRet is libvirt's remote_connect_get_domain_capabilities_ret
+type ConnectGetDomainCapabilitiesRet struct {
+ Capabilities string
+}
+
+// NodeGetCPUStatsArgs is libvirt's remote_node_get_cpu_stats_args
+type NodeGetCPUStatsArgs struct {
+ CPUNum int32
+ Nparams int32
+ Flags uint32
+}
+
+// NodeGetCPUStatsRet is libvirt's remote_node_get_cpu_stats_ret
+type NodeGetCPUStatsRet struct {
+ Params []NodeGetCPUStats
+ Nparams int32
+}
+
+// NodeGetMemoryStatsArgs is libvirt's remote_node_get_memory_stats_args
+type NodeGetMemoryStatsArgs struct {
+ Nparams int32
+ CellNum int32
+ Flags uint32
+}
+
+// NodeGetMemoryStatsRet is libvirt's remote_node_get_memory_stats_ret
+type NodeGetMemoryStatsRet struct {
+ Params []NodeGetMemoryStats
+ Nparams int32
+}
+
+// NodeGetCellsFreeMemoryArgs is libvirt's remote_node_get_cells_free_memory_args
+type NodeGetCellsFreeMemoryArgs struct {
+ StartCell int32
+ Maxcells int32
+}
+
+// NodeGetCellsFreeMemoryRet is libvirt's remote_node_get_cells_free_memory_ret
+type NodeGetCellsFreeMemoryRet struct {
+ Cells []uint64
+}
+
+// NodeGetFreeMemoryRet is libvirt's remote_node_get_free_memory_ret
+type NodeGetFreeMemoryRet struct {
+ FreeMem uint64
+}
+
+// DomainGetSchedulerTypeArgs is libvirt's remote_domain_get_scheduler_type_args
+type DomainGetSchedulerTypeArgs struct {
+ Dom Domain
+}
+
+// DomainGetSchedulerTypeRet is libvirt's remote_domain_get_scheduler_type_ret
+type DomainGetSchedulerTypeRet struct {
+ Type string
+ Nparams int32
+}
+
+// DomainGetSchedulerParametersArgs is libvirt's remote_domain_get_scheduler_parameters_args
+type DomainGetSchedulerParametersArgs struct {
+ Dom Domain
+ Nparams int32
+}
+
+// DomainGetSchedulerParametersRet is libvirt's remote_domain_get_scheduler_parameters_ret
+type DomainGetSchedulerParametersRet struct {
+ Params []TypedParam
+}
+
+// DomainGetSchedulerParametersFlagsArgs is libvirt's remote_domain_get_scheduler_parameters_flags_args
+type DomainGetSchedulerParametersFlagsArgs struct {
+ Dom Domain
+ Nparams int32
+ Flags uint32
+}
+
+// DomainGetSchedulerParametersFlagsRet is libvirt's remote_domain_get_scheduler_parameters_flags_ret
+type DomainGetSchedulerParametersFlagsRet struct {
+ Params []TypedParam
+}
+
+// DomainSetSchedulerParametersArgs is libvirt's remote_domain_set_scheduler_parameters_args
+type DomainSetSchedulerParametersArgs struct {
+ Dom Domain
+ Params []TypedParam
+}
+
+// DomainSetSchedulerParametersFlagsArgs is libvirt's remote_domain_set_scheduler_parameters_flags_args
+type DomainSetSchedulerParametersFlagsArgs struct {
+ Dom Domain
+ Params []TypedParam
+ Flags uint32
+}
+
+// DomainSetBlkioParametersArgs is libvirt's remote_domain_set_blkio_parameters_args
+type DomainSetBlkioParametersArgs struct {
+ Dom Domain
+ Params []TypedParam
+ Flags uint32
+}
+
+// DomainGetBlkioParametersArgs is libvirt's remote_domain_get_blkio_parameters_args
+type DomainGetBlkioParametersArgs struct {
+ Dom Domain
+ Nparams int32
+ Flags uint32
+}
+
+// DomainGetBlkioParametersRet is libvirt's remote_domain_get_blkio_parameters_ret
+type DomainGetBlkioParametersRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// DomainSetMemoryParametersArgs is libvirt's remote_domain_set_memory_parameters_args
+type DomainSetMemoryParametersArgs struct {
+ Dom Domain
+ Params []TypedParam
+ Flags uint32
+}
+
+// DomainGetMemoryParametersArgs is libvirt's remote_domain_get_memory_parameters_args
+type DomainGetMemoryParametersArgs struct {
+ Dom Domain
+ Nparams int32
+ Flags uint32
+}
+
+// DomainGetMemoryParametersRet is libvirt's remote_domain_get_memory_parameters_ret
+type DomainGetMemoryParametersRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// DomainBlockResizeArgs is libvirt's remote_domain_block_resize_args
+type DomainBlockResizeArgs struct {
+ Dom Domain
+ Disk string
+ Size uint64
+ Flags DomainBlockResizeFlags
+}
+
+// DomainSetNumaParametersArgs is libvirt's remote_domain_set_numa_parameters_args
+type DomainSetNumaParametersArgs struct {
+ Dom Domain
+ Params []TypedParam
+ Flags uint32
+}
+
+// DomainGetNumaParametersArgs is libvirt's remote_domain_get_numa_parameters_args
+type DomainGetNumaParametersArgs struct {
+ Dom Domain
+ Nparams int32
+ Flags uint32
+}
+
+// DomainGetNumaParametersRet is libvirt's remote_domain_get_numa_parameters_ret
+type DomainGetNumaParametersRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// DomainSetPerfEventsArgs is libvirt's remote_domain_set_perf_events_args
+type DomainSetPerfEventsArgs struct {
+ Dom Domain
+ Params []TypedParam
+ Flags DomainModificationImpact
+}
+
+// DomainGetPerfEventsArgs is libvirt's remote_domain_get_perf_events_args
+type DomainGetPerfEventsArgs struct {
+ Dom Domain
+ Flags DomainModificationImpact
+}
+
+// DomainGetPerfEventsRet is libvirt's remote_domain_get_perf_events_ret
+type DomainGetPerfEventsRet struct {
+ Params []TypedParam
+}
+
+// DomainBlockStatsArgs is libvirt's remote_domain_block_stats_args
+type DomainBlockStatsArgs struct {
+ Dom Domain
+ Path string
+}
+
+// DomainBlockStatsRet is libvirt's remote_domain_block_stats_ret
+type DomainBlockStatsRet struct {
+ RdReq int64
+ RdBytes int64
+ WrReq int64
+ WrBytes int64
+ Errs int64
+}
+
+// DomainBlockStatsFlagsArgs is libvirt's remote_domain_block_stats_flags_args
+type DomainBlockStatsFlagsArgs struct {
+ Dom Domain
+ Path string
+ Nparams int32
+ Flags uint32
+}
+
+// DomainBlockStatsFlagsRet is libvirt's remote_domain_block_stats_flags_ret
+type DomainBlockStatsFlagsRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// DomainInterfaceStatsArgs is libvirt's remote_domain_interface_stats_args
+type DomainInterfaceStatsArgs struct {
+ Dom Domain
+ Device string
+}
+
+// DomainInterfaceStatsRet is libvirt's remote_domain_interface_stats_ret
+type DomainInterfaceStatsRet struct {
+ RxBytes int64
+ RxPackets int64
+ RxErrs int64
+ RxDrop int64
+ TxBytes int64
+ TxPackets int64
+ TxErrs int64
+ TxDrop int64
+}
+
+// DomainSetInterfaceParametersArgs is libvirt's remote_domain_set_interface_parameters_args
+type DomainSetInterfaceParametersArgs struct {
+ Dom Domain
+ Device string
+ Params []TypedParam
+ Flags uint32
+}
+
+// DomainGetInterfaceParametersArgs is libvirt's remote_domain_get_interface_parameters_args
+type DomainGetInterfaceParametersArgs struct {
+ Dom Domain
+ Device string
+ Nparams int32
+ Flags DomainModificationImpact
+}
+
+// DomainGetInterfaceParametersRet is libvirt's remote_domain_get_interface_parameters_ret
+type DomainGetInterfaceParametersRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// DomainMemoryStatsArgs is libvirt's remote_domain_memory_stats_args
+type DomainMemoryStatsArgs struct {
+ Dom Domain
+ MaxStats uint32
+ Flags uint32
+}
+
+// DomainMemoryStat is libvirt's remote_domain_memory_stat
+type DomainMemoryStat struct {
+ Tag int32
+ Val uint64
+}
+
+// DomainMemoryStatsRet is libvirt's remote_domain_memory_stats_ret
+type DomainMemoryStatsRet struct {
+ Stats []DomainMemoryStat
+}
+
+// DomainBlockPeekArgs is libvirt's remote_domain_block_peek_args
+type DomainBlockPeekArgs struct {
+ Dom Domain
+ Path string
+ Offset uint64
+ Size uint32
+ Flags uint32
+}
+
+// DomainBlockPeekRet is libvirt's remote_domain_block_peek_ret
+type DomainBlockPeekRet struct {
+ Buffer []byte
+}
+
+// DomainMemoryPeekArgs is libvirt's remote_domain_memory_peek_args
+type DomainMemoryPeekArgs struct {
+ Dom Domain
+ Offset uint64
+ Size uint32
+ Flags DomainMemoryFlags
+}
+
+// DomainMemoryPeekRet is libvirt's remote_domain_memory_peek_ret
+type DomainMemoryPeekRet struct {
+ Buffer []byte
+}
+
+// DomainGetBlockInfoArgs is libvirt's remote_domain_get_block_info_args
+type DomainGetBlockInfoArgs struct {
+ Dom Domain
+ Path string
+ Flags uint32
+}
+
+// DomainGetBlockInfoRet is libvirt's remote_domain_get_block_info_ret
+type DomainGetBlockInfoRet struct {
+ Allocation uint64
+ Capacity uint64
+ Physical uint64
+}
+
+// ConnectListDomainsArgs is libvirt's remote_connect_list_domains_args
+type ConnectListDomainsArgs struct {
+ Maxids int32
+}
+
+// ConnectListDomainsRet is libvirt's remote_connect_list_domains_ret
+type ConnectListDomainsRet struct {
+ Ids []int32
+}
+
+// ConnectNumOfDomainsRet is libvirt's remote_connect_num_of_domains_ret
+type ConnectNumOfDomainsRet struct {
+ Num int32
+}
+
+// DomainCreateXMLArgs is libvirt's remote_domain_create_xml_args
+type DomainCreateXMLArgs struct {
+ XMLDesc string
+ Flags DomainCreateFlags
+}
+
+// DomainCreateXMLRet is libvirt's remote_domain_create_xml_ret
+type DomainCreateXMLRet struct {
+ Dom Domain
+}
+
+// DomainCreateXMLWithFilesArgs is libvirt's remote_domain_create_xml_with_files_args
+type DomainCreateXMLWithFilesArgs struct {
+ XMLDesc string
+ Flags DomainCreateFlags
+}
+
+// DomainCreateXMLWithFilesRet is libvirt's remote_domain_create_xml_with_files_ret
+type DomainCreateXMLWithFilesRet struct {
+ Dom Domain
+}
+
+// DomainLookupByIDArgs is libvirt's remote_domain_lookup_by_id_args
+type DomainLookupByIDArgs struct {
+ ID int32
+}
+
+// DomainLookupByIDRet is libvirt's remote_domain_lookup_by_id_ret
+type DomainLookupByIDRet struct {
+ Dom Domain
+}
+
+// DomainLookupByUUIDArgs is libvirt's remote_domain_lookup_by_uuid_args
+type DomainLookupByUUIDArgs struct {
+ UUID UUID
+}
+
+// DomainLookupByUUIDRet is libvirt's remote_domain_lookup_by_uuid_ret
+type DomainLookupByUUIDRet struct {
+ Dom Domain
+}
+
+// DomainLookupByNameArgs is libvirt's remote_domain_lookup_by_name_args
+type DomainLookupByNameArgs struct {
+ Name string
+}
+
+// DomainLookupByNameRet is libvirt's remote_domain_lookup_by_name_ret
+type DomainLookupByNameRet struct {
+ Dom Domain
+}
+
+// DomainSuspendArgs is libvirt's remote_domain_suspend_args
+type DomainSuspendArgs struct {
+ Dom Domain
+}
+
+// DomainResumeArgs is libvirt's remote_domain_resume_args
+type DomainResumeArgs struct {
+ Dom Domain
+}
+
+// DomainPmSuspendForDurationArgs is libvirt's remote_domain_pm_suspend_for_duration_args
+type DomainPmSuspendForDurationArgs struct {
+ Dom Domain
+ Target uint32
+ Duration uint64
+ Flags uint32
+}
+
+// DomainPmWakeupArgs is libvirt's remote_domain_pm_wakeup_args
+type DomainPmWakeupArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainShutdownArgs is libvirt's remote_domain_shutdown_args
+type DomainShutdownArgs struct {
+ Dom Domain
+}
+
+// DomainRebootArgs is libvirt's remote_domain_reboot_args
+type DomainRebootArgs struct {
+ Dom Domain
+ Flags DomainRebootFlagValues
+}
+
+// DomainResetArgs is libvirt's remote_domain_reset_args
+type DomainResetArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainDestroyArgs is libvirt's remote_domain_destroy_args
+type DomainDestroyArgs struct {
+ Dom Domain
+}
+
+// DomainDestroyFlagsArgs is libvirt's remote_domain_destroy_flags_args
+type DomainDestroyFlagsArgs struct {
+ Dom Domain
+ Flags DomainDestroyFlagsValues
+}
+
+// DomainGetOsTypeArgs is libvirt's remote_domain_get_os_type_args
+type DomainGetOsTypeArgs struct {
+ Dom Domain
+}
+
+// DomainGetOsTypeRet is libvirt's remote_domain_get_os_type_ret
+type DomainGetOsTypeRet struct {
+ Type string
+}
+
+// DomainGetMaxMemoryArgs is libvirt's remote_domain_get_max_memory_args
+type DomainGetMaxMemoryArgs struct {
+ Dom Domain
+}
+
+// DomainGetMaxMemoryRet is libvirt's remote_domain_get_max_memory_ret
+type DomainGetMaxMemoryRet struct {
+ Memory uint64
+}
+
+// DomainSetMaxMemoryArgs is libvirt's remote_domain_set_max_memory_args
+type DomainSetMaxMemoryArgs struct {
+ Dom Domain
+ Memory uint64
+}
+
+// DomainSetMemoryArgs is libvirt's remote_domain_set_memory_args
+type DomainSetMemoryArgs struct {
+ Dom Domain
+ Memory uint64
+}
+
+// DomainSetMemoryFlagsArgs is libvirt's remote_domain_set_memory_flags_args
+type DomainSetMemoryFlagsArgs struct {
+ Dom Domain
+ Memory uint64
+ Flags uint32
+}
+
+// DomainSetMemoryStatsPeriodArgs is libvirt's remote_domain_set_memory_stats_period_args
+type DomainSetMemoryStatsPeriodArgs struct {
+ Dom Domain
+ Period int32
+ Flags DomainMemoryModFlags
+}
+
+// DomainGetInfoArgs is libvirt's remote_domain_get_info_args
+type DomainGetInfoArgs struct {
+ Dom Domain
+}
+
+// DomainGetInfoRet is libvirt's remote_domain_get_info_ret
+type DomainGetInfoRet struct {
+ State uint8
+ MaxMem uint64
+ Memory uint64
+ NrVirtCPU uint16
+ CPUTime uint64
+}
+
+// DomainSaveArgs is libvirt's remote_domain_save_args
+type DomainSaveArgs struct {
+ Dom Domain
+ To string
+}
+
+// DomainSaveFlagsArgs is libvirt's remote_domain_save_flags_args
+type DomainSaveFlagsArgs struct {
+ Dom Domain
+ To string
+ Dxml OptString
+ Flags uint32
+}
+
+// DomainRestoreArgs is libvirt's remote_domain_restore_args
+type DomainRestoreArgs struct {
+ From string
+}
+
+// DomainRestoreFlagsArgs is libvirt's remote_domain_restore_flags_args
+type DomainRestoreFlagsArgs struct {
+ From string
+ Dxml OptString
+ Flags uint32
+}
+
+// DomainSaveImageGetXMLDescArgs is libvirt's remote_domain_save_image_get_xml_desc_args
+type DomainSaveImageGetXMLDescArgs struct {
+ File string
+ Flags uint32
+}
+
+// DomainSaveImageGetXMLDescRet is libvirt's remote_domain_save_image_get_xml_desc_ret
+type DomainSaveImageGetXMLDescRet struct {
+ XML string
+}
+
+// DomainSaveImageDefineXMLArgs is libvirt's remote_domain_save_image_define_xml_args
+type DomainSaveImageDefineXMLArgs struct {
+ File string
+ Dxml string
+ Flags uint32
+}
+
+// DomainCoreDumpArgs is libvirt's remote_domain_core_dump_args
+type DomainCoreDumpArgs struct {
+ Dom Domain
+ To string
+ Flags DomainCoreDumpFlags
+}
+
+// DomainCoreDumpWithFormatArgs is libvirt's remote_domain_core_dump_with_format_args
+type DomainCoreDumpWithFormatArgs struct {
+ Dom Domain
+ To string
+ Dumpformat uint32
+ Flags DomainCoreDumpFlags
+}
+
+// DomainScreenshotArgs is libvirt's remote_domain_screenshot_args
+type DomainScreenshotArgs struct {
+ Dom Domain
+ Screen uint32
+ Flags uint32
+}
+
+// DomainScreenshotRet is libvirt's remote_domain_screenshot_ret
+type DomainScreenshotRet struct {
+ Mime OptString
+}
+
+// DomainGetXMLDescArgs is libvirt's remote_domain_get_xml_desc_args
+type DomainGetXMLDescArgs struct {
+ Dom Domain
+ Flags DomainXMLFlags
+}
+
+// DomainGetXMLDescRet is libvirt's remote_domain_get_xml_desc_ret
+type DomainGetXMLDescRet struct {
+ XML string
+}
+
+// DomainMigratePrepareArgs is libvirt's remote_domain_migrate_prepare_args
+type DomainMigratePrepareArgs struct {
+ UriIn OptString
+ Flags uint64
+ Dname OptString
+ Resource uint64
+}
+
+// DomainMigratePrepareRet is libvirt's remote_domain_migrate_prepare_ret
+type DomainMigratePrepareRet struct {
+ Cookie []byte
+ UriOut OptString
+}
+
+// DomainMigratePerformArgs is libvirt's remote_domain_migrate_perform_args
+type DomainMigratePerformArgs struct {
+ Dom Domain
+ Cookie []byte
+ Uri string
+ Flags uint64
+ Dname OptString
+ Resource uint64
+}
+
+// DomainMigrateFinishArgs is libvirt's remote_domain_migrate_finish_args
+type DomainMigrateFinishArgs struct {
+ Dname string
+ Cookie []byte
+ Uri string
+ Flags uint64
+}
+
+// DomainMigrateFinishRet is libvirt's remote_domain_migrate_finish_ret
+type DomainMigrateFinishRet struct {
+ Ddom Domain
+}
+
+// DomainMigratePrepare2Args is libvirt's remote_domain_migrate_prepare2_args
+type DomainMigratePrepare2Args struct {
+ UriIn OptString
+ Flags uint64
+ Dname OptString
+ Resource uint64
+ DomXML string
+}
+
+// DomainMigratePrepare2Ret is libvirt's remote_domain_migrate_prepare2_ret
+type DomainMigratePrepare2Ret struct {
+ Cookie []byte
+ UriOut OptString
+}
+
+// DomainMigrateFinish2Args is libvirt's remote_domain_migrate_finish2_args
+type DomainMigrateFinish2Args struct {
+ Dname string
+ Cookie []byte
+ Uri string
+ Flags uint64
+ Retcode int32
+}
+
+// DomainMigrateFinish2Ret is libvirt's remote_domain_migrate_finish2_ret
+type DomainMigrateFinish2Ret struct {
+ Ddom Domain
+}
+
+// ConnectListDefinedDomainsArgs is libvirt's remote_connect_list_defined_domains_args
+type ConnectListDefinedDomainsArgs struct {
+ Maxnames int32
+}
+
+// ConnectListDefinedDomainsRet is libvirt's remote_connect_list_defined_domains_ret
+type ConnectListDefinedDomainsRet struct {
+ Names []string
+}
+
+// ConnectNumOfDefinedDomainsRet is libvirt's remote_connect_num_of_defined_domains_ret
+type ConnectNumOfDefinedDomainsRet struct {
+ Num int32
+}
+
+// DomainCreateArgs is libvirt's remote_domain_create_args
+type DomainCreateArgs struct {
+ Dom Domain
+}
+
+// DomainCreateWithFlagsArgs is libvirt's remote_domain_create_with_flags_args
+type DomainCreateWithFlagsArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainCreateWithFlagsRet is libvirt's remote_domain_create_with_flags_ret
+type DomainCreateWithFlagsRet struct {
+ Dom Domain
+}
+
+// DomainCreateWithFilesArgs is libvirt's remote_domain_create_with_files_args
+type DomainCreateWithFilesArgs struct {
+ Dom Domain
+ Flags DomainCreateFlags
+}
+
+// DomainCreateWithFilesRet is libvirt's remote_domain_create_with_files_ret
+type DomainCreateWithFilesRet struct {
+ Dom Domain
+}
+
+// DomainDefineXMLArgs is libvirt's remote_domain_define_xml_args
+type DomainDefineXMLArgs struct {
+ XML string
+}
+
+// DomainDefineXMLRet is libvirt's remote_domain_define_xml_ret
+type DomainDefineXMLRet struct {
+ Dom Domain
+}
+
+// DomainDefineXMLFlagsArgs is libvirt's remote_domain_define_xml_flags_args
+type DomainDefineXMLFlagsArgs struct {
+ XML string
+ Flags DomainDefineFlags
+}
+
+// DomainDefineXMLFlagsRet is libvirt's remote_domain_define_xml_flags_ret
+type DomainDefineXMLFlagsRet struct {
+ Dom Domain
+}
+
+// DomainUndefineArgs is libvirt's remote_domain_undefine_args
+type DomainUndefineArgs struct {
+ Dom Domain
+}
+
+// DomainUndefineFlagsArgs is libvirt's remote_domain_undefine_flags_args
+type DomainUndefineFlagsArgs struct {
+ Dom Domain
+ Flags DomainUndefineFlagsValues
+}
+
+// DomainInjectNmiArgs is libvirt's remote_domain_inject_nmi_args
+type DomainInjectNmiArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainSendKeyArgs is libvirt's remote_domain_send_key_args
+type DomainSendKeyArgs struct {
+ Dom Domain
+ Codeset uint32
+ Holdtime uint32
+ Keycodes []uint32
+ Flags uint32
+}
+
+// DomainSendProcessSignalArgs is libvirt's remote_domain_send_process_signal_args
+type DomainSendProcessSignalArgs struct {
+ Dom Domain
+ PidValue int64
+ Signum uint32
+ Flags uint32
+}
+
+// DomainSetVcpusArgs is libvirt's remote_domain_set_vcpus_args
+type DomainSetVcpusArgs struct {
+ Dom Domain
+ Nvcpus uint32
+}
+
+// DomainSetVcpusFlagsArgs is libvirt's remote_domain_set_vcpus_flags_args
+type DomainSetVcpusFlagsArgs struct {
+ Dom Domain
+ Nvcpus uint32
+ Flags uint32
+}
+
+// DomainGetVcpusFlagsArgs is libvirt's remote_domain_get_vcpus_flags_args
+type DomainGetVcpusFlagsArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainGetVcpusFlagsRet is libvirt's remote_domain_get_vcpus_flags_ret
+type DomainGetVcpusFlagsRet struct {
+ Num int32
+}
+
+// DomainPinVcpuArgs is libvirt's remote_domain_pin_vcpu_args
+type DomainPinVcpuArgs struct {
+ Dom Domain
+ Vcpu uint32
+ Cpumap []byte
+}
+
+// DomainPinVcpuFlagsArgs is libvirt's remote_domain_pin_vcpu_flags_args
+type DomainPinVcpuFlagsArgs struct {
+ Dom Domain
+ Vcpu uint32
+ Cpumap []byte
+ Flags uint32
+}
+
+// DomainGetVcpuPinInfoArgs is libvirt's remote_domain_get_vcpu_pin_info_args
+type DomainGetVcpuPinInfoArgs struct {
+ Dom Domain
+ Ncpumaps int32
+ Maplen int32
+ Flags uint32
+}
+
+// DomainGetVcpuPinInfoRet is libvirt's remote_domain_get_vcpu_pin_info_ret
+type DomainGetVcpuPinInfoRet struct {
+ Cpumaps []byte
+ Num int32
+}
+
+// DomainPinEmulatorArgs is libvirt's remote_domain_pin_emulator_args
+type DomainPinEmulatorArgs struct {
+ Dom Domain
+ Cpumap []byte
+ Flags DomainModificationImpact
+}
+
+// DomainGetEmulatorPinInfoArgs is libvirt's remote_domain_get_emulator_pin_info_args
+type DomainGetEmulatorPinInfoArgs struct {
+ Dom Domain
+ Maplen int32
+ Flags DomainModificationImpact
+}
+
+// DomainGetEmulatorPinInfoRet is libvirt's remote_domain_get_emulator_pin_info_ret
+type DomainGetEmulatorPinInfoRet struct {
+ Cpumaps []byte
+ Ret int32
+}
+
+// DomainGetVcpusArgs is libvirt's remote_domain_get_vcpus_args
+type DomainGetVcpusArgs struct {
+ Dom Domain
+ Maxinfo int32
+ Maplen int32
+}
+
+// DomainGetVcpusRet is libvirt's remote_domain_get_vcpus_ret
+type DomainGetVcpusRet struct {
+ Info []VcpuInfo
+ Cpumaps []byte
+}
+
+// DomainGetMaxVcpusArgs is libvirt's remote_domain_get_max_vcpus_args
+type DomainGetMaxVcpusArgs struct {
+ Dom Domain
+}
+
+// DomainGetMaxVcpusRet is libvirt's remote_domain_get_max_vcpus_ret
+type DomainGetMaxVcpusRet struct {
+ Num int32
+}
+
+// DomainIothreadInfo is libvirt's remote_domain_iothread_info
+type DomainIothreadInfo struct {
+ IothreadID uint32
+ Cpumap []byte
+}
+
+// DomainGetIothreadInfoArgs is libvirt's remote_domain_get_iothread_info_args
+type DomainGetIothreadInfoArgs struct {
+ Dom Domain
+ Flags DomainModificationImpact
+}
+
+// DomainGetIothreadInfoRet is libvirt's remote_domain_get_iothread_info_ret
+type DomainGetIothreadInfoRet struct {
+ Info []DomainIothreadInfo
+ Ret uint32
+}
+
+// DomainPinIothreadArgs is libvirt's remote_domain_pin_iothread_args
+type DomainPinIothreadArgs struct {
+ Dom Domain
+ IothreadsID uint32
+ Cpumap []byte
+ Flags DomainModificationImpact
+}
+
+// DomainAddIothreadArgs is libvirt's remote_domain_add_iothread_args
+type DomainAddIothreadArgs struct {
+ Dom Domain
+ IothreadID uint32
+ Flags DomainModificationImpact
+}
+
+// DomainDelIothreadArgs is libvirt's remote_domain_del_iothread_args
+type DomainDelIothreadArgs struct {
+ Dom Domain
+ IothreadID uint32
+ Flags DomainModificationImpact
+}
+
+// DomainSetIothreadParamsArgs is libvirt's remote_domain_set_iothread_params_args
+type DomainSetIothreadParamsArgs struct {
+ Dom Domain
+ IothreadID uint32
+ Params []TypedParam
+ Flags uint32
+}
+
+// DomainGetSecurityLabelArgs is libvirt's remote_domain_get_security_label_args
+type DomainGetSecurityLabelArgs struct {
+ Dom Domain
+}
+
+// DomainGetSecurityLabelRet is libvirt's remote_domain_get_security_label_ret
+type DomainGetSecurityLabelRet struct {
+ Label []int8
+ Enforcing int32
+}
+
+// DomainGetSecurityLabelListArgs is libvirt's remote_domain_get_security_label_list_args
+type DomainGetSecurityLabelListArgs struct {
+ Dom Domain
+}
+
+// DomainGetSecurityLabelListRet is libvirt's remote_domain_get_security_label_list_ret
+type DomainGetSecurityLabelListRet struct {
+ Labels []DomainGetSecurityLabelRet
+ Ret int32
+}
+
+// NodeGetSecurityModelRet is libvirt's remote_node_get_security_model_ret
+type NodeGetSecurityModelRet struct {
+ Model []int8
+ Doi []int8
+}
+
+// DomainAttachDeviceArgs is libvirt's remote_domain_attach_device_args
+type DomainAttachDeviceArgs struct {
+ Dom Domain
+ XML string
+}
+
+// DomainAttachDeviceFlagsArgs is libvirt's remote_domain_attach_device_flags_args
+type DomainAttachDeviceFlagsArgs struct {
+ Dom Domain
+ XML string
+ Flags uint32
+}
+
+// DomainDetachDeviceArgs is libvirt's remote_domain_detach_device_args
+type DomainDetachDeviceArgs struct {
+ Dom Domain
+ XML string
+}
+
+// DomainDetachDeviceFlagsArgs is libvirt's remote_domain_detach_device_flags_args
+type DomainDetachDeviceFlagsArgs struct {
+ Dom Domain
+ XML string
+ Flags uint32
+}
+
+// DomainUpdateDeviceFlagsArgs is libvirt's remote_domain_update_device_flags_args
+type DomainUpdateDeviceFlagsArgs struct {
+ Dom Domain
+ XML string
+ Flags DomainDeviceModifyFlags
+}
+
+// DomainDetachDeviceAliasArgs is libvirt's remote_domain_detach_device_alias_args
+type DomainDetachDeviceAliasArgs struct {
+ Dom Domain
+ Alias string
+ Flags uint32
+}
+
+// DomainGetAutostartArgs is libvirt's remote_domain_get_autostart_args
+type DomainGetAutostartArgs struct {
+ Dom Domain
+}
+
+// DomainGetAutostartRet is libvirt's remote_domain_get_autostart_ret
+type DomainGetAutostartRet struct {
+ Autostart int32
+}
+
+// DomainSetAutostartArgs is libvirt's remote_domain_set_autostart_args
+type DomainSetAutostartArgs struct {
+ Dom Domain
+ Autostart int32
+}
+
+// DomainSetMetadataArgs is libvirt's remote_domain_set_metadata_args
+type DomainSetMetadataArgs struct {
+ Dom Domain
+ Type int32
+ Metadata OptString
+ Key OptString
+ Uri OptString
+ Flags DomainModificationImpact
+}
+
+// DomainGetMetadataArgs is libvirt's remote_domain_get_metadata_args
+type DomainGetMetadataArgs struct {
+ Dom Domain
+ Type int32
+ Uri OptString
+ Flags DomainModificationImpact
+}
+
+// DomainGetMetadataRet is libvirt's remote_domain_get_metadata_ret
+type DomainGetMetadataRet struct {
+ Metadata string
+}
+
+// DomainBlockJobAbortArgs is libvirt's remote_domain_block_job_abort_args
+type DomainBlockJobAbortArgs struct {
+ Dom Domain
+ Path string
+ Flags DomainBlockJobAbortFlags
+}
+
+// DomainGetBlockJobInfoArgs is libvirt's remote_domain_get_block_job_info_args
+type DomainGetBlockJobInfoArgs struct {
+ Dom Domain
+ Path string
+ Flags uint32
+}
+
+// DomainGetBlockJobInfoRet is libvirt's remote_domain_get_block_job_info_ret
+type DomainGetBlockJobInfoRet struct {
+ Found int32
+ Type int32
+ Bandwidth uint64
+ Cur uint64
+ End uint64
+}
+
+// DomainBlockJobSetSpeedArgs is libvirt's remote_domain_block_job_set_speed_args
+type DomainBlockJobSetSpeedArgs struct {
+ Dom Domain
+ Path string
+ Bandwidth uint64
+ Flags DomainBlockJobSetSpeedFlags
+}
+
+// DomainBlockPullArgs is libvirt's remote_domain_block_pull_args
+type DomainBlockPullArgs struct {
+ Dom Domain
+ Path string
+ Bandwidth uint64
+ Flags DomainBlockPullFlags
+}
+
+// DomainBlockRebaseArgs is libvirt's remote_domain_block_rebase_args
+type DomainBlockRebaseArgs struct {
+ Dom Domain
+ Path string
+ Base OptString
+ Bandwidth uint64
+ Flags DomainBlockRebaseFlags
+}
+
+// DomainBlockCopyArgs is libvirt's remote_domain_block_copy_args
+type DomainBlockCopyArgs struct {
+ Dom Domain
+ Path string
+ Destxml string
+ Params []TypedParam
+ Flags DomainBlockCopyFlags
+}
+
+// DomainBlockCommitArgs is libvirt's remote_domain_block_commit_args
+type DomainBlockCommitArgs struct {
+ Dom Domain
+ Disk string
+ Base OptString
+ Top OptString
+ Bandwidth uint64
+ Flags DomainBlockCommitFlags
+}
+
+// DomainSetBlockIOTuneArgs is libvirt's remote_domain_set_block_io_tune_args
+type DomainSetBlockIOTuneArgs struct {
+ Dom Domain
+ Disk string
+ Params []TypedParam
+ Flags uint32
+}
+
+// DomainGetBlockIOTuneArgs is libvirt's remote_domain_get_block_io_tune_args
+type DomainGetBlockIOTuneArgs struct {
+ Dom Domain
+ Disk OptString
+ Nparams int32
+ Flags uint32
+}
+
+// DomainGetBlockIOTuneRet is libvirt's remote_domain_get_block_io_tune_ret
+type DomainGetBlockIOTuneRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// DomainGetCPUStatsArgs is libvirt's remote_domain_get_cpu_stats_args
+type DomainGetCPUStatsArgs struct {
+ Dom Domain
+ Nparams uint32
+ StartCPU int32
+ Ncpus uint32
+ Flags TypedParameterFlags
+}
+
+// DomainGetCPUStatsRet is libvirt's remote_domain_get_cpu_stats_ret
+type DomainGetCPUStatsRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// DomainGetHostnameArgs is libvirt's remote_domain_get_hostname_args
+type DomainGetHostnameArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainGetHostnameRet is libvirt's remote_domain_get_hostname_ret
+type DomainGetHostnameRet struct {
+ Hostname string
+}
+
+// ConnectNumOfNetworksRet is libvirt's remote_connect_num_of_networks_ret
+type ConnectNumOfNetworksRet struct {
+ Num int32
+}
+
+// ConnectListNetworksArgs is libvirt's remote_connect_list_networks_args
+type ConnectListNetworksArgs struct {
+ Maxnames int32
+}
+
+// ConnectListNetworksRet is libvirt's remote_connect_list_networks_ret
+type ConnectListNetworksRet struct {
+ Names []string
+}
+
+// ConnectNumOfDefinedNetworksRet is libvirt's remote_connect_num_of_defined_networks_ret
+type ConnectNumOfDefinedNetworksRet struct {
+ Num int32
+}
+
+// ConnectListDefinedNetworksArgs is libvirt's remote_connect_list_defined_networks_args
+type ConnectListDefinedNetworksArgs struct {
+ Maxnames int32
+}
+
+// ConnectListDefinedNetworksRet is libvirt's remote_connect_list_defined_networks_ret
+type ConnectListDefinedNetworksRet struct {
+ Names []string
+}
+
+// NetworkLookupByUUIDArgs is libvirt's remote_network_lookup_by_uuid_args
+type NetworkLookupByUUIDArgs struct {
+ UUID UUID
+}
+
+// NetworkLookupByUUIDRet is libvirt's remote_network_lookup_by_uuid_ret
+type NetworkLookupByUUIDRet struct {
+ Net Network
+}
+
+// NetworkLookupByNameArgs is libvirt's remote_network_lookup_by_name_args
+type NetworkLookupByNameArgs struct {
+ Name string
+}
+
+// NetworkLookupByNameRet is libvirt's remote_network_lookup_by_name_ret
+type NetworkLookupByNameRet struct {
+ Net Network
+}
+
+// NetworkCreateXMLArgs is libvirt's remote_network_create_xml_args
+type NetworkCreateXMLArgs struct {
+ XML string
+}
+
+// NetworkCreateXMLRet is libvirt's remote_network_create_xml_ret
+type NetworkCreateXMLRet struct {
+ Net Network
+}
+
+// NetworkDefineXMLArgs is libvirt's remote_network_define_xml_args
+type NetworkDefineXMLArgs struct {
+ XML string
+}
+
+// NetworkDefineXMLRet is libvirt's remote_network_define_xml_ret
+type NetworkDefineXMLRet struct {
+ Net Network
+}
+
+// NetworkUndefineArgs is libvirt's remote_network_undefine_args
+type NetworkUndefineArgs struct {
+ Net Network
+}
+
+// NetworkUpdateArgs is libvirt's remote_network_update_args
+type NetworkUpdateArgs struct {
+ Net Network
+ Command uint32
+ Section uint32
+ ParentIndex int32
+ XML string
+ Flags NetworkUpdateFlags
+}
+
+// NetworkCreateArgs is libvirt's remote_network_create_args
+type NetworkCreateArgs struct {
+ Net Network
+}
+
+// NetworkDestroyArgs is libvirt's remote_network_destroy_args
+type NetworkDestroyArgs struct {
+ Net Network
+}
+
+// NetworkGetXMLDescArgs is libvirt's remote_network_get_xml_desc_args
+type NetworkGetXMLDescArgs struct {
+ Net Network
+ Flags uint32
+}
+
+// NetworkGetXMLDescRet is libvirt's remote_network_get_xml_desc_ret
+type NetworkGetXMLDescRet struct {
+ XML string
+}
+
+// NetworkGetBridgeNameArgs is libvirt's remote_network_get_bridge_name_args
+type NetworkGetBridgeNameArgs struct {
+ Net Network
+}
+
+// NetworkGetBridgeNameRet is libvirt's remote_network_get_bridge_name_ret
+type NetworkGetBridgeNameRet struct {
+ Name string
+}
+
+// NetworkGetAutostartArgs is libvirt's remote_network_get_autostart_args
+type NetworkGetAutostartArgs struct {
+ Net Network
+}
+
+// NetworkGetAutostartRet is libvirt's remote_network_get_autostart_ret
+type NetworkGetAutostartRet struct {
+ Autostart int32
+}
+
+// NetworkSetAutostartArgs is libvirt's remote_network_set_autostart_args
+type NetworkSetAutostartArgs struct {
+ Net Network
+ Autostart int32
+}
+
+// ConnectNumOfNwfiltersRet is libvirt's remote_connect_num_of_nwfilters_ret
+type ConnectNumOfNwfiltersRet struct {
+ Num int32
+}
+
+// ConnectListNwfiltersArgs is libvirt's remote_connect_list_nwfilters_args
+type ConnectListNwfiltersArgs struct {
+ Maxnames int32
+}
+
+// ConnectListNwfiltersRet is libvirt's remote_connect_list_nwfilters_ret
+type ConnectListNwfiltersRet struct {
+ Names []string
+}
+
+// NwfilterLookupByUUIDArgs is libvirt's remote_nwfilter_lookup_by_uuid_args
+type NwfilterLookupByUUIDArgs struct {
+ UUID UUID
+}
+
+// NwfilterLookupByUUIDRet is libvirt's remote_nwfilter_lookup_by_uuid_ret
+type NwfilterLookupByUUIDRet struct {
+ OptNwfilter Nwfilter
+}
+
+// NwfilterLookupByNameArgs is libvirt's remote_nwfilter_lookup_by_name_args
+type NwfilterLookupByNameArgs struct {
+ Name string
+}
+
+// NwfilterLookupByNameRet is libvirt's remote_nwfilter_lookup_by_name_ret
+type NwfilterLookupByNameRet struct {
+ OptNwfilter Nwfilter
+}
+
+// NwfilterDefineXMLArgs is libvirt's remote_nwfilter_define_xml_args
+type NwfilterDefineXMLArgs struct {
+ XML string
+}
+
+// NwfilterDefineXMLRet is libvirt's remote_nwfilter_define_xml_ret
+type NwfilterDefineXMLRet struct {
+ OptNwfilter Nwfilter
+}
+
+// NwfilterUndefineArgs is libvirt's remote_nwfilter_undefine_args
+type NwfilterUndefineArgs struct {
+ OptNwfilter Nwfilter
+}
+
+// NwfilterGetXMLDescArgs is libvirt's remote_nwfilter_get_xml_desc_args
+type NwfilterGetXMLDescArgs struct {
+ OptNwfilter Nwfilter
+ Flags uint32
+}
+
+// NwfilterGetXMLDescRet is libvirt's remote_nwfilter_get_xml_desc_ret
+type NwfilterGetXMLDescRet struct {
+ XML string
+}
+
+// ConnectNumOfInterfacesRet is libvirt's remote_connect_num_of_interfaces_ret
+type ConnectNumOfInterfacesRet struct {
+ Num int32
+}
+
+// ConnectListInterfacesArgs is libvirt's remote_connect_list_interfaces_args
+type ConnectListInterfacesArgs struct {
+ Maxnames int32
+}
+
+// ConnectListInterfacesRet is libvirt's remote_connect_list_interfaces_ret
+type ConnectListInterfacesRet struct {
+ Names []string
+}
+
+// ConnectNumOfDefinedInterfacesRet is libvirt's remote_connect_num_of_defined_interfaces_ret
+type ConnectNumOfDefinedInterfacesRet struct {
+ Num int32
+}
+
+// ConnectListDefinedInterfacesArgs is libvirt's remote_connect_list_defined_interfaces_args
+type ConnectListDefinedInterfacesArgs struct {
+ Maxnames int32
+}
+
+// ConnectListDefinedInterfacesRet is libvirt's remote_connect_list_defined_interfaces_ret
+type ConnectListDefinedInterfacesRet struct {
+ Names []string
+}
+
+// InterfaceLookupByNameArgs is libvirt's remote_interface_lookup_by_name_args
+type InterfaceLookupByNameArgs struct {
+ Name string
+}
+
+// InterfaceLookupByNameRet is libvirt's remote_interface_lookup_by_name_ret
+type InterfaceLookupByNameRet struct {
+ Iface Interface
+}
+
+// InterfaceLookupByMacStringArgs is libvirt's remote_interface_lookup_by_mac_string_args
+type InterfaceLookupByMacStringArgs struct {
+ Mac string
+}
+
+// InterfaceLookupByMacStringRet is libvirt's remote_interface_lookup_by_mac_string_ret
+type InterfaceLookupByMacStringRet struct {
+ Iface Interface
+}
+
+// InterfaceGetXMLDescArgs is libvirt's remote_interface_get_xml_desc_args
+type InterfaceGetXMLDescArgs struct {
+ Iface Interface
+ Flags uint32
+}
+
+// InterfaceGetXMLDescRet is libvirt's remote_interface_get_xml_desc_ret
+type InterfaceGetXMLDescRet struct {
+ XML string
+}
+
+// InterfaceDefineXMLArgs is libvirt's remote_interface_define_xml_args
+type InterfaceDefineXMLArgs struct {
+ XML string
+ Flags uint32
+}
+
+// InterfaceDefineXMLRet is libvirt's remote_interface_define_xml_ret
+type InterfaceDefineXMLRet struct {
+ Iface Interface
+}
+
+// InterfaceUndefineArgs is libvirt's remote_interface_undefine_args
+type InterfaceUndefineArgs struct {
+ Iface Interface
+}
+
+// InterfaceCreateArgs is libvirt's remote_interface_create_args
+type InterfaceCreateArgs struct {
+ Iface Interface
+ Flags uint32
+}
+
+// InterfaceDestroyArgs is libvirt's remote_interface_destroy_args
+type InterfaceDestroyArgs struct {
+ Iface Interface
+ Flags uint32
+}
+
+// InterfaceChangeBeginArgs is libvirt's remote_interface_change_begin_args
+type InterfaceChangeBeginArgs struct {
+ Flags uint32
+}
+
+// InterfaceChangeCommitArgs is libvirt's remote_interface_change_commit_args
+type InterfaceChangeCommitArgs struct {
+ Flags uint32
+}
+
+// InterfaceChangeRollbackArgs is libvirt's remote_interface_change_rollback_args
+type InterfaceChangeRollbackArgs struct {
+ Flags uint32
+}
+
+// AuthListRet is libvirt's remote_auth_list_ret
+type AuthListRet struct {
+ Types []AuthType
+}
+
+// AuthSaslInitRet is libvirt's remote_auth_sasl_init_ret
+type AuthSaslInitRet struct {
+ Mechlist string
+}
+
+// AuthSaslStartArgs is libvirt's remote_auth_sasl_start_args
+type AuthSaslStartArgs struct {
+ Mech string
+ Nil int32
+ Data []int8
+}
+
+// AuthSaslStartRet is libvirt's remote_auth_sasl_start_ret
+type AuthSaslStartRet struct {
+ Complete int32
+ Nil int32
+ Data []int8
+}
+
+// AuthSaslStepArgs is libvirt's remote_auth_sasl_step_args
+type AuthSaslStepArgs struct {
+ Nil int32
+ Data []int8
+}
+
+// AuthSaslStepRet is libvirt's remote_auth_sasl_step_ret
+type AuthSaslStepRet struct {
+ Complete int32
+ Nil int32
+ Data []int8
+}
+
+// AuthPolkitRet is libvirt's remote_auth_polkit_ret
+type AuthPolkitRet struct {
+ Complete int32
+}
+
+// ConnectNumOfStoragePoolsRet is libvirt's remote_connect_num_of_storage_pools_ret
+type ConnectNumOfStoragePoolsRet struct {
+ Num int32
+}
+
+// ConnectListStoragePoolsArgs is libvirt's remote_connect_list_storage_pools_args
+type ConnectListStoragePoolsArgs struct {
+ Maxnames int32
+}
+
+// ConnectListStoragePoolsRet is libvirt's remote_connect_list_storage_pools_ret
+type ConnectListStoragePoolsRet struct {
+ Names []string
+}
+
+// ConnectNumOfDefinedStoragePoolsRet is libvirt's remote_connect_num_of_defined_storage_pools_ret
+type ConnectNumOfDefinedStoragePoolsRet struct {
+ Num int32
+}
+
+// ConnectListDefinedStoragePoolsArgs is libvirt's remote_connect_list_defined_storage_pools_args
+type ConnectListDefinedStoragePoolsArgs struct {
+ Maxnames int32
+}
+
+// ConnectListDefinedStoragePoolsRet is libvirt's remote_connect_list_defined_storage_pools_ret
+type ConnectListDefinedStoragePoolsRet struct {
+ Names []string
+}
+
+// ConnectFindStoragePoolSourcesArgs is libvirt's remote_connect_find_storage_pool_sources_args
+type ConnectFindStoragePoolSourcesArgs struct {
+ Type string
+ SrcSpec OptString
+ Flags uint32
+}
+
+// ConnectFindStoragePoolSourcesRet is libvirt's remote_connect_find_storage_pool_sources_ret
+type ConnectFindStoragePoolSourcesRet struct {
+ XML string
+}
+
+// StoragePoolLookupByUUIDArgs is libvirt's remote_storage_pool_lookup_by_uuid_args
+type StoragePoolLookupByUUIDArgs struct {
+ UUID UUID
+}
+
+// StoragePoolLookupByUUIDRet is libvirt's remote_storage_pool_lookup_by_uuid_ret
+type StoragePoolLookupByUUIDRet struct {
+ Pool StoragePool
+}
+
+// StoragePoolLookupByNameArgs is libvirt's remote_storage_pool_lookup_by_name_args
+type StoragePoolLookupByNameArgs struct {
+ Name string
+}
+
+// StoragePoolLookupByNameRet is libvirt's remote_storage_pool_lookup_by_name_ret
+type StoragePoolLookupByNameRet struct {
+ Pool StoragePool
+}
+
+// StoragePoolLookupByVolumeArgs is libvirt's remote_storage_pool_lookup_by_volume_args
+type StoragePoolLookupByVolumeArgs struct {
+ Vol StorageVol
+}
+
+// StoragePoolLookupByVolumeRet is libvirt's remote_storage_pool_lookup_by_volume_ret
+type StoragePoolLookupByVolumeRet struct {
+ Pool StoragePool
+}
+
+// StoragePoolLookupByTargetPathArgs is libvirt's remote_storage_pool_lookup_by_target_path_args
+type StoragePoolLookupByTargetPathArgs struct {
+ Path string
+}
+
+// StoragePoolLookupByTargetPathRet is libvirt's remote_storage_pool_lookup_by_target_path_ret
+type StoragePoolLookupByTargetPathRet struct {
+ Pool StoragePool
+}
+
+// StoragePoolCreateXMLArgs is libvirt's remote_storage_pool_create_xml_args
+type StoragePoolCreateXMLArgs struct {
+ XML string
+ Flags StoragePoolCreateFlags
+}
+
+// StoragePoolCreateXMLRet is libvirt's remote_storage_pool_create_xml_ret
+type StoragePoolCreateXMLRet struct {
+ Pool StoragePool
+}
+
+// StoragePoolDefineXMLArgs is libvirt's remote_storage_pool_define_xml_args
+type StoragePoolDefineXMLArgs struct {
+ XML string
+ Flags uint32
+}
+
+// StoragePoolDefineXMLRet is libvirt's remote_storage_pool_define_xml_ret
+type StoragePoolDefineXMLRet struct {
+ Pool StoragePool
+}
+
+// StoragePoolBuildArgs is libvirt's remote_storage_pool_build_args
+type StoragePoolBuildArgs struct {
+ Pool StoragePool
+ Flags StoragePoolBuildFlags
+}
+
+// StoragePoolUndefineArgs is libvirt's remote_storage_pool_undefine_args
+type StoragePoolUndefineArgs struct {
+ Pool StoragePool
+}
+
+// StoragePoolCreateArgs is libvirt's remote_storage_pool_create_args
+type StoragePoolCreateArgs struct {
+ Pool StoragePool
+ Flags StoragePoolCreateFlags
+}
+
+// StoragePoolDestroyArgs is libvirt's remote_storage_pool_destroy_args
+type StoragePoolDestroyArgs struct {
+ Pool StoragePool
+}
+
+// StoragePoolDeleteArgs is libvirt's remote_storage_pool_delete_args
+type StoragePoolDeleteArgs struct {
+ Pool StoragePool
+ Flags StoragePoolDeleteFlags
+}
+
+// StoragePoolRefreshArgs is libvirt's remote_storage_pool_refresh_args
+type StoragePoolRefreshArgs struct {
+ Pool StoragePool
+ Flags uint32
+}
+
+// StoragePoolGetXMLDescArgs is libvirt's remote_storage_pool_get_xml_desc_args
+type StoragePoolGetXMLDescArgs struct {
+ Pool StoragePool
+ Flags StorageXMLFlags
+}
+
+// StoragePoolGetXMLDescRet is libvirt's remote_storage_pool_get_xml_desc_ret
+type StoragePoolGetXMLDescRet struct {
+ XML string
+}
+
+// StoragePoolGetInfoArgs is libvirt's remote_storage_pool_get_info_args
+type StoragePoolGetInfoArgs struct {
+ Pool StoragePool
+}
+
+// StoragePoolGetInfoRet is libvirt's remote_storage_pool_get_info_ret
+type StoragePoolGetInfoRet struct {
+ State uint8
+ Capacity uint64
+ Allocation uint64
+ Available uint64
+}
+
+// StoragePoolGetAutostartArgs is libvirt's remote_storage_pool_get_autostart_args
+type StoragePoolGetAutostartArgs struct {
+ Pool StoragePool
+}
+
+// StoragePoolGetAutostartRet is libvirt's remote_storage_pool_get_autostart_ret
+type StoragePoolGetAutostartRet struct {
+ Autostart int32
+}
+
+// StoragePoolSetAutostartArgs is libvirt's remote_storage_pool_set_autostart_args
+type StoragePoolSetAutostartArgs struct {
+ Pool StoragePool
+ Autostart int32
+}
+
+// StoragePoolNumOfVolumesArgs is libvirt's remote_storage_pool_num_of_volumes_args
+type StoragePoolNumOfVolumesArgs struct {
+ Pool StoragePool
+}
+
+// StoragePoolNumOfVolumesRet is libvirt's remote_storage_pool_num_of_volumes_ret
+type StoragePoolNumOfVolumesRet struct {
+ Num int32
+}
+
+// StoragePoolListVolumesArgs is libvirt's remote_storage_pool_list_volumes_args
+type StoragePoolListVolumesArgs struct {
+ Pool StoragePool
+ Maxnames int32
+}
+
+// StoragePoolListVolumesRet is libvirt's remote_storage_pool_list_volumes_ret
+type StoragePoolListVolumesRet struct {
+ Names []string
+}
+
+// StorageVolLookupByNameArgs is libvirt's remote_storage_vol_lookup_by_name_args
+type StorageVolLookupByNameArgs struct {
+ Pool StoragePool
+ Name string
+}
+
+// StorageVolLookupByNameRet is libvirt's remote_storage_vol_lookup_by_name_ret
+type StorageVolLookupByNameRet struct {
+ Vol StorageVol
+}
+
+// StorageVolLookupByKeyArgs is libvirt's remote_storage_vol_lookup_by_key_args
+type StorageVolLookupByKeyArgs struct {
+ Key string
+}
+
+// StorageVolLookupByKeyRet is libvirt's remote_storage_vol_lookup_by_key_ret
+type StorageVolLookupByKeyRet struct {
+ Vol StorageVol
+}
+
+// StorageVolLookupByPathArgs is libvirt's remote_storage_vol_lookup_by_path_args
+type StorageVolLookupByPathArgs struct {
+ Path string
+}
+
+// StorageVolLookupByPathRet is libvirt's remote_storage_vol_lookup_by_path_ret
+type StorageVolLookupByPathRet struct {
+ Vol StorageVol
+}
+
+// StorageVolCreateXMLArgs is libvirt's remote_storage_vol_create_xml_args
+type StorageVolCreateXMLArgs struct {
+ Pool StoragePool
+ XML string
+ Flags StorageVolCreateFlags
+}
+
+// StorageVolCreateXMLRet is libvirt's remote_storage_vol_create_xml_ret
+type StorageVolCreateXMLRet struct {
+ Vol StorageVol
+}
+
+// StorageVolCreateXMLFromArgs is libvirt's remote_storage_vol_create_xml_from_args
+type StorageVolCreateXMLFromArgs struct {
+ Pool StoragePool
+ XML string
+ Clonevol StorageVol
+ Flags StorageVolCreateFlags
+}
+
+// StorageVolCreateXMLFromRet is libvirt's remote_storage_vol_create_xml_from_ret
+type StorageVolCreateXMLFromRet struct {
+ Vol StorageVol
+}
+
+// StorageVolDeleteArgs is libvirt's remote_storage_vol_delete_args
+type StorageVolDeleteArgs struct {
+ Vol StorageVol
+ Flags StorageVolDeleteFlags
+}
+
+// StorageVolWipeArgs is libvirt's remote_storage_vol_wipe_args
+type StorageVolWipeArgs struct {
+ Vol StorageVol
+ Flags uint32
+}
+
+// StorageVolWipePatternArgs is libvirt's remote_storage_vol_wipe_pattern_args
+type StorageVolWipePatternArgs struct {
+ Vol StorageVol
+ Algorithm uint32
+ Flags uint32
+}
+
+// StorageVolGetXMLDescArgs is libvirt's remote_storage_vol_get_xml_desc_args
+type StorageVolGetXMLDescArgs struct {
+ Vol StorageVol
+ Flags uint32
+}
+
+// StorageVolGetXMLDescRet is libvirt's remote_storage_vol_get_xml_desc_ret
+type StorageVolGetXMLDescRet struct {
+ XML string
+}
+
+// StorageVolGetInfoArgs is libvirt's remote_storage_vol_get_info_args
+type StorageVolGetInfoArgs struct {
+ Vol StorageVol
+}
+
+// StorageVolGetInfoRet is libvirt's remote_storage_vol_get_info_ret
+type StorageVolGetInfoRet struct {
+ Type int8
+ Capacity uint64
+ Allocation uint64
+}
+
+// StorageVolGetInfoFlagsArgs is libvirt's remote_storage_vol_get_info_flags_args
+type StorageVolGetInfoFlagsArgs struct {
+ Vol StorageVol
+ Flags uint32
+}
+
+// StorageVolGetInfoFlagsRet is libvirt's remote_storage_vol_get_info_flags_ret
+type StorageVolGetInfoFlagsRet struct {
+ Type int8
+ Capacity uint64
+ Allocation uint64
+}
+
+// StorageVolGetPathArgs is libvirt's remote_storage_vol_get_path_args
+type StorageVolGetPathArgs struct {
+ Vol StorageVol
+}
+
+// StorageVolGetPathRet is libvirt's remote_storage_vol_get_path_ret
+type StorageVolGetPathRet struct {
+ Name string
+}
+
+// StorageVolResizeArgs is libvirt's remote_storage_vol_resize_args
+type StorageVolResizeArgs struct {
+ Vol StorageVol
+ Capacity uint64
+ Flags StorageVolResizeFlags
+}
+
+// NodeNumOfDevicesArgs is libvirt's remote_node_num_of_devices_args
+type NodeNumOfDevicesArgs struct {
+ Cap OptString
+ Flags uint32
+}
+
+// NodeNumOfDevicesRet is libvirt's remote_node_num_of_devices_ret
+type NodeNumOfDevicesRet struct {
+ Num int32
+}
+
+// NodeListDevicesArgs is libvirt's remote_node_list_devices_args
+type NodeListDevicesArgs struct {
+ Cap OptString
+ Maxnames int32
+ Flags uint32
+}
+
+// NodeListDevicesRet is libvirt's remote_node_list_devices_ret
+type NodeListDevicesRet struct {
+ Names []string
+}
+
+// NodeDeviceLookupByNameArgs is libvirt's remote_node_device_lookup_by_name_args
+type NodeDeviceLookupByNameArgs struct {
+ Name string
+}
+
+// NodeDeviceLookupByNameRet is libvirt's remote_node_device_lookup_by_name_ret
+type NodeDeviceLookupByNameRet struct {
+ Dev NodeDevice
+}
+
+// NodeDeviceLookupScsiHostByWwnArgs is libvirt's remote_node_device_lookup_scsi_host_by_wwn_args
+type NodeDeviceLookupScsiHostByWwnArgs struct {
+ Wwnn string
+ Wwpn string
+ Flags uint32
+}
+
+// NodeDeviceLookupScsiHostByWwnRet is libvirt's remote_node_device_lookup_scsi_host_by_wwn_ret
+type NodeDeviceLookupScsiHostByWwnRet struct {
+ Dev NodeDevice
+}
+
+// NodeDeviceGetXMLDescArgs is libvirt's remote_node_device_get_xml_desc_args
+type NodeDeviceGetXMLDescArgs struct {
+ Name string
+ Flags uint32
+}
+
+// NodeDeviceGetXMLDescRet is libvirt's remote_node_device_get_xml_desc_ret
+type NodeDeviceGetXMLDescRet struct {
+ XML string
+}
+
+// NodeDeviceGetParentArgs is libvirt's remote_node_device_get_parent_args
+type NodeDeviceGetParentArgs struct {
+ Name string
+}
+
+// NodeDeviceGetParentRet is libvirt's remote_node_device_get_parent_ret
+type NodeDeviceGetParentRet struct {
+ ParentName OptString
+}
+
+// NodeDeviceNumOfCapsArgs is libvirt's remote_node_device_num_of_caps_args
+type NodeDeviceNumOfCapsArgs struct {
+ Name string
+}
+
+// NodeDeviceNumOfCapsRet is libvirt's remote_node_device_num_of_caps_ret
+type NodeDeviceNumOfCapsRet struct {
+ Num int32
+}
+
+// NodeDeviceListCapsArgs is libvirt's remote_node_device_list_caps_args
+type NodeDeviceListCapsArgs struct {
+ Name string
+ Maxnames int32
+}
+
+// NodeDeviceListCapsRet is libvirt's remote_node_device_list_caps_ret
+type NodeDeviceListCapsRet struct {
+ Names []string
+}
+
+// NodeDeviceDettachArgs is libvirt's remote_node_device_dettach_args
+type NodeDeviceDettachArgs struct {
+ Name string
+}
+
+// NodeDeviceDetachFlagsArgs is libvirt's remote_node_device_detach_flags_args
+type NodeDeviceDetachFlagsArgs struct {
+ Name string
+ DriverName OptString
+ Flags uint32
+}
+
+// NodeDeviceReAttachArgs is libvirt's remote_node_device_re_attach_args
+type NodeDeviceReAttachArgs struct {
+ Name string
+}
+
+// NodeDeviceResetArgs is libvirt's remote_node_device_reset_args
+type NodeDeviceResetArgs struct {
+ Name string
+}
+
+// NodeDeviceCreateXMLArgs is libvirt's remote_node_device_create_xml_args
+type NodeDeviceCreateXMLArgs struct {
+ XMLDesc string
+ Flags uint32
+}
+
+// NodeDeviceCreateXMLRet is libvirt's remote_node_device_create_xml_ret
+type NodeDeviceCreateXMLRet struct {
+ Dev NodeDevice
+}
+
+// NodeDeviceDestroyArgs is libvirt's remote_node_device_destroy_args
+type NodeDeviceDestroyArgs struct {
+ Name string
+}
+
+// ConnectDomainEventRegisterRet is libvirt's remote_connect_domain_event_register_ret
+type ConnectDomainEventRegisterRet struct {
+ CbRegistered int32
+}
+
+// ConnectDomainEventDeregisterRet is libvirt's remote_connect_domain_event_deregister_ret
+type ConnectDomainEventDeregisterRet struct {
+ CbRegistered int32
+}
+
+// DomainEventLifecycleMsg is libvirt's remote_domain_event_lifecycle_msg
+type DomainEventLifecycleMsg struct {
+ Dom Domain
+ Event int32
+ Detail int32
+}
+
+// DomainEventCallbackLifecycleMsg is libvirt's remote_domain_event_callback_lifecycle_msg
+type DomainEventCallbackLifecycleMsg struct {
+ CallbackID int32
+ Msg DomainEventLifecycleMsg
+}
+
+// ConnectDomainXMLFromNativeArgs is libvirt's remote_connect_domain_xml_from_native_args
+type ConnectDomainXMLFromNativeArgs struct {
+ NativeFormat string
+ NativeConfig string
+ Flags uint32
+}
+
+// ConnectDomainXMLFromNativeRet is libvirt's remote_connect_domain_xml_from_native_ret
+type ConnectDomainXMLFromNativeRet struct {
+ DomainXML string
+}
+
+// ConnectDomainXMLToNativeArgs is libvirt's remote_connect_domain_xml_to_native_args
+type ConnectDomainXMLToNativeArgs struct {
+ NativeFormat string
+ DomainXML string
+ Flags uint32
+}
+
+// ConnectDomainXMLToNativeRet is libvirt's remote_connect_domain_xml_to_native_ret
+type ConnectDomainXMLToNativeRet struct {
+ NativeConfig string
+}
+
+// ConnectNumOfSecretsRet is libvirt's remote_connect_num_of_secrets_ret
+type ConnectNumOfSecretsRet struct {
+ Num int32
+}
+
+// ConnectListSecretsArgs is libvirt's remote_connect_list_secrets_args
+type ConnectListSecretsArgs struct {
+ Maxuuids int32
+}
+
+// ConnectListSecretsRet is libvirt's remote_connect_list_secrets_ret
+type ConnectListSecretsRet struct {
+ Uuids []string
+}
+
+// SecretLookupByUUIDArgs is libvirt's remote_secret_lookup_by_uuid_args
+type SecretLookupByUUIDArgs struct {
+ UUID UUID
+}
+
+// SecretLookupByUUIDRet is libvirt's remote_secret_lookup_by_uuid_ret
+type SecretLookupByUUIDRet struct {
+ OptSecret Secret
+}
+
+// SecretDefineXMLArgs is libvirt's remote_secret_define_xml_args
+type SecretDefineXMLArgs struct {
+ XML string
+ Flags uint32
+}
+
+// SecretDefineXMLRet is libvirt's remote_secret_define_xml_ret
+type SecretDefineXMLRet struct {
+ OptSecret Secret
+}
+
+// SecretGetXMLDescArgs is libvirt's remote_secret_get_xml_desc_args
+type SecretGetXMLDescArgs struct {
+ OptSecret Secret
+ Flags uint32
+}
+
+// SecretGetXMLDescRet is libvirt's remote_secret_get_xml_desc_ret
+type SecretGetXMLDescRet struct {
+ XML string
+}
+
+// SecretSetValueArgs is libvirt's remote_secret_set_value_args
+type SecretSetValueArgs struct {
+ OptSecret Secret
+ Value []byte
+ Flags uint32
+}
+
+// SecretGetValueArgs is libvirt's remote_secret_get_value_args
+type SecretGetValueArgs struct {
+ OptSecret Secret
+ Flags uint32
+}
+
+// SecretGetValueRet is libvirt's remote_secret_get_value_ret
+type SecretGetValueRet struct {
+ Value []byte
+}
+
+// SecretUndefineArgs is libvirt's remote_secret_undefine_args
+type SecretUndefineArgs struct {
+ OptSecret Secret
+}
+
+// SecretLookupByUsageArgs is libvirt's remote_secret_lookup_by_usage_args
+type SecretLookupByUsageArgs struct {
+ UsageType int32
+ UsageID string
+}
+
+// SecretLookupByUsageRet is libvirt's remote_secret_lookup_by_usage_ret
+type SecretLookupByUsageRet struct {
+ OptSecret Secret
+}
+
+// DomainMigratePrepareTunnelArgs is libvirt's remote_domain_migrate_prepare_tunnel_args
+type DomainMigratePrepareTunnelArgs struct {
+ Flags uint64
+ Dname OptString
+ Resource uint64
+ DomXML string
+}
+
+// ConnectIsSecureRet is libvirt's remote_connect_is_secure_ret
+type ConnectIsSecureRet struct {
+ Secure int32
+}
+
+// DomainIsActiveArgs is libvirt's remote_domain_is_active_args
+type DomainIsActiveArgs struct {
+ Dom Domain
+}
+
+// DomainIsActiveRet is libvirt's remote_domain_is_active_ret
+type DomainIsActiveRet struct {
+ Active int32
+}
+
+// DomainIsPersistentArgs is libvirt's remote_domain_is_persistent_args
+type DomainIsPersistentArgs struct {
+ Dom Domain
+}
+
+// DomainIsPersistentRet is libvirt's remote_domain_is_persistent_ret
+type DomainIsPersistentRet struct {
+ Persistent int32
+}
+
+// DomainIsUpdatedArgs is libvirt's remote_domain_is_updated_args
+type DomainIsUpdatedArgs struct {
+ Dom Domain
+}
+
+// DomainIsUpdatedRet is libvirt's remote_domain_is_updated_ret
+type DomainIsUpdatedRet struct {
+ Updated int32
+}
+
+// NetworkIsActiveArgs is libvirt's remote_network_is_active_args
+type NetworkIsActiveArgs struct {
+ Net Network
+}
+
+// NetworkIsActiveRet is libvirt's remote_network_is_active_ret
+type NetworkIsActiveRet struct {
+ Active int32
+}
+
+// NetworkIsPersistentArgs is libvirt's remote_network_is_persistent_args
+type NetworkIsPersistentArgs struct {
+ Net Network
+}
+
+// NetworkIsPersistentRet is libvirt's remote_network_is_persistent_ret
+type NetworkIsPersistentRet struct {
+ Persistent int32
+}
+
+// StoragePoolIsActiveArgs is libvirt's remote_storage_pool_is_active_args
+type StoragePoolIsActiveArgs struct {
+ Pool StoragePool
+}
+
+// StoragePoolIsActiveRet is libvirt's remote_storage_pool_is_active_ret
+type StoragePoolIsActiveRet struct {
+ Active int32
+}
+
+// StoragePoolIsPersistentArgs is libvirt's remote_storage_pool_is_persistent_args
+type StoragePoolIsPersistentArgs struct {
+ Pool StoragePool
+}
+
+// StoragePoolIsPersistentRet is libvirt's remote_storage_pool_is_persistent_ret
+type StoragePoolIsPersistentRet struct {
+ Persistent int32
+}
+
+// InterfaceIsActiveArgs is libvirt's remote_interface_is_active_args
+type InterfaceIsActiveArgs struct {
+ Iface Interface
+}
+
+// InterfaceIsActiveRet is libvirt's remote_interface_is_active_ret
+type InterfaceIsActiveRet struct {
+ Active int32
+}
+
+// ConnectCompareCPUArgs is libvirt's remote_connect_compare_cpu_args
+type ConnectCompareCPUArgs struct {
+ XML string
+ Flags ConnectCompareCPUFlags
+}
+
+// ConnectCompareCPURet is libvirt's remote_connect_compare_cpu_ret
+type ConnectCompareCPURet struct {
+ Result int32
+}
+
+// ConnectBaselineCPUArgs is libvirt's remote_connect_baseline_cpu_args
+type ConnectBaselineCPUArgs struct {
+ XMLCPUs []string
+ Flags ConnectBaselineCPUFlags
+}
+
+// ConnectBaselineCPURet is libvirt's remote_connect_baseline_cpu_ret
+type ConnectBaselineCPURet struct {
+ CPU string
+}
+
+// DomainGetJobInfoArgs is libvirt's remote_domain_get_job_info_args
+type DomainGetJobInfoArgs struct {
+ Dom Domain
+}
+
+// DomainGetJobInfoRet is libvirt's remote_domain_get_job_info_ret
+type DomainGetJobInfoRet struct {
+ Type int32
+ TimeElapsed uint64
+ TimeRemaining uint64
+ DataTotal uint64
+ DataProcessed uint64
+ DataRemaining uint64
+ MemTotal uint64
+ MemProcessed uint64
+ MemRemaining uint64
+ FileTotal uint64
+ FileProcessed uint64
+ FileRemaining uint64
+}
+
+// DomainGetJobStatsArgs is libvirt's remote_domain_get_job_stats_args
+type DomainGetJobStatsArgs struct {
+ Dom Domain
+ Flags DomainGetJobStatsFlags
+}
+
+// DomainGetJobStatsRet is libvirt's remote_domain_get_job_stats_ret
+type DomainGetJobStatsRet struct {
+ Type int32
+ Params []TypedParam
+}
+
+// DomainAbortJobArgs is libvirt's remote_domain_abort_job_args
+type DomainAbortJobArgs struct {
+ Dom Domain
+}
+
+// DomainMigrateGetMaxDowntimeArgs is libvirt's remote_domain_migrate_get_max_downtime_args
+type DomainMigrateGetMaxDowntimeArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainMigrateGetMaxDowntimeRet is libvirt's remote_domain_migrate_get_max_downtime_ret
+type DomainMigrateGetMaxDowntimeRet struct {
+ Downtime uint64
+}
+
+// DomainMigrateSetMaxDowntimeArgs is libvirt's remote_domain_migrate_set_max_downtime_args
+type DomainMigrateSetMaxDowntimeArgs struct {
+ Dom Domain
+ Downtime uint64
+ Flags uint32
+}
+
+// DomainMigrateGetCompressionCacheArgs is libvirt's remote_domain_migrate_get_compression_cache_args
+type DomainMigrateGetCompressionCacheArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainMigrateGetCompressionCacheRet is libvirt's remote_domain_migrate_get_compression_cache_ret
+type DomainMigrateGetCompressionCacheRet struct {
+ CacheSize uint64
+}
+
+// DomainMigrateSetCompressionCacheArgs is libvirt's remote_domain_migrate_set_compression_cache_args
+type DomainMigrateSetCompressionCacheArgs struct {
+ Dom Domain
+ CacheSize uint64
+ Flags uint32
+}
+
+// DomainMigrateSetMaxSpeedArgs is libvirt's remote_domain_migrate_set_max_speed_args
+type DomainMigrateSetMaxSpeedArgs struct {
+ Dom Domain
+ Bandwidth uint64
+ Flags uint32
+}
+
+// DomainMigrateGetMaxSpeedArgs is libvirt's remote_domain_migrate_get_max_speed_args
+type DomainMigrateGetMaxSpeedArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainMigrateGetMaxSpeedRet is libvirt's remote_domain_migrate_get_max_speed_ret
+type DomainMigrateGetMaxSpeedRet struct {
+ Bandwidth uint64
+}
+
+// ConnectDomainEventRegisterAnyArgs is libvirt's remote_connect_domain_event_register_any_args
+type ConnectDomainEventRegisterAnyArgs struct {
+ EventID int32
+}
+
+// ConnectDomainEventDeregisterAnyArgs is libvirt's remote_connect_domain_event_deregister_any_args
+type ConnectDomainEventDeregisterAnyArgs struct {
+ EventID int32
+}
+
+// ConnectDomainEventCallbackRegisterAnyArgs is libvirt's remote_connect_domain_event_callback_register_any_args
+type ConnectDomainEventCallbackRegisterAnyArgs struct {
+ EventID int32
+ Dom OptDomain
+}
+
+// ConnectDomainEventCallbackRegisterAnyRet is libvirt's remote_connect_domain_event_callback_register_any_ret
+type ConnectDomainEventCallbackRegisterAnyRet struct {
+ CallbackID int32
+}
+
+// ConnectDomainEventCallbackDeregisterAnyArgs is libvirt's remote_connect_domain_event_callback_deregister_any_args
+type ConnectDomainEventCallbackDeregisterAnyArgs struct {
+ CallbackID int32
+}
+
+// DomainEventRebootMsg is libvirt's remote_domain_event_reboot_msg
+type DomainEventRebootMsg struct {
+ Dom Domain
+}
+
+// DomainEventCallbackRebootMsg is libvirt's remote_domain_event_callback_reboot_msg
+type DomainEventCallbackRebootMsg struct {
+ CallbackID int32
+ Msg DomainEventRebootMsg
+}
+
+// DomainEventRtcChangeMsg is libvirt's remote_domain_event_rtc_change_msg
+type DomainEventRtcChangeMsg struct {
+ Dom Domain
+ Offset int64
+}
+
+// DomainEventCallbackRtcChangeMsg is libvirt's remote_domain_event_callback_rtc_change_msg
+type DomainEventCallbackRtcChangeMsg struct {
+ CallbackID int32
+ Msg DomainEventRtcChangeMsg
+}
+
+// DomainEventWatchdogMsg is libvirt's remote_domain_event_watchdog_msg
+type DomainEventWatchdogMsg struct {
+ Dom Domain
+ Action int32
+}
+
+// DomainEventCallbackWatchdogMsg is libvirt's remote_domain_event_callback_watchdog_msg
+type DomainEventCallbackWatchdogMsg struct {
+ CallbackID int32
+ Msg DomainEventWatchdogMsg
+}
+
+// DomainEventIOErrorMsg is libvirt's remote_domain_event_io_error_msg
+type DomainEventIOErrorMsg struct {
+ Dom Domain
+ SrcPath string
+ DevAlias string
+ Action int32
+}
+
+// DomainEventCallbackIOErrorMsg is libvirt's remote_domain_event_callback_io_error_msg
+type DomainEventCallbackIOErrorMsg struct {
+ CallbackID int32
+ Msg DomainEventIOErrorMsg
+}
+
+// DomainEventIOErrorReasonMsg is libvirt's remote_domain_event_io_error_reason_msg
+type DomainEventIOErrorReasonMsg struct {
+ Dom Domain
+ SrcPath string
+ DevAlias string
+ Action int32
+ Reason string
+}
+
+// DomainEventCallbackIOErrorReasonMsg is libvirt's remote_domain_event_callback_io_error_reason_msg
+type DomainEventCallbackIOErrorReasonMsg struct {
+ CallbackID int32
+ Msg DomainEventIOErrorReasonMsg
+}
+
+// DomainEventGraphicsAddress is libvirt's remote_domain_event_graphics_address
+type DomainEventGraphicsAddress struct {
+ Family int32
+ Node string
+ Service string
+}
+
+// DomainEventGraphicsIdentity is libvirt's remote_domain_event_graphics_identity
+type DomainEventGraphicsIdentity struct {
+ Type string
+ Name string
+}
+
+// DomainEventGraphicsMsg is libvirt's remote_domain_event_graphics_msg
+type DomainEventGraphicsMsg struct {
+ Dom Domain
+ Phase int32
+ Local DomainEventGraphicsAddress
+ Remote DomainEventGraphicsAddress
+ AuthScheme string
+ Subject []DomainEventGraphicsIdentity
+}
+
+// DomainEventCallbackGraphicsMsg is libvirt's remote_domain_event_callback_graphics_msg
+type DomainEventCallbackGraphicsMsg struct {
+ CallbackID int32
+ Msg DomainEventGraphicsMsg
+}
+
+// DomainEventBlockJobMsg is libvirt's remote_domain_event_block_job_msg
+type DomainEventBlockJobMsg struct {
+ Dom Domain
+ Path string
+ Type int32
+ Status int32
+}
+
+// DomainEventCallbackBlockJobMsg is libvirt's remote_domain_event_callback_block_job_msg
+type DomainEventCallbackBlockJobMsg struct {
+ CallbackID int32
+ Msg DomainEventBlockJobMsg
+}
+
+// DomainEventDiskChangeMsg is libvirt's remote_domain_event_disk_change_msg
+type DomainEventDiskChangeMsg struct {
+ Dom Domain
+ OldSrcPath OptString
+ NewSrcPath OptString
+ DevAlias string
+ Reason int32
+}
+
+// DomainEventCallbackDiskChangeMsg is libvirt's remote_domain_event_callback_disk_change_msg
+type DomainEventCallbackDiskChangeMsg struct {
+ CallbackID int32
+ Msg DomainEventDiskChangeMsg
+}
+
+// DomainEventTrayChangeMsg is libvirt's remote_domain_event_tray_change_msg
+type DomainEventTrayChangeMsg struct {
+ Dom Domain
+ DevAlias string
+ Reason int32
+}
+
+// DomainEventCallbackTrayChangeMsg is libvirt's remote_domain_event_callback_tray_change_msg
+type DomainEventCallbackTrayChangeMsg struct {
+ CallbackID int32
+ Msg DomainEventTrayChangeMsg
+}
+
+// DomainEventPmwakeupMsg is libvirt's remote_domain_event_pmwakeup_msg
+type DomainEventPmwakeupMsg struct {
+ Dom Domain
+}
+
+// DomainEventCallbackPmwakeupMsg is libvirt's remote_domain_event_callback_pmwakeup_msg
+type DomainEventCallbackPmwakeupMsg struct {
+ CallbackID int32
+ Reason int32
+ Msg DomainEventPmwakeupMsg
+}
+
+// DomainEventPmsuspendMsg is libvirt's remote_domain_event_pmsuspend_msg
+type DomainEventPmsuspendMsg struct {
+ Dom Domain
+}
+
+// DomainEventCallbackPmsuspendMsg is libvirt's remote_domain_event_callback_pmsuspend_msg
+type DomainEventCallbackPmsuspendMsg struct {
+ CallbackID int32
+ Reason int32
+ Msg DomainEventPmsuspendMsg
+}
+
+// DomainEventBalloonChangeMsg is libvirt's remote_domain_event_balloon_change_msg
+type DomainEventBalloonChangeMsg struct {
+ Dom Domain
+ Actual uint64
+}
+
+// DomainEventCallbackBalloonChangeMsg is libvirt's remote_domain_event_callback_balloon_change_msg
+type DomainEventCallbackBalloonChangeMsg struct {
+ CallbackID int32
+ Msg DomainEventBalloonChangeMsg
+}
+
+// DomainEventPmsuspendDiskMsg is libvirt's remote_domain_event_pmsuspend_disk_msg
+type DomainEventPmsuspendDiskMsg struct {
+ Dom Domain
+}
+
+// DomainEventCallbackPmsuspendDiskMsg is libvirt's remote_domain_event_callback_pmsuspend_disk_msg
+type DomainEventCallbackPmsuspendDiskMsg struct {
+ CallbackID int32
+ Reason int32
+ Msg DomainEventPmsuspendDiskMsg
+}
+
+// DomainManagedSaveArgs is libvirt's remote_domain_managed_save_args
+type DomainManagedSaveArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainHasManagedSaveImageArgs is libvirt's remote_domain_has_managed_save_image_args
+type DomainHasManagedSaveImageArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainHasManagedSaveImageRet is libvirt's remote_domain_has_managed_save_image_ret
+type DomainHasManagedSaveImageRet struct {
+ Result int32
+}
+
+// DomainManagedSaveRemoveArgs is libvirt's remote_domain_managed_save_remove_args
+type DomainManagedSaveRemoveArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainManagedSaveGetXMLDescArgs is libvirt's remote_domain_managed_save_get_xml_desc_args
+type DomainManagedSaveGetXMLDescArgs struct {
+ Dom Domain
+ Flags DomainXMLFlags
+}
+
+// DomainManagedSaveGetXMLDescRet is libvirt's remote_domain_managed_save_get_xml_desc_ret
+type DomainManagedSaveGetXMLDescRet struct {
+ XML string
+}
+
+// DomainManagedSaveDefineXMLArgs is libvirt's remote_domain_managed_save_define_xml_args
+type DomainManagedSaveDefineXMLArgs struct {
+ Dom Domain
+ Dxml OptString
+ Flags DomainSaveRestoreFlags
+}
+
+// DomainSnapshotCreateXMLArgs is libvirt's remote_domain_snapshot_create_xml_args
+type DomainSnapshotCreateXMLArgs struct {
+ Dom Domain
+ XMLDesc string
+ Flags uint32
+}
+
+// DomainSnapshotCreateXMLRet is libvirt's remote_domain_snapshot_create_xml_ret
+type DomainSnapshotCreateXMLRet struct {
+ Snap DomainSnapshot
+}
+
+// DomainSnapshotGetXMLDescArgs is libvirt's remote_domain_snapshot_get_xml_desc_args
+type DomainSnapshotGetXMLDescArgs struct {
+ Snap DomainSnapshot
+ Flags uint32
+}
+
+// DomainSnapshotGetXMLDescRet is libvirt's remote_domain_snapshot_get_xml_desc_ret
+type DomainSnapshotGetXMLDescRet struct {
+ XML string
+}
+
+// DomainSnapshotNumArgs is libvirt's remote_domain_snapshot_num_args
+type DomainSnapshotNumArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainSnapshotNumRet is libvirt's remote_domain_snapshot_num_ret
+type DomainSnapshotNumRet struct {
+ Num int32
+}
+
+// DomainSnapshotListNamesArgs is libvirt's remote_domain_snapshot_list_names_args
+type DomainSnapshotListNamesArgs struct {
+ Dom Domain
+ Maxnames int32
+ Flags uint32
+}
+
+// DomainSnapshotListNamesRet is libvirt's remote_domain_snapshot_list_names_ret
+type DomainSnapshotListNamesRet struct {
+ Names []string
+}
+
+// DomainListAllSnapshotsArgs is libvirt's remote_domain_list_all_snapshots_args
+type DomainListAllSnapshotsArgs struct {
+ Dom Domain
+ NeedResults int32
+ Flags uint32
+}
+
+// DomainListAllSnapshotsRet is libvirt's remote_domain_list_all_snapshots_ret
+type DomainListAllSnapshotsRet struct {
+ Snapshots []DomainSnapshot
+ Ret int32
+}
+
+// DomainSnapshotNumChildrenArgs is libvirt's remote_domain_snapshot_num_children_args
+type DomainSnapshotNumChildrenArgs struct {
+ Snap DomainSnapshot
+ Flags uint32
+}
+
+// DomainSnapshotNumChildrenRet is libvirt's remote_domain_snapshot_num_children_ret
+type DomainSnapshotNumChildrenRet struct {
+ Num int32
+}
+
+// DomainSnapshotListChildrenNamesArgs is libvirt's remote_domain_snapshot_list_children_names_args
+type DomainSnapshotListChildrenNamesArgs struct {
+ Snap DomainSnapshot
+ Maxnames int32
+ Flags uint32
+}
+
+// DomainSnapshotListChildrenNamesRet is libvirt's remote_domain_snapshot_list_children_names_ret
+type DomainSnapshotListChildrenNamesRet struct {
+ Names []string
+}
+
+// DomainSnapshotListAllChildrenArgs is libvirt's remote_domain_snapshot_list_all_children_args
+type DomainSnapshotListAllChildrenArgs struct {
+ Snapshot DomainSnapshot
+ NeedResults int32
+ Flags uint32
+}
+
+// DomainSnapshotListAllChildrenRet is libvirt's remote_domain_snapshot_list_all_children_ret
+type DomainSnapshotListAllChildrenRet struct {
+ Snapshots []DomainSnapshot
+ Ret int32
+}
+
+// DomainSnapshotLookupByNameArgs is libvirt's remote_domain_snapshot_lookup_by_name_args
+type DomainSnapshotLookupByNameArgs struct {
+ Dom Domain
+ Name string
+ Flags uint32
+}
+
+// DomainSnapshotLookupByNameRet is libvirt's remote_domain_snapshot_lookup_by_name_ret
+type DomainSnapshotLookupByNameRet struct {
+ Snap DomainSnapshot
+}
+
+// DomainHasCurrentSnapshotArgs is libvirt's remote_domain_has_current_snapshot_args
+type DomainHasCurrentSnapshotArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainHasCurrentSnapshotRet is libvirt's remote_domain_has_current_snapshot_ret
+type DomainHasCurrentSnapshotRet struct {
+ Result int32
+}
+
+// DomainSnapshotGetParentArgs is libvirt's remote_domain_snapshot_get_parent_args
+type DomainSnapshotGetParentArgs struct {
+ Snap DomainSnapshot
+ Flags uint32
+}
+
+// DomainSnapshotGetParentRet is libvirt's remote_domain_snapshot_get_parent_ret
+type DomainSnapshotGetParentRet struct {
+ Snap DomainSnapshot
+}
+
+// DomainSnapshotCurrentArgs is libvirt's remote_domain_snapshot_current_args
+type DomainSnapshotCurrentArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainSnapshotCurrentRet is libvirt's remote_domain_snapshot_current_ret
+type DomainSnapshotCurrentRet struct {
+ Snap DomainSnapshot
+}
+
+// DomainSnapshotIsCurrentArgs is libvirt's remote_domain_snapshot_is_current_args
+type DomainSnapshotIsCurrentArgs struct {
+ Snap DomainSnapshot
+ Flags uint32
+}
+
+// DomainSnapshotIsCurrentRet is libvirt's remote_domain_snapshot_is_current_ret
+type DomainSnapshotIsCurrentRet struct {
+ Current int32
+}
+
+// DomainSnapshotHasMetadataArgs is libvirt's remote_domain_snapshot_has_metadata_args
+type DomainSnapshotHasMetadataArgs struct {
+ Snap DomainSnapshot
+ Flags uint32
+}
+
+// DomainSnapshotHasMetadataRet is libvirt's remote_domain_snapshot_has_metadata_ret
+type DomainSnapshotHasMetadataRet struct {
+ Metadata int32
+}
+
+// DomainRevertToSnapshotArgs is libvirt's remote_domain_revert_to_snapshot_args
+type DomainRevertToSnapshotArgs struct {
+ Snap DomainSnapshot
+ Flags uint32
+}
+
+// DomainSnapshotDeleteArgs is libvirt's remote_domain_snapshot_delete_args
+type DomainSnapshotDeleteArgs struct {
+ Snap DomainSnapshot
+ Flags DomainSnapshotDeleteFlags
+}
+
+// DomainOpenConsoleArgs is libvirt's remote_domain_open_console_args
+type DomainOpenConsoleArgs struct {
+ Dom Domain
+ DevName OptString
+ Flags uint32
+}
+
+// DomainOpenChannelArgs is libvirt's remote_domain_open_channel_args
+type DomainOpenChannelArgs struct {
+ Dom Domain
+ Name OptString
+ Flags DomainChannelFlags
+}
+
+// StorageVolUploadArgs is libvirt's remote_storage_vol_upload_args
+type StorageVolUploadArgs struct {
+ Vol StorageVol
+ Offset uint64
+ Length uint64
+ Flags StorageVolUploadFlags
+}
+
+// StorageVolDownloadArgs is libvirt's remote_storage_vol_download_args
+type StorageVolDownloadArgs struct {
+ Vol StorageVol
+ Offset uint64
+ Length uint64
+ Flags StorageVolDownloadFlags
+}
+
+// DomainGetStateArgs is libvirt's remote_domain_get_state_args
+type DomainGetStateArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainGetStateRet is libvirt's remote_domain_get_state_ret
+type DomainGetStateRet struct {
+ State int32
+ Reason int32
+}
+
+// DomainMigrateBegin3Args is libvirt's remote_domain_migrate_begin3_args
+type DomainMigrateBegin3Args struct {
+ Dom Domain
+ Xmlin OptString
+ Flags uint64
+ Dname OptString
+ Resource uint64
+}
+
+// DomainMigrateBegin3Ret is libvirt's remote_domain_migrate_begin3_ret
+type DomainMigrateBegin3Ret struct {
+ CookieOut []byte
+ XML string
+}
+
+// DomainMigratePrepare3Args is libvirt's remote_domain_migrate_prepare3_args
+type DomainMigratePrepare3Args struct {
+ CookieIn []byte
+ UriIn OptString
+ Flags uint64
+ Dname OptString
+ Resource uint64
+ DomXML string
+}
+
+// DomainMigratePrepare3Ret is libvirt's remote_domain_migrate_prepare3_ret
+type DomainMigratePrepare3Ret struct {
+ CookieOut []byte
+ UriOut OptString
+}
+
+// DomainMigratePrepareTunnel3Args is libvirt's remote_domain_migrate_prepare_tunnel3_args
+type DomainMigratePrepareTunnel3Args struct {
+ CookieIn []byte
+ Flags uint64
+ Dname OptString
+ Resource uint64
+ DomXML string
+}
+
+// DomainMigratePrepareTunnel3Ret is libvirt's remote_domain_migrate_prepare_tunnel3_ret
+type DomainMigratePrepareTunnel3Ret struct {
+ CookieOut []byte
+}
+
+// DomainMigratePerform3Args is libvirt's remote_domain_migrate_perform3_args
+type DomainMigratePerform3Args struct {
+ Dom Domain
+ Xmlin OptString
+ CookieIn []byte
+ Dconnuri OptString
+ Uri OptString
+ Flags uint64
+ Dname OptString
+ Resource uint64
+}
+
+// DomainMigratePerform3Ret is libvirt's remote_domain_migrate_perform3_ret
+type DomainMigratePerform3Ret struct {
+ CookieOut []byte
+}
+
+// DomainMigrateFinish3Args is libvirt's remote_domain_migrate_finish3_args
+type DomainMigrateFinish3Args struct {
+ Dname string
+ CookieIn []byte
+ Dconnuri OptString
+ Uri OptString
+ Flags uint64
+ Cancelled int32
+}
+
+// DomainMigrateFinish3Ret is libvirt's remote_domain_migrate_finish3_ret
+type DomainMigrateFinish3Ret struct {
+ Dom Domain
+ CookieOut []byte
+}
+
+// DomainMigrateConfirm3Args is libvirt's remote_domain_migrate_confirm3_args
+type DomainMigrateConfirm3Args struct {
+ Dom Domain
+ CookieIn []byte
+ Flags uint64
+ Cancelled int32
+}
+
+// DomainEventControlErrorMsg is libvirt's remote_domain_event_control_error_msg
+type DomainEventControlErrorMsg struct {
+ Dom Domain
+}
+
+// DomainEventCallbackControlErrorMsg is libvirt's remote_domain_event_callback_control_error_msg
+type DomainEventCallbackControlErrorMsg struct {
+ CallbackID int32
+ Msg DomainEventControlErrorMsg
+}
+
+// DomainGetControlInfoArgs is libvirt's remote_domain_get_control_info_args
+type DomainGetControlInfoArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainGetControlInfoRet is libvirt's remote_domain_get_control_info_ret
+type DomainGetControlInfoRet struct {
+ State uint32
+ Details uint32
+ StateTime uint64
+}
+
+// DomainOpenGraphicsArgs is libvirt's remote_domain_open_graphics_args
+type DomainOpenGraphicsArgs struct {
+ Dom Domain
+ Idx uint32
+ Flags DomainOpenGraphicsFlags
+}
+
+// DomainOpenGraphicsFdArgs is libvirt's remote_domain_open_graphics_fd_args
+type DomainOpenGraphicsFdArgs struct {
+ Dom Domain
+ Idx uint32
+ Flags DomainOpenGraphicsFlags
+}
+
+// NodeSuspendForDurationArgs is libvirt's remote_node_suspend_for_duration_args
+type NodeSuspendForDurationArgs struct {
+ Target uint32
+ Duration uint64
+ Flags uint32
+}
+
+// DomainShutdownFlagsArgs is libvirt's remote_domain_shutdown_flags_args
+type DomainShutdownFlagsArgs struct {
+ Dom Domain
+ Flags DomainShutdownFlagValues
+}
+
+// DomainGetDiskErrorsArgs is libvirt's remote_domain_get_disk_errors_args
+type DomainGetDiskErrorsArgs struct {
+ Dom Domain
+ Maxerrors uint32
+ Flags uint32
+}
+
+// DomainGetDiskErrorsRet is libvirt's remote_domain_get_disk_errors_ret
+type DomainGetDiskErrorsRet struct {
+ Errors []DomainDiskError
+ Nerrors int32
+}
+
+// ConnectListAllDomainsArgs is libvirt's remote_connect_list_all_domains_args
+type ConnectListAllDomainsArgs struct {
+ NeedResults int32
+ Flags ConnectListAllDomainsFlags
+}
+
+// ConnectListAllDomainsRet is libvirt's remote_connect_list_all_domains_ret
+type ConnectListAllDomainsRet struct {
+ Domains []Domain
+ Ret uint32
+}
+
+// ConnectListAllStoragePoolsArgs is libvirt's remote_connect_list_all_storage_pools_args
+type ConnectListAllStoragePoolsArgs struct {
+ NeedResults int32
+ Flags ConnectListAllStoragePoolsFlags
+}
+
+// ConnectListAllStoragePoolsRet is libvirt's remote_connect_list_all_storage_pools_ret
+type ConnectListAllStoragePoolsRet struct {
+ Pools []StoragePool
+ Ret uint32
+}
+
+// StoragePoolListAllVolumesArgs is libvirt's remote_storage_pool_list_all_volumes_args
+type StoragePoolListAllVolumesArgs struct {
+ Pool StoragePool
+ NeedResults int32
+ Flags uint32
+}
+
+// StoragePoolListAllVolumesRet is libvirt's remote_storage_pool_list_all_volumes_ret
+type StoragePoolListAllVolumesRet struct {
+ Vols []StorageVol
+ Ret uint32
+}
+
+// ConnectListAllNetworksArgs is libvirt's remote_connect_list_all_networks_args
+type ConnectListAllNetworksArgs struct {
+ NeedResults int32
+ Flags ConnectListAllNetworksFlags
+}
+
+// ConnectListAllNetworksRet is libvirt's remote_connect_list_all_networks_ret
+type ConnectListAllNetworksRet struct {
+ Nets []Network
+ Ret uint32
+}
+
+// ConnectListAllInterfacesArgs is libvirt's remote_connect_list_all_interfaces_args
+type ConnectListAllInterfacesArgs struct {
+ NeedResults int32
+ Flags ConnectListAllInterfacesFlags
+}
+
+// ConnectListAllInterfacesRet is libvirt's remote_connect_list_all_interfaces_ret
+type ConnectListAllInterfacesRet struct {
+ Ifaces []Interface
+ Ret uint32
+}
+
+// ConnectListAllNodeDevicesArgs is libvirt's remote_connect_list_all_node_devices_args
+type ConnectListAllNodeDevicesArgs struct {
+ NeedResults int32
+ Flags uint32
+}
+
+// ConnectListAllNodeDevicesRet is libvirt's remote_connect_list_all_node_devices_ret
+type ConnectListAllNodeDevicesRet struct {
+ Devices []NodeDevice
+ Ret uint32
+}
+
+// ConnectListAllNwfiltersArgs is libvirt's remote_connect_list_all_nwfilters_args
+type ConnectListAllNwfiltersArgs struct {
+ NeedResults int32
+ Flags uint32
+}
+
+// ConnectListAllNwfiltersRet is libvirt's remote_connect_list_all_nwfilters_ret
+type ConnectListAllNwfiltersRet struct {
+ Filters []Nwfilter
+ Ret uint32
+}
+
+// ConnectListAllSecretsArgs is libvirt's remote_connect_list_all_secrets_args
+type ConnectListAllSecretsArgs struct {
+ NeedResults int32
+ Flags ConnectListAllSecretsFlags
+}
+
+// ConnectListAllSecretsRet is libvirt's remote_connect_list_all_secrets_ret
+type ConnectListAllSecretsRet struct {
+ Secrets []Secret
+ Ret uint32
+}
+
+// NodeSetMemoryParametersArgs is libvirt's remote_node_set_memory_parameters_args
+type NodeSetMemoryParametersArgs struct {
+ Params []TypedParam
+ Flags uint32
+}
+
+// NodeGetMemoryParametersArgs is libvirt's remote_node_get_memory_parameters_args
+type NodeGetMemoryParametersArgs struct {
+ Nparams int32
+ Flags uint32
+}
+
+// NodeGetMemoryParametersRet is libvirt's remote_node_get_memory_parameters_ret
+type NodeGetMemoryParametersRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// NodeGetCPUMapArgs is libvirt's remote_node_get_cpu_map_args
+type NodeGetCPUMapArgs struct {
+ NeedMap int32
+ NeedOnline int32
+ Flags uint32
+}
+
+// NodeGetCPUMapRet is libvirt's remote_node_get_cpu_map_ret
+type NodeGetCPUMapRet struct {
+ Cpumap []byte
+ Online uint32
+ Ret int32
+}
+
+// DomainFstrimArgs is libvirt's remote_domain_fstrim_args
+type DomainFstrimArgs struct {
+ Dom Domain
+ MountPoint OptString
+ Minimum uint64
+ Flags uint32
+}
+
+// DomainGetTimeArgs is libvirt's remote_domain_get_time_args
+type DomainGetTimeArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainGetTimeRet is libvirt's remote_domain_get_time_ret
+type DomainGetTimeRet struct {
+ Seconds int64
+ Nseconds uint32
+}
+
+// DomainSetTimeArgs is libvirt's remote_domain_set_time_args
+type DomainSetTimeArgs struct {
+ Dom Domain
+ Seconds int64
+ Nseconds uint32
+ Flags DomainSetTimeFlags
+}
+
+// DomainMigrateBegin3ParamsArgs is libvirt's remote_domain_migrate_begin3_params_args
+type DomainMigrateBegin3ParamsArgs struct {
+ Dom Domain
+ Params []TypedParam
+ Flags uint32
+}
+
+// DomainMigrateBegin3ParamsRet is libvirt's remote_domain_migrate_begin3_params_ret
+type DomainMigrateBegin3ParamsRet struct {
+ CookieOut []byte
+ XML string
+}
+
+// DomainMigratePrepare3ParamsArgs is libvirt's remote_domain_migrate_prepare3_params_args
+type DomainMigratePrepare3ParamsArgs struct {
+ Params []TypedParam
+ CookieIn []byte
+ Flags uint32
+}
+
+// DomainMigratePrepare3ParamsRet is libvirt's remote_domain_migrate_prepare3_params_ret
+type DomainMigratePrepare3ParamsRet struct {
+ CookieOut []byte
+ UriOut OptString
+}
+
+// DomainMigratePrepareTunnel3ParamsArgs is libvirt's remote_domain_migrate_prepare_tunnel3_params_args
+type DomainMigratePrepareTunnel3ParamsArgs struct {
+ Params []TypedParam
+ CookieIn []byte
+ Flags uint32
+}
+
+// DomainMigratePrepareTunnel3ParamsRet is libvirt's remote_domain_migrate_prepare_tunnel3_params_ret
+type DomainMigratePrepareTunnel3ParamsRet struct {
+ CookieOut []byte
+}
+
+// DomainMigratePerform3ParamsArgs is libvirt's remote_domain_migrate_perform3_params_args
+type DomainMigratePerform3ParamsArgs struct {
+ Dom Domain
+ Dconnuri OptString
+ Params []TypedParam
+ CookieIn []byte
+ Flags DomainMigrateFlags
+}
+
+// DomainMigratePerform3ParamsRet is libvirt's remote_domain_migrate_perform3_params_ret
+type DomainMigratePerform3ParamsRet struct {
+ CookieOut []byte
+}
+
+// DomainMigrateFinish3ParamsArgs is libvirt's remote_domain_migrate_finish3_params_args
+type DomainMigrateFinish3ParamsArgs struct {
+ Params []TypedParam
+ CookieIn []byte
+ Flags uint32
+ Cancelled int32
+}
+
+// DomainMigrateFinish3ParamsRet is libvirt's remote_domain_migrate_finish3_params_ret
+type DomainMigrateFinish3ParamsRet struct {
+ Dom Domain
+ CookieOut []byte
+}
+
+// DomainMigrateConfirm3ParamsArgs is libvirt's remote_domain_migrate_confirm3_params_args
+type DomainMigrateConfirm3ParamsArgs struct {
+ Dom Domain
+ Params []TypedParam
+ CookieIn []byte
+ Flags uint32
+ Cancelled int32
+}
+
+// DomainEventDeviceRemovedMsg is libvirt's remote_domain_event_device_removed_msg
+type DomainEventDeviceRemovedMsg struct {
+ Dom Domain
+ DevAlias string
+}
+
+// DomainEventCallbackDeviceRemovedMsg is libvirt's remote_domain_event_callback_device_removed_msg
+type DomainEventCallbackDeviceRemovedMsg struct {
+ CallbackID int32
+ Msg DomainEventDeviceRemovedMsg
+}
+
+// DomainEventBlockJob2Msg is libvirt's remote_domain_event_block_job_2_msg
+type DomainEventBlockJob2Msg struct {
+ CallbackID int32
+ Dom Domain
+ Dst string
+ Type int32
+ Status int32
+}
+
+// DomainEventBlockThresholdMsg is libvirt's remote_domain_event_block_threshold_msg
+type DomainEventBlockThresholdMsg struct {
+ CallbackID int32
+ Dom Domain
+ Dev string
+ Path OptString
+ Threshold uint64
+ Excess uint64
+}
+
+// DomainEventCallbackTunableMsg is libvirt's remote_domain_event_callback_tunable_msg
+type DomainEventCallbackTunableMsg struct {
+ CallbackID int32
+ Dom Domain
+ Params []TypedParam
+}
+
+// DomainEventCallbackDeviceAddedMsg is libvirt's remote_domain_event_callback_device_added_msg
+type DomainEventCallbackDeviceAddedMsg struct {
+ CallbackID int32
+ Dom Domain
+ DevAlias string
+}
+
+// ConnectEventConnectionClosedMsg is libvirt's remote_connect_event_connection_closed_msg
+type ConnectEventConnectionClosedMsg struct {
+ Reason int32
+}
+
+// ConnectGetCPUModelNamesArgs is libvirt's remote_connect_get_cpu_model_names_args
+type ConnectGetCPUModelNamesArgs struct {
+ Arch string
+ NeedResults int32
+ Flags uint32
+}
+
+// ConnectGetCPUModelNamesRet is libvirt's remote_connect_get_cpu_model_names_ret
+type ConnectGetCPUModelNamesRet struct {
+ Models []string
+ Ret int32
+}
+
+// ConnectNetworkEventRegisterAnyArgs is libvirt's remote_connect_network_event_register_any_args
+type ConnectNetworkEventRegisterAnyArgs struct {
+ EventID int32
+ Net OptNetwork
+}
+
+// ConnectNetworkEventRegisterAnyRet is libvirt's remote_connect_network_event_register_any_ret
+type ConnectNetworkEventRegisterAnyRet struct {
+ CallbackID int32
+}
+
+// ConnectNetworkEventDeregisterAnyArgs is libvirt's remote_connect_network_event_deregister_any_args
+type ConnectNetworkEventDeregisterAnyArgs struct {
+ CallbackID int32
+}
+
+// NetworkEventLifecycleMsg is libvirt's remote_network_event_lifecycle_msg
+type NetworkEventLifecycleMsg struct {
+ CallbackID int32
+ Net Network
+ Event int32
+ Detail int32
+}
+
+// ConnectStoragePoolEventRegisterAnyArgs is libvirt's remote_connect_storage_pool_event_register_any_args
+type ConnectStoragePoolEventRegisterAnyArgs struct {
+ EventID int32
+ Pool OptStoragePool
+}
+
+// ConnectStoragePoolEventRegisterAnyRet is libvirt's remote_connect_storage_pool_event_register_any_ret
+type ConnectStoragePoolEventRegisterAnyRet struct {
+ CallbackID int32
+}
+
+// ConnectStoragePoolEventDeregisterAnyArgs is libvirt's remote_connect_storage_pool_event_deregister_any_args
+type ConnectStoragePoolEventDeregisterAnyArgs struct {
+ CallbackID int32
+}
+
+// StoragePoolEventLifecycleMsg is libvirt's remote_storage_pool_event_lifecycle_msg
+type StoragePoolEventLifecycleMsg struct {
+ CallbackID int32
+ Pool StoragePool
+ Event int32
+ Detail int32
+}
+
+// StoragePoolEventRefreshMsg is libvirt's remote_storage_pool_event_refresh_msg
+type StoragePoolEventRefreshMsg struct {
+ CallbackID int32
+ Pool StoragePool
+}
+
+// ConnectNodeDeviceEventRegisterAnyArgs is libvirt's remote_connect_node_device_event_register_any_args
+type ConnectNodeDeviceEventRegisterAnyArgs struct {
+ EventID int32
+ Dev OptNodeDevice
+}
+
+// ConnectNodeDeviceEventRegisterAnyRet is libvirt's remote_connect_node_device_event_register_any_ret
+type ConnectNodeDeviceEventRegisterAnyRet struct {
+ CallbackID int32
+}
+
+// ConnectNodeDeviceEventDeregisterAnyArgs is libvirt's remote_connect_node_device_event_deregister_any_args
+type ConnectNodeDeviceEventDeregisterAnyArgs struct {
+ CallbackID int32
+}
+
+// NodeDeviceEventLifecycleMsg is libvirt's remote_node_device_event_lifecycle_msg
+type NodeDeviceEventLifecycleMsg struct {
+ CallbackID int32
+ Dev NodeDevice
+ Event int32
+ Detail int32
+}
+
+// NodeDeviceEventUpdateMsg is libvirt's remote_node_device_event_update_msg
+type NodeDeviceEventUpdateMsg struct {
+ CallbackID int32
+ Dev NodeDevice
+}
+
+// DomainFsfreezeArgs is libvirt's remote_domain_fsfreeze_args
+type DomainFsfreezeArgs struct {
+ Dom Domain
+ Mountpoints []string
+ Flags uint32
+}
+
+// DomainFsfreezeRet is libvirt's remote_domain_fsfreeze_ret
+type DomainFsfreezeRet struct {
+ Filesystems int32
+}
+
+// DomainFsthawArgs is libvirt's remote_domain_fsthaw_args
+type DomainFsthawArgs struct {
+ Dom Domain
+ Mountpoints []string
+ Flags uint32
+}
+
+// DomainFsthawRet is libvirt's remote_domain_fsthaw_ret
+type DomainFsthawRet struct {
+ Filesystems int32
+}
+
+// NodeGetFreePagesArgs is libvirt's remote_node_get_free_pages_args
+type NodeGetFreePagesArgs struct {
+ Pages []uint32
+ StartCell int32
+ CellCount uint32
+ Flags uint32
+}
+
+// NodeGetFreePagesRet is libvirt's remote_node_get_free_pages_ret
+type NodeGetFreePagesRet struct {
+ Counts []uint64
+}
+
+// NodeAllocPagesArgs is libvirt's remote_node_alloc_pages_args
+type NodeAllocPagesArgs struct {
+ PageSizes []uint32
+ PageCounts []uint64
+ StartCell int32
+ CellCount uint32
+ Flags NodeAllocPagesFlags
+}
+
+// NodeAllocPagesRet is libvirt's remote_node_alloc_pages_ret
+type NodeAllocPagesRet struct {
+ Ret int32
+}
+
+// NetworkDhcpLease is libvirt's remote_network_dhcp_lease
+type NetworkDhcpLease struct {
+ Iface string
+ Expirytime int64
+ Type int32
+ Mac OptString
+ Iaid OptString
+ Ipaddr string
+ Prefix uint32
+ Hostname OptString
+ Clientid OptString
+}
+
+// NetworkGetDhcpLeasesArgs is libvirt's remote_network_get_dhcp_leases_args
+type NetworkGetDhcpLeasesArgs struct {
+ Net Network
+ Mac OptString
+ NeedResults int32
+ Flags uint32
+}
+
+// NetworkGetDhcpLeasesRet is libvirt's remote_network_get_dhcp_leases_ret
+type NetworkGetDhcpLeasesRet struct {
+ Leases []NetworkDhcpLease
+ Ret uint32
+}
+
+// DomainStatsRecord is libvirt's remote_domain_stats_record
+type DomainStatsRecord struct {
+ Dom Domain
+ Params []TypedParam
+}
+
+// ConnectGetAllDomainStatsArgs is libvirt's remote_connect_get_all_domain_stats_args
+type ConnectGetAllDomainStatsArgs struct {
+ Doms []Domain
+ Stats uint32
+ Flags ConnectGetAllDomainStatsFlags
+}
+
+// DomainEventCallbackAgentLifecycleMsg is libvirt's remote_domain_event_callback_agent_lifecycle_msg
+type DomainEventCallbackAgentLifecycleMsg struct {
+ CallbackID int32
+ Dom Domain
+ State int32
+ Reason int32
+}
+
+// ConnectGetAllDomainStatsRet is libvirt's remote_connect_get_all_domain_stats_ret
+type ConnectGetAllDomainStatsRet struct {
+ RetStats []DomainStatsRecord
+}
+
+// DomainFsinfo is libvirt's remote_domain_fsinfo
+type DomainFsinfo struct {
+ Mountpoint string
+ Name string
+ Fstype string
+ DevAliases []string
+}
+
+// DomainGetFsinfoArgs is libvirt's remote_domain_get_fsinfo_args
+type DomainGetFsinfoArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainGetFsinfoRet is libvirt's remote_domain_get_fsinfo_ret
+type DomainGetFsinfoRet struct {
+ Info []DomainFsinfo
+ Ret uint32
+}
+
+// DomainIPAddr is libvirt's remote_domain_ip_addr
+type DomainIPAddr struct {
+ Type int32
+ Addr string
+ Prefix uint32
+}
+
+// DomainInterface is libvirt's remote_domain_interface
+type DomainInterface struct {
+ Name string
+ Hwaddr OptString
+ Addrs []DomainIPAddr
+}
+
+// DomainInterfaceAddressesArgs is libvirt's remote_domain_interface_addresses_args
+type DomainInterfaceAddressesArgs struct {
+ Dom Domain
+ Source uint32
+ Flags uint32
+}
+
+// DomainInterfaceAddressesRet is libvirt's remote_domain_interface_addresses_ret
+type DomainInterfaceAddressesRet struct {
+ Ifaces []DomainInterface
+}
+
+// DomainSetUserPasswordArgs is libvirt's remote_domain_set_user_password_args
+type DomainSetUserPasswordArgs struct {
+ Dom Domain
+ User OptString
+ Password OptString
+ Flags DomainSetUserPasswordFlags
+}
+
+// DomainRenameArgs is libvirt's remote_domain_rename_args
+type DomainRenameArgs struct {
+ Dom Domain
+ NewName OptString
+ Flags uint32
+}
+
+// DomainRenameRet is libvirt's remote_domain_rename_ret
+type DomainRenameRet struct {
+ Retcode int32
+}
+
+// DomainEventCallbackMigrationIterationMsg is libvirt's remote_domain_event_callback_migration_iteration_msg
+type DomainEventCallbackMigrationIterationMsg struct {
+ CallbackID int32
+ Dom Domain
+ Iteration int32
+}
+
+// DomainEventCallbackJobCompletedMsg is libvirt's remote_domain_event_callback_job_completed_msg
+type DomainEventCallbackJobCompletedMsg struct {
+ CallbackID int32
+ Dom Domain
+ Params []TypedParam
+}
+
+// DomainMigrateStartPostCopyArgs is libvirt's remote_domain_migrate_start_post_copy_args
+type DomainMigrateStartPostCopyArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainEventCallbackDeviceRemovalFailedMsg is libvirt's remote_domain_event_callback_device_removal_failed_msg
+type DomainEventCallbackDeviceRemovalFailedMsg struct {
+ CallbackID int32
+ Dom Domain
+ DevAlias string
+}
+
+// DomainGetGuestVcpusArgs is libvirt's remote_domain_get_guest_vcpus_args
+type DomainGetGuestVcpusArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainGetGuestVcpusRet is libvirt's remote_domain_get_guest_vcpus_ret
+type DomainGetGuestVcpusRet struct {
+ Params []TypedParam
+}
+
+// DomainSetGuestVcpusArgs is libvirt's remote_domain_set_guest_vcpus_args
+type DomainSetGuestVcpusArgs struct {
+ Dom Domain
+ Cpumap string
+ State int32
+ Flags uint32
+}
+
+// DomainSetVcpuArgs is libvirt's remote_domain_set_vcpu_args
+type DomainSetVcpuArgs struct {
+ Dom Domain
+ Cpumap string
+ State int32
+ Flags DomainModificationImpact
+}
+
+// DomainEventCallbackMetadataChangeMsg is libvirt's remote_domain_event_callback_metadata_change_msg
+type DomainEventCallbackMetadataChangeMsg struct {
+ CallbackID int32
+ Dom Domain
+ Type int32
+ Nsuri OptString
+}
+
+// DomainEventMemoryFailureMsg is libvirt's remote_domain_event_memory_failure_msg
+type DomainEventMemoryFailureMsg struct {
+ CallbackID int32
+ Dom Domain
+ Recipient int32
+ Action int32
+ Flags uint32
+}
+
+// ConnectSecretEventRegisterAnyArgs is libvirt's remote_connect_secret_event_register_any_args
+type ConnectSecretEventRegisterAnyArgs struct {
+ EventID int32
+ OptSecret OptSecret
+}
+
+// ConnectSecretEventRegisterAnyRet is libvirt's remote_connect_secret_event_register_any_ret
+type ConnectSecretEventRegisterAnyRet struct {
+ CallbackID int32
+}
+
+// ConnectSecretEventDeregisterAnyArgs is libvirt's remote_connect_secret_event_deregister_any_args
+type ConnectSecretEventDeregisterAnyArgs struct {
+ CallbackID int32
+}
+
+// SecretEventLifecycleMsg is libvirt's remote_secret_event_lifecycle_msg
+type SecretEventLifecycleMsg struct {
+ CallbackID int32
+ OptSecret Secret
+ Event int32
+ Detail int32
+}
+
+// SecretEventValueChangedMsg is libvirt's remote_secret_event_value_changed_msg
+type SecretEventValueChangedMsg struct {
+ CallbackID int32
+ OptSecret Secret
+}
+
+// DomainSetBlockThresholdArgs is libvirt's remote_domain_set_block_threshold_args
+type DomainSetBlockThresholdArgs struct {
+ Dom Domain
+ Dev string
+ Threshold uint64
+ Flags uint32
+}
+
+// DomainSetLifecycleActionArgs is libvirt's remote_domain_set_lifecycle_action_args
+type DomainSetLifecycleActionArgs struct {
+ Dom Domain
+ Type uint32
+ Action uint32
+ Flags DomainModificationImpact
+}
+
+// ConnectCompareHypervisorCPUArgs is libvirt's remote_connect_compare_hypervisor_cpu_args
+type ConnectCompareHypervisorCPUArgs struct {
+ Emulator OptString
+ Arch OptString
+ Machine OptString
+ Virttype OptString
+ XMLCPU string
+ Flags uint32
+}
+
+// ConnectCompareHypervisorCPURet is libvirt's remote_connect_compare_hypervisor_cpu_ret
+type ConnectCompareHypervisorCPURet struct {
+ Result int32
+}
+
+// ConnectBaselineHypervisorCPUArgs is libvirt's remote_connect_baseline_hypervisor_cpu_args
+type ConnectBaselineHypervisorCPUArgs struct {
+ Emulator OptString
+ Arch OptString
+ Machine OptString
+ Virttype OptString
+ XMLCPUs []string
+ Flags uint32
+}
+
+// ConnectBaselineHypervisorCPURet is libvirt's remote_connect_baseline_hypervisor_cpu_ret
+type ConnectBaselineHypervisorCPURet struct {
+ CPU string
+}
+
+// NodeGetSevInfoArgs is libvirt's remote_node_get_sev_info_args
+type NodeGetSevInfoArgs struct {
+ Nparams int32
+ Flags uint32
+}
+
+// NodeGetSevInfoRet is libvirt's remote_node_get_sev_info_ret
+type NodeGetSevInfoRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// DomainGetLaunchSecurityInfoArgs is libvirt's remote_domain_get_launch_security_info_args
+type DomainGetLaunchSecurityInfoArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainGetLaunchSecurityInfoRet is libvirt's remote_domain_get_launch_security_info_ret
+type DomainGetLaunchSecurityInfoRet struct {
+ Params []TypedParam
+}
+
+// NwfilterBindingLookupByPortDevArgs is libvirt's remote_nwfilter_binding_lookup_by_port_dev_args
+type NwfilterBindingLookupByPortDevArgs struct {
+ Name string
+}
+
+// NwfilterBindingLookupByPortDevRet is libvirt's remote_nwfilter_binding_lookup_by_port_dev_ret
+type NwfilterBindingLookupByPortDevRet struct {
+ OptNwfilter NwfilterBinding
+}
+
+// NwfilterBindingCreateXMLArgs is libvirt's remote_nwfilter_binding_create_xml_args
+type NwfilterBindingCreateXMLArgs struct {
+ XML string
+ Flags uint32
+}
+
+// NwfilterBindingCreateXMLRet is libvirt's remote_nwfilter_binding_create_xml_ret
+type NwfilterBindingCreateXMLRet struct {
+ OptNwfilter NwfilterBinding
+}
+
+// NwfilterBindingDeleteArgs is libvirt's remote_nwfilter_binding_delete_args
+type NwfilterBindingDeleteArgs struct {
+ OptNwfilter NwfilterBinding
+}
+
+// NwfilterBindingGetXMLDescArgs is libvirt's remote_nwfilter_binding_get_xml_desc_args
+type NwfilterBindingGetXMLDescArgs struct {
+ OptNwfilter NwfilterBinding
+ Flags uint32
+}
+
+// NwfilterBindingGetXMLDescRet is libvirt's remote_nwfilter_binding_get_xml_desc_ret
+type NwfilterBindingGetXMLDescRet struct {
+ XML string
+}
+
+// ConnectListAllNwfilterBindingsArgs is libvirt's remote_connect_list_all_nwfilter_bindings_args
+type ConnectListAllNwfilterBindingsArgs struct {
+ NeedResults int32
+ Flags uint32
+}
+
+// ConnectListAllNwfilterBindingsRet is libvirt's remote_connect_list_all_nwfilter_bindings_ret
+type ConnectListAllNwfilterBindingsRet struct {
+ Bindings []NwfilterBinding
+ Ret uint32
+}
+
+// ConnectGetStoragePoolCapabilitiesArgs is libvirt's remote_connect_get_storage_pool_capabilities_args
+type ConnectGetStoragePoolCapabilitiesArgs struct {
+ Flags uint32
+}
+
+// ConnectGetStoragePoolCapabilitiesRet is libvirt's remote_connect_get_storage_pool_capabilities_ret
+type ConnectGetStoragePoolCapabilitiesRet struct {
+ Capabilities string
+}
+
+// NetworkListAllPortsArgs is libvirt's remote_network_list_all_ports_args
+type NetworkListAllPortsArgs struct {
+ OptNetwork Network
+ NeedResults int32
+ Flags uint32
+}
+
+// NetworkListAllPortsRet is libvirt's remote_network_list_all_ports_ret
+type NetworkListAllPortsRet struct {
+ Ports []NetworkPort
+ Ret uint32
+}
+
+// NetworkPortLookupByUUIDArgs is libvirt's remote_network_port_lookup_by_uuid_args
+type NetworkPortLookupByUUIDArgs struct {
+ OptNetwork Network
+ UUID UUID
+}
+
+// NetworkPortLookupByUUIDRet is libvirt's remote_network_port_lookup_by_uuid_ret
+type NetworkPortLookupByUUIDRet struct {
+ Port NetworkPort
+}
+
+// NetworkPortCreateXMLArgs is libvirt's remote_network_port_create_xml_args
+type NetworkPortCreateXMLArgs struct {
+ OptNetwork Network
+ XML string
+ Flags uint32
+}
+
+// NetworkPortCreateXMLRet is libvirt's remote_network_port_create_xml_ret
+type NetworkPortCreateXMLRet struct {
+ Port NetworkPort
+}
+
+// NetworkPortSetParametersArgs is libvirt's remote_network_port_set_parameters_args
+type NetworkPortSetParametersArgs struct {
+ Port NetworkPort
+ Params []TypedParam
+ Flags uint32
+}
+
+// NetworkPortGetParametersArgs is libvirt's remote_network_port_get_parameters_args
+type NetworkPortGetParametersArgs struct {
+ Port NetworkPort
+ Nparams int32
+ Flags uint32
+}
+
+// NetworkPortGetParametersRet is libvirt's remote_network_port_get_parameters_ret
+type NetworkPortGetParametersRet struct {
+ Params []TypedParam
+ Nparams int32
+}
+
+// NetworkPortGetXMLDescArgs is libvirt's remote_network_port_get_xml_desc_args
+type NetworkPortGetXMLDescArgs struct {
+ Port NetworkPort
+ Flags uint32
+}
+
+// NetworkPortGetXMLDescRet is libvirt's remote_network_port_get_xml_desc_ret
+type NetworkPortGetXMLDescRet struct {
+ XML string
+}
+
+// NetworkPortDeleteArgs is libvirt's remote_network_port_delete_args
+type NetworkPortDeleteArgs struct {
+ Port NetworkPort
+ Flags uint32
+}
+
+// DomainCheckpointCreateXMLArgs is libvirt's remote_domain_checkpoint_create_xml_args
+type DomainCheckpointCreateXMLArgs struct {
+ Dom Domain
+ XMLDesc string
+ Flags uint32
+}
+
+// DomainCheckpointCreateXMLRet is libvirt's remote_domain_checkpoint_create_xml_ret
+type DomainCheckpointCreateXMLRet struct {
+ Checkpoint DomainCheckpoint
+}
+
+// DomainCheckpointGetXMLDescArgs is libvirt's remote_domain_checkpoint_get_xml_desc_args
+type DomainCheckpointGetXMLDescArgs struct {
+ Checkpoint DomainCheckpoint
+ Flags uint32
+}
+
+// DomainCheckpointGetXMLDescRet is libvirt's remote_domain_checkpoint_get_xml_desc_ret
+type DomainCheckpointGetXMLDescRet struct {
+ XML string
+}
+
+// DomainListAllCheckpointsArgs is libvirt's remote_domain_list_all_checkpoints_args
+type DomainListAllCheckpointsArgs struct {
+ Dom Domain
+ NeedResults int32
+ Flags uint32
+}
+
+// DomainListAllCheckpointsRet is libvirt's remote_domain_list_all_checkpoints_ret
+type DomainListAllCheckpointsRet struct {
+ Checkpoints []DomainCheckpoint
+ Ret int32
+}
+
+// DomainCheckpointListAllChildrenArgs is libvirt's remote_domain_checkpoint_list_all_children_args
+type DomainCheckpointListAllChildrenArgs struct {
+ Checkpoint DomainCheckpoint
+ NeedResults int32
+ Flags uint32
+}
+
+// DomainCheckpointListAllChildrenRet is libvirt's remote_domain_checkpoint_list_all_children_ret
+type DomainCheckpointListAllChildrenRet struct {
+ Checkpoints []DomainCheckpoint
+ Ret int32
+}
+
+// DomainCheckpointLookupByNameArgs is libvirt's remote_domain_checkpoint_lookup_by_name_args
+type DomainCheckpointLookupByNameArgs struct {
+ Dom Domain
+ Name string
+ Flags uint32
+}
+
+// DomainCheckpointLookupByNameRet is libvirt's remote_domain_checkpoint_lookup_by_name_ret
+type DomainCheckpointLookupByNameRet struct {
+ Checkpoint DomainCheckpoint
+}
+
+// DomainCheckpointGetParentArgs is libvirt's remote_domain_checkpoint_get_parent_args
+type DomainCheckpointGetParentArgs struct {
+ Checkpoint DomainCheckpoint
+ Flags uint32
+}
+
+// DomainCheckpointGetParentRet is libvirt's remote_domain_checkpoint_get_parent_ret
+type DomainCheckpointGetParentRet struct {
+ Parent DomainCheckpoint
+}
+
+// DomainCheckpointDeleteArgs is libvirt's remote_domain_checkpoint_delete_args
+type DomainCheckpointDeleteArgs struct {
+ Checkpoint DomainCheckpoint
+ Flags DomainCheckpointDeleteFlags
+}
+
+// DomainGetGuestInfoArgs is libvirt's remote_domain_get_guest_info_args
+type DomainGetGuestInfoArgs struct {
+ Dom Domain
+ Types uint32
+ Flags uint32
+}
+
+// DomainGetGuestInfoRet is libvirt's remote_domain_get_guest_info_ret
+type DomainGetGuestInfoRet struct {
+ Params []TypedParam
+}
+
+// ConnectSetIdentityArgs is libvirt's remote_connect_set_identity_args
+type ConnectSetIdentityArgs struct {
+ Params []TypedParam
+ Flags uint32
+}
+
+// DomainAgentSetResponseTimeoutArgs is libvirt's remote_domain_agent_set_response_timeout_args
+type DomainAgentSetResponseTimeoutArgs struct {
+ Dom Domain
+ Timeout int32
+ Flags uint32
+}
+
+// DomainAgentSetResponseTimeoutRet is libvirt's remote_domain_agent_set_response_timeout_ret
+type DomainAgentSetResponseTimeoutRet struct {
+ Result int32
+}
+
+// DomainBackupBeginArgs is libvirt's remote_domain_backup_begin_args
+type DomainBackupBeginArgs struct {
+ Dom Domain
+ BackupXML string
+ CheckpointXML OptString
+ Flags DomainBackupBeginFlags
+}
+
+// DomainBackupGetXMLDescArgs is libvirt's remote_domain_backup_get_xml_desc_args
+type DomainBackupGetXMLDescArgs struct {
+ Dom Domain
+ Flags uint32
+}
+
+// DomainBackupGetXMLDescRet is libvirt's remote_domain_backup_get_xml_desc_ret
+type DomainBackupGetXMLDescRet struct {
+ XML string
+}
+
+// DomainAuthorizedSshKeysGetArgs is libvirt's remote_domain_authorized_ssh_keys_get_args
+type DomainAuthorizedSshKeysGetArgs struct {
+ Dom Domain
+ User string
+ Flags uint32
+}
+
+// DomainAuthorizedSshKeysGetRet is libvirt's remote_domain_authorized_ssh_keys_get_ret
+type DomainAuthorizedSshKeysGetRet struct {
+ Keys []string
+}
+
+// DomainAuthorizedSshKeysSetArgs is libvirt's remote_domain_authorized_ssh_keys_set_args
+type DomainAuthorizedSshKeysSetArgs struct {
+ Dom Domain
+ User string
+ Keys []string
+ Flags uint32
+}
+
+
+// TypedParamValue is a discriminated union.
+type TypedParamValue struct {
+ D uint32
+ I interface{}
+}
+
+// NewTypedParamValueInt creates a discriminated union value satisfying
+// the TypedParamValue interface.
+func NewTypedParamValueInt(v int32) *TypedParamValue {
+ return &TypedParamValue{D: 1, I: v}
+}
+
+// NewTypedParamValueUint creates a discriminated union value satisfying
+// the TypedParamValue interface.
+func NewTypedParamValueUint(v uint32) *TypedParamValue {
+ return &TypedParamValue{D: 2, I: v}
+}
+
+// NewTypedParamValueLlong creates a discriminated union value satisfying
+// the TypedParamValue interface.
+func NewTypedParamValueLlong(v int64) *TypedParamValue {
+ return &TypedParamValue{D: 3, I: v}
+}
+
+// NewTypedParamValueUllong creates a discriminated union value satisfying
+// the TypedParamValue interface.
+func NewTypedParamValueUllong(v uint64) *TypedParamValue {
+ return &TypedParamValue{D: 4, I: v}
+}
+
+// NewTypedParamValueDouble creates a discriminated union value satisfying
+// the TypedParamValue interface.
+func NewTypedParamValueDouble(v float64) *TypedParamValue {
+ return &TypedParamValue{D: 5, I: v}
+}
+
+// NewTypedParamValueBoolean creates a discriminated union value satisfying
+// the TypedParamValue interface.
+func NewTypedParamValueBoolean(v int32) *TypedParamValue {
+ return &TypedParamValue{D: 6, I: v}
+}
+
+// NewTypedParamValueString creates a discriminated union value satisfying
+// the TypedParamValue interface.
+func NewTypedParamValueString(v string) *TypedParamValue {
+ return &TypedParamValue{D: 7, I: v}
+}
+
+
+// ConnectOpen is the go wrapper for REMOTE_PROC_CONNECT_OPEN.
+func (l *Libvirt) ConnectOpen(Name OptString, Flags ConnectFlags) (err error) {
+ var buf []byte
+
+ args := ConnectOpenArgs {
+ Name: Name,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(1, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectClose is the go wrapper for REMOTE_PROC_CONNECT_CLOSE.
+func (l *Libvirt) ConnectClose() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(2, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetType is the go wrapper for REMOTE_PROC_CONNECT_GET_TYPE.
+func (l *Libvirt) ConnectGetType() (rType string, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(3, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Type: string
+ _, err = dec.Decode(&rType)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetVersion is the go wrapper for REMOTE_PROC_CONNECT_GET_VERSION.
+func (l *Libvirt) ConnectGetVersion() (rHvVer uint64, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(4, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // HvVer: uint64
+ _, err = dec.Decode(&rHvVer)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetMaxVcpus is the go wrapper for REMOTE_PROC_CONNECT_GET_MAX_VCPUS.
+func (l *Libvirt) ConnectGetMaxVcpus(Type OptString) (rMaxVcpus int32, err error) {
+ var buf []byte
+
+ args := ConnectGetMaxVcpusArgs {
+ Type: Type,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(5, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // MaxVcpus: int32
+ _, err = dec.Decode(&rMaxVcpus)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetInfo is the go wrapper for REMOTE_PROC_NODE_GET_INFO.
+func (l *Libvirt) NodeGetInfo() (rModel [32]int8, rMemory uint64, rCpus int32, rMhz int32, rNodes int32, rSockets int32, rCores int32, rThreads int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(6, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Model: [32]int8
+ _, err = dec.Decode(&rModel)
+ if err != nil {
+ return
+ }
+ // Memory: uint64
+ _, err = dec.Decode(&rMemory)
+ if err != nil {
+ return
+ }
+ // Cpus: int32
+ _, err = dec.Decode(&rCpus)
+ if err != nil {
+ return
+ }
+ // Mhz: int32
+ _, err = dec.Decode(&rMhz)
+ if err != nil {
+ return
+ }
+ // Nodes: int32
+ _, err = dec.Decode(&rNodes)
+ if err != nil {
+ return
+ }
+ // Sockets: int32
+ _, err = dec.Decode(&rSockets)
+ if err != nil {
+ return
+ }
+ // Cores: int32
+ _, err = dec.Decode(&rCores)
+ if err != nil {
+ return
+ }
+ // Threads: int32
+ _, err = dec.Decode(&rThreads)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetCapabilities is the go wrapper for REMOTE_PROC_CONNECT_GET_CAPABILITIES.
+func (l *Libvirt) ConnectGetCapabilities() (rCapabilities string, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(7, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Capabilities: string
+ _, err = dec.Decode(&rCapabilities)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainAttachDevice is the go wrapper for REMOTE_PROC_DOMAIN_ATTACH_DEVICE.
+func (l *Libvirt) DomainAttachDevice(Dom Domain, XML string) (err error) {
+ var buf []byte
+
+ args := DomainAttachDeviceArgs {
+ Dom: Dom,
+ XML: XML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(8, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCreate is the go wrapper for REMOTE_PROC_DOMAIN_CREATE.
+func (l *Libvirt) DomainCreate(Dom Domain) (err error) {
+ var buf []byte
+
+ args := DomainCreateArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(9, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCreateXML is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_XML.
+func (l *Libvirt) DomainCreateXML(XMLDesc string, Flags DomainCreateFlags) (rDom Domain, err error) {
+ var buf []byte
+
+ args := DomainCreateXMLArgs {
+ XMLDesc: XMLDesc,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(10, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainDefineXML is the go wrapper for REMOTE_PROC_DOMAIN_DEFINE_XML.
+func (l *Libvirt) DomainDefineXML(XML string) (rDom Domain, err error) {
+ var buf []byte
+
+ args := DomainDefineXMLArgs {
+ XML: XML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(11, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainDestroy is the go wrapper for REMOTE_PROC_DOMAIN_DESTROY.
+func (l *Libvirt) DomainDestroy(Dom Domain) (err error) {
+ var buf []byte
+
+ args := DomainDestroyArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(12, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainDetachDevice is the go wrapper for REMOTE_PROC_DOMAIN_DETACH_DEVICE.
+func (l *Libvirt) DomainDetachDevice(Dom Domain, XML string) (err error) {
+ var buf []byte
+
+ args := DomainDetachDeviceArgs {
+ Dom: Dom,
+ XML: XML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(13, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_GET_XML_DESC.
+func (l *Libvirt) DomainGetXMLDesc(Dom Domain, Flags DomainXMLFlags) (rXML string, err error) {
+ var buf []byte
+
+ args := DomainGetXMLDescArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(14, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetAutostart is the go wrapper for REMOTE_PROC_DOMAIN_GET_AUTOSTART.
+func (l *Libvirt) DomainGetAutostart(Dom Domain) (rAutostart int32, err error) {
+ var buf []byte
+
+ args := DomainGetAutostartArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(15, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Autostart: int32
+ _, err = dec.Decode(&rAutostart)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_INFO.
+func (l *Libvirt) DomainGetInfo(Dom Domain) (rState uint8, rMaxMem uint64, rMemory uint64, rNrVirtCPU uint16, rCPUTime uint64, err error) {
+ var buf []byte
+
+ args := DomainGetInfoArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(16, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // State: uint8
+ _, err = dec.Decode(&rState)
+ if err != nil {
+ return
+ }
+ // MaxMem: uint64
+ _, err = dec.Decode(&rMaxMem)
+ if err != nil {
+ return
+ }
+ // Memory: uint64
+ _, err = dec.Decode(&rMemory)
+ if err != nil {
+ return
+ }
+ // NrVirtCPU: uint16
+ _, err = dec.Decode(&rNrVirtCPU)
+ if err != nil {
+ return
+ }
+ // CPUTime: uint64
+ _, err = dec.Decode(&rCPUTime)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetMaxMemory is the go wrapper for REMOTE_PROC_DOMAIN_GET_MAX_MEMORY.
+func (l *Libvirt) DomainGetMaxMemory(Dom Domain) (rMemory uint64, err error) {
+ var buf []byte
+
+ args := DomainGetMaxMemoryArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(17, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Memory: uint64
+ _, err = dec.Decode(&rMemory)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetMaxVcpus is the go wrapper for REMOTE_PROC_DOMAIN_GET_MAX_VCPUS.
+func (l *Libvirt) DomainGetMaxVcpus(Dom Domain) (rNum int32, err error) {
+ var buf []byte
+
+ args := DomainGetMaxVcpusArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(18, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetOsType is the go wrapper for REMOTE_PROC_DOMAIN_GET_OS_TYPE.
+func (l *Libvirt) DomainGetOsType(Dom Domain) (rType string, err error) {
+ var buf []byte
+
+ args := DomainGetOsTypeArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(19, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Type: string
+ _, err = dec.Decode(&rType)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetVcpus is the go wrapper for REMOTE_PROC_DOMAIN_GET_VCPUS.
+func (l *Libvirt) DomainGetVcpus(Dom Domain, Maxinfo int32, Maplen int32) (rInfo []VcpuInfo, rCpumaps []byte, err error) {
+ var buf []byte
+
+ args := DomainGetVcpusArgs {
+ Dom: Dom,
+ Maxinfo: Maxinfo,
+ Maplen: Maplen,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(20, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Info: []VcpuInfo
+ _, err = dec.Decode(&rInfo)
+ if err != nil {
+ return
+ }
+ // Cpumaps: []byte
+ _, err = dec.Decode(&rCpumaps)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListDefinedDomains is the go wrapper for REMOTE_PROC_CONNECT_LIST_DEFINED_DOMAINS.
+func (l *Libvirt) ConnectListDefinedDomains(Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := ConnectListDefinedDomainsArgs {
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(21, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainLookupByID is the go wrapper for REMOTE_PROC_DOMAIN_LOOKUP_BY_ID.
+func (l *Libvirt) DomainLookupByID(ID int32) (rDom Domain, err error) {
+ var buf []byte
+
+ args := DomainLookupByIDArgs {
+ ID: ID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(22, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainLookupByName is the go wrapper for REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME.
+func (l *Libvirt) DomainLookupByName(Name string) (rDom Domain, err error) {
+ var buf []byte
+
+ args := DomainLookupByNameArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(23, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainLookupByUUID is the go wrapper for REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID.
+func (l *Libvirt) DomainLookupByUUID(UUID UUID) (rDom Domain, err error) {
+ var buf []byte
+
+ args := DomainLookupByUUIDArgs {
+ UUID: UUID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(24, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfDefinedDomains is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DEFINED_DOMAINS.
+func (l *Libvirt) ConnectNumOfDefinedDomains() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(25, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainPinVcpu is the go wrapper for REMOTE_PROC_DOMAIN_PIN_VCPU.
+func (l *Libvirt) DomainPinVcpu(Dom Domain, Vcpu uint32, Cpumap []byte) (err error) {
+ var buf []byte
+
+ args := DomainPinVcpuArgs {
+ Dom: Dom,
+ Vcpu: Vcpu,
+ Cpumap: Cpumap,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(26, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainReboot is the go wrapper for REMOTE_PROC_DOMAIN_REBOOT.
+func (l *Libvirt) DomainReboot(Dom Domain, Flags DomainRebootFlagValues) (err error) {
+ var buf []byte
+
+ args := DomainRebootArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(27, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainResume is the go wrapper for REMOTE_PROC_DOMAIN_RESUME.
+func (l *Libvirt) DomainResume(Dom Domain) (err error) {
+ var buf []byte
+
+ args := DomainResumeArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(28, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetAutostart is the go wrapper for REMOTE_PROC_DOMAIN_SET_AUTOSTART.
+func (l *Libvirt) DomainSetAutostart(Dom Domain, Autostart int32) (err error) {
+ var buf []byte
+
+ args := DomainSetAutostartArgs {
+ Dom: Dom,
+ Autostart: Autostart,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(29, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetMaxMemory is the go wrapper for REMOTE_PROC_DOMAIN_SET_MAX_MEMORY.
+func (l *Libvirt) DomainSetMaxMemory(Dom Domain, Memory uint64) (err error) {
+ var buf []byte
+
+ args := DomainSetMaxMemoryArgs {
+ Dom: Dom,
+ Memory: Memory,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(30, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetMemory is the go wrapper for REMOTE_PROC_DOMAIN_SET_MEMORY.
+func (l *Libvirt) DomainSetMemory(Dom Domain, Memory uint64) (err error) {
+ var buf []byte
+
+ args := DomainSetMemoryArgs {
+ Dom: Dom,
+ Memory: Memory,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(31, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetVcpus is the go wrapper for REMOTE_PROC_DOMAIN_SET_VCPUS.
+func (l *Libvirt) DomainSetVcpus(Dom Domain, Nvcpus uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetVcpusArgs {
+ Dom: Dom,
+ Nvcpus: Nvcpus,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(32, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainShutdown is the go wrapper for REMOTE_PROC_DOMAIN_SHUTDOWN.
+func (l *Libvirt) DomainShutdown(Dom Domain) (err error) {
+ var buf []byte
+
+ args := DomainShutdownArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(33, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSuspend is the go wrapper for REMOTE_PROC_DOMAIN_SUSPEND.
+func (l *Libvirt) DomainSuspend(Dom Domain) (err error) {
+ var buf []byte
+
+ args := DomainSuspendArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(34, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainUndefine is the go wrapper for REMOTE_PROC_DOMAIN_UNDEFINE.
+func (l *Libvirt) DomainUndefine(Dom Domain) (err error) {
+ var buf []byte
+
+ args := DomainUndefineArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(35, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListDefinedNetworks is the go wrapper for REMOTE_PROC_CONNECT_LIST_DEFINED_NETWORKS.
+func (l *Libvirt) ConnectListDefinedNetworks(Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := ConnectListDefinedNetworksArgs {
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(36, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListDomains is the go wrapper for REMOTE_PROC_CONNECT_LIST_DOMAINS.
+func (l *Libvirt) ConnectListDomains(Maxids int32) (rIds []int32, err error) {
+ var buf []byte
+
+ args := ConnectListDomainsArgs {
+ Maxids: Maxids,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(37, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Ids: []int32
+ _, err = dec.Decode(&rIds)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListNetworks is the go wrapper for REMOTE_PROC_CONNECT_LIST_NETWORKS.
+func (l *Libvirt) ConnectListNetworks(Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := ConnectListNetworksArgs {
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(38, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkCreate is the go wrapper for REMOTE_PROC_NETWORK_CREATE.
+func (l *Libvirt) NetworkCreate(Net Network) (err error) {
+ var buf []byte
+
+ args := NetworkCreateArgs {
+ Net: Net,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(39, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkCreateXML is the go wrapper for REMOTE_PROC_NETWORK_CREATE_XML.
+func (l *Libvirt) NetworkCreateXML(XML string) (rNet Network, err error) {
+ var buf []byte
+
+ args := NetworkCreateXMLArgs {
+ XML: XML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(40, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Net: Network
+ _, err = dec.Decode(&rNet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkDefineXML is the go wrapper for REMOTE_PROC_NETWORK_DEFINE_XML.
+func (l *Libvirt) NetworkDefineXML(XML string) (rNet Network, err error) {
+ var buf []byte
+
+ args := NetworkDefineXMLArgs {
+ XML: XML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(41, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Net: Network
+ _, err = dec.Decode(&rNet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkDestroy is the go wrapper for REMOTE_PROC_NETWORK_DESTROY.
+func (l *Libvirt) NetworkDestroy(Net Network) (err error) {
+ var buf []byte
+
+ args := NetworkDestroyArgs {
+ Net: Net,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(42, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkGetXMLDesc is the go wrapper for REMOTE_PROC_NETWORK_GET_XML_DESC.
+func (l *Libvirt) NetworkGetXMLDesc(Net Network, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := NetworkGetXMLDescArgs {
+ Net: Net,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(43, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkGetAutostart is the go wrapper for REMOTE_PROC_NETWORK_GET_AUTOSTART.
+func (l *Libvirt) NetworkGetAutostart(Net Network) (rAutostart int32, err error) {
+ var buf []byte
+
+ args := NetworkGetAutostartArgs {
+ Net: Net,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(44, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Autostart: int32
+ _, err = dec.Decode(&rAutostart)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkGetBridgeName is the go wrapper for REMOTE_PROC_NETWORK_GET_BRIDGE_NAME.
+func (l *Libvirt) NetworkGetBridgeName(Net Network) (rName string, err error) {
+ var buf []byte
+
+ args := NetworkGetBridgeNameArgs {
+ Net: Net,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(45, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Name: string
+ _, err = dec.Decode(&rName)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkLookupByName is the go wrapper for REMOTE_PROC_NETWORK_LOOKUP_BY_NAME.
+func (l *Libvirt) NetworkLookupByName(Name string) (rNet Network, err error) {
+ var buf []byte
+
+ args := NetworkLookupByNameArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(46, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Net: Network
+ _, err = dec.Decode(&rNet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkLookupByUUID is the go wrapper for REMOTE_PROC_NETWORK_LOOKUP_BY_UUID.
+func (l *Libvirt) NetworkLookupByUUID(UUID UUID) (rNet Network, err error) {
+ var buf []byte
+
+ args := NetworkLookupByUUIDArgs {
+ UUID: UUID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(47, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Net: Network
+ _, err = dec.Decode(&rNet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkSetAutostart is the go wrapper for REMOTE_PROC_NETWORK_SET_AUTOSTART.
+func (l *Libvirt) NetworkSetAutostart(Net Network, Autostart int32) (err error) {
+ var buf []byte
+
+ args := NetworkSetAutostartArgs {
+ Net: Net,
+ Autostart: Autostart,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(48, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkUndefine is the go wrapper for REMOTE_PROC_NETWORK_UNDEFINE.
+func (l *Libvirt) NetworkUndefine(Net Network) (err error) {
+ var buf []byte
+
+ args := NetworkUndefineArgs {
+ Net: Net,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(49, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfDefinedNetworks is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DEFINED_NETWORKS.
+func (l *Libvirt) ConnectNumOfDefinedNetworks() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(50, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfDomains is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DOMAINS.
+func (l *Libvirt) ConnectNumOfDomains() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(51, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfNetworks is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_NETWORKS.
+func (l *Libvirt) ConnectNumOfNetworks() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(52, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCoreDump is the go wrapper for REMOTE_PROC_DOMAIN_CORE_DUMP.
+func (l *Libvirt) DomainCoreDump(Dom Domain, To string, Flags DomainCoreDumpFlags) (err error) {
+ var buf []byte
+
+ args := DomainCoreDumpArgs {
+ Dom: Dom,
+ To: To,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(53, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainRestore is the go wrapper for REMOTE_PROC_DOMAIN_RESTORE.
+func (l *Libvirt) DomainRestore(From string) (err error) {
+ var buf []byte
+
+ args := DomainRestoreArgs {
+ From: From,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(54, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSave is the go wrapper for REMOTE_PROC_DOMAIN_SAVE.
+func (l *Libvirt) DomainSave(Dom Domain, To string) (err error) {
+ var buf []byte
+
+ args := DomainSaveArgs {
+ Dom: Dom,
+ To: To,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(55, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetSchedulerType is the go wrapper for REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE.
+func (l *Libvirt) DomainGetSchedulerType(Dom Domain) (rType string, rNparams int32, err error) {
+ var buf []byte
+
+ args := DomainGetSchedulerTypeArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(56, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Type: string
+ _, err = dec.Decode(&rType)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetSchedulerParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS.
+func (l *Libvirt) DomainGetSchedulerParameters(Dom Domain, Nparams int32) (rParams []TypedParam, err error) {
+ var buf []byte
+
+ args := DomainGetSchedulerParametersArgs {
+ Dom: Dom,
+ Nparams: Nparams,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(57, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetSchedulerParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS.
+func (l *Libvirt) DomainSetSchedulerParameters(Dom Domain, Params []TypedParam) (err error) {
+ var buf []byte
+
+ args := DomainSetSchedulerParametersArgs {
+ Dom: Dom,
+ Params: Params,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(58, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetHostname is the go wrapper for REMOTE_PROC_CONNECT_GET_HOSTNAME.
+func (l *Libvirt) ConnectGetHostname() (rHostname string, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(59, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Hostname: string
+ _, err = dec.Decode(&rHostname)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectSupportsFeature is the go wrapper for REMOTE_PROC_CONNECT_SUPPORTS_FEATURE.
+func (l *Libvirt) ConnectSupportsFeature(Feature int32) (rSupported int32, err error) {
+ var buf []byte
+
+ args := ConnectSupportsFeatureArgs {
+ Feature: Feature,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(60, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Supported: int32
+ _, err = dec.Decode(&rSupported)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePrepare is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE.
+func (l *Libvirt) DomainMigratePrepare(UriIn OptString, Flags uint64, Dname OptString, Resource uint64) (rCookie []byte, rUriOut OptString, err error) {
+ var buf []byte
+
+ args := DomainMigratePrepareArgs {
+ UriIn: UriIn,
+ Flags: Flags,
+ Dname: Dname,
+ Resource: Resource,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(61, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Cookie: []byte
+ _, err = dec.Decode(&rCookie)
+ if err != nil {
+ return
+ }
+ // UriOut: OptString
+ _, err = dec.Decode(&rUriOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePerform is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PERFORM.
+func (l *Libvirt) DomainMigratePerform(Dom Domain, Cookie []byte, Uri string, Flags uint64, Dname OptString, Resource uint64) (err error) {
+ var buf []byte
+
+ args := DomainMigratePerformArgs {
+ Dom: Dom,
+ Cookie: Cookie,
+ Uri: Uri,
+ Flags: Flags,
+ Dname: Dname,
+ Resource: Resource,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(62, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateFinish is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_FINISH.
+func (l *Libvirt) DomainMigrateFinish(Dname string, Cookie []byte, Uri string, Flags uint64) (rDdom Domain, err error) {
+ var buf []byte
+
+ args := DomainMigrateFinishArgs {
+ Dname: Dname,
+ Cookie: Cookie,
+ Uri: Uri,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(63, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Ddom: Domain
+ _, err = dec.Decode(&rDdom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockStats is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_STATS.
+func (l *Libvirt) DomainBlockStats(Dom Domain, Path string) (rRdReq int64, rRdBytes int64, rWrReq int64, rWrBytes int64, rErrs int64, err error) {
+ var buf []byte
+
+ args := DomainBlockStatsArgs {
+ Dom: Dom,
+ Path: Path,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(64, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // RdReq: int64
+ _, err = dec.Decode(&rRdReq)
+ if err != nil {
+ return
+ }
+ // RdBytes: int64
+ _, err = dec.Decode(&rRdBytes)
+ if err != nil {
+ return
+ }
+ // WrReq: int64
+ _, err = dec.Decode(&rWrReq)
+ if err != nil {
+ return
+ }
+ // WrBytes: int64
+ _, err = dec.Decode(&rWrBytes)
+ if err != nil {
+ return
+ }
+ // Errs: int64
+ _, err = dec.Decode(&rErrs)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainInterfaceStats is the go wrapper for REMOTE_PROC_DOMAIN_INTERFACE_STATS.
+func (l *Libvirt) DomainInterfaceStats(Dom Domain, Device string) (rRxBytes int64, rRxPackets int64, rRxErrs int64, rRxDrop int64, rTxBytes int64, rTxPackets int64, rTxErrs int64, rTxDrop int64, err error) {
+ var buf []byte
+
+ args := DomainInterfaceStatsArgs {
+ Dom: Dom,
+ Device: Device,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(65, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // RxBytes: int64
+ _, err = dec.Decode(&rRxBytes)
+ if err != nil {
+ return
+ }
+ // RxPackets: int64
+ _, err = dec.Decode(&rRxPackets)
+ if err != nil {
+ return
+ }
+ // RxErrs: int64
+ _, err = dec.Decode(&rRxErrs)
+ if err != nil {
+ return
+ }
+ // RxDrop: int64
+ _, err = dec.Decode(&rRxDrop)
+ if err != nil {
+ return
+ }
+ // TxBytes: int64
+ _, err = dec.Decode(&rTxBytes)
+ if err != nil {
+ return
+ }
+ // TxPackets: int64
+ _, err = dec.Decode(&rTxPackets)
+ if err != nil {
+ return
+ }
+ // TxErrs: int64
+ _, err = dec.Decode(&rTxErrs)
+ if err != nil {
+ return
+ }
+ // TxDrop: int64
+ _, err = dec.Decode(&rTxDrop)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// AuthList is the go wrapper for REMOTE_PROC_AUTH_LIST.
+func (l *Libvirt) AuthList() (rTypes []AuthType, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(66, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Types: []AuthType
+ _, err = dec.Decode(&rTypes)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// AuthSaslInit is the go wrapper for REMOTE_PROC_AUTH_SASL_INIT.
+func (l *Libvirt) AuthSaslInit() (rMechlist string, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(67, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Mechlist: string
+ _, err = dec.Decode(&rMechlist)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// AuthSaslStart is the go wrapper for REMOTE_PROC_AUTH_SASL_START.
+func (l *Libvirt) AuthSaslStart(Mech string, Nil int32, Data []int8) (rComplete int32, rNil int32, rData []int8, err error) {
+ var buf []byte
+
+ args := AuthSaslStartArgs {
+ Mech: Mech,
+ Nil: Nil,
+ Data: Data,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(68, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Complete: int32
+ _, err = dec.Decode(&rComplete)
+ if err != nil {
+ return
+ }
+ // Nil: int32
+ _, err = dec.Decode(&rNil)
+ if err != nil {
+ return
+ }
+ // Data: []int8
+ _, err = dec.Decode(&rData)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// AuthSaslStep is the go wrapper for REMOTE_PROC_AUTH_SASL_STEP.
+func (l *Libvirt) AuthSaslStep(Nil int32, Data []int8) (rComplete int32, rNil int32, rData []int8, err error) {
+ var buf []byte
+
+ args := AuthSaslStepArgs {
+ Nil: Nil,
+ Data: Data,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(69, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Complete: int32
+ _, err = dec.Decode(&rComplete)
+ if err != nil {
+ return
+ }
+ // Nil: int32
+ _, err = dec.Decode(&rNil)
+ if err != nil {
+ return
+ }
+ // Data: []int8
+ _, err = dec.Decode(&rData)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// AuthPolkit is the go wrapper for REMOTE_PROC_AUTH_POLKIT.
+func (l *Libvirt) AuthPolkit() (rComplete int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(70, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Complete: int32
+ _, err = dec.Decode(&rComplete)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfStoragePools is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_STORAGE_POOLS.
+func (l *Libvirt) ConnectNumOfStoragePools() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(71, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListStoragePools is the go wrapper for REMOTE_PROC_CONNECT_LIST_STORAGE_POOLS.
+func (l *Libvirt) ConnectListStoragePools(Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := ConnectListStoragePoolsArgs {
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(72, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfDefinedStoragePools is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DEFINED_STORAGE_POOLS.
+func (l *Libvirt) ConnectNumOfDefinedStoragePools() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(73, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListDefinedStoragePools is the go wrapper for REMOTE_PROC_CONNECT_LIST_DEFINED_STORAGE_POOLS.
+func (l *Libvirt) ConnectListDefinedStoragePools(Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := ConnectListDefinedStoragePoolsArgs {
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(74, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectFindStoragePoolSources is the go wrapper for REMOTE_PROC_CONNECT_FIND_STORAGE_POOL_SOURCES.
+func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec OptString, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := ConnectFindStoragePoolSourcesArgs {
+ Type: Type,
+ SrcSpec: SrcSpec,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(75, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolCreateXML is the go wrapper for REMOTE_PROC_STORAGE_POOL_CREATE_XML.
+func (l *Libvirt) StoragePoolCreateXML(XML string, Flags StoragePoolCreateFlags) (rPool StoragePool, err error) {
+ var buf []byte
+
+ args := StoragePoolCreateXMLArgs {
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(76, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Pool: StoragePool
+ _, err = dec.Decode(&rPool)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolDefineXML is the go wrapper for REMOTE_PROC_STORAGE_POOL_DEFINE_XML.
+func (l *Libvirt) StoragePoolDefineXML(XML string, Flags uint32) (rPool StoragePool, err error) {
+ var buf []byte
+
+ args := StoragePoolDefineXMLArgs {
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(77, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Pool: StoragePool
+ _, err = dec.Decode(&rPool)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolCreate is the go wrapper for REMOTE_PROC_STORAGE_POOL_CREATE.
+func (l *Libvirt) StoragePoolCreate(Pool StoragePool, Flags StoragePoolCreateFlags) (err error) {
+ var buf []byte
+
+ args := StoragePoolCreateArgs {
+ Pool: Pool,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(78, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolBuild is the go wrapper for REMOTE_PROC_STORAGE_POOL_BUILD.
+func (l *Libvirt) StoragePoolBuild(Pool StoragePool, Flags StoragePoolBuildFlags) (err error) {
+ var buf []byte
+
+ args := StoragePoolBuildArgs {
+ Pool: Pool,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(79, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolDestroy is the go wrapper for REMOTE_PROC_STORAGE_POOL_DESTROY.
+func (l *Libvirt) StoragePoolDestroy(Pool StoragePool) (err error) {
+ var buf []byte
+
+ args := StoragePoolDestroyArgs {
+ Pool: Pool,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(80, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolDelete is the go wrapper for REMOTE_PROC_STORAGE_POOL_DELETE.
+func (l *Libvirt) StoragePoolDelete(Pool StoragePool, Flags StoragePoolDeleteFlags) (err error) {
+ var buf []byte
+
+ args := StoragePoolDeleteArgs {
+ Pool: Pool,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(81, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolUndefine is the go wrapper for REMOTE_PROC_STORAGE_POOL_UNDEFINE.
+func (l *Libvirt) StoragePoolUndefine(Pool StoragePool) (err error) {
+ var buf []byte
+
+ args := StoragePoolUndefineArgs {
+ Pool: Pool,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(82, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolRefresh is the go wrapper for REMOTE_PROC_STORAGE_POOL_REFRESH.
+func (l *Libvirt) StoragePoolRefresh(Pool StoragePool, Flags uint32) (err error) {
+ var buf []byte
+
+ args := StoragePoolRefreshArgs {
+ Pool: Pool,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(83, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolLookupByName is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME.
+func (l *Libvirt) StoragePoolLookupByName(Name string) (rPool StoragePool, err error) {
+ var buf []byte
+
+ args := StoragePoolLookupByNameArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(84, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Pool: StoragePool
+ _, err = dec.Decode(&rPool)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolLookupByUUID is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID.
+func (l *Libvirt) StoragePoolLookupByUUID(UUID UUID) (rPool StoragePool, err error) {
+ var buf []byte
+
+ args := StoragePoolLookupByUUIDArgs {
+ UUID: UUID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(85, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Pool: StoragePool
+ _, err = dec.Decode(&rPool)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolLookupByVolume is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME.
+func (l *Libvirt) StoragePoolLookupByVolume(Vol StorageVol) (rPool StoragePool, err error) {
+ var buf []byte
+
+ args := StoragePoolLookupByVolumeArgs {
+ Vol: Vol,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(86, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Pool: StoragePool
+ _, err = dec.Decode(&rPool)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolGetInfo is the go wrapper for REMOTE_PROC_STORAGE_POOL_GET_INFO.
+func (l *Libvirt) StoragePoolGetInfo(Pool StoragePool) (rState uint8, rCapacity uint64, rAllocation uint64, rAvailable uint64, err error) {
+ var buf []byte
+
+ args := StoragePoolGetInfoArgs {
+ Pool: Pool,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(87, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // State: uint8
+ _, err = dec.Decode(&rState)
+ if err != nil {
+ return
+ }
+ // Capacity: uint64
+ _, err = dec.Decode(&rCapacity)
+ if err != nil {
+ return
+ }
+ // Allocation: uint64
+ _, err = dec.Decode(&rAllocation)
+ if err != nil {
+ return
+ }
+ // Available: uint64
+ _, err = dec.Decode(&rAvailable)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolGetXMLDesc is the go wrapper for REMOTE_PROC_STORAGE_POOL_GET_XML_DESC.
+func (l *Libvirt) StoragePoolGetXMLDesc(Pool StoragePool, Flags StorageXMLFlags) (rXML string, err error) {
+ var buf []byte
+
+ args := StoragePoolGetXMLDescArgs {
+ Pool: Pool,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(88, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolGetAutostart is the go wrapper for REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART.
+func (l *Libvirt) StoragePoolGetAutostart(Pool StoragePool) (rAutostart int32, err error) {
+ var buf []byte
+
+ args := StoragePoolGetAutostartArgs {
+ Pool: Pool,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(89, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Autostart: int32
+ _, err = dec.Decode(&rAutostart)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolSetAutostart is the go wrapper for REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART.
+func (l *Libvirt) StoragePoolSetAutostart(Pool StoragePool, Autostart int32) (err error) {
+ var buf []byte
+
+ args := StoragePoolSetAutostartArgs {
+ Pool: Pool,
+ Autostart: Autostart,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(90, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolNumOfVolumes is the go wrapper for REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES.
+func (l *Libvirt) StoragePoolNumOfVolumes(Pool StoragePool) (rNum int32, err error) {
+ var buf []byte
+
+ args := StoragePoolNumOfVolumesArgs {
+ Pool: Pool,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(91, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolListVolumes is the go wrapper for REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES.
+func (l *Libvirt) StoragePoolListVolumes(Pool StoragePool, Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := StoragePoolListVolumesArgs {
+ Pool: Pool,
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(92, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolCreateXML is the go wrapper for REMOTE_PROC_STORAGE_VOL_CREATE_XML.
+func (l *Libvirt) StorageVolCreateXML(Pool StoragePool, XML string, Flags StorageVolCreateFlags) (rVol StorageVol, err error) {
+ var buf []byte
+
+ args := StorageVolCreateXMLArgs {
+ Pool: Pool,
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(93, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Vol: StorageVol
+ _, err = dec.Decode(&rVol)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolDelete is the go wrapper for REMOTE_PROC_STORAGE_VOL_DELETE.
+func (l *Libvirt) StorageVolDelete(Vol StorageVol, Flags StorageVolDeleteFlags) (err error) {
+ var buf []byte
+
+ args := StorageVolDeleteArgs {
+ Vol: Vol,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(94, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolLookupByName is the go wrapper for REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME.
+func (l *Libvirt) StorageVolLookupByName(Pool StoragePool, Name string) (rVol StorageVol, err error) {
+ var buf []byte
+
+ args := StorageVolLookupByNameArgs {
+ Pool: Pool,
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(95, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Vol: StorageVol
+ _, err = dec.Decode(&rVol)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolLookupByKey is the go wrapper for REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY.
+func (l *Libvirt) StorageVolLookupByKey(Key string) (rVol StorageVol, err error) {
+ var buf []byte
+
+ args := StorageVolLookupByKeyArgs {
+ Key: Key,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(96, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Vol: StorageVol
+ _, err = dec.Decode(&rVol)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolLookupByPath is the go wrapper for REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH.
+func (l *Libvirt) StorageVolLookupByPath(Path string) (rVol StorageVol, err error) {
+ var buf []byte
+
+ args := StorageVolLookupByPathArgs {
+ Path: Path,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(97, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Vol: StorageVol
+ _, err = dec.Decode(&rVol)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolGetInfo is the go wrapper for REMOTE_PROC_STORAGE_VOL_GET_INFO.
+func (l *Libvirt) StorageVolGetInfo(Vol StorageVol) (rType int8, rCapacity uint64, rAllocation uint64, err error) {
+ var buf []byte
+
+ args := StorageVolGetInfoArgs {
+ Vol: Vol,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(98, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Type: int8
+ _, err = dec.Decode(&rType)
+ if err != nil {
+ return
+ }
+ // Capacity: uint64
+ _, err = dec.Decode(&rCapacity)
+ if err != nil {
+ return
+ }
+ // Allocation: uint64
+ _, err = dec.Decode(&rAllocation)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolGetXMLDesc is the go wrapper for REMOTE_PROC_STORAGE_VOL_GET_XML_DESC.
+func (l *Libvirt) StorageVolGetXMLDesc(Vol StorageVol, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := StorageVolGetXMLDescArgs {
+ Vol: Vol,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(99, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolGetPath is the go wrapper for REMOTE_PROC_STORAGE_VOL_GET_PATH.
+func (l *Libvirt) StorageVolGetPath(Vol StorageVol) (rName string, err error) {
+ var buf []byte
+
+ args := StorageVolGetPathArgs {
+ Vol: Vol,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(100, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Name: string
+ _, err = dec.Decode(&rName)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetCellsFreeMemory is the go wrapper for REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY.
+func (l *Libvirt) NodeGetCellsFreeMemory(StartCell int32, Maxcells int32) (rCells []uint64, err error) {
+ var buf []byte
+
+ args := NodeGetCellsFreeMemoryArgs {
+ StartCell: StartCell,
+ Maxcells: Maxcells,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(101, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Cells: []uint64
+ _, err = dec.Decode(&rCells)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetFreeMemory is the go wrapper for REMOTE_PROC_NODE_GET_FREE_MEMORY.
+func (l *Libvirt) NodeGetFreeMemory() (rFreeMem uint64, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(102, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // FreeMem: uint64
+ _, err = dec.Decode(&rFreeMem)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockPeek is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_PEEK.
+func (l *Libvirt) DomainBlockPeek(Dom Domain, Path string, Offset uint64, Size uint32, Flags uint32) (rBuffer []byte, err error) {
+ var buf []byte
+
+ args := DomainBlockPeekArgs {
+ Dom: Dom,
+ Path: Path,
+ Offset: Offset,
+ Size: Size,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(103, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Buffer: []byte
+ _, err = dec.Decode(&rBuffer)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMemoryPeek is the go wrapper for REMOTE_PROC_DOMAIN_MEMORY_PEEK.
+func (l *Libvirt) DomainMemoryPeek(Dom Domain, Offset uint64, Size uint32, Flags DomainMemoryFlags) (rBuffer []byte, err error) {
+ var buf []byte
+
+ args := DomainMemoryPeekArgs {
+ Dom: Dom,
+ Offset: Offset,
+ Size: Size,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(104, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Buffer: []byte
+ _, err = dec.Decode(&rBuffer)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectDomainEventRegister is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER.
+func (l *Libvirt) ConnectDomainEventRegister() (rCbRegistered int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(105, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CbRegistered: int32
+ _, err = dec.Decode(&rCbRegistered)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectDomainEventDeregister is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER.
+func (l *Libvirt) ConnectDomainEventDeregister() (rCbRegistered int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(106, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CbRegistered: int32
+ _, err = dec.Decode(&rCbRegistered)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventLifecycle is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE.
+func (l *Libvirt) DomainEventLifecycle() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(107, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePrepare2 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2.
+func (l *Libvirt) DomainMigratePrepare2(UriIn OptString, Flags uint64, Dname OptString, Resource uint64, DomXML string) (rCookie []byte, rUriOut OptString, err error) {
+ var buf []byte
+
+ args := DomainMigratePrepare2Args {
+ UriIn: UriIn,
+ Flags: Flags,
+ Dname: Dname,
+ Resource: Resource,
+ DomXML: DomXML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(108, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Cookie: []byte
+ _, err = dec.Decode(&rCookie)
+ if err != nil {
+ return
+ }
+ // UriOut: OptString
+ _, err = dec.Decode(&rUriOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateFinish2 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_FINISH2.
+func (l *Libvirt) DomainMigrateFinish2(Dname string, Cookie []byte, Uri string, Flags uint64, Retcode int32) (rDdom Domain, err error) {
+ var buf []byte
+
+ args := DomainMigrateFinish2Args {
+ Dname: Dname,
+ Cookie: Cookie,
+ Uri: Uri,
+ Flags: Flags,
+ Retcode: Retcode,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(109, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Ddom: Domain
+ _, err = dec.Decode(&rDdom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetUri is the go wrapper for REMOTE_PROC_CONNECT_GET_URI.
+func (l *Libvirt) ConnectGetUri() (rUri string, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(110, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Uri: string
+ _, err = dec.Decode(&rUri)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeNumOfDevices is the go wrapper for REMOTE_PROC_NODE_NUM_OF_DEVICES.
+func (l *Libvirt) NodeNumOfDevices(Cap OptString, Flags uint32) (rNum int32, err error) {
+ var buf []byte
+
+ args := NodeNumOfDevicesArgs {
+ Cap: Cap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(111, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeListDevices is the go wrapper for REMOTE_PROC_NODE_LIST_DEVICES.
+func (l *Libvirt) NodeListDevices(Cap OptString, Maxnames int32, Flags uint32) (rNames []string, err error) {
+ var buf []byte
+
+ args := NodeListDevicesArgs {
+ Cap: Cap,
+ Maxnames: Maxnames,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(112, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceLookupByName is the go wrapper for REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME.
+func (l *Libvirt) NodeDeviceLookupByName(Name string) (rDev NodeDevice, err error) {
+ var buf []byte
+
+ args := NodeDeviceLookupByNameArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(113, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dev: NodeDevice
+ _, err = dec.Decode(&rDev)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceGetXMLDesc is the go wrapper for REMOTE_PROC_NODE_DEVICE_GET_XML_DESC.
+func (l *Libvirt) NodeDeviceGetXMLDesc(Name string, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := NodeDeviceGetXMLDescArgs {
+ Name: Name,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(114, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceGetParent is the go wrapper for REMOTE_PROC_NODE_DEVICE_GET_PARENT.
+func (l *Libvirt) NodeDeviceGetParent(Name string) (rParentName OptString, err error) {
+ var buf []byte
+
+ args := NodeDeviceGetParentArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(115, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // ParentName: OptString
+ _, err = dec.Decode(&rParentName)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceNumOfCaps is the go wrapper for REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS.
+func (l *Libvirt) NodeDeviceNumOfCaps(Name string) (rNum int32, err error) {
+ var buf []byte
+
+ args := NodeDeviceNumOfCapsArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(116, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceListCaps is the go wrapper for REMOTE_PROC_NODE_DEVICE_LIST_CAPS.
+func (l *Libvirt) NodeDeviceListCaps(Name string, Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := NodeDeviceListCapsArgs {
+ Name: Name,
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(117, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceDettach is the go wrapper for REMOTE_PROC_NODE_DEVICE_DETTACH.
+func (l *Libvirt) NodeDeviceDettach(Name string) (err error) {
+ var buf []byte
+
+ args := NodeDeviceDettachArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(118, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceReAttach is the go wrapper for REMOTE_PROC_NODE_DEVICE_RE_ATTACH.
+func (l *Libvirt) NodeDeviceReAttach(Name string) (err error) {
+ var buf []byte
+
+ args := NodeDeviceReAttachArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(119, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceReset is the go wrapper for REMOTE_PROC_NODE_DEVICE_RESET.
+func (l *Libvirt) NodeDeviceReset(Name string) (err error) {
+ var buf []byte
+
+ args := NodeDeviceResetArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(120, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetSecurityLabel is the go wrapper for REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL.
+func (l *Libvirt) DomainGetSecurityLabel(Dom Domain) (rLabel []int8, rEnforcing int32, err error) {
+ var buf []byte
+
+ args := DomainGetSecurityLabelArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(121, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Label: []int8
+ _, err = dec.Decode(&rLabel)
+ if err != nil {
+ return
+ }
+ // Enforcing: int32
+ _, err = dec.Decode(&rEnforcing)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetSecurityModel is the go wrapper for REMOTE_PROC_NODE_GET_SECURITY_MODEL.
+func (l *Libvirt) NodeGetSecurityModel() (rModel []int8, rDoi []int8, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(122, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Model: []int8
+ _, err = dec.Decode(&rModel)
+ if err != nil {
+ return
+ }
+ // Doi: []int8
+ _, err = dec.Decode(&rDoi)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceCreateXML is the go wrapper for REMOTE_PROC_NODE_DEVICE_CREATE_XML.
+func (l *Libvirt) NodeDeviceCreateXML(XMLDesc string, Flags uint32) (rDev NodeDevice, err error) {
+ var buf []byte
+
+ args := NodeDeviceCreateXMLArgs {
+ XMLDesc: XMLDesc,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(123, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dev: NodeDevice
+ _, err = dec.Decode(&rDev)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceDestroy is the go wrapper for REMOTE_PROC_NODE_DEVICE_DESTROY.
+func (l *Libvirt) NodeDeviceDestroy(Name string) (err error) {
+ var buf []byte
+
+ args := NodeDeviceDestroyArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(124, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolCreateXMLFrom is the go wrapper for REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM.
+func (l *Libvirt) StorageVolCreateXMLFrom(Pool StoragePool, XML string, Clonevol StorageVol, Flags StorageVolCreateFlags) (rVol StorageVol, err error) {
+ var buf []byte
+
+ args := StorageVolCreateXMLFromArgs {
+ Pool: Pool,
+ XML: XML,
+ Clonevol: Clonevol,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(125, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Vol: StorageVol
+ _, err = dec.Decode(&rVol)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfInterfaces is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_INTERFACES.
+func (l *Libvirt) ConnectNumOfInterfaces() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(126, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListInterfaces is the go wrapper for REMOTE_PROC_CONNECT_LIST_INTERFACES.
+func (l *Libvirt) ConnectListInterfaces(Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := ConnectListInterfacesArgs {
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(127, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceLookupByName is the go wrapper for REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME.
+func (l *Libvirt) InterfaceLookupByName(Name string) (rIface Interface, err error) {
+ var buf []byte
+
+ args := InterfaceLookupByNameArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(128, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Iface: Interface
+ _, err = dec.Decode(&rIface)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceLookupByMacString is the go wrapper for REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING.
+func (l *Libvirt) InterfaceLookupByMacString(Mac string) (rIface Interface, err error) {
+ var buf []byte
+
+ args := InterfaceLookupByMacStringArgs {
+ Mac: Mac,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(129, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Iface: Interface
+ _, err = dec.Decode(&rIface)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceGetXMLDesc is the go wrapper for REMOTE_PROC_INTERFACE_GET_XML_DESC.
+func (l *Libvirt) InterfaceGetXMLDesc(Iface Interface, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := InterfaceGetXMLDescArgs {
+ Iface: Iface,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(130, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceDefineXML is the go wrapper for REMOTE_PROC_INTERFACE_DEFINE_XML.
+func (l *Libvirt) InterfaceDefineXML(XML string, Flags uint32) (rIface Interface, err error) {
+ var buf []byte
+
+ args := InterfaceDefineXMLArgs {
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(131, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Iface: Interface
+ _, err = dec.Decode(&rIface)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceUndefine is the go wrapper for REMOTE_PROC_INTERFACE_UNDEFINE.
+func (l *Libvirt) InterfaceUndefine(Iface Interface) (err error) {
+ var buf []byte
+
+ args := InterfaceUndefineArgs {
+ Iface: Iface,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(132, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceCreate is the go wrapper for REMOTE_PROC_INTERFACE_CREATE.
+func (l *Libvirt) InterfaceCreate(Iface Interface, Flags uint32) (err error) {
+ var buf []byte
+
+ args := InterfaceCreateArgs {
+ Iface: Iface,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(133, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceDestroy is the go wrapper for REMOTE_PROC_INTERFACE_DESTROY.
+func (l *Libvirt) InterfaceDestroy(Iface Interface, Flags uint32) (err error) {
+ var buf []byte
+
+ args := InterfaceDestroyArgs {
+ Iface: Iface,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(134, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectDomainXMLFromNative is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_XML_FROM_NATIVE.
+func (l *Libvirt) ConnectDomainXMLFromNative(NativeFormat string, NativeConfig string, Flags uint32) (rDomainXML string, err error) {
+ var buf []byte
+
+ args := ConnectDomainXMLFromNativeArgs {
+ NativeFormat: NativeFormat,
+ NativeConfig: NativeConfig,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(135, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // DomainXML: string
+ _, err = dec.Decode(&rDomainXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectDomainXMLToNative is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_XML_TO_NATIVE.
+func (l *Libvirt) ConnectDomainXMLToNative(NativeFormat string, DomainXML string, Flags uint32) (rNativeConfig string, err error) {
+ var buf []byte
+
+ args := ConnectDomainXMLToNativeArgs {
+ NativeFormat: NativeFormat,
+ DomainXML: DomainXML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(136, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // NativeConfig: string
+ _, err = dec.Decode(&rNativeConfig)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfDefinedInterfaces is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DEFINED_INTERFACES.
+func (l *Libvirt) ConnectNumOfDefinedInterfaces() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(137, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListDefinedInterfaces is the go wrapper for REMOTE_PROC_CONNECT_LIST_DEFINED_INTERFACES.
+func (l *Libvirt) ConnectListDefinedInterfaces(Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := ConnectListDefinedInterfacesArgs {
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(138, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfSecrets is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_SECRETS.
+func (l *Libvirt) ConnectNumOfSecrets() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(139, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListSecrets is the go wrapper for REMOTE_PROC_CONNECT_LIST_SECRETS.
+func (l *Libvirt) ConnectListSecrets(Maxuuids int32) (rUuids []string, err error) {
+ var buf []byte
+
+ args := ConnectListSecretsArgs {
+ Maxuuids: Maxuuids,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(140, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Uuids: []string
+ _, err = dec.Decode(&rUuids)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// SecretLookupByUUID is the go wrapper for REMOTE_PROC_SECRET_LOOKUP_BY_UUID.
+func (l *Libvirt) SecretLookupByUUID(UUID UUID) (rOptSecret Secret, err error) {
+ var buf []byte
+
+ args := SecretLookupByUUIDArgs {
+ UUID: UUID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(141, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // OptSecret: Secret
+ _, err = dec.Decode(&rOptSecret)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// SecretDefineXML is the go wrapper for REMOTE_PROC_SECRET_DEFINE_XML.
+func (l *Libvirt) SecretDefineXML(XML string, Flags uint32) (rOptSecret Secret, err error) {
+ var buf []byte
+
+ args := SecretDefineXMLArgs {
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(142, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // OptSecret: Secret
+ _, err = dec.Decode(&rOptSecret)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// SecretGetXMLDesc is the go wrapper for REMOTE_PROC_SECRET_GET_XML_DESC.
+func (l *Libvirt) SecretGetXMLDesc(OptSecret Secret, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := SecretGetXMLDescArgs {
+ OptSecret: OptSecret,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(143, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// SecretSetValue is the go wrapper for REMOTE_PROC_SECRET_SET_VALUE.
+func (l *Libvirt) SecretSetValue(OptSecret Secret, Value []byte, Flags uint32) (err error) {
+ var buf []byte
+
+ args := SecretSetValueArgs {
+ OptSecret: OptSecret,
+ Value: Value,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(144, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// SecretGetValue is the go wrapper for REMOTE_PROC_SECRET_GET_VALUE.
+func (l *Libvirt) SecretGetValue(OptSecret Secret, Flags uint32) (rValue []byte, err error) {
+ var buf []byte
+
+ args := SecretGetValueArgs {
+ OptSecret: OptSecret,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(145, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Value: []byte
+ _, err = dec.Decode(&rValue)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// SecretUndefine is the go wrapper for REMOTE_PROC_SECRET_UNDEFINE.
+func (l *Libvirt) SecretUndefine(OptSecret Secret) (err error) {
+ var buf []byte
+
+ args := SecretUndefineArgs {
+ OptSecret: OptSecret,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(146, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// SecretLookupByUsage is the go wrapper for REMOTE_PROC_SECRET_LOOKUP_BY_USAGE.
+func (l *Libvirt) SecretLookupByUsage(UsageType int32, UsageID string) (rOptSecret Secret, err error) {
+ var buf []byte
+
+ args := SecretLookupByUsageArgs {
+ UsageType: UsageType,
+ UsageID: UsageID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(147, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // OptSecret: Secret
+ _, err = dec.Decode(&rOptSecret)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePrepareTunnel is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL.
+func (l *Libvirt) DomainMigratePrepareTunnel(Flags uint64, outStream io.Reader, Dname OptString, Resource uint64, DomXML string) (err error) {
+ var buf []byte
+
+ args := DomainMigratePrepareTunnelArgs {
+ Flags: Flags,
+ Dname: Dname,
+ Resource: Resource,
+ DomXML: DomXML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(148, constants.Program, buf, outStream, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectIsSecure is the go wrapper for REMOTE_PROC_CONNECT_IS_SECURE.
+func (l *Libvirt) ConnectIsSecure() (rSecure int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(149, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Secure: int32
+ _, err = dec.Decode(&rSecure)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainIsActive is the go wrapper for REMOTE_PROC_DOMAIN_IS_ACTIVE.
+func (l *Libvirt) DomainIsActive(Dom Domain) (rActive int32, err error) {
+ var buf []byte
+
+ args := DomainIsActiveArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(150, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Active: int32
+ _, err = dec.Decode(&rActive)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainIsPersistent is the go wrapper for REMOTE_PROC_DOMAIN_IS_PERSISTENT.
+func (l *Libvirt) DomainIsPersistent(Dom Domain) (rPersistent int32, err error) {
+ var buf []byte
+
+ args := DomainIsPersistentArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(151, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Persistent: int32
+ _, err = dec.Decode(&rPersistent)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkIsActive is the go wrapper for REMOTE_PROC_NETWORK_IS_ACTIVE.
+func (l *Libvirt) NetworkIsActive(Net Network) (rActive int32, err error) {
+ var buf []byte
+
+ args := NetworkIsActiveArgs {
+ Net: Net,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(152, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Active: int32
+ _, err = dec.Decode(&rActive)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkIsPersistent is the go wrapper for REMOTE_PROC_NETWORK_IS_PERSISTENT.
+func (l *Libvirt) NetworkIsPersistent(Net Network) (rPersistent int32, err error) {
+ var buf []byte
+
+ args := NetworkIsPersistentArgs {
+ Net: Net,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(153, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Persistent: int32
+ _, err = dec.Decode(&rPersistent)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolIsActive is the go wrapper for REMOTE_PROC_STORAGE_POOL_IS_ACTIVE.
+func (l *Libvirt) StoragePoolIsActive(Pool StoragePool) (rActive int32, err error) {
+ var buf []byte
+
+ args := StoragePoolIsActiveArgs {
+ Pool: Pool,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(154, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Active: int32
+ _, err = dec.Decode(&rActive)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolIsPersistent is the go wrapper for REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT.
+func (l *Libvirt) StoragePoolIsPersistent(Pool StoragePool) (rPersistent int32, err error) {
+ var buf []byte
+
+ args := StoragePoolIsPersistentArgs {
+ Pool: Pool,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(155, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Persistent: int32
+ _, err = dec.Decode(&rPersistent)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceIsActive is the go wrapper for REMOTE_PROC_INTERFACE_IS_ACTIVE.
+func (l *Libvirt) InterfaceIsActive(Iface Interface) (rActive int32, err error) {
+ var buf []byte
+
+ args := InterfaceIsActiveArgs {
+ Iface: Iface,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(156, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Active: int32
+ _, err = dec.Decode(&rActive)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetLibVersion is the go wrapper for REMOTE_PROC_CONNECT_GET_LIB_VERSION.
+func (l *Libvirt) ConnectGetLibVersion() (rLibVer uint64, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(157, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // LibVer: uint64
+ _, err = dec.Decode(&rLibVer)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectCompareCPU is the go wrapper for REMOTE_PROC_CONNECT_COMPARE_CPU.
+func (l *Libvirt) ConnectCompareCPU(XML string, Flags ConnectCompareCPUFlags) (rResult int32, err error) {
+ var buf []byte
+
+ args := ConnectCompareCPUArgs {
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(158, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Result: int32
+ _, err = dec.Decode(&rResult)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMemoryStats is the go wrapper for REMOTE_PROC_DOMAIN_MEMORY_STATS.
+func (l *Libvirt) DomainMemoryStats(Dom Domain, MaxStats uint32, Flags uint32) (rStats []DomainMemoryStat, err error) {
+ var buf []byte
+
+ args := DomainMemoryStatsArgs {
+ Dom: Dom,
+ MaxStats: MaxStats,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(159, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Stats: []DomainMemoryStat
+ _, err = dec.Decode(&rStats)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainAttachDeviceFlags is the go wrapper for REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS.
+func (l *Libvirt) DomainAttachDeviceFlags(Dom Domain, XML string, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainAttachDeviceFlagsArgs {
+ Dom: Dom,
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(160, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainDetachDeviceFlags is the go wrapper for REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS.
+func (l *Libvirt) DomainDetachDeviceFlags(Dom Domain, XML string, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainDetachDeviceFlagsArgs {
+ Dom: Dom,
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(161, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectBaselineCPU is the go wrapper for REMOTE_PROC_CONNECT_BASELINE_CPU.
+func (l *Libvirt) ConnectBaselineCPU(XMLCPUs []string, Flags ConnectBaselineCPUFlags) (rCPU string, err error) {
+ var buf []byte
+
+ args := ConnectBaselineCPUArgs {
+ XMLCPUs: XMLCPUs,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(162, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CPU: string
+ _, err = dec.Decode(&rCPU)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetJobInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_JOB_INFO.
+func (l *Libvirt) DomainGetJobInfo(Dom Domain) (rType int32, rTimeElapsed uint64, rTimeRemaining uint64, rDataTotal uint64, rDataProcessed uint64, rDataRemaining uint64, rMemTotal uint64, rMemProcessed uint64, rMemRemaining uint64, rFileTotal uint64, rFileProcessed uint64, rFileRemaining uint64, err error) {
+ var buf []byte
+
+ args := DomainGetJobInfoArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(163, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Type: int32
+ _, err = dec.Decode(&rType)
+ if err != nil {
+ return
+ }
+ // TimeElapsed: uint64
+ _, err = dec.Decode(&rTimeElapsed)
+ if err != nil {
+ return
+ }
+ // TimeRemaining: uint64
+ _, err = dec.Decode(&rTimeRemaining)
+ if err != nil {
+ return
+ }
+ // DataTotal: uint64
+ _, err = dec.Decode(&rDataTotal)
+ if err != nil {
+ return
+ }
+ // DataProcessed: uint64
+ _, err = dec.Decode(&rDataProcessed)
+ if err != nil {
+ return
+ }
+ // DataRemaining: uint64
+ _, err = dec.Decode(&rDataRemaining)
+ if err != nil {
+ return
+ }
+ // MemTotal: uint64
+ _, err = dec.Decode(&rMemTotal)
+ if err != nil {
+ return
+ }
+ // MemProcessed: uint64
+ _, err = dec.Decode(&rMemProcessed)
+ if err != nil {
+ return
+ }
+ // MemRemaining: uint64
+ _, err = dec.Decode(&rMemRemaining)
+ if err != nil {
+ return
+ }
+ // FileTotal: uint64
+ _, err = dec.Decode(&rFileTotal)
+ if err != nil {
+ return
+ }
+ // FileProcessed: uint64
+ _, err = dec.Decode(&rFileProcessed)
+ if err != nil {
+ return
+ }
+ // FileRemaining: uint64
+ _, err = dec.Decode(&rFileRemaining)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainAbortJob is the go wrapper for REMOTE_PROC_DOMAIN_ABORT_JOB.
+func (l *Libvirt) DomainAbortJob(Dom Domain) (err error) {
+ var buf []byte
+
+ args := DomainAbortJobArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(164, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolWipe is the go wrapper for REMOTE_PROC_STORAGE_VOL_WIPE.
+func (l *Libvirt) StorageVolWipe(Vol StorageVol, Flags uint32) (err error) {
+ var buf []byte
+
+ args := StorageVolWipeArgs {
+ Vol: Vol,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(165, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateSetMaxDowntime is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME.
+func (l *Libvirt) DomainMigrateSetMaxDowntime(Dom Domain, Downtime uint64, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainMigrateSetMaxDowntimeArgs {
+ Dom: Dom,
+ Downtime: Downtime,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(166, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectDomainEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER_ANY.
+func (l *Libvirt) ConnectDomainEventRegisterAny(EventID int32) (err error) {
+ var buf []byte
+
+ args := ConnectDomainEventRegisterAnyArgs {
+ EventID: EventID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(167, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectDomainEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER_ANY.
+func (l *Libvirt) ConnectDomainEventDeregisterAny(EventID int32) (err error) {
+ var buf []byte
+
+ args := ConnectDomainEventDeregisterAnyArgs {
+ EventID: EventID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(168, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventReboot is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_REBOOT.
+func (l *Libvirt) DomainEventReboot() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(169, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventRtcChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE.
+func (l *Libvirt) DomainEventRtcChange() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(170, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventWatchdog is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_WATCHDOG.
+func (l *Libvirt) DomainEventWatchdog() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(171, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventIOError is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_IO_ERROR.
+func (l *Libvirt) DomainEventIOError() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(172, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventGraphics is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_GRAPHICS.
+func (l *Libvirt) DomainEventGraphics() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(173, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainUpdateDeviceFlags is the go wrapper for REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS.
+func (l *Libvirt) DomainUpdateDeviceFlags(Dom Domain, XML string, Flags DomainDeviceModifyFlags) (err error) {
+ var buf []byte
+
+ args := DomainUpdateDeviceFlagsArgs {
+ Dom: Dom,
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(174, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NwfilterLookupByName is the go wrapper for REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME.
+func (l *Libvirt) NwfilterLookupByName(Name string) (rOptNwfilter Nwfilter, err error) {
+ var buf []byte
+
+ args := NwfilterLookupByNameArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(175, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // OptNwfilter: Nwfilter
+ _, err = dec.Decode(&rOptNwfilter)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NwfilterLookupByUUID is the go wrapper for REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID.
+func (l *Libvirt) NwfilterLookupByUUID(UUID UUID) (rOptNwfilter Nwfilter, err error) {
+ var buf []byte
+
+ args := NwfilterLookupByUUIDArgs {
+ UUID: UUID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(176, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // OptNwfilter: Nwfilter
+ _, err = dec.Decode(&rOptNwfilter)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NwfilterGetXMLDesc is the go wrapper for REMOTE_PROC_NWFILTER_GET_XML_DESC.
+func (l *Libvirt) NwfilterGetXMLDesc(OptNwfilter Nwfilter, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := NwfilterGetXMLDescArgs {
+ OptNwfilter: OptNwfilter,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(177, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNumOfNwfilters is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_NWFILTERS.
+func (l *Libvirt) ConnectNumOfNwfilters() (rNum int32, err error) {
+ var buf []byte
+
+ var r response
+ r, err = l.requestStream(178, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListNwfilters is the go wrapper for REMOTE_PROC_CONNECT_LIST_NWFILTERS.
+func (l *Libvirt) ConnectListNwfilters(Maxnames int32) (rNames []string, err error) {
+ var buf []byte
+
+ args := ConnectListNwfiltersArgs {
+ Maxnames: Maxnames,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(179, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NwfilterDefineXML is the go wrapper for REMOTE_PROC_NWFILTER_DEFINE_XML.
+func (l *Libvirt) NwfilterDefineXML(XML string) (rOptNwfilter Nwfilter, err error) {
+ var buf []byte
+
+ args := NwfilterDefineXMLArgs {
+ XML: XML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(180, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // OptNwfilter: Nwfilter
+ _, err = dec.Decode(&rOptNwfilter)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NwfilterUndefine is the go wrapper for REMOTE_PROC_NWFILTER_UNDEFINE.
+func (l *Libvirt) NwfilterUndefine(OptNwfilter Nwfilter) (err error) {
+ var buf []byte
+
+ args := NwfilterUndefineArgs {
+ OptNwfilter: OptNwfilter,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(181, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainManagedSave is the go wrapper for REMOTE_PROC_DOMAIN_MANAGED_SAVE.
+func (l *Libvirt) DomainManagedSave(Dom Domain, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainManagedSaveArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(182, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainHasManagedSaveImage is the go wrapper for REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE.
+func (l *Libvirt) DomainHasManagedSaveImage(Dom Domain, Flags uint32) (rResult int32, err error) {
+ var buf []byte
+
+ args := DomainHasManagedSaveImageArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(183, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Result: int32
+ _, err = dec.Decode(&rResult)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainManagedSaveRemove is the go wrapper for REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE.
+func (l *Libvirt) DomainManagedSaveRemove(Dom Domain, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainManagedSaveRemoveArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(184, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotCreateXML is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML.
+func (l *Libvirt) DomainSnapshotCreateXML(Dom Domain, XMLDesc string, Flags uint32) (rSnap DomainSnapshot, err error) {
+ var buf []byte
+
+ args := DomainSnapshotCreateXMLArgs {
+ Dom: Dom,
+ XMLDesc: XMLDesc,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(185, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Snap: DomainSnapshot
+ _, err = dec.Decode(&rSnap)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC.
+func (l *Libvirt) DomainSnapshotGetXMLDesc(Snap DomainSnapshot, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := DomainSnapshotGetXMLDescArgs {
+ Snap: Snap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(186, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotNum is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_NUM.
+func (l *Libvirt) DomainSnapshotNum(Dom Domain, Flags uint32) (rNum int32, err error) {
+ var buf []byte
+
+ args := DomainSnapshotNumArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(187, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotListNames is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES.
+func (l *Libvirt) DomainSnapshotListNames(Dom Domain, Maxnames int32, Flags uint32) (rNames []string, err error) {
+ var buf []byte
+
+ args := DomainSnapshotListNamesArgs {
+ Dom: Dom,
+ Maxnames: Maxnames,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(188, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotLookupByName is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME.
+func (l *Libvirt) DomainSnapshotLookupByName(Dom Domain, Name string, Flags uint32) (rSnap DomainSnapshot, err error) {
+ var buf []byte
+
+ args := DomainSnapshotLookupByNameArgs {
+ Dom: Dom,
+ Name: Name,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(189, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Snap: DomainSnapshot
+ _, err = dec.Decode(&rSnap)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainHasCurrentSnapshot is the go wrapper for REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT.
+func (l *Libvirt) DomainHasCurrentSnapshot(Dom Domain, Flags uint32) (rResult int32, err error) {
+ var buf []byte
+
+ args := DomainHasCurrentSnapshotArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(190, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Result: int32
+ _, err = dec.Decode(&rResult)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotCurrent is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT.
+func (l *Libvirt) DomainSnapshotCurrent(Dom Domain, Flags uint32) (rSnap DomainSnapshot, err error) {
+ var buf []byte
+
+ args := DomainSnapshotCurrentArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(191, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Snap: DomainSnapshot
+ _, err = dec.Decode(&rSnap)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainRevertToSnapshot is the go wrapper for REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT.
+func (l *Libvirt) DomainRevertToSnapshot(Snap DomainSnapshot, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainRevertToSnapshotArgs {
+ Snap: Snap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(192, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotDelete is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE.
+func (l *Libvirt) DomainSnapshotDelete(Snap DomainSnapshot, Flags DomainSnapshotDeleteFlags) (err error) {
+ var buf []byte
+
+ args := DomainSnapshotDeleteArgs {
+ Snap: Snap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(193, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetBlockInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_BLOCK_INFO.
+func (l *Libvirt) DomainGetBlockInfo(Dom Domain, Path string, Flags uint32) (rAllocation uint64, rCapacity uint64, rPhysical uint64, err error) {
+ var buf []byte
+
+ args := DomainGetBlockInfoArgs {
+ Dom: Dom,
+ Path: Path,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(194, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Allocation: uint64
+ _, err = dec.Decode(&rAllocation)
+ if err != nil {
+ return
+ }
+ // Capacity: uint64
+ _, err = dec.Decode(&rCapacity)
+ if err != nil {
+ return
+ }
+ // Physical: uint64
+ _, err = dec.Decode(&rPhysical)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventIOErrorReason is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON.
+func (l *Libvirt) DomainEventIOErrorReason() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(195, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCreateWithFlags is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS.
+func (l *Libvirt) DomainCreateWithFlags(Dom Domain, Flags uint32) (rDom Domain, err error) {
+ var buf []byte
+
+ args := DomainCreateWithFlagsArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(196, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetMemoryParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS.
+func (l *Libvirt) DomainSetMemoryParameters(Dom Domain, Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetMemoryParametersArgs {
+ Dom: Dom,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(197, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetMemoryParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS.
+func (l *Libvirt) DomainGetMemoryParameters(Dom Domain, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := DomainGetMemoryParametersArgs {
+ Dom: Dom,
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(198, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetVcpusFlags is the go wrapper for REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS.
+func (l *Libvirt) DomainSetVcpusFlags(Dom Domain, Nvcpus uint32, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetVcpusFlagsArgs {
+ Dom: Dom,
+ Nvcpus: Nvcpus,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(199, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetVcpusFlags is the go wrapper for REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS.
+func (l *Libvirt) DomainGetVcpusFlags(Dom Domain, Flags uint32) (rNum int32, err error) {
+ var buf []byte
+
+ args := DomainGetVcpusFlagsArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(200, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainOpenConsole is the go wrapper for REMOTE_PROC_DOMAIN_OPEN_CONSOLE.
+func (l *Libvirt) DomainOpenConsole(Dom Domain, DevName OptString, inStream io.Writer, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainOpenConsoleArgs {
+ Dom: Dom,
+ DevName: DevName,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(201, constants.Program, buf, nil, inStream)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainIsUpdated is the go wrapper for REMOTE_PROC_DOMAIN_IS_UPDATED.
+func (l *Libvirt) DomainIsUpdated(Dom Domain) (rUpdated int32, err error) {
+ var buf []byte
+
+ args := DomainIsUpdatedArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(202, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Updated: int32
+ _, err = dec.Decode(&rUpdated)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetSysinfo is the go wrapper for REMOTE_PROC_CONNECT_GET_SYSINFO.
+func (l *Libvirt) ConnectGetSysinfo(Flags uint32) (rSysinfo string, err error) {
+ var buf []byte
+
+ args := ConnectGetSysinfoArgs {
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(203, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Sysinfo: string
+ _, err = dec.Decode(&rSysinfo)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetMemoryFlags is the go wrapper for REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS.
+func (l *Libvirt) DomainSetMemoryFlags(Dom Domain, Memory uint64, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetMemoryFlagsArgs {
+ Dom: Dom,
+ Memory: Memory,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(204, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetBlkioParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS.
+func (l *Libvirt) DomainSetBlkioParameters(Dom Domain, Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetBlkioParametersArgs {
+ Dom: Dom,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(205, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetBlkioParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS.
+func (l *Libvirt) DomainGetBlkioParameters(Dom Domain, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := DomainGetBlkioParametersArgs {
+ Dom: Dom,
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(206, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateSetMaxSpeed is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED.
+func (l *Libvirt) DomainMigrateSetMaxSpeed(Dom Domain, Bandwidth uint64, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainMigrateSetMaxSpeedArgs {
+ Dom: Dom,
+ Bandwidth: Bandwidth,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(207, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolUpload is the go wrapper for REMOTE_PROC_STORAGE_VOL_UPLOAD.
+func (l *Libvirt) StorageVolUpload(Vol StorageVol, outStream io.Reader, Offset uint64, Length uint64, Flags StorageVolUploadFlags) (err error) {
+ var buf []byte
+
+ args := StorageVolUploadArgs {
+ Vol: Vol,
+ Offset: Offset,
+ Length: Length,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(208, constants.Program, buf, outStream, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolDownload is the go wrapper for REMOTE_PROC_STORAGE_VOL_DOWNLOAD.
+func (l *Libvirt) StorageVolDownload(Vol StorageVol, inStream io.Writer, Offset uint64, Length uint64, Flags StorageVolDownloadFlags) (err error) {
+ var buf []byte
+
+ args := StorageVolDownloadArgs {
+ Vol: Vol,
+ Offset: Offset,
+ Length: Length,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(209, constants.Program, buf, nil, inStream)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainInjectNmi is the go wrapper for REMOTE_PROC_DOMAIN_INJECT_NMI.
+func (l *Libvirt) DomainInjectNmi(Dom Domain, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainInjectNmiArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(210, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainScreenshot is the go wrapper for REMOTE_PROC_DOMAIN_SCREENSHOT.
+func (l *Libvirt) DomainScreenshot(Dom Domain, inStream io.Writer, Screen uint32, Flags uint32) (rMime OptString, err error) {
+ var buf []byte
+
+ args := DomainScreenshotArgs {
+ Dom: Dom,
+ Screen: Screen,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(211, constants.Program, buf, nil, inStream)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Mime: OptString
+ _, err = dec.Decode(&rMime)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetState is the go wrapper for REMOTE_PROC_DOMAIN_GET_STATE.
+func (l *Libvirt) DomainGetState(Dom Domain, Flags uint32) (rState int32, rReason int32, err error) {
+ var buf []byte
+
+ args := DomainGetStateArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(212, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // State: int32
+ _, err = dec.Decode(&rState)
+ if err != nil {
+ return
+ }
+ // Reason: int32
+ _, err = dec.Decode(&rReason)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateBegin3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3.
+func (l *Libvirt) DomainMigrateBegin3(Dom Domain, Xmlin OptString, Flags uint64, Dname OptString, Resource uint64) (rCookieOut []byte, rXML string, err error) {
+ var buf []byte
+
+ args := DomainMigrateBegin3Args {
+ Dom: Dom,
+ Xmlin: Xmlin,
+ Flags: Flags,
+ Dname: Dname,
+ Resource: Resource,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(213, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePrepare3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3.
+func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn OptString, Flags uint64, Dname OptString, Resource uint64, DomXML string) (rCookieOut []byte, rUriOut OptString, err error) {
+ var buf []byte
+
+ args := DomainMigratePrepare3Args {
+ CookieIn: CookieIn,
+ UriIn: UriIn,
+ Flags: Flags,
+ Dname: Dname,
+ Resource: Resource,
+ DomXML: DomXML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(214, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+ // UriOut: OptString
+ _, err = dec.Decode(&rUriOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePrepareTunnel3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3.
+func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, outStream io.Reader, Flags uint64, Dname OptString, Resource uint64, DomXML string) (rCookieOut []byte, err error) {
+ var buf []byte
+
+ args := DomainMigratePrepareTunnel3Args {
+ CookieIn: CookieIn,
+ Flags: Flags,
+ Dname: Dname,
+ Resource: Resource,
+ DomXML: DomXML,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(215, constants.Program, buf, outStream, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePerform3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3.
+func (l *Libvirt) DomainMigratePerform3(Dom Domain, Xmlin OptString, CookieIn []byte, Dconnuri OptString, Uri OptString, Flags uint64, Dname OptString, Resource uint64) (rCookieOut []byte, err error) {
+ var buf []byte
+
+ args := DomainMigratePerform3Args {
+ Dom: Dom,
+ Xmlin: Xmlin,
+ CookieIn: CookieIn,
+ Dconnuri: Dconnuri,
+ Uri: Uri,
+ Flags: Flags,
+ Dname: Dname,
+ Resource: Resource,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(216, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateFinish3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_FINISH3.
+func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri OptString, Uri OptString, Flags uint64, Cancelled int32) (rDom Domain, rCookieOut []byte, err error) {
+ var buf []byte
+
+ args := DomainMigrateFinish3Args {
+ Dname: Dname,
+ CookieIn: CookieIn,
+ Dconnuri: Dconnuri,
+ Uri: Uri,
+ Flags: Flags,
+ Cancelled: Cancelled,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(217, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateConfirm3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3.
+func (l *Libvirt) DomainMigrateConfirm3(Dom Domain, CookieIn []byte, Flags uint64, Cancelled int32) (err error) {
+ var buf []byte
+
+ args := DomainMigrateConfirm3Args {
+ Dom: Dom,
+ CookieIn: CookieIn,
+ Flags: Flags,
+ Cancelled: Cancelled,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(218, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetSchedulerParametersFlags is the go wrapper for REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS.
+func (l *Libvirt) DomainSetSchedulerParametersFlags(Dom Domain, Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetSchedulerParametersFlagsArgs {
+ Dom: Dom,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(219, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceChangeBegin is the go wrapper for REMOTE_PROC_INTERFACE_CHANGE_BEGIN.
+func (l *Libvirt) InterfaceChangeBegin(Flags uint32) (err error) {
+ var buf []byte
+
+ args := InterfaceChangeBeginArgs {
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(220, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceChangeCommit is the go wrapper for REMOTE_PROC_INTERFACE_CHANGE_COMMIT.
+func (l *Libvirt) InterfaceChangeCommit(Flags uint32) (err error) {
+ var buf []byte
+
+ args := InterfaceChangeCommitArgs {
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(221, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// InterfaceChangeRollback is the go wrapper for REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK.
+func (l *Libvirt) InterfaceChangeRollback(Flags uint32) (err error) {
+ var buf []byte
+
+ args := InterfaceChangeRollbackArgs {
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(222, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetSchedulerParametersFlags is the go wrapper for REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS.
+func (l *Libvirt) DomainGetSchedulerParametersFlags(Dom Domain, Nparams int32, Flags uint32) (rParams []TypedParam, err error) {
+ var buf []byte
+
+ args := DomainGetSchedulerParametersFlagsArgs {
+ Dom: Dom,
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(223, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventControlError is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR.
+func (l *Libvirt) DomainEventControlError() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(224, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainPinVcpuFlags is the go wrapper for REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS.
+func (l *Libvirt) DomainPinVcpuFlags(Dom Domain, Vcpu uint32, Cpumap []byte, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainPinVcpuFlagsArgs {
+ Dom: Dom,
+ Vcpu: Vcpu,
+ Cpumap: Cpumap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(225, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSendKey is the go wrapper for REMOTE_PROC_DOMAIN_SEND_KEY.
+func (l *Libvirt) DomainSendKey(Dom Domain, Codeset uint32, Holdtime uint32, Keycodes []uint32, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSendKeyArgs {
+ Dom: Dom,
+ Codeset: Codeset,
+ Holdtime: Holdtime,
+ Keycodes: Keycodes,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(226, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetCPUStats is the go wrapper for REMOTE_PROC_NODE_GET_CPU_STATS.
+func (l *Libvirt) NodeGetCPUStats(CPUNum int32, Nparams int32, Flags uint32) (rParams []NodeGetCPUStats, rNparams int32, err error) {
+ var buf []byte
+
+ args := NodeGetCPUStatsArgs {
+ CPUNum: CPUNum,
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(227, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []NodeGetCPUStats
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetMemoryStats is the go wrapper for REMOTE_PROC_NODE_GET_MEMORY_STATS.
+func (l *Libvirt) NodeGetMemoryStats(Nparams int32, CellNum int32, Flags uint32) (rParams []NodeGetMemoryStats, rNparams int32, err error) {
+ var buf []byte
+
+ args := NodeGetMemoryStatsArgs {
+ Nparams: Nparams,
+ CellNum: CellNum,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(228, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []NodeGetMemoryStats
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetControlInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_CONTROL_INFO.
+func (l *Libvirt) DomainGetControlInfo(Dom Domain, Flags uint32) (rState uint32, rDetails uint32, rStateTime uint64, err error) {
+ var buf []byte
+
+ args := DomainGetControlInfoArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(229, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // State: uint32
+ _, err = dec.Decode(&rState)
+ if err != nil {
+ return
+ }
+ // Details: uint32
+ _, err = dec.Decode(&rDetails)
+ if err != nil {
+ return
+ }
+ // StateTime: uint64
+ _, err = dec.Decode(&rStateTime)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetVcpuPinInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO.
+func (l *Libvirt) DomainGetVcpuPinInfo(Dom Domain, Ncpumaps int32, Maplen int32, Flags uint32) (rCpumaps []byte, rNum int32, err error) {
+ var buf []byte
+
+ args := DomainGetVcpuPinInfoArgs {
+ Dom: Dom,
+ Ncpumaps: Ncpumaps,
+ Maplen: Maplen,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(230, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Cpumaps: []byte
+ _, err = dec.Decode(&rCpumaps)
+ if err != nil {
+ return
+ }
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainUndefineFlags is the go wrapper for REMOTE_PROC_DOMAIN_UNDEFINE_FLAGS.
+func (l *Libvirt) DomainUndefineFlags(Dom Domain, Flags DomainUndefineFlagsValues) (err error) {
+ var buf []byte
+
+ args := DomainUndefineFlagsArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(231, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSaveFlags is the go wrapper for REMOTE_PROC_DOMAIN_SAVE_FLAGS.
+func (l *Libvirt) DomainSaveFlags(Dom Domain, To string, Dxml OptString, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSaveFlagsArgs {
+ Dom: Dom,
+ To: To,
+ Dxml: Dxml,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(232, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainRestoreFlags is the go wrapper for REMOTE_PROC_DOMAIN_RESTORE_FLAGS.
+func (l *Libvirt) DomainRestoreFlags(From string, Dxml OptString, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainRestoreFlagsArgs {
+ From: From,
+ Dxml: Dxml,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(233, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainDestroyFlags is the go wrapper for REMOTE_PROC_DOMAIN_DESTROY_FLAGS.
+func (l *Libvirt) DomainDestroyFlags(Dom Domain, Flags DomainDestroyFlagsValues) (err error) {
+ var buf []byte
+
+ args := DomainDestroyFlagsArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(234, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSaveImageGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC.
+func (l *Libvirt) DomainSaveImageGetXMLDesc(File string, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := DomainSaveImageGetXMLDescArgs {
+ File: File,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(235, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSaveImageDefineXML is the go wrapper for REMOTE_PROC_DOMAIN_SAVE_IMAGE_DEFINE_XML.
+func (l *Libvirt) DomainSaveImageDefineXML(File string, Dxml string, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSaveImageDefineXMLArgs {
+ File: File,
+ Dxml: Dxml,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(236, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockJobAbort is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_JOB_ABORT.
+func (l *Libvirt) DomainBlockJobAbort(Dom Domain, Path string, Flags DomainBlockJobAbortFlags) (err error) {
+ var buf []byte
+
+ args := DomainBlockJobAbortArgs {
+ Dom: Dom,
+ Path: Path,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(237, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetBlockJobInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_BLOCK_JOB_INFO.
+func (l *Libvirt) DomainGetBlockJobInfo(Dom Domain, Path string, Flags uint32) (rFound int32, rType int32, rBandwidth uint64, rCur uint64, rEnd uint64, err error) {
+ var buf []byte
+
+ args := DomainGetBlockJobInfoArgs {
+ Dom: Dom,
+ Path: Path,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(238, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Found: int32
+ _, err = dec.Decode(&rFound)
+ if err != nil {
+ return
+ }
+ // Type: int32
+ _, err = dec.Decode(&rType)
+ if err != nil {
+ return
+ }
+ // Bandwidth: uint64
+ _, err = dec.Decode(&rBandwidth)
+ if err != nil {
+ return
+ }
+ // Cur: uint64
+ _, err = dec.Decode(&rCur)
+ if err != nil {
+ return
+ }
+ // End: uint64
+ _, err = dec.Decode(&rEnd)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockJobSetSpeed is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED.
+func (l *Libvirt) DomainBlockJobSetSpeed(Dom Domain, Path string, Bandwidth uint64, Flags DomainBlockJobSetSpeedFlags) (err error) {
+ var buf []byte
+
+ args := DomainBlockJobSetSpeedArgs {
+ Dom: Dom,
+ Path: Path,
+ Bandwidth: Bandwidth,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(239, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockPull is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_PULL.
+func (l *Libvirt) DomainBlockPull(Dom Domain, Path string, Bandwidth uint64, Flags DomainBlockPullFlags) (err error) {
+ var buf []byte
+
+ args := DomainBlockPullArgs {
+ Dom: Dom,
+ Path: Path,
+ Bandwidth: Bandwidth,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(240, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventBlockJob is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB.
+func (l *Libvirt) DomainEventBlockJob() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(241, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateGetMaxSpeed is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED.
+func (l *Libvirt) DomainMigrateGetMaxSpeed(Dom Domain, Flags uint32) (rBandwidth uint64, err error) {
+ var buf []byte
+
+ args := DomainMigrateGetMaxSpeedArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(242, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Bandwidth: uint64
+ _, err = dec.Decode(&rBandwidth)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockStatsFlags is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS.
+func (l *Libvirt) DomainBlockStatsFlags(Dom Domain, Path string, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := DomainBlockStatsFlagsArgs {
+ Dom: Dom,
+ Path: Path,
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(243, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotGetParent is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT.
+func (l *Libvirt) DomainSnapshotGetParent(Snap DomainSnapshot, Flags uint32) (rSnap DomainSnapshot, err error) {
+ var buf []byte
+
+ args := DomainSnapshotGetParentArgs {
+ Snap: Snap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(244, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Snap: DomainSnapshot
+ _, err = dec.Decode(&rSnap)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainReset is the go wrapper for REMOTE_PROC_DOMAIN_RESET.
+func (l *Libvirt) DomainReset(Dom Domain, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainResetArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(245, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotNumChildren is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN.
+func (l *Libvirt) DomainSnapshotNumChildren(Snap DomainSnapshot, Flags uint32) (rNum int32, err error) {
+ var buf []byte
+
+ args := DomainSnapshotNumChildrenArgs {
+ Snap: Snap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(246, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Num: int32
+ _, err = dec.Decode(&rNum)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotListChildrenNames is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES.
+func (l *Libvirt) DomainSnapshotListChildrenNames(Snap DomainSnapshot, Maxnames int32, Flags uint32) (rNames []string, err error) {
+ var buf []byte
+
+ args := DomainSnapshotListChildrenNamesArgs {
+ Snap: Snap,
+ Maxnames: Maxnames,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(247, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Names: []string
+ _, err = dec.Decode(&rNames)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventDiskChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE.
+func (l *Libvirt) DomainEventDiskChange() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(248, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainOpenGraphics is the go wrapper for REMOTE_PROC_DOMAIN_OPEN_GRAPHICS.
+func (l *Libvirt) DomainOpenGraphics(Dom Domain, Idx uint32, Flags DomainOpenGraphicsFlags) (err error) {
+ var buf []byte
+
+ args := DomainOpenGraphicsArgs {
+ Dom: Dom,
+ Idx: Idx,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(249, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeSuspendForDuration is the go wrapper for REMOTE_PROC_NODE_SUSPEND_FOR_DURATION.
+func (l *Libvirt) NodeSuspendForDuration(Target uint32, Duration uint64, Flags uint32) (err error) {
+ var buf []byte
+
+ args := NodeSuspendForDurationArgs {
+ Target: Target,
+ Duration: Duration,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(250, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockResize is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_RESIZE.
+func (l *Libvirt) DomainBlockResize(Dom Domain, Disk string, Size uint64, Flags DomainBlockResizeFlags) (err error) {
+ var buf []byte
+
+ args := DomainBlockResizeArgs {
+ Dom: Dom,
+ Disk: Disk,
+ Size: Size,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(251, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetBlockIOTune is the go wrapper for REMOTE_PROC_DOMAIN_SET_BLOCK_IO_TUNE.
+func (l *Libvirt) DomainSetBlockIOTune(Dom Domain, Disk string, Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetBlockIOTuneArgs {
+ Dom: Dom,
+ Disk: Disk,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(252, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetBlockIOTune is the go wrapper for REMOTE_PROC_DOMAIN_GET_BLOCK_IO_TUNE.
+func (l *Libvirt) DomainGetBlockIOTune(Dom Domain, Disk OptString, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := DomainGetBlockIOTuneArgs {
+ Dom: Dom,
+ Disk: Disk,
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(253, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetNumaParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_NUMA_PARAMETERS.
+func (l *Libvirt) DomainSetNumaParameters(Dom Domain, Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetNumaParametersArgs {
+ Dom: Dom,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(254, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetNumaParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_NUMA_PARAMETERS.
+func (l *Libvirt) DomainGetNumaParameters(Dom Domain, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := DomainGetNumaParametersArgs {
+ Dom: Dom,
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(255, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetInterfaceParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_INTERFACE_PARAMETERS.
+func (l *Libvirt) DomainSetInterfaceParameters(Dom Domain, Device string, Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetInterfaceParametersArgs {
+ Dom: Dom,
+ Device: Device,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(256, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetInterfaceParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_INTERFACE_PARAMETERS.
+func (l *Libvirt) DomainGetInterfaceParameters(Dom Domain, Device string, Nparams int32, Flags DomainModificationImpact) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := DomainGetInterfaceParametersArgs {
+ Dom: Dom,
+ Device: Device,
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(257, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainShutdownFlags is the go wrapper for REMOTE_PROC_DOMAIN_SHUTDOWN_FLAGS.
+func (l *Libvirt) DomainShutdownFlags(Dom Domain, Flags DomainShutdownFlagValues) (err error) {
+ var buf []byte
+
+ args := DomainShutdownFlagsArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(258, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolWipePattern is the go wrapper for REMOTE_PROC_STORAGE_VOL_WIPE_PATTERN.
+func (l *Libvirt) StorageVolWipePattern(Vol StorageVol, Algorithm uint32, Flags uint32) (err error) {
+ var buf []byte
+
+ args := StorageVolWipePatternArgs {
+ Vol: Vol,
+ Algorithm: Algorithm,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(259, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolResize is the go wrapper for REMOTE_PROC_STORAGE_VOL_RESIZE.
+func (l *Libvirt) StorageVolResize(Vol StorageVol, Capacity uint64, Flags StorageVolResizeFlags) (err error) {
+ var buf []byte
+
+ args := StorageVolResizeArgs {
+ Vol: Vol,
+ Capacity: Capacity,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(260, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainPmSuspendForDuration is the go wrapper for REMOTE_PROC_DOMAIN_PM_SUSPEND_FOR_DURATION.
+func (l *Libvirt) DomainPmSuspendForDuration(Dom Domain, Target uint32, Duration uint64, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainPmSuspendForDurationArgs {
+ Dom: Dom,
+ Target: Target,
+ Duration: Duration,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(261, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetCPUStats is the go wrapper for REMOTE_PROC_DOMAIN_GET_CPU_STATS.
+func (l *Libvirt) DomainGetCPUStats(Dom Domain, Nparams uint32, StartCPU int32, Ncpus uint32, Flags TypedParameterFlags) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := DomainGetCPUStatsArgs {
+ Dom: Dom,
+ Nparams: Nparams,
+ StartCPU: StartCPU,
+ Ncpus: Ncpus,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(262, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetDiskErrors is the go wrapper for REMOTE_PROC_DOMAIN_GET_DISK_ERRORS.
+func (l *Libvirt) DomainGetDiskErrors(Dom Domain, Maxerrors uint32, Flags uint32) (rErrors []DomainDiskError, rNerrors int32, err error) {
+ var buf []byte
+
+ args := DomainGetDiskErrorsArgs {
+ Dom: Dom,
+ Maxerrors: Maxerrors,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(263, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Errors: []DomainDiskError
+ _, err = dec.Decode(&rErrors)
+ if err != nil {
+ return
+ }
+ // Nerrors: int32
+ _, err = dec.Decode(&rNerrors)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetMetadata is the go wrapper for REMOTE_PROC_DOMAIN_SET_METADATA.
+func (l *Libvirt) DomainSetMetadata(Dom Domain, Type int32, Metadata OptString, Key OptString, Uri OptString, Flags DomainModificationImpact) (err error) {
+ var buf []byte
+
+ args := DomainSetMetadataArgs {
+ Dom: Dom,
+ Type: Type,
+ Metadata: Metadata,
+ Key: Key,
+ Uri: Uri,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(264, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetMetadata is the go wrapper for REMOTE_PROC_DOMAIN_GET_METADATA.
+func (l *Libvirt) DomainGetMetadata(Dom Domain, Type int32, Uri OptString, Flags DomainModificationImpact) (rMetadata string, err error) {
+ var buf []byte
+
+ args := DomainGetMetadataArgs {
+ Dom: Dom,
+ Type: Type,
+ Uri: Uri,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(265, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Metadata: string
+ _, err = dec.Decode(&rMetadata)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockRebase is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_REBASE.
+func (l *Libvirt) DomainBlockRebase(Dom Domain, Path string, Base OptString, Bandwidth uint64, Flags DomainBlockRebaseFlags) (err error) {
+ var buf []byte
+
+ args := DomainBlockRebaseArgs {
+ Dom: Dom,
+ Path: Path,
+ Base: Base,
+ Bandwidth: Bandwidth,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(266, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainPmWakeup is the go wrapper for REMOTE_PROC_DOMAIN_PM_WAKEUP.
+func (l *Libvirt) DomainPmWakeup(Dom Domain, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainPmWakeupArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(267, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventTrayChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE.
+func (l *Libvirt) DomainEventTrayChange() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(268, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventPmwakeup is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP.
+func (l *Libvirt) DomainEventPmwakeup() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(269, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventPmsuspend is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND.
+func (l *Libvirt) DomainEventPmsuspend() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(270, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotIsCurrent is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_IS_CURRENT.
+func (l *Libvirt) DomainSnapshotIsCurrent(Snap DomainSnapshot, Flags uint32) (rCurrent int32, err error) {
+ var buf []byte
+
+ args := DomainSnapshotIsCurrentArgs {
+ Snap: Snap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(271, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Current: int32
+ _, err = dec.Decode(&rCurrent)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotHasMetadata is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_HAS_METADATA.
+func (l *Libvirt) DomainSnapshotHasMetadata(Snap DomainSnapshot, Flags uint32) (rMetadata int32, err error) {
+ var buf []byte
+
+ args := DomainSnapshotHasMetadataArgs {
+ Snap: Snap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(272, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Metadata: int32
+ _, err = dec.Decode(&rMetadata)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListAllDomains is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS.
+func (l *Libvirt) ConnectListAllDomains(NeedResults int32, Flags ConnectListAllDomainsFlags) (rDomains []Domain, rRet uint32, err error) {
+ var buf []byte
+
+ args := ConnectListAllDomainsArgs {
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(273, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Domains: []Domain
+ _, err = dec.Decode(&rDomains)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainListAllSnapshots is the go wrapper for REMOTE_PROC_DOMAIN_LIST_ALL_SNAPSHOTS.
+func (l *Libvirt) DomainListAllSnapshots(Dom Domain, NeedResults int32, Flags uint32) (rSnapshots []DomainSnapshot, rRet int32, err error) {
+ var buf []byte
+
+ args := DomainListAllSnapshotsArgs {
+ Dom: Dom,
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(274, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Snapshots: []DomainSnapshot
+ _, err = dec.Decode(&rSnapshots)
+ if err != nil {
+ return
+ }
+ // Ret: int32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSnapshotListAllChildren is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_ALL_CHILDREN.
+func (l *Libvirt) DomainSnapshotListAllChildren(Snapshot DomainSnapshot, NeedResults int32, Flags uint32) (rSnapshots []DomainSnapshot, rRet int32, err error) {
+ var buf []byte
+
+ args := DomainSnapshotListAllChildrenArgs {
+ Snapshot: Snapshot,
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(275, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Snapshots: []DomainSnapshot
+ _, err = dec.Decode(&rSnapshots)
+ if err != nil {
+ return
+ }
+ // Ret: int32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventBalloonChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_BALLOON_CHANGE.
+func (l *Libvirt) DomainEventBalloonChange() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(276, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetHostname is the go wrapper for REMOTE_PROC_DOMAIN_GET_HOSTNAME.
+func (l *Libvirt) DomainGetHostname(Dom Domain, Flags uint32) (rHostname string, err error) {
+ var buf []byte
+
+ args := DomainGetHostnameArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(277, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Hostname: string
+ _, err = dec.Decode(&rHostname)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetSecurityLabelList is the go wrapper for REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL_LIST.
+func (l *Libvirt) DomainGetSecurityLabelList(Dom Domain) (rLabels []DomainGetSecurityLabelRet, rRet int32, err error) {
+ var buf []byte
+
+ args := DomainGetSecurityLabelListArgs {
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(278, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Labels: []DomainGetSecurityLabelRet
+ _, err = dec.Decode(&rLabels)
+ if err != nil {
+ return
+ }
+ // Ret: int32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainPinEmulator is the go wrapper for REMOTE_PROC_DOMAIN_PIN_EMULATOR.
+func (l *Libvirt) DomainPinEmulator(Dom Domain, Cpumap []byte, Flags DomainModificationImpact) (err error) {
+ var buf []byte
+
+ args := DomainPinEmulatorArgs {
+ Dom: Dom,
+ Cpumap: Cpumap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(279, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetEmulatorPinInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_EMULATOR_PIN_INFO.
+func (l *Libvirt) DomainGetEmulatorPinInfo(Dom Domain, Maplen int32, Flags DomainModificationImpact) (rCpumaps []byte, rRet int32, err error) {
+ var buf []byte
+
+ args := DomainGetEmulatorPinInfoArgs {
+ Dom: Dom,
+ Maplen: Maplen,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(280, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Cpumaps: []byte
+ _, err = dec.Decode(&rCpumaps)
+ if err != nil {
+ return
+ }
+ // Ret: int32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListAllStoragePools is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_STORAGE_POOLS.
+func (l *Libvirt) ConnectListAllStoragePools(NeedResults int32, Flags ConnectListAllStoragePoolsFlags) (rPools []StoragePool, rRet uint32, err error) {
+ var buf []byte
+
+ args := ConnectListAllStoragePoolsArgs {
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(281, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Pools: []StoragePool
+ _, err = dec.Decode(&rPools)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolListAllVolumes is the go wrapper for REMOTE_PROC_STORAGE_POOL_LIST_ALL_VOLUMES.
+func (l *Libvirt) StoragePoolListAllVolumes(Pool StoragePool, NeedResults int32, Flags uint32) (rVols []StorageVol, rRet uint32, err error) {
+ var buf []byte
+
+ args := StoragePoolListAllVolumesArgs {
+ Pool: Pool,
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(282, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Vols: []StorageVol
+ _, err = dec.Decode(&rVols)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListAllNetworks is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_NETWORKS.
+func (l *Libvirt) ConnectListAllNetworks(NeedResults int32, Flags ConnectListAllNetworksFlags) (rNets []Network, rRet uint32, err error) {
+ var buf []byte
+
+ args := ConnectListAllNetworksArgs {
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(283, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Nets: []Network
+ _, err = dec.Decode(&rNets)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListAllInterfaces is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES.
+func (l *Libvirt) ConnectListAllInterfaces(NeedResults int32, Flags ConnectListAllInterfacesFlags) (rIfaces []Interface, rRet uint32, err error) {
+ var buf []byte
+
+ args := ConnectListAllInterfacesArgs {
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(284, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Ifaces: []Interface
+ _, err = dec.Decode(&rIfaces)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListAllNodeDevices is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_NODE_DEVICES.
+func (l *Libvirt) ConnectListAllNodeDevices(NeedResults int32, Flags uint32) (rDevices []NodeDevice, rRet uint32, err error) {
+ var buf []byte
+
+ args := ConnectListAllNodeDevicesArgs {
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(285, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Devices: []NodeDevice
+ _, err = dec.Decode(&rDevices)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListAllNwfilters is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS.
+func (l *Libvirt) ConnectListAllNwfilters(NeedResults int32, Flags uint32) (rFilters []Nwfilter, rRet uint32, err error) {
+ var buf []byte
+
+ args := ConnectListAllNwfiltersArgs {
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(286, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Filters: []Nwfilter
+ _, err = dec.Decode(&rFilters)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListAllSecrets is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_SECRETS.
+func (l *Libvirt) ConnectListAllSecrets(NeedResults int32, Flags ConnectListAllSecretsFlags) (rSecrets []Secret, rRet uint32, err error) {
+ var buf []byte
+
+ args := ConnectListAllSecretsArgs {
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(287, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Secrets: []Secret
+ _, err = dec.Decode(&rSecrets)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeSetMemoryParameters is the go wrapper for REMOTE_PROC_NODE_SET_MEMORY_PARAMETERS.
+func (l *Libvirt) NodeSetMemoryParameters(Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := NodeSetMemoryParametersArgs {
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(288, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetMemoryParameters is the go wrapper for REMOTE_PROC_NODE_GET_MEMORY_PARAMETERS.
+func (l *Libvirt) NodeGetMemoryParameters(Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := NodeGetMemoryParametersArgs {
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(289, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockCommit is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_COMMIT.
+func (l *Libvirt) DomainBlockCommit(Dom Domain, Disk string, Base OptString, Top OptString, Bandwidth uint64, Flags DomainBlockCommitFlags) (err error) {
+ var buf []byte
+
+ args := DomainBlockCommitArgs {
+ Dom: Dom,
+ Disk: Disk,
+ Base: Base,
+ Top: Top,
+ Bandwidth: Bandwidth,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(290, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkUpdate is the go wrapper for REMOTE_PROC_NETWORK_UPDATE.
+func (l *Libvirt) NetworkUpdate(Net Network, Command uint32, Section uint32, ParentIndex int32, XML string, Flags NetworkUpdateFlags) (err error) {
+ var buf []byte
+
+ args := NetworkUpdateArgs {
+ Net: Net,
+ Command: Command,
+ Section: Section,
+ ParentIndex: ParentIndex,
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(291, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventPmsuspendDisk is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND_DISK.
+func (l *Libvirt) DomainEventPmsuspendDisk() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(292, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetCPUMap is the go wrapper for REMOTE_PROC_NODE_GET_CPU_MAP.
+func (l *Libvirt) NodeGetCPUMap(NeedMap int32, NeedOnline int32, Flags uint32) (rCpumap []byte, rOnline uint32, rRet int32, err error) {
+ var buf []byte
+
+ args := NodeGetCPUMapArgs {
+ NeedMap: NeedMap,
+ NeedOnline: NeedOnline,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(293, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Cpumap: []byte
+ _, err = dec.Decode(&rCpumap)
+ if err != nil {
+ return
+ }
+ // Online: uint32
+ _, err = dec.Decode(&rOnline)
+ if err != nil {
+ return
+ }
+ // Ret: int32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainFstrim is the go wrapper for REMOTE_PROC_DOMAIN_FSTRIM.
+func (l *Libvirt) DomainFstrim(Dom Domain, MountPoint OptString, Minimum uint64, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainFstrimArgs {
+ Dom: Dom,
+ MountPoint: MountPoint,
+ Minimum: Minimum,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(294, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSendProcessSignal is the go wrapper for REMOTE_PROC_DOMAIN_SEND_PROCESS_SIGNAL.
+func (l *Libvirt) DomainSendProcessSignal(Dom Domain, PidValue int64, Signum uint32, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSendProcessSignalArgs {
+ Dom: Dom,
+ PidValue: PidValue,
+ Signum: Signum,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(295, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainOpenChannel is the go wrapper for REMOTE_PROC_DOMAIN_OPEN_CHANNEL.
+func (l *Libvirt) DomainOpenChannel(Dom Domain, Name OptString, inStream io.Writer, Flags DomainChannelFlags) (err error) {
+ var buf []byte
+
+ args := DomainOpenChannelArgs {
+ Dom: Dom,
+ Name: Name,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(296, constants.Program, buf, nil, inStream)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceLookupScsiHostByWwn is the go wrapper for REMOTE_PROC_NODE_DEVICE_LOOKUP_SCSI_HOST_BY_WWN.
+func (l *Libvirt) NodeDeviceLookupScsiHostByWwn(Wwnn string, Wwpn string, Flags uint32) (rDev NodeDevice, err error) {
+ var buf []byte
+
+ args := NodeDeviceLookupScsiHostByWwnArgs {
+ Wwnn: Wwnn,
+ Wwpn: Wwpn,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(297, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dev: NodeDevice
+ _, err = dec.Decode(&rDev)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetJobStats is the go wrapper for REMOTE_PROC_DOMAIN_GET_JOB_STATS.
+func (l *Libvirt) DomainGetJobStats(Dom Domain, Flags DomainGetJobStatsFlags) (rType int32, rParams []TypedParam, err error) {
+ var buf []byte
+
+ args := DomainGetJobStatsArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(298, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Type: int32
+ _, err = dec.Decode(&rType)
+ if err != nil {
+ return
+ }
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateGetCompressionCache is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_GET_COMPRESSION_CACHE.
+func (l *Libvirt) DomainMigrateGetCompressionCache(Dom Domain, Flags uint32) (rCacheSize uint64, err error) {
+ var buf []byte
+
+ args := DomainMigrateGetCompressionCacheArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(299, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CacheSize: uint64
+ _, err = dec.Decode(&rCacheSize)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateSetCompressionCache is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_SET_COMPRESSION_CACHE.
+func (l *Libvirt) DomainMigrateSetCompressionCache(Dom Domain, CacheSize uint64, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainMigrateSetCompressionCacheArgs {
+ Dom: Dom,
+ CacheSize: CacheSize,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(300, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceDetachFlags is the go wrapper for REMOTE_PROC_NODE_DEVICE_DETACH_FLAGS.
+func (l *Libvirt) NodeDeviceDetachFlags(Name string, DriverName OptString, Flags uint32) (err error) {
+ var buf []byte
+
+ args := NodeDeviceDetachFlagsArgs {
+ Name: Name,
+ DriverName: DriverName,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(301, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateBegin3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3_PARAMS.
+func (l *Libvirt) DomainMigrateBegin3Params(Dom Domain, Params []TypedParam, Flags uint32) (rCookieOut []byte, rXML string, err error) {
+ var buf []byte
+
+ args := DomainMigrateBegin3ParamsArgs {
+ Dom: Dom,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(302, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePrepare3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3_PARAMS.
+func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, rUriOut OptString, err error) {
+ var buf []byte
+
+ args := DomainMigratePrepare3ParamsArgs {
+ Params: Params,
+ CookieIn: CookieIn,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(303, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+ // UriOut: OptString
+ _, err = dec.Decode(&rUriOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePrepareTunnel3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3_PARAMS.
+func (l *Libvirt) DomainMigratePrepareTunnel3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, err error) {
+ var buf []byte
+
+ args := DomainMigratePrepareTunnel3ParamsArgs {
+ Params: Params,
+ CookieIn: CookieIn,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(304, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigratePerform3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3_PARAMS.
+func (l *Libvirt) DomainMigratePerform3Params(Dom Domain, Dconnuri OptString, Params []TypedParam, CookieIn []byte, Flags DomainMigrateFlags) (rCookieOut []byte, err error) {
+ var buf []byte
+
+ args := DomainMigratePerform3ParamsArgs {
+ Dom: Dom,
+ Dconnuri: Dconnuri,
+ Params: Params,
+ CookieIn: CookieIn,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(305, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateFinish3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_FINISH3_PARAMS.
+func (l *Libvirt) DomainMigrateFinish3Params(Params []TypedParam, CookieIn []byte, Flags uint32, Cancelled int32) (rDom Domain, rCookieOut []byte, err error) {
+ var buf []byte
+
+ args := DomainMigrateFinish3ParamsArgs {
+ Params: Params,
+ CookieIn: CookieIn,
+ Flags: Flags,
+ Cancelled: Cancelled,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(306, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+ // CookieOut: []byte
+ _, err = dec.Decode(&rCookieOut)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateConfirm3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3_PARAMS.
+func (l *Libvirt) DomainMigrateConfirm3Params(Dom Domain, Params []TypedParam, CookieIn []byte, Flags uint32, Cancelled int32) (err error) {
+ var buf []byte
+
+ args := DomainMigrateConfirm3ParamsArgs {
+ Dom: Dom,
+ Params: Params,
+ CookieIn: CookieIn,
+ Flags: Flags,
+ Cancelled: Cancelled,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(307, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetMemoryStatsPeriod is the go wrapper for REMOTE_PROC_DOMAIN_SET_MEMORY_STATS_PERIOD.
+func (l *Libvirt) DomainSetMemoryStatsPeriod(Dom Domain, Period int32, Flags DomainMemoryModFlags) (err error) {
+ var buf []byte
+
+ args := DomainSetMemoryStatsPeriodArgs {
+ Dom: Dom,
+ Period: Period,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(308, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCreateXMLWithFiles is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_XML_WITH_FILES.
+func (l *Libvirt) DomainCreateXMLWithFiles(XMLDesc string, Flags DomainCreateFlags) (rDom Domain, err error) {
+ var buf []byte
+
+ args := DomainCreateXMLWithFilesArgs {
+ XMLDesc: XMLDesc,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(309, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCreateWithFiles is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_WITH_FILES.
+func (l *Libvirt) DomainCreateWithFiles(Dom Domain, Flags DomainCreateFlags) (rDom Domain, err error) {
+ var buf []byte
+
+ args := DomainCreateWithFilesArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(310, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventDeviceRemoved is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_DEVICE_REMOVED.
+func (l *Libvirt) DomainEventDeviceRemoved() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(311, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetCPUModelNames is the go wrapper for REMOTE_PROC_CONNECT_GET_CPU_MODEL_NAMES.
+func (l *Libvirt) ConnectGetCPUModelNames(Arch string, NeedResults int32, Flags uint32) (rModels []string, rRet int32, err error) {
+ var buf []byte
+
+ args := ConnectGetCPUModelNamesArgs {
+ Arch: Arch,
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(312, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Models: []string
+ _, err = dec.Decode(&rModels)
+ if err != nil {
+ return
+ }
+ // Ret: int32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNetworkEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_NETWORK_EVENT_REGISTER_ANY.
+func (l *Libvirt) ConnectNetworkEventRegisterAny(EventID int32, Net OptNetwork) (rCallbackID int32, err error) {
+ var buf []byte
+
+ args := ConnectNetworkEventRegisterAnyArgs {
+ EventID: EventID,
+ Net: Net,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(313, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CallbackID: int32
+ _, err = dec.Decode(&rCallbackID)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNetworkEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_NETWORK_EVENT_DEREGISTER_ANY.
+func (l *Libvirt) ConnectNetworkEventDeregisterAny(CallbackID int32) (err error) {
+ var buf []byte
+
+ args := ConnectNetworkEventDeregisterAnyArgs {
+ CallbackID: CallbackID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(314, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkEventLifecycle is the go wrapper for REMOTE_PROC_NETWORK_EVENT_LIFECYCLE.
+func (l *Libvirt) NetworkEventLifecycle() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(315, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectDomainEventCallbackRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_REGISTER_ANY.
+func (l *Libvirt) ConnectDomainEventCallbackRegisterAny(EventID int32, Dom OptDomain) (rCallbackID int32, err error) {
+ var buf []byte
+
+ args := ConnectDomainEventCallbackRegisterAnyArgs {
+ EventID: EventID,
+ Dom: Dom,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(316, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CallbackID: int32
+ _, err = dec.Decode(&rCallbackID)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectDomainEventCallbackDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_DEREGISTER_ANY.
+func (l *Libvirt) ConnectDomainEventCallbackDeregisterAny(CallbackID int32) (err error) {
+ var buf []byte
+
+ args := ConnectDomainEventCallbackDeregisterAnyArgs {
+ CallbackID: CallbackID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(317, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackLifecycle is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_LIFECYCLE.
+func (l *Libvirt) DomainEventCallbackLifecycle() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(318, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackReboot is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_REBOOT.
+func (l *Libvirt) DomainEventCallbackReboot() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(319, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackRtcChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_RTC_CHANGE.
+func (l *Libvirt) DomainEventCallbackRtcChange() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(320, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackWatchdog is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_WATCHDOG.
+func (l *Libvirt) DomainEventCallbackWatchdog() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(321, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackIOError is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR.
+func (l *Libvirt) DomainEventCallbackIOError() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(322, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackGraphics is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_GRAPHICS.
+func (l *Libvirt) DomainEventCallbackGraphics() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(323, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackIOErrorReason is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR_REASON.
+func (l *Libvirt) DomainEventCallbackIOErrorReason() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(324, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackControlError is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_CONTROL_ERROR.
+func (l *Libvirt) DomainEventCallbackControlError() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(325, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackBlockJob is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BLOCK_JOB.
+func (l *Libvirt) DomainEventCallbackBlockJob() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(326, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackDiskChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DISK_CHANGE.
+func (l *Libvirt) DomainEventCallbackDiskChange() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(327, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackTrayChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TRAY_CHANGE.
+func (l *Libvirt) DomainEventCallbackTrayChange() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(328, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackPmwakeup is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMWAKEUP.
+func (l *Libvirt) DomainEventCallbackPmwakeup() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(329, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackPmsuspend is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND.
+func (l *Libvirt) DomainEventCallbackPmsuspend() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(330, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackBalloonChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BALLOON_CHANGE.
+func (l *Libvirt) DomainEventCallbackBalloonChange() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(331, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackPmsuspendDisk is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND_DISK.
+func (l *Libvirt) DomainEventCallbackPmsuspendDisk() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(332, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackDeviceRemoved is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVED.
+func (l *Libvirt) DomainEventCallbackDeviceRemoved() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(333, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCoreDumpWithFormat is the go wrapper for REMOTE_PROC_DOMAIN_CORE_DUMP_WITH_FORMAT.
+func (l *Libvirt) DomainCoreDumpWithFormat(Dom Domain, To string, Dumpformat uint32, Flags DomainCoreDumpFlags) (err error) {
+ var buf []byte
+
+ args := DomainCoreDumpWithFormatArgs {
+ Dom: Dom,
+ To: To,
+ Dumpformat: Dumpformat,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(334, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainFsfreeze is the go wrapper for REMOTE_PROC_DOMAIN_FSFREEZE.
+func (l *Libvirt) DomainFsfreeze(Dom Domain, Mountpoints []string, Flags uint32) (rFilesystems int32, err error) {
+ var buf []byte
+
+ args := DomainFsfreezeArgs {
+ Dom: Dom,
+ Mountpoints: Mountpoints,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(335, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Filesystems: int32
+ _, err = dec.Decode(&rFilesystems)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainFsthaw is the go wrapper for REMOTE_PROC_DOMAIN_FSTHAW.
+func (l *Libvirt) DomainFsthaw(Dom Domain, Mountpoints []string, Flags uint32) (rFilesystems int32, err error) {
+ var buf []byte
+
+ args := DomainFsthawArgs {
+ Dom: Dom,
+ Mountpoints: Mountpoints,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(336, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Filesystems: int32
+ _, err = dec.Decode(&rFilesystems)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetTime is the go wrapper for REMOTE_PROC_DOMAIN_GET_TIME.
+func (l *Libvirt) DomainGetTime(Dom Domain, Flags uint32) (rSeconds int64, rNseconds uint32, err error) {
+ var buf []byte
+
+ args := DomainGetTimeArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(337, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Seconds: int64
+ _, err = dec.Decode(&rSeconds)
+ if err != nil {
+ return
+ }
+ // Nseconds: uint32
+ _, err = dec.Decode(&rNseconds)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetTime is the go wrapper for REMOTE_PROC_DOMAIN_SET_TIME.
+func (l *Libvirt) DomainSetTime(Dom Domain, Seconds int64, Nseconds uint32, Flags DomainSetTimeFlags) (err error) {
+ var buf []byte
+
+ args := DomainSetTimeArgs {
+ Dom: Dom,
+ Seconds: Seconds,
+ Nseconds: Nseconds,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(338, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventBlockJob2 is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_2.
+func (l *Libvirt) DomainEventBlockJob2() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(339, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetFreePages is the go wrapper for REMOTE_PROC_NODE_GET_FREE_PAGES.
+func (l *Libvirt) NodeGetFreePages(Pages []uint32, StartCell int32, CellCount uint32, Flags uint32) (rCounts []uint64, err error) {
+ var buf []byte
+
+ args := NodeGetFreePagesArgs {
+ Pages: Pages,
+ StartCell: StartCell,
+ CellCount: CellCount,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(340, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Counts: []uint64
+ _, err = dec.Decode(&rCounts)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkGetDhcpLeases is the go wrapper for REMOTE_PROC_NETWORK_GET_DHCP_LEASES.
+func (l *Libvirt) NetworkGetDhcpLeases(Net Network, Mac OptString, NeedResults int32, Flags uint32) (rLeases []NetworkDhcpLease, rRet uint32, err error) {
+ var buf []byte
+
+ args := NetworkGetDhcpLeasesArgs {
+ Net: Net,
+ Mac: Mac,
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(341, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Leases: []NetworkDhcpLease
+ _, err = dec.Decode(&rLeases)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetDomainCapabilities is the go wrapper for REMOTE_PROC_CONNECT_GET_DOMAIN_CAPABILITIES.
+func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin OptString, Arch OptString, Machine OptString, Virttype OptString, Flags uint32) (rCapabilities string, err error) {
+ var buf []byte
+
+ args := ConnectGetDomainCapabilitiesArgs {
+ Emulatorbin: Emulatorbin,
+ Arch: Arch,
+ Machine: Machine,
+ Virttype: Virttype,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(342, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Capabilities: string
+ _, err = dec.Decode(&rCapabilities)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainOpenGraphicsFd is the go wrapper for REMOTE_PROC_DOMAIN_OPEN_GRAPHICS_FD.
+func (l *Libvirt) DomainOpenGraphicsFd(Dom Domain, Idx uint32, Flags DomainOpenGraphicsFlags) (err error) {
+ var buf []byte
+
+ args := DomainOpenGraphicsFdArgs {
+ Dom: Dom,
+ Idx: Idx,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(343, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetAllDomainStats is the go wrapper for REMOTE_PROC_CONNECT_GET_ALL_DOMAIN_STATS.
+func (l *Libvirt) ConnectGetAllDomainStats(Doms []Domain, Stats uint32, Flags ConnectGetAllDomainStatsFlags) (rRetStats []DomainStatsRecord, err error) {
+ var buf []byte
+
+ args := ConnectGetAllDomainStatsArgs {
+ Doms: Doms,
+ Stats: Stats,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(344, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // RetStats: []DomainStatsRecord
+ _, err = dec.Decode(&rRetStats)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBlockCopy is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_COPY.
+func (l *Libvirt) DomainBlockCopy(Dom Domain, Path string, Destxml string, Params []TypedParam, Flags DomainBlockCopyFlags) (err error) {
+ var buf []byte
+
+ args := DomainBlockCopyArgs {
+ Dom: Dom,
+ Path: Path,
+ Destxml: Destxml,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(345, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackTunable is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TUNABLE.
+func (l *Libvirt) DomainEventCallbackTunable() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(346, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeAllocPages is the go wrapper for REMOTE_PROC_NODE_ALLOC_PAGES.
+func (l *Libvirt) NodeAllocPages(PageSizes []uint32, PageCounts []uint64, StartCell int32, CellCount uint32, Flags NodeAllocPagesFlags) (rRet int32, err error) {
+ var buf []byte
+
+ args := NodeAllocPagesArgs {
+ PageSizes: PageSizes,
+ PageCounts: PageCounts,
+ StartCell: StartCell,
+ CellCount: CellCount,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(347, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Ret: int32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackAgentLifecycle is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_AGENT_LIFECYCLE.
+func (l *Libvirt) DomainEventCallbackAgentLifecycle() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(348, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetFsinfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_FSINFO.
+func (l *Libvirt) DomainGetFsinfo(Dom Domain, Flags uint32) (rInfo []DomainFsinfo, rRet uint32, err error) {
+ var buf []byte
+
+ args := DomainGetFsinfoArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(349, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Info: []DomainFsinfo
+ _, err = dec.Decode(&rInfo)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainDefineXMLFlags is the go wrapper for REMOTE_PROC_DOMAIN_DEFINE_XML_FLAGS.
+func (l *Libvirt) DomainDefineXMLFlags(XML string, Flags DomainDefineFlags) (rDom Domain, err error) {
+ var buf []byte
+
+ args := DomainDefineXMLFlagsArgs {
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(350, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Dom: Domain
+ _, err = dec.Decode(&rDom)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetIothreadInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_IOTHREAD_INFO.
+func (l *Libvirt) DomainGetIothreadInfo(Dom Domain, Flags DomainModificationImpact) (rInfo []DomainIothreadInfo, rRet uint32, err error) {
+ var buf []byte
+
+ args := DomainGetIothreadInfoArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(351, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Info: []DomainIothreadInfo
+ _, err = dec.Decode(&rInfo)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainPinIothread is the go wrapper for REMOTE_PROC_DOMAIN_PIN_IOTHREAD.
+func (l *Libvirt) DomainPinIothread(Dom Domain, IothreadsID uint32, Cpumap []byte, Flags DomainModificationImpact) (err error) {
+ var buf []byte
+
+ args := DomainPinIothreadArgs {
+ Dom: Dom,
+ IothreadsID: IothreadsID,
+ Cpumap: Cpumap,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(352, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainInterfaceAddresses is the go wrapper for REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES.
+func (l *Libvirt) DomainInterfaceAddresses(Dom Domain, Source uint32, Flags uint32) (rIfaces []DomainInterface, err error) {
+ var buf []byte
+
+ args := DomainInterfaceAddressesArgs {
+ Dom: Dom,
+ Source: Source,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(353, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Ifaces: []DomainInterface
+ _, err = dec.Decode(&rIfaces)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackDeviceAdded is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_ADDED.
+func (l *Libvirt) DomainEventCallbackDeviceAdded() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(354, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainAddIothread is the go wrapper for REMOTE_PROC_DOMAIN_ADD_IOTHREAD.
+func (l *Libvirt) DomainAddIothread(Dom Domain, IothreadID uint32, Flags DomainModificationImpact) (err error) {
+ var buf []byte
+
+ args := DomainAddIothreadArgs {
+ Dom: Dom,
+ IothreadID: IothreadID,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(355, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainDelIothread is the go wrapper for REMOTE_PROC_DOMAIN_DEL_IOTHREAD.
+func (l *Libvirt) DomainDelIothread(Dom Domain, IothreadID uint32, Flags DomainModificationImpact) (err error) {
+ var buf []byte
+
+ args := DomainDelIothreadArgs {
+ Dom: Dom,
+ IothreadID: IothreadID,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(356, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetUserPassword is the go wrapper for REMOTE_PROC_DOMAIN_SET_USER_PASSWORD.
+func (l *Libvirt) DomainSetUserPassword(Dom Domain, User OptString, Password OptString, Flags DomainSetUserPasswordFlags) (err error) {
+ var buf []byte
+
+ args := DomainSetUserPasswordArgs {
+ Dom: Dom,
+ User: User,
+ Password: Password,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(357, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainRename is the go wrapper for REMOTE_PROC_DOMAIN_RENAME.
+func (l *Libvirt) DomainRename(Dom Domain, NewName OptString, Flags uint32) (rRetcode int32, err error) {
+ var buf []byte
+
+ args := DomainRenameArgs {
+ Dom: Dom,
+ NewName: NewName,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(358, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Retcode: int32
+ _, err = dec.Decode(&rRetcode)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackMigrationIteration is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_MIGRATION_ITERATION.
+func (l *Libvirt) DomainEventCallbackMigrationIteration() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(359, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectRegisterCloseCallback is the go wrapper for REMOTE_PROC_CONNECT_REGISTER_CLOSE_CALLBACK.
+func (l *Libvirt) ConnectRegisterCloseCallback() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(360, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectUnregisterCloseCallback is the go wrapper for REMOTE_PROC_CONNECT_UNREGISTER_CLOSE_CALLBACK.
+func (l *Libvirt) ConnectUnregisterCloseCallback() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(361, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectEventConnectionClosed is the go wrapper for REMOTE_PROC_CONNECT_EVENT_CONNECTION_CLOSED.
+func (l *Libvirt) ConnectEventConnectionClosed() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(362, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackJobCompleted is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_JOB_COMPLETED.
+func (l *Libvirt) DomainEventCallbackJobCompleted() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(363, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateStartPostCopy is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_START_POST_COPY.
+func (l *Libvirt) DomainMigrateStartPostCopy(Dom Domain, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainMigrateStartPostCopyArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(364, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetPerfEvents is the go wrapper for REMOTE_PROC_DOMAIN_GET_PERF_EVENTS.
+func (l *Libvirt) DomainGetPerfEvents(Dom Domain, Flags DomainModificationImpact) (rParams []TypedParam, err error) {
+ var buf []byte
+
+ args := DomainGetPerfEventsArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(365, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetPerfEvents is the go wrapper for REMOTE_PROC_DOMAIN_SET_PERF_EVENTS.
+func (l *Libvirt) DomainSetPerfEvents(Dom Domain, Params []TypedParam, Flags DomainModificationImpact) (err error) {
+ var buf []byte
+
+ args := DomainSetPerfEventsArgs {
+ Dom: Dom,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(366, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackDeviceRemovalFailed is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVAL_FAILED.
+func (l *Libvirt) DomainEventCallbackDeviceRemovalFailed() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(367, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectStoragePoolEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_REGISTER_ANY.
+func (l *Libvirt) ConnectStoragePoolEventRegisterAny(EventID int32, Pool OptStoragePool) (rCallbackID int32, err error) {
+ var buf []byte
+
+ args := ConnectStoragePoolEventRegisterAnyArgs {
+ EventID: EventID,
+ Pool: Pool,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(368, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CallbackID: int32
+ _, err = dec.Decode(&rCallbackID)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectStoragePoolEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_DEREGISTER_ANY.
+func (l *Libvirt) ConnectStoragePoolEventDeregisterAny(CallbackID int32) (err error) {
+ var buf []byte
+
+ args := ConnectStoragePoolEventDeregisterAnyArgs {
+ CallbackID: CallbackID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(369, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolEventLifecycle is the go wrapper for REMOTE_PROC_STORAGE_POOL_EVENT_LIFECYCLE.
+func (l *Libvirt) StoragePoolEventLifecycle() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(370, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetGuestVcpus is the go wrapper for REMOTE_PROC_DOMAIN_GET_GUEST_VCPUS.
+func (l *Libvirt) DomainGetGuestVcpus(Dom Domain, Flags uint32) (rParams []TypedParam, err error) {
+ var buf []byte
+
+ args := DomainGetGuestVcpusArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(371, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetGuestVcpus is the go wrapper for REMOTE_PROC_DOMAIN_SET_GUEST_VCPUS.
+func (l *Libvirt) DomainSetGuestVcpus(Dom Domain, Cpumap string, State int32, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetGuestVcpusArgs {
+ Dom: Dom,
+ Cpumap: Cpumap,
+ State: State,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(372, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolEventRefresh is the go wrapper for REMOTE_PROC_STORAGE_POOL_EVENT_REFRESH.
+func (l *Libvirt) StoragePoolEventRefresh() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(373, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNodeDeviceEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_REGISTER_ANY.
+func (l *Libvirt) ConnectNodeDeviceEventRegisterAny(EventID int32, Dev OptNodeDevice) (rCallbackID int32, err error) {
+ var buf []byte
+
+ args := ConnectNodeDeviceEventRegisterAnyArgs {
+ EventID: EventID,
+ Dev: Dev,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(374, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CallbackID: int32
+ _, err = dec.Decode(&rCallbackID)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectNodeDeviceEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_DEREGISTER_ANY.
+func (l *Libvirt) ConnectNodeDeviceEventDeregisterAny(CallbackID int32) (err error) {
+ var buf []byte
+
+ args := ConnectNodeDeviceEventDeregisterAnyArgs {
+ CallbackID: CallbackID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(375, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceEventLifecycle is the go wrapper for REMOTE_PROC_NODE_DEVICE_EVENT_LIFECYCLE.
+func (l *Libvirt) NodeDeviceEventLifecycle() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(376, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeDeviceEventUpdate is the go wrapper for REMOTE_PROC_NODE_DEVICE_EVENT_UPDATE.
+func (l *Libvirt) NodeDeviceEventUpdate() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(377, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StorageVolGetInfoFlags is the go wrapper for REMOTE_PROC_STORAGE_VOL_GET_INFO_FLAGS.
+func (l *Libvirt) StorageVolGetInfoFlags(Vol StorageVol, Flags uint32) (rType int8, rCapacity uint64, rAllocation uint64, err error) {
+ var buf []byte
+
+ args := StorageVolGetInfoFlagsArgs {
+ Vol: Vol,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(378, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Type: int8
+ _, err = dec.Decode(&rType)
+ if err != nil {
+ return
+ }
+ // Capacity: uint64
+ _, err = dec.Decode(&rCapacity)
+ if err != nil {
+ return
+ }
+ // Allocation: uint64
+ _, err = dec.Decode(&rAllocation)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventCallbackMetadataChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_METADATA_CHANGE.
+func (l *Libvirt) DomainEventCallbackMetadataChange() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(379, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectSecretEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_SECRET_EVENT_REGISTER_ANY.
+func (l *Libvirt) ConnectSecretEventRegisterAny(EventID int32, OptSecret OptSecret) (rCallbackID int32, err error) {
+ var buf []byte
+
+ args := ConnectSecretEventRegisterAnyArgs {
+ EventID: EventID,
+ OptSecret: OptSecret,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(380, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CallbackID: int32
+ _, err = dec.Decode(&rCallbackID)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectSecretEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_SECRET_EVENT_DEREGISTER_ANY.
+func (l *Libvirt) ConnectSecretEventDeregisterAny(CallbackID int32) (err error) {
+ var buf []byte
+
+ args := ConnectSecretEventDeregisterAnyArgs {
+ CallbackID: CallbackID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(381, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// SecretEventLifecycle is the go wrapper for REMOTE_PROC_SECRET_EVENT_LIFECYCLE.
+func (l *Libvirt) SecretEventLifecycle() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(382, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// SecretEventValueChanged is the go wrapper for REMOTE_PROC_SECRET_EVENT_VALUE_CHANGED.
+func (l *Libvirt) SecretEventValueChanged() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(383, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetVcpu is the go wrapper for REMOTE_PROC_DOMAIN_SET_VCPU.
+func (l *Libvirt) DomainSetVcpu(Dom Domain, Cpumap string, State int32, Flags DomainModificationImpact) (err error) {
+ var buf []byte
+
+ args := DomainSetVcpuArgs {
+ Dom: Dom,
+ Cpumap: Cpumap,
+ State: State,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(384, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventBlockThreshold is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_BLOCK_THRESHOLD.
+func (l *Libvirt) DomainEventBlockThreshold() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(385, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetBlockThreshold is the go wrapper for REMOTE_PROC_DOMAIN_SET_BLOCK_THRESHOLD.
+func (l *Libvirt) DomainSetBlockThreshold(Dom Domain, Dev string, Threshold uint64, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetBlockThresholdArgs {
+ Dom: Dom,
+ Dev: Dev,
+ Threshold: Threshold,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(386, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainMigrateGetMaxDowntime is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_DOWNTIME.
+func (l *Libvirt) DomainMigrateGetMaxDowntime(Dom Domain, Flags uint32) (rDowntime uint64, err error) {
+ var buf []byte
+
+ args := DomainMigrateGetMaxDowntimeArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(387, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Downtime: uint64
+ _, err = dec.Decode(&rDowntime)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainManagedSaveGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_MANAGED_SAVE_GET_XML_DESC.
+func (l *Libvirt) DomainManagedSaveGetXMLDesc(Dom Domain, Flags DomainXMLFlags) (rXML string, err error) {
+ var buf []byte
+
+ args := DomainManagedSaveGetXMLDescArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(388, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainManagedSaveDefineXML is the go wrapper for REMOTE_PROC_DOMAIN_MANAGED_SAVE_DEFINE_XML.
+func (l *Libvirt) DomainManagedSaveDefineXML(Dom Domain, Dxml OptString, Flags DomainSaveRestoreFlags) (err error) {
+ var buf []byte
+
+ args := DomainManagedSaveDefineXMLArgs {
+ Dom: Dom,
+ Dxml: Dxml,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(389, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetLifecycleAction is the go wrapper for REMOTE_PROC_DOMAIN_SET_LIFECYCLE_ACTION.
+func (l *Libvirt) DomainSetLifecycleAction(Dom Domain, Type uint32, Action uint32, Flags DomainModificationImpact) (err error) {
+ var buf []byte
+
+ args := DomainSetLifecycleActionArgs {
+ Dom: Dom,
+ Type: Type,
+ Action: Action,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(390, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// StoragePoolLookupByTargetPath is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH.
+func (l *Libvirt) StoragePoolLookupByTargetPath(Path string) (rPool StoragePool, err error) {
+ var buf []byte
+
+ args := StoragePoolLookupByTargetPathArgs {
+ Path: Path,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(391, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Pool: StoragePool
+ _, err = dec.Decode(&rPool)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainDetachDeviceAlias is the go wrapper for REMOTE_PROC_DOMAIN_DETACH_DEVICE_ALIAS.
+func (l *Libvirt) DomainDetachDeviceAlias(Dom Domain, Alias string, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainDetachDeviceAliasArgs {
+ Dom: Dom,
+ Alias: Alias,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(392, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectCompareHypervisorCPU is the go wrapper for REMOTE_PROC_CONNECT_COMPARE_HYPERVISOR_CPU.
+func (l *Libvirt) ConnectCompareHypervisorCPU(Emulator OptString, Arch OptString, Machine OptString, Virttype OptString, XMLCPU string, Flags uint32) (rResult int32, err error) {
+ var buf []byte
+
+ args := ConnectCompareHypervisorCPUArgs {
+ Emulator: Emulator,
+ Arch: Arch,
+ Machine: Machine,
+ Virttype: Virttype,
+ XMLCPU: XMLCPU,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(393, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Result: int32
+ _, err = dec.Decode(&rResult)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectBaselineHypervisorCPU is the go wrapper for REMOTE_PROC_CONNECT_BASELINE_HYPERVISOR_CPU.
+func (l *Libvirt) ConnectBaselineHypervisorCPU(Emulator OptString, Arch OptString, Machine OptString, Virttype OptString, XMLCPUs []string, Flags uint32) (rCPU string, err error) {
+ var buf []byte
+
+ args := ConnectBaselineHypervisorCPUArgs {
+ Emulator: Emulator,
+ Arch: Arch,
+ Machine: Machine,
+ Virttype: Virttype,
+ XMLCPUs: XMLCPUs,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(394, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // CPU: string
+ _, err = dec.Decode(&rCPU)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NodeGetSevInfo is the go wrapper for REMOTE_PROC_NODE_GET_SEV_INFO.
+func (l *Libvirt) NodeGetSevInfo(Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := NodeGetSevInfoArgs {
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(395, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetLaunchSecurityInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_LAUNCH_SECURITY_INFO.
+func (l *Libvirt) DomainGetLaunchSecurityInfo(Dom Domain, Flags uint32) (rParams []TypedParam, err error) {
+ var buf []byte
+
+ args := DomainGetLaunchSecurityInfoArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(396, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NwfilterBindingLookupByPortDev is the go wrapper for REMOTE_PROC_NWFILTER_BINDING_LOOKUP_BY_PORT_DEV.
+func (l *Libvirt) NwfilterBindingLookupByPortDev(Name string) (rOptNwfilter NwfilterBinding, err error) {
+ var buf []byte
+
+ args := NwfilterBindingLookupByPortDevArgs {
+ Name: Name,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(397, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // OptNwfilter: NwfilterBinding
+ _, err = dec.Decode(&rOptNwfilter)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NwfilterBindingGetXMLDesc is the go wrapper for REMOTE_PROC_NWFILTER_BINDING_GET_XML_DESC.
+func (l *Libvirt) NwfilterBindingGetXMLDesc(OptNwfilter NwfilterBinding, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := NwfilterBindingGetXMLDescArgs {
+ OptNwfilter: OptNwfilter,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(398, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NwfilterBindingCreateXML is the go wrapper for REMOTE_PROC_NWFILTER_BINDING_CREATE_XML.
+func (l *Libvirt) NwfilterBindingCreateXML(XML string, Flags uint32) (rOptNwfilter NwfilterBinding, err error) {
+ var buf []byte
+
+ args := NwfilterBindingCreateXMLArgs {
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(399, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // OptNwfilter: NwfilterBinding
+ _, err = dec.Decode(&rOptNwfilter)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NwfilterBindingDelete is the go wrapper for REMOTE_PROC_NWFILTER_BINDING_DELETE.
+func (l *Libvirt) NwfilterBindingDelete(OptNwfilter NwfilterBinding) (err error) {
+ var buf []byte
+
+ args := NwfilterBindingDeleteArgs {
+ OptNwfilter: OptNwfilter,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(400, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectListAllNwfilterBindings is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_NWFILTER_BINDINGS.
+func (l *Libvirt) ConnectListAllNwfilterBindings(NeedResults int32, Flags uint32) (rBindings []NwfilterBinding, rRet uint32, err error) {
+ var buf []byte
+
+ args := ConnectListAllNwfilterBindingsArgs {
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(401, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Bindings: []NwfilterBinding
+ _, err = dec.Decode(&rBindings)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainSetIothreadParams is the go wrapper for REMOTE_PROC_DOMAIN_SET_IOTHREAD_PARAMS.
+func (l *Libvirt) DomainSetIothreadParams(Dom Domain, IothreadID uint32, Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainSetIothreadParamsArgs {
+ Dom: Dom,
+ IothreadID: IothreadID,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(402, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectGetStoragePoolCapabilities is the go wrapper for REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES.
+func (l *Libvirt) ConnectGetStoragePoolCapabilities(Flags uint32) (rCapabilities string, err error) {
+ var buf []byte
+
+ args := ConnectGetStoragePoolCapabilitiesArgs {
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(403, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Capabilities: string
+ _, err = dec.Decode(&rCapabilities)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkListAllPorts is the go wrapper for REMOTE_PROC_NETWORK_LIST_ALL_PORTS.
+func (l *Libvirt) NetworkListAllPorts(OptNetwork Network, NeedResults int32, Flags uint32) (rPorts []NetworkPort, rRet uint32, err error) {
+ var buf []byte
+
+ args := NetworkListAllPortsArgs {
+ OptNetwork: OptNetwork,
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(404, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Ports: []NetworkPort
+ _, err = dec.Decode(&rPorts)
+ if err != nil {
+ return
+ }
+ // Ret: uint32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkPortLookupByUUID is the go wrapper for REMOTE_PROC_NETWORK_PORT_LOOKUP_BY_UUID.
+func (l *Libvirt) NetworkPortLookupByUUID(OptNetwork Network, UUID UUID) (rPort NetworkPort, err error) {
+ var buf []byte
+
+ args := NetworkPortLookupByUUIDArgs {
+ OptNetwork: OptNetwork,
+ UUID: UUID,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(405, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Port: NetworkPort
+ _, err = dec.Decode(&rPort)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkPortCreateXML is the go wrapper for REMOTE_PROC_NETWORK_PORT_CREATE_XML.
+func (l *Libvirt) NetworkPortCreateXML(OptNetwork Network, XML string, Flags uint32) (rPort NetworkPort, err error) {
+ var buf []byte
+
+ args := NetworkPortCreateXMLArgs {
+ OptNetwork: OptNetwork,
+ XML: XML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(406, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Port: NetworkPort
+ _, err = dec.Decode(&rPort)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkPortGetParameters is the go wrapper for REMOTE_PROC_NETWORK_PORT_GET_PARAMETERS.
+func (l *Libvirt) NetworkPortGetParameters(Port NetworkPort, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) {
+ var buf []byte
+
+ args := NetworkPortGetParametersArgs {
+ Port: Port,
+ Nparams: Nparams,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(407, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+ // Nparams: int32
+ _, err = dec.Decode(&rNparams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkPortSetParameters is the go wrapper for REMOTE_PROC_NETWORK_PORT_SET_PARAMETERS.
+func (l *Libvirt) NetworkPortSetParameters(Port NetworkPort, Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := NetworkPortSetParametersArgs {
+ Port: Port,
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(408, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkPortGetXMLDesc is the go wrapper for REMOTE_PROC_NETWORK_PORT_GET_XML_DESC.
+func (l *Libvirt) NetworkPortGetXMLDesc(Port NetworkPort, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := NetworkPortGetXMLDescArgs {
+ Port: Port,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(409, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// NetworkPortDelete is the go wrapper for REMOTE_PROC_NETWORK_PORT_DELETE.
+func (l *Libvirt) NetworkPortDelete(Port NetworkPort, Flags uint32) (err error) {
+ var buf []byte
+
+ args := NetworkPortDeleteArgs {
+ Port: Port,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(410, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCheckpointCreateXML is the go wrapper for REMOTE_PROC_DOMAIN_CHECKPOINT_CREATE_XML.
+func (l *Libvirt) DomainCheckpointCreateXML(Dom Domain, XMLDesc string, Flags uint32) (rCheckpoint DomainCheckpoint, err error) {
+ var buf []byte
+
+ args := DomainCheckpointCreateXMLArgs {
+ Dom: Dom,
+ XMLDesc: XMLDesc,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(411, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Checkpoint: DomainCheckpoint
+ _, err = dec.Decode(&rCheckpoint)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCheckpointGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_CHECKPOINT_GET_XML_DESC.
+func (l *Libvirt) DomainCheckpointGetXMLDesc(Checkpoint DomainCheckpoint, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := DomainCheckpointGetXMLDescArgs {
+ Checkpoint: Checkpoint,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(412, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainListAllCheckpoints is the go wrapper for REMOTE_PROC_DOMAIN_LIST_ALL_CHECKPOINTS.
+func (l *Libvirt) DomainListAllCheckpoints(Dom Domain, NeedResults int32, Flags uint32) (rCheckpoints []DomainCheckpoint, rRet int32, err error) {
+ var buf []byte
+
+ args := DomainListAllCheckpointsArgs {
+ Dom: Dom,
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(413, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Checkpoints: []DomainCheckpoint
+ _, err = dec.Decode(&rCheckpoints)
+ if err != nil {
+ return
+ }
+ // Ret: int32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCheckpointListAllChildren is the go wrapper for REMOTE_PROC_DOMAIN_CHECKPOINT_LIST_ALL_CHILDREN.
+func (l *Libvirt) DomainCheckpointListAllChildren(Checkpoint DomainCheckpoint, NeedResults int32, Flags uint32) (rCheckpoints []DomainCheckpoint, rRet int32, err error) {
+ var buf []byte
+
+ args := DomainCheckpointListAllChildrenArgs {
+ Checkpoint: Checkpoint,
+ NeedResults: NeedResults,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(414, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Checkpoints: []DomainCheckpoint
+ _, err = dec.Decode(&rCheckpoints)
+ if err != nil {
+ return
+ }
+ // Ret: int32
+ _, err = dec.Decode(&rRet)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCheckpointLookupByName is the go wrapper for REMOTE_PROC_DOMAIN_CHECKPOINT_LOOKUP_BY_NAME.
+func (l *Libvirt) DomainCheckpointLookupByName(Dom Domain, Name string, Flags uint32) (rCheckpoint DomainCheckpoint, err error) {
+ var buf []byte
+
+ args := DomainCheckpointLookupByNameArgs {
+ Dom: Dom,
+ Name: Name,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(415, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Checkpoint: DomainCheckpoint
+ _, err = dec.Decode(&rCheckpoint)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCheckpointGetParent is the go wrapper for REMOTE_PROC_DOMAIN_CHECKPOINT_GET_PARENT.
+func (l *Libvirt) DomainCheckpointGetParent(Checkpoint DomainCheckpoint, Flags uint32) (rParent DomainCheckpoint, err error) {
+ var buf []byte
+
+ args := DomainCheckpointGetParentArgs {
+ Checkpoint: Checkpoint,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(416, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Parent: DomainCheckpoint
+ _, err = dec.Decode(&rParent)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainCheckpointDelete is the go wrapper for REMOTE_PROC_DOMAIN_CHECKPOINT_DELETE.
+func (l *Libvirt) DomainCheckpointDelete(Checkpoint DomainCheckpoint, Flags DomainCheckpointDeleteFlags) (err error) {
+ var buf []byte
+
+ args := DomainCheckpointDeleteArgs {
+ Checkpoint: Checkpoint,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(417, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainGetGuestInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_GUEST_INFO.
+func (l *Libvirt) DomainGetGuestInfo(Dom Domain, Types uint32, Flags uint32) (rParams []TypedParam, err error) {
+ var buf []byte
+
+ args := DomainGetGuestInfoArgs {
+ Dom: Dom,
+ Types: Types,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(418, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Params: []TypedParam
+ _, err = dec.Decode(&rParams)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// ConnectSetIdentity is the go wrapper for REMOTE_PROC_CONNECT_SET_IDENTITY.
+func (l *Libvirt) ConnectSetIdentity(Params []TypedParam, Flags uint32) (err error) {
+ var buf []byte
+
+ args := ConnectSetIdentityArgs {
+ Params: Params,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(419, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainAgentSetResponseTimeout is the go wrapper for REMOTE_PROC_DOMAIN_AGENT_SET_RESPONSE_TIMEOUT.
+func (l *Libvirt) DomainAgentSetResponseTimeout(Dom Domain, Timeout int32, Flags uint32) (rResult int32, err error) {
+ var buf []byte
+
+ args := DomainAgentSetResponseTimeoutArgs {
+ Dom: Dom,
+ Timeout: Timeout,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(420, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Result: int32
+ _, err = dec.Decode(&rResult)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBackupBegin is the go wrapper for REMOTE_PROC_DOMAIN_BACKUP_BEGIN.
+func (l *Libvirt) DomainBackupBegin(Dom Domain, BackupXML string, CheckpointXML OptString, Flags DomainBackupBeginFlags) (err error) {
+ var buf []byte
+
+ args := DomainBackupBeginArgs {
+ Dom: Dom,
+ BackupXML: BackupXML,
+ CheckpointXML: CheckpointXML,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(421, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainBackupGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_BACKUP_GET_XML_DESC.
+func (l *Libvirt) DomainBackupGetXMLDesc(Dom Domain, Flags uint32) (rXML string, err error) {
+ var buf []byte
+
+ args := DomainBackupGetXMLDescArgs {
+ Dom: Dom,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(422, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // XML: string
+ _, err = dec.Decode(&rXML)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainEventMemoryFailure is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_MEMORY_FAILURE.
+func (l *Libvirt) DomainEventMemoryFailure() (err error) {
+ var buf []byte
+
+
+ _, err = l.requestStream(423, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainAuthorizedSshKeysGet is the go wrapper for REMOTE_PROC_DOMAIN_AUTHORIZED_SSH_KEYS_GET.
+func (l *Libvirt) DomainAuthorizedSshKeysGet(Dom Domain, User string, Flags uint32) (rKeys []string, err error) {
+ var buf []byte
+
+ args := DomainAuthorizedSshKeysGetArgs {
+ Dom: Dom,
+ User: User,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+ var r response
+ r, err = l.requestStream(424, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ // Return value unmarshaling
+ tpd := typedParamDecoder{}
+ ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
+ rdr := bytes.NewReader(r.Payload)
+ dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
+ // Keys: []string
+ _, err = dec.Decode(&rKeys)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
+// DomainAuthorizedSshKeysSet is the go wrapper for REMOTE_PROC_DOMAIN_AUTHORIZED_SSH_KEYS_SET.
+func (l *Libvirt) DomainAuthorizedSshKeysSet(Dom Domain, User string, Keys []string, Flags uint32) (err error) {
+ var buf []byte
+
+ args := DomainAuthorizedSshKeysSetArgs {
+ Dom: Dom,
+ User: User,
+ Keys: Keys,
+ Flags: Flags,
+ }
+
+ buf, err = encode(&args)
+ if err != nil {
+ return
+ }
+
+
+ _, err = l.requestStream(425, constants.Program, buf, nil, nil)
+ if err != nil {
+ return
+ }
+
+ return
+}
+
diff --git a/vendor/github.com/digitalocean/go-libvirt/rpc.go b/vendor/github.com/digitalocean/go-libvirt/rpc.go
new file mode 100644
index 000000000..8181e0991
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/rpc.go
@@ -0,0 +1,606 @@
+// Copyright 2018 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package libvirt
+
+import (
+ "bytes"
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "io"
+ "reflect"
+ "strings"
+ "sync/atomic"
+ "unsafe"
+
+ "github.com/digitalocean/go-libvirt/internal/constants"
+ "github.com/digitalocean/go-libvirt/internal/event"
+ xdr "github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2"
+)
+
+// ErrUnsupported is returned if a procedure is not supported by libvirt
+var ErrUnsupported = errors.New("unsupported procedure requested")
+
+// request and response types
+const (
+ // Call is used when making calls to the remote server.
+ Call = iota
+
+ // Reply indicates a server reply.
+ Reply
+
+ // Message is an asynchronous notification.
+ Message
+
+ // Stream represents a stream data packet.
+ Stream
+
+ // CallWithFDs is used by a client to indicate the request has
+ // arguments with file descriptors.
+ CallWithFDs
+
+ // ReplyWithFDs is used by a server to indicate the request has
+ // arguments with file descriptors.
+ ReplyWithFDs
+)
+
+// request and response statuses
+const (
+ // StatusOK is always set for method calls or events.
+ // For replies it indicates successful completion of the method.
+ // For streams it indicates confirmation of the end of file on the stream.
+ StatusOK = iota
+
+ // StatusError for replies indicates that the method call failed
+ // and error information is being returned. For streams this indicates
+ // that not all data was sent and the stream has aborted.
+ StatusError
+
+ // StatusContinue is only used for streams.
+ // This indicates that further data packets will be following.
+ StatusContinue
+)
+
+// header is a libvirt rpc packet header
+type header struct {
+ // Program identifier
+ Program uint32
+
+ // Program version
+ Version uint32
+
+ // Remote procedure identifier
+ Procedure uint32
+
+ // Call type, e.g., Reply
+ Type uint32
+
+ // Call serial number
+ Serial int32
+
+ // Request status, e.g., StatusOK
+ Status uint32
+}
+
+// packet represents a RPC request or response.
+type packet struct {
+ // Size of packet, in bytes, including length.
+ // Len + Header + Payload
+ Len uint32
+ Header header
+}
+
+// Global packet instance, for use with unsafe.Sizeof()
+var _p packet
+
+// internal rpc response
+type response struct {
+ Payload []byte
+ Status uint32
+}
+
+// libvirt error response
+type libvirtError struct {
+ Code uint32
+ DomainID uint32
+ Padding uint8
+ Message string
+ Level uint32
+}
+
+func (e libvirtError) Error() string {
+ return e.Message
+}
+
+// checkError is used to check whether an error is a libvirtError, and if it is,
+// whether its error code matches the one passed in. It will return false if
+// these conditions are not met.
+func checkError(err error, expectedError errorNumber) bool {
+ e, ok := err.(libvirtError)
+ if ok {
+ return e.Code == uint32(expectedError)
+ }
+ return false
+}
+
+// IsNotFound detects libvirt's ERR_NO_DOMAIN.
+func IsNotFound(err error) bool {
+ return checkError(err, errNoDomain)
+}
+
+// listen processes incoming data and routes
+// responses to their respective callback handler.
+func (l *Libvirt) listen() {
+ for {
+ // response packet length
+ length, err := pktlen(l.r)
+ if err != nil {
+ // When the underlying connection EOFs or is closed, stop
+ // this goroutine
+ if err == io.EOF || strings.Contains(err.Error(), "use of closed network connection") {
+ return
+ }
+
+ // invalid packet
+ continue
+ }
+
+ // response header
+ h, err := extractHeader(l.r)
+ if err != nil {
+ // invalid packet
+ continue
+ }
+
+ // payload: packet length minus what was previously read
+ size := int(length) - int(unsafe.Sizeof(_p))
+ buf := make([]byte, size)
+ _, err = io.ReadFull(l.r, buf)
+ if err != nil {
+ // invalid packet
+ continue
+ }
+
+ // route response to caller
+ l.route(h, buf)
+ }
+}
+
+// callback sends RPC responses to respective callers.
+func (l *Libvirt) callback(id int32, res response) {
+ l.cmux.Lock()
+ defer l.cmux.Unlock()
+
+ c, ok := l.callbacks[id]
+ if !ok {
+ return
+ }
+
+ c <- res
+}
+
+// route sends incoming packets to their listeners.
+func (l *Libvirt) route(h *header, buf []byte) {
+ // route events to their respective listener
+ var event event.Event
+
+ switch {
+ case h.Program == constants.QEMUProgram && h.Procedure == constants.QEMUProcDomainMonitorEvent:
+ event = &DomainEvent{}
+ case h.Program == constants.Program && h.Procedure == constants.ProcDomainEventCallbackLifecycle:
+ event = &DomainEventCallbackLifecycleMsg{}
+ }
+
+ if event != nil {
+ err := eventDecoder(buf, event)
+ if err != nil { // event was malformed, drop.
+ return
+ }
+
+ l.stream(event)
+ return
+ }
+
+ // send response to caller
+ l.callback(h.Serial, response{Payload: buf, Status: h.Status})
+}
+
+// serial provides atomic access to the next sequential request serial number.
+func (l *Libvirt) serial() int32 {
+ return atomic.AddInt32(&l.s, 1)
+}
+
+// stream decodes and relays domain events to their respective listener.
+func (l *Libvirt) stream(e event.Event) {
+ l.emux.RLock()
+ defer l.emux.RUnlock()
+
+ q, ok := l.events[e.GetCallbackID()]
+ if !ok {
+ return
+ }
+
+ q.Push(e)
+}
+
+// addStream configures the routing for an event stream.
+func (l *Libvirt) addStream(s *event.Stream) {
+ l.emux.Lock()
+ defer l.emux.Unlock()
+
+ l.events[s.CallbackID] = s
+}
+
+// removeStream notifies the libvirt server to stop sending events for the
+// provided callback ID. Upon successful de-registration the callback handler
+// is destroyed. Subsequent calls to removeStream are idempotent and return
+// nil.
+// TODO: Fix this comment
+func (l *Libvirt) removeStream(id int32) error {
+ l.emux.Lock()
+ defer l.emux.Unlock()
+
+ // if the event is already removed, just return nil
+ _, ok := l.events[id]
+ if ok {
+ delete(l.events, id)
+ }
+
+ return nil
+}
+
+// register configures a method response callback
+func (l *Libvirt) register(id int32, c chan response) {
+ l.cmux.Lock()
+ defer l.cmux.Unlock()
+
+ l.callbacks[id] = c
+}
+
+// deregister destroys a method response callback. It is the responsibility of
+// the caller to manage locking (l.cmux) during this call.
+func (l *Libvirt) deregister(id int32) {
+ _, ok := l.callbacks[id]
+ if !ok {
+ return
+ }
+
+ close(l.callbacks[id])
+ delete(l.callbacks, id)
+}
+
+// deregisterAll closes all waiting callback channels. This is used to clean up
+// if the connection to libvirt is lost. Callers waiting for responses will
+// return an error when the response channel is closed, rather than just
+// hanging.
+func (l *Libvirt) deregisterAll() {
+ l.cmux.Lock()
+ defer l.cmux.Unlock()
+
+ for id := range l.callbacks {
+ l.deregister(id)
+ }
+}
+
+// request performs a libvirt RPC request.
+// returns response returned by server.
+// if response is not OK, decodes error from it and returns it.
+func (l *Libvirt) request(proc uint32, program uint32, payload []byte) (response, error) {
+ return l.requestStream(proc, program, payload, nil, nil)
+}
+
+// requestStream performs a libvirt RPC request. The `out` and `in` parameters
+// are optional, and should be nil when RPC endpoints don't return a stream.
+func (l *Libvirt) requestStream(proc uint32, program uint32, payload []byte,
+ out io.Reader, in io.Writer) (response, error) {
+ serial := l.serial()
+ c := make(chan response)
+
+ l.register(serial, c)
+ defer func() {
+ l.cmux.Lock()
+ defer l.cmux.Unlock()
+
+ l.deregister(serial)
+ }()
+
+ err := l.sendPacket(serial, proc, program, payload, Call, StatusOK)
+ if err != nil {
+ return response{}, err
+ }
+
+ resp, err := l.getResponse(c)
+ if err != nil {
+ return resp, err
+ }
+
+ if out != nil {
+ abort := make(chan bool)
+ outErr := make(chan error)
+ go func() {
+ outErr <- l.sendStream(serial, proc, program, out, abort)
+ }()
+
+ // Even without incoming stream server sends confirmation once all data is received
+ resp, err = l.processIncomingStream(c, in)
+ if err != nil {
+ abort <- true
+ return resp, err
+ }
+
+ err = <-outErr
+ if err != nil {
+ return response{}, err
+ }
+ }
+
+ switch in {
+ case nil:
+ return resp, nil
+ default:
+ return l.processIncomingStream(c, in)
+ }
+}
+
+// processIncomingStream is called once we've successfully sent a request to
+// libvirt. It writes the responses back to the stream passed by the caller
+// until libvirt sends a packet with statusOK or an error.
+func (l *Libvirt) processIncomingStream(c chan response, inStream io.Writer) (response, error) {
+ for {
+ resp, err := l.getResponse(c)
+ if err != nil {
+ return resp, err
+ }
+
+ // StatusOK indicates end of stream
+ if resp.Status == StatusOK {
+ return resp, nil
+ }
+
+ // FIXME: this smells.
+ // StatusError is handled in getResponse, so this must be StatusContinue
+ // StatusContinue is only valid here for stream packets
+ // libvirtd breaks protocol and returns StatusContinue with an
+ // empty response Payload when the stream finishes
+ if len(resp.Payload) == 0 {
+ return resp, nil
+ }
+ if inStream != nil {
+ _, err = inStream.Write(resp.Payload)
+ if err != nil {
+ return response{}, err
+ }
+ }
+ }
+}
+
+func (l *Libvirt) sendStream(serial int32, proc uint32, program uint32, stream io.Reader, abort chan bool) error {
+ // Keep total packet length under 4 MiB to follow possible limitation in libvirt server code
+ buf := make([]byte, 4*MiB-unsafe.Sizeof(_p))
+ for {
+ select {
+ case <-abort:
+ return l.sendPacket(serial, proc, program, nil, Stream, StatusError)
+ default:
+ }
+ n, err := stream.Read(buf)
+ if n > 0 {
+ err2 := l.sendPacket(serial, proc, program, buf[:n], Stream, StatusContinue)
+ if err2 != nil {
+ return err2
+ }
+ }
+ if err != nil {
+ if err == io.EOF {
+ return l.sendPacket(serial, proc, program, nil, Stream, StatusOK)
+ }
+ // keep original error
+ err2 := l.sendPacket(serial, proc, program, nil, Stream, StatusError)
+ if err2 != nil {
+ return err2
+ }
+ return err
+ }
+ }
+}
+
+func (l *Libvirt) sendPacket(serial int32, proc uint32, program uint32, payload []byte, typ uint32, status uint32) error {
+
+ p := packet{
+ Header: header{
+ Program: program,
+ Version: constants.ProtocolVersion,
+ Procedure: proc,
+ Type: typ,
+ Serial: serial,
+ Status: status,
+ },
+ }
+
+ size := int(unsafe.Sizeof(p.Len)) + int(unsafe.Sizeof(p.Header))
+ if payload != nil {
+ size += len(payload)
+ }
+ p.Len = uint32(size)
+
+ // write header
+ l.mu.Lock()
+ defer l.mu.Unlock()
+ err := binary.Write(l.w, binary.BigEndian, p)
+ if err != nil {
+ return err
+ }
+
+ // write payload
+ if payload != nil {
+ err = binary.Write(l.w, binary.BigEndian, payload)
+ if err != nil {
+ return err
+ }
+ }
+
+ return l.w.Flush()
+}
+
+func (l *Libvirt) getResponse(c chan response) (response, error) {
+ resp := <-c
+ if resp.Status == StatusError {
+ return resp, decodeError(resp.Payload)
+ }
+
+ return resp, nil
+}
+
+// encode XDR encodes the provided data.
+func encode(data interface{}) ([]byte, error) {
+ var buf bytes.Buffer
+ _, err := xdr.Marshal(&buf, data)
+
+ return buf.Bytes(), err
+}
+
+// decodeError extracts an error message from the provider buffer.
+func decodeError(buf []byte) error {
+ var e libvirtError
+
+ dec := xdr.NewDecoder(bytes.NewReader(buf))
+ _, err := dec.Decode(&e)
+ if err != nil {
+ return err
+ }
+
+ if strings.Contains(e.Message, "unknown procedure") {
+ return ErrUnsupported
+ }
+ // if libvirt returns ERR_OK, ignore the error
+ if checkError(e, errOk) {
+ return nil
+ }
+
+ return e
+}
+
+// eventDecoder decodes an event from a xdr buffer.
+func eventDecoder(buf []byte, e interface{}) error {
+ dec := xdr.NewDecoder(bytes.NewReader(buf))
+ _, err := dec.Decode(e)
+ return err
+}
+
+// pktlen returns the length of an incoming RPC packet. Read errors will
+// result in a returned response length of 0 and a non-nil error.
+func pktlen(r io.Reader) (uint32, error) {
+ buf := make([]byte, unsafe.Sizeof(_p.Len))
+
+ // extract the packet's length from the header
+ _, err := io.ReadFull(r, buf)
+ if err != nil {
+ return 0, err
+ }
+
+ return binary.BigEndian.Uint32(buf), nil
+}
+
+// extractHeader returns the decoded header from an incoming response.
+func extractHeader(r io.Reader) (*header, error) {
+ buf := make([]byte, unsafe.Sizeof(_p.Header))
+
+ // extract the packet's header from r
+ _, err := io.ReadFull(r, buf)
+ if err != nil {
+ return nil, err
+ }
+
+ return &header{
+ Program: binary.BigEndian.Uint32(buf[0:4]),
+ Version: binary.BigEndian.Uint32(buf[4:8]),
+ Procedure: binary.BigEndian.Uint32(buf[8:12]),
+ Type: binary.BigEndian.Uint32(buf[12:16]),
+ Serial: int32(binary.BigEndian.Uint32(buf[16:20])),
+ Status: binary.BigEndian.Uint32(buf[20:24]),
+ }, nil
+}
+
+type typedParamDecoder struct{}
+
+// Decode decodes a TypedParam. These are part of the libvirt spec, and not xdr
+// proper. TypedParams contain a name, which is called Field for some reason,
+// and a Value, which itself has a "discriminant" - an integer enum encoding the
+// actual type, and a value, the length of which varies based on the actual
+// type.
+func (tpd typedParamDecoder) Decode(d *xdr.Decoder, v reflect.Value) (int, error) {
+ // Get the name of the typed param first
+ name, n, err := d.DecodeString()
+ if err != nil {
+ return n, err
+ }
+ val, n2, err := tpd.decodeTypedParamValue(d)
+ n += n2
+ if err != nil {
+ return n, err
+ }
+ tp := &TypedParam{Field: name, Value: *val}
+ v.Set(reflect.ValueOf(*tp))
+
+ return n, nil
+}
+
+// decodeTypedParamValue decodes the Value part of a TypedParam.
+func (typedParamDecoder) decodeTypedParamValue(d *xdr.Decoder) (*TypedParamValue, int, error) {
+ // All TypedParamValues begin with a uint32 discriminant that tells us what
+ // type they are.
+ discriminant, n, err := d.DecodeUint()
+ if err != nil {
+ return nil, n, err
+ }
+ var n2 int
+ var tpv *TypedParamValue
+ switch discriminant {
+ case 1:
+ var val int32
+ n2, err = d.Decode(&val)
+ tpv = &TypedParamValue{D: discriminant, I: val}
+ case 2:
+ var val uint32
+ n2, err = d.Decode(&val)
+ tpv = &TypedParamValue{D: discriminant, I: val}
+ case 3:
+ var val int64
+ n2, err = d.Decode(&val)
+ tpv = &TypedParamValue{D: discriminant, I: val}
+ case 4:
+ var val uint64
+ n2, err = d.Decode(&val)
+ tpv = &TypedParamValue{D: discriminant, I: val}
+ case 5:
+ var val float64
+ n2, err = d.Decode(&val)
+ tpv = &TypedParamValue{D: discriminant, I: val}
+ case 6:
+ var val int32
+ n2, err = d.Decode(&val)
+ tpv = &TypedParamValue{D: discriminant, I: val}
+ case 7:
+ var val string
+ n2, err = d.Decode(&val)
+ tpv = &TypedParamValue{D: discriminant, I: val}
+
+ default:
+ err = fmt.Errorf("invalid parameter type %v", discriminant)
+ }
+ n += n2
+
+ return tpv, n, err
+}
diff --git a/vendor/github.com/digitalocean/go-libvirt/units.go b/vendor/github.com/digitalocean/go-libvirt/units.go
new file mode 100644
index 000000000..03686507f
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-libvirt/units.go
@@ -0,0 +1,27 @@
+// Copyright 2016 The go-libvirt Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This module provides different units of measurement to make other
+// code more readable.
+
+package libvirt
+
+const (
+ // B - byte
+ B = 1
+ // KiB - kibibyte
+ KiB = 1024 * B
+ // MiB - mebibyte
+ MiB = 1024 * KiB
+)
diff --git a/vendor/github.com/digitalocean/go-qemu/AUTHORS b/vendor/github.com/digitalocean/go-qemu/AUTHORS
new file mode 100644
index 000000000..e2836c3c7
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-qemu/AUTHORS
@@ -0,0 +1,17 @@
+Maintainer
+----------
+DigitalOcean, Inc
+
+Original Authors
+----------------
+Ben LeMasurier <blemasurier@digitalocean.com>
+Matt Layher <mlayher@digitalocean.com>
+
+Contributors
+------------
+David Anderson <dave@natulte.net>
+Justin Kim <justin@digitalocean.com>
+Luis Sagastume <lsagastume1990@gmail.com>
+Nedim Dedic <nedim_dedic@yahoo.com>
+Roberto J Rojas <robertojrojas@gmail.com>
+Marko Mudrinic <mudrinic.mare@gmail.com>
diff --git a/vendor/github.com/digitalocean/go-qemu/LICENSE.md b/vendor/github.com/digitalocean/go-qemu/LICENSE.md
new file mode 100644
index 000000000..f5f4b8b5e
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-qemu/LICENSE.md
@@ -0,0 +1,195 @@
+Apache License
+==============
+
+_Version 2.0, January 2004_
+_&lt;<http://www.apache.org/licenses/>&gt;_
+
+### Terms and Conditions for use, reproduction, and distribution
+
+#### 1. Definitions
+
+“License” shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.
+
+“Licensor” shall mean the copyright owner or entity authorized by the copyright
+owner that is granting the License.
+
+“Legal Entity” shall mean the union of the acting entity and all other entities
+that control, are controlled by, or are under common control with that entity.
+For the purposes of this definition, “control” means **(i)** the power, direct or
+indirect, to cause the direction or management of such entity, whether by
+contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
+outstanding shares, or **(iii)** beneficial ownership of such entity.
+
+“You” (or “Your”) shall mean an individual or Legal Entity exercising
+permissions granted by this License.
+
+“Source” form shall mean the preferred form for making modifications, including
+but not limited to software source code, documentation source, and configuration
+files.
+
+“Object” form shall mean any form resulting from mechanical transformation or
+translation of a Source form, including but not limited to compiled object code,
+generated documentation, and conversions to other media types.
+
+“Work” shall mean the work of authorship, whether in Source or Object form, made
+available under the License, as indicated by a copyright notice that is included
+in or attached to the work (an example is provided in the Appendix below).
+
+“Derivative Works” shall mean any work, whether in Source or Object form, that
+is based on (or derived from) the Work and for which the editorial revisions,
+annotations, elaborations, or other modifications represent, as a whole, an
+original work of authorship. For the purposes of this License, Derivative Works
+shall not include works that remain separable from, or merely link (or bind by
+name) to the interfaces of, the Work and Derivative Works thereof.
+
+“Contribution” shall mean any work of authorship, including the original version
+of the Work and any modifications or additions to that Work or Derivative Works
+thereof, that is intentionally submitted to Licensor for inclusion in the Work
+by the copyright owner or by an individual or Legal Entity authorized to submit
+on behalf of the copyright owner. For the purposes of this definition,
+“submitted” means any form of electronic, verbal, or written communication sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems, and
+issue tracking systems that are managed by, or on behalf of, the Licensor for
+the purpose of discussing and improving the Work, but excluding communication
+that is conspicuously marked or otherwise designated in writing by the copyright
+owner as “Not a Contribution.”
+
+“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
+of whom a Contribution has been received by Licensor and subsequently
+incorporated within the Work.
+
+#### 2. Grant of Copyright License
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.
+
+#### 3. Grant of Patent License
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable (except as stated in this section) patent license to make, have
+made, use, offer to sell, sell, import, and otherwise transfer the Work, where
+such license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by combination
+of their Contribution(s) with the Work to which such Contribution(s) was
+submitted. If You institute patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Work or a
+Contribution incorporated within the Work constitutes direct or contributory
+patent infringement, then any patent licenses granted to You under this License
+for that Work shall terminate as of the date such litigation is filed.
+
+#### 4. Redistribution
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof
+in any medium, with or without modifications, and in Source or Object form,
+provided that You meet the following conditions:
+
+* **(a)** You must give any other recipients of the Work or Derivative Works a copy of
+this License; and
+* **(b)** You must cause any modified files to carry prominent notices stating that You
+changed the files; and
+* **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
+all copyright, patent, trademark, and attribution notices from the Source form
+of the Work, excluding those notices that do not pertain to any part of the
+Derivative Works; and
+* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
+Derivative Works that You distribute must include a readable copy of the
+attribution notices contained within such NOTICE file, excluding those notices
+that do not pertain to any part of the Derivative Works, in at least one of the
+following places: within a NOTICE text file distributed as part of the
+Derivative Works; within the Source form or documentation, if provided along
+with the Derivative Works; or, within a display generated by the Derivative
+Works, if and wherever such third-party notices normally appear. The contents of
+the NOTICE file are for informational purposes only and do not modify the
+License. You may add Your own attribution notices within Derivative Works that
+You distribute, alongside or as an addendum to the NOTICE text from the Work,
+provided that such additional attribution notices cannot be construed as
+modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide
+additional or different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works as a whole,
+provided Your use, reproduction, and distribution of the Work otherwise complies
+with the conditions stated in this License.
+
+#### 5. Submission of Contributions
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted
+for inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the terms of
+any separate license agreement you may have executed with Licensor regarding
+such Contributions.
+
+#### 6. Trademarks
+
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+#### 7. Disclaimer of Warranty
+
+Unless required by applicable law or agreed to in writing, Licensor provides the
+Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
+including, without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
+solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise of
+permissions under this License.
+
+#### 8. Limitation of Liability
+
+In no event and under no legal theory, whether in tort (including negligence),
+contract, or otherwise, unless required by applicable law (such as deliberate
+and grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special, incidental,
+or consequential damages of any character arising as a result of this License or
+out of the use or inability to use the Work (including but not limited to
+damages for loss of goodwill, work stoppage, computer failure or malfunction, or
+any and all other commercial damages or losses), even if such Contributor has
+been advised of the possibility of such damages.
+
+#### 9. Accepting Warranty or Additional Liability
+
+While redistributing the Work or Derivative Works thereof, You may choose to
+offer, and charge a fee for, acceptance of support, warranty, indemnity, or
+other liability obligations and/or rights consistent with this License. However,
+in accepting such obligations, You may act only on Your own behalf and on Your
+sole responsibility, not on behalf of any other Contributor, and only if You
+agree to indemnify, defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason of your
+accepting any such warranty or additional liability.
+
+_END OF TERMS AND CONDITIONS_
+
+### APPENDIX: How to apply the Apache License to your work
+
+To apply the Apache License to your work, attach the following boilerplate
+notice, with the fields enclosed by brackets `[]` replaced with your own
+identifying information. (Don't include the brackets!) The text should be
+enclosed in the appropriate comment syntax for the file format. We also
+recommend that a file or class name and description of purpose be included on
+the same “printed page” as the copyright notice for easier identification within
+third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/vendor/github.com/digitalocean/go-qemu/qmp/README.md b/vendor/github.com/digitalocean/go-qemu/qmp/README.md
new file mode 100644
index 000000000..729280b31
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-qemu/qmp/README.md
@@ -0,0 +1,104 @@
+QMP
+===
+
+Package `qmp` enables interaction with QEMU instances via the QEMU Machine Protocol (QMP).
+
+## Available Drivers
+
+### Libvirt
+
+If your environment is managed by Libvirt, QMP interaction must be proxied through the Libvirt daemon. This can be be done through two available drivers:
+
+#### RPC
+
+The RPC driver provides a pure Go implementation of Libvirt's RPC protocol.
+
+```go
+//conn, err := net.DialTimeout("unix", "/var/run/libvirt/libvirt-sock", 2*time.Second)
+conn, err := net.DialTimeout("tcp", "192.168.1.1:16509", 2*time.Second)
+monitor := libvirtrpc.New("stage-lb-1", conn)
+```
+
+#### virsh
+
+A connection to the monitor socket is provided by proxing requests through the `virsh` executable.
+
+```go
+monitor, err := qmp.NewLibvirtMonitor("qemu:///system", "stage-lb-1")
+```
+
+### Socket
+
+If your QEMU instances are not managed by libvirt, direct communication over its UNIX socket is available.
+
+```go
+monitor, err := qmp.NewSocketMonitor("unix", "/var/lib/qemu/example.monitor", 2*time.Second)
+```
+
+## Examples
+
+Using the above to establish a new `qmp.Monitor`, the following examples provide a brief overview of QMP usage.
+
+_error checking omitted for the sake of brevity._
+
+### Command Execution
+```go
+type StatusResult struct {
+ ID string `json:"id"`
+ Return struct {
+ Running bool `json:"running"`
+ Singlestep bool `json:"singlestep"`
+ Status string `json:"status"`
+ } `json:"return"`
+}
+
+monitor.Connect()
+defer monitor.Disconnect()
+
+cmd := []byte(`{ "execute": "query-status" }`)
+raw, _ := monitor.Run(cmd)
+
+var result StatusResult
+json.Unmarshal(raw, &result)
+
+fmt.Println(result.Return.Status)
+```
+
+```
+running
+```
+
+### Event Monitor
+
+```go
+monitor.Connect()
+defer monitor.Disconnect()
+
+stream, _ := monitor.Events()
+for e := range stream {
+ log.Printf("EVENT: %s", e.Event)
+}
+
+```
+
+```
+$ virsh reboot example
+Domain example is being rebooted
+```
+
+```
+EVENT: POWERDOWN
+EVENT: SHUTDOWN
+EVENT: STOP
+EVENT: RESET
+EVENT: RESUME
+EVENT: RESET
+...
+```
+
+## More information
+
+* [QEMU QMP Wiki](http://wiki.qemu.org/QMP)
+* [QEMU QMP Intro](http://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/qmp-intro.txt;hb=HEAD)
+* [QEMU QMP Events](http://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/qmp-events.txt;hb=HEAD)
+* [QEMU QMP Spec](http://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/qmp-spec.txt;hb=HEAD)
diff --git a/vendor/github.com/digitalocean/go-qemu/qmp/qmp.go b/vendor/github.com/digitalocean/go-qemu/qmp/qmp.go
new file mode 100644
index 000000000..b856260d3
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-qemu/qmp/qmp.go
@@ -0,0 +1,94 @@
+// Copyright 2016 The go-qemu Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package qmp enables interaction with QEMU instances
+// via the QEMU Machine Protocol (QMP).
+package qmp
+
+import (
+ "context"
+ "errors"
+ "fmt"
+)
+
+// ErrEventsNotSupported is returned by Events() if event streams
+// are unsupported by either QEMU or libvirt.
+var ErrEventsNotSupported = errors.New("event monitor is not supported")
+
+// Monitor represents a QEMU Machine Protocol socket.
+// See: http://wiki.qemu.org/QMP
+type Monitor interface {
+ Connect() error
+ Disconnect() error
+ Run(command []byte) (out []byte, err error)
+ Events(context.Context) (events <-chan Event, err error)
+}
+
+// Command represents a QMP command.
+type Command struct {
+ // Name of the command to run
+ Execute string `json:"execute"`
+
+ // Optional arguments for the above command.
+ Args interface{} `json:"arguments,omitempty"`
+}
+
+type response struct {
+ ID string `json:"id"`
+ Return interface{} `json:"return,omitempty"`
+ Error struct {
+ Class string `json:"class"`
+ Desc string `json:"desc"`
+ } `json:"error,omitempty"`
+}
+
+func (r *response) Err() error {
+ if r.Error.Desc == "" {
+ return nil
+ }
+
+ return errors.New(r.Error.Desc)
+}
+
+// Event represents a QEMU QMP event.
+// See http://wiki.qemu.org/QMP
+type Event struct {
+ // Event name, e.g., BLOCK_JOB_COMPLETE
+ Event string `json:"event"`
+
+ // Arbitrary event data
+ Data map[string]interface{} `json:"data"`
+
+ // Event timestamp, provided by QEMU.
+ Timestamp struct {
+ Seconds int64 `json:"seconds"`
+ Microseconds int64 `json:"microseconds"`
+ } `json:"timestamp"`
+}
+
+// Version is the QEMU version structure returned when a QMP connection is
+// initiated.
+type Version struct {
+ Package string `json:"package"`
+ QEMU struct {
+ Major int `json:"major"`
+ Micro int `json:"micro"`
+ Minor int `json:"minor"`
+ } `json:"qemu"`
+}
+
+func (v Version) String() string {
+ q := v.QEMU
+ return fmt.Sprintf("%d.%d.%d", q.Major, q.Minor, q.Micro)
+}
diff --git a/vendor/github.com/digitalocean/go-qemu/qmp/rpc.go b/vendor/github.com/digitalocean/go-qemu/qmp/rpc.go
new file mode 100644
index 000000000..cb11c71fe
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-qemu/qmp/rpc.go
@@ -0,0 +1,107 @@
+// Copyright 2016 The go-qemu Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package qmp
+
+import (
+ "context"
+ "encoding/json"
+ "net"
+
+ "github.com/digitalocean/go-libvirt"
+)
+
+var _ Monitor = &LibvirtRPCMonitor{}
+
+// A LibvirtRPCMonitor implements LibVirt's remote procedure call protocol.
+type LibvirtRPCMonitor struct {
+ l *libvirt.Libvirt
+ // Domain name as seen by libvirt, e.g., stage-lb-1
+ Domain string
+}
+
+// NewLibvirtRPCMonitor configures a new Libvirt RPC Monitor connection.
+// The provided domain should be the name of the domain as seen
+// by libvirt, e.g., stage-lb-1.
+func NewLibvirtRPCMonitor(domain string, conn net.Conn) *LibvirtRPCMonitor {
+ l := libvirt.New(conn)
+
+ return &LibvirtRPCMonitor{
+ l: l,
+ Domain: domain,
+ }
+}
+
+// Connect establishes communication with the libvirt server.
+// The underlying libvirt socket connection must be previously established.
+func (rpc *LibvirtRPCMonitor) Connect() error {
+ return rpc.l.Connect()
+}
+
+// Disconnect shuts down communication with the libvirt server
+// and closes the underlying net.Conn.
+func (rpc *LibvirtRPCMonitor) Disconnect() error {
+ return rpc.l.Disconnect()
+}
+
+// Events streams QEMU QMP Events until the provided context is cancelled.
+// If a problem is encountered setting up the event monitor connection
+// an error will be returned. Errors encountered during streaming will
+// cause the returned event channel to be closed.
+func (rpc *LibvirtRPCMonitor) Events(ctx context.Context) (<-chan Event, error) {
+ events, err := rpc.l.SubscribeQEMUEvents(ctx, rpc.Domain)
+ if err != nil {
+ return nil, err
+ }
+
+ c := make(chan Event)
+ go func() {
+ // process events
+ for e := range events {
+ qe, err := qmpEvent(&e)
+ if err != nil {
+ close(c)
+ break
+ }
+
+ c <- *qe
+ }
+ }()
+
+ return c, nil
+}
+
+// Run executes the given QAPI command against a domain's QEMU instance.
+// For a list of available QAPI commands, see:
+// http://git.qemu.org/?p=qemu.git;a=blob;f=qapi-schema.json;hb=HEAD
+func (rpc *LibvirtRPCMonitor) Run(cmd []byte) ([]byte, error) {
+ return rpc.l.Run(rpc.Domain, cmd)
+}
+
+// qmpEvent takes a libvirt DomainEvent and returns the QMP equivalent.
+func qmpEvent(e *libvirt.DomainEvent) (*Event, error) {
+ var qe Event
+
+ if e.Details != nil {
+ if err := json.Unmarshal(e.Details, &qe.Data); err != nil {
+ return nil, err
+ }
+ }
+
+ qe.Event = e.Event
+ qe.Timestamp.Seconds = int64(e.Seconds)
+ qe.Timestamp.Microseconds = int64(e.Microseconds)
+
+ return &qe, nil
+}
diff --git a/vendor/github.com/digitalocean/go-qemu/qmp/socket.go b/vendor/github.com/digitalocean/go-qemu/qmp/socket.go
new file mode 100644
index 000000000..541a88676
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-qemu/qmp/socket.go
@@ -0,0 +1,274 @@
+// Copyright 2016 The go-qemu Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package qmp
+
+import (
+ "bufio"
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "net"
+ "os"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+// A SocketMonitor is a Monitor which speaks directly to a QEMU Machine Protocol
+// (QMP) socket. Communication is performed directly using a QEMU monitor socket,
+// typically using a UNIX socket or TCP connection. Multiple connections to the
+// same domain are not permitted, and will result in the monitor blocking until
+// the existing connection is closed.
+type SocketMonitor struct {
+ // QEMU version reported by a connected monitor socket.
+ Version *Version
+
+ // QEMU QMP capabiltiies reported by a connected monitor socket.
+ Capabilities []string
+
+ // Underlying connection
+ c net.Conn
+
+ // Serialize running command against domain
+ mu sync.Mutex
+
+ // Send command responses and errors
+ stream <-chan streamResponse
+
+ // Send domain events to listeners when available
+ listeners *int32
+ events <-chan Event
+}
+
+// NewSocketMonitor configures a connection to the provided QEMU monitor socket.
+// An error is returned if the socket cannot be successfully dialed, or the
+// dial attempt times out.
+//
+// NewSocketMonitor may dial the QEMU socket using a variety of connection types:
+// NewSocketMonitor("unix", "/var/lib/qemu/example.monitor", 2 * time.Second)
+// NewSocketMonitor("tcp", "8.8.8.8:4444", 2 * time.Second)
+func NewSocketMonitor(network, addr string, timeout time.Duration) (*SocketMonitor, error) {
+ c, err := net.DialTimeout(network, addr, timeout)
+ if err != nil {
+ return nil, err
+ }
+
+ mon := &SocketMonitor{
+ c: c,
+ listeners: new(int32),
+ }
+
+ return mon, nil
+}
+
+// Listen creates a new SocketMonitor listening for a single connection to the provided socket file or address.
+// An error is returned if unable to listen at the specified file path or port.
+//
+// Listen will wait for a QEMU socket connection using a variety connection types:
+// Listen("unix", "/var/lib/qemu/example.monitor")
+// Listen("tcp", "0.0.0.0:4444")
+func Listen(network, addr string) (*SocketMonitor, error) {
+ l, err := net.Listen(network, addr)
+ if err != nil {
+ return nil, err
+ }
+ c, err := l.Accept()
+ defer l.Close()
+ if err != nil {
+ return nil, err
+ }
+
+ mon := &SocketMonitor{
+ c: c,
+ listeners: new(int32),
+ }
+
+ return mon, nil
+}
+
+// Disconnect closes the QEMU monitor socket connection.
+func (mon *SocketMonitor) Disconnect() error {
+ atomic.StoreInt32(mon.listeners, 0)
+ err := mon.c.Close()
+
+ return err
+}
+
+// qmpCapabilities is the command which must be executed to perform the
+// QEMU QMP handshake.
+const qmpCapabilities = "qmp_capabilities"
+
+// Connect sets up a QEMU QMP connection by connecting directly to the QEMU
+// monitor socket. An error is returned if the capabilities handshake does
+// not succeed.
+func (mon *SocketMonitor) Connect() error {
+ enc := json.NewEncoder(mon.c)
+ dec := json.NewDecoder(mon.c)
+
+ // Check for banner on startup
+ var ban banner
+ if err := dec.Decode(&ban); err != nil {
+ return err
+ }
+ mon.Version = &ban.QMP.Version
+ mon.Capabilities = ban.QMP.Capabilities
+
+ // Issue capabilities handshake
+ cmd := Command{Execute: qmpCapabilities}
+ if err := enc.Encode(cmd); err != nil {
+ return err
+ }
+
+ // Check for no error on return
+ var r response
+ if err := dec.Decode(&r); err != nil {
+ return err
+ }
+ if err := r.Err(); err != nil {
+ return err
+ }
+
+ // Initialize socket listener for command responses and asynchronous
+ // events
+ events := make(chan Event)
+ stream := make(chan streamResponse)
+ go mon.listen(mon.c, events, stream)
+
+ mon.events = events
+ mon.stream = stream
+
+ return nil
+}
+
+// Events streams QEMU QMP Events.
+// Events should only be called once per Socket. If used with a qemu.Domain,
+// qemu.Domain.Events should be called to retrieve events instead.
+func (mon *SocketMonitor) Events(context.Context) (<-chan Event, error) {
+ atomic.AddInt32(mon.listeners, 1)
+ return mon.events, nil
+}
+
+// listen listens for incoming data from a QEMU monitor socket. It determines
+// if the data is an asynchronous event or a response to a command, and returns
+// the data on the appropriate channel.
+func (mon *SocketMonitor) listen(r io.Reader, events chan<- Event, stream chan<- streamResponse) {
+ defer close(events)
+ defer close(stream)
+
+ scanner := bufio.NewScanner(r)
+ for scanner.Scan() {
+ var e Event
+
+ b := scanner.Bytes()
+ if err := json.Unmarshal(b, &e); err != nil {
+ continue
+ }
+
+ // If data does not have an event type, it must be in response to a command.
+ if e.Event == "" {
+ stream <- streamResponse{buf: b}
+ continue
+ }
+
+ // If nobody is listening for events, do not bother sending them.
+ if atomic.LoadInt32(mon.listeners) == 0 {
+ continue
+ }
+
+ events <- e
+ }
+
+ if err := scanner.Err(); err != nil {
+ stream <- streamResponse{err: err}
+ }
+}
+
+// Run executes the given QAPI command against a domain's QEMU instance.
+// For a list of available QAPI commands, see:
+// http://git.qemu.org/?p=qemu.git;a=blob;f=qapi-schema.json;hb=HEAD
+func (mon *SocketMonitor) Run(command []byte) ([]byte, error) {
+ // Just call RunWithFile with no file
+ return mon.RunWithFile(command, nil)
+}
+
+// RunWithFile behaves like Run but allows for passing a file through out-of-band data.
+func (mon *SocketMonitor) RunWithFile(command []byte, file *os.File) ([]byte, error) {
+ // Only allow a single command to be run at a time to ensure that responses
+ // to a command cannot be mixed with responses from another command
+ mon.mu.Lock()
+ defer mon.mu.Unlock()
+
+ if file == nil {
+ // Just send a normal command through.
+ if _, err := mon.c.Write(command); err != nil {
+ return nil, err
+ }
+ } else {
+ unixConn, ok := mon.c.(*net.UnixConn)
+ if !ok {
+ return nil, fmt.Errorf("RunWithFile only works with unix monitor sockets")
+ }
+
+ oobSupported := false
+ for _, capability := range mon.Capabilities {
+ if capability == "oob" {
+ oobSupported = true
+ break
+ }
+ }
+
+ if !oobSupported {
+ return nil, fmt.Errorf("The QEMU server doesn't support oob (needed for RunWithFile)")
+ }
+
+ // Send the command along with the file descriptor.
+ oob := getUnixRights(file)
+ if _, _, err := unixConn.WriteMsgUnix(command, oob, nil); err != nil {
+ return nil, err
+ }
+ }
+
+ // Wait for a response or error to our command
+ res := <-mon.stream
+ if res.err != nil {
+ return nil, res.err
+ }
+
+ // Check for QEMU errors
+ var r response
+ if err := json.Unmarshal(res.buf, &r); err != nil {
+ return nil, err
+ }
+ if err := r.Err(); err != nil {
+ return nil, err
+ }
+
+ return res.buf, nil
+}
+
+// banner is a wrapper type around a Version.
+type banner struct {
+ QMP struct {
+ Capabilities []string `json:"capabilities"`
+ Version Version `json:"version"`
+ } `json:"QMP"`
+}
+
+// streamResponse is a struct sent over a channel in response to a command.
+type streamResponse struct {
+ buf []byte
+ err error
+}
diff --git a/vendor/github.com/digitalocean/go-qemu/qmp/socket_unix.go b/vendor/github.com/digitalocean/go-qemu/qmp/socket_unix.go
new file mode 100644
index 000000000..859ff64ea
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-qemu/qmp/socket_unix.go
@@ -0,0 +1,27 @@
+// Copyright 2016 The go-qemu Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !windows
+
+package qmp
+
+import (
+ "os"
+
+ "golang.org/x/sys/unix"
+)
+
+func getUnixRights(file *os.File) []byte {
+ return unix.UnixRights(int(file.Fd()))
+}
diff --git a/vendor/github.com/digitalocean/go-qemu/qmp/socket_windows.go b/vendor/github.com/digitalocean/go-qemu/qmp/socket_windows.go
new file mode 100644
index 000000000..b8a611dbf
--- /dev/null
+++ b/vendor/github.com/digitalocean/go-qemu/qmp/socket_windows.go
@@ -0,0 +1,25 @@
+// Copyright 2016 The go-qemu Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build windows
+
+package qmp
+
+import (
+ "os"
+)
+
+func getUnixRights(file *os.File) []byte {
+ return nil
+}
diff --git a/vendor/github.com/docker/docker/api/swagger.yaml b/vendor/github.com/docker/docker/api/swagger.yaml
index 9f1019681..8500705b5 100644
--- a/vendor/github.com/docker/docker/api/swagger.yaml
+++ b/vendor/github.com/docker/docker/api/swagger.yaml
@@ -560,7 +560,7 @@ definitions:
format: "int64"
minimum: 0
maximum: 100
- NanoCPUs:
+ NanoCpus:
description: "CPU quota in units of 10<sup>-9</sup> CPUs."
type: "integer"
format: "int64"
@@ -1274,7 +1274,7 @@ definitions:
type: "object"
properties:
Bridge:
- description: Name of the network'a bridge (for example, `docker0`).
+ description: Name of the network's bridge (for example, `docker0`).
type: "string"
example: "docker0"
SandboxID:
@@ -5466,7 +5466,7 @@ paths:
MemorySwap: 0
MemoryReservation: 0
KernelMemory: 0
- NanoCPUs: 500000
+ NanoCpus: 500000
CpuPercent: 80
CpuShares: 512
CpuPeriod: 100000
@@ -7310,7 +7310,7 @@ paths:
For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the
- the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded.
+ query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded.
[Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)
@@ -10050,7 +10050,7 @@ paths:
description: |
Address or interface to use for data path traffic (format:
`<ip|interface>`), for example, `192.168.1.1`, or an interface,
- like `eth0`. If `DataPathAddr` is unspecified, the same addres
+ like `eth0`. If `DataPathAddr` is unspecified, the same address
as `AdvertiseAddr` is used.
The `DataPathAddr` specifies the address that global scope
diff --git a/vendor/github.com/docker/docker/client/build_cancel.go b/vendor/github.com/docker/docker/client/build_cancel.go
index 3aae43e3d..b76bf366b 100644
--- a/vendor/github.com/docker/docker/client/build_cancel.go
+++ b/vendor/github.com/docker/docker/client/build_cancel.go
@@ -5,7 +5,7 @@ import (
"net/url"
)
-// BuildCancel requests the daemon to cancel ongoing build request
+// BuildCancel requests the daemon to cancel the ongoing build request.
func (cli *Client) BuildCancel(ctx context.Context, id string) error {
query := url.Values{}
query.Set("id", id)
diff --git a/vendor/github.com/docker/docker/client/config_create.go b/vendor/github.com/docker/docker/client/config_create.go
index ee7d411df..f6b1881fc 100644
--- a/vendor/github.com/docker/docker/client/config_create.go
+++ b/vendor/github.com/docker/docker/client/config_create.go
@@ -8,7 +8,7 @@ import (
"github.com/docker/docker/api/types/swarm"
)
-// ConfigCreate creates a new Config.
+// ConfigCreate creates a new config.
func (cli *Client) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error) {
var response types.ConfigCreateResponse
if err := cli.NewVersionError("1.30", "config create"); err != nil {
diff --git a/vendor/github.com/docker/docker/client/config_remove.go b/vendor/github.com/docker/docker/client/config_remove.go
index a708fcaec..93de0d844 100644
--- a/vendor/github.com/docker/docker/client/config_remove.go
+++ b/vendor/github.com/docker/docker/client/config_remove.go
@@ -2,7 +2,7 @@ package client // import "github.com/docker/docker/client"
import "context"
-// ConfigRemove removes a Config.
+// ConfigRemove removes a config.
func (cli *Client) ConfigRemove(ctx context.Context, id string) error {
if err := cli.NewVersionError("1.30", "config remove"); err != nil {
return err
diff --git a/vendor/github.com/docker/docker/client/config_update.go b/vendor/github.com/docker/docker/client/config_update.go
index 39e59cf85..ba79ae64e 100644
--- a/vendor/github.com/docker/docker/client/config_update.go
+++ b/vendor/github.com/docker/docker/client/config_update.go
@@ -8,7 +8,7 @@ import (
"github.com/docker/docker/api/types/swarm"
)
-// ConfigUpdate attempts to update a Config
+// ConfigUpdate attempts to update a config
func (cli *Client) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error {
if err := cli.NewVersionError("1.30", "config update"); err != nil {
return err
diff --git a/vendor/github.com/docker/docker/client/container_commit.go b/vendor/github.com/docker/docker/client/container_commit.go
index 2966e88c8..cd7f76346 100644
--- a/vendor/github.com/docker/docker/client/container_commit.go
+++ b/vendor/github.com/docker/docker/client/container_commit.go
@@ -10,7 +10,7 @@ import (
"github.com/docker/docker/api/types"
)
-// ContainerCommit applies changes into a container and creates a new tagged image.
+// ContainerCommit applies changes to a container and creates a new tagged image.
func (cli *Client) ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.IDResponse, error) {
var repository, tag string
if options.Reference != "" {
diff --git a/vendor/github.com/docker/docker/client/container_copy.go b/vendor/github.com/docker/docker/client/container_copy.go
index bb278bf7f..c0a47c14e 100644
--- a/vendor/github.com/docker/docker/client/container_copy.go
+++ b/vendor/github.com/docker/docker/client/container_copy.go
@@ -14,7 +14,7 @@ import (
"github.com/docker/docker/api/types"
)
-// ContainerStatPath returns Stat information about a path inside the container filesystem.
+// ContainerStatPath returns stat information about a path inside the container filesystem.
func (cli *Client) ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error) {
query := url.Values{}
query.Set("path", filepath.ToSlash(path)) // Normalize the paths used in the API.
diff --git a/vendor/github.com/docker/docker/client/container_create.go b/vendor/github.com/docker/docker/client/container_create.go
index b1d5fea5b..cfae96a6f 100644
--- a/vendor/github.com/docker/docker/client/container_create.go
+++ b/vendor/github.com/docker/docker/client/container_create.go
@@ -19,7 +19,7 @@ type configWrapper struct {
Platform *specs.Platform
}
-// ContainerCreate creates a new container based in the given configuration.
+// ContainerCreate creates a new container based on the given configuration.
// It can be associated with a name, but it's not mandatory.
func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *specs.Platform, containerName string) (container.ContainerCreateCreatedBody, error) {
var response container.ContainerCreateCreatedBody
diff --git a/vendor/github.com/docker/docker/client/container_restart.go b/vendor/github.com/docker/docker/client/container_restart.go
index 41e421969..aa0d6485d 100644
--- a/vendor/github.com/docker/docker/client/container_restart.go
+++ b/vendor/github.com/docker/docker/client/container_restart.go
@@ -9,7 +9,7 @@ import (
)
// ContainerRestart stops and starts a container again.
-// It makes the daemon to wait for the container to be up again for
+// It makes the daemon wait for the container to be up again for
// a specific amount of time, given the timeout.
func (cli *Client) ContainerRestart(ctx context.Context, containerID string, timeout *time.Duration) error {
query := url.Values{}
diff --git a/vendor/github.com/docker/docker/client/container_update.go b/vendor/github.com/docker/docker/client/container_update.go
index 6917cf9fb..bf68a5300 100644
--- a/vendor/github.com/docker/docker/client/container_update.go
+++ b/vendor/github.com/docker/docker/client/container_update.go
@@ -7,7 +7,7 @@ import (
"github.com/docker/docker/api/types/container"
)
-// ContainerUpdate updates resources of a container
+// ContainerUpdate updates the resources of a container.
func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error) {
var response container.ContainerUpdateOKBody
serverResp, err := cli.post(ctx, "/containers/"+containerID+"/update", nil, updateConfig, nil)
diff --git a/vendor/github.com/docker/docker/client/distribution_inspect.go b/vendor/github.com/docker/docker/client/distribution_inspect.go
index f4e3794cb..7f36c99a0 100644
--- a/vendor/github.com/docker/docker/client/distribution_inspect.go
+++ b/vendor/github.com/docker/docker/client/distribution_inspect.go
@@ -8,7 +8,7 @@ import (
registrytypes "github.com/docker/docker/api/types/registry"
)
-// DistributionInspect returns the image digest with full Manifest
+// DistributionInspect returns the image digest with the full manifest.
func (cli *Client) DistributionInspect(ctx context.Context, image, encodedRegistryAuth string) (registrytypes.DistributionInspect, error) {
// Contact the registry to retrieve digest and platform information
var distributionInspect registrytypes.DistributionInspect
diff --git a/vendor/github.com/docker/docker/client/image_build.go b/vendor/github.com/docker/docker/client/image_build.go
index 8fcf99503..d16e1d8ea 100644
--- a/vendor/github.com/docker/docker/client/image_build.go
+++ b/vendor/github.com/docker/docker/client/image_build.go
@@ -14,8 +14,8 @@ import (
"github.com/docker/docker/api/types/container"
)
-// ImageBuild sends request to the daemon to build images.
-// The Body in the response implement an io.ReadCloser and it's up to the caller to
+// ImageBuild sends a request to the daemon to build images.
+// The Body in the response implements an io.ReadCloser and it's up to the caller to
// close it.
func (cli *Client) ImageBuild(ctx context.Context, buildContext io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) {
query, err := cli.imageBuildOptionsToQuery(options)
diff --git a/vendor/github.com/docker/docker/client/image_create.go b/vendor/github.com/docker/docker/client/image_create.go
index 239380474..b1c022777 100644
--- a/vendor/github.com/docker/docker/client/image_create.go
+++ b/vendor/github.com/docker/docker/client/image_create.go
@@ -10,7 +10,7 @@ import (
"github.com/docker/docker/api/types"
)
-// ImageCreate creates a new image based in the parent options.
+// ImageCreate creates a new image based on the parent options.
// It returns the JSON content in the response body.
func (cli *Client) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) {
ref, err := reference.ParseNormalizedNamed(parentReference)
diff --git a/vendor/github.com/docker/docker/client/image_import.go b/vendor/github.com/docker/docker/client/image_import.go
index d3336d410..c5de42cb7 100644
--- a/vendor/github.com/docker/docker/client/image_import.go
+++ b/vendor/github.com/docker/docker/client/image_import.go
@@ -10,7 +10,7 @@ import (
"github.com/docker/docker/api/types"
)
-// ImageImport creates a new image based in the source options.
+// ImageImport creates a new image based on the source options.
// It returns the JSON content in the response body.
func (cli *Client) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) {
if ref != "" {
diff --git a/vendor/github.com/docker/docker/client/image_search.go b/vendor/github.com/docker/docker/client/image_search.go
index 82955a747..5f40a22a9 100644
--- a/vendor/github.com/docker/docker/client/image_search.go
+++ b/vendor/github.com/docker/docker/client/image_search.go
@@ -12,7 +12,7 @@ import (
"github.com/docker/docker/errdefs"
)
-// ImageSearch makes the docker host to search by a term in a remote registry.
+// ImageSearch makes the docker host search by a term in a remote registry.
// The list of results is not sorted in any fashion.
func (cli *Client) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error) {
var results []registry.SearchResult
diff --git a/vendor/github.com/docker/docker/client/secret_create.go b/vendor/github.com/docker/docker/client/secret_create.go
index fd5b91413..c65d38a19 100644
--- a/vendor/github.com/docker/docker/client/secret_create.go
+++ b/vendor/github.com/docker/docker/client/secret_create.go
@@ -8,7 +8,7 @@ import (
"github.com/docker/docker/api/types/swarm"
)
-// SecretCreate creates a new Secret.
+// SecretCreate creates a new secret.
func (cli *Client) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) {
var response types.SecretCreateResponse
if err := cli.NewVersionError("1.25", "secret create"); err != nil {
diff --git a/vendor/github.com/docker/docker/client/secret_remove.go b/vendor/github.com/docker/docker/client/secret_remove.go
index c16f55580..f6c69e57f 100644
--- a/vendor/github.com/docker/docker/client/secret_remove.go
+++ b/vendor/github.com/docker/docker/client/secret_remove.go
@@ -2,7 +2,7 @@ package client // import "github.com/docker/docker/client"
import "context"
-// SecretRemove removes a Secret.
+// SecretRemove removes a secret.
func (cli *Client) SecretRemove(ctx context.Context, id string) error {
if err := cli.NewVersionError("1.25", "secret remove"); err != nil {
return err
diff --git a/vendor/github.com/docker/docker/client/secret_update.go b/vendor/github.com/docker/docker/client/secret_update.go
index 164256bbc..d082dcef7 100644
--- a/vendor/github.com/docker/docker/client/secret_update.go
+++ b/vendor/github.com/docker/docker/client/secret_update.go
@@ -8,7 +8,7 @@ import (
"github.com/docker/docker/api/types/swarm"
)
-// SecretUpdate attempts to update a Secret
+// SecretUpdate attempts to update a secret.
func (cli *Client) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error {
if err := cli.NewVersionError("1.25", "secret update"); err != nil {
return err
diff --git a/vendor/github.com/docker/docker/client/service_create.go b/vendor/github.com/docker/docker/client/service_create.go
index e0428bf98..a07315f71 100644
--- a/vendor/github.com/docker/docker/client/service_create.go
+++ b/vendor/github.com/docker/docker/client/service_create.go
@@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
)
-// ServiceCreate creates a new Service.
+// ServiceCreate creates a new service.
func (cli *Client) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options types.ServiceCreateOptions) (types.ServiceCreateResponse, error) {
var response types.ServiceCreateResponse
headers := map[string][]string{
diff --git a/vendor/github.com/docker/docker/client/task_inspect.go b/vendor/github.com/docker/docker/client/task_inspect.go
index 44d40ba5a..ed132f379 100644
--- a/vendor/github.com/docker/docker/client/task_inspect.go
+++ b/vendor/github.com/docker/docker/client/task_inspect.go
@@ -9,7 +9,7 @@ import (
"github.com/docker/docker/api/types/swarm"
)
-// TaskInspectWithRaw returns the task information and its raw representation..
+// TaskInspectWithRaw returns the task information and its raw representation.
func (cli *Client) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) {
if taskID == "" {
return swarm.Task{}, nil, objectNotFoundError{object: "task", id: taskID}
diff --git a/vendor/github.com/docker/docker/errdefs/helpers.go b/vendor/github.com/docker/docker/errdefs/helpers.go
index c9916e013..fe06fb6f7 100644
--- a/vendor/github.com/docker/docker/errdefs/helpers.go
+++ b/vendor/github.com/docker/docker/errdefs/helpers.go
@@ -10,6 +10,10 @@ func (e errNotFound) Cause() error {
return e.error
}
+func (e errNotFound) Unwrap() error {
+ return e.error
+}
+
// NotFound is a helper to create an error of the class with the same name from any error type
func NotFound(err error) error {
if err == nil || IsNotFound(err) {
@@ -26,6 +30,10 @@ func (e errInvalidParameter) Cause() error {
return e.error
}
+func (e errInvalidParameter) Unwrap() error {
+ return e.error
+}
+
// InvalidParameter is a helper to create an error of the class with the same name from any error type
func InvalidParameter(err error) error {
if err == nil || IsInvalidParameter(err) {
@@ -42,6 +50,10 @@ func (e errConflict) Cause() error {
return e.error
}
+func (e errConflict) Unwrap() error {
+ return e.error
+}
+
// Conflict is a helper to create an error of the class with the same name from any error type
func Conflict(err error) error {
if err == nil || IsConflict(err) {
@@ -58,6 +70,10 @@ func (e errUnauthorized) Cause() error {
return e.error
}
+func (e errUnauthorized) Unwrap() error {
+ return e.error
+}
+
// Unauthorized is a helper to create an error of the class with the same name from any error type
func Unauthorized(err error) error {
if err == nil || IsUnauthorized(err) {
@@ -74,6 +90,10 @@ func (e errUnavailable) Cause() error {
return e.error
}
+func (e errUnavailable) Unwrap() error {
+ return e.error
+}
+
// Unavailable is a helper to create an error of the class with the same name from any error type
func Unavailable(err error) error {
if err == nil || IsUnavailable(err) {
@@ -90,6 +110,10 @@ func (e errForbidden) Cause() error {
return e.error
}
+func (e errForbidden) Unwrap() error {
+ return e.error
+}
+
// Forbidden is a helper to create an error of the class with the same name from any error type
func Forbidden(err error) error {
if err == nil || IsForbidden(err) {
@@ -106,6 +130,10 @@ func (e errSystem) Cause() error {
return e.error
}
+func (e errSystem) Unwrap() error {
+ return e.error
+}
+
// System is a helper to create an error of the class with the same name from any error type
func System(err error) error {
if err == nil || IsSystem(err) {
@@ -122,6 +150,10 @@ func (e errNotModified) Cause() error {
return e.error
}
+func (e errNotModified) Unwrap() error {
+ return e.error
+}
+
// NotModified is a helper to create an error of the class with the same name from any error type
func NotModified(err error) error {
if err == nil || IsNotModified(err) {
@@ -138,6 +170,10 @@ func (e errNotImplemented) Cause() error {
return e.error
}
+func (e errNotImplemented) Unwrap() error {
+ return e.error
+}
+
// NotImplemented is a helper to create an error of the class with the same name from any error type
func NotImplemented(err error) error {
if err == nil || IsNotImplemented(err) {
@@ -154,6 +190,10 @@ func (e errUnknown) Cause() error {
return e.error
}
+func (e errUnknown) Unwrap() error {
+ return e.error
+}
+
// Unknown is a helper to create an error of the class with the same name from any error type
func Unknown(err error) error {
if err == nil || IsUnknown(err) {
@@ -170,6 +210,10 @@ func (e errCancelled) Cause() error {
return e.error
}
+func (e errCancelled) Unwrap() error {
+ return e.error
+}
+
// Cancelled is a helper to create an error of the class with the same name from any error type
func Cancelled(err error) error {
if err == nil || IsCancelled(err) {
@@ -186,6 +230,10 @@ func (e errDeadline) Cause() error {
return e.error
}
+func (e errDeadline) Unwrap() error {
+ return e.error
+}
+
// Deadline is a helper to create an error of the class with the same name from any error type
func Deadline(err error) error {
if err == nil || IsDeadline(err) {
@@ -202,6 +250,10 @@ func (e errDataLoss) Cause() error {
return e.error
}
+func (e errDataLoss) Unwrap() error {
+ return e.error
+}
+
// DataLoss is a helper to create an error of the class with the same name from any error type
func DataLoss(err error) error {
if err == nil || IsDataLoss(err) {
diff --git a/vendor/github.com/docker/docker/pkg/archive/archive.go b/vendor/github.com/docker/docker/pkg/archive/archive.go
index eeed67472..134749d68 100644
--- a/vendor/github.com/docker/docker/pkg/archive/archive.go
+++ b/vendor/github.com/docker/docker/pkg/archive/archive.go
@@ -11,7 +11,6 @@ import (
"io"
"io/ioutil"
"os"
- "os/exec"
"path/filepath"
"runtime"
"strconv"
@@ -25,6 +24,7 @@ import (
"github.com/docker/docker/pkg/pools"
"github.com/docker/docker/pkg/system"
"github.com/sirupsen/logrus"
+ exec "golang.org/x/sys/execabs"
)
type (
@@ -402,10 +402,24 @@ func fillGo18FileTypeBits(mode int64, fi os.FileInfo) int64 {
// ReadSecurityXattrToTarHeader reads security.capability xattr from filesystem
// to a tar header
func ReadSecurityXattrToTarHeader(path string, hdr *tar.Header) error {
+ const (
+ // Values based on linux/include/uapi/linux/capability.h
+ xattrCapsSz2 = 20
+ versionOffset = 3
+ vfsCapRevision2 = 2
+ vfsCapRevision3 = 3
+ )
capability, _ := system.Lgetxattr(path, "security.capability")
if capability != nil {
+ length := len(capability)
+ if capability[versionOffset] == vfsCapRevision3 {
+ // Convert VFS_CAP_REVISION_3 to VFS_CAP_REVISION_2 as root UID makes no
+ // sense outside the user namespace the archive is built in.
+ capability[versionOffset] = vfsCapRevision2
+ length = xattrCapsSz2
+ }
hdr.Xattrs = make(map[string]string)
- hdr.Xattrs["security.capability"] = string(capability)
+ hdr.Xattrs["security.capability"] = string(capability[:length])
}
return nil
}
@@ -917,6 +931,12 @@ loop:
return err
}
+ // ignore XGlobalHeader early to avoid creating parent directories for them
+ if hdr.Typeflag == tar.TypeXGlobalHeader {
+ logrus.Debugf("PAX Global Extended Headers found for %s and ignored", hdr.Name)
+ continue
+ }
+
// Normalize name, for safety and for a simple is-root check
// This keeps "../" as-is, but normalizes "/../" to "/". Or Windows:
// This keeps "..\" as-is, but normalizes "\..\" to "\".
diff --git a/vendor/github.com/docker/docker/pkg/archive/archive_unix.go b/vendor/github.com/docker/docker/pkg/archive/archive_unix.go
index 900661423..0b92bb0f4 100644
--- a/vendor/github.com/docker/docker/pkg/archive/archive_unix.go
+++ b/vendor/github.com/docker/docker/pkg/archive/archive_unix.go
@@ -81,11 +81,6 @@ func getFileUIDGID(stat interface{}) (idtools.Identity, error) {
// handleTarTypeBlockCharFifo is an OS-specific helper function used by
// createTarFile to handle the following types of header: Block; Char; Fifo
func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error {
- if sys.RunningInUserNS() {
- // cannot create a device if running in user namespace
- return nil
- }
-
mode := uint32(hdr.Mode & 07777)
switch hdr.Typeflag {
case tar.TypeBlock:
@@ -96,7 +91,12 @@ func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error {
mode |= unix.S_IFIFO
}
- return system.Mknod(path, mode, int(system.Mkdev(hdr.Devmajor, hdr.Devminor)))
+ err := system.Mknod(path, mode, int(system.Mkdev(hdr.Devmajor, hdr.Devminor)))
+ if errors.Is(err, syscall.EPERM) && sys.RunningInUserNS() {
+ // In most cases, cannot create a device if running in user namespace
+ err = nil
+ }
+ return err
}
func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo) error {
diff --git a/vendor/github.com/docker/docker/pkg/idtools/idtools.go b/vendor/github.com/docker/docker/pkg/idtools/idtools.go
index 7569ac15d..25a57b231 100644
--- a/vendor/github.com/docker/docker/pkg/idtools/idtools.go
+++ b/vendor/github.com/docker/docker/pkg/idtools/idtools.go
@@ -35,13 +35,13 @@ const (
// MkdirAllAndChown creates a directory (include any along the path) and then modifies
// ownership to the requested uid/gid. If the directory already exists, this
-// function will still change ownership to the requested uid/gid pair.
+// function will still change ownership and permissions.
func MkdirAllAndChown(path string, mode os.FileMode, owner Identity) error {
return mkdirAs(path, mode, owner, true, true)
}
// MkdirAndChown creates a directory and then modifies ownership to the requested uid/gid.
-// If the directory already exists, this function still changes ownership.
+// If the directory already exists, this function still changes ownership and permissions.
// Note that unlike os.Mkdir(), this function does not return IsExist error
// in case path already exists.
func MkdirAndChown(path string, mode os.FileMode, owner Identity) error {
@@ -50,7 +50,7 @@ func MkdirAndChown(path string, mode os.FileMode, owner Identity) error {
// MkdirAllAndChownNew creates a directory (include any along the path) and then modifies
// ownership ONLY of newly created directories to the requested uid/gid. If the
-// directories along the path exist, no change of ownership will be performed
+// directories along the path exist, no change of ownership or permissions will be performed
func MkdirAllAndChownNew(path string, mode os.FileMode, owner Identity) error {
return mkdirAs(path, mode, owner, true, false)
}
@@ -234,3 +234,8 @@ func parseSubidFile(path, username string) (ranges, error) {
return rangeList, s.Err()
}
+
+// CurrentIdentity returns the identity of the current process
+func CurrentIdentity() Identity {
+ return Identity{UID: os.Getuid(), GID: os.Getegid()}
+}
diff --git a/vendor/github.com/docker/docker/pkg/idtools/idtools_unix.go b/vendor/github.com/docker/docker/pkg/idtools/idtools_unix.go
index 5defe6459..e7d25ee47 100644
--- a/vendor/github.com/docker/docker/pkg/idtools/idtools_unix.go
+++ b/vendor/github.com/docker/docker/pkg/idtools/idtools_unix.go
@@ -40,7 +40,7 @@ func mkdirAs(path string, mode os.FileMode, owner Identity, mkAll, chownExisting
}
// short-circuit--we were called with an existing directory and chown was requested
- return lazyChown(path, owner.UID, owner.GID, stat)
+ return setPermissions(path, mode, owner.UID, owner.GID, stat)
}
if os.IsNotExist(err) {
@@ -71,7 +71,7 @@ func mkdirAs(path string, mode os.FileMode, owner Identity, mkAll, chownExisting
// even if it existed, we will chown the requested path + any subpaths that
// didn't exist when we called MkdirAll
for _, pathComponent := range paths {
- if err := lazyChown(pathComponent, owner.UID, owner.GID, nil); err != nil {
+ if err := setPermissions(pathComponent, mode, owner.UID, owner.GID, nil); err != nil {
return err
}
}
@@ -213,10 +213,11 @@ func callGetent(database, key string) (io.Reader, error) {
return bytes.NewReader(out), nil
}
-// lazyChown performs a chown only if the uid/gid don't match what's requested
+// setPermissions performs a chown/chmod only if the uid/gid don't match what's requested
// Normally a Chown is a no-op if uid/gid match, but in some cases this can still cause an error, e.g. if the
// dir is on an NFS share, so don't call chown unless we absolutely must.
-func lazyChown(p string, uid, gid int, stat *system.StatT) error {
+// Likewise for setting permissions.
+func setPermissions(p string, mode os.FileMode, uid, gid int, stat *system.StatT) error {
if stat == nil {
var err error
stat, err = system.Stat(p)
@@ -224,6 +225,11 @@ func lazyChown(p string, uid, gid int, stat *system.StatT) error {
return err
}
}
+ if os.FileMode(stat.Mode()).Perm() != mode.Perm() {
+ if err := os.Chmod(p, mode.Perm()); err != nil {
+ return err
+ }
+ }
if stat.UID() == uint32(uid) && stat.GID() == uint32(gid) {
return nil
}
@@ -239,38 +245,51 @@ func NewIdentityMapping(name string) (*IdentityMapping, error) {
return nil, fmt.Errorf("Could not get user for username %s: %v", name, err)
}
- uid := strconv.Itoa(usr.Uid)
-
- subuidRangesWithUserName, err := parseSubuid(name)
+ subuidRanges, err := lookupSubUIDRanges(usr)
if err != nil {
return nil, err
}
- subgidRangesWithUserName, err := parseSubgid(name)
+ subgidRanges, err := lookupSubGIDRanges(usr)
if err != nil {
return nil, err
}
- subuidRangesWithUID, err := parseSubuid(uid)
+ return &IdentityMapping{
+ uids: subuidRanges,
+ gids: subgidRanges,
+ }, nil
+}
+
+func lookupSubUIDRanges(usr user.User) ([]IDMap, error) {
+ rangeList, err := parseSubuid(strconv.Itoa(usr.Uid))
if err != nil {
return nil, err
}
- subgidRangesWithUID, err := parseSubgid(uid)
+ if len(rangeList) == 0 {
+ rangeList, err = parseSubuid(usr.Name)
+ if err != nil {
+ return nil, err
+ }
+ }
+ if len(rangeList) == 0 {
+ return nil, errors.Errorf("no subuid ranges found for user %q", usr.Name)
+ }
+ return createIDMap(rangeList), nil
+}
+
+func lookupSubGIDRanges(usr user.User) ([]IDMap, error) {
+ rangeList, err := parseSubgid(strconv.Itoa(usr.Uid))
if err != nil {
return nil, err
}
-
- subuidRanges := append(subuidRangesWithUserName, subuidRangesWithUID...)
- subgidRanges := append(subgidRangesWithUserName, subgidRangesWithUID...)
-
- if len(subuidRanges) == 0 {
- return nil, errors.Errorf("no subuid ranges found for user %q", name)
+ if len(rangeList) == 0 {
+ rangeList, err = parseSubgid(usr.Name)
+ if err != nil {
+ return nil, err
+ }
}
- if len(subgidRanges) == 0 {
- return nil, errors.Errorf("no subgid ranges found for user %q", name)
+ if len(rangeList) == 0 {
+ return nil, errors.Errorf("no subgid ranges found for user %q", usr.Name)
}
-
- return &IdentityMapping{
- uids: createIDMap(subuidRanges),
- gids: createIDMap(subgidRanges),
- }, nil
+ return createIDMap(rangeList), nil
}
diff --git a/vendor/github.com/fsouza/go-dockerclient/.golangci.yaml b/vendor/github.com/fsouza/go-dockerclient/.golangci.yaml
index 77967b70b..63415ffff 100644
--- a/vendor/github.com/fsouza/go-dockerclient/.golangci.yaml
+++ b/vendor/github.com/fsouza/go-dockerclient/.golangci.yaml
@@ -1,38 +1,8 @@
run:
deadline: 5m
- skip-dirs:
- - internal
-
-issues:
- exclude-rules:
- - path: _test\.go
- linters:
- - bodyclose
- - goconst
- - gosec
- - scopelint
- - path: testing[/\\].+\.go
- linters:
- - gosec
- - noctx
-
linters:
- enable-all: true
- disable:
- - dupl
- - errcheck
- - funlen
- - gochecknoglobals
- - gocognit
- - goconst
- - gocritic
- - godot
- - goerr113
- - gofumpt
- - gomnd
- - lll
- - nestif
- - nlreturn
- - testpackage
- - wsl
+ disable-all: true
+ enable:
+ - gofmt
+ - goimports
diff --git a/vendor/github.com/fsouza/go-dockerclient/AUTHORS b/vendor/github.com/fsouza/go-dockerclient/AUTHORS
index ec1d6258a..12daa3461 100644
--- a/vendor/github.com/fsouza/go-dockerclient/AUTHORS
+++ b/vendor/github.com/fsouza/go-dockerclient/AUTHORS
@@ -37,6 +37,7 @@ Cássio Botaro
Cesar Wong
Cezar Sa Espinola
Changping Chen
+Charles Teinturier
Cheah Chu Yeow
cheneydeng
Chris Bednarski
@@ -157,6 +158,7 @@ Phil Lu
Philippe Lafoucrière
Radek Simko
Rafe Colton
+Randy Fay
Raphaël Pinson
Reed Allman
RJ Catalano
@@ -171,6 +173,7 @@ Sami Wagiaalla
Samuel Archambault
Samuel Karp
Sebastian Borza
+Sergey Ponomarev
Seth Jennings
Shane Xie
Silas Sewell
diff --git a/vendor/github.com/fsouza/go-dockerclient/LICENSE b/vendor/github.com/fsouza/go-dockerclient/LICENSE
index 7a70a8c40..707a0ed49 100644
--- a/vendor/github.com/fsouza/go-dockerclient/LICENSE
+++ b/vendor/github.com/fsouza/go-dockerclient/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2013-2020, go-dockerclient authors
+Copyright (c) 2013-2021, go-dockerclient authors
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/vendor/github.com/fsouza/go-dockerclient/Makefile b/vendor/github.com/fsouza/go-dockerclient/Makefile
index bd3839464..431458441 100644
--- a/vendor/github.com/fsouza/go-dockerclient/Makefile
+++ b/vendor/github.com/fsouza/go-dockerclient/Makefile
@@ -1,27 +1,30 @@
-.PHONY: \
- all \
- lint \
- pretest \
- test \
- integration
-
-
ifeq "$(strip $(shell go env GOARCH))" "amd64"
RACE_FLAG := -race
endif
-all: test
+.PHONY: test
+test: pretest gotest
-lint:
+.PHONY: golangci-lint
+golangci-lint:
cd /tmp && GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run
+.PHONY: staticcheck
+staticcheck:
+ cd /tmp && GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@master
+ staticcheck ./...
+
+.PHONY: lint
+lint: golangci-lint staticcheck
+
+.PHONY: pretest
pretest: lint
+.PHONY: gotest
gotest:
go test $(RACE_FLAG) -vet all ./...
-test: pretest gotest
-
+.PHONY: integration
integration:
go test -tags docker_integration -run TestIntegration -v
diff --git a/vendor/github.com/fsouza/go-dockerclient/auth.go b/vendor/github.com/fsouza/go-dockerclient/auth.go
index ee37a2331..bc949dc35 100644
--- a/vendor/github.com/fsouza/go-dockerclient/auth.go
+++ b/vendor/github.com/fsouza/go-dockerclient/auth.go
@@ -13,6 +13,7 @@ import (
"io/ioutil"
"net/http"
"os"
+ "os/exec"
"path"
"strings"
)
@@ -283,3 +284,102 @@ func (c *Client) AuthCheck(conf *AuthConfiguration) (AuthStatus, error) {
}
return authStatus, nil
}
+
+// helperCredentials represents credentials commit from an helper
+type helperCredentials struct {
+ Username string `json:"Username,omitempty"`
+ Secret string `json:"Secret,omitempty"`
+}
+
+// NewAuthConfigurationsFromCredsHelpers returns AuthConfigurations from
+// installed credentials helpers
+func NewAuthConfigurationsFromCredsHelpers(registry string) (*AuthConfiguration, error) {
+ // Load docker configuration file in order to find a possible helper provider
+ pathsToTry := cfgPaths(os.Getenv("DOCKER_CONFIG"), os.Getenv("HOME"))
+ if len(pathsToTry) < 1 {
+ return nil, errors.New("no docker configuration found")
+ }
+
+ provider, err := getHelperProviderFromDockerCfg(pathsToTry, registry)
+ if err != nil {
+ return nil, err
+ }
+
+ c, err := getCredentialsFromHelper(provider, registry)
+ if err != nil {
+ return nil, err
+ }
+
+ creds := new(AuthConfiguration)
+ creds.Username = c.Username
+ creds.Password = c.Secret
+ return creds, nil
+}
+
+func getHelperProviderFromDockerCfg(pathsToTry []string, registry string) (string, error) {
+ for _, path := range pathsToTry {
+ content, err := ioutil.ReadFile(path)
+ if err != nil {
+ // if we can't read the file keep going
+ continue
+ }
+
+ provider, err := parseCredsDockerConfig(content, registry)
+ if err != nil {
+ continue
+ }
+ if provider != "" {
+ return provider, nil
+ }
+ }
+ return "", errors.New("no docker credentials provider found")
+}
+
+func parseCredsDockerConfig(config []byte, registry string) (string, error) {
+ creds := struct {
+ CredsStore string `json:"credsStore,omitempty"`
+ CredHelpers map[string]string `json:"credHelpers,omitempty"`
+ }{}
+ err := json.Unmarshal(config, &creds)
+ if err != nil {
+ return "", err
+ }
+
+ provider, ok := creds.CredHelpers[registry]
+ if ok {
+ return provider, nil
+ }
+ return creds.CredsStore, nil
+}
+
+// Run and parse the found credential helper
+func getCredentialsFromHelper(provider string, registry string) (*helperCredentials, error) {
+ helpercreds, err := runDockerCredentialsHelper(provider, registry)
+ if err != nil {
+ return nil, err
+ }
+
+ c := new(helperCredentials)
+ err = json.Unmarshal(helpercreds, c)
+ if err != nil {
+ return nil, err
+ }
+
+ return c, nil
+}
+
+func runDockerCredentialsHelper(provider string, registry string) ([]byte, error) {
+ cmd := exec.Command("docker-credential-"+provider, "get")
+
+ var stdout bytes.Buffer
+
+ cmd.Stdin = bytes.NewBuffer([]byte(registry))
+ cmd.Stdout = &stdout
+
+ err := cmd.Run()
+ if err != nil {
+ return nil, err
+ }
+
+ return stdout.Bytes(), nil
+}
diff --git a/vendor/github.com/fsouza/go-dockerclient/client.go b/vendor/github.com/fsouza/go-dockerclient/client.go
index a1bccd68f..d0814a5c0 100644
--- a/vendor/github.com/fsouza/go-dockerclient/client.go
+++ b/vendor/github.com/fsouza/go-dockerclient/client.go
@@ -777,10 +777,9 @@ func (c *Client) hijack(method, path string, hijackOptions hijackOptions) (Close
errs := make(chan error, 1)
quit := make(chan struct{})
go func() {
- //nolint:staticcheck
+ //lint:ignore SA1019 the alternative doesn't quite work, so keep using the deprecated thing.
clientconn := httputil.NewClientConn(dial, nil)
defer clientconn.Close()
- //nolint:bodyclose
clientconn.Do(req)
if hijackOptions.success != nil {
hijackOptions.success <- struct{}{}
@@ -959,7 +958,6 @@ func queryString(opts interface{}) string {
}
func addQueryStringValue(items url.Values, key string, v reflect.Value) bool {
- //nolint:exhaustive
switch v.Kind() {
case reflect.Bool:
if v.Bool() {
@@ -1059,7 +1057,8 @@ func parseEndpoint(endpoint string, tls bool) (*url.URL, error) {
case "http", "https", "tcp":
_, port, err := net.SplitHostPort(u.Host)
if err != nil {
- if e, ok := err.(*net.AddrError); ok {
+ var e *net.AddrError
+ if errors.As(err, &e) {
if e.Err == "missing port in address" {
return u, nil
}
diff --git a/vendor/github.com/fsouza/go-dockerclient/client_windows.go b/vendor/github.com/fsouza/go-dockerclient/client_windows.go
index 731d5c962..d35f401a4 100644
--- a/vendor/github.com/fsouza/go-dockerclient/client_windows.go
+++ b/vendor/github.com/fsouza/go-dockerclient/client_windows.go
@@ -32,7 +32,6 @@ func (c *Client) initializeNativeClient(trFunc func() *http.Transport) {
return
}
namedPipePath := c.endpointURL.Path
- //nolint:unparam
dialFunc := func(_, addr string) (net.Conn, error) {
timeout := namedPipeConnectTimeout
return winio.DialPipe(namedPipePath, &timeout)
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_changes.go b/vendor/github.com/fsouza/go-dockerclient/container_changes.go
index 42b6f4a5c..48835e231 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_changes.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_changes.go
@@ -2,6 +2,7 @@ package docker
import (
"encoding/json"
+ "errors"
"net/http"
)
@@ -12,7 +13,8 @@ func (c *Client) ContainerChanges(id string) ([]Change, error) {
path := "/containers/" + id + "/changes"
resp, err := c.do(http.MethodGet, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchContainer{ID: id}
}
return nil, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_commit.go b/vendor/github.com/fsouza/go-dockerclient/container_commit.go
index d8551626b..902ba6455 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_commit.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_commit.go
@@ -3,6 +3,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"net/http"
)
@@ -30,7 +31,8 @@ func (c *Client) CommitContainer(opts CommitContainerOptions) (*Image, error) {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchContainer{ID: opts.Container}
}
return nil, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_copy.go b/vendor/github.com/fsouza/go-dockerclient/container_copy.go
index d36c7e710..c8ffb85c3 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_copy.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_copy.go
@@ -38,7 +38,8 @@ func (c *Client) CopyFromContainer(opts CopyFromContainerOptions) error {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchContainer{ID: opts.Container}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_create.go b/vendor/github.com/fsouza/go-dockerclient/container_create.go
index b1952095d..5a5ffe0f0 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_create.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_create.go
@@ -49,7 +49,8 @@ func (c *Client) CreateContainer(opts CreateContainerOptions) (*Container, error
},
)
- if e, ok := err.(*Error); ok {
+ var e *Error
+ if errors.As(err, &e) {
if e.Status == http.StatusNotFound && strings.Contains(e.Message, "No such image") {
return nil, ErrNoSuchImage
}
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_inspect.go b/vendor/github.com/fsouza/go-dockerclient/container_inspect.go
index e8091f739..48c1e8ea7 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_inspect.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_inspect.go
@@ -3,6 +3,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"net/http"
)
@@ -17,7 +18,6 @@ func (c *Client) InspectContainer(id string) (*Container, error) {
// The context object can be used to cancel the inspect request.
//
// Deprecated: Use InspectContainerWithOptions instead.
-//nolint:golint
func (c *Client) InspectContainerWithContext(id string, ctx context.Context) (*Container, error) {
return c.InspectContainerWithOptions(InspectContainerOptions{ID: id, Context: ctx})
}
@@ -31,7 +31,8 @@ func (c *Client) InspectContainerWithOptions(opts InspectContainerOptions) (*Con
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchContainer{ID: opts.ID}
}
return nil, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_kill.go b/vendor/github.com/fsouza/go-dockerclient/container_kill.go
index ee9f0418f..600c58f12 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_kill.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_kill.go
@@ -2,6 +2,7 @@ package docker
import (
"context"
+ "errors"
"net/http"
)
@@ -27,8 +28,8 @@ func (c *Client) KillContainer(opts KillContainerOptions) error {
path := "/containers/" + opts.ID + "/kill" + "?" + queryString(opts)
resp, err := c.do(http.MethodPost, path, doOptions{context: opts.Context})
if err != nil {
- e, ok := err.(*Error)
- if !ok {
+ var e *Error
+ if !errors.As(err, &e) {
return err
}
switch e.Status {
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_pause.go b/vendor/github.com/fsouza/go-dockerclient/container_pause.go
index 66fb9ba7b..7d18b32f9 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_pause.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_pause.go
@@ -1,6 +1,7 @@
package docker
import (
+ "errors"
"fmt"
"net/http"
)
@@ -12,7 +13,8 @@ func (c *Client) PauseContainer(id string) error {
path := fmt.Sprintf("/containers/%s/pause", id)
resp, err := c.do(http.MethodPost, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchContainer{ID: id}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_remove.go b/vendor/github.com/fsouza/go-dockerclient/container_remove.go
index 23298f51c..dbe0907f0 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_remove.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_remove.go
@@ -2,6 +2,7 @@ package docker
import (
"context"
+ "errors"
"net/http"
)
@@ -29,7 +30,8 @@ func (c *Client) RemoveContainer(opts RemoveContainerOptions) error {
path := "/containers/" + opts.ID + "?" + queryString(opts)
resp, err := c.do(http.MethodDelete, path, doOptions{context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchContainer{ID: opts.ID}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_restart.go b/vendor/github.com/fsouza/go-dockerclient/container_restart.go
index 90e59055c..183cbac0f 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_restart.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_restart.go
@@ -1,6 +1,7 @@
package docker
import (
+ "errors"
"fmt"
"net/http"
)
@@ -52,7 +53,8 @@ func (c *Client) RestartContainer(id string, timeout uint) error {
path := fmt.Sprintf("/containers/%s/restart?t=%d", id, timeout)
resp, err := c.do(http.MethodPost, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchContainer{ID: id}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_start.go b/vendor/github.com/fsouza/go-dockerclient/container_start.go
index 5edb29438..0911eaab4 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_start.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_start.go
@@ -2,6 +2,7 @@ package docker
import (
"context"
+ "errors"
"net/http"
)
@@ -27,7 +28,6 @@ func (c *Client) StartContainer(id string, hostConfig *HostConfig) error {
// API 1.24 or greater.
//
// See https://goo.gl/fbOSZy for more details.
-//nolint:golint
func (c *Client) StartContainerWithContext(id string, hostConfig *HostConfig, ctx context.Context) error {
return c.startContainer(id, hostConfig, doOptions{context: ctx})
}
@@ -43,7 +43,8 @@ func (c *Client) startContainer(id string, hostConfig *HostConfig, opts doOption
}
resp, err := c.do(http.MethodPost, path, opts)
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchContainer{ID: id, Err: err}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_stats.go b/vendor/github.com/fsouza/go-dockerclient/container_stats.go
index a899b95cf..ee2499a52 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_stats.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_stats.go
@@ -3,6 +3,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"fmt"
"io"
"net/http"
@@ -175,8 +176,8 @@ func (c *Client) Stats(opts StatsOptions) (retErr error) {
reqSent: reqSent,
})
if err != nil {
- dockerError, ok := err.(*Error)
- if ok {
+ var dockerError *Error
+ if errors.As(err, &dockerError) {
if dockerError.Status == http.StatusNotFound {
err = &NoSuchContainer{ID: opts.ID}
}
@@ -203,7 +204,7 @@ func (c *Client) Stats(opts StatsOptions) (retErr error) {
decoder := json.NewDecoder(readCloser)
stats := new(Stats)
<-reqSent
- for err := decoder.Decode(stats); err != io.EOF; err = decoder.Decode(stats) {
+ for err := decoder.Decode(stats); !errors.Is(err, io.EOF); err = decoder.Decode(stats) {
if err != nil {
return err
}
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_stop.go b/vendor/github.com/fsouza/go-dockerclient/container_stop.go
index 0b148b084..43d989874 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_stop.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_stop.go
@@ -2,6 +2,7 @@ package docker
import (
"context"
+ "errors"
"fmt"
"net/http"
)
@@ -19,7 +20,6 @@ func (c *Client) StopContainer(id string, timeout uint) error {
// container request.
//
// See https://goo.gl/R9dZcV for more details.
-//nolint:golint
func (c *Client) StopContainerWithContext(id string, timeout uint, ctx context.Context) error {
return c.stopContainer(id, timeout, doOptions{context: ctx})
}
@@ -28,7 +28,8 @@ func (c *Client) stopContainer(id string, timeout uint, opts doOptions) error {
path := fmt.Sprintf("/containers/%s/stop?t=%d", id, timeout)
resp, err := c.do(http.MethodPost, path, opts)
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchContainer{ID: id}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_top.go b/vendor/github.com/fsouza/go-dockerclient/container_top.go
index 7fb00e051..0aec655fb 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_top.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_top.go
@@ -2,6 +2,7 @@ package docker
import (
"encoding/json"
+ "errors"
"fmt"
"net/http"
)
@@ -27,7 +28,8 @@ func (c *Client) TopContainer(id string, psArgs string) (TopResult, error) {
path := fmt.Sprintf("/containers/%s/top%s", id, args)
resp, err := c.do(http.MethodGet, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return result, &NoSuchContainer{ID: id}
}
return result, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_unpause.go b/vendor/github.com/fsouza/go-dockerclient/container_unpause.go
index af80d81d6..8f3adc34b 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_unpause.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_unpause.go
@@ -1,6 +1,7 @@
package docker
import (
+ "errors"
"fmt"
"net/http"
)
@@ -12,7 +13,8 @@ func (c *Client) UnpauseContainer(id string) error {
path := fmt.Sprintf("/containers/%s/unpause", id)
resp, err := c.do(http.MethodPost, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchContainer{ID: id}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_wait.go b/vendor/github.com/fsouza/go-dockerclient/container_wait.go
index 6fd27b0ce..96f0c25f4 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container_wait.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container_wait.go
@@ -3,6 +3,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"net/http"
)
@@ -19,7 +20,6 @@ func (c *Client) WaitContainer(id string) (int, error) {
// inspect request.
//
// See https://goo.gl/4AGweZ for more details.
-//nolint:golint
func (c *Client) WaitContainerWithContext(id string, ctx context.Context) (int, error) {
return c.waitContainer(id, doOptions{context: ctx})
}
@@ -27,7 +27,8 @@ func (c *Client) WaitContainerWithContext(id string, ctx context.Context) (int,
func (c *Client) waitContainer(id string, opts doOptions) (int, error) {
resp, err := c.do(http.MethodPost, "/containers/"+id+"/wait", opts)
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return 0, &NoSuchContainer{ID: id}
}
return 0, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/event.go b/vendor/github.com/fsouza/go-dockerclient/event.go
index 8e362d44e..024b4ecc2 100644
--- a/vendor/github.com/fsouza/go-dockerclient/event.go
+++ b/vendor/github.com/fsouza/go-dockerclient/event.go
@@ -7,17 +7,48 @@ package docker
import (
"encoding/json"
"errors"
- "fmt"
"io"
"math"
"net"
"net/http"
"net/http/httputil"
+ "strconv"
"sync"
"sync/atomic"
"time"
)
+// EventsOptions to filter events
+// See https://docs.docker.com/engine/api/v1.41/#operation/SystemEvents for more details.
+type EventsOptions struct {
+ // Show events created since this timestamp then stream new events.
+ Since string
+
+ // Show events created until this timestamp then stop streaming.
+ Until string
+
+ // Filter for events. For example:
+ // map[string][]string{"type": {"container"}, "event": {"start", "die"}}
+ // will return events when container was started and stopped or killed
+ //
+ // Available filters:
+ // config=<string> config name or ID
+ // container=<string> container name or ID
+ // daemon=<string> daemon name or ID
+ // event=<string> event type
+ // image=<string> image name or ID
+ // label=<string> image or container label
+ // network=<string> network name or ID
+ // node=<string> node ID
+ // plugin= plugin name or ID
+ // scope= local or swarm
+ // secret=<string> secret name or ID
+ // service=<string> service name or ID
+ // type=<string> container, image, volume, network, daemon, plugin, node, service, secret or config
+ // volume=<string> volume name
+ Filters map[string][]string
+}
+
// APIEvents represents events coming from the Docker API
// The fields in the Docker API changed in API version 1.22, and
// events for more than images and containers are now fired off.
@@ -93,9 +124,17 @@ var (
//
// The parameter is a channel through which events will be sent.
func (c *Client) AddEventListener(listener chan<- *APIEvents) error {
+ return c.AddEventListenerWithOptions(EventsOptions{}, listener)
+}
+
+// AddEventListener adds a new listener to container events in the Docker API.
+// See https://docs.docker.com/engine/api/v1.41/#operation/SystemEvents for more details.
+//
+// The listener parameter is a channel through which events will be sent.
+func (c *Client) AddEventListenerWithOptions(options EventsOptions, listener chan<- *APIEvents) error {
var err error
if !c.eventMonitor.isEnabled() {
- err = c.eventMonitor.enableEventMonitoring(c)
+ err = c.eventMonitor.enableEventMonitoring(c, options)
if err != nil {
return err
}
@@ -165,7 +204,7 @@ func listenerExists(a chan<- *APIEvents, list *[]chan<- *APIEvents) bool {
return false
}
-func (eventState *eventMonitoringState) enableEventMonitoring(c *Client) error {
+func (eventState *eventMonitoringState) enableEventMonitoring(c *Client, opts EventsOptions) error {
eventState.Lock()
defer eventState.Unlock()
if !eventState.enabled {
@@ -173,7 +212,7 @@ func (eventState *eventMonitoringState) enableEventMonitoring(c *Client) error {
atomic.StoreInt64(&eventState.lastSeen, 0)
eventState.C = make(chan *APIEvents, 100)
eventState.errC = make(chan error, 1)
- go eventState.monitorEvents(c)
+ go eventState.monitorEvents(c, opts)
}
return nil
}
@@ -193,7 +232,7 @@ func (eventState *eventMonitoringState) disableEventMonitoring() {
}
}
-func (eventState *eventMonitoringState) monitorEvents(c *Client) {
+func (eventState *eventMonitoringState) monitorEvents(c *Client, opts EventsOptions) {
const (
noListenersTimeout = 5 * time.Second
noListenersInterval = 10 * time.Millisecond
@@ -213,7 +252,7 @@ func (eventState *eventMonitoringState) monitorEvents(c *Client) {
return
}
- if err = eventState.connectWithRetry(c); err != nil {
+ if err = eventState.connectWithRetry(c, opts); err != nil {
// terminate if connect failed
eventState.disableEventMonitoring()
return
@@ -232,11 +271,11 @@ func (eventState *eventMonitoringState) monitorEvents(c *Client) {
eventState.updateLastSeen(ev)
eventState.sendEvent(ev)
case err = <-eventState.errC:
- if err == ErrNoListeners {
+ if errors.Is(err, ErrNoListeners) {
eventState.disableEventMonitoring()
return
} else if err != nil {
- defer func() { go eventState.monitorEvents(c) }()
+ defer func() { go eventState.monitorEvents(c, opts) }()
return
}
case <-timeout:
@@ -245,13 +284,13 @@ func (eventState *eventMonitoringState) monitorEvents(c *Client) {
}
}
-func (eventState *eventMonitoringState) connectWithRetry(c *Client) error {
+func (eventState *eventMonitoringState) connectWithRetry(c *Client, opts EventsOptions) error {
var retries int
eventState.RLock()
eventChan := eventState.C
errChan := eventState.errC
eventState.RUnlock()
- err := c.eventHijack(atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan)
+ err := c.eventHijack(opts, atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan)
for ; err != nil && retries < maxMonitorConnRetries; retries++ {
waitTime := int64(retryInitialWaitTime * math.Pow(2, float64(retries)))
time.Sleep(time.Duration(waitTime) * time.Millisecond)
@@ -259,7 +298,7 @@ func (eventState *eventMonitoringState) connectWithRetry(c *Client) error {
eventChan = eventState.C
errChan = eventState.errC
eventState.RUnlock()
- err = c.eventHijack(atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan)
+ err = c.eventHijack(opts, atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan)
}
return err
}
@@ -304,11 +343,12 @@ func (eventState *eventMonitoringState) updateLastSeen(e *APIEvents) {
}
}
-func (c *Client) eventHijack(startTime int64, eventChan chan *APIEvents, errChan chan error) error {
- uri := "/events"
+func (c *Client) eventHijack(opts EventsOptions, startTime int64, eventChan chan *APIEvents, errChan chan error) error {
+ // on reconnect override initial Since with last event seen time
if startTime != 0 {
- uri += fmt.Sprintf("?since=%d", startTime)
+ opts.Since = strconv.FormatInt(startTime, 10)
}
+ uri := "/events?" + queryString(opts)
protocol := c.endpointURL.Scheme
address := c.endpointURL.Path
if protocol != "unix" && protocol != "npipe" {
@@ -329,16 +369,17 @@ func (c *Client) eventHijack(startTime int64, eventChan chan *APIEvents, errChan
if err != nil {
return err
}
- conn := httputil.NewClientConn(dial, nil) //nolint:staticcheck
- req, err := http.NewRequest(http.MethodGet, uri, nil) //nolint:noctx
+ //lint:ignore SA1019 the alternative doesn't quite work, so keep using the deprecated thing.
+ conn := httputil.NewClientConn(dial, nil)
+ req, err := http.NewRequest(http.MethodGet, uri, nil)
if err != nil {
return err
}
- res, err := conn.Do(req) //nolint:bodyclose
+ res, err := conn.Do(req)
if err != nil {
return err
}
- //nolint:staticcheck
+ //lint:ignore SA1019 the alternative doesn't quite work, so keep using the deprecated thing.
go func(res *http.Response, conn *httputil.ClientConn) {
defer conn.Close()
defer res.Body.Close()
@@ -346,7 +387,7 @@ func (c *Client) eventHijack(startTime int64, eventChan chan *APIEvents, errChan
for {
var event APIEvents
if err = decoder.Decode(&event); err != nil {
- if err == io.EOF || err == io.ErrUnexpectedEOF {
+ if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) {
c.eventMonitor.RLock()
if c.eventMonitor.enabled && c.eventMonitor.C == eventChan {
// Signal that we're exiting.
diff --git a/vendor/github.com/fsouza/go-dockerclient/exec.go b/vendor/github.com/fsouza/go-dockerclient/exec.go
index 48d1ad349..c8399b0b0 100644
--- a/vendor/github.com/fsouza/go-dockerclient/exec.go
+++ b/vendor/github.com/fsouza/go-dockerclient/exec.go
@@ -44,6 +44,9 @@ type CreateExecOptions struct {
//
// See https://goo.gl/60TeBP for more details
func (c *Client) CreateExec(opts CreateExecOptions) (*Exec, error) {
+ if c.serverAPIVersion == nil {
+ c.checkAPIVersion()
+ }
if len(opts.Env) > 0 && c.serverAPIVersion.LessThan(apiVersion125) {
return nil, errors.New("exec configuration Env is only supported in API#1.25 and above")
}
@@ -53,7 +56,8 @@ func (c *Client) CreateExec(opts CreateExecOptions) (*Exec, error) {
path := fmt.Sprintf("/containers/%s/exec", opts.Container)
resp, err := c.do(http.MethodPost, path, doOptions{data: opts, context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchContainer{ID: opts.Container}
}
return nil, err
@@ -122,7 +126,8 @@ func (c *Client) StartExecNonBlocking(id string, opts StartExecOptions) (CloseWa
if opts.Detach {
resp, err := c.do(http.MethodPost, path, doOptions{data: opts, context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchExec{ID: id}
}
return nil, err
@@ -195,7 +200,8 @@ func (c *Client) InspectExec(id string) (*ExecInspect, error) {
path := fmt.Sprintf("/exec/%s/json", id)
resp, err := c.do(http.MethodGet, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchExec{ID: id}
}
return nil, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/go.mod b/vendor/github.com/fsouza/go-dockerclient/go.mod
index 6de12ff37..ddae6a0cd 100644
--- a/vendor/github.com/fsouza/go-dockerclient/go.mod
+++ b/vendor/github.com/fsouza/go-dockerclient/go.mod
@@ -1,24 +1,24 @@
module github.com/fsouza/go-dockerclient
-go 1.14
+go 1.15
require (
- github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873
- github.com/Microsoft/hcsshim v0.8.9 // indirect
- github.com/containerd/containerd v1.3.4 // indirect
- github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb // indirect
- github.com/docker/distribution v2.7.1+incompatible // indirect
- github.com/docker/docker v17.12.0-ce-rc1.0.20200505174321-1655290016ac+incompatible
+ github.com/Microsoft/go-winio v0.4.16
+ github.com/Microsoft/hcsshim v0.8.14 // indirect
+ github.com/containerd/containerd v1.4.3 // indirect
+ github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e // indirect
+ github.com/docker/docker v20.10.3-0.20210216175712-646072ed6524+incompatible
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0
- github.com/google/go-cmp v0.5.2
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/google/go-cmp v0.5.5
github.com/gorilla/mux v1.8.0
- github.com/moby/sys/mount v0.1.0 // indirect
- github.com/moby/term v0.0.0-20200429084858-129dac9f73f6 // indirect
+ github.com/moby/sys/mount v0.2.0 // indirect
+ github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/runc v0.1.1 // indirect
- golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79
- google.golang.org/grpc v1.29.1 // indirect
- gotest.tools/v3 v3.0.2 // indirect
+ golang.org/x/sys v0.0.0-20210216224549-f992740a1bac // indirect
+ golang.org/x/term v0.0.0-20201113234701-d7a72108b828
+ gotest.tools/v3 v3.0.3 // indirect
)
diff --git a/vendor/github.com/fsouza/go-dockerclient/go.sum b/vendor/github.com/fsouza/go-dockerclient/go.sum
index 99480302e..69341496b 100644
--- a/vendor/github.com/fsouza/go-dockerclient/go.sum
+++ b/vendor/github.com/fsouza/go-dockerclient/go.sum
@@ -3,186 +3,163 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA=
-github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
-github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873 h1:93nQ7k53GjoMQ07HVP8g6Zj1fQZDDj7Xy2VkNNtvX8o=
-github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
-github.com/Microsoft/hcsshim v0.8.9 h1:VrfodqvztU8YSOvygU+DN1BGaSGxmrNfqOv5oOuX2Bk=
-github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8=
-github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
+github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
+github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
+github.com/Microsoft/hcsshim v0.8.14 h1:lbPVK25c1cu5xTLITwpUcxoA9vKrKErASPYygvouJns=
+github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
+github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s=
-github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
+github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk=
+github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.3.4 h1:3o0smo5SKY7H6AJCmJhsnCjR2/V2T8VmiHt7seN2/kI=
-github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc h1:TP+534wVlf61smEIq1nwLLAjQVEK2EADoW3CX9AuT+8=
+github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY=
+github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
-github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb h1:nXPkFq8X1a9ycY3GYQpFNxHh3j2JgY7zDZfq2EXMIzk=
-github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY=
-github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448 h1:PUD50EuOMkXVcpBIA/R95d56duJR9VxhwncsFbNnxW4=
+github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e h1:6JKvHHt396/qabvMhnhUZvWaHZzfVfldxE60TK8YLhg=
+github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ=
github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
-github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de h1:dlfGmNcE3jDAecLqwKPMNX6nk2qh1c1Vg1/YTzpOOF4=
github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
-github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd h1:JNn81o/xG+8NEo3bC/vx9pbi/g2WI8mtP2/nXzu297Y=
github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
-github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
-github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
+github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
+github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
-github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/docker/docker v17.12.0-ce-rc1.0.20200505174321-1655290016ac+incompatible h1:ZxJX4ZSNg1LORBsStUojbrLfkrE3Ut122XhzyZnN110=
-github.com/docker/docker v17.12.0-ce-rc1.0.20200505174321-1655290016ac+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker v20.10.3-0.20210216175712-646072ed6524+incompatible h1:Yu2uGErhwEoOT/OxAFe+/SiJCqRLs+pgcS5XKrDXnG4=
+github.com/docker/docker v20.10.3-0.20210216175712-646072ed6524+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
-github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
-github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
-github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
-github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
-github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
+github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=
-github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
-github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
-github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
-github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc=
-github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/moby/sys/mount v0.1.0 h1:Ytx78EatgFKtrqZ0BvJ0UtJE472ZvawVmil6pIfuCCU=
-github.com/moby/sys/mount v0.1.0/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74=
-github.com/moby/sys/mountinfo v0.1.0 h1:r8vMRbMAFEAfiNptYVokP+nfxPJzvRuia5e2vzXtENo=
-github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o=
-github.com/moby/term v0.0.0-20200429084858-129dac9f73f6 h1:3Y9aosU6S5Bo8GYH0s+t1ej4m30GuUKvQ3c9ZLqdL28=
-github.com/moby/term v0.0.0-20200429084858-129dac9f73f6/go.mod h1:or9wGItza1sRcM4Wd3dIv8DsFHYQuFsMHEdxUIlUxms=
+github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM=
+github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM=
+github.com/moby/sys/mountinfo v0.4.0 h1:1KInV3Huv18akCu58V7lzNlt+jFmqlu1EaErnEHE/VM=
+github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
+github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk=
+github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
-github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
-github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
+github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
+github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y=
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
-github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700 h1:eNUVfm/RFLIi1G7flU5/ZRTHvd4kcVuzfRnL6OFlzCI=
-github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
+github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
-github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
+github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
-github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
+github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
-golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79 h1:IaQbIIB2X/Mp/DKctl6ROxz1KyMlKp4uyvL6+kQ7C88=
-golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09 h1:KaQtG+aDELoNmXYas3TVkGNYRuq8JQ1aa7LJt8EXVyo=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1cHUZgO1Ebq5r2hIjfo=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210216224549-f992740a1bac h1:9glrpwtNjBYgRpb67AZJKHfzj1stG/8BL5H7In2oTC4=
+golang.org/x/sys v0.0.0-20210216224549-f992740a1bac/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201113234701-d7a72108b828 h1:htWEtQEuEVJ4tU/Ngx7Cd/4Q7e3A5Up1owgyBtVsTwk=
+golang.org/x/term v0.0.0-20201113234701-d7a72108b828/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -190,39 +167,32 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb h1:i1Ppqkc3WQXikh8bXiwHqAN5Rv3/qDCcRk0/Otx73BY=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
-google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
-google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
-google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
-gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E=
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
+gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
+gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/vendor/github.com/fsouza/go-dockerclient/image.go b/vendor/github.com/fsouza/go-dockerclient/image.go
index 5f72d6645..83af56b94 100644
--- a/vendor/github.com/fsouza/go-dockerclient/image.go
+++ b/vendor/github.com/fsouza/go-dockerclient/image.go
@@ -138,7 +138,8 @@ type ImageHistory struct {
func (c *Client) ImageHistory(name string) ([]ImageHistory, error) {
resp, err := c.do(http.MethodGet, "/images/"+name+"/history", doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, ErrNoSuchImage
}
return nil, err
@@ -157,7 +158,8 @@ func (c *Client) ImageHistory(name string) ([]ImageHistory, error) {
func (c *Client) RemoveImage(name string) error {
resp, err := c.do(http.MethodDelete, "/images/"+name, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return ErrNoSuchImage
}
return err
@@ -184,7 +186,8 @@ func (c *Client) RemoveImageExtended(name string, opts RemoveImageOptions) error
uri := fmt.Sprintf("/images/%s?%s", name, queryString(&opts))
resp, err := c.do(http.MethodDelete, uri, doOptions{context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return ErrNoSuchImage
}
return err
@@ -199,7 +202,8 @@ func (c *Client) RemoveImageExtended(name string, opts RemoveImageOptions) error
func (c *Client) InspectImage(name string) (*Image, error) {
resp, err := c.do(http.MethodGet, "/images/"+name+"/json", doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, ErrNoSuchImage
}
return nil, err
@@ -323,7 +327,6 @@ func (c *Client) PullImage(opts PullImageOptions, auth AuthConfiguration) error
return c.createImage(&opts, headers, nil, opts.OutputStream, opts.RawJSONStream, opts.InactivityTimeout, opts.Context)
}
-//nolint:golint
func (c *Client) createImage(opts interface{}, headers map[string]string, in io.Reader, w io.Writer, rawJSONStream bool, timeout time.Duration, context context.Context) error {
url, err := c.getPath("/images/create", opts)
if err != nil {
diff --git a/vendor/github.com/fsouza/go-dockerclient/misc.go b/vendor/github.com/fsouza/go-dockerclient/misc.go
index d42a66df6..8eaa82704 100644
--- a/vendor/github.com/fsouza/go-dockerclient/misc.go
+++ b/vendor/github.com/fsouza/go-dockerclient/misc.go
@@ -38,7 +38,6 @@ func (c *Client) VersionWithContext(ctx context.Context) (*Env, error) {
// DockerInfo contains information about the Docker server
//
// See https://goo.gl/bHUoz9 for more details.
-//nolint:golint
type DockerInfo struct {
ID string
Containers int
diff --git a/vendor/github.com/fsouza/go-dockerclient/network.go b/vendor/github.com/fsouza/go-dockerclient/network.go
index 3a06a52d5..f3ce4ce96 100644
--- a/vendor/github.com/fsouza/go-dockerclient/network.go
+++ b/vendor/github.com/fsouza/go-dockerclient/network.go
@@ -94,7 +94,8 @@ func (c *Client) NetworkInfo(id string) (*Network, error) {
path := "/networks/" + id
resp, err := c.do(http.MethodGet, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchNetwork{ID: id}
}
return nil, err
@@ -195,7 +196,8 @@ func (c *Client) CreateNetwork(opts CreateNetworkOptions) (*Network, error) {
func (c *Client) RemoveNetwork(id string) error {
resp, err := c.do(http.MethodDelete, "/networks/"+id, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchNetwork{ID: id}
}
return err
@@ -258,7 +260,8 @@ func (c *Client) ConnectNetwork(id string, opts NetworkConnectionOptions) error
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchNetworkOrContainer{NetworkID: id, ContainerID: opts.Container}
}
return err
@@ -274,7 +277,8 @@ func (c *Client) ConnectNetwork(id string, opts NetworkConnectionOptions) error
func (c *Client) DisconnectNetwork(id string, opts NetworkConnectionOptions) error {
resp, err := c.do(http.MethodPost, "/networks/"+id+"/disconnect", doOptions{data: opts})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchNetworkOrContainer{NetworkID: id, ContainerID: opts.Container}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/plugin.go b/vendor/github.com/fsouza/go-dockerclient/plugin.go
index 9cec41512..be45607b9 100644
--- a/vendor/github.com/fsouza/go-dockerclient/plugin.go
+++ b/vendor/github.com/fsouza/go-dockerclient/plugin.go
@@ -7,6 +7,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"io/ioutil"
"net/http"
)
@@ -207,7 +208,6 @@ func (c *Client) ListFilteredPlugins(opts ListFilteredPluginsOptions) ([]PluginD
// GetPluginPrivileges returns pluginPrivileges or an error.
//
// See https://goo.gl/C4t7Tz for more details.
-//nolint:golint
func (c *Client) GetPluginPrivileges(remote string, ctx context.Context) ([]PluginPrivilege, error) {
return c.GetPluginPrivilegesWithOptions(
GetPluginPrivilegesOptions{
@@ -228,7 +228,6 @@ type GetPluginPrivilegesOptions struct {
// GetPluginPrivilegesWithOptions returns pluginPrivileges or an error.
//
// See https://goo.gl/C4t7Tz for more details.
-//nolint:golint
func (c *Client) GetPluginPrivilegesWithOptions(opts GetPluginPrivilegesOptions) ([]PluginPrivilege, error) {
headers, err := headersWithAuth(opts.Auth)
if err != nil {
@@ -254,13 +253,13 @@ func (c *Client) GetPluginPrivilegesWithOptions(opts GetPluginPrivilegesOptions)
// InspectPlugins returns a pluginDetail or an error.
//
// See https://goo.gl/C4t7Tz for more details.
-//nolint:golint
func (c *Client) InspectPlugins(name string, ctx context.Context) (*PluginDetail, error) {
resp, err := c.do(http.MethodGet, "/plugins/"+name+"/json", doOptions{
context: ctx,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchPlugin{ID: name}
}
return nil, err
@@ -291,7 +290,8 @@ func (c *Client) RemovePlugin(opts RemovePluginOptions) (*PluginDetail, error) {
path := "/plugins/" + opts.Name + "?" + queryString(opts)
resp, err := c.do(http.MethodDelete, path, doOptions{context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchPlugin{ID: opts.Name}
}
return nil, err
@@ -437,7 +437,8 @@ func (c *Client) ConfigurePlugin(opts ConfigurePluginOptions) error {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchPlugin{ID: opts.Name}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/swarm.go b/vendor/github.com/fsouza/go-dockerclient/swarm.go
index c1bbce763..ae37cd1e8 100644
--- a/vendor/github.com/fsouza/go-dockerclient/swarm.go
+++ b/vendor/github.com/fsouza/go-dockerclient/swarm.go
@@ -42,7 +42,8 @@ func (c *Client) InitSwarm(opts InitSwarmOptions) (string, error) {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
+ var e *Error
+ if errors.As(err, &e) && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
return "", ErrNodeAlreadyInSwarm
}
return "", err
@@ -72,7 +73,8 @@ func (c *Client) JoinSwarm(opts JoinSwarmOptions) error {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
+ var e *Error
+ if errors.As(err, &e) && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
return ErrNodeAlreadyInSwarm
}
}
@@ -97,7 +99,8 @@ func (c *Client) LeaveSwarm(opts LeaveSwarmOptions) error {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
+ var e *Error
+ if errors.As(err, &e) && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
return ErrNodeNotInSwarm
}
}
@@ -129,7 +132,8 @@ func (c *Client) UpdateSwarm(opts UpdateSwarmOptions) error {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
+ var e *Error
+ if errors.As(err, &e) && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
return ErrNodeNotInSwarm
}
}
@@ -145,7 +149,8 @@ func (c *Client) InspectSwarm(ctx context.Context) (swarm.Swarm, error) {
context: ctx,
})
if err != nil {
- if e, ok := err.(*Error); ok && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
+ var e *Error
+ if errors.As(err, &e) && (e.Status == http.StatusNotAcceptable || e.Status == http.StatusServiceUnavailable) {
return response, ErrNodeNotInSwarm
}
return response, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/swarm_configs.go b/vendor/github.com/fsouza/go-dockerclient/swarm_configs.go
index 399aa1dce..055e99544 100644
--- a/vendor/github.com/fsouza/go-dockerclient/swarm_configs.go
+++ b/vendor/github.com/fsouza/go-dockerclient/swarm_configs.go
@@ -7,6 +7,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"net/http"
"net/url"
"strconv"
@@ -78,7 +79,8 @@ func (c *Client) RemoveConfig(opts RemoveConfigOptions) error {
path := "/configs/" + opts.ID
resp, err := c.do(http.MethodDelete, path, doOptions{context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchConfig{ID: opts.ID}
}
return err
@@ -116,7 +118,8 @@ func (c *Client) UpdateConfig(id string, opts UpdateConfigOptions) error {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchConfig{ID: id}
}
return err
@@ -132,7 +135,8 @@ func (c *Client) InspectConfig(id string) (*swarm.Config, error) {
path := "/configs/" + id
resp, err := c.do(http.MethodGet, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchConfig{ID: id}
}
return nil, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/swarm_node.go b/vendor/github.com/fsouza/go-dockerclient/swarm_node.go
index c149db287..8538a167b 100644
--- a/vendor/github.com/fsouza/go-dockerclient/swarm_node.go
+++ b/vendor/github.com/fsouza/go-dockerclient/swarm_node.go
@@ -7,6 +7,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"net/http"
"net/url"
"strconv"
@@ -58,7 +59,8 @@ func (c *Client) ListNodes(opts ListNodesOptions) ([]swarm.Node, error) {
func (c *Client) InspectNode(id string) (*swarm.Node, error) {
resp, err := c.do(http.MethodGet, "/nodes/"+id, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchNode{ID: id}
}
return nil, err
@@ -93,7 +95,8 @@ func (c *Client) UpdateNode(id string, opts UpdateNodeOptions) error {
data: opts.NodeSpec,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchNode{ID: id}
}
return err
@@ -120,7 +123,8 @@ func (c *Client) RemoveNode(opts RemoveNodeOptions) error {
path := "/nodes/" + opts.ID + "?" + params.Encode()
resp, err := c.do(http.MethodDelete, path, doOptions{context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchNode{ID: opts.ID}
}
return err
diff --git a/vendor/github.com/fsouza/go-dockerclient/swarm_secrets.go b/vendor/github.com/fsouza/go-dockerclient/swarm_secrets.go
index 058c4a4af..375e6e5ba 100644
--- a/vendor/github.com/fsouza/go-dockerclient/swarm_secrets.go
+++ b/vendor/github.com/fsouza/go-dockerclient/swarm_secrets.go
@@ -7,6 +7,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"net/http"
"net/url"
"strconv"
@@ -78,7 +79,8 @@ func (c *Client) RemoveSecret(opts RemoveSecretOptions) error {
path := "/secrets/" + opts.ID
resp, err := c.do(http.MethodDelete, path, doOptions{context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchSecret{ID: opts.ID}
}
return err
@@ -116,7 +118,8 @@ func (c *Client) UpdateSecret(id string, opts UpdateSecretOptions) error {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchSecret{ID: id}
}
return err
@@ -132,7 +135,8 @@ func (c *Client) InspectSecret(id string) (*swarm.Secret, error) {
path := "/secrets/" + id
resp, err := c.do(http.MethodGet, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchSecret{ID: id}
}
return nil, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/swarm_service.go b/vendor/github.com/fsouza/go-dockerclient/swarm_service.go
index 4accb2cb8..0d0f007b7 100644
--- a/vendor/github.com/fsouza/go-dockerclient/swarm_service.go
+++ b/vendor/github.com/fsouza/go-dockerclient/swarm_service.go
@@ -7,6 +7,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"io"
"net/http"
"time"
@@ -78,7 +79,8 @@ func (c *Client) RemoveService(opts RemoveServiceOptions) error {
path := "/services/" + opts.ID
resp, err := c.do(http.MethodDelete, path, doOptions{context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchService{ID: opts.ID}
}
return err
@@ -113,7 +115,8 @@ func (c *Client) UpdateService(id string, opts UpdateServiceOptions) error {
context: opts.Context,
})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return &NoSuchService{ID: id}
}
return err
@@ -129,7 +132,8 @@ func (c *Client) InspectService(id string) (*swarm.Service, error) {
path := "/services/" + id
resp, err := c.do(http.MethodGet, path, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchService{ID: id}
}
return nil, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/swarm_task.go b/vendor/github.com/fsouza/go-dockerclient/swarm_task.go
index 547642f5e..9321368d3 100644
--- a/vendor/github.com/fsouza/go-dockerclient/swarm_task.go
+++ b/vendor/github.com/fsouza/go-dockerclient/swarm_task.go
@@ -7,6 +7,7 @@ package docker
import (
"context"
"encoding/json"
+ "errors"
"net/http"
"github.com/docker/docker/api/types/swarm"
@@ -56,7 +57,8 @@ func (c *Client) ListTasks(opts ListTasksOptions) ([]swarm.Task, error) {
func (c *Client) InspectTask(id string) (*swarm.Task, error) {
resp, err := c.do(http.MethodGet, "/tasks/"+id, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, &NoSuchTask{ID: id}
}
return nil, err
diff --git a/vendor/github.com/fsouza/go-dockerclient/tls.go b/vendor/github.com/fsouza/go-dockerclient/tls.go
index 535b72987..56f00589b 100644
--- a/vendor/github.com/fsouza/go-dockerclient/tls.go
+++ b/vendor/github.com/fsouza/go-dockerclient/tls.go
@@ -103,7 +103,7 @@ func copyTLSConfig(cfg *tls.Config) *tls.Config {
ClientCAs: cfg.ClientCAs,
ClientSessionCache: cfg.ClientSessionCache,
CurvePreferences: cfg.CurvePreferences,
- InsecureSkipVerify: cfg.InsecureSkipVerify, //nolint:gosec
+ InsecureSkipVerify: cfg.InsecureSkipVerify,
MaxVersion: cfg.MaxVersion,
MinVersion: cfg.MinVersion,
NextProtos: cfg.NextProtos,
diff --git a/vendor/github.com/fsouza/go-dockerclient/volume.go b/vendor/github.com/fsouza/go-dockerclient/volume.go
index c39a273bf..9f8a435c9 100644
--- a/vendor/github.com/fsouza/go-dockerclient/volume.go
+++ b/vendor/github.com/fsouza/go-dockerclient/volume.go
@@ -106,7 +106,8 @@ func (c *Client) CreateVolume(opts CreateVolumeOptions) (*Volume, error) {
func (c *Client) InspectVolume(name string) (*Volume, error) {
resp, err := c.do(http.MethodGet, "/volumes/"+name, doOptions{})
if err != nil {
- if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
+ var e *Error
+ if errors.As(err, &e) && e.Status == http.StatusNotFound {
return nil, ErrNoSuchVolume
}
return nil, err
@@ -144,7 +145,8 @@ func (c *Client) RemoveVolumeWithOptions(opts RemoveVolumeOptions) error {
path := "/volumes/" + opts.Name
resp, err := c.do(http.MethodDelete, path+"?"+queryString(opts), doOptions{context: opts.Context})
if err != nil {
- if e, ok := err.(*Error); ok {
+ var e *Error
+ if errors.As(err, &e) {
if e.Status == http.StatusNotFound {
return ErrNoSuchVolume
}
diff --git a/vendor/github.com/moby/sys/mount/doc.go b/vendor/github.com/moby/sys/mount/doc.go
new file mode 100644
index 000000000..86c2e01bb
--- /dev/null
+++ b/vendor/github.com/moby/sys/mount/doc.go
@@ -0,0 +1,4 @@
+// Package mount provides a set of functions to mount and unmount mounts.
+//
+// Currently it supports Linux. For historical reasons, there is also some support for FreeBSD.
+package mount
diff --git a/vendor/github.com/moby/sys/mount/flags_freebsd.go b/vendor/github.com/moby/sys/mount/flags_bsd.go
index 69c50680d..27d8440aa 100644
--- a/vendor/github.com/moby/sys/mount/flags_freebsd.go
+++ b/vendor/github.com/moby/sys/mount/flags_bsd.go
@@ -1,28 +1,25 @@
-// +build freebsd,cgo
+// +build freebsd openbsd
package mount
-/*
-#include <sys/mount.h>
-*/
-import "C"
+import "golang.org/x/sys/unix"
const (
// RDONLY will mount the filesystem as read-only.
- RDONLY = C.MNT_RDONLY
+ RDONLY = unix.MNT_RDONLY
// NOSUID will not allow set-user-identifier or set-group-identifier bits to
// take effect.
- NOSUID = C.MNT_NOSUID
+ NOSUID = unix.MNT_NOSUID
// NOEXEC will not allow execution of any binaries on the mounted file system.
- NOEXEC = C.MNT_NOEXEC
+ NOEXEC = unix.MNT_NOEXEC
// SYNCHRONOUS will allow any I/O to the file system to be done synchronously.
- SYNCHRONOUS = C.MNT_SYNCHRONOUS
+ SYNCHRONOUS = unix.MNT_SYNCHRONOUS
// NOATIME will not update the file access time when reading from a file.
- NOATIME = C.MNT_NOATIME
+ NOATIME = unix.MNT_NOATIME
)
// These flags are unsupported.
diff --git a/vendor/github.com/moby/sys/mount/flags.go b/vendor/github.com/moby/sys/mount/flags_unix.go
index d514a9d8e..995d72807 100644
--- a/vendor/github.com/moby/sys/mount/flags.go
+++ b/vendor/github.com/moby/sys/mount/flags_unix.go
@@ -1,3 +1,5 @@
+// +build !darwin,!windows
+
package mount
import (
diff --git a/vendor/github.com/moby/sys/mount/flags_unsupported.go b/vendor/github.com/moby/sys/mount/flags_unsupported.go
deleted file mode 100644
index e1d64f6b9..000000000
--- a/vendor/github.com/moby/sys/mount/flags_unsupported.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// +build !linux,!freebsd freebsd,!cgo
-
-package mount
-
-// These flags are unsupported.
-const (
- BIND = 0
- DIRSYNC = 0
- MANDLOCK = 0
- NOATIME = 0
- NODEV = 0
- NODIRATIME = 0
- NOEXEC = 0
- NOSUID = 0
- UNBINDABLE = 0
- RUNBINDABLE = 0
- PRIVATE = 0
- RPRIVATE = 0
- SHARED = 0
- RSHARED = 0
- SLAVE = 0
- RSLAVE = 0
- RBIND = 0
- RELATIME = 0
- REMOUNT = 0
- STRICTATIME = 0
- SYNCHRONOUS = 0
- RDONLY = 0
- mntDetach = 0
-)
diff --git a/vendor/github.com/moby/sys/mount/go.mod b/vendor/github.com/moby/sys/mount/go.mod
index 21cef0a95..e1e03a376 100644
--- a/vendor/github.com/moby/sys/mount/go.mod
+++ b/vendor/github.com/moby/sys/mount/go.mod
@@ -3,6 +3,6 @@ module github.com/moby/sys/mount
go 1.14
require (
- github.com/moby/sys/mountinfo v0.1.0
- golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae
+ github.com/moby/sys/mountinfo v0.4.0
+ golang.org/x/sys v0.0.0-20200922070232-aee5d888a860
)
diff --git a/vendor/github.com/moby/sys/mount/go.sum b/vendor/github.com/moby/sys/mount/go.sum
index ae99f8596..7c39d597b 100644
--- a/vendor/github.com/moby/sys/mount/go.sum
+++ b/vendor/github.com/moby/sys/mount/go.sum
@@ -1,4 +1,5 @@
-github.com/moby/sys/mountinfo v0.1.0 h1:r8vMRbMAFEAfiNptYVokP+nfxPJzvRuia5e2vzXtENo=
-github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+github.com/moby/sys/mountinfo v0.4.0 h1:1KInV3Huv18akCu58V7lzNlt+jFmqlu1EaErnEHE/VM=
+github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
+golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200922070232-aee5d888a860 h1:YEu4SMq7D0cmT7CBbXfcH0NZeuChAXwsHe/9XueUO6o=
+golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
diff --git a/vendor/github.com/moby/sys/mount/mount.go b/vendor/github.com/moby/sys/mount/mount_unix.go
index 4a7bb27b1..a250bfc80 100644
--- a/vendor/github.com/moby/sys/mount/mount.go
+++ b/vendor/github.com/moby/sys/mount/mount_unix.go
@@ -1,4 +1,4 @@
-// +build go1.13
+// +build !darwin,!windows
package mount
@@ -7,6 +7,7 @@ import (
"sort"
"github.com/moby/sys/mountinfo"
+ "golang.org/x/sys/unix"
)
// Mount will mount filesystem according to the specified configuration.
@@ -18,9 +19,22 @@ func Mount(device, target, mType, options string) error {
}
// Unmount lazily unmounts a filesystem on supported platforms, otherwise does
-// a normal unmount. If target is not a mount point, no error is returned.
+// a normal unmount. If target is not a mount point, no error is returned.
func Unmount(target string) error {
- return unmount(target, mntDetach)
+ err := unix.Unmount(target, mntDetach)
+ if err == nil || err == unix.EINVAL {
+ // Ignore "not mounted" error here. Note the same error
+ // can be returned if flags are invalid, so this code
+ // assumes that the flags value is always correct.
+ return nil
+ }
+
+ return &mountError{
+ op: "umount",
+ target: target,
+ flags: uintptr(mntDetach),
+ err: err,
+ }
}
// RecursiveUnmount unmounts the target and all mounts underneath, starting
@@ -32,7 +46,7 @@ func RecursiveUnmount(target string) error {
// platforms, if there are submounts, we'll get EBUSY (and fall back
// to the slow path). NOTE we do not ignore EINVAL here as target might
// not be a mount point itself (but there can be mounts underneath).
- if err := unmountBare(target, mntDetach); err == nil {
+ if err := unix.Unmount(target, mntDetach); err == nil {
return nil
}
@@ -47,12 +61,18 @@ func RecursiveUnmount(target string) error {
return len(mounts[i].Mountpoint) > len(mounts[j].Mountpoint)
})
- var suberr error
+ var (
+ suberr error
+ lastMount = len(mounts) - 1
+ )
for i, m := range mounts {
- err = unmount(m.Mountpoint, mntDetach)
+ err = Unmount(m.Mountpoint)
if err != nil {
- if i == len(mounts)-1 { // last mount
- return fmt.Errorf("%w (possible cause: %s)", err, suberr)
+ if i == lastMount {
+ if suberr != nil {
+ return fmt.Errorf("%w (possible cause: %s)", err, suberr)
+ }
+ return err
}
// This is a submount, we can ignore the error for now,
// the final unmount will fail if this is a real problem.
diff --git a/vendor/github.com/moby/sys/mount/mounter_freebsd.go b/vendor/github.com/moby/sys/mount/mounter_bsd.go
index 3964af4f7..656b762fe 100644
--- a/vendor/github.com/moby/sys/mount/mounter_freebsd.go
+++ b/vendor/github.com/moby/sys/mount/mounter_bsd.go
@@ -1,3 +1,5 @@
+// +build freebsd,cgo openbsd,cgo
+
package mount
/*
diff --git a/vendor/github.com/moby/sys/mount/mounter_unsupported.go b/vendor/github.com/moby/sys/mount/mounter_unsupported.go
index 15380671c..e7ff5bd9f 100644
--- a/vendor/github.com/moby/sys/mount/mounter_unsupported.go
+++ b/vendor/github.com/moby/sys/mount/mounter_unsupported.go
@@ -1,7 +1,7 @@
-// +build !linux,!freebsd freebsd,!cgo
+// +build !linux,!freebsd,!openbsd,!windows freebsd,!cgo openbsd,!cgo
package mount
func mount(device, target, mType string, flag uintptr, data string) error {
- panic("Not implemented")
+ panic("cgo required on freebsd and openbsd")
}
diff --git a/vendor/github.com/moby/sys/mount/unmount_unix.go b/vendor/github.com/moby/sys/mount/unmount_unix.go
deleted file mode 100644
index 924d059a7..000000000
--- a/vendor/github.com/moby/sys/mount/unmount_unix.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// +build !windows
-
-package mount
-
-import "golang.org/x/sys/unix"
-
-func unmountBare(target string, flags int) error {
- return unix.Unmount(target, flags)
-}
-
-func unmount(target string, flags int) error {
- err := unmountBare(target, flags)
- if err == nil || err == unix.EINVAL {
- // Ignore "not mounted" error here. Note the same error
- // can be returned if flags are invalid, so this code
- // assumes that the flags value is always correct.
- return nil
- }
-
- return &mountError{
- op: "umount",
- target: target,
- flags: uintptr(flags),
- err: err,
- }
-}
diff --git a/vendor/github.com/moby/sys/mount/unmount_unsupported.go b/vendor/github.com/moby/sys/mount/unmount_unsupported.go
deleted file mode 100644
index 4d6073ec6..000000000
--- a/vendor/github.com/moby/sys/mount/unmount_unsupported.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build windows
-
-package mount
-
-func unmountBare(_ string, _ int) error {
- panic("Not implemented")
-}
-
-func unmount(_ string, _ int) error {
- panic("Not implemented")
-}
diff --git a/vendor/github.com/moby/term/windows/console.go b/vendor/github.com/moby/term/windows/console.go
index 01fdc0f2a..993694ddc 100644
--- a/vendor/github.com/moby/term/windows/console.go
+++ b/vendor/github.com/moby/term/windows/console.go
@@ -29,7 +29,7 @@ func GetHandleInfo(in interface{}) (uintptr, bool) {
// IsConsole returns true if the given file descriptor is a Windows Console.
// The code assumes that GetConsoleMode will return an error for file descriptors that are not a console.
-// Deprecated: use golang.org/x/sys/windows.GetConsoleMode() or golang.org/x/crypto/ssh/terminal.IsTerminal()
+// Deprecated: use golang.org/x/sys/windows.GetConsoleMode() or golang.org/x/term.IsTerminal()
var IsConsole = isConsole
func isConsole(fd uintptr) bool {
diff --git a/vendor/github.com/openshift/imagebuilder/builder.go b/vendor/github.com/openshift/imagebuilder/builder.go
index 22dc548b9..dd8b09c05 100644
--- a/vendor/github.com/openshift/imagebuilder/builder.go
+++ b/vendor/github.com/openshift/imagebuilder/builder.go
@@ -30,6 +30,7 @@ type Copy struct {
// If set, the owner:group for the destination. This value is passed
// to the executor for handling.
Chown string
+ Chmod string
}
// Run defines a run operation required in the container.
@@ -60,7 +61,7 @@ func (logExecutor) EnsureContainerPath(path string) error {
func (logExecutor) Copy(excludes []string, copies ...Copy) error {
for _, c := range copies {
- log.Printf("COPY %v -> %s (from:%s download:%t), chown: %s", c.Src, c.Dest, c.From, c.Download, c.Chown)
+ log.Printf("COPY %v -> %s (from:%s download:%t), chown: %s, chmod %s", c.Src, c.Dest, c.From, c.Download, c.Chown, c.Chmod)
}
return nil
}
@@ -562,24 +563,41 @@ var builtinAllowedBuildArgs = map[string]bool{
"no_proxy": true,
}
-// ParseDockerIgnore returns a list of the excludes in the .dockerignore file.
+// ParseIgnore returns a list of the excludes in the specified path
+// path should be a file with the .dockerignore format
// extracted from fsouza/go-dockerclient and modified to drop comments and
// empty lines.
-func ParseDockerignore(root string) ([]string, error) {
+func ParseIgnore(path string) ([]string, error) {
var excludes []string
- ignore, err := ioutil.ReadFile(filepath.Join(root, ".dockerignore"))
- if err != nil && !os.IsNotExist(err) {
- return excludes, fmt.Errorf("error reading .dockerignore: '%s'", err)
+
+ ignores, err := ioutil.ReadFile(path)
+ if err != nil {
+ return excludes, err
}
- for _, e := range strings.Split(string(ignore), "\n") {
- if len(e) == 0 || e[0] == '#' {
+ for _, ignore := range strings.Split(string(ignores), "\n") {
+ if len(ignore) == 0 || ignore[0] == '#' {
continue
}
- excludes = append(excludes, e)
+ ignore = strings.Trim(ignore, "/")
+ if len(ignore) > 0 {
+ excludes = append(excludes, ignore)
+ }
}
return excludes, nil
}
+// ParseDockerIgnore returns a list of the excludes in the .containerignore or .dockerignore file.
+func ParseDockerignore(root string) ([]string, error) {
+ excludes, err := ParseIgnore(filepath.Join(root, ".containerignore"))
+ if err != nil && os.IsNotExist(err) {
+ excludes, err = ParseIgnore(filepath.Join(root, ".dockerignore"))
+ }
+ if err != nil && os.IsNotExist(err) {
+ return excludes, nil
+ }
+ return excludes, err
+}
+
// ExportEnv creates an export statement for a shell that contains all of the
// provided environment.
func ExportEnv(env []string) string {
diff --git a/vendor/github.com/openshift/imagebuilder/dispatchers.go b/vendor/github.com/openshift/imagebuilder/dispatchers.go
index ea3df04d3..2294ae0a7 100644
--- a/vendor/github.com/openshift/imagebuilder/dispatchers.go
+++ b/vendor/github.com/openshift/imagebuilder/dispatchers.go
@@ -139,6 +139,7 @@ func add(b *Builder, args []string, attributes map[string]bool, flagArgs []strin
return errAtLeastOneArgument("ADD")
}
var chown string
+ var chmod string
last := len(args) - 1
dest := makeAbsolute(args[last], b.RunConfig.WorkingDir)
userArgs := mergeEnv(envMapAsSlice(b.Args), b.Env)
@@ -150,11 +151,17 @@ func add(b *Builder, args []string, attributes map[string]bool, flagArgs []strin
switch {
case strings.HasPrefix(arg, "--chown="):
chown = strings.TrimPrefix(arg, "--chown=")
+ case strings.HasPrefix(arg, "--chmod="):
+ chmod = strings.TrimPrefix(arg, "--chmod=")
+ err = checkChmodConversion(chmod)
+ if err != nil {
+ return err
+ }
default:
- return fmt.Errorf("ADD only supports the --chown=<uid:gid> flag")
+ return fmt.Errorf("ADD only supports the --chmod=<permissions> and the --chown=<uid:gid> flag")
}
}
- b.PendingCopies = append(b.PendingCopies, Copy{Src: args[0:last], Dest: dest, Download: true, Chown: chown})
+ b.PendingCopies = append(b.PendingCopies, Copy{Src: args[0:last], Dest: dest, Download: true, Chown: chown, Chmod: chmod})
return nil
}
@@ -169,6 +176,7 @@ func dispatchCopy(b *Builder, args []string, attributes map[string]bool, flagArg
last := len(args) - 1
dest := makeAbsolute(args[last], b.RunConfig.WorkingDir)
var chown string
+ var chmod string
var from string
userArgs := mergeEnv(envMapAsSlice(b.Args), b.Env)
for _, a := range flagArgs {
@@ -179,13 +187,19 @@ func dispatchCopy(b *Builder, args []string, attributes map[string]bool, flagArg
switch {
case strings.HasPrefix(arg, "--chown="):
chown = strings.TrimPrefix(arg, "--chown=")
+ case strings.HasPrefix(arg, "--chmod="):
+ chmod = strings.TrimPrefix(arg, "--chmod=")
+ err = checkChmodConversion(chmod)
+ if err != nil {
+ return err
+ }
case strings.HasPrefix(arg, "--from="):
from = strings.TrimPrefix(arg, "--from=")
default:
- return fmt.Errorf("COPY only supports the --chown=<uid:gid> and the --from=<image|stage> flags")
+ return fmt.Errorf("COPY only supports the --chmod=<permissions> --chown=<uid:gid> and the --from=<image|stage> flags")
}
}
- b.PendingCopies = append(b.PendingCopies, Copy{From: from, Src: args[0:last], Dest: dest, Download: false, Chown: chown})
+ b.PendingCopies = append(b.PendingCopies, Copy{From: from, Src: args[0:last], Dest: dest, Download: false, Chown: chown, Chmod: chmod})
return nil
}
@@ -624,6 +638,14 @@ func shell(b *Builder, args []string, attributes map[string]bool, flagArgs []str
return nil
}
+func checkChmodConversion(chmod string) error {
+ _, err := strconv.ParseUint(chmod, 8, 32)
+ if err != nil {
+ return fmt.Errorf("Error parsing chmod %s", chmod)
+ }
+ return nil
+}
+
func errAtLeastOneArgument(command string) error {
return fmt.Errorf("%s requires at least one argument", command)
}
diff --git a/vendor/github.com/openshift/imagebuilder/imagebuilder.spec b/vendor/github.com/openshift/imagebuilder/imagebuilder.spec
index 89951fcec..684946ece 100644
--- a/vendor/github.com/openshift/imagebuilder/imagebuilder.spec
+++ b/vendor/github.com/openshift/imagebuilder/imagebuilder.spec
@@ -12,7 +12,7 @@
#
%global golang_version 1.8.1
-%{!?version: %global version 1.1.8}
+%{!?version: %global version 1.2.0}
%{!?release: %global release 1}
%global package_name imagebuilder
%global product_name Container Image Builder
diff --git a/vendor/github.com/prometheus/procfs/Makefile.common b/vendor/github.com/prometheus/procfs/Makefile.common
index 9320176ca..3ac29c636 100644
--- a/vendor/github.com/prometheus/procfs/Makefile.common
+++ b/vendor/github.com/prometheus/procfs/Makefile.common
@@ -78,7 +78,7 @@ ifneq ($(shell which gotestsum),)
endif
endif
-PROMU_VERSION ?= 0.5.0
+PROMU_VERSION ?= 0.7.0
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
GOLANGCI_LINT :=
@@ -245,10 +245,12 @@ common-docker-publish: $(PUBLISH_DOCKER_ARCHS)
$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%:
docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)"
+DOCKER_MAJOR_VERSION_TAG = $(firstword $(subst ., ,$(shell cat VERSION)))
.PHONY: common-docker-tag-latest $(TAG_DOCKER_ARCHS)
common-docker-tag-latest: $(TAG_DOCKER_ARCHS)
$(TAG_DOCKER_ARCHS): common-docker-tag-latest-%:
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest"
+ docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"
.PHONY: common-docker-manifest
common-docker-manifest:
diff --git a/vendor/github.com/prometheus/procfs/SECURITY.md b/vendor/github.com/prometheus/procfs/SECURITY.md
new file mode 100644
index 000000000..67741f015
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/SECURITY.md
@@ -0,0 +1,6 @@
+# Reporting a security issue
+
+The Prometheus security policy, including how to report vulnerabilities, can be
+found here:
+
+https://prometheus.io/docs/operating/security/
diff --git a/vendor/github.com/prometheus/procfs/arp.go b/vendor/github.com/prometheus/procfs/arp.go
index 916c9182a..4e47e6172 100644
--- a/vendor/github.com/prometheus/procfs/arp.go
+++ b/vendor/github.com/prometheus/procfs/arp.go
@@ -36,7 +36,7 @@ type ARPEntry struct {
func (fs FS) GatherARPEntries() ([]ARPEntry, error) {
data, err := ioutil.ReadFile(fs.proc.Path("net/arp"))
if err != nil {
- return nil, fmt.Errorf("error reading arp %s: %s", fs.proc.Path("net/arp"), err)
+ return nil, fmt.Errorf("error reading arp %q: %w", fs.proc.Path("net/arp"), err)
}
return parseARPEntries(data)
@@ -59,7 +59,7 @@ func parseARPEntries(data []byte) ([]ARPEntry, error) {
} else if width == expectedDataWidth {
entry, err := parseARPEntry(columns)
if err != nil {
- return []ARPEntry{}, fmt.Errorf("failed to parse ARP entry: %s", err)
+ return []ARPEntry{}, fmt.Errorf("failed to parse ARP entry: %w", err)
}
entries = append(entries, entry)
} else {
diff --git a/vendor/github.com/prometheus/procfs/buddyinfo.go b/vendor/github.com/prometheus/procfs/buddyinfo.go
index 10bd067a0..f5b7939b2 100644
--- a/vendor/github.com/prometheus/procfs/buddyinfo.go
+++ b/vendor/github.com/prometheus/procfs/buddyinfo.go
@@ -74,7 +74,7 @@ func parseBuddyInfo(r io.Reader) ([]BuddyInfo, error) {
for i := 0; i < arraySize; i++ {
sizes[i], err = strconv.ParseFloat(parts[i+4], 64)
if err != nil {
- return nil, fmt.Errorf("invalid value in buddyinfo: %s", err)
+ return nil, fmt.Errorf("invalid value in buddyinfo: %w", err)
}
}
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo.go b/vendor/github.com/prometheus/procfs/cpuinfo.go
index b9fb589aa..5623b24a1 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo.go
@@ -19,6 +19,7 @@ import (
"bufio"
"bytes"
"errors"
+ "fmt"
"regexp"
"strconv"
"strings"
@@ -77,7 +78,7 @@ func parseCPUInfoX86(info []byte) ([]CPUInfo, error) {
// find the first "processor" line
firstLine := firstNonEmptyLine(scanner)
if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") {
- return nil, errors.New("invalid cpuinfo file: " + firstLine)
+ return nil, fmt.Errorf("invalid cpuinfo file: %q", firstLine)
}
field := strings.SplitN(firstLine, ": ", 2)
v, err := strconv.ParseUint(field[1], 0, 32)
@@ -192,7 +193,7 @@ func parseCPUInfoARM(info []byte) ([]CPUInfo, error) {
firstLine := firstNonEmptyLine(scanner)
match, _ := regexp.MatchString("^[Pp]rocessor", firstLine)
if !match || !strings.Contains(firstLine, ":") {
- return nil, errors.New("invalid cpuinfo file: " + firstLine)
+ return nil, fmt.Errorf("invalid cpuinfo file: %q", firstLine)
}
field := strings.SplitN(firstLine, ": ", 2)
cpuinfo := []CPUInfo{}
@@ -256,7 +257,7 @@ func parseCPUInfoS390X(info []byte) ([]CPUInfo, error) {
firstLine := firstNonEmptyLine(scanner)
if !strings.HasPrefix(firstLine, "vendor_id") || !strings.Contains(firstLine, ":") {
- return nil, errors.New("invalid cpuinfo file: " + firstLine)
+ return nil, fmt.Errorf("invalid cpuinfo file: %q", firstLine)
}
field := strings.SplitN(firstLine, ": ", 2)
cpuinfo := []CPUInfo{}
@@ -281,7 +282,7 @@ func parseCPUInfoS390X(info []byte) ([]CPUInfo, error) {
if strings.HasPrefix(line, "processor") {
match := cpuinfoS390XProcessorRegexp.FindStringSubmatch(line)
if len(match) < 2 {
- return nil, errors.New("Invalid line found in cpuinfo: " + line)
+ return nil, fmt.Errorf("invalid cpuinfo file: %q", firstLine)
}
cpu := commonCPUInfo
v, err := strconv.ParseUint(match[1], 0, 32)
@@ -313,6 +314,22 @@ func parseCPUInfoS390X(info []byte) ([]CPUInfo, error) {
return nil, err
}
cpuinfo[i].CPUMHz = v
+ case "physical id":
+ cpuinfo[i].PhysicalID = field[1]
+ case "core id":
+ cpuinfo[i].CoreID = field[1]
+ case "cpu cores":
+ v, err := strconv.ParseUint(field[1], 0, 32)
+ if err != nil {
+ return nil, err
+ }
+ cpuinfo[i].CPUCores = uint(v)
+ case "siblings":
+ v, err := strconv.ParseUint(field[1], 0, 32)
+ if err != nil {
+ return nil, err
+ }
+ cpuinfo[i].Siblings = uint(v)
}
}
@@ -325,7 +342,7 @@ func parseCPUInfoMips(info []byte) ([]CPUInfo, error) {
// find the first "processor" line
firstLine := firstNonEmptyLine(scanner)
if !strings.HasPrefix(firstLine, "system type") || !strings.Contains(firstLine, ":") {
- return nil, errors.New("invalid cpuinfo file: " + firstLine)
+ return nil, fmt.Errorf("invalid cpuinfo file: %q", firstLine)
}
field := strings.SplitN(firstLine, ": ", 2)
cpuinfo := []CPUInfo{}
@@ -367,7 +384,7 @@ func parseCPUInfoPPC(info []byte) ([]CPUInfo, error) {
firstLine := firstNonEmptyLine(scanner)
if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") {
- return nil, errors.New("invalid cpuinfo file: " + firstLine)
+ return nil, fmt.Errorf("invalid cpuinfo file: %q", firstLine)
}
field := strings.SplitN(firstLine, ": ", 2)
v, err := strconv.ParseUint(field[1], 0, 32)
@@ -412,7 +429,7 @@ func parseCPUInfoRISCV(info []byte) ([]CPUInfo, error) {
firstLine := firstNonEmptyLine(scanner)
if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") {
- return nil, errors.New("invalid cpuinfo file: " + firstLine)
+ return nil, fmt.Errorf("invalid cpuinfo file: %q", firstLine)
}
field := strings.SplitN(firstLine, ": ", 2)
v, err := strconv.ParseUint(field[1], 0, 32)
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go b/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go
new file mode 100644
index 000000000..e83c2e207
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go
@@ -0,0 +1,19 @@
+// Copyright 2020 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build linux
+// +build riscv riscv64
+
+package procfs
+
+var parseCPUInfo = parseCPUInfoRISCV
diff --git a/vendor/github.com/prometheus/procfs/crypto.go b/vendor/github.com/prometheus/procfs/crypto.go
index a95893375..5048ad1f2 100644
--- a/vendor/github.com/prometheus/procfs/crypto.go
+++ b/vendor/github.com/prometheus/procfs/crypto.go
@@ -55,12 +55,12 @@ func (fs FS) Crypto() ([]Crypto, error) {
path := fs.proc.Path("crypto")
b, err := util.ReadFileNoStat(path)
if err != nil {
- return nil, fmt.Errorf("error reading crypto %s: %s", path, err)
+ return nil, fmt.Errorf("error reading crypto %q: %w", path, err)
}
crypto, err := parseCrypto(bytes.NewReader(b))
if err != nil {
- return nil, fmt.Errorf("error parsing crypto %s: %s", path, err)
+ return nil, fmt.Errorf("error parsing crypto %q: %w", path, err)
}
return crypto, nil
diff --git a/vendor/github.com/prometheus/procfs/fixtures.ttar b/vendor/github.com/prometheus/procfs/fixtures.ttar
index 12494d742..1e76173da 100644
--- a/vendor/github.com/prometheus/procfs/fixtures.ttar
+++ b/vendor/github.com/prometheus/procfs/fixtures.ttar
@@ -111,7 +111,7 @@ Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 62898 62898 processes
Max open files 2048 4096 files
-Max locked memory 65536 65536 bytes
+Max locked memory 18446744073708503040 18446744073708503040 bytes
Max address space 8589934592 unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 62898 62898 signals
@@ -1080,7 +1080,6 @@ internal : yes
type : skcipher
async : yes
blocksize : 1
-min keysize : 16
max keysize : 32
ivsize : 16
chunksize : 16
@@ -1839,6 +1838,7 @@ min keysize : 16
max keysize : 32
Mode: 444
+Mode: 644
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Path: fixtures/proc/diskstats
Lines: 52
@@ -2129,6 +2129,24 @@ Lines: 6
4 1FB3C 0 1282A8F 0
Mode: 644
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/proc/net/protocols
+Lines: 14
+protocol size sockets memory press maxhdr slab module cl co di ac io in de sh ss gs se re sp bi br ha uh gp em
+PACKET 1344 2 -1 NI 0 no kernel n n n n n n n n n n n n n n n n n n n
+PINGv6 1112 0 -1 NI 0 yes kernel y y y n n y n n y y y y n y y y y y n
+RAWv6 1112 1 -1 NI 0 yes kernel y y y n y y y n y y y y n y y y y n n
+UDPLITEv6 1216 0 57 NI 0 yes kernel y y y n y y y n y y y y n n n y y y n
+UDPv6 1216 10 57 NI 0 yes kernel y y y n y y y n y y y y n n n y y y n
+TCPv6 2144 1937 1225378 no 320 yes kernel y y y y y y y y y y y y y n y y y y y
+UNIX 1024 120 -1 NI 0 yes kernel n n n n n n n n n n n n n n n n n n n
+UDP-Lite 1024 0 57 NI 0 yes kernel y y y n y y y n y y y y y n n y y y n
+PING 904 0 -1 NI 0 yes kernel y y y n n y n n y y y y n y y y y y n
+RAW 912 0 -1 NI 0 yes kernel y y y n y y y n y y y y n y y y y n n
+UDP 1024 73 57 NI 0 yes kernel y y y n y y y n y y y y y n n y y y n
+TCP 1984 93064 1225378 yes 320 yes kernel y y y y y y y y y y y y y n y y y y y
+NETLINK 1040 16 -1 NI 0 no kernel n n n n n n n n n n n n n n n n n n n
+Mode: 444
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Directory: fixtures/proc/net/rpc
Mode: 755
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -2186,10 +2204,25 @@ Lines: 1
00015c73 00020e76 F0000769 00000000
Mode: 644
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/proc/net/tcp
+Lines: 4
+ sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode
+ 0: 0500000A:0016 00000000:0000 0A 00000000:00000001 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0
+ 1: 00000000:0016 00000000:0000 0A 00000001:00000000 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0
+ 2: 00000000:0016 00000000:0000 0A 00000001:00000001 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/proc/net/tcp6
+Lines: 3
+ sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops
+ 1315: 00000000000000000000000000000000:14EB 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 981 0 21040 2 0000000013726323 0
+ 6073: 000080FE00000000FFADE15609667CFE:C781 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 1000 0 11337031 2 00000000b9256fdd 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Path: fixtures/proc/net/udp
Lines: 4
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode
- 0: 0A000005:0016 00000000:0000 0A 00000000:00000001 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0
+ 0: 0500000A:0016 00000000:0000 0A 00000000:00000001 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0
1: 00000000:0016 00000000:0000 0A 00000001:00000000 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0
2: 00000000:0016 00000000:0000 0A 00000001:00000001 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0
Mode: 644
@@ -2292,6 +2325,312 @@ Mode: 644
Path: fixtures/proc/self
SymlinkTo: 26231
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/proc/slabinfo
+Lines: 302
+slabinfo - version: 2.1
+# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>
+pid_3 375 532 576 28 4 : tunables 0 0 0 : slabdata 19 19 0
+pid_2 3 28 576 28 4 : tunables 0 0 0 : slabdata 1 1 0
+nvidia_p2p_page_cache 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+nvidia_pte_cache 9022 9152 368 22 2 : tunables 0 0 0 : slabdata 416 416 0
+nvidia_stack_cache 321 326 12624 2 8 : tunables 0 0 0 : slabdata 163 163 0
+kvm_async_pf 0 0 472 34 4 : tunables 0 0 0 : slabdata 0 0 0
+kvm_vcpu 0 0 15552 2 8 : tunables 0 0 0 : slabdata 0 0 0
+kvm_mmu_page_header 0 0 504 32 4 : tunables 0 0 0 : slabdata 0 0 0
+pte_list_desc 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+x86_emulator 0 0 3024 10 8 : tunables 0 0 0 : slabdata 0 0 0
+x86_fpu 0 0 4608 7 8 : tunables 0 0 0 : slabdata 0 0 0
+iwl_cmd_pool:0000:04:00.0 0 128 512 32 4 : tunables 0 0 0 : slabdata 4 4 0
+ext4_groupinfo_4k 3719 3740 480 34 4 : tunables 0 0 0 : slabdata 110 110 0
+bio-6 32 75 640 25 4 : tunables 0 0 0 : slabdata 3 3 0
+bio-5 16 48 1344 24 8 : tunables 0 0 0 : slabdata 2 2 0
+bio-4 17 92 1408 23 8 : tunables 0 0 0 : slabdata 4 4 0
+fat_inode_cache 0 0 1056 31 8 : tunables 0 0 0 : slabdata 0 0 0
+fat_cache 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+ovl_aio_req 0 0 512 32 4 : tunables 0 0 0 : slabdata 0 0 0
+ovl_inode 0 0 1000 32 8 : tunables 0 0 0 : slabdata 0 0 0
+squashfs_inode_cache 0 0 1088 30 8 : tunables 0 0 0 : slabdata 0 0 0
+fuse_request 0 0 472 34 4 : tunables 0 0 0 : slabdata 0 0 0
+fuse_inode 0 0 1152 28 8 : tunables 0 0 0 : slabdata 0 0 0
+xfs_dqtrx 0 0 864 37 8 : tunables 0 0 0 : slabdata 0 0 0
+xfs_dquot 0 0 832 39 8 : tunables 0 0 0 : slabdata 0 0 0
+xfs_buf 0 0 768 21 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_bui_item 0 0 544 30 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_bud_item 0 0 512 32 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_cui_item 0 0 768 21 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_cud_item 0 0 512 32 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_rui_item 0 0 1024 32 8 : tunables 0 0 0 : slabdata 0 0 0
+xfs_rud_item 0 0 512 32 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_icr 0 0 520 31 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_ili 0 0 528 31 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_inode 0 0 1344 24 8 : tunables 0 0 0 : slabdata 0 0 0
+xfs_efi_item 0 0 768 21 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_efd_item 0 0 776 21 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_buf_item 0 0 608 26 4 : tunables 0 0 0 : slabdata 0 0 0
+xf_trans 0 0 568 28 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_ifork 0 0 376 21 2 : tunables 0 0 0 : slabdata 0 0 0
+xfs_da_state 0 0 816 20 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_btree_cur 0 0 560 29 4 : tunables 0 0 0 : slabdata 0 0 0
+xfs_bmap_free_item 0 0 400 20 2 : tunables 0 0 0 : slabdata 0 0 0
+xfs_log_ticket 0 0 520 31 4 : tunables 0 0 0 : slabdata 0 0 0
+nfs_direct_cache 0 0 560 29 4 : tunables 0 0 0 : slabdata 0 0 0
+nfs_commit_data 4 28 1152 28 8 : tunables 0 0 0 : slabdata 1 1 0
+nfs_write_data 32 50 1280 25 8 : tunables 0 0 0 : slabdata 2 2 0
+nfs_read_data 0 0 1280 25 8 : tunables 0 0 0 : slabdata 0 0 0
+nfs_inode_cache 0 0 1408 23 8 : tunables 0 0 0 : slabdata 0 0 0
+nfs_page 0 0 512 32 4 : tunables 0 0 0 : slabdata 0 0 0
+rpc_inode_cache 0 0 1024 32 8 : tunables 0 0 0 : slabdata 0 0 0
+rpc_buffers 8 13 2496 13 8 : tunables 0 0 0 : slabdata 1 1 0
+rpc_tasks 8 25 640 25 4 : tunables 0 0 0 : slabdata 1 1 0
+fscache_cookie_jar 1 35 464 35 4 : tunables 0 0 0 : slabdata 1 1 0
+jfs_mp 32 35 464 35 4 : tunables 0 0 0 : slabdata 1 1 0
+jfs_ip 0 0 1592 20 8 : tunables 0 0 0 : slabdata 0 0 0
+reiser_inode_cache 0 0 1096 29 8 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_end_io_wq 0 0 464 35 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_prelim_ref 0 0 424 38 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_delayed_extent_op 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_delayed_data_ref 0 0 448 36 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_delayed_tree_ref 0 0 440 37 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_delayed_ref_head 0 0 480 34 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_inode_defrag 0 0 400 20 2 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_delayed_node 0 0 648 25 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_ordered_extent 0 0 752 21 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_extent_map 0 0 480 34 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_extent_state 0 0 416 39 4 : tunables 0 0 0 : slabdata 0 0 0
+bio-3 35 92 704 23 4 : tunables 0 0 0 : slabdata 4 4 0
+btrfs_extent_buffer 0 0 600 27 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_free_space_bitmap 0 0 12288 2 8 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_free_space 0 0 416 39 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_path 0 0 448 36 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_trans_handle 0 0 440 37 4 : tunables 0 0 0 : slabdata 0 0 0
+btrfs_inode 0 0 1496 21 8 : tunables 0 0 0 : slabdata 0 0 0
+ext4_inode_cache 84136 84755 1400 23 8 : tunables 0 0 0 : slabdata 3685 3685 0
+ext4_free_data 22 80 392 20 2 : tunables 0 0 0 : slabdata 4 4 0
+ext4_allocation_context 0 70 464 35 4 : tunables 0 0 0 : slabdata 2 2 0
+ext4_prealloc_space 24 74 440 37 4 : tunables 0 0 0 : slabdata 2 2 0
+ext4_system_zone 267 273 376 21 2 : tunables 0 0 0 : slabdata 13 13 0
+ext4_io_end_vec 0 88 368 22 2 : tunables 0 0 0 : slabdata 4 4 0
+ext4_io_end 0 80 400 20 2 : tunables 0 0 0 : slabdata 4 4 0
+ext4_bio_post_read_ctx 128 147 384 21 2 : tunables 0 0 0 : slabdata 7 7 0
+ext4_pending_reservation 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+ext4_extent_status 79351 79422 376 21 2 : tunables 0 0 0 : slabdata 3782 3782 0
+jbd2_transaction_s 44 100 640 25 4 : tunables 0 0 0 : slabdata 4 4 0
+jbd2_inode 6785 6840 400 20 2 : tunables 0 0 0 : slabdata 342 342 0
+jbd2_journal_handle 0 80 392 20 2 : tunables 0 0 0 : slabdata 4 4 0
+jbd2_journal_head 824 1944 448 36 4 : tunables 0 0 0 : slabdata 54 54 0
+jbd2_revoke_table_s 4 23 352 23 2 : tunables 0 0 0 : slabdata 1 1 0
+jbd2_revoke_record_s 0 156 416 39 4 : tunables 0 0 0 : slabdata 4 4 0
+ext2_inode_cache 0 0 1144 28 8 : tunables 0 0 0 : slabdata 0 0 0
+mbcache 0 0 392 20 2 : tunables 0 0 0 : slabdata 0 0 0
+dm_thin_new_mapping 0 152 424 38 4 : tunables 0 0 0 : slabdata 4 4 0
+dm_snap_pending_exception 0 0 464 35 4 : tunables 0 0 0 : slabdata 0 0 0
+dm_exception 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+dm_dirty_log_flush_entry 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+dm_bio_prison_cell_v2 0 0 432 37 4 : tunables 0 0 0 : slabdata 0 0 0
+dm_bio_prison_cell 0 148 432 37 4 : tunables 0 0 0 : slabdata 4 4 0
+kcopyd_job 0 8 3648 8 8 : tunables 0 0 0 : slabdata 1 1 0
+io 0 32 512 32 4 : tunables 0 0 0 : slabdata 1 1 0
+dm_uevent 0 0 3224 10 8 : tunables 0 0 0 : slabdata 0 0 0
+dax_cache 1 28 1152 28 8 : tunables 0 0 0 : slabdata 1 1 0
+aic94xx_ascb 0 0 576 28 4 : tunables 0 0 0 : slabdata 0 0 0
+aic94xx_dma_token 0 0 384 21 2 : tunables 0 0 0 : slabdata 0 0 0
+asd_sas_event 0 0 512 32 4 : tunables 0 0 0 : slabdata 0 0 0
+sas_task 0 0 704 23 4 : tunables 0 0 0 : slabdata 0 0 0
+qla2xxx_srbs 0 0 832 39 8 : tunables 0 0 0 : slabdata 0 0 0
+sd_ext_cdb 2 22 368 22 2 : tunables 0 0 0 : slabdata 1 1 0
+scsi_sense_cache 258 288 512 32 4 : tunables 0 0 0 : slabdata 9 9 0
+virtio_scsi_cmd 64 75 640 25 4 : tunables 0 0 0 : slabdata 3 3 0
+L2TP/IPv6 0 0 1536 21 8 : tunables 0 0 0 : slabdata 0 0 0
+L2TP/IP 0 0 1408 23 8 : tunables 0 0 0 : slabdata 0 0 0
+ip6-frags 0 0 520 31 4 : tunables 0 0 0 : slabdata 0 0 0
+fib6_nodes 5 32 512 32 4 : tunables 0 0 0 : slabdata 1 1 0
+ip6_dst_cache 4 25 640 25 4 : tunables 0 0 0 : slabdata 1 1 0
+ip6_mrt_cache 0 0 576 28 4 : tunables 0 0 0 : slabdata 0 0 0
+PINGv6 0 0 1600 20 8 : tunables 0 0 0 : slabdata 0 0 0
+RAWv6 25 40 1600 20 8 : tunables 0 0 0 : slabdata 2 2 0
+UDPLITEv6 0 0 1728 18 8 : tunables 0 0 0 : slabdata 0 0 0
+UDPv6 3 54 1728 18 8 : tunables 0 0 0 : slabdata 3 3 0
+tw_sock_TCPv6 0 0 576 28 4 : tunables 0 0 0 : slabdata 0 0 0
+request_sock_TCPv6 0 0 632 25 4 : tunables 0 0 0 : slabdata 0 0 0
+TCPv6 0 33 2752 11 8 : tunables 0 0 0 : slabdata 3 3 0
+uhci_urb_priv 0 0 392 20 2 : tunables 0 0 0 : slabdata 0 0 0
+sgpool-128 2 14 4544 7 8 : tunables 0 0 0 : slabdata 2 2 0
+sgpool-64 2 13 2496 13 8 : tunables 0 0 0 : slabdata 1 1 0
+sgpool-32 2 44 1472 22 8 : tunables 0 0 0 : slabdata 2 2 0
+sgpool-16 2 68 960 34 8 : tunables 0 0 0 : slabdata 2 2 0
+sgpool-8 2 46 704 23 4 : tunables 0 0 0 : slabdata 2 2 0
+btree_node 0 0 576 28 4 : tunables 0 0 0 : slabdata 0 0 0
+bfq_io_cq 0 0 488 33 4 : tunables 0 0 0 : slabdata 0 0 0
+bfq_queue 0 0 848 38 8 : tunables 0 0 0 : slabdata 0 0 0
+mqueue_inode_cache 1 24 1344 24 8 : tunables 0 0 0 : slabdata 1 1 0
+isofs_inode_cache 0 0 968 33 8 : tunables 0 0 0 : slabdata 0 0 0
+io_kiocb 0 0 640 25 4 : tunables 0 0 0 : slabdata 0 0 0
+kioctx 0 30 1088 30 8 : tunables 0 0 0 : slabdata 1 1 0
+aio_kiocb 0 28 576 28 4 : tunables 0 0 0 : slabdata 1 1 0
+userfaultfd_ctx_cache 0 0 576 28 4 : tunables 0 0 0 : slabdata 0 0 0
+fanotify_path_event 0 0 392 20 2 : tunables 0 0 0 : slabdata 0 0 0
+fanotify_fid_event 0 0 400 20 2 : tunables 0 0 0 : slabdata 0 0 0
+fsnotify_mark 0 0 408 20 2 : tunables 0 0 0 : slabdata 0 0 0
+dnotify_mark 0 0 416 39 4 : tunables 0 0 0 : slabdata 0 0 0
+dnotify_struct 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+dio 0 0 1088 30 8 : tunables 0 0 0 : slabdata 0 0 0
+bio-2 4 25 640 25 4 : tunables 0 0 0 : slabdata 1 1 0
+fasync_cache 0 0 384 21 2 : tunables 0 0 0 : slabdata 0 0 0
+audit_tree_mark 0 0 416 39 4 : tunables 0 0 0 : slabdata 0 0 0
+pid_namespace 30 34 480 34 4 : tunables 0 0 0 : slabdata 1 1 0
+posix_timers_cache 0 27 592 27 4 : tunables 0 0 0 : slabdata 1 1 0
+iommu_devinfo 24 32 512 32 4 : tunables 0 0 0 : slabdata 1 1 0
+iommu_domain 10 10 3264 10 8 : tunables 0 0 0 : slabdata 1 1 0
+iommu_iova 8682 8748 448 36 4 : tunables 0 0 0 : slabdata 243 243 0
+UNIX 529 814 1472 22 8 : tunables 0 0 0 : slabdata 37 37 0
+ip4-frags 0 0 536 30 4 : tunables 0 0 0 : slabdata 0 0 0
+ip_mrt_cache 0 0 576 28 4 : tunables 0 0 0 : slabdata 0 0 0
+UDP-Lite 0 0 1536 21 8 : tunables 0 0 0 : slabdata 0 0 0
+tcp_bind_bucket 7 128 512 32 4 : tunables 0 0 0 : slabdata 4 4 0
+inet_peer_cache 0 0 576 28 4 : tunables 0 0 0 : slabdata 0 0 0
+xfrm_dst_cache 0 0 704 23 4 : tunables 0 0 0 : slabdata 0 0 0
+xfrm_state 0 0 1152 28 8 : tunables 0 0 0 : slabdata 0 0 0
+ip_fib_trie 7 21 384 21 2 : tunables 0 0 0 : slabdata 1 1 0
+ip_fib_alias 9 20 392 20 2 : tunables 0 0 0 : slabdata 1 1 0
+ip_dst_cache 27 84 576 28 4 : tunables 0 0 0 : slabdata 3 3 0
+PING 0 0 1408 23 8 : tunables 0 0 0 : slabdata 0 0 0
+RAW 32 46 1408 23 8 : tunables 0 0 0 : slabdata 2 2 0
+UDP 11 168 1536 21 8 : tunables 0 0 0 : slabdata 8 8 0
+tw_sock_TCP 1 56 576 28 4 : tunables 0 0 0 : slabdata 2 2 0
+request_sock_TCP 0 25 632 25 4 : tunables 0 0 0 : slabdata 1 1 0
+TCP 10 60 2624 12 8 : tunables 0 0 0 : slabdata 5 5 0
+hugetlbfs_inode_cache 2 35 928 35 8 : tunables 0 0 0 : slabdata 1 1 0
+dquot 0 0 640 25 4 : tunables 0 0 0 : slabdata 0 0 0
+bio-1 32 46 704 23 4 : tunables 0 0 0 : slabdata 2 2 0
+eventpoll_pwq 409 600 408 20 2 : tunables 0 0 0 : slabdata 30 30 0
+eventpoll_epi 408 672 576 28 4 : tunables 0 0 0 : slabdata 24 24 0
+inotify_inode_mark 58 195 416 39 4 : tunables 0 0 0 : slabdata 5 5 0
+scsi_data_buffer 0 0 360 22 2 : tunables 0 0 0 : slabdata 0 0 0
+bio_crypt_ctx 128 147 376 21 2 : tunables 0 0 0 : slabdata 7 7 0
+request_queue 29 39 2408 13 8 : tunables 0 0 0 : slabdata 3 3 0
+blkdev_ioc 81 148 440 37 4 : tunables 0 0 0 : slabdata 4 4 0
+bio-0 125 200 640 25 4 : tunables 0 0 0 : slabdata 8 8 0
+biovec-max 166 196 4544 7 8 : tunables 0 0 0 : slabdata 28 28 0
+biovec-128 0 52 2496 13 8 : tunables 0 0 0 : slabdata 4 4 0
+biovec-64 0 88 1472 22 8 : tunables 0 0 0 : slabdata 4 4 0
+biovec-16 0 92 704 23 4 : tunables 0 0 0 : slabdata 4 4 0
+bio_integrity_payload 4 28 576 28 4 : tunables 0 0 0 : slabdata 1 1 0
+khugepaged_mm_slot 59 180 448 36 4 : tunables 0 0 0 : slabdata 5 5 0
+ksm_mm_slot 0 0 384 21 2 : tunables 0 0 0 : slabdata 0 0 0
+ksm_stable_node 0 0 400 20 2 : tunables 0 0 0 : slabdata 0 0 0
+ksm_rmap_item 0 0 400 20 2 : tunables 0 0 0 : slabdata 0 0 0
+user_namespace 2 37 864 37 8 : tunables 0 0 0 : slabdata 1 1 0
+uid_cache 5 28 576 28 4 : tunables 0 0 0 : slabdata 1 1 0
+dmaengine-unmap-256 1 13 2496 13 8 : tunables 0 0 0 : slabdata 1 1 0
+dmaengine-unmap-128 1 22 1472 22 8 : tunables 0 0 0 : slabdata 1 1 0
+dmaengine-unmap-16 1 28 576 28 4 : tunables 0 0 0 : slabdata 1 1 0
+dmaengine-unmap-2 1 36 448 36 4 : tunables 0 0 0 : slabdata 1 1 0
+audit_buffer 0 22 360 22 2 : tunables 0 0 0 : slabdata 1 1 0
+sock_inode_cache 663 1170 1216 26 8 : tunables 0 0 0 : slabdata 45 45 0
+skbuff_ext_cache 0 0 576 28 4 : tunables 0 0 0 : slabdata 0 0 0
+skbuff_fclone_cache 1 72 896 36 8 : tunables 0 0 0 : slabdata 2 2 0
+skbuff_head_cache 3 650 640 25 4 : tunables 0 0 0 : slabdata 26 26 0
+configfs_dir_cache 7 38 424 38 4 : tunables 0 0 0 : slabdata 1 1 0
+file_lock_cache 27 116 552 29 4 : tunables 0 0 0 : slabdata 4 4 0
+file_lock_ctx 106 120 392 20 2 : tunables 0 0 0 : slabdata 6 6 0
+fsnotify_mark_connector 52 66 368 22 2 : tunables 0 0 0 : slabdata 3 3 0
+net_namespace 1 6 5312 6 8 : tunables 0 0 0 : slabdata 1 1 0
+task_delay_info 784 1560 416 39 4 : tunables 0 0 0 : slabdata 40 40 0
+taskstats 45 92 688 23 4 : tunables 0 0 0 : slabdata 4 4 0
+proc_dir_entry 678 682 528 31 4 : tunables 0 0 0 : slabdata 22 22 0
+pde_opener 0 189 376 21 2 : tunables 0 0 0 : slabdata 9 9 0
+proc_inode_cache 7150 8250 992 33 8 : tunables 0 0 0 : slabdata 250 250 0
+seq_file 60 735 456 35 4 : tunables 0 0 0 : slabdata 21 21 0
+sigqueue 0 156 416 39 4 : tunables 0 0 0 : slabdata 4 4 0
+bdev_cache 36 78 1216 26 8 : tunables 0 0 0 : slabdata 3 3 0
+shmem_inode_cache 1599 2208 1016 32 8 : tunables 0 0 0 : slabdata 69 69 0
+kernfs_iattrs_cache 1251 1254 424 38 4 : tunables 0 0 0 : slabdata 33 33 0
+kernfs_node_cache 52898 52920 464 35 4 : tunables 0 0 0 : slabdata 1512 1512 0
+mnt_cache 42 46 704 23 4 : tunables 0 0 0 : slabdata 2 2 0
+filp 4314 6371 704 23 4 : tunables 0 0 0 : slabdata 277 277 0
+inode_cache 28695 29505 920 35 8 : tunables 0 0 0 : slabdata 843 843 0
+dentry 166069 169074 528 31 4 : tunables 0 0 0 : slabdata 5454 5454 0
+names_cache 0 35 4544 7 8 : tunables 0 0 0 : slabdata 5 5 0
+hashtab_node 0 0 360 22 2 : tunables 0 0 0 : slabdata 0 0 0
+ebitmap_node 0 0 400 20 2 : tunables 0 0 0 : slabdata 0 0 0
+avtab_extended_perms 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+avtab_node 0 0 360 22 2 : tunables 0 0 0 : slabdata 0 0 0
+avc_xperms_data 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+avc_xperms_decision_node 0 0 384 21 2 : tunables 0 0 0 : slabdata 0 0 0
+avc_xperms_node 0 0 392 20 2 : tunables 0 0 0 : slabdata 0 0 0
+avc_node 37 40 408 20 2 : tunables 0 0 0 : slabdata 2 2 0
+iint_cache 0 0 448 36 4 : tunables 0 0 0 : slabdata 0 0 0
+lsm_inode_cache 122284 122340 392 20 2 : tunables 0 0 0 : slabdata 6117 6117 0
+lsm_file_cache 4266 4485 352 23 2 : tunables 0 0 0 : slabdata 195 195 0
+key_jar 8 25 640 25 4 : tunables 0 0 0 : slabdata 1 1 0
+buffer_head 255622 257076 440 37 4 : tunables 0 0 0 : slabdata 6948 6948 0
+uts_namespace 0 0 776 21 4 : tunables 0 0 0 : slabdata 0 0 0
+nsproxy 31 40 408 20 2 : tunables 0 0 0 : slabdata 2 2 0
+vm_area_struct 39115 43214 528 31 4 : tunables 0 0 0 : slabdata 1394 1394 0
+mm_struct 96 529 1408 23 8 : tunables 0 0 0 : slabdata 23 23 0
+fs_cache 102 756 448 36 4 : tunables 0 0 0 : slabdata 21 21 0
+files_cache 102 588 1152 28 8 : tunables 0 0 0 : slabdata 21 21 0
+signal_cache 266 672 1536 21 8 : tunables 0 0 0 : slabdata 32 32 0
+sighand_cache 266 507 2496 13 8 : tunables 0 0 0 : slabdata 39 39 0
+task_struct 783 963 10240 3 8 : tunables 0 0 0 : slabdata 321 321 0
+cred_jar 364 952 576 28 4 : tunables 0 0 0 : slabdata 34 34 0
+anon_vma_chain 63907 67821 416 39 4 : tunables 0 0 0 : slabdata 1739 1739 0
+anon_vma 25891 28899 416 39 4 : tunables 0 0 0 : slabdata 741 741 0
+pid 408 992 512 32 4 : tunables 0 0 0 : slabdata 31 31 0
+Acpi-Operand 6682 6740 408 20 2 : tunables 0 0 0 : slabdata 337 337 0
+Acpi-ParseExt 0 39 416 39 4 : tunables 0 0 0 : slabdata 1 1 0
+Acpi-Parse 0 80 392 20 2 : tunables 0 0 0 : slabdata 4 4 0
+Acpi-State 0 78 416 39 4 : tunables 0 0 0 : slabdata 2 2 0
+Acpi-Namespace 3911 3948 384 21 2 : tunables 0 0 0 : slabdata 188 188 0
+trace_event_file 2638 2660 424 38 4 : tunables 0 0 0 : slabdata 70 70 0
+ftrace_event_field 6592 6594 384 21 2 : tunables 0 0 0 : slabdata 314 314 0
+pool_workqueue 41 64 1024 32 8 : tunables 0 0 0 : slabdata 2 2 0
+radix_tree_node 21638 24045 912 35 8 : tunables 0 0 0 : slabdata 687 687 0
+task_group 48 78 1216 26 8 : tunables 0 0 0 : slabdata 3 3 0
+vmap_area 4411 4680 400 20 2 : tunables 0 0 0 : slabdata 234 234 0
+dma-kmalloc-8k 0 0 24576 1 8 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-4k 0 0 12288 2 8 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-2k 0 0 6144 5 8 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-1k 0 0 3072 10 8 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-512 0 0 1536 21 8 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-256 0 0 1024 32 8 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-128 0 0 640 25 4 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-64 0 0 512 32 4 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-32 0 0 416 39 4 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-16 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-8 0 0 344 23 2 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-192 0 0 528 31 4 : tunables 0 0 0 : slabdata 0 0 0
+dma-kmalloc-96 0 0 432 37 4 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-8k 0 0 24576 1 8 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-4k 0 0 12288 2 8 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-2k 0 0 6144 5 8 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-1k 0 0 3072 10 8 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-512 0 0 1536 21 8 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-256 0 0 1024 32 8 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-192 0 0 528 31 4 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-128 31 75 640 25 4 : tunables 0 0 0 : slabdata 3 3 0
+kmalloc-rcl-96 3371 3626 432 37 4 : tunables 0 0 0 : slabdata 98 98 0
+kmalloc-rcl-64 2080 2272 512 32 4 : tunables 0 0 0 : slabdata 71 71 0
+kmalloc-rcl-32 0 0 416 39 4 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-16 0 0 368 22 2 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-rcl-8 0 0 344 23 2 : tunables 0 0 0 : slabdata 0 0 0
+kmalloc-8k 133 140 24576 1 8 : tunables 0 0 0 : slabdata 140 140 0
+kmalloc-4k 403 444 12288 2 8 : tunables 0 0 0 : slabdata 222 222 0
+kmalloc-2k 2391 2585 6144 5 8 : tunables 0 0 0 : slabdata 517 517 0
+kmalloc-1k 2163 2420 3072 10 8 : tunables 0 0 0 : slabdata 242 242 0
+kmalloc-512 2972 3633 1536 21 8 : tunables 0 0 0 : slabdata 173 173 0
+kmalloc-256 1841 1856 1024 32 8 : tunables 0 0 0 : slabdata 58 58 0
+kmalloc-192 2165 2914 528 31 4 : tunables 0 0 0 : slabdata 94 94 0
+kmalloc-128 1137 1175 640 25 4 : tunables 0 0 0 : slabdata 47 47 0
+kmalloc-96 1925 2590 432 37 4 : tunables 0 0 0 : slabdata 70 70 0
+kmalloc-64 9433 10688 512 32 4 : tunables 0 0 0 : slabdata 334 334 0
+kmalloc-32 9098 10062 416 39 4 : tunables 0 0 0 : slabdata 258 258 0
+kmalloc-16 10914 10956 368 22 2 : tunables 0 0 0 : slabdata 498 498 0
+kmalloc-8 7576 7705 344 23 2 : tunables 0 0 0 : slabdata 335 335 0
+kmem_cache_node 904 928 512 32 4 : tunables 0 0 0 : slabdata 29 29 0
+kmem_cache 904 936 832 39 8 : tunables 0 0 0 : slabdata 24 24 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Path: fixtures/proc/stat
Lines: 16
cpu 301854 612 111922 8979004 3552 2 3944 0 0 0
@@ -4639,6 +4978,35 @@ Mode: 644
Directory: fixtures/sys/devices/system
Mode: 775
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/sys/devices/system/node
+Mode: 775
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/sys/devices/system/node/node1
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/sys/devices/system/node/node1/vmstat
+Lines: 6
+nr_free_pages 1
+nr_zone_inactive_anon 2
+nr_zone_active_anon 3
+nr_zone_inactive_file 4
+nr_zone_active_file 5
+nr_zone_unevictable 6
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/sys/devices/system/node/node2
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/sys/devices/system/node/node2/vmstat
+Lines: 6
+nr_free_pages 7
+nr_zone_inactive_anon 8
+nr_zone_active_anon 9
+nr_zone_inactive_file 10
+nr_zone_active_file 11
+nr_zone_unevictable 12
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Directory: fixtures/sys/devices/system/clocksource
Mode: 775
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/vendor/github.com/prometheus/procfs/fscache.go b/vendor/github.com/prometheus/procfs/fscache.go
index 8783cf3cc..f8070e6e2 100644
--- a/vendor/github.com/prometheus/procfs/fscache.go
+++ b/vendor/github.com/prometheus/procfs/fscache.go
@@ -236,7 +236,7 @@ func (fs FS) Fscacheinfo() (Fscacheinfo, error) {
m, err := parseFscacheinfo(bytes.NewReader(b))
if err != nil {
- return Fscacheinfo{}, fmt.Errorf("failed to parse Fscacheinfo: %v", err)
+ return Fscacheinfo{}, fmt.Errorf("failed to parse Fscacheinfo: %w", err)
}
return *m, nil
diff --git a/vendor/github.com/prometheus/procfs/go.mod b/vendor/github.com/prometheus/procfs/go.mod
index ded48253c..ba6681f52 100644
--- a/vendor/github.com/prometheus/procfs/go.mod
+++ b/vendor/github.com/prometheus/procfs/go.mod
@@ -1,9 +1,9 @@
module github.com/prometheus/procfs
-go 1.12
+go 1.13
require (
- github.com/google/go-cmp v0.3.1
- golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
- golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e
+ github.com/google/go-cmp v0.5.4
+ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
+ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
)
diff --git a/vendor/github.com/prometheus/procfs/go.sum b/vendor/github.com/prometheus/procfs/go.sum
index 54b5f3303..7ceaf56b7 100644
--- a/vendor/github.com/prometheus/procfs/go.sum
+++ b/vendor/github.com/prometheus/procfs/go.sum
@@ -1,6 +1,8 @@
-github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e h1:LwyF2AFISC9nVbS6MgzsaQNSUsRXI49GS+YQ5KX/QH0=
-golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/vendor/github.com/prometheus/procfs/internal/fs/fs.go b/vendor/github.com/prometheus/procfs/internal/fs/fs.go
index 565e89e42..0040753b1 100644
--- a/vendor/github.com/prometheus/procfs/internal/fs/fs.go
+++ b/vendor/github.com/prometheus/procfs/internal/fs/fs.go
@@ -39,10 +39,10 @@ type FS string
func NewFS(mountPoint string) (FS, error) {
info, err := os.Stat(mountPoint)
if err != nil {
- return "", fmt.Errorf("could not read %s: %s", mountPoint, err)
+ return "", fmt.Errorf("could not read %q: %w", mountPoint, err)
}
if !info.IsDir() {
- return "", fmt.Errorf("mount point %s is not a directory", mountPoint)
+ return "", fmt.Errorf("mount point %q is not a directory", mountPoint)
}
return FS(mountPoint), nil
diff --git a/vendor/github.com/prometheus/procfs/loadavg.go b/vendor/github.com/prometheus/procfs/loadavg.go
index 00bbe1441..0cce190ec 100644
--- a/vendor/github.com/prometheus/procfs/loadavg.go
+++ b/vendor/github.com/prometheus/procfs/loadavg.go
@@ -44,14 +44,14 @@ func parseLoad(loadavgBytes []byte) (*LoadAvg, error) {
loads := make([]float64, 3)
parts := strings.Fields(string(loadavgBytes))
if len(parts) < 3 {
- return nil, fmt.Errorf("malformed loadavg line: too few fields in loadavg string: %s", string(loadavgBytes))
+ return nil, fmt.Errorf("malformed loadavg line: too few fields in loadavg string: %q", string(loadavgBytes))
}
var err error
for i, load := range parts[0:3] {
loads[i], err = strconv.ParseFloat(load, 64)
if err != nil {
- return nil, fmt.Errorf("could not parse load '%s': %s", load, err)
+ return nil, fmt.Errorf("could not parse load %q: %w", load, err)
}
}
return &LoadAvg{
diff --git a/vendor/github.com/prometheus/procfs/mdstat.go b/vendor/github.com/prometheus/procfs/mdstat.go
index 98e37aa8c..4c4493bfa 100644
--- a/vendor/github.com/prometheus/procfs/mdstat.go
+++ b/vendor/github.com/prometheus/procfs/mdstat.go
@@ -22,8 +22,9 @@ import (
)
var (
- statusLineRE = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[[U_]+\]`)
- recoveryLineRE = regexp.MustCompile(`\((\d+)/\d+\)`)
+ statusLineRE = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[[U_]+\]`)
+ recoveryLineRE = regexp.MustCompile(`\((\d+)/\d+\)`)
+ componentDeviceRE = regexp.MustCompile(`(.*)\[\d+\]`)
)
// MDStat holds info parsed from /proc/mdstat.
@@ -44,6 +45,8 @@ type MDStat struct {
BlocksTotal int64
// Number of blocks on the device that are in sync.
BlocksSynced int64
+ // Name of md component devices
+ Devices []string
}
// MDStat parses an mdstat-file (/proc/mdstat) and returns a slice of
@@ -56,7 +59,7 @@ func (fs FS) MDStat() ([]MDStat, error) {
}
mdstat, err := parseMDStat(data)
if err != nil {
- return nil, fmt.Errorf("error parsing mdstat %s: %s", fs.proc.Path("mdstat"), err)
+ return nil, fmt.Errorf("error parsing mdstat %q: %w", fs.proc.Path("mdstat"), err)
}
return mdstat, nil
}
@@ -82,10 +85,7 @@ func parseMDStat(mdStatData []byte) ([]MDStat, error) {
state := deviceFields[2] // active or inactive
if len(lines) <= i+3 {
- return nil, fmt.Errorf(
- "error parsing %s: too few lines for md device",
- mdName,
- )
+ return nil, fmt.Errorf("error parsing %q: too few lines for md device", mdName)
}
// Failed disks have the suffix (F) & Spare disks have the suffix (S).
@@ -94,7 +94,7 @@ func parseMDStat(mdStatData []byte) ([]MDStat, error) {
active, total, size, err := evalStatusLine(lines[i], lines[i+1])
if err != nil {
- return nil, fmt.Errorf("error parsing md device lines: %s", err)
+ return nil, fmt.Errorf("error parsing md device lines: %w", err)
}
syncLineIdx := i + 2
@@ -126,7 +126,7 @@ func parseMDStat(mdStatData []byte) ([]MDStat, error) {
} else {
syncedBlocks, err = evalRecoveryLine(lines[syncLineIdx])
if err != nil {
- return nil, fmt.Errorf("error parsing sync line in md device %s: %s", mdName, err)
+ return nil, fmt.Errorf("error parsing sync line in md device %q: %w", mdName, err)
}
}
}
@@ -140,6 +140,7 @@ func parseMDStat(mdStatData []byte) ([]MDStat, error) {
DisksTotal: total,
BlocksTotal: size,
BlocksSynced: syncedBlocks,
+ Devices: evalComponentDevices(deviceFields),
})
}
@@ -151,7 +152,7 @@ func evalStatusLine(deviceLine, statusLine string) (active, total, size int64, e
sizeStr := strings.Fields(statusLine)[0]
size, err = strconv.ParseInt(sizeStr, 10, 64)
if err != nil {
- return 0, 0, 0, fmt.Errorf("unexpected statusLine %s: %s", statusLine, err)
+ return 0, 0, 0, fmt.Errorf("unexpected statusLine %q: %w", statusLine, err)
}
if strings.Contains(deviceLine, "raid0") || strings.Contains(deviceLine, "linear") {
@@ -171,12 +172,12 @@ func evalStatusLine(deviceLine, statusLine string) (active, total, size int64, e
total, err = strconv.ParseInt(matches[2], 10, 64)
if err != nil {
- return 0, 0, 0, fmt.Errorf("unexpected statusLine %s: %s", statusLine, err)
+ return 0, 0, 0, fmt.Errorf("unexpected statusLine %q: %w", statusLine, err)
}
active, err = strconv.ParseInt(matches[3], 10, 64)
if err != nil {
- return 0, 0, 0, fmt.Errorf("unexpected statusLine %s: %s", statusLine, err)
+ return 0, 0, 0, fmt.Errorf("unexpected statusLine %q: %w", statusLine, err)
}
return active, total, size, nil
@@ -190,8 +191,23 @@ func evalRecoveryLine(recoveryLine string) (syncedBlocks int64, err error) {
syncedBlocks, err = strconv.ParseInt(matches[1], 10, 64)
if err != nil {
- return 0, fmt.Errorf("%s in recoveryLine: %s", err, recoveryLine)
+ return 0, fmt.Errorf("error parsing int from recoveryLine %q: %w", recoveryLine, err)
}
return syncedBlocks, nil
}
+
+func evalComponentDevices(deviceFields []string) []string {
+ mdComponentDevices := make([]string, 0)
+ if len(deviceFields) > 3 {
+ for _, field := range deviceFields[4:] {
+ match := componentDeviceRE.FindStringSubmatch(field)
+ if match == nil {
+ continue
+ }
+ mdComponentDevices = append(mdComponentDevices, match[1])
+ }
+ }
+
+ return mdComponentDevices
+}
diff --git a/vendor/github.com/prometheus/procfs/meminfo.go b/vendor/github.com/prometheus/procfs/meminfo.go
index 50dab4bcd..f65e174e5 100644
--- a/vendor/github.com/prometheus/procfs/meminfo.go
+++ b/vendor/github.com/prometheus/procfs/meminfo.go
@@ -28,9 +28,9 @@ import (
type Meminfo struct {
// Total usable ram (i.e. physical ram minus a few reserved
// bits and the kernel binary code)
- MemTotal uint64
+ MemTotal *uint64
// The sum of LowFree+HighFree
- MemFree uint64
+ MemFree *uint64
// An estimate of how much memory is available for starting
// new applications, without swapping. Calculated from
// MemFree, SReclaimable, the size of the file LRU lists, and
@@ -39,59 +39,59 @@ type Meminfo struct {
// well, and that not all reclaimable slab will be
// reclaimable, due to items being in use. The impact of those
// factors will vary from system to system.
- MemAvailable uint64
+ MemAvailable *uint64
// Relatively temporary storage for raw disk blocks shouldn't
// get tremendously large (20MB or so)
- Buffers uint64
- Cached uint64
+ Buffers *uint64
+ Cached *uint64
// Memory that once was swapped out, is swapped back in but
// still also is in the swapfile (if memory is needed it
// doesn't need to be swapped out AGAIN because it is already
// in the swapfile. This saves I/O)
- SwapCached uint64
+ SwapCached *uint64
// Memory that has been used more recently and usually not
// reclaimed unless absolutely necessary.
- Active uint64
+ Active *uint64
// Memory which has been less recently used. It is more
// eligible to be reclaimed for other purposes
- Inactive uint64
- ActiveAnon uint64
- InactiveAnon uint64
- ActiveFile uint64
- InactiveFile uint64
- Unevictable uint64
- Mlocked uint64
+ Inactive *uint64
+ ActiveAnon *uint64
+ InactiveAnon *uint64
+ ActiveFile *uint64
+ InactiveFile *uint64
+ Unevictable *uint64
+ Mlocked *uint64
// total amount of swap space available
- SwapTotal uint64
+ SwapTotal *uint64
// Memory which has been evicted from RAM, and is temporarily
// on the disk
- SwapFree uint64
+ SwapFree *uint64
// Memory which is waiting to get written back to the disk
- Dirty uint64
+ Dirty *uint64
// Memory which is actively being written back to the disk
- Writeback uint64
+ Writeback *uint64
// Non-file backed pages mapped into userspace page tables
- AnonPages uint64
+ AnonPages *uint64
// files which have been mapped, such as libraries
- Mapped uint64
- Shmem uint64
+ Mapped *uint64
+ Shmem *uint64
// in-kernel data structures cache
- Slab uint64
+ Slab *uint64
// Part of Slab, that might be reclaimed, such as caches
- SReclaimable uint64
+ SReclaimable *uint64
// Part of Slab, that cannot be reclaimed on memory pressure
- SUnreclaim uint64
- KernelStack uint64
+ SUnreclaim *uint64
+ KernelStack *uint64
// amount of memory dedicated to the lowest level of page
// tables.
- PageTables uint64
+ PageTables *uint64
// NFS pages sent to the server, but not yet committed to
// stable storage
- NFSUnstable uint64
+ NFSUnstable *uint64
// Memory used for block device "bounce buffers"
- Bounce uint64
+ Bounce *uint64
// Memory used by FUSE for temporary writeback buffers
- WritebackTmp uint64
+ WritebackTmp *uint64
// Based on the overcommit ratio ('vm.overcommit_ratio'),
// this is the total amount of memory currently available to
// be allocated on the system. This limit is only adhered to
@@ -105,7 +105,7 @@ type Meminfo struct {
// yield a CommitLimit of 7.3G.
// For more details, see the memory overcommit documentation
// in vm/overcommit-accounting.
- CommitLimit uint64
+ CommitLimit *uint64
// The amount of memory presently allocated on the system.
// The committed memory is a sum of all of the memory which
// has been allocated by processes, even if it has not been
@@ -119,27 +119,27 @@ type Meminfo struct {
// This is useful if one needs to guarantee that processes will
// not fail due to lack of memory once that memory has been
// successfully allocated.
- CommittedAS uint64
+ CommittedAS *uint64
// total size of vmalloc memory area
- VmallocTotal uint64
+ VmallocTotal *uint64
// amount of vmalloc area which is used
- VmallocUsed uint64
+ VmallocUsed *uint64
// largest contiguous block of vmalloc area which is free
- VmallocChunk uint64
- HardwareCorrupted uint64
- AnonHugePages uint64
- ShmemHugePages uint64
- ShmemPmdMapped uint64
- CmaTotal uint64
- CmaFree uint64
- HugePagesTotal uint64
- HugePagesFree uint64
- HugePagesRsvd uint64
- HugePagesSurp uint64
- Hugepagesize uint64
- DirectMap4k uint64
- DirectMap2M uint64
- DirectMap1G uint64
+ VmallocChunk *uint64
+ HardwareCorrupted *uint64
+ AnonHugePages *uint64
+ ShmemHugePages *uint64
+ ShmemPmdMapped *uint64
+ CmaTotal *uint64
+ CmaFree *uint64
+ HugePagesTotal *uint64
+ HugePagesFree *uint64
+ HugePagesRsvd *uint64
+ HugePagesSurp *uint64
+ Hugepagesize *uint64
+ DirectMap4k *uint64
+ DirectMap2M *uint64
+ DirectMap1G *uint64
}
// Meminfo returns an information about current kernel/system memory statistics.
@@ -152,7 +152,7 @@ func (fs FS) Meminfo() (Meminfo, error) {
m, err := parseMemInfo(bytes.NewReader(b))
if err != nil {
- return Meminfo{}, fmt.Errorf("failed to parse meminfo: %v", err)
+ return Meminfo{}, fmt.Errorf("failed to parse meminfo: %w", err)
}
return *m, nil
@@ -175,101 +175,101 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) {
switch fields[0] {
case "MemTotal:":
- m.MemTotal = v
+ m.MemTotal = &v
case "MemFree:":
- m.MemFree = v
+ m.MemFree = &v
case "MemAvailable:":
- m.MemAvailable = v
+ m.MemAvailable = &v
case "Buffers:":
- m.Buffers = v
+ m.Buffers = &v
case "Cached:":
- m.Cached = v
+ m.Cached = &v
case "SwapCached:":
- m.SwapCached = v
+ m.SwapCached = &v
case "Active:":
- m.Active = v
+ m.Active = &v
case "Inactive:":
- m.Inactive = v
+ m.Inactive = &v
case "Active(anon):":
- m.ActiveAnon = v
+ m.ActiveAnon = &v
case "Inactive(anon):":
- m.InactiveAnon = v
+ m.InactiveAnon = &v
case "Active(file):":
- m.ActiveFile = v
+ m.ActiveFile = &v
case "Inactive(file):":
- m.InactiveFile = v
+ m.InactiveFile = &v
case "Unevictable:":
- m.Unevictable = v
+ m.Unevictable = &v
case "Mlocked:":
- m.Mlocked = v
+ m.Mlocked = &v
case "SwapTotal:":
- m.SwapTotal = v
+ m.SwapTotal = &v
case "SwapFree:":
- m.SwapFree = v
+ m.SwapFree = &v
case "Dirty:":
- m.Dirty = v
+ m.Dirty = &v
case "Writeback:":
- m.Writeback = v
+ m.Writeback = &v
case "AnonPages:":
- m.AnonPages = v
+ m.AnonPages = &v
case "Mapped:":
- m.Mapped = v
+ m.Mapped = &v
case "Shmem:":
- m.Shmem = v
+ m.Shmem = &v
case "Slab:":
- m.Slab = v
+ m.Slab = &v
case "SReclaimable:":
- m.SReclaimable = v
+ m.SReclaimable = &v
case "SUnreclaim:":
- m.SUnreclaim = v
+ m.SUnreclaim = &v
case "KernelStack:":
- m.KernelStack = v
+ m.KernelStack = &v
case "PageTables:":
- m.PageTables = v
+ m.PageTables = &v
case "NFS_Unstable:":
- m.NFSUnstable = v
+ m.NFSUnstable = &v
case "Bounce:":
- m.Bounce = v
+ m.Bounce = &v
case "WritebackTmp:":
- m.WritebackTmp = v
+ m.WritebackTmp = &v
case "CommitLimit:":
- m.CommitLimit = v
+ m.CommitLimit = &v
case "Committed_AS:":
- m.CommittedAS = v
+ m.CommittedAS = &v
case "VmallocTotal:":
- m.VmallocTotal = v
+ m.VmallocTotal = &v
case "VmallocUsed:":
- m.VmallocUsed = v
+ m.VmallocUsed = &v
case "VmallocChunk:":
- m.VmallocChunk = v
+ m.VmallocChunk = &v
case "HardwareCorrupted:":
- m.HardwareCorrupted = v
+ m.HardwareCorrupted = &v
case "AnonHugePages:":
- m.AnonHugePages = v
+ m.AnonHugePages = &v
case "ShmemHugePages:":
- m.ShmemHugePages = v
+ m.ShmemHugePages = &v
case "ShmemPmdMapped:":
- m.ShmemPmdMapped = v
+ m.ShmemPmdMapped = &v
case "CmaTotal:":
- m.CmaTotal = v
+ m.CmaTotal = &v
case "CmaFree:":
- m.CmaFree = v
+ m.CmaFree = &v
case "HugePages_Total:":
- m.HugePagesTotal = v
+ m.HugePagesTotal = &v
case "HugePages_Free:":
- m.HugePagesFree = v
+ m.HugePagesFree = &v
case "HugePages_Rsvd:":
- m.HugePagesRsvd = v
+ m.HugePagesRsvd = &v
case "HugePages_Surp:":
- m.HugePagesSurp = v
+ m.HugePagesSurp = &v
case "Hugepagesize:":
- m.Hugepagesize = v
+ m.Hugepagesize = &v
case "DirectMap4k:":
- m.DirectMap4k = v
+ m.DirectMap4k = &v
case "DirectMap2M:":
- m.DirectMap2M = v
+ m.DirectMap2M = &v
case "DirectMap1G:":
- m.DirectMap1G = v
+ m.DirectMap1G = &v
}
}
diff --git a/vendor/github.com/prometheus/procfs/mountstats.go b/vendor/github.com/prometheus/procfs/mountstats.go
index 861ced9da..f7a828bb1 100644
--- a/vendor/github.com/prometheus/procfs/mountstats.go
+++ b/vendor/github.com/prometheus/procfs/mountstats.go
@@ -338,12 +338,12 @@ func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, e
if len(ss) == 0 {
break
}
- if len(ss) < 2 {
- return nil, fmt.Errorf("not enough information for NFS stats: %v", ss)
- }
switch ss[0] {
case fieldOpts:
+ if len(ss) < 2 {
+ return nil, fmt.Errorf("not enough information for NFS stats: %v", ss)
+ }
if stats.Opts == nil {
stats.Opts = map[string]string{}
}
@@ -356,6 +356,9 @@ func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, e
}
}
case fieldAge:
+ if len(ss) < 2 {
+ return nil, fmt.Errorf("not enough information for NFS stats: %v", ss)
+ }
// Age integer is in seconds
d, err := time.ParseDuration(ss[1] + "s")
if err != nil {
@@ -364,6 +367,9 @@ func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, e
stats.Age = d
case fieldBytes:
+ if len(ss) < 2 {
+ return nil, fmt.Errorf("not enough information for NFS stats: %v", ss)
+ }
bstats, err := parseNFSBytesStats(ss[1:])
if err != nil {
return nil, err
@@ -371,6 +377,9 @@ func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, e
stats.Bytes = *bstats
case fieldEvents:
+ if len(ss) < 2 {
+ return nil, fmt.Errorf("not enough information for NFS stats: %v", ss)
+ }
estats, err := parseNFSEventsStats(ss[1:])
if err != nil {
return nil, err
diff --git a/vendor/github.com/prometheus/procfs/net_conntrackstat.go b/vendor/github.com/prometheus/procfs/net_conntrackstat.go
index b637be984..9964a3600 100644
--- a/vendor/github.com/prometheus/procfs/net_conntrackstat.go
+++ b/vendor/github.com/prometheus/procfs/net_conntrackstat.go
@@ -55,7 +55,7 @@ func readConntrackStat(path string) ([]ConntrackStatEntry, error) {
stat, err := parseConntrackStat(bytes.NewReader(b))
if err != nil {
- return nil, fmt.Errorf("failed to read conntrack stats from %q: %v", path, err)
+ return nil, fmt.Errorf("failed to read conntrack stats from %q: %w", path, err)
}
return stat, nil
@@ -147,7 +147,7 @@ func parseConntrackStatEntry(fields []string) (*ConntrackStatEntry, error) {
func parseConntrackStatField(field string) (uint64, error) {
val, err := strconv.ParseUint(field, 16, 64)
if err != nil {
- return 0, fmt.Errorf("couldn't parse \"%s\" field: %s", field, err)
+ return 0, fmt.Errorf("couldn't parse %q field: %w", field, err)
}
return val, err
}
diff --git a/vendor/github.com/prometheus/procfs/net_ip_socket.go b/vendor/github.com/prometheus/procfs/net_ip_socket.go
new file mode 100644
index 000000000..ac01dd847
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/net_ip_socket.go
@@ -0,0 +1,220 @@
+// Copyright 2020 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package procfs
+
+import (
+ "bufio"
+ "encoding/hex"
+ "fmt"
+ "io"
+ "net"
+ "os"
+ "strconv"
+ "strings"
+)
+
+const (
+ // readLimit is used by io.LimitReader while reading the content of the
+ // /proc/net/udp{,6} files. The number of lines inside such a file is dynamic
+ // as each line represents a single used socket.
+ // In theory, the number of available sockets is 65535 (2^16 - 1) per IP.
+ // With e.g. 150 Byte per line and the maximum number of 65535,
+ // the reader needs to handle 150 Byte * 65535 =~ 10 MB for a single IP.
+ readLimit = 4294967296 // Byte -> 4 GiB
+)
+
+// this contains generic data structures for both udp and tcp sockets
+type (
+ // NetIPSocket represents the contents of /proc/net/{t,u}dp{,6} file without the header.
+ NetIPSocket []*netIPSocketLine
+
+ // NetIPSocketSummary provides already computed values like the total queue lengths or
+ // the total number of used sockets. In contrast to NetIPSocket it does not collect
+ // the parsed lines into a slice.
+ NetIPSocketSummary struct {
+ // TxQueueLength shows the total queue length of all parsed tx_queue lengths.
+ TxQueueLength uint64
+ // RxQueueLength shows the total queue length of all parsed rx_queue lengths.
+ RxQueueLength uint64
+ // UsedSockets shows the total number of parsed lines representing the
+ // number of used sockets.
+ UsedSockets uint64
+ }
+
+ // netIPSocketLine represents the fields parsed from a single line
+ // in /proc/net/{t,u}dp{,6}. Fields which are not used by IPSocket are skipped.
+ // For the proc file format details, see https://linux.die.net/man/5/proc.
+ netIPSocketLine struct {
+ Sl uint64
+ LocalAddr net.IP
+ LocalPort uint64
+ RemAddr net.IP
+ RemPort uint64
+ St uint64
+ TxQueue uint64
+ RxQueue uint64
+ UID uint64
+ }
+)
+
+func newNetIPSocket(file string) (NetIPSocket, error) {
+ f, err := os.Open(file)
+ if err != nil {
+ return nil, err
+ }
+ defer f.Close()
+
+ var netIPSocket NetIPSocket
+
+ lr := io.LimitReader(f, readLimit)
+ s := bufio.NewScanner(lr)
+ s.Scan() // skip first line with headers
+ for s.Scan() {
+ fields := strings.Fields(s.Text())
+ line, err := parseNetIPSocketLine(fields)
+ if err != nil {
+ return nil, err
+ }
+ netIPSocket = append(netIPSocket, line)
+ }
+ if err := s.Err(); err != nil {
+ return nil, err
+ }
+ return netIPSocket, nil
+}
+
+// newNetIPSocketSummary creates a new NetIPSocket{,6} from the contents of the given file.
+func newNetIPSocketSummary(file string) (*NetIPSocketSummary, error) {
+ f, err := os.Open(file)
+ if err != nil {
+ return nil, err
+ }
+ defer f.Close()
+
+ var netIPSocketSummary NetIPSocketSummary
+
+ lr := io.LimitReader(f, readLimit)
+ s := bufio.NewScanner(lr)
+ s.Scan() // skip first line with headers
+ for s.Scan() {
+ fields := strings.Fields(s.Text())
+ line, err := parseNetIPSocketLine(fields)
+ if err != nil {
+ return nil, err
+ }
+ netIPSocketSummary.TxQueueLength += line.TxQueue
+ netIPSocketSummary.RxQueueLength += line.RxQueue
+ netIPSocketSummary.UsedSockets++
+ }
+ if err := s.Err(); err != nil {
+ return nil, err
+ }
+ return &netIPSocketSummary, nil
+}
+
+// the /proc/net/{t,u}dp{,6} files are network byte order for ipv4 and for ipv6 the address is four words consisting of four bytes each. In each of those four words the four bytes are written in reverse order.
+
+func parseIP(hexIP string) (net.IP, error) {
+ var byteIP []byte
+ byteIP, err := hex.DecodeString(hexIP)
+ if err != nil {
+ return nil, fmt.Errorf("cannot parse address field in socket line %q", hexIP)
+ }
+ switch len(byteIP) {
+ case 4:
+ return net.IP{byteIP[3], byteIP[2], byteIP[1], byteIP[0]}, nil
+ case 16:
+ i := net.IP{
+ byteIP[3], byteIP[2], byteIP[1], byteIP[0],
+ byteIP[7], byteIP[6], byteIP[5], byteIP[4],
+ byteIP[11], byteIP[10], byteIP[9], byteIP[8],
+ byteIP[15], byteIP[14], byteIP[13], byteIP[12],
+ }
+ return i, nil
+ default:
+ return nil, fmt.Errorf("Unable to parse IP %s", hexIP)
+ }
+}
+
+// parseNetIPSocketLine parses a single line, represented by a list of fields.
+func parseNetIPSocketLine(fields []string) (*netIPSocketLine, error) {
+ line := &netIPSocketLine{}
+ if len(fields) < 8 {
+ return nil, fmt.Errorf(
+ "cannot parse net socket line as it has less then 8 columns %q",
+ strings.Join(fields, " "),
+ )
+ }
+ var err error // parse error
+
+ // sl
+ s := strings.Split(fields[0], ":")
+ if len(s) != 2 {
+ return nil, fmt.Errorf("cannot parse sl field in socket line %q", fields[0])
+ }
+
+ if line.Sl, err = strconv.ParseUint(s[0], 0, 64); err != nil {
+ return nil, fmt.Errorf("cannot parse sl value in socket line: %w", err)
+ }
+ // local_address
+ l := strings.Split(fields[1], ":")
+ if len(l) != 2 {
+ return nil, fmt.Errorf("cannot parse local_address field in socket line %q", fields[1])
+ }
+ if line.LocalAddr, err = parseIP(l[0]); err != nil {
+ return nil, err
+ }
+ if line.LocalPort, err = strconv.ParseUint(l[1], 16, 64); err != nil {
+ return nil, fmt.Errorf("cannot parse local_address port value in socket line: %w", err)
+ }
+
+ // remote_address
+ r := strings.Split(fields[2], ":")
+ if len(r) != 2 {
+ return nil, fmt.Errorf("cannot parse rem_address field in socket line %q", fields[1])
+ }
+ if line.RemAddr, err = parseIP(r[0]); err != nil {
+ return nil, err
+ }
+ if line.RemPort, err = strconv.ParseUint(r[1], 16, 64); err != nil {
+ return nil, fmt.Errorf("cannot parse rem_address port value in socket line: %w", err)
+ }
+
+ // st
+ if line.St, err = strconv.ParseUint(fields[3], 16, 64); err != nil {
+ return nil, fmt.Errorf("cannot parse st value in socket line: %w", err)
+ }
+
+ // tx_queue and rx_queue
+ q := strings.Split(fields[4], ":")
+ if len(q) != 2 {
+ return nil, fmt.Errorf(
+ "cannot parse tx/rx queues in socket line as it has a missing colon %q",
+ fields[4],
+ )
+ }
+ if line.TxQueue, err = strconv.ParseUint(q[0], 16, 64); err != nil {
+ return nil, fmt.Errorf("cannot parse tx_queue value in socket line: %w", err)
+ }
+ if line.RxQueue, err = strconv.ParseUint(q[1], 16, 64); err != nil {
+ return nil, fmt.Errorf("cannot parse rx_queue value in socket line: %w", err)
+ }
+
+ // uid
+ if line.UID, err = strconv.ParseUint(fields[7], 0, 64); err != nil {
+ return nil, fmt.Errorf("cannot parse uid value in socket line: %w", err)
+ }
+
+ return line, nil
+}
diff --git a/vendor/github.com/prometheus/procfs/net_protocols.go b/vendor/github.com/prometheus/procfs/net_protocols.go
new file mode 100644
index 000000000..8c6de3791
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/net_protocols.go
@@ -0,0 +1,180 @@
+// Copyright 2020 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package procfs
+
+import (
+ "bufio"
+ "bytes"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "github.com/prometheus/procfs/internal/util"
+)
+
+// NetProtocolStats stores the contents from /proc/net/protocols
+type NetProtocolStats map[string]NetProtocolStatLine
+
+// NetProtocolStatLine contains a single line parsed from /proc/net/protocols. We
+// only care about the first six columns as the rest are not likely to change
+// and only serve to provide a set of capabilities for each protocol.
+type NetProtocolStatLine struct {
+ Name string // 0 The name of the protocol
+ Size uint64 // 1 The size, in bytes, of a given protocol structure. e.g. sizeof(struct tcp_sock) or sizeof(struct unix_sock)
+ Sockets int64 // 2 Number of sockets in use by this protocol
+ Memory int64 // 3 Number of 4KB pages allocated by all sockets of this protocol
+ Pressure int // 4 This is either yes, no, or NI (not implemented). For the sake of simplicity we treat NI as not experiencing memory pressure.
+ MaxHeader uint64 // 5 Protocol specific max header size
+ Slab bool // 6 Indicates whether or not memory is allocated from the SLAB
+ ModuleName string // 7 The name of the module that implemented this protocol or "kernel" if not from a module
+ Capabilities NetProtocolCapabilities
+}
+
+// NetProtocolCapabilities contains a list of capabilities for each protocol
+type NetProtocolCapabilities struct {
+ Close bool // 8
+ Connect bool // 9
+ Disconnect bool // 10
+ Accept bool // 11
+ IoCtl bool // 12
+ Init bool // 13
+ Destroy bool // 14
+ Shutdown bool // 15
+ SetSockOpt bool // 16
+ GetSockOpt bool // 17
+ SendMsg bool // 18
+ RecvMsg bool // 19
+ SendPage bool // 20
+ Bind bool // 21
+ BacklogRcv bool // 22
+ Hash bool // 23
+ UnHash bool // 24
+ GetPort bool // 25
+ EnterMemoryPressure bool // 26
+}
+
+// NetProtocols reads stats from /proc/net/protocols and returns a map of
+// PortocolStatLine entries. As of this writing no official Linux Documentation
+// exists, however the source is fairly self-explanatory and the format seems
+// stable since its introduction in 2.6.12-rc2
+// Linux 2.6.12-rc2 - https://elixir.bootlin.com/linux/v2.6.12-rc2/source/net/core/sock.c#L1452
+// Linux 5.10 - https://elixir.bootlin.com/linux/v5.10.4/source/net/core/sock.c#L3586
+func (fs FS) NetProtocols() (NetProtocolStats, error) {
+ data, err := util.ReadFileNoStat(fs.proc.Path("net/protocols"))
+ if err != nil {
+ return NetProtocolStats{}, err
+ }
+ return parseNetProtocols(bufio.NewScanner(bytes.NewReader(data)))
+}
+
+func parseNetProtocols(s *bufio.Scanner) (NetProtocolStats, error) {
+ nps := NetProtocolStats{}
+
+ // Skip the header line
+ s.Scan()
+
+ for s.Scan() {
+ line, err := nps.parseLine(s.Text())
+ if err != nil {
+ return NetProtocolStats{}, err
+ }
+
+ nps[line.Name] = *line
+ }
+ return nps, nil
+}
+
+func (ps NetProtocolStats) parseLine(rawLine string) (*NetProtocolStatLine, error) {
+ line := &NetProtocolStatLine{Capabilities: NetProtocolCapabilities{}}
+ var err error
+ const enabled = "yes"
+ const disabled = "no"
+
+ fields := strings.Fields(rawLine)
+ line.Name = fields[0]
+ line.Size, err = strconv.ParseUint(fields[1], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ line.Sockets, err = strconv.ParseInt(fields[2], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ line.Memory, err = strconv.ParseInt(fields[3], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ if fields[4] == enabled {
+ line.Pressure = 1
+ } else if fields[4] == disabled {
+ line.Pressure = 0
+ } else {
+ line.Pressure = -1
+ }
+ line.MaxHeader, err = strconv.ParseUint(fields[5], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ if fields[6] == enabled {
+ line.Slab = true
+ } else if fields[6] == disabled {
+ line.Slab = false
+ } else {
+ return nil, fmt.Errorf("unable to parse capability for protocol: %s", line.Name)
+ }
+ line.ModuleName = fields[7]
+
+ err = line.Capabilities.parseCapabilities(fields[8:])
+ if err != nil {
+ return nil, err
+ }
+
+ return line, nil
+}
+
+func (pc *NetProtocolCapabilities) parseCapabilities(capabilities []string) error {
+ // The capabilities are all bools so we can loop over to map them
+ capabilityFields := [...]*bool{
+ &pc.Close,
+ &pc.Connect,
+ &pc.Disconnect,
+ &pc.Accept,
+ &pc.IoCtl,
+ &pc.Init,
+ &pc.Destroy,
+ &pc.Shutdown,
+ &pc.SetSockOpt,
+ &pc.GetSockOpt,
+ &pc.SendMsg,
+ &pc.RecvMsg,
+ &pc.SendPage,
+ &pc.Bind,
+ &pc.BacklogRcv,
+ &pc.Hash,
+ &pc.UnHash,
+ &pc.GetPort,
+ &pc.EnterMemoryPressure,
+ }
+
+ for i := 0; i < len(capabilities); i++ {
+ if capabilities[i] == "y" {
+ *capabilityFields[i] = true
+ } else if capabilities[i] == "n" {
+ *capabilityFields[i] = false
+ } else {
+ return fmt.Errorf("unable to parse capability block for protocol: position %d", i)
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/prometheus/procfs/net_sockstat.go b/vendor/github.com/prometheus/procfs/net_sockstat.go
index f91ef5523..e36f4872d 100644
--- a/vendor/github.com/prometheus/procfs/net_sockstat.go
+++ b/vendor/github.com/prometheus/procfs/net_sockstat.go
@@ -70,7 +70,7 @@ func readSockstat(name string) (*NetSockstat, error) {
stat, err := parseSockstat(bytes.NewReader(b))
if err != nil {
- return nil, fmt.Errorf("failed to read sockstats from %q: %v", name, err)
+ return nil, fmt.Errorf("failed to read sockstats from %q: %w", name, err)
}
return stat, nil
@@ -90,7 +90,7 @@ func parseSockstat(r io.Reader) (*NetSockstat, error) {
// The remaining fields are key/value pairs.
kvs, err := parseSockstatKVs(fields[1:])
if err != nil {
- return nil, fmt.Errorf("error parsing sockstat key/value pairs from %q: %v", s.Text(), err)
+ return nil, fmt.Errorf("error parsing sockstat key/value pairs from %q: %w", s.Text(), err)
}
// The first field is the protocol. We must trim its colon suffix.
diff --git a/vendor/github.com/prometheus/procfs/net_softnet.go b/vendor/github.com/prometheus/procfs/net_softnet.go
index db5debdf4..46f12c61d 100644
--- a/vendor/github.com/prometheus/procfs/net_softnet.go
+++ b/vendor/github.com/prometheus/procfs/net_softnet.go
@@ -51,7 +51,7 @@ func (fs FS) NetSoftnetStat() ([]SoftnetStat, error) {
entries, err := parseSoftnet(bytes.NewReader(b))
if err != nil {
- return nil, fmt.Errorf("failed to parse /proc/net/softnet_stat: %v", err)
+ return nil, fmt.Errorf("failed to parse /proc/net/softnet_stat: %w", err)
}
return entries, nil
diff --git a/vendor/github.com/prometheus/procfs/net_tcp.go b/vendor/github.com/prometheus/procfs/net_tcp.go
new file mode 100644
index 000000000..527762955
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/net_tcp.go
@@ -0,0 +1,64 @@
+// Copyright 2020 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package procfs
+
+type (
+ // NetTCP represents the contents of /proc/net/tcp{,6} file without the header.
+ NetTCP []*netIPSocketLine
+
+ // NetTCPSummary provides already computed values like the total queue lengths or
+ // the total number of used sockets. In contrast to NetTCP it does not collect
+ // the parsed lines into a slice.
+ NetTCPSummary NetIPSocketSummary
+)
+
+// NetTCP returns the IPv4 kernel/networking statistics for TCP datagrams
+// read from /proc/net/tcp.
+func (fs FS) NetTCP() (NetTCP, error) {
+ return newNetTCP(fs.proc.Path("net/tcp"))
+}
+
+// NetTCP6 returns the IPv6 kernel/networking statistics for TCP datagrams
+// read from /proc/net/tcp6.
+func (fs FS) NetTCP6() (NetTCP, error) {
+ return newNetTCP(fs.proc.Path("net/tcp6"))
+}
+
+// NetTCPSummary returns already computed statistics like the total queue lengths
+// for TCP datagrams read from /proc/net/tcp.
+func (fs FS) NetTCPSummary() (*NetTCPSummary, error) {
+ return newNetTCPSummary(fs.proc.Path("net/tcp"))
+}
+
+// NetTCP6Summary returns already computed statistics like the total queue lengths
+// for TCP datagrams read from /proc/net/tcp6.
+func (fs FS) NetTCP6Summary() (*NetTCPSummary, error) {
+ return newNetTCPSummary(fs.proc.Path("net/tcp6"))
+}
+
+// newNetTCP creates a new NetTCP{,6} from the contents of the given file.
+func newNetTCP(file string) (NetTCP, error) {
+ n, err := newNetIPSocket(file)
+ n1 := NetTCP(n)
+ return n1, err
+}
+
+func newNetTCPSummary(file string) (*NetTCPSummary, error) {
+ n, err := newNetIPSocketSummary(file)
+ if n == nil {
+ return nil, err
+ }
+ n1 := NetTCPSummary(*n)
+ return &n1, err
+}
diff --git a/vendor/github.com/prometheus/procfs/net_udp.go b/vendor/github.com/prometheus/procfs/net_udp.go
index d017e3f18..9ac3daf2d 100644
--- a/vendor/github.com/prometheus/procfs/net_udp.go
+++ b/vendor/github.com/prometheus/procfs/net_udp.go
@@ -13,58 +13,14 @@
package procfs
-import (
- "bufio"
- "encoding/hex"
- "fmt"
- "io"
- "net"
- "os"
- "strconv"
- "strings"
-)
-
-const (
- // readLimit is used by io.LimitReader while reading the content of the
- // /proc/net/udp{,6} files. The number of lines inside such a file is dynamic
- // as each line represents a single used socket.
- // In theory, the number of available sockets is 65535 (2^16 - 1) per IP.
- // With e.g. 150 Byte per line and the maximum number of 65535,
- // the reader needs to handle 150 Byte * 65535 =~ 10 MB for a single IP.
- readLimit = 4294967296 // Byte -> 4 GiB
-)
-
type (
// NetUDP represents the contents of /proc/net/udp{,6} file without the header.
- NetUDP []*netUDPLine
+ NetUDP []*netIPSocketLine
// NetUDPSummary provides already computed values like the total queue lengths or
// the total number of used sockets. In contrast to NetUDP it does not collect
// the parsed lines into a slice.
- NetUDPSummary struct {
- // TxQueueLength shows the total queue length of all parsed tx_queue lengths.
- TxQueueLength uint64
- // RxQueueLength shows the total queue length of all parsed rx_queue lengths.
- RxQueueLength uint64
- // UsedSockets shows the total number of parsed lines representing the
- // number of used sockets.
- UsedSockets uint64
- }
-
- // netUDPLine represents the fields parsed from a single line
- // in /proc/net/udp{,6}. Fields which are not used by UDP are skipped.
- // For the proc file format details, see https://linux.die.net/man/5/proc.
- netUDPLine struct {
- Sl uint64
- LocalAddr net.IP
- LocalPort uint64
- RemAddr net.IP
- RemPort uint64
- St uint64
- TxQueue uint64
- RxQueue uint64
- UID uint64
- }
+ NetUDPSummary NetIPSocketSummary
)
// NetUDP returns the IPv4 kernel/networking statistics for UDP datagrams
@@ -93,137 +49,16 @@ func (fs FS) NetUDP6Summary() (*NetUDPSummary, error) {
// newNetUDP creates a new NetUDP{,6} from the contents of the given file.
func newNetUDP(file string) (NetUDP, error) {
- f, err := os.Open(file)
- if err != nil {
- return nil, err
- }
- defer f.Close()
-
- netUDP := NetUDP{}
-
- lr := io.LimitReader(f, readLimit)
- s := bufio.NewScanner(lr)
- s.Scan() // skip first line with headers
- for s.Scan() {
- fields := strings.Fields(s.Text())
- line, err := parseNetUDPLine(fields)
- if err != nil {
- return nil, err
- }
- netUDP = append(netUDP, line)
- }
- if err := s.Err(); err != nil {
- return nil, err
- }
- return netUDP, nil
+ n, err := newNetIPSocket(file)
+ n1 := NetUDP(n)
+ return n1, err
}
-// newNetUDPSummary creates a new NetUDP{,6} from the contents of the given file.
func newNetUDPSummary(file string) (*NetUDPSummary, error) {
- f, err := os.Open(file)
- if err != nil {
- return nil, err
- }
- defer f.Close()
-
- netUDPSummary := &NetUDPSummary{}
-
- lr := io.LimitReader(f, readLimit)
- s := bufio.NewScanner(lr)
- s.Scan() // skip first line with headers
- for s.Scan() {
- fields := strings.Fields(s.Text())
- line, err := parseNetUDPLine(fields)
- if err != nil {
- return nil, err
- }
- netUDPSummary.TxQueueLength += line.TxQueue
- netUDPSummary.RxQueueLength += line.RxQueue
- netUDPSummary.UsedSockets++
- }
- if err := s.Err(); err != nil {
+ n, err := newNetIPSocketSummary(file)
+ if n == nil {
return nil, err
}
- return netUDPSummary, nil
-}
-
-// parseNetUDPLine parses a single line, represented by a list of fields.
-func parseNetUDPLine(fields []string) (*netUDPLine, error) {
- line := &netUDPLine{}
- if len(fields) < 8 {
- return nil, fmt.Errorf(
- "cannot parse net udp socket line as it has less then 8 columns: %s",
- strings.Join(fields, " "),
- )
- }
- var err error // parse error
-
- // sl
- s := strings.Split(fields[0], ":")
- if len(s) != 2 {
- return nil, fmt.Errorf(
- "cannot parse sl field in udp socket line: %s", fields[0])
- }
-
- if line.Sl, err = strconv.ParseUint(s[0], 0, 64); err != nil {
- return nil, fmt.Errorf("cannot parse sl value in udp socket line: %s", err)
- }
- // local_address
- l := strings.Split(fields[1], ":")
- if len(l) != 2 {
- return nil, fmt.Errorf(
- "cannot parse local_address field in udp socket line: %s", fields[1])
- }
- if line.LocalAddr, err = hex.DecodeString(l[0]); err != nil {
- return nil, fmt.Errorf(
- "cannot parse local_address value in udp socket line: %s", err)
- }
- if line.LocalPort, err = strconv.ParseUint(l[1], 16, 64); err != nil {
- return nil, fmt.Errorf(
- "cannot parse local_address port value in udp socket line: %s", err)
- }
-
- // remote_address
- r := strings.Split(fields[2], ":")
- if len(r) != 2 {
- return nil, fmt.Errorf(
- "cannot parse rem_address field in udp socket line: %s", fields[1])
- }
- if line.RemAddr, err = hex.DecodeString(r[0]); err != nil {
- return nil, fmt.Errorf(
- "cannot parse rem_address value in udp socket line: %s", err)
- }
- if line.RemPort, err = strconv.ParseUint(r[1], 16, 64); err != nil {
- return nil, fmt.Errorf(
- "cannot parse rem_address port value in udp socket line: %s", err)
- }
-
- // st
- if line.St, err = strconv.ParseUint(fields[3], 16, 64); err != nil {
- return nil, fmt.Errorf(
- "cannot parse st value in udp socket line: %s", err)
- }
-
- // tx_queue and rx_queue
- q := strings.Split(fields[4], ":")
- if len(q) != 2 {
- return nil, fmt.Errorf(
- "cannot parse tx/rx queues in udp socket line as it has a missing colon: %s",
- fields[4],
- )
- }
- if line.TxQueue, err = strconv.ParseUint(q[0], 16, 64); err != nil {
- return nil, fmt.Errorf("cannot parse tx_queue value in udp socket line: %s", err)
- }
- if line.RxQueue, err = strconv.ParseUint(q[1], 16, 64); err != nil {
- return nil, fmt.Errorf("cannot parse rx_queue value in udp socket line: %s", err)
- }
-
- // uid
- if line.UID, err = strconv.ParseUint(fields[7], 0, 64); err != nil {
- return nil, fmt.Errorf(
- "cannot parse uid value in udp socket line: %s", err)
- }
-
- return line, nil
+ n1 := NetUDPSummary(*n)
+ return &n1, err
}
diff --git a/vendor/github.com/prometheus/procfs/net_unix.go b/vendor/github.com/prometheus/procfs/net_unix.go
index c55b4b18e..98aa8e1c3 100644
--- a/vendor/github.com/prometheus/procfs/net_unix.go
+++ b/vendor/github.com/prometheus/procfs/net_unix.go
@@ -108,14 +108,14 @@ func parseNetUNIX(r io.Reader) (*NetUNIX, error) {
line := s.Text()
item, err := nu.parseLine(line, hasInode, minFields)
if err != nil {
- return nil, fmt.Errorf("failed to parse /proc/net/unix data %q: %v", line, err)
+ return nil, fmt.Errorf("failed to parse /proc/net/unix data %q: %w", line, err)
}
nu.Rows = append(nu.Rows, item)
}
if err := s.Err(); err != nil {
- return nil, fmt.Errorf("failed to scan /proc/net/unix data: %v", err)
+ return nil, fmt.Errorf("failed to scan /proc/net/unix data: %w", err)
}
return &nu, nil
@@ -136,29 +136,29 @@ func (u *NetUNIX) parseLine(line string, hasInode bool, min int) (*NetUNIXLine,
users, err := u.parseUsers(fields[1])
if err != nil {
- return nil, fmt.Errorf("failed to parse ref count(%s): %v", fields[1], err)
+ return nil, fmt.Errorf("failed to parse ref count %q: %w", fields[1], err)
}
flags, err := u.parseFlags(fields[3])
if err != nil {
- return nil, fmt.Errorf("failed to parse flags(%s): %v", fields[3], err)
+ return nil, fmt.Errorf("failed to parse flags %q: %w", fields[3], err)
}
typ, err := u.parseType(fields[4])
if err != nil {
- return nil, fmt.Errorf("failed to parse type(%s): %v", fields[4], err)
+ return nil, fmt.Errorf("failed to parse type %q: %w", fields[4], err)
}
state, err := u.parseState(fields[5])
if err != nil {
- return nil, fmt.Errorf("failed to parse state(%s): %v", fields[5], err)
+ return nil, fmt.Errorf("failed to parse state %q: %w", fields[5], err)
}
var inode uint64
if hasInode {
inode, err = u.parseInode(fields[6])
if err != nil {
- return nil, fmt.Errorf("failed to parse inode(%s): %v", fields[6], err)
+ return nil, fmt.Errorf("failed to parse inode %q: %w", fields[6], err)
}
}
diff --git a/vendor/github.com/prometheus/procfs/proc.go b/vendor/github.com/prometheus/procfs/proc.go
index 9f97b6e52..28f696803 100644
--- a/vendor/github.com/prometheus/procfs/proc.go
+++ b/vendor/github.com/prometheus/procfs/proc.go
@@ -105,7 +105,7 @@ func (fs FS) AllProcs() (Procs, error) {
names, err := d.Readdirnames(-1)
if err != nil {
- return Procs{}, fmt.Errorf("could not read %s: %s", d.Name(), err)
+ return Procs{}, fmt.Errorf("could not read %q: %w", d.Name(), err)
}
p := Procs{}
@@ -206,7 +206,7 @@ func (p Proc) FileDescriptors() ([]uintptr, error) {
for i, n := range names {
fd, err := strconv.ParseInt(n, 10, 32)
if err != nil {
- return nil, fmt.Errorf("could not parse fd %s: %s", n, err)
+ return nil, fmt.Errorf("could not parse fd %q: %w", n, err)
}
fds[i] = uintptr(fd)
}
@@ -278,7 +278,7 @@ func (p Proc) fileDescriptors() ([]string, error) {
names, err := d.Readdirnames(-1)
if err != nil {
- return nil, fmt.Errorf("could not read %s: %s", d.Name(), err)
+ return nil, fmt.Errorf("could not read %q: %w", d.Name(), err)
}
return names, nil
diff --git a/vendor/github.com/prometheus/procfs/proc_cgroup.go b/vendor/github.com/prometheus/procfs/proc_cgroup.go
index 4abd46451..0094a13c0 100644
--- a/vendor/github.com/prometheus/procfs/proc_cgroup.go
+++ b/vendor/github.com/prometheus/procfs/proc_cgroup.go
@@ -49,7 +49,7 @@ type Cgroup struct {
func parseCgroupString(cgroupStr string) (*Cgroup, error) {
var err error
- fields := strings.Split(cgroupStr, ":")
+ fields := strings.SplitN(cgroupStr, ":", 3)
if len(fields) < 3 {
return nil, fmt.Errorf("at least 3 fields required, found %d fields in cgroup string: %s", len(fields), cgroupStr)
}
diff --git a/vendor/github.com/prometheus/procfs/proc_fdinfo.go b/vendor/github.com/prometheus/procfs/proc_fdinfo.go
index a76ca7079..cf63227f0 100644
--- a/vendor/github.com/prometheus/procfs/proc_fdinfo.go
+++ b/vendor/github.com/prometheus/procfs/proc_fdinfo.go
@@ -16,7 +16,7 @@ package procfs
import (
"bufio"
"bytes"
- "errors"
+ "fmt"
"regexp"
"github.com/prometheus/procfs/internal/util"
@@ -112,7 +112,7 @@ func parseInotifyInfo(line string) (*InotifyInfo, error) {
}
return i, nil
}
- return nil, errors.New("invalid inode entry: " + line)
+ return nil, fmt.Errorf("invalid inode entry: %q", line)
}
// ProcFDInfos represents a list of ProcFDInfo structs.
diff --git a/vendor/github.com/prometheus/procfs/proc_limits.go b/vendor/github.com/prometheus/procfs/proc_limits.go
index 91ee24df8..dd20f198a 100644
--- a/vendor/github.com/prometheus/procfs/proc_limits.go
+++ b/vendor/github.com/prometheus/procfs/proc_limits.go
@@ -26,55 +26,55 @@ import (
// http://man7.org/linux/man-pages/man2/getrlimit.2.html.
type ProcLimits struct {
// CPU time limit in seconds.
- CPUTime int64
+ CPUTime uint64
// Maximum size of files that the process may create.
- FileSize int64
+ FileSize uint64
// Maximum size of the process's data segment (initialized data,
// uninitialized data, and heap).
- DataSize int64
+ DataSize uint64
// Maximum size of the process stack in bytes.
- StackSize int64
+ StackSize uint64
// Maximum size of a core file.
- CoreFileSize int64
+ CoreFileSize uint64
// Limit of the process's resident set in pages.
- ResidentSet int64
+ ResidentSet uint64
// Maximum number of processes that can be created for the real user ID of
// the calling process.
- Processes int64
+ Processes uint64
// Value one greater than the maximum file descriptor number that can be
// opened by this process.
- OpenFiles int64
+ OpenFiles uint64
// Maximum number of bytes of memory that may be locked into RAM.
- LockedMemory int64
+ LockedMemory uint64
// Maximum size of the process's virtual memory address space in bytes.
- AddressSpace int64
+ AddressSpace uint64
// Limit on the combined number of flock(2) locks and fcntl(2) leases that
// this process may establish.
- FileLocks int64
+ FileLocks uint64
// Limit of signals that may be queued for the real user ID of the calling
// process.
- PendingSignals int64
+ PendingSignals uint64
// Limit on the number of bytes that can be allocated for POSIX message
// queues for the real user ID of the calling process.
- MsqqueueSize int64
+ MsqqueueSize uint64
// Limit of the nice priority set using setpriority(2) or nice(2).
- NicePriority int64
+ NicePriority uint64
// Limit of the real-time priority set using sched_setscheduler(2) or
// sched_setparam(2).
- RealtimePriority int64
+ RealtimePriority uint64
// Limit (in microseconds) on the amount of CPU time that a process
// scheduled under a real-time scheduling policy may consume without making
// a blocking system call.
- RealtimeTimeout int64
+ RealtimeTimeout uint64
}
const (
- limitsFields = 3
+ limitsFields = 4
limitsUnlimited = "unlimited"
)
var (
- limitsDelimiter = regexp.MustCompile(" +")
+ limitsMatch = regexp.MustCompile(`(Max \w+\s{0,1}?\w*\s{0,1}\w*)\s{2,}(\w+)\s+(\w+)`)
)
// NewLimits returns the current soft limits of the process.
@@ -96,46 +96,49 @@ func (p Proc) Limits() (ProcLimits, error) {
l = ProcLimits{}
s = bufio.NewScanner(f)
)
+
+ s.Scan() // Skip limits header
+
for s.Scan() {
- fields := limitsDelimiter.Split(s.Text(), limitsFields)
+ //fields := limitsMatch.Split(s.Text(), limitsFields)
+ fields := limitsMatch.FindStringSubmatch(s.Text())
if len(fields) != limitsFields {
- return ProcLimits{}, fmt.Errorf(
- "couldn't parse %s line %s", f.Name(), s.Text())
+ return ProcLimits{}, fmt.Errorf("couldn't parse %q line %q", f.Name(), s.Text())
}
- switch fields[0] {
+ switch fields[1] {
case "Max cpu time":
- l.CPUTime, err = parseInt(fields[1])
+ l.CPUTime, err = parseUint(fields[2])
case "Max file size":
- l.FileSize, err = parseInt(fields[1])
+ l.FileSize, err = parseUint(fields[2])
case "Max data size":
- l.DataSize, err = parseInt(fields[1])
+ l.DataSize, err = parseUint(fields[2])
case "Max stack size":
- l.StackSize, err = parseInt(fields[1])
+ l.StackSize, err = parseUint(fields[2])
case "Max core file size":
- l.CoreFileSize, err = parseInt(fields[1])
+ l.CoreFileSize, err = parseUint(fields[2])
case "Max resident set":
- l.ResidentSet, err = parseInt(fields[1])
+ l.ResidentSet, err = parseUint(fields[2])
case "Max processes":
- l.Processes, err = parseInt(fields[1])
+ l.Processes, err = parseUint(fields[2])
case "Max open files":
- l.OpenFiles, err = parseInt(fields[1])
+ l.OpenFiles, err = parseUint(fields[2])
case "Max locked memory":
- l.LockedMemory, err = parseInt(fields[1])
+ l.LockedMemory, err = parseUint(fields[2])
case "Max address space":
- l.AddressSpace, err = parseInt(fields[1])
+ l.AddressSpace, err = parseUint(fields[2])
case "Max file locks":
- l.FileLocks, err = parseInt(fields[1])
+ l.FileLocks, err = parseUint(fields[2])
case "Max pending signals":
- l.PendingSignals, err = parseInt(fields[1])
+ l.PendingSignals, err = parseUint(fields[2])
case "Max msgqueue size":
- l.MsqqueueSize, err = parseInt(fields[1])
+ l.MsqqueueSize, err = parseUint(fields[2])
case "Max nice priority":
- l.NicePriority, err = parseInt(fields[1])
+ l.NicePriority, err = parseUint(fields[2])
case "Max realtime priority":
- l.RealtimePriority, err = parseInt(fields[1])
+ l.RealtimePriority, err = parseUint(fields[2])
case "Max realtime timeout":
- l.RealtimeTimeout, err = parseInt(fields[1])
+ l.RealtimeTimeout, err = parseUint(fields[2])
}
if err != nil {
return ProcLimits{}, err
@@ -145,13 +148,13 @@ func (p Proc) Limits() (ProcLimits, error) {
return l, s.Err()
}
-func parseInt(s string) (int64, error) {
+func parseUint(s string) (uint64, error) {
if s == limitsUnlimited {
- return -1, nil
+ return 18446744073709551615, nil
}
- i, err := strconv.ParseInt(s, 10, 64)
+ i, err := strconv.ParseUint(s, 10, 64)
if err != nil {
- return 0, fmt.Errorf("couldn't parse value %s: %s", s, err)
+ return 0, fmt.Errorf("couldn't parse value %q: %w", s, err)
}
return i, nil
}
diff --git a/vendor/github.com/prometheus/procfs/proc_ns.go b/vendor/github.com/prometheus/procfs/proc_ns.go
index c66740ff7..391b4cbd1 100644
--- a/vendor/github.com/prometheus/procfs/proc_ns.go
+++ b/vendor/github.com/prometheus/procfs/proc_ns.go
@@ -40,7 +40,7 @@ func (p Proc) Namespaces() (Namespaces, error) {
names, err := d.Readdirnames(-1)
if err != nil {
- return nil, fmt.Errorf("failed to read contents of ns dir: %v", err)
+ return nil, fmt.Errorf("failed to read contents of ns dir: %w", err)
}
ns := make(Namespaces, len(names))
@@ -52,13 +52,13 @@ func (p Proc) Namespaces() (Namespaces, error) {
fields := strings.SplitN(target, ":", 2)
if len(fields) != 2 {
- return nil, fmt.Errorf("failed to parse namespace type and inode from '%v'", target)
+ return nil, fmt.Errorf("failed to parse namespace type and inode from %q", target)
}
typ := fields[0]
inode, err := strconv.ParseUint(strings.Trim(fields[1], "[]"), 10, 32)
if err != nil {
- return nil, fmt.Errorf("failed to parse inode from '%v': %v", fields[1], err)
+ return nil, fmt.Errorf("failed to parse inode from %q: %w", fields[1], err)
}
ns[name] = Namespace{typ, uint32(inode)}
diff --git a/vendor/github.com/prometheus/procfs/proc_psi.go b/vendor/github.com/prometheus/procfs/proc_psi.go
index 0d7bee54c..dc6c14f0a 100644
--- a/vendor/github.com/prometheus/procfs/proc_psi.go
+++ b/vendor/github.com/prometheus/procfs/proc_psi.go
@@ -59,7 +59,7 @@ type PSIStats struct {
func (fs FS) PSIStatsForResource(resource string) (PSIStats, error) {
data, err := util.ReadFileNoStat(fs.proc.Path(fmt.Sprintf("%s/%s", "pressure", resource)))
if err != nil {
- return PSIStats{}, fmt.Errorf("psi_stats: unavailable for %s", resource)
+ return PSIStats{}, fmt.Errorf("psi_stats: unavailable for %q: %w", resource, err)
}
return parsePSIStats(resource, bytes.NewReader(data))
diff --git a/vendor/github.com/prometheus/procfs/proc_stat.go b/vendor/github.com/prometheus/procfs/proc_stat.go
index 4517d2e9d..67ca0e9fb 100644
--- a/vendor/github.com/prometheus/procfs/proc_stat.go
+++ b/vendor/github.com/prometheus/procfs/proc_stat.go
@@ -127,10 +127,7 @@ func (p Proc) Stat() (ProcStat, error) {
)
if l < 0 || r < 0 {
- return ProcStat{}, fmt.Errorf(
- "unexpected format, couldn't extract comm: %s",
- data,
- )
+ return ProcStat{}, fmt.Errorf("unexpected format, couldn't extract comm %q", data)
}
s.Comm = string(data[l+1 : r])
diff --git a/vendor/github.com/prometheus/procfs/schedstat.go b/vendor/github.com/prometheus/procfs/schedstat.go
index a4c4089ac..28228164e 100644
--- a/vendor/github.com/prometheus/procfs/schedstat.go
+++ b/vendor/github.com/prometheus/procfs/schedstat.go
@@ -95,24 +95,27 @@ func (fs FS) Schedstat() (*Schedstat, error) {
return stats, nil
}
-func parseProcSchedstat(contents string) (stats ProcSchedstat, err error) {
+func parseProcSchedstat(contents string) (ProcSchedstat, error) {
+ var (
+ stats ProcSchedstat
+ err error
+ )
match := procLineRE.FindStringSubmatch(contents)
if match != nil {
stats.RunningNanoseconds, err = strconv.ParseUint(match[1], 10, 64)
if err != nil {
- return
+ return stats, err
}
stats.WaitingNanoseconds, err = strconv.ParseUint(match[2], 10, 64)
if err != nil {
- return
+ return stats, err
}
stats.RunTimeslices, err = strconv.ParseUint(match[3], 10, 64)
- return
+ return stats, err
}
- err = errors.New("could not parse schedstat")
- return
+ return stats, errors.New("could not parse schedstat")
}
diff --git a/vendor/github.com/prometheus/procfs/slab.go b/vendor/github.com/prometheus/procfs/slab.go
new file mode 100644
index 000000000..7896fd724
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/slab.go
@@ -0,0 +1,151 @@
+// Copyright 2020 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package procfs
+
+import (
+ "bufio"
+ "bytes"
+ "fmt"
+ "regexp"
+ "strconv"
+ "strings"
+
+ "github.com/prometheus/procfs/internal/util"
+)
+
+var (
+ slabSpace = regexp.MustCompile(`\s+`)
+ slabVer = regexp.MustCompile(`slabinfo -`)
+ slabHeader = regexp.MustCompile(`# name`)
+)
+
+// Slab represents a slab pool in the kernel.
+type Slab struct {
+ Name string
+ ObjActive int64
+ ObjNum int64
+ ObjSize int64
+ ObjPerSlab int64
+ PagesPerSlab int64
+ // tunables
+ Limit int64
+ Batch int64
+ SharedFactor int64
+ SlabActive int64
+ SlabNum int64
+ SharedAvail int64
+}
+
+// SlabInfo represents info for all slabs.
+type SlabInfo struct {
+ Slabs []*Slab
+}
+
+func shouldParseSlab(line string) bool {
+ if slabVer.MatchString(line) {
+ return false
+ }
+ if slabHeader.MatchString(line) {
+ return false
+ }
+ return true
+}
+
+// parseV21SlabEntry is used to parse a line from /proc/slabinfo version 2.1.
+func parseV21SlabEntry(line string) (*Slab, error) {
+ // First cleanup whitespace.
+ l := slabSpace.ReplaceAllString(line, " ")
+ s := strings.Split(l, " ")
+ if len(s) != 16 {
+ return nil, fmt.Errorf("unable to parse: %q", line)
+ }
+ var err error
+ i := &Slab{Name: s[0]}
+ i.ObjActive, err = strconv.ParseInt(s[1], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.ObjNum, err = strconv.ParseInt(s[2], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.ObjSize, err = strconv.ParseInt(s[3], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.ObjPerSlab, err = strconv.ParseInt(s[4], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.PagesPerSlab, err = strconv.ParseInt(s[5], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.Limit, err = strconv.ParseInt(s[8], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.Batch, err = strconv.ParseInt(s[9], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.SharedFactor, err = strconv.ParseInt(s[10], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.SlabActive, err = strconv.ParseInt(s[13], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.SlabNum, err = strconv.ParseInt(s[14], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ i.SharedAvail, err = strconv.ParseInt(s[15], 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ return i, nil
+}
+
+// parseSlabInfo21 is used to parse a slabinfo 2.1 file.
+func parseSlabInfo21(r *bytes.Reader) (SlabInfo, error) {
+ scanner := bufio.NewScanner(r)
+ s := SlabInfo{Slabs: []*Slab{}}
+ for scanner.Scan() {
+ line := scanner.Text()
+ if !shouldParseSlab(line) {
+ continue
+ }
+ slab, err := parseV21SlabEntry(line)
+ if err != nil {
+ return s, err
+ }
+ s.Slabs = append(s.Slabs, slab)
+ }
+ return s, nil
+}
+
+// SlabInfo reads data from /proc/slabinfo
+func (fs FS) SlabInfo() (SlabInfo, error) {
+ // TODO: Consider passing options to allow for parsing different
+ // slabinfo versions. However, slabinfo 2.1 has been stable since
+ // kernel 2.6.10 and later.
+ data, err := util.ReadFileNoStat(fs.proc.Path("slabinfo"))
+ if err != nil {
+ return SlabInfo{}, err
+ }
+
+ return parseSlabInfo21(bytes.NewReader(data))
+}
diff --git a/vendor/github.com/prometheus/procfs/stat.go b/vendor/github.com/prometheus/procfs/stat.go
index b2a6fc994..6d8727541 100644
--- a/vendor/github.com/prometheus/procfs/stat.go
+++ b/vendor/github.com/prometheus/procfs/stat.go
@@ -93,10 +93,10 @@ func parseCPUStat(line string) (CPUStat, int64, error) {
&cpuStat.Guest, &cpuStat.GuestNice)
if err != nil && err != io.EOF {
- return CPUStat{}, -1, fmt.Errorf("couldn't parse %s (cpu): %s", line, err)
+ return CPUStat{}, -1, fmt.Errorf("couldn't parse %q (cpu): %w", line, err)
}
if count == 0 {
- return CPUStat{}, -1, fmt.Errorf("couldn't parse %s (cpu): 0 elements parsed", line)
+ return CPUStat{}, -1, fmt.Errorf("couldn't parse %q (cpu): 0 elements parsed", line)
}
cpuStat.User /= userHZ
@@ -116,7 +116,7 @@ func parseCPUStat(line string) (CPUStat, int64, error) {
cpuID, err := strconv.ParseInt(cpu[3:], 10, 64)
if err != nil {
- return CPUStat{}, -1, fmt.Errorf("couldn't parse %s (cpu/cpuid): %s", line, err)
+ return CPUStat{}, -1, fmt.Errorf("couldn't parse %q (cpu/cpuid): %w", line, err)
}
return cpuStat, cpuID, nil
@@ -136,7 +136,7 @@ func parseSoftIRQStat(line string) (SoftIRQStat, uint64, error) {
&softIRQStat.Hrtimer, &softIRQStat.Rcu)
if err != nil {
- return SoftIRQStat{}, 0, fmt.Errorf("couldn't parse %s (softirq): %s", line, err)
+ return SoftIRQStat{}, 0, fmt.Errorf("couldn't parse %q (softirq): %w", line, err)
}
return softIRQStat, total, nil
@@ -184,34 +184,34 @@ func (fs FS) Stat() (Stat, error) {
switch {
case parts[0] == "btime":
if stat.BootTime, err = strconv.ParseUint(parts[1], 10, 64); err != nil {
- return Stat{}, fmt.Errorf("couldn't parse %s (btime): %s", parts[1], err)
+ return Stat{}, fmt.Errorf("couldn't parse %q (btime): %w", parts[1], err)
}
case parts[0] == "intr":
if stat.IRQTotal, err = strconv.ParseUint(parts[1], 10, 64); err != nil {
- return Stat{}, fmt.Errorf("couldn't parse %s (intr): %s", parts[1], err)
+ return Stat{}, fmt.Errorf("couldn't parse %q (intr): %w", parts[1], err)
}
numberedIRQs := parts[2:]
stat.IRQ = make([]uint64, len(numberedIRQs))
for i, count := range numberedIRQs {
if stat.IRQ[i], err = strconv.ParseUint(count, 10, 64); err != nil {
- return Stat{}, fmt.Errorf("couldn't parse %s (intr%d): %s", count, i, err)
+ return Stat{}, fmt.Errorf("couldn't parse %q (intr%d): %w", count, i, err)
}
}
case parts[0] == "ctxt":
if stat.ContextSwitches, err = strconv.ParseUint(parts[1], 10, 64); err != nil {
- return Stat{}, fmt.Errorf("couldn't parse %s (ctxt): %s", parts[1], err)
+ return Stat{}, fmt.Errorf("couldn't parse %q (ctxt): %w", parts[1], err)
}
case parts[0] == "processes":
if stat.ProcessCreated, err = strconv.ParseUint(parts[1], 10, 64); err != nil {
- return Stat{}, fmt.Errorf("couldn't parse %s (processes): %s", parts[1], err)
+ return Stat{}, fmt.Errorf("couldn't parse %q (processes): %w", parts[1], err)
}
case parts[0] == "procs_running":
if stat.ProcessesRunning, err = strconv.ParseUint(parts[1], 10, 64); err != nil {
- return Stat{}, fmt.Errorf("couldn't parse %s (procs_running): %s", parts[1], err)
+ return Stat{}, fmt.Errorf("couldn't parse %q (procs_running): %w", parts[1], err)
}
case parts[0] == "procs_blocked":
if stat.ProcessesBlocked, err = strconv.ParseUint(parts[1], 10, 64); err != nil {
- return Stat{}, fmt.Errorf("couldn't parse %s (procs_blocked): %s", parts[1], err)
+ return Stat{}, fmt.Errorf("couldn't parse %q (procs_blocked): %w", parts[1], err)
}
case parts[0] == "softirq":
softIRQStats, total, err := parseSoftIRQStat(line)
@@ -237,7 +237,7 @@ func (fs FS) Stat() (Stat, error) {
}
if err := scanner.Err(); err != nil {
- return Stat{}, fmt.Errorf("couldn't parse %s: %s", fileName, err)
+ return Stat{}, fmt.Errorf("couldn't parse %q: %w", fileName, err)
}
return stat, nil
diff --git a/vendor/github.com/prometheus/procfs/xfrm.go b/vendor/github.com/prometheus/procfs/xfrm.go
index 30aa417d5..eed07c7d7 100644
--- a/vendor/github.com/prometheus/procfs/xfrm.go
+++ b/vendor/github.com/prometheus/procfs/xfrm.go
@@ -112,8 +112,7 @@ func (fs FS) NewXfrmStat() (XfrmStat, error) {
fields := strings.Fields(s.Text())
if len(fields) != 2 {
- return XfrmStat{}, fmt.Errorf(
- "couldn't parse %s line %s", file.Name(), s.Text())
+ return XfrmStat{}, fmt.Errorf("couldn't parse %q line %q", file.Name(), s.Text())
}
name := fields[0]
diff --git a/vendor/github.com/prometheus/procfs/zoneinfo.go b/vendor/github.com/prometheus/procfs/zoneinfo.go
index e941503d5..0b9bb6796 100644
--- a/vendor/github.com/prometheus/procfs/zoneinfo.go
+++ b/vendor/github.com/prometheus/procfs/zoneinfo.go
@@ -74,11 +74,11 @@ var nodeZoneRE = regexp.MustCompile(`(\d+), zone\s+(\w+)`)
func (fs FS) Zoneinfo() ([]Zoneinfo, error) {
data, err := ioutil.ReadFile(fs.proc.Path("zoneinfo"))
if err != nil {
- return nil, fmt.Errorf("error reading zoneinfo %s: %s", fs.proc.Path("zoneinfo"), err)
+ return nil, fmt.Errorf("error reading zoneinfo %q: %w", fs.proc.Path("zoneinfo"), err)
}
zoneinfo, err := parseZoneinfo(data)
if err != nil {
- return nil, fmt.Errorf("error parsing zoneinfo %s: %s", fs.proc.Path("zoneinfo"), err)
+ return nil, fmt.Errorf("error parsing zoneinfo %q: %w", fs.proc.Path("zoneinfo"), err)
}
return zoneinfo, nil
}
diff --git a/vendor/github.com/ulikunitz/xz/LICENSE b/vendor/github.com/ulikunitz/xz/LICENSE
index d32149979..009b84870 100644
--- a/vendor/github.com/ulikunitz/xz/LICENSE
+++ b/vendor/github.com/ulikunitz/xz/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2014-2020 Ulrich Kunitz
+Copyright (c) 2014-2021 Ulrich Kunitz
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/vendor/github.com/ulikunitz/xz/TODO.md b/vendor/github.com/ulikunitz/xz/TODO.md
index 88c7341c8..594e0c7fe 100644
--- a/vendor/github.com/ulikunitz/xz/TODO.md
+++ b/vendor/github.com/ulikunitz/xz/TODO.md
@@ -86,6 +86,14 @@
## Log
+### 2021-02-02
+
+Mituo Heijo has fuzzed xz and found a bug in the function readIndexBody. The
+function allocated a slice of records immediately after reading the value
+without further checks. Since the number has been too large the make function
+did panic. The fix is to check the number against the expected number of records
+before allocating the records.
+
### 2020-12-17
Release v0.5.9 fixes warnings, a typo and adds SECURITY.md.
diff --git a/vendor/github.com/ulikunitz/xz/bits.go b/vendor/github.com/ulikunitz/xz/bits.go
index dc8f32860..e48450c2c 100644
--- a/vendor/github.com/ulikunitz/xz/bits.go
+++ b/vendor/github.com/ulikunitz/xz/bits.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/crc.go b/vendor/github.com/ulikunitz/xz/crc.go
index 638774ada..a5c57fb61 100644
--- a/vendor/github.com/ulikunitz/xz/crc.go
+++ b/vendor/github.com/ulikunitz/xz/crc.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/format.go b/vendor/github.com/ulikunitz/xz/format.go
index 84b58c9dd..c98c12dfd 100644
--- a/vendor/github.com/ulikunitz/xz/format.go
+++ b/vendor/github.com/ulikunitz/xz/format.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -662,7 +662,7 @@ func writeIndex(w io.Writer, index []record) (n int64, err error) {
// readIndexBody reads the index from the reader. It assumes that the
// index indicator has already been read.
-func readIndexBody(r io.Reader) (records []record, n int64, err error) {
+func readIndexBody(r io.Reader, expectedRecordLen int) (records []record, n int64, err error) {
crc := crc32.NewIEEE()
// index indicator
crc.Write([]byte{0})
@@ -679,6 +679,11 @@ func readIndexBody(r io.Reader) (records []record, n int64, err error) {
if recLen < 0 || uint64(recLen) != u {
return nil, n, errors.New("xz: record number overflow")
}
+ if recLen != expectedRecordLen {
+ return nil, n, fmt.Errorf(
+ "xz: index length is %d; want %d",
+ recLen, expectedRecordLen)
+ }
// list of records
records = make([]record, recLen)
diff --git a/vendor/github.com/ulikunitz/xz/internal/hash/cyclic_poly.go b/vendor/github.com/ulikunitz/xz/internal/hash/cyclic_poly.go
index f2861ba3f..f723cf252 100644
--- a/vendor/github.com/ulikunitz/xz/internal/hash/cyclic_poly.go
+++ b/vendor/github.com/ulikunitz/xz/internal/hash/cyclic_poly.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/internal/hash/doc.go b/vendor/github.com/ulikunitz/xz/internal/hash/doc.go
index e28d23be4..cc60a6b5c 100644
--- a/vendor/github.com/ulikunitz/xz/internal/hash/doc.go
+++ b/vendor/github.com/ulikunitz/xz/internal/hash/doc.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/internal/hash/rabin_karp.go b/vendor/github.com/ulikunitz/xz/internal/hash/rabin_karp.go
index b8e66d972..c6432913f 100644
--- a/vendor/github.com/ulikunitz/xz/internal/hash/rabin_karp.go
+++ b/vendor/github.com/ulikunitz/xz/internal/hash/rabin_karp.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/internal/hash/roller.go b/vendor/github.com/ulikunitz/xz/internal/hash/roller.go
index 34c81b38a..f1de88b44 100644
--- a/vendor/github.com/ulikunitz/xz/internal/hash/roller.go
+++ b/vendor/github.com/ulikunitz/xz/internal/hash/roller.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/internal/xlog/xlog.go b/vendor/github.com/ulikunitz/xz/internal/xlog/xlog.go
index 678b5a058..6c20c77ba 100644
--- a/vendor/github.com/ulikunitz/xz/internal/xlog/xlog.go
+++ b/vendor/github.com/ulikunitz/xz/internal/xlog/xlog.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/bintree.go b/vendor/github.com/ulikunitz/xz/lzma/bintree.go
index 527ea19a7..2a7bd19ec 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/bintree.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/bintree.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/bitops.go b/vendor/github.com/ulikunitz/xz/lzma/bitops.go
index d4309f97e..d2c07e8c9 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/bitops.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/bitops.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/breader.go b/vendor/github.com/ulikunitz/xz/lzma/breader.go
index 4ad09a14e..939be8845 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/breader.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/breader.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/buffer.go b/vendor/github.com/ulikunitz/xz/lzma/buffer.go
index 9cb7838ac..2761de5f0 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/buffer.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/buffer.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/bytewriter.go b/vendor/github.com/ulikunitz/xz/lzma/bytewriter.go
index 290606ddc..040874c1a 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/bytewriter.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/bytewriter.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/decoder.go b/vendor/github.com/ulikunitz/xz/lzma/decoder.go
index 4b820792a..cbb943a06 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/decoder.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/decoder.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/decoderdict.go b/vendor/github.com/ulikunitz/xz/lzma/decoderdict.go
index dd44e6625..8cd616ef9 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/decoderdict.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/decoderdict.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/directcodec.go b/vendor/github.com/ulikunitz/xz/lzma/directcodec.go
index 064642831..20b256a9d 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/directcodec.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/directcodec.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/distcodec.go b/vendor/github.com/ulikunitz/xz/lzma/distcodec.go
index 9ed486d27..60ed9aef1 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/distcodec.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/distcodec.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/encoder.go b/vendor/github.com/ulikunitz/xz/lzma/encoder.go
index 59055eb64..5ed057a71 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/encoder.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/encoder.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/encoderdict.go b/vendor/github.com/ulikunitz/xz/lzma/encoderdict.go
index c36308d7c..056f89757 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/encoderdict.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/encoderdict.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/hashtable.go b/vendor/github.com/ulikunitz/xz/lzma/hashtable.go
index e82970eac..0fb7910bc 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/hashtable.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/hashtable.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/header.go b/vendor/github.com/ulikunitz/xz/lzma/header.go
index cda39462c..04276c816 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/header.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/header.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/header2.go b/vendor/github.com/ulikunitz/xz/lzma/header2.go
index ffeca35c3..be54dd85f 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/header2.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/header2.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/lengthcodec.go b/vendor/github.com/ulikunitz/xz/lzma/lengthcodec.go
index 35b064064..6e0edfc8c 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/lengthcodec.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/lengthcodec.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/literalcodec.go b/vendor/github.com/ulikunitz/xz/lzma/literalcodec.go
index 7b1ad1d9b..0bfc763ce 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/literalcodec.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/literalcodec.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go b/vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go
index 7d03ec0dc..96ebda0fd 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/operation.go b/vendor/github.com/ulikunitz/xz/lzma/operation.go
index 2f9b78ea5..026ce48af 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/operation.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/operation.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/prob.go b/vendor/github.com/ulikunitz/xz/lzma/prob.go
index 6987a166f..9a2648e0f 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/prob.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/prob.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/properties.go b/vendor/github.com/ulikunitz/xz/lzma/properties.go
index 662feba87..f229fc9fe 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/properties.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/properties.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/rangecodec.go b/vendor/github.com/ulikunitz/xz/lzma/rangecodec.go
index 7b299abfe..57f1ab904 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/rangecodec.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/rangecodec.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/reader.go b/vendor/github.com/ulikunitz/xz/lzma/reader.go
index 7b7eef31f..2ed13c886 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/reader.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/reader.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/reader2.go b/vendor/github.com/ulikunitz/xz/lzma/reader2.go
index e34c23f9c..de3da37ee 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/reader2.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/reader2.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/state.go b/vendor/github.com/ulikunitz/xz/lzma/state.go
index fbe3a3942..09d62f7d9 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/state.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/state.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/treecodecs.go b/vendor/github.com/ulikunitz/xz/lzma/treecodecs.go
index 1cb3596fe..6e927e935 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/treecodecs.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/treecodecs.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/writer.go b/vendor/github.com/ulikunitz/xz/lzma/writer.go
index 5803ecca9..d0d220fe1 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/writer.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/writer.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzma/writer2.go b/vendor/github.com/ulikunitz/xz/lzma/writer2.go
index c263b0666..dfaaec95b 100644
--- a/vendor/github.com/ulikunitz/xz/lzma/writer2.go
+++ b/vendor/github.com/ulikunitz/xz/lzma/writer2.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/lzmafilter.go b/vendor/github.com/ulikunitz/xz/lzmafilter.go
index 6f4aa2c09..4f1bb3393 100644
--- a/vendor/github.com/ulikunitz/xz/lzmafilter.go
+++ b/vendor/github.com/ulikunitz/xz/lzmafilter.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/none-check.go b/vendor/github.com/ulikunitz/xz/none-check.go
index e12d8e476..95240135d 100644
--- a/vendor/github.com/ulikunitz/xz/none-check.go
+++ b/vendor/github.com/ulikunitz/xz/none-check.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/ulikunitz/xz/reader.go b/vendor/github.com/ulikunitz/xz/reader.go
index 795858914..7f974ffc5 100644
--- a/vendor/github.com/ulikunitz/xz/reader.go
+++ b/vendor/github.com/ulikunitz/xz/reader.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -160,17 +160,14 @@ func (c ReaderConfig) newStreamReader(xz io.Reader) (r *streamReader, err error)
// readTail reads the index body and the xz footer.
func (r *streamReader) readTail() error {
- index, n, err := readIndexBody(r.xz)
+ index, n, err := readIndexBody(r.xz, len(r.index))
if err != nil {
if err == io.EOF {
err = io.ErrUnexpectedEOF
}
return err
}
- if len(index) != len(r.index) {
- return fmt.Errorf("xz: index length is %d; want %d",
- len(index), len(r.index))
- }
+
for i, rec := range r.index {
if rec != index[i] {
return fmt.Errorf("xz: record %d is %v; want %v",
diff --git a/vendor/github.com/ulikunitz/xz/writer.go b/vendor/github.com/ulikunitz/xz/writer.go
index a9ed44912..6b3a66620 100644
--- a/vendor/github.com/ulikunitz/xz/writer.go
+++ b/vendor/github.com/ulikunitz/xz/writer.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/github.com/vbauerster/mpb/v6/.gitignore b/vendor/github.com/vbauerster/mpb/v6/.gitignore
new file mode 100644
index 000000000..63bd91672
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/.gitignore
@@ -0,0 +1,5 @@
+# Test binary, build with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
diff --git a/vendor/github.com/vbauerster/mpb/v6/.travis.yml b/vendor/github.com/vbauerster/mpb/v6/.travis.yml
new file mode 100644
index 000000000..9a203a67d
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/.travis.yml
@@ -0,0 +1,11 @@
+language: go
+arch:
+ - amd64
+ - ppc64le
+
+go:
+ - 1.14.x
+
+script:
+ - go test -race ./...
+ - for i in _examples/*/; do go build $i/*.go || exit 1; done
diff --git a/vendor/github.com/vbauerster/mpb/v6/README.md b/vendor/github.com/vbauerster/mpb/v6/README.md
new file mode 100644
index 000000000..a87786d72
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/README.md
@@ -0,0 +1,120 @@
+# Multi Progress Bar
+
+[![GoDoc](https://pkg.go.dev/badge/github.com/vbauerster/mpb)](https://pkg.go.dev/github.com/vbauerster/mpb/v6)
+[![Build Status](https://travis-ci.org/vbauerster/mpb.svg?branch=master)](https://travis-ci.org/vbauerster/mpb)
+[![Go Report Card](https://goreportcard.com/badge/github.com/vbauerster/mpb)](https://goreportcard.com/report/github.com/vbauerster/mpb)
+
+**mpb** is a Go lib for rendering progress bars in terminal applications.
+
+## Features
+
+- **Multiple Bars**: Multiple progress bars are supported
+- **Dynamic Total**: Set total while bar is running
+- **Dynamic Add/Remove**: Dynamically add or remove bars
+- **Cancellation**: Cancel whole rendering process
+- **Predefined Decorators**: Elapsed time, [ewma](https://github.com/VividCortex/ewma) based ETA, Percentage, Bytes counter
+- **Decorator's width sync**: Synchronized decorator's width among multiple bars
+
+## Usage
+
+#### [Rendering single bar](_examples/singleBar/main.go)
+
+```go
+package main
+
+import (
+ "math/rand"
+ "time"
+
+ "github.com/vbauerster/mpb/v6"
+ "github.com/vbauerster/mpb/v6/decor"
+)
+
+func main() {
+ // initialize progress container, with custom width
+ p := mpb.New(mpb.WithWidth(64))
+
+ total := 100
+ name := "Single Bar:"
+ // adding a single bar, which will inherit container's width
+ bar := p.Add(int64(total),
+ // progress bar filler with customized style
+ mpb.NewBarFiller("╢▌▌░╟"),
+ mpb.PrependDecorators(
+ // display our name with one space on the right
+ decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}),
+ // replace ETA decorator with "done" message, OnComplete event
+ decor.OnComplete(
+ decor.AverageETA(decor.ET_STYLE_GO, decor.WC{W: 4}), "done",
+ ),
+ ),
+ mpb.AppendDecorators(decor.Percentage()),
+ )
+ // simulating some work
+ max := 100 * time.Millisecond
+ for i := 0; i < total; i++ {
+ time.Sleep(time.Duration(rand.Intn(10)+1) * max / 10)
+ bar.Increment()
+ }
+ // wait for our bar to complete and flush
+ p.Wait()
+}
+```
+
+#### [Rendering multiple bars](_examples/multiBars/main.go)
+
+```go
+ var wg sync.WaitGroup
+ // pass &wg (optional), so p will wait for it eventually
+ p := mpb.New(mpb.WithWaitGroup(&wg))
+ total, numBars := 100, 3
+ wg.Add(numBars)
+
+ for i := 0; i < numBars; i++ {
+ name := fmt.Sprintf("Bar#%d:", i)
+ bar := p.AddBar(int64(total),
+ mpb.PrependDecorators(
+ // simple name decorator
+ decor.Name(name),
+ // decor.DSyncWidth bit enables column width synchronization
+ decor.Percentage(decor.WCSyncSpace),
+ ),
+ mpb.AppendDecorators(
+ // replace ETA decorator with "done" message, OnComplete event
+ decor.OnComplete(
+ // ETA decorator with ewma age of 60
+ decor.EwmaETA(decor.ET_STYLE_GO, 60), "done",
+ ),
+ ),
+ )
+ // simulating some work
+ go func() {
+ defer wg.Done()
+ rng := rand.New(rand.NewSource(time.Now().UnixNano()))
+ max := 100 * time.Millisecond
+ for i := 0; i < total; i++ {
+ // start variable is solely for EWMA calculation
+ // EWMA's unit of measure is an iteration's duration
+ start := time.Now()
+ time.Sleep(time.Duration(rng.Intn(10)+1) * max / 10)
+ bar.Increment()
+ // we need to call DecoratorEwmaUpdate to fulfill ewma decorator's contract
+ bar.DecoratorEwmaUpdate(time.Since(start))
+ }
+ }()
+ }
+ // Waiting for passed &wg and for all bars to complete and flush
+ p.Wait()
+```
+
+#### [Dynamic total](_examples/dynTotal/main.go)
+
+![dynamic total](_svg/godEMrCZmJkHYH1X9dN4Nm0U7.svg)
+
+#### [Complex example](_examples/complex/main.go)
+
+![complex](_svg/wHzf1M7sd7B3zVa2scBMnjqRf.svg)
+
+#### [Bytes counters](_examples/io/main.go)
+
+![byte counters](_svg/hIpTa3A5rQz65ssiVuRJu87X6.svg)
diff --git a/vendor/github.com/vbauerster/mpb/v6/UNLICENSE b/vendor/github.com/vbauerster/mpb/v6/UNLICENSE
new file mode 100644
index 000000000..68a49daad
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/UNLICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
diff --git a/vendor/github.com/vbauerster/mpb/v6/bar.go b/vendor/github.com/vbauerster/mpb/v6/bar.go
new file mode 100644
index 000000000..f18ef967f
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/bar.go
@@ -0,0 +1,492 @@
+package mpb
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "io"
+ "log"
+ "runtime/debug"
+ "strings"
+ "time"
+
+ "github.com/acarl005/stripansi"
+ "github.com/mattn/go-runewidth"
+ "github.com/vbauerster/mpb/v6/decor"
+)
+
+// Bar represents a progress bar.
+type Bar struct {
+ priority int // used by heap
+ index int // used by heap
+
+ extendedLines int
+ toShutdown bool
+ toDrop bool
+ noPop bool
+ hasEwmaDecorators bool
+ operateState chan func(*bState)
+ frameCh chan io.Reader
+ syncTableCh chan [][]chan int
+ completed chan bool
+
+ // cancel is called either by user or on complete event
+ cancel func()
+ // done is closed after cacheState is assigned
+ done chan struct{}
+ // cacheState is populated, right after close(shutdown)
+ cacheState *bState
+
+ container *Progress
+ dlogger *log.Logger
+ recoveredPanic interface{}
+}
+
+type extenderFunc func(in io.Reader, reqWidth int, st decor.Statistics) (out io.Reader, lines int)
+
+// bState is actual bar state. It gets passed to *Bar.serve(...) monitor
+// goroutine.
+type bState struct {
+ id int
+ priority int
+ reqWidth int
+ total int64
+ current int64
+ refill int64
+ lastN int64
+ iterated bool
+ trimSpace bool
+ completed bool
+ completeFlushed bool
+ triggerComplete bool
+ dropOnComplete bool
+ noPop bool
+ aDecorators []decor.Decorator
+ pDecorators []decor.Decorator
+ averageDecorators []decor.AverageDecorator
+ ewmaDecorators []decor.EwmaDecorator
+ shutdownListeners []decor.ShutdownListener
+ bufP, bufB, bufA *bytes.Buffer
+ filler BarFiller
+ middleware func(BarFiller) BarFiller
+ extender extenderFunc
+
+ // runningBar is a key for *pState.parkedBars
+ runningBar *Bar
+
+ debugOut io.Writer
+}
+
+func newBar(container *Progress, bs *bState) *Bar {
+ logPrefix := fmt.Sprintf("%sbar#%02d ", container.dlogger.Prefix(), bs.id)
+ ctx, cancel := context.WithCancel(container.ctx)
+
+ bar := &Bar{
+ container: container,
+ priority: bs.priority,
+ toDrop: bs.dropOnComplete,
+ noPop: bs.noPop,
+ operateState: make(chan func(*bState)),
+ frameCh: make(chan io.Reader, 1),
+ syncTableCh: make(chan [][]chan int, 1),
+ completed: make(chan bool, 1),
+ done: make(chan struct{}),
+ cancel: cancel,
+ dlogger: log.New(bs.debugOut, logPrefix, log.Lshortfile),
+ }
+
+ go bar.serve(ctx, bs)
+ return bar
+}
+
+// ProxyReader wraps r with metrics required for progress tracking.
+// Panics if r is nil.
+func (b *Bar) ProxyReader(r io.Reader) io.ReadCloser {
+ if r == nil {
+ panic("expected non nil io.Reader")
+ }
+ return newProxyReader(r, b)
+}
+
+// ID returs id of the bar.
+func (b *Bar) ID() int {
+ result := make(chan int)
+ select {
+ case b.operateState <- func(s *bState) { result <- s.id }:
+ return <-result
+ case <-b.done:
+ return b.cacheState.id
+ }
+}
+
+// Current returns bar's current number, in other words sum of all increments.
+func (b *Bar) Current() int64 {
+ result := make(chan int64)
+ select {
+ case b.operateState <- func(s *bState) { result <- s.current }:
+ return <-result
+ case <-b.done:
+ return b.cacheState.current
+ }
+}
+
+// SetRefill sets refill flag with specified amount.
+// The underlying BarFiller will change its visual representation, to
+// indicate refill event. Refill event may be referred to some retry
+// operation for example.
+func (b *Bar) SetRefill(amount int64) {
+ select {
+ case b.operateState <- func(s *bState) {
+ s.refill = amount
+ }:
+ case <-b.done:
+ }
+}
+
+// TraverseDecorators traverses all available decorators and calls cb func on each.
+func (b *Bar) TraverseDecorators(cb func(decor.Decorator)) {
+ select {
+ case b.operateState <- func(s *bState) {
+ for _, decorators := range [...][]decor.Decorator{
+ s.pDecorators,
+ s.aDecorators,
+ } {
+ for _, d := range decorators {
+ cb(extractBaseDecorator(d))
+ }
+ }
+ }:
+ case <-b.done:
+ }
+}
+
+// SetTotal sets total dynamically.
+// If total is less than or equal to zero it takes progress' current value.
+func (b *Bar) SetTotal(total int64, triggerComplete bool) {
+ select {
+ case b.operateState <- func(s *bState) {
+ s.triggerComplete = triggerComplete
+ if total <= 0 {
+ s.total = s.current
+ } else {
+ s.total = total
+ }
+ if s.triggerComplete && !s.completed {
+ s.current = s.total
+ s.completed = true
+ go b.refreshTillShutdown()
+ }
+ }:
+ case <-b.done:
+ }
+}
+
+// SetCurrent sets progress' current to an arbitrary value.
+// Setting a negative value will cause a panic.
+func (b *Bar) SetCurrent(current int64) {
+ select {
+ case b.operateState <- func(s *bState) {
+ s.iterated = true
+ s.lastN = current - s.current
+ s.current = current
+ if s.triggerComplete && s.current >= s.total {
+ s.current = s.total
+ s.completed = true
+ go b.refreshTillShutdown()
+ }
+ }:
+ case <-b.done:
+ }
+}
+
+// Increment is a shorthand for b.IncrInt64(1).
+func (b *Bar) Increment() {
+ b.IncrInt64(1)
+}
+
+// IncrBy is a shorthand for b.IncrInt64(int64(n)).
+func (b *Bar) IncrBy(n int) {
+ b.IncrInt64(int64(n))
+}
+
+// IncrInt64 increments progress by amount of n.
+func (b *Bar) IncrInt64(n int64) {
+ select {
+ case b.operateState <- func(s *bState) {
+ s.iterated = true
+ s.lastN = n
+ s.current += n
+ if s.triggerComplete && s.current >= s.total {
+ s.current = s.total
+ s.completed = true
+ go b.refreshTillShutdown()
+ }
+ }:
+ case <-b.done:
+ }
+}
+
+// DecoratorEwmaUpdate updates all EWMA based decorators. Should be
+// called on each iteration, because EWMA's unit of measure is an
+// iteration's duration. Panics if called before *Bar.Incr... family
+// methods.
+func (b *Bar) DecoratorEwmaUpdate(dur time.Duration) {
+ select {
+ case b.operateState <- func(s *bState) {
+ ewmaIterationUpdate(false, s, dur)
+ }:
+ case <-b.done:
+ ewmaIterationUpdate(true, b.cacheState, dur)
+ }
+}
+
+// DecoratorAverageAdjust adjusts all average based decorators. Call
+// if you need to adjust start time of all average based decorators
+// or after progress resume.
+func (b *Bar) DecoratorAverageAdjust(start time.Time) {
+ select {
+ case b.operateState <- func(s *bState) {
+ for _, d := range s.averageDecorators {
+ d.AverageAdjust(start)
+ }
+ }:
+ case <-b.done:
+ }
+}
+
+// SetPriority changes bar's order among multiple bars. Zero is highest
+// priority, i.e. bar will be on top. If you don't need to set priority
+// dynamically, better use BarPriority option.
+func (b *Bar) SetPriority(priority int) {
+ select {
+ case <-b.done:
+ default:
+ b.container.setBarPriority(b, priority)
+ }
+}
+
+// Abort interrupts bar's running goroutine. Call this, if you'd like
+// to stop/remove bar before completion event. It has no effect after
+// completion event. If drop is true bar will be removed as well.
+func (b *Bar) Abort(drop bool) {
+ select {
+ case <-b.done:
+ default:
+ if drop {
+ b.container.dropBar(b)
+ }
+ b.cancel()
+ }
+}
+
+// Completed reports whether the bar is in completed state.
+func (b *Bar) Completed() bool {
+ select {
+ case b.operateState <- func(s *bState) { b.completed <- s.completed }:
+ return <-b.completed
+ case <-b.done:
+ return true
+ }
+}
+
+func (b *Bar) serve(ctx context.Context, s *bState) {
+ defer b.container.bwg.Done()
+ for {
+ select {
+ case op := <-b.operateState:
+ op(s)
+ case <-ctx.Done():
+ b.cacheState = s
+ close(b.done)
+ // Notifying decorators about shutdown event
+ for _, sl := range s.shutdownListeners {
+ sl.Shutdown()
+ }
+ return
+ }
+ }
+}
+
+func (b *Bar) render(tw int) {
+ select {
+ case b.operateState <- func(s *bState) {
+ stat := newStatistics(tw, s)
+ defer func() {
+ // recovering if user defined decorator panics for example
+ if p := recover(); p != nil {
+ if b.recoveredPanic == nil {
+ s.extender = makePanicExtender(p)
+ b.toShutdown = !b.toShutdown
+ b.recoveredPanic = p
+ }
+ frame, lines := s.extender(nil, s.reqWidth, stat)
+ b.extendedLines = lines
+ b.frameCh <- frame
+ b.dlogger.Println(p)
+ }
+ s.completeFlushed = s.completed
+ }()
+ frame, lines := s.extender(s.draw(stat), s.reqWidth, stat)
+ b.extendedLines = lines
+ b.toShutdown = s.completed && !s.completeFlushed
+ b.frameCh <- frame
+ }:
+ case <-b.done:
+ s := b.cacheState
+ stat := newStatistics(tw, s)
+ var r io.Reader
+ if b.recoveredPanic == nil {
+ r = s.draw(stat)
+ }
+ frame, lines := s.extender(r, s.reqWidth, stat)
+ b.extendedLines = lines
+ b.frameCh <- frame
+ }
+}
+
+func (b *Bar) subscribeDecorators() {
+ var averageDecorators []decor.AverageDecorator
+ var ewmaDecorators []decor.EwmaDecorator
+ var shutdownListeners []decor.ShutdownListener
+ b.TraverseDecorators(func(d decor.Decorator) {
+ if d, ok := d.(decor.AverageDecorator); ok {
+ averageDecorators = append(averageDecorators, d)
+ }
+ if d, ok := d.(decor.EwmaDecorator); ok {
+ ewmaDecorators = append(ewmaDecorators, d)
+ }
+ if d, ok := d.(decor.ShutdownListener); ok {
+ shutdownListeners = append(shutdownListeners, d)
+ }
+ })
+ select {
+ case b.operateState <- func(s *bState) {
+ s.averageDecorators = averageDecorators
+ s.ewmaDecorators = ewmaDecorators
+ s.shutdownListeners = shutdownListeners
+ }:
+ b.hasEwmaDecorators = len(ewmaDecorators) != 0
+ case <-b.done:
+ }
+}
+
+func (b *Bar) refreshTillShutdown() {
+ for {
+ select {
+ case b.container.refreshCh <- time.Now():
+ case <-b.done:
+ return
+ }
+ }
+}
+
+func (b *Bar) wSyncTable() [][]chan int {
+ select {
+ case b.operateState <- func(s *bState) { b.syncTableCh <- s.wSyncTable() }:
+ return <-b.syncTableCh
+ case <-b.done:
+ return b.cacheState.wSyncTable()
+ }
+}
+
+func (s *bState) draw(stat decor.Statistics) io.Reader {
+ if !s.trimSpace {
+ stat.AvailableWidth -= 2
+ s.bufB.WriteByte(' ')
+ defer s.bufB.WriteByte(' ')
+ }
+
+ nlr := strings.NewReader("\n")
+ tw := stat.AvailableWidth
+ for _, d := range s.pDecorators {
+ str := d.Decor(stat)
+ stat.AvailableWidth -= runewidth.StringWidth(stripansi.Strip(str))
+ s.bufP.WriteString(str)
+ }
+ if stat.AvailableWidth <= 0 {
+ trunc := strings.NewReader(runewidth.Truncate(stripansi.Strip(s.bufP.String()), tw, "…"))
+ s.bufP.Reset()
+ return io.MultiReader(trunc, s.bufB, nlr)
+ }
+
+ tw = stat.AvailableWidth
+ for _, d := range s.aDecorators {
+ str := d.Decor(stat)
+ stat.AvailableWidth -= runewidth.StringWidth(stripansi.Strip(str))
+ s.bufA.WriteString(str)
+ }
+ if stat.AvailableWidth <= 0 {
+ trunc := strings.NewReader(runewidth.Truncate(stripansi.Strip(s.bufA.String()), tw, "…"))
+ s.bufA.Reset()
+ return io.MultiReader(s.bufP, s.bufB, trunc, nlr)
+ }
+
+ s.filler.Fill(s.bufB, s.reqWidth, stat)
+
+ return io.MultiReader(s.bufP, s.bufB, s.bufA, nlr)
+}
+
+func (s *bState) wSyncTable() [][]chan int {
+ columns := make([]chan int, 0, len(s.pDecorators)+len(s.aDecorators))
+ var pCount int
+ for _, d := range s.pDecorators {
+ if ch, ok := d.Sync(); ok {
+ columns = append(columns, ch)
+ pCount++
+ }
+ }
+ var aCount int
+ for _, d := range s.aDecorators {
+ if ch, ok := d.Sync(); ok {
+ columns = append(columns, ch)
+ aCount++
+ }
+ }
+ table := make([][]chan int, 2)
+ table[0] = columns[0:pCount]
+ table[1] = columns[pCount : pCount+aCount : pCount+aCount]
+ return table
+}
+
+func newStatistics(tw int, s *bState) decor.Statistics {
+ return decor.Statistics{
+ ID: s.id,
+ AvailableWidth: tw,
+ Total: s.total,
+ Current: s.current,
+ Refill: s.refill,
+ Completed: s.completeFlushed,
+ }
+}
+
+func extractBaseDecorator(d decor.Decorator) decor.Decorator {
+ if d, ok := d.(decor.Wrapper); ok {
+ return extractBaseDecorator(d.Base())
+ }
+ return d
+}
+
+func ewmaIterationUpdate(done bool, s *bState, dur time.Duration) {
+ if !done && !s.iterated {
+ panic("increment required before ewma iteration update")
+ } else {
+ s.iterated = false
+ }
+ for _, d := range s.ewmaDecorators {
+ d.EwmaUpdate(s.lastN, dur)
+ }
+}
+
+func makePanicExtender(p interface{}) extenderFunc {
+ pstr := fmt.Sprint(p)
+ stack := debug.Stack()
+ stackLines := bytes.Count(stack, []byte("\n"))
+ return func(_ io.Reader, _ int, st decor.Statistics) (io.Reader, int) {
+ mr := io.MultiReader(
+ strings.NewReader(runewidth.Truncate(pstr, st.AvailableWidth, "…")),
+ strings.NewReader(fmt.Sprintf("\n%#v\n", st)),
+ bytes.NewReader(stack),
+ )
+ return mr, stackLines + 1
+ }
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/bar_filler.go b/vendor/github.com/vbauerster/mpb/v6/bar_filler.go
new file mode 100644
index 000000000..c8cedaa4a
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/bar_filler.go
@@ -0,0 +1,31 @@
+package mpb
+
+import (
+ "io"
+
+ "github.com/vbauerster/mpb/v6/decor"
+)
+
+// BarFiller interface.
+// Bar (without decorators) renders itself by calling BarFiller's Fill method.
+//
+// reqWidth is requested width, set by `func WithWidth(int) ContainerOption`.
+// If not set, it defaults to terminal width.
+//
+// Default implementations can be obtained via:
+//
+// func NewBarFiller(style string) BarFiller
+// func NewBarFillerRev(style string) BarFiller
+// func NewBarFillerPick(style string, rev bool) BarFiller
+// func NewSpinnerFiller(style []string, alignment SpinnerAlignment) BarFiller
+//
+type BarFiller interface {
+ Fill(w io.Writer, reqWidth int, stat decor.Statistics)
+}
+
+// BarFillerFunc is function type adapter to convert function into BarFiller.
+type BarFillerFunc func(w io.Writer, reqWidth int, stat decor.Statistics)
+
+func (f BarFillerFunc) Fill(w io.Writer, reqWidth int, stat decor.Statistics) {
+ f(w, reqWidth, stat)
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/bar_filler_bar.go b/vendor/github.com/vbauerster/mpb/v6/bar_filler_bar.go
new file mode 100644
index 000000000..1c339e91d
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/bar_filler_bar.go
@@ -0,0 +1,191 @@
+package mpb
+
+import (
+ "bytes"
+ "io"
+ "unicode/utf8"
+
+ "github.com/mattn/go-runewidth"
+ "github.com/rivo/uniseg"
+ "github.com/vbauerster/mpb/v6/decor"
+ "github.com/vbauerster/mpb/v6/internal"
+)
+
+const (
+ rLeft = iota
+ rFill
+ rTip
+ rSpace
+ rRight
+ rRevTip
+ rRefill
+)
+
+// BarDefaultStyle is a style for rendering a progress bar.
+// It consist of 7 ordered runes:
+//
+// '1st rune' stands for left boundary rune
+//
+// '2nd rune' stands for fill rune
+//
+// '3rd rune' stands for tip rune
+//
+// '4th rune' stands for space rune
+//
+// '5th rune' stands for right boundary rune
+//
+// '6th rune' stands for reverse tip rune
+//
+// '7th rune' stands for refill rune
+//
+const BarDefaultStyle string = "[=>-]<+"
+
+type barFiller struct {
+ format [][]byte
+ rwidth []int
+ tip []byte
+ refill int64
+ reverse bool
+ flush func(io.Writer, *space, [][]byte)
+}
+
+type space struct {
+ space []byte
+ rwidth int
+ count int
+}
+
+// NewBarFiller returns a BarFiller implementation which renders a
+// progress bar in regular direction. If style is empty string,
+// BarDefaultStyle is applied. To be used with `*Progress.Add(...)
+// *Bar` method.
+func NewBarFiller(style string) BarFiller {
+ return newBarFiller(style, false)
+}
+
+// NewBarFillerRev returns a BarFiller implementation which renders a
+// progress bar in reverse direction. If style is empty string,
+// BarDefaultStyle is applied. To be used with `*Progress.Add(...)
+// *Bar` method.
+func NewBarFillerRev(style string) BarFiller {
+ return newBarFiller(style, true)
+}
+
+// NewBarFillerPick pick between regular and reverse BarFiller implementation
+// based on rev param. To be used with `*Progress.Add(...) *Bar` method.
+func NewBarFillerPick(style string, rev bool) BarFiller {
+ return newBarFiller(style, rev)
+}
+
+func newBarFiller(style string, rev bool) BarFiller {
+ bf := &barFiller{
+ format: make([][]byte, len(BarDefaultStyle)),
+ rwidth: make([]int, len(BarDefaultStyle)),
+ reverse: rev,
+ }
+ bf.parse(BarDefaultStyle)
+ if style != "" && style != BarDefaultStyle {
+ bf.parse(style)
+ }
+ return bf
+}
+
+func (s *barFiller) parse(style string) {
+ if !utf8.ValidString(style) {
+ panic("invalid bar style")
+ }
+ srcFormat := make([][]byte, len(BarDefaultStyle))
+ srcRwidth := make([]int, len(BarDefaultStyle))
+ i := 0
+ for gr := uniseg.NewGraphemes(style); i < len(BarDefaultStyle) && gr.Next(); i++ {
+ srcFormat[i] = gr.Bytes()
+ srcRwidth[i] = runewidth.StringWidth(gr.Str())
+ }
+ copy(s.format, srcFormat[:i])
+ copy(s.rwidth, srcRwidth[:i])
+ if s.reverse {
+ s.tip = s.format[rRevTip]
+ s.flush = reverseFlush
+ } else {
+ s.tip = s.format[rTip]
+ s.flush = regularFlush
+ }
+}
+
+func (s *barFiller) Fill(w io.Writer, reqWidth int, stat decor.Statistics) {
+ width := internal.CheckRequestedWidth(reqWidth, stat.AvailableWidth)
+ brackets := s.rwidth[rLeft] + s.rwidth[rRight]
+ if width < brackets {
+ return
+ }
+ // don't count brackets as progress
+ width -= brackets
+
+ w.Write(s.format[rLeft])
+ defer w.Write(s.format[rRight])
+
+ cwidth := int(internal.PercentageRound(stat.Total, stat.Current, width))
+ space := &space{
+ space: s.format[rSpace],
+ rwidth: s.rwidth[rSpace],
+ count: width - cwidth,
+ }
+
+ index, refill := 0, 0
+ bb := make([][]byte, cwidth)
+
+ if cwidth > 0 && cwidth != width {
+ bb[index] = s.tip
+ cwidth -= s.rwidth[rTip]
+ index++
+ }
+
+ if stat.Refill > 0 {
+ refill = int(internal.PercentageRound(stat.Total, int64(stat.Refill), width))
+ if refill > cwidth {
+ refill = cwidth
+ }
+ cwidth -= refill
+ }
+
+ for cwidth > 0 {
+ bb[index] = s.format[rFill]
+ cwidth -= s.rwidth[rFill]
+ index++
+ }
+
+ for refill > 0 {
+ bb[index] = s.format[rRefill]
+ refill -= s.rwidth[rRefill]
+ index++
+ }
+
+ if cwidth+refill < 0 || space.rwidth > 1 {
+ buf := new(bytes.Buffer)
+ s.flush(buf, space, bb[:index])
+ io.WriteString(w, runewidth.Truncate(buf.String(), width, "…"))
+ return
+ }
+
+ s.flush(w, space, bb)
+}
+
+func regularFlush(w io.Writer, space *space, bb [][]byte) {
+ for i := len(bb) - 1; i >= 0; i-- {
+ w.Write(bb[i])
+ }
+ for space.count > 0 {
+ w.Write(space.space)
+ space.count -= space.rwidth
+ }
+}
+
+func reverseFlush(w io.Writer, space *space, bb [][]byte) {
+ for space.count > 0 {
+ w.Write(space.space)
+ space.count -= space.rwidth
+ }
+ for i := 0; i < len(bb); i++ {
+ w.Write(bb[i])
+ }
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/bar_filler_spinner.go b/vendor/github.com/vbauerster/mpb/v6/bar_filler_spinner.go
new file mode 100644
index 000000000..0817b19ec
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/bar_filler_spinner.go
@@ -0,0 +1,65 @@
+package mpb
+
+import (
+ "io"
+ "strings"
+
+ "github.com/mattn/go-runewidth"
+ "github.com/vbauerster/mpb/v6/decor"
+ "github.com/vbauerster/mpb/v6/internal"
+)
+
+// SpinnerAlignment enum.
+type SpinnerAlignment int
+
+// SpinnerAlignment kinds.
+const (
+ SpinnerOnLeft SpinnerAlignment = iota
+ SpinnerOnMiddle
+ SpinnerOnRight
+)
+
+// SpinnerDefaultStyle is a style for rendering a spinner.
+var SpinnerDefaultStyle = []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}
+
+type spinnerFiller struct {
+ frames []string
+ count uint
+ alignment SpinnerAlignment
+}
+
+// NewSpinnerFiller returns a BarFiller implementation which renders
+// a spinner. If style is nil or zero length, SpinnerDefaultStyle is
+// applied. To be used with `*Progress.Add(...) *Bar` method.
+func NewSpinnerFiller(style []string, alignment SpinnerAlignment) BarFiller {
+ if len(style) == 0 {
+ style = SpinnerDefaultStyle
+ }
+ filler := &spinnerFiller{
+ frames: style,
+ alignment: alignment,
+ }
+ return filler
+}
+
+func (s *spinnerFiller) Fill(w io.Writer, reqWidth int, stat decor.Statistics) {
+ width := internal.CheckRequestedWidth(reqWidth, stat.AvailableWidth)
+
+ frame := s.frames[s.count%uint(len(s.frames))]
+ frameWidth := runewidth.StringWidth(frame)
+
+ if width < frameWidth {
+ return
+ }
+
+ switch rest := width - frameWidth; s.alignment {
+ case SpinnerOnLeft:
+ io.WriteString(w, frame+strings.Repeat(" ", rest))
+ case SpinnerOnMiddle:
+ str := strings.Repeat(" ", rest/2) + frame + strings.Repeat(" ", rest/2+rest%2)
+ io.WriteString(w, str)
+ case SpinnerOnRight:
+ io.WriteString(w, strings.Repeat(" ", rest)+frame)
+ }
+ s.count++
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/bar_option.go b/vendor/github.com/vbauerster/mpb/v6/bar_option.go
new file mode 100644
index 000000000..e359c110c
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/bar_option.go
@@ -0,0 +1,153 @@
+package mpb
+
+import (
+ "bytes"
+ "io"
+
+ "github.com/vbauerster/mpb/v6/decor"
+ "github.com/vbauerster/mpb/v6/internal"
+)
+
+// BarOption is a func option to alter default behavior of a bar.
+type BarOption func(*bState)
+
+func (s *bState) addDecorators(dest *[]decor.Decorator, decorators ...decor.Decorator) {
+ type mergeWrapper interface {
+ MergeUnwrap() []decor.Decorator
+ }
+ for _, decorator := range decorators {
+ if mw, ok := decorator.(mergeWrapper); ok {
+ *dest = append(*dest, mw.MergeUnwrap()...)
+ }
+ *dest = append(*dest, decorator)
+ }
+}
+
+// AppendDecorators let you inject decorators to the bar's right side.
+func AppendDecorators(decorators ...decor.Decorator) BarOption {
+ return func(s *bState) {
+ s.addDecorators(&s.aDecorators, decorators...)
+ }
+}
+
+// PrependDecorators let you inject decorators to the bar's left side.
+func PrependDecorators(decorators ...decor.Decorator) BarOption {
+ return func(s *bState) {
+ s.addDecorators(&s.pDecorators, decorators...)
+ }
+}
+
+// BarID sets bar id.
+func BarID(id int) BarOption {
+ return func(s *bState) {
+ s.id = id
+ }
+}
+
+// BarWidth sets bar width independent of the container.
+func BarWidth(width int) BarOption {
+ return func(s *bState) {
+ s.reqWidth = width
+ }
+}
+
+// BarQueueAfter queues this (being constructed) bar to relplace
+// runningBar after it has been completed.
+func BarQueueAfter(runningBar *Bar) BarOption {
+ if runningBar == nil {
+ return nil
+ }
+ return func(s *bState) {
+ s.runningBar = runningBar
+ }
+}
+
+// BarRemoveOnComplete removes both bar's filler and its decorators
+// on complete event.
+func BarRemoveOnComplete() BarOption {
+ return func(s *bState) {
+ s.dropOnComplete = true
+ }
+}
+
+// BarFillerClearOnComplete clears bar's filler on complete event.
+// It's shortcut for BarFillerOnComplete("").
+func BarFillerClearOnComplete() BarOption {
+ return BarFillerOnComplete("")
+}
+
+// BarFillerOnComplete replaces bar's filler with message, on complete event.
+func BarFillerOnComplete(message string) BarOption {
+ return BarFillerMiddleware(func(base BarFiller) BarFiller {
+ return BarFillerFunc(func(w io.Writer, reqWidth int, st decor.Statistics) {
+ if st.Completed {
+ io.WriteString(w, message)
+ } else {
+ base.Fill(w, reqWidth, st)
+ }
+ })
+ })
+}
+
+// BarFillerMiddleware provides a way to augment the underlying BarFiller.
+func BarFillerMiddleware(middle func(BarFiller) BarFiller) BarOption {
+ return func(s *bState) {
+ s.middleware = middle
+ }
+}
+
+// BarPriority sets bar's priority. Zero is highest priority, i.e. bar
+// will be on top. If `BarReplaceOnComplete` option is supplied, this
+// option is ignored.
+func BarPriority(priority int) BarOption {
+ return func(s *bState) {
+ s.priority = priority
+ }
+}
+
+// BarExtender provides a way to extend bar to the next new line.
+func BarExtender(filler BarFiller) BarOption {
+ if filler == nil {
+ return nil
+ }
+ return func(s *bState) {
+ s.extender = makeExtenderFunc(filler)
+ }
+}
+
+func makeExtenderFunc(filler BarFiller) extenderFunc {
+ buf := new(bytes.Buffer)
+ return func(r io.Reader, reqWidth int, st decor.Statistics) (io.Reader, int) {
+ filler.Fill(buf, reqWidth, st)
+ return io.MultiReader(r, buf), bytes.Count(buf.Bytes(), []byte("\n"))
+ }
+}
+
+// BarFillerTrim removes leading and trailing space around the underlying BarFiller.
+func BarFillerTrim() BarOption {
+ return func(s *bState) {
+ s.trimSpace = true
+ }
+}
+
+// BarNoPop disables bar pop out of container. Effective when
+// PopCompletedMode of container is enabled.
+func BarNoPop() BarOption {
+ return func(s *bState) {
+ s.noPop = true
+ }
+}
+
+// BarOptional will invoke provided option only when pick is true.
+func BarOptional(option BarOption, pick bool) BarOption {
+ return BarOptOn(option, internal.Predicate(pick))
+}
+
+// BarOptOn will invoke provided option only when higher order predicate
+// evaluates to true.
+func BarOptOn(option BarOption, predicate func() bool) BarOption {
+ if predicate() {
+ return option
+ }
+ return nil
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/container_option.go b/vendor/github.com/vbauerster/mpb/v6/container_option.go
new file mode 100644
index 000000000..b92c7578c
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/container_option.go
@@ -0,0 +1,112 @@
+package mpb
+
+import (
+ "io"
+ "io/ioutil"
+ "sync"
+ "time"
+
+ "github.com/vbauerster/mpb/v6/internal"
+)
+
+// ContainerOption is a func option to alter default behavior of a bar
+// container. Container term refers to a Progress struct which can
+// hold one or more Bars.
+type ContainerOption func(*pState)
+
+// WithWaitGroup provides means to have a single joint point. If
+// *sync.WaitGroup is provided, you can safely call just p.Wait()
+// without calling Wait() on provided *sync.WaitGroup. Makes sense
+// when there are more than one bar to render.
+func WithWaitGroup(wg *sync.WaitGroup) ContainerOption {
+ return func(s *pState) {
+ s.uwg = wg
+ }
+}
+
+// WithWidth sets container width. If not set it defaults to terminal
+// width. A bar added to the container will inherit its width, unless
+// overridden by `func BarWidth(int) BarOption`.
+func WithWidth(width int) ContainerOption {
+ return func(s *pState) {
+ s.reqWidth = width
+ }
+}
+
+// WithRefreshRate overrides default 120ms refresh rate.
+func WithRefreshRate(d time.Duration) ContainerOption {
+ return func(s *pState) {
+ s.rr = d
+ }
+}
+
+// WithManualRefresh disables internal auto refresh time.Ticker.
+// Refresh will occur upon receive value from provided ch.
+func WithManualRefresh(ch <-chan interface{}) ContainerOption {
+ return func(s *pState) {
+ s.externalRefresh = ch
+ }
+}
+
+// WithRenderDelay delays rendering. By default rendering starts as
+// soon as bar is added, with this option it's possible to delay
+// rendering process by keeping provided chan unclosed. In other words
+// rendering will start as soon as provided chan is closed.
+func WithRenderDelay(ch <-chan struct{}) ContainerOption {
+ return func(s *pState) {
+ s.renderDelay = ch
+ }
+}
+
+// WithShutdownNotifier provided chanel will be closed, after all bars
+// have been rendered.
+func WithShutdownNotifier(ch chan struct{}) ContainerOption {
+ return func(s *pState) {
+ s.shutdownNotifier = ch
+ }
+}
+
+// WithOutput overrides default os.Stdout output. Setting it to nil
+// will effectively disable auto refresh rate and discard any output,
+// useful if you want to disable progress bars with little overhead.
+func WithOutput(w io.Writer) ContainerOption {
+ return func(s *pState) {
+ if w == nil {
+ s.output = ioutil.Discard
+ s.outputDiscarded = true
+ return
+ }
+ s.output = w
+ }
+}
+
+// WithDebugOutput sets debug output.
+func WithDebugOutput(w io.Writer) ContainerOption {
+ if w == nil {
+ return nil
+ }
+ return func(s *pState) {
+ s.debugOut = w
+ }
+}
+
+// PopCompletedMode will pop and stop rendering completed bars.
+func PopCompletedMode() ContainerOption {
+ return func(s *pState) {
+ s.popCompleted = true
+ }
+}
+
+// ContainerOptional will invoke provided option only when pick is true.
+func ContainerOptional(option ContainerOption, pick bool) ContainerOption {
+ return ContainerOptOn(option, internal.Predicate(pick))
+}
+
+// ContainerOptOn will invoke provided option only when higher order
+// predicate evaluates to true.
+func ContainerOptOn(option ContainerOption, predicate func() bool) ContainerOption {
+ if predicate() {
+ return option
+ }
+ return nil
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/cwriter/doc.go b/vendor/github.com/vbauerster/mpb/v6/cwriter/doc.go
new file mode 100644
index 000000000..93c8f8268
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/cwriter/doc.go
@@ -0,0 +1,2 @@
+// Package cwriter is a console writer abstraction for the underlying OS.
+package cwriter
diff --git a/vendor/github.com/vbauerster/mpb/v6/cwriter/util_bsd.go b/vendor/github.com/vbauerster/mpb/v6/cwriter/util_bsd.go
new file mode 100644
index 000000000..4e3564ece
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/cwriter/util_bsd.go
@@ -0,0 +1,7 @@
+// +build darwin dragonfly freebsd netbsd openbsd
+
+package cwriter
+
+import "golang.org/x/sys/unix"
+
+const ioctlReadTermios = unix.TIOCGETA
diff --git a/vendor/github.com/vbauerster/mpb/v6/cwriter/util_linux.go b/vendor/github.com/vbauerster/mpb/v6/cwriter/util_linux.go
new file mode 100644
index 000000000..253f12dd2
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/cwriter/util_linux.go
@@ -0,0 +1,7 @@
+// +build aix linux
+
+package cwriter
+
+import "golang.org/x/sys/unix"
+
+const ioctlReadTermios = unix.TCGETS
diff --git a/vendor/github.com/vbauerster/mpb/v6/cwriter/util_solaris.go b/vendor/github.com/vbauerster/mpb/v6/cwriter/util_solaris.go
new file mode 100644
index 000000000..4b29ff5c0
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/cwriter/util_solaris.go
@@ -0,0 +1,7 @@
+// +build solaris
+
+package cwriter
+
+import "golang.org/x/sys/unix"
+
+const ioctlReadTermios = unix.TCGETA
diff --git a/vendor/github.com/vbauerster/mpb/v6/cwriter/writer.go b/vendor/github.com/vbauerster/mpb/v6/cwriter/writer.go
new file mode 100644
index 000000000..1ade54761
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/cwriter/writer.go
@@ -0,0 +1,84 @@
+package cwriter
+
+import (
+ "bytes"
+ "errors"
+ "io"
+ "os"
+ "strconv"
+)
+
+// ErrNotTTY not a TeleTYpewriter error.
+var ErrNotTTY = errors.New("not a terminal")
+
+// http://ascii-table.com/ansi-escape-sequences.php
+const (
+ escOpen = "\x1b["
+ cuuAndEd = "A\x1b[J"
+)
+
+// Writer is a buffered the writer that updates the terminal. The
+// contents of writer will be flushed when Flush is called.
+type Writer struct {
+ out io.Writer
+ buf bytes.Buffer
+ lineCount int
+ fd int
+ isTerminal bool
+}
+
+// New returns a new Writer with defaults.
+func New(out io.Writer) *Writer {
+ w := &Writer{out: out}
+ if f, ok := out.(*os.File); ok {
+ w.fd = int(f.Fd())
+ w.isTerminal = IsTerminal(w.fd)
+ }
+ return w
+}
+
+// Flush flushes the underlying buffer.
+func (w *Writer) Flush(lineCount int) (err error) {
+ // some terminals interpret 'cursor up 0' as 'cursor up 1'
+ if w.lineCount > 0 {
+ err = w.clearLines()
+ if err != nil {
+ return
+ }
+ }
+ w.lineCount = lineCount
+ _, err = w.buf.WriteTo(w.out)
+ return
+}
+
+// Write appends the contents of p to the underlying buffer.
+func (w *Writer) Write(p []byte) (n int, err error) {
+ return w.buf.Write(p)
+}
+
+// WriteString writes string to the underlying buffer.
+func (w *Writer) WriteString(s string) (n int, err error) {
+ return w.buf.WriteString(s)
+}
+
+// ReadFrom reads from the provided io.Reader and writes to the
+// underlying buffer.
+func (w *Writer) ReadFrom(r io.Reader) (n int64, err error) {
+ return w.buf.ReadFrom(r)
+}
+
+// GetWidth returns width of underlying terminal.
+func (w *Writer) GetWidth() (int, error) {
+ if !w.isTerminal {
+ return -1, ErrNotTTY
+ }
+ tw, _, err := GetSize(w.fd)
+ return tw, err
+}
+
+func (w *Writer) ansiCuuAndEd() (err error) {
+ buf := make([]byte, 8)
+ buf = strconv.AppendInt(buf[:copy(buf, escOpen)], int64(w.lineCount), 10)
+ _, err = w.out.Write(append(buf, cuuAndEd...))
+ return
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/cwriter/writer_posix.go b/vendor/github.com/vbauerster/mpb/v6/cwriter/writer_posix.go
new file mode 100644
index 000000000..f54a5d06b
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/cwriter/writer_posix.go
@@ -0,0 +1,26 @@
+// +build !windows
+
+package cwriter
+
+import (
+ "golang.org/x/sys/unix"
+)
+
+func (w *Writer) clearLines() error {
+ return w.ansiCuuAndEd()
+}
+
+// GetSize returns the dimensions of the given terminal.
+func GetSize(fd int) (width, height int, err error) {
+ ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
+ if err != nil {
+ return -1, -1, err
+ }
+ return int(ws.Col), int(ws.Row), nil
+}
+
+// IsTerminal returns whether the given file descriptor is a terminal.
+func IsTerminal(fd int) bool {
+ _, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
+ return err == nil
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/cwriter/writer_windows.go b/vendor/github.com/vbauerster/mpb/v6/cwriter/writer_windows.go
new file mode 100644
index 000000000..1a69c81ac
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/cwriter/writer_windows.go
@@ -0,0 +1,73 @@
+// +build windows
+
+package cwriter
+
+import (
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+var kernel32 = windows.NewLazySystemDLL("kernel32.dll")
+
+var (
+ procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition")
+ procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW")
+)
+
+func (w *Writer) clearLines() error {
+ if !w.isTerminal {
+ // hope it's cygwin or similar
+ return w.ansiCuuAndEd()
+ }
+
+ var info windows.ConsoleScreenBufferInfo
+ if err := windows.GetConsoleScreenBufferInfo(windows.Handle(w.fd), &info); err != nil {
+ return err
+ }
+
+ info.CursorPosition.Y -= int16(w.lineCount)
+ if info.CursorPosition.Y < 0 {
+ info.CursorPosition.Y = 0
+ }
+ _, _, _ = procSetConsoleCursorPosition.Call(
+ uintptr(w.fd),
+ uintptr(uint32(uint16(info.CursorPosition.Y))<<16|uint32(uint16(info.CursorPosition.X))),
+ )
+
+ // clear the lines
+ cursor := &windows.Coord{
+ X: info.Window.Left,
+ Y: info.CursorPosition.Y,
+ }
+ count := uint32(info.Size.X) * uint32(w.lineCount)
+ _, _, _ = procFillConsoleOutputCharacter.Call(
+ uintptr(w.fd),
+ uintptr(' '),
+ uintptr(count),
+ *(*uintptr)(unsafe.Pointer(cursor)),
+ uintptr(unsafe.Pointer(new(uint32))),
+ )
+ return nil
+}
+
+// GetSize returns the visible dimensions of the given terminal.
+//
+// These dimensions don't include any scrollback buffer height.
+func GetSize(fd int) (width, height int, err error) {
+ var info windows.ConsoleScreenBufferInfo
+ if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil {
+ return 0, 0, err
+ }
+ // terminal.GetSize from crypto/ssh adds "+ 1" to both width and height:
+ // https://go.googlesource.com/crypto/+/refs/heads/release-branch.go1.14/ssh/terminal/util_windows.go#75
+ // but looks like this is a root cause of issue #66, so removing both "+ 1" have fixed it.
+ return int(info.Window.Right - info.Window.Left), int(info.Window.Bottom - info.Window.Top), nil
+}
+
+// IsTerminal returns whether the given file descriptor is a terminal.
+func IsTerminal(fd int) bool {
+ var st uint32
+ err := windows.GetConsoleMode(windows.Handle(fd), &st)
+ return err == nil
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/any.go b/vendor/github.com/vbauerster/mpb/v6/decor/any.go
new file mode 100644
index 000000000..39518f594
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/any.go
@@ -0,0 +1,21 @@
+package decor
+
+// Any decorator displays text, that can be changed during decorator's
+// lifetime via provided DecorFunc.
+//
+// `fn` DecorFunc callback
+//
+// `wcc` optional WC config
+//
+func Any(fn DecorFunc, wcc ...WC) Decorator {
+ return &any{initWC(wcc...), fn}
+}
+
+type any struct {
+ WC
+ fn DecorFunc
+}
+
+func (d *any) Decor(s Statistics) string {
+ return d.FormatMsg(d.fn(s))
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/counters.go b/vendor/github.com/vbauerster/mpb/v6/decor/counters.go
new file mode 100644
index 000000000..4a5343d41
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/counters.go
@@ -0,0 +1,243 @@
+package decor
+
+import (
+ "fmt"
+ "strings"
+)
+
+const (
+ _ = iota
+ UnitKiB
+ UnitKB
+)
+
+// CountersNoUnit is a wrapper around Counters with no unit param.
+func CountersNoUnit(pairFmt string, wcc ...WC) Decorator {
+ return Counters(0, pairFmt, wcc...)
+}
+
+// CountersKibiByte is a wrapper around Counters with predefined unit
+// UnitKiB (bytes/1024).
+func CountersKibiByte(pairFmt string, wcc ...WC) Decorator {
+ return Counters(UnitKiB, pairFmt, wcc...)
+}
+
+// CountersKiloByte is a wrapper around Counters with predefined unit
+// UnitKB (bytes/1000).
+func CountersKiloByte(pairFmt string, wcc ...WC) Decorator {
+ return Counters(UnitKB, pairFmt, wcc...)
+}
+
+// Counters decorator with dynamic unit measure adjustment.
+//
+// `unit` one of [0|UnitKiB|UnitKB] zero for no unit
+//
+// `pairFmt` printf compatible verbs for current and total pair
+//
+// `wcc` optional WC config
+//
+// pairFmt example if unit=UnitKB:
+//
+// pairFmt="%.1f / %.1f" output: "1.0MB / 12.0MB"
+// pairFmt="% .1f / % .1f" output: "1.0 MB / 12.0 MB"
+// pairFmt="%d / %d" output: "1MB / 12MB"
+// pairFmt="% d / % d" output: "1 MB / 12 MB"
+//
+func Counters(unit int, pairFmt string, wcc ...WC) Decorator {
+ producer := func(unit int, pairFmt string) DecorFunc {
+ if pairFmt == "" {
+ pairFmt = "%d / %d"
+ } else if strings.Count(pairFmt, "%") != 2 {
+ panic("expected pairFmt with exactly 2 verbs")
+ }
+ switch unit {
+ case UnitKiB:
+ return func(s Statistics) string {
+ return fmt.Sprintf(pairFmt, SizeB1024(s.Current), SizeB1024(s.Total))
+ }
+ case UnitKB:
+ return func(s Statistics) string {
+ return fmt.Sprintf(pairFmt, SizeB1000(s.Current), SizeB1000(s.Total))
+ }
+ default:
+ return func(s Statistics) string {
+ return fmt.Sprintf(pairFmt, s.Current, s.Total)
+ }
+ }
+ }
+ return Any(producer(unit, pairFmt), wcc...)
+}
+
+// TotalNoUnit is a wrapper around Total with no unit param.
+func TotalNoUnit(format string, wcc ...WC) Decorator {
+ return Total(0, format, wcc...)
+}
+
+// TotalKibiByte is a wrapper around Total with predefined unit
+// UnitKiB (bytes/1024).
+func TotalKibiByte(format string, wcc ...WC) Decorator {
+ return Total(UnitKiB, format, wcc...)
+}
+
+// TotalKiloByte is a wrapper around Total with predefined unit
+// UnitKB (bytes/1000).
+func TotalKiloByte(format string, wcc ...WC) Decorator {
+ return Total(UnitKB, format, wcc...)
+}
+
+// Total decorator with dynamic unit measure adjustment.
+//
+// `unit` one of [0|UnitKiB|UnitKB] zero for no unit
+//
+// `format` printf compatible verb for Total
+//
+// `wcc` optional WC config
+//
+// format example if unit=UnitKiB:
+//
+// format="%.1f" output: "12.0MiB"
+// format="% .1f" output: "12.0 MiB"
+// format="%d" output: "12MiB"
+// format="% d" output: "12 MiB"
+//
+func Total(unit int, format string, wcc ...WC) Decorator {
+ producer := func(unit int, format string) DecorFunc {
+ if format == "" {
+ format = "%d"
+ } else if strings.Count(format, "%") != 1 {
+ panic("expected format with exactly 1 verb")
+ }
+
+ switch unit {
+ case UnitKiB:
+ return func(s Statistics) string {
+ return fmt.Sprintf(format, SizeB1024(s.Total))
+ }
+ case UnitKB:
+ return func(s Statistics) string {
+ return fmt.Sprintf(format, SizeB1000(s.Total))
+ }
+ default:
+ return func(s Statistics) string {
+ return fmt.Sprintf(format, s.Total)
+ }
+ }
+ }
+ return Any(producer(unit, format), wcc...)
+}
+
+// CurrentNoUnit is a wrapper around Current with no unit param.
+func CurrentNoUnit(format string, wcc ...WC) Decorator {
+ return Current(0, format, wcc...)
+}
+
+// CurrentKibiByte is a wrapper around Current with predefined unit
+// UnitKiB (bytes/1024).
+func CurrentKibiByte(format string, wcc ...WC) Decorator {
+ return Current(UnitKiB, format, wcc...)
+}
+
+// CurrentKiloByte is a wrapper around Current with predefined unit
+// UnitKB (bytes/1000).
+func CurrentKiloByte(format string, wcc ...WC) Decorator {
+ return Current(UnitKB, format, wcc...)
+}
+
+// Current decorator with dynamic unit measure adjustment.
+//
+// `unit` one of [0|UnitKiB|UnitKB] zero for no unit
+//
+// `format` printf compatible verb for Current
+//
+// `wcc` optional WC config
+//
+// format example if unit=UnitKiB:
+//
+// format="%.1f" output: "12.0MiB"
+// format="% .1f" output: "12.0 MiB"
+// format="%d" output: "12MiB"
+// format="% d" output: "12 MiB"
+//
+func Current(unit int, format string, wcc ...WC) Decorator {
+ producer := func(unit int, format string) DecorFunc {
+ if format == "" {
+ format = "%d"
+ } else if strings.Count(format, "%") != 1 {
+ panic("expected format with exactly 1 verb")
+ }
+
+ switch unit {
+ case UnitKiB:
+ return func(s Statistics) string {
+ return fmt.Sprintf(format, SizeB1024(s.Current))
+ }
+ case UnitKB:
+ return func(s Statistics) string {
+ return fmt.Sprintf(format, SizeB1000(s.Current))
+ }
+ default:
+ return func(s Statistics) string {
+ return fmt.Sprintf(format, s.Current)
+ }
+ }
+ }
+ return Any(producer(unit, format), wcc...)
+}
+
+// InvertedCurrentNoUnit is a wrapper around InvertedCurrent with no unit param.
+func InvertedCurrentNoUnit(format string, wcc ...WC) Decorator {
+ return InvertedCurrent(0, format, wcc...)
+}
+
+// InvertedCurrentKibiByte is a wrapper around InvertedCurrent with predefined unit
+// UnitKiB (bytes/1024).
+func InvertedCurrentKibiByte(format string, wcc ...WC) Decorator {
+ return InvertedCurrent(UnitKiB, format, wcc...)
+}
+
+// InvertedCurrentKiloByte is a wrapper around InvertedCurrent with predefined unit
+// UnitKB (bytes/1000).
+func InvertedCurrentKiloByte(format string, wcc ...WC) Decorator {
+ return InvertedCurrent(UnitKB, format, wcc...)
+}
+
+// InvertedCurrent decorator with dynamic unit measure adjustment.
+//
+// `unit` one of [0|UnitKiB|UnitKB] zero for no unit
+//
+// `format` printf compatible verb for InvertedCurrent
+//
+// `wcc` optional WC config
+//
+// format example if unit=UnitKiB:
+//
+// format="%.1f" output: "12.0MiB"
+// format="% .1f" output: "12.0 MiB"
+// format="%d" output: "12MiB"
+// format="% d" output: "12 MiB"
+//
+func InvertedCurrent(unit int, format string, wcc ...WC) Decorator {
+ producer := func(unit int, format string) DecorFunc {
+ if format == "" {
+ format = "%d"
+ } else if strings.Count(format, "%") != 1 {
+ panic("expected format with exactly 1 verb")
+ }
+
+ switch unit {
+ case UnitKiB:
+ return func(s Statistics) string {
+ return fmt.Sprintf(format, SizeB1024(s.Total-s.Current))
+ }
+ case UnitKB:
+ return func(s Statistics) string {
+ return fmt.Sprintf(format, SizeB1000(s.Total-s.Current))
+ }
+ default:
+ return func(s Statistics) string {
+ return fmt.Sprintf(format, s.Total-s.Current)
+ }
+ }
+ }
+ return Any(producer(unit, format), wcc...)
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/decorator.go b/vendor/github.com/vbauerster/mpb/v6/decor/decorator.go
new file mode 100644
index 000000000..e81fae367
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/decorator.go
@@ -0,0 +1,191 @@
+package decor
+
+import (
+ "fmt"
+ "time"
+
+ "github.com/acarl005/stripansi"
+ "github.com/mattn/go-runewidth"
+)
+
+const (
+ // DidentRight bit specifies identation direction.
+ // |foo |b | With DidentRight
+ // | foo| b| Without DidentRight
+ DidentRight = 1 << iota
+
+ // DextraSpace bit adds extra space, makes sense with DSyncWidth only.
+ // When DidentRight bit set, the space will be added to the right,
+ // otherwise to the left.
+ DextraSpace
+
+ // DSyncWidth bit enables same column width synchronization.
+ // Effective with multiple bars only.
+ DSyncWidth
+
+ // DSyncWidthR is shortcut for DSyncWidth|DidentRight
+ DSyncWidthR = DSyncWidth | DidentRight
+
+ // DSyncSpace is shortcut for DSyncWidth|DextraSpace
+ DSyncSpace = DSyncWidth | DextraSpace
+
+ // DSyncSpaceR is shortcut for DSyncWidth|DextraSpace|DidentRight
+ DSyncSpaceR = DSyncWidth | DextraSpace | DidentRight
+)
+
+// TimeStyle enum.
+type TimeStyle int
+
+// TimeStyle kinds.
+const (
+ ET_STYLE_GO TimeStyle = iota
+ ET_STYLE_HHMMSS
+ ET_STYLE_HHMM
+ ET_STYLE_MMSS
+)
+
+// Statistics consists of progress related statistics, that Decorator
+// may need.
+type Statistics struct {
+ ID int
+ AvailableWidth int
+ Total int64
+ Current int64
+ Refill int64
+ Completed bool
+}
+
+// Decorator interface.
+// Most of the time there is no need to implement this interface
+// manually, as decor package already provides a wide range of decorators
+// which implement this interface. If however built-in decorators don't
+// meet your needs, you're free to implement your own one by implementing
+// this particular interface. The easy way to go is to convert a
+// `DecorFunc` into a `Decorator` interface by using provided
+// `func Any(DecorFunc, ...WC) Decorator`.
+type Decorator interface {
+ Configurator
+ Synchronizer
+ Decor(Statistics) string
+}
+
+// DecorFunc func type.
+// To be used with `func Any`(DecorFunc, ...WC) Decorator`.
+type DecorFunc func(Statistics) string
+
+// Synchronizer interface.
+// All decorators implement this interface implicitly. Its Sync
+// method exposes width sync channel, if DSyncWidth bit is set.
+type Synchronizer interface {
+ Sync() (chan int, bool)
+}
+
+// Configurator interface.
+type Configurator interface {
+ GetConf() WC
+ SetConf(WC)
+}
+
+// Wrapper interface.
+// If you're implementing custom Decorator by wrapping a built-in one,
+// it is necessary to implement this interface to retain functionality
+// of built-in Decorator.
+type Wrapper interface {
+ Base() Decorator
+}
+
+// EwmaDecorator interface.
+// EWMA based decorators should implement this one.
+type EwmaDecorator interface {
+ EwmaUpdate(int64, time.Duration)
+}
+
+// AverageDecorator interface.
+// Average decorators should implement this interface to provide start
+// time adjustment facility, for resume-able tasks.
+type AverageDecorator interface {
+ AverageAdjust(time.Time)
+}
+
+// ShutdownListener interface.
+// If decorator needs to be notified once upon bar shutdown event, so
+// this is the right interface to implement.
+type ShutdownListener interface {
+ Shutdown()
+}
+
+// Global convenience instances of WC with sync width bit set.
+// To be used with multiple bars only, i.e. not effective for single bar usage.
+var (
+ WCSyncWidth = WC{C: DSyncWidth}
+ WCSyncWidthR = WC{C: DSyncWidthR}
+ WCSyncSpace = WC{C: DSyncSpace}
+ WCSyncSpaceR = WC{C: DSyncSpaceR}
+)
+
+// WC is a struct with two public fields W and C, both of int type.
+// W represents width and C represents bit set of width related config.
+// A decorator should embed WC, to enable width synchronization.
+type WC struct {
+ W int
+ C int
+ fill func(s string, w int) string
+ wsync chan int
+}
+
+// FormatMsg formats final message according to WC.W and WC.C.
+// Should be called by any Decorator implementation.
+func (wc *WC) FormatMsg(msg string) string {
+ pureWidth := runewidth.StringWidth(msg)
+ stripWidth := runewidth.StringWidth(stripansi.Strip(msg))
+ maxCell := wc.W
+ if (wc.C & DSyncWidth) != 0 {
+ cellCount := stripWidth
+ if (wc.C & DextraSpace) != 0 {
+ cellCount++
+ }
+ wc.wsync <- cellCount
+ maxCell = <-wc.wsync
+ }
+ return wc.fill(msg, maxCell+(pureWidth-stripWidth))
+}
+
+// Init initializes width related config.
+func (wc *WC) Init() WC {
+ wc.fill = runewidth.FillLeft
+ if (wc.C & DidentRight) != 0 {
+ wc.fill = runewidth.FillRight
+ }
+ if (wc.C & DSyncWidth) != 0 {
+ // it's deliberate choice to override wsync on each Init() call,
+ // this way globals like WCSyncSpace can be reused
+ wc.wsync = make(chan int)
+ }
+ return *wc
+}
+
+// Sync is implementation of Synchronizer interface.
+func (wc *WC) Sync() (chan int, bool) {
+ if (wc.C&DSyncWidth) != 0 && wc.wsync == nil {
+ panic(fmt.Sprintf("%T is not initialized", wc))
+ }
+ return wc.wsync, (wc.C & DSyncWidth) != 0
+}
+
+// GetConf is implementation of Configurator interface.
+func (wc *WC) GetConf() WC {
+ return *wc
+}
+
+// SetConf is implementation of Configurator interface.
+func (wc *WC) SetConf(conf WC) {
+ *wc = conf.Init()
+}
+
+func initWC(wcc ...WC) WC {
+ var wc WC
+ for _, nwc := range wcc {
+ wc = nwc
+ }
+ return wc.Init()
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/doc.go b/vendor/github.com/vbauerster/mpb/v6/decor/doc.go
new file mode 100644
index 000000000..bfbb82e11
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/doc.go
@@ -0,0 +1,20 @@
+// Package decor provides common decorators for "github.com/vbauerster/mpb/v6" module.
+/*
+ Some decorators returned by this package might have a closure state. It is ok to use
+ decorators concurrently, unless you share the same decorator among multiple
+ *mpb.Bar instances. To avoid data races, create new decorator per *mpb.Bar instance.
+
+ Don't:
+
+ p := mpb.New()
+ name := decor.Name("bar")
+ p.AddBar(100, mpb.AppendDecorators(name))
+ p.AddBar(100, mpb.AppendDecorators(name))
+
+ Do:
+
+ p := mpb.New()
+ p.AddBar(100, mpb.AppendDecorators(decor.Name("bar1")))
+ p.AddBar(100, mpb.AppendDecorators(decor.Name("bar2")))
+*/
+package decor
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/elapsed.go b/vendor/github.com/vbauerster/mpb/v6/decor/elapsed.go
new file mode 100644
index 000000000..e389f1581
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/elapsed.go
@@ -0,0 +1,35 @@
+package decor
+
+import (
+ "time"
+)
+
+// Elapsed decorator. It's wrapper of NewElapsed.
+//
+// `style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]
+//
+// `wcc` optional WC config
+//
+func Elapsed(style TimeStyle, wcc ...WC) Decorator {
+ return NewElapsed(style, time.Now(), wcc...)
+}
+
+// NewElapsed returns elapsed time decorator.
+//
+// `style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]
+//
+// `startTime` start time
+//
+// `wcc` optional WC config
+//
+func NewElapsed(style TimeStyle, startTime time.Time, wcc ...WC) Decorator {
+ var msg string
+ producer := chooseTimeProducer(style)
+ fn := func(s Statistics) string {
+ if !s.Completed {
+ msg = producer(time.Since(startTime))
+ }
+ return msg
+ }
+ return Any(fn, wcc...)
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/eta.go b/vendor/github.com/vbauerster/mpb/v6/decor/eta.go
new file mode 100644
index 000000000..d03caa735
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/eta.go
@@ -0,0 +1,203 @@
+package decor
+
+import (
+ "fmt"
+ "math"
+ "time"
+
+ "github.com/VividCortex/ewma"
+)
+
+// TimeNormalizer interface. Implementors could be passed into
+// MovingAverageETA, in order to affect i.e. normalize its output.
+type TimeNormalizer interface {
+ Normalize(time.Duration) time.Duration
+}
+
+// TimeNormalizerFunc is function type adapter to convert function
+// into TimeNormalizer.
+type TimeNormalizerFunc func(time.Duration) time.Duration
+
+func (f TimeNormalizerFunc) Normalize(src time.Duration) time.Duration {
+ return f(src)
+}
+
+// EwmaETA exponential-weighted-moving-average based ETA decorator.
+// For this decorator to work correctly you have to measure each
+// iteration's duration and pass it to the
+// *Bar.DecoratorEwmaUpdate(time.Duration) method after each increment.
+func EwmaETA(style TimeStyle, age float64, wcc ...WC) Decorator {
+ var average ewma.MovingAverage
+ if age == 0 {
+ average = ewma.NewMovingAverage()
+ } else {
+ average = ewma.NewMovingAverage(age)
+ }
+ return MovingAverageETA(style, NewThreadSafeMovingAverage(average), nil, wcc...)
+}
+
+// MovingAverageETA decorator relies on MovingAverage implementation to calculate its average.
+//
+// `style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]
+//
+// `average` implementation of MovingAverage interface
+//
+// `normalizer` available implementations are [FixedIntervalTimeNormalizer|MaxTolerateTimeNormalizer]
+//
+// `wcc` optional WC config
+//
+func MovingAverageETA(style TimeStyle, average ewma.MovingAverage, normalizer TimeNormalizer, wcc ...WC) Decorator {
+ d := &movingAverageETA{
+ WC: initWC(wcc...),
+ average: average,
+ normalizer: normalizer,
+ producer: chooseTimeProducer(style),
+ }
+ return d
+}
+
+type movingAverageETA struct {
+ WC
+ average ewma.MovingAverage
+ normalizer TimeNormalizer
+ producer func(time.Duration) string
+}
+
+func (d *movingAverageETA) Decor(s Statistics) string {
+ v := math.Round(d.average.Value())
+ remaining := time.Duration((s.Total - s.Current) * int64(v))
+ if d.normalizer != nil {
+ remaining = d.normalizer.Normalize(remaining)
+ }
+ return d.FormatMsg(d.producer(remaining))
+}
+
+func (d *movingAverageETA) EwmaUpdate(n int64, dur time.Duration) {
+ durPerItem := float64(dur) / float64(n)
+ if math.IsInf(durPerItem, 0) || math.IsNaN(durPerItem) {
+ return
+ }
+ d.average.Add(durPerItem)
+}
+
+// AverageETA decorator. It's wrapper of NewAverageETA.
+//
+// `style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]
+//
+// `wcc` optional WC config
+//
+func AverageETA(style TimeStyle, wcc ...WC) Decorator {
+ return NewAverageETA(style, time.Now(), nil, wcc...)
+}
+
+// NewAverageETA decorator with user provided start time.
+//
+// `style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]
+//
+// `startTime` start time
+//
+// `normalizer` available implementations are [FixedIntervalTimeNormalizer|MaxTolerateTimeNormalizer]
+//
+// `wcc` optional WC config
+//
+func NewAverageETA(style TimeStyle, startTime time.Time, normalizer TimeNormalizer, wcc ...WC) Decorator {
+ d := &averageETA{
+ WC: initWC(wcc...),
+ startTime: startTime,
+ normalizer: normalizer,
+ producer: chooseTimeProducer(style),
+ }
+ return d
+}
+
+type averageETA struct {
+ WC
+ startTime time.Time
+ normalizer TimeNormalizer
+ producer func(time.Duration) string
+}
+
+func (d *averageETA) Decor(s Statistics) string {
+ var remaining time.Duration
+ if s.Current != 0 {
+ durPerItem := float64(time.Since(d.startTime)) / float64(s.Current)
+ durPerItem = math.Round(durPerItem)
+ remaining = time.Duration((s.Total - s.Current) * int64(durPerItem))
+ if d.normalizer != nil {
+ remaining = d.normalizer.Normalize(remaining)
+ }
+ }
+ return d.FormatMsg(d.producer(remaining))
+}
+
+func (d *averageETA) AverageAdjust(startTime time.Time) {
+ d.startTime = startTime
+}
+
+// MaxTolerateTimeNormalizer returns implementation of TimeNormalizer.
+func MaxTolerateTimeNormalizer(maxTolerate time.Duration) TimeNormalizer {
+ var normalized time.Duration
+ var lastCall time.Time
+ return TimeNormalizerFunc(func(remaining time.Duration) time.Duration {
+ if diff := normalized - remaining; diff <= 0 || diff > maxTolerate || remaining < time.Minute {
+ normalized = remaining
+ lastCall = time.Now()
+ return remaining
+ }
+ normalized -= time.Since(lastCall)
+ lastCall = time.Now()
+ return normalized
+ })
+}
+
+// FixedIntervalTimeNormalizer returns implementation of TimeNormalizer.
+func FixedIntervalTimeNormalizer(updInterval int) TimeNormalizer {
+ var normalized time.Duration
+ var lastCall time.Time
+ var count int
+ return TimeNormalizerFunc(func(remaining time.Duration) time.Duration {
+ if count == 0 || remaining < time.Minute {
+ count = updInterval
+ normalized = remaining
+ lastCall = time.Now()
+ return remaining
+ }
+ count--
+ normalized -= time.Since(lastCall)
+ lastCall = time.Now()
+ return normalized
+ })
+}
+
+func chooseTimeProducer(style TimeStyle) func(time.Duration) string {
+ switch style {
+ case ET_STYLE_HHMMSS:
+ return func(remaining time.Duration) string {
+ hours := int64(remaining/time.Hour) % 60
+ minutes := int64(remaining/time.Minute) % 60
+ seconds := int64(remaining/time.Second) % 60
+ return fmt.Sprintf("%02d:%02d:%02d", hours, minutes, seconds)
+ }
+ case ET_STYLE_HHMM:
+ return func(remaining time.Duration) string {
+ hours := int64(remaining/time.Hour) % 60
+ minutes := int64(remaining/time.Minute) % 60
+ return fmt.Sprintf("%02d:%02d", hours, minutes)
+ }
+ case ET_STYLE_MMSS:
+ return func(remaining time.Duration) string {
+ hours := int64(remaining/time.Hour) % 60
+ minutes := int64(remaining/time.Minute) % 60
+ seconds := int64(remaining/time.Second) % 60
+ if hours > 0 {
+ return fmt.Sprintf("%02d:%02d:%02d", hours, minutes, seconds)
+ }
+ return fmt.Sprintf("%02d:%02d", minutes, seconds)
+ }
+ default:
+ return func(remaining time.Duration) string {
+ // strip off nanoseconds
+ return ((remaining / time.Second) * time.Second).String()
+ }
+ }
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/merge.go b/vendor/github.com/vbauerster/mpb/v6/decor/merge.go
new file mode 100644
index 000000000..e41406a64
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/merge.go
@@ -0,0 +1,107 @@
+package decor
+
+import (
+ "strings"
+
+ "github.com/acarl005/stripansi"
+ "github.com/mattn/go-runewidth"
+)
+
+// Merge wraps its decorator argument with intention to sync width
+// with several decorators of another bar. Visual example:
+//
+// +----+--------+---------+--------+
+// | B1 | MERGE(D, P1, Pn) |
+// +----+--------+---------+--------+
+// | B2 | D0 | D1 | Dn |
+// +----+--------+---------+--------+
+//
+func Merge(decorator Decorator, placeholders ...WC) Decorator {
+ if _, ok := decorator.Sync(); !ok || len(placeholders) == 0 {
+ return decorator
+ }
+ md := &mergeDecorator{
+ Decorator: decorator,
+ wc: decorator.GetConf(),
+ placeHolders: make([]*placeHolderDecorator, len(placeholders)),
+ }
+ decorator.SetConf(WC{})
+ for i, wc := range placeholders {
+ if (wc.C & DSyncWidth) == 0 {
+ return decorator
+ }
+ md.placeHolders[i] = &placeHolderDecorator{wc.Init()}
+ }
+ return md
+}
+
+type mergeDecorator struct {
+ Decorator
+ wc WC
+ placeHolders []*placeHolderDecorator
+}
+
+func (d *mergeDecorator) GetConf() WC {
+ return d.wc
+}
+
+func (d *mergeDecorator) SetConf(conf WC) {
+ d.wc = conf.Init()
+}
+
+func (d *mergeDecorator) MergeUnwrap() []Decorator {
+ decorators := make([]Decorator, len(d.placeHolders))
+ for i, ph := range d.placeHolders {
+ decorators[i] = ph
+ }
+ return decorators
+}
+
+func (d *mergeDecorator) Sync() (chan int, bool) {
+ return d.wc.Sync()
+}
+
+func (d *mergeDecorator) Base() Decorator {
+ return d.Decorator
+}
+
+func (d *mergeDecorator) Decor(s Statistics) string {
+ msg := d.Decorator.Decor(s)
+ pureWidth := runewidth.StringWidth(msg)
+ stripWidth := runewidth.StringWidth(stripansi.Strip(msg))
+ cellCount := stripWidth
+ if (d.wc.C & DextraSpace) != 0 {
+ cellCount++
+ }
+
+ total := runewidth.StringWidth(d.placeHolders[0].FormatMsg(""))
+ pw := (cellCount - total) / len(d.placeHolders)
+ rem := (cellCount - total) % len(d.placeHolders)
+
+ var diff int
+ for i := 1; i < len(d.placeHolders); i++ {
+ ph := d.placeHolders[i]
+ width := pw - diff
+ if (ph.WC.C & DextraSpace) != 0 {
+ width--
+ if width < 0 {
+ width = 0
+ }
+ }
+ max := runewidth.StringWidth(ph.FormatMsg(strings.Repeat(" ", width)))
+ total += max
+ diff = max - pw
+ }
+
+ d.wc.wsync <- pw + rem
+ max := <-d.wc.wsync
+ return d.wc.fill(msg, max+total+(pureWidth-stripWidth))
+}
+
+type placeHolderDecorator struct {
+ WC
+}
+
+func (d *placeHolderDecorator) Decor(Statistics) string {
+ return ""
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/moving_average.go b/vendor/github.com/vbauerster/mpb/v6/decor/moving_average.go
new file mode 100644
index 000000000..50ac9c393
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/moving_average.go
@@ -0,0 +1,68 @@
+package decor
+
+import (
+ "sort"
+ "sync"
+
+ "github.com/VividCortex/ewma"
+)
+
+type threadSafeMovingAverage struct {
+ ewma.MovingAverage
+ mu sync.Mutex
+}
+
+func (s *threadSafeMovingAverage) Add(value float64) {
+ s.mu.Lock()
+ s.MovingAverage.Add(value)
+ s.mu.Unlock()
+}
+
+func (s *threadSafeMovingAverage) Value() float64 {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.MovingAverage.Value()
+}
+
+func (s *threadSafeMovingAverage) Set(value float64) {
+ s.mu.Lock()
+ s.MovingAverage.Set(value)
+ s.mu.Unlock()
+}
+
+// NewThreadSafeMovingAverage converts provided ewma.MovingAverage
+// into thread safe ewma.MovingAverage.
+func NewThreadSafeMovingAverage(average ewma.MovingAverage) ewma.MovingAverage {
+ if tsma, ok := average.(*threadSafeMovingAverage); ok {
+ return tsma
+ }
+ return &threadSafeMovingAverage{MovingAverage: average}
+}
+
+type medianWindow [3]float64
+
+func (s *medianWindow) Len() int { return len(s) }
+func (s *medianWindow) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+func (s *medianWindow) Less(i, j int) bool { return s[i] < s[j] }
+
+func (s *medianWindow) Add(value float64) {
+ s[0], s[1] = s[1], s[2]
+ s[2] = value
+}
+
+func (s *medianWindow) Value() float64 {
+ tmp := *s
+ sort.Sort(&tmp)
+ return tmp[1]
+}
+
+func (s *medianWindow) Set(value float64) {
+ for i := 0; i < len(s); i++ {
+ s[i] = value
+ }
+}
+
+// NewMedian is fixed last 3 samples median MovingAverage.
+func NewMedian() ewma.MovingAverage {
+ return NewThreadSafeMovingAverage(new(medianWindow))
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/name.go b/vendor/github.com/vbauerster/mpb/v6/decor/name.go
new file mode 100644
index 000000000..3af311254
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/name.go
@@ -0,0 +1,12 @@
+package decor
+
+// Name decorator displays text that is set once and can't be changed
+// during decorator's lifetime.
+//
+// `str` string to display
+//
+// `wcc` optional WC config
+//
+func Name(str string, wcc ...WC) Decorator {
+ return Any(func(Statistics) string { return str }, wcc...)
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/on_complete.go b/vendor/github.com/vbauerster/mpb/v6/decor/on_complete.go
new file mode 100644
index 000000000..f46b19aba
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/on_complete.go
@@ -0,0 +1,37 @@
+package decor
+
+// OnComplete returns decorator, which wraps provided decorator, with
+// sole purpose to display provided message on complete event.
+//
+// `decorator` Decorator to wrap
+//
+// `message` message to display on complete event
+//
+func OnComplete(decorator Decorator, message string) Decorator {
+ d := &onCompleteWrapper{
+ Decorator: decorator,
+ msg: message,
+ }
+ if md, ok := decorator.(*mergeDecorator); ok {
+ d.Decorator, md.Decorator = md.Decorator, d
+ return md
+ }
+ return d
+}
+
+type onCompleteWrapper struct {
+ Decorator
+ msg string
+}
+
+func (d *onCompleteWrapper) Decor(s Statistics) string {
+ if s.Completed {
+ wc := d.GetConf()
+ return wc.FormatMsg(d.msg)
+ }
+ return d.Decorator.Decor(s)
+}
+
+func (d *onCompleteWrapper) Base() Decorator {
+ return d.Decorator
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/percentage.go b/vendor/github.com/vbauerster/mpb/v6/decor/percentage.go
new file mode 100644
index 000000000..f4922bb52
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/percentage.go
@@ -0,0 +1,58 @@
+package decor
+
+import (
+ "fmt"
+ "io"
+ "strconv"
+
+ "github.com/vbauerster/mpb/v6/internal"
+)
+
+type percentageType float64
+
+func (s percentageType) Format(st fmt.State, verb rune) {
+ var prec int
+ switch verb {
+ case 'd':
+ case 's':
+ prec = -1
+ default:
+ if p, ok := st.Precision(); ok {
+ prec = p
+ } else {
+ prec = 6
+ }
+ }
+
+ io.WriteString(st, strconv.FormatFloat(float64(s), 'f', prec, 64))
+
+ if st.Flag(' ') {
+ io.WriteString(st, " ")
+ }
+ io.WriteString(st, "%")
+}
+
+// Percentage returns percentage decorator. It's a wrapper of NewPercentage.
+func Percentage(wcc ...WC) Decorator {
+ return NewPercentage("% d", wcc...)
+}
+
+// NewPercentage percentage decorator with custom format string.
+//
+// format examples:
+//
+// format="%.1f" output: "1.0%"
+// format="% .1f" output: "1.0 %"
+// format="%d" output: "1%"
+// format="% d" output: "1 %"
+//
+func NewPercentage(format string, wcc ...WC) Decorator {
+ if format == "" {
+ format = "% d"
+ }
+ f := func(s Statistics) string {
+ p := internal.Percentage(s.Total, s.Current, 100)
+ return fmt.Sprintf(format, percentageType(p))
+ }
+ return Any(f, wcc...)
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/size_type.go b/vendor/github.com/vbauerster/mpb/v6/decor/size_type.go
new file mode 100644
index 000000000..e4b974058
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/size_type.go
@@ -0,0 +1,109 @@
+package decor
+
+import (
+ "fmt"
+ "io"
+ "math"
+ "strconv"
+)
+
+//go:generate stringer -type=SizeB1024 -trimprefix=_i
+//go:generate stringer -type=SizeB1000 -trimprefix=_
+
+const (
+ _ib SizeB1024 = iota + 1
+ _iKiB SizeB1024 = 1 << (iota * 10)
+ _iMiB
+ _iGiB
+ _iTiB
+)
+
+// SizeB1024 named type, which implements fmt.Formatter interface. It
+// adjusts its value according to byte size multiple by 1024 and appends
+// appropriate size marker (KiB, MiB, GiB, TiB).
+type SizeB1024 int64
+
+func (self SizeB1024) Format(st fmt.State, verb rune) {
+ var prec int
+ switch verb {
+ case 'd':
+ case 's':
+ prec = -1
+ default:
+ if p, ok := st.Precision(); ok {
+ prec = p
+ } else {
+ prec = 6
+ }
+ }
+
+ var unit SizeB1024
+ switch {
+ case self < _iKiB:
+ unit = _ib
+ case self < _iMiB:
+ unit = _iKiB
+ case self < _iGiB:
+ unit = _iMiB
+ case self < _iTiB:
+ unit = _iGiB
+ case self <= math.MaxInt64:
+ unit = _iTiB
+ }
+
+ io.WriteString(st, strconv.FormatFloat(float64(self)/float64(unit), 'f', prec, 64))
+
+ if st.Flag(' ') {
+ io.WriteString(st, " ")
+ }
+ io.WriteString(st, unit.String())
+}
+
+const (
+ _b SizeB1000 = 1
+ _KB SizeB1000 = _b * 1000
+ _MB SizeB1000 = _KB * 1000
+ _GB SizeB1000 = _MB * 1000
+ _TB SizeB1000 = _GB * 1000
+)
+
+// SizeB1000 named type, which implements fmt.Formatter interface. It
+// adjusts its value according to byte size multiple by 1000 and appends
+// appropriate size marker (KB, MB, GB, TB).
+type SizeB1000 int64
+
+func (self SizeB1000) Format(st fmt.State, verb rune) {
+ var prec int
+ switch verb {
+ case 'd':
+ case 's':
+ prec = -1
+ default:
+ if p, ok := st.Precision(); ok {
+ prec = p
+ } else {
+ prec = 6
+ }
+ }
+
+ var unit SizeB1000
+ switch {
+ case self < _KB:
+ unit = _b
+ case self < _MB:
+ unit = _KB
+ case self < _GB:
+ unit = _MB
+ case self < _TB:
+ unit = _GB
+ case self <= math.MaxInt64:
+ unit = _TB
+ }
+
+ io.WriteString(st, strconv.FormatFloat(float64(self)/float64(unit), 'f', prec, 64))
+
+ if st.Flag(' ') {
+ io.WriteString(st, " ")
+ }
+ io.WriteString(st, unit.String())
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/sizeb1000_string.go b/vendor/github.com/vbauerster/mpb/v6/decor/sizeb1000_string.go
new file mode 100644
index 000000000..3f32ef715
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/sizeb1000_string.go
@@ -0,0 +1,41 @@
+// Code generated by "stringer -type=SizeB1000 -trimprefix=_"; DO NOT EDIT.
+
+package decor
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[_b-1]
+ _ = x[_KB-1000]
+ _ = x[_MB-1000000]
+ _ = x[_GB-1000000000]
+ _ = x[_TB-1000000000000]
+}
+
+const (
+ _SizeB1000_name_0 = "b"
+ _SizeB1000_name_1 = "KB"
+ _SizeB1000_name_2 = "MB"
+ _SizeB1000_name_3 = "GB"
+ _SizeB1000_name_4 = "TB"
+)
+
+func (i SizeB1000) String() string {
+ switch {
+ case i == 1:
+ return _SizeB1000_name_0
+ case i == 1000:
+ return _SizeB1000_name_1
+ case i == 1000000:
+ return _SizeB1000_name_2
+ case i == 1000000000:
+ return _SizeB1000_name_3
+ case i == 1000000000000:
+ return _SizeB1000_name_4
+ default:
+ return "SizeB1000(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/sizeb1024_string.go b/vendor/github.com/vbauerster/mpb/v6/decor/sizeb1024_string.go
new file mode 100644
index 000000000..9fca66cc7
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/sizeb1024_string.go
@@ -0,0 +1,41 @@
+// Code generated by "stringer -type=SizeB1024 -trimprefix=_i"; DO NOT EDIT.
+
+package decor
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[_ib-1]
+ _ = x[_iKiB-1024]
+ _ = x[_iMiB-1048576]
+ _ = x[_iGiB-1073741824]
+ _ = x[_iTiB-1099511627776]
+}
+
+const (
+ _SizeB1024_name_0 = "b"
+ _SizeB1024_name_1 = "KiB"
+ _SizeB1024_name_2 = "MiB"
+ _SizeB1024_name_3 = "GiB"
+ _SizeB1024_name_4 = "TiB"
+)
+
+func (i SizeB1024) String() string {
+ switch {
+ case i == 1:
+ return _SizeB1024_name_0
+ case i == 1024:
+ return _SizeB1024_name_1
+ case i == 1048576:
+ return _SizeB1024_name_2
+ case i == 1073741824:
+ return _SizeB1024_name_3
+ case i == 1099511627776:
+ return _SizeB1024_name_4
+ default:
+ return "SizeB1024(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/speed.go b/vendor/github.com/vbauerster/mpb/v6/decor/speed.go
new file mode 100644
index 000000000..634edabfd
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/speed.go
@@ -0,0 +1,171 @@
+package decor
+
+import (
+ "fmt"
+ "io"
+ "math"
+ "time"
+
+ "github.com/VividCortex/ewma"
+)
+
+// FmtAsSpeed adds "/s" to the end of the input formatter. To be
+// used with SizeB1000 or SizeB1024 types, for example:
+//
+// fmt.Printf("%.1f", FmtAsSpeed(SizeB1024(2048)))
+//
+func FmtAsSpeed(input fmt.Formatter) fmt.Formatter {
+ return &speedFormatter{input}
+}
+
+type speedFormatter struct {
+ fmt.Formatter
+}
+
+func (self *speedFormatter) Format(st fmt.State, verb rune) {
+ self.Formatter.Format(st, verb)
+ io.WriteString(st, "/s")
+}
+
+// EwmaSpeed exponential-weighted-moving-average based speed decorator.
+// For this decorator to work correctly you have to measure each
+// iteration's duration and pass it to the
+// *Bar.DecoratorEwmaUpdate(time.Duration) method after each increment.
+func EwmaSpeed(unit int, format string, age float64, wcc ...WC) Decorator {
+ var average ewma.MovingAverage
+ if age == 0 {
+ average = ewma.NewMovingAverage()
+ } else {
+ average = ewma.NewMovingAverage(age)
+ }
+ return MovingAverageSpeed(unit, format, NewThreadSafeMovingAverage(average), wcc...)
+}
+
+// MovingAverageSpeed decorator relies on MovingAverage implementation
+// to calculate its average.
+//
+// `unit` one of [0|UnitKiB|UnitKB] zero for no unit
+//
+// `format` printf compatible verb for value, like "%f" or "%d"
+//
+// `average` MovingAverage implementation
+//
+// `wcc` optional WC config
+//
+// format examples:
+//
+// unit=UnitKiB, format="%.1f" output: "1.0MiB/s"
+// unit=UnitKiB, format="% .1f" output: "1.0 MiB/s"
+// unit=UnitKB, format="%.1f" output: "1.0MB/s"
+// unit=UnitKB, format="% .1f" output: "1.0 MB/s"
+//
+func MovingAverageSpeed(unit int, format string, average ewma.MovingAverage, wcc ...WC) Decorator {
+ if format == "" {
+ format = "%.0f"
+ }
+ d := &movingAverageSpeed{
+ WC: initWC(wcc...),
+ average: average,
+ producer: chooseSpeedProducer(unit, format),
+ }
+ return d
+}
+
+type movingAverageSpeed struct {
+ WC
+ producer func(float64) string
+ average ewma.MovingAverage
+ msg string
+}
+
+func (d *movingAverageSpeed) Decor(s Statistics) string {
+ if !s.Completed {
+ var speed float64
+ if v := d.average.Value(); v > 0 {
+ speed = 1 / v
+ }
+ d.msg = d.producer(speed * 1e9)
+ }
+ return d.FormatMsg(d.msg)
+}
+
+func (d *movingAverageSpeed) EwmaUpdate(n int64, dur time.Duration) {
+ durPerByte := float64(dur) / float64(n)
+ if math.IsInf(durPerByte, 0) || math.IsNaN(durPerByte) {
+ return
+ }
+ d.average.Add(durPerByte)
+}
+
+// AverageSpeed decorator with dynamic unit measure adjustment. It's
+// a wrapper of NewAverageSpeed.
+func AverageSpeed(unit int, format string, wcc ...WC) Decorator {
+ return NewAverageSpeed(unit, format, time.Now(), wcc...)
+}
+
+// NewAverageSpeed decorator with dynamic unit measure adjustment and
+// user provided start time.
+//
+// `unit` one of [0|UnitKiB|UnitKB] zero for no unit
+//
+// `format` printf compatible verb for value, like "%f" or "%d"
+//
+// `startTime` start time
+//
+// `wcc` optional WC config
+//
+// format examples:
+//
+// unit=UnitKiB, format="%.1f" output: "1.0MiB/s"
+// unit=UnitKiB, format="% .1f" output: "1.0 MiB/s"
+// unit=UnitKB, format="%.1f" output: "1.0MB/s"
+// unit=UnitKB, format="% .1f" output: "1.0 MB/s"
+//
+func NewAverageSpeed(unit int, format string, startTime time.Time, wcc ...WC) Decorator {
+ if format == "" {
+ format = "%.0f"
+ }
+ d := &averageSpeed{
+ WC: initWC(wcc...),
+ startTime: startTime,
+ producer: chooseSpeedProducer(unit, format),
+ }
+ return d
+}
+
+type averageSpeed struct {
+ WC
+ startTime time.Time
+ producer func(float64) string
+ msg string
+}
+
+func (d *averageSpeed) Decor(s Statistics) string {
+ if !s.Completed {
+ speed := float64(s.Current) / float64(time.Since(d.startTime))
+ d.msg = d.producer(speed * 1e9)
+ }
+
+ return d.FormatMsg(d.msg)
+}
+
+func (d *averageSpeed) AverageAdjust(startTime time.Time) {
+ d.startTime = startTime
+}
+
+func chooseSpeedProducer(unit int, format string) func(float64) string {
+ switch unit {
+ case UnitKiB:
+ return func(speed float64) string {
+ return fmt.Sprintf(format, FmtAsSpeed(SizeB1024(math.Round(speed))))
+ }
+ case UnitKB:
+ return func(speed float64) string {
+ return fmt.Sprintf(format, FmtAsSpeed(SizeB1000(math.Round(speed))))
+ }
+ default:
+ return func(speed float64) string {
+ return fmt.Sprintf(format, speed)
+ }
+ }
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/decor/spinner.go b/vendor/github.com/vbauerster/mpb/v6/decor/spinner.go
new file mode 100644
index 000000000..6871639db
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/decor/spinner.go
@@ -0,0 +1,21 @@
+package decor
+
+var defaultSpinnerStyle = []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}
+
+// Spinner returns spinner decorator.
+//
+// `frames` spinner frames, if nil or len==0, default is used
+//
+// `wcc` optional WC config
+func Spinner(frames []string, wcc ...WC) Decorator {
+ if len(frames) == 0 {
+ frames = defaultSpinnerStyle
+ }
+ var count uint
+ f := func(s Statistics) string {
+ frame := frames[count%uint(len(frames))]
+ count++
+ return frame
+ }
+ return Any(f, wcc...)
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/doc.go b/vendor/github.com/vbauerster/mpb/v6/doc.go
new file mode 100644
index 000000000..5ada71774
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/doc.go
@@ -0,0 +1,2 @@
+// Package mpb is a library for rendering progress bars in terminal applications.
+package mpb
diff --git a/vendor/github.com/vbauerster/mpb/v6/go.mod b/vendor/github.com/vbauerster/mpb/v6/go.mod
new file mode 100644
index 000000000..55d523ed6
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/go.mod
@@ -0,0 +1,11 @@
+module github.com/vbauerster/mpb/v6
+
+require (
+ github.com/VividCortex/ewma v1.1.1
+ github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
+ github.com/mattn/go-runewidth v0.0.10
+ github.com/rivo/uniseg v0.2.0
+ golang.org/x/sys v0.0.0-20210324051608-47abb6519492
+)
+
+go 1.14
diff --git a/vendor/github.com/vbauerster/mpb/v6/go.sum b/vendor/github.com/vbauerster/mpb/v6/go.sum
new file mode 100644
index 000000000..4809b4a19
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/go.sum
@@ -0,0 +1,11 @@
+github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=
+github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
+github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
+github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
+github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg=
+github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
+github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
+github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
+github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
+golang.org/x/sys v0.0.0-20210324051608-47abb6519492 h1:Paq34FxTluEPvVyayQqMPgHm+vTOrIifmcYxFBx9TLg=
+golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
diff --git a/vendor/github.com/vbauerster/mpb/v6/internal/percentage.go b/vendor/github.com/vbauerster/mpb/v6/internal/percentage.go
new file mode 100644
index 000000000..a8ef8be12
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/internal/percentage.go
@@ -0,0 +1,19 @@
+package internal
+
+import "math"
+
+// Percentage is a helper function, to calculate percentage.
+func Percentage(total, current int64, width int) float64 {
+ if total <= 0 {
+ return 0
+ }
+ if current >= total {
+ return float64(width)
+ }
+ return float64(int64(width)*current) / float64(total)
+}
+
+// PercentageRound same as Percentage but with math.Round.
+func PercentageRound(total, current int64, width int) float64 {
+ return math.Round(Percentage(total, current, width))
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/internal/predicate.go b/vendor/github.com/vbauerster/mpb/v6/internal/predicate.go
new file mode 100644
index 000000000..1e4dd24d9
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/internal/predicate.go
@@ -0,0 +1,6 @@
+package internal
+
+// Predicate helper for internal use.
+func Predicate(pick bool) func() bool {
+ return func() bool { return pick }
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/internal/width.go b/vendor/github.com/vbauerster/mpb/v6/internal/width.go
new file mode 100644
index 000000000..216320f24
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/internal/width.go
@@ -0,0 +1,10 @@
+package internal
+
+// CheckRequestedWidth checks that requested width doesn't overflow
+// available width
+func CheckRequestedWidth(requested, available int) int {
+ if requested <= 0 || requested >= available {
+ return available
+ }
+ return requested
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/priority_queue.go b/vendor/github.com/vbauerster/mpb/v6/priority_queue.go
new file mode 100644
index 000000000..29d9bd5a8
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/priority_queue.go
@@ -0,0 +1,32 @@
+package mpb
+
+// A priorityQueue implements heap.Interface
+type priorityQueue []*Bar
+
+func (pq priorityQueue) Len() int { return len(pq) }
+
+func (pq priorityQueue) Less(i, j int) bool {
+ return pq[i].priority < pq[j].priority
+}
+
+func (pq priorityQueue) Swap(i, j int) {
+ pq[i], pq[j] = pq[j], pq[i]
+ pq[i].index = i
+ pq[j].index = j
+}
+
+func (pq *priorityQueue) Push(x interface{}) {
+ s := *pq
+ bar := x.(*Bar)
+ bar.index = len(s)
+ s = append(s, bar)
+ *pq = s
+}
+
+func (pq *priorityQueue) Pop() interface{} {
+ s := *pq
+ *pq = s[0 : len(s)-1]
+ bar := s[len(s)-1]
+ bar.index = -1 // for safety
+ return bar
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/progress.go b/vendor/github.com/vbauerster/mpb/v6/progress.go
new file mode 100644
index 000000000..5a3f96243
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/progress.go
@@ -0,0 +1,412 @@
+package mpb
+
+import (
+ "bytes"
+ "container/heap"
+ "context"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "log"
+ "math"
+ "os"
+ "sync"
+ "time"
+
+ "github.com/vbauerster/mpb/v6/cwriter"
+ "github.com/vbauerster/mpb/v6/decor"
+)
+
+const (
+ // default RefreshRate
+ prr = 120 * time.Millisecond
+)
+
+// Progress represents a container that renders one or more progress
+// bars.
+type Progress struct {
+ ctx context.Context
+ uwg *sync.WaitGroup
+ cwg *sync.WaitGroup
+ bwg *sync.WaitGroup
+ operateState chan func(*pState)
+ done chan struct{}
+ refreshCh chan time.Time
+ once sync.Once
+ dlogger *log.Logger
+}
+
+// pState holds bars in its priorityQueue. It gets passed to
+// *Progress.serve(...) monitor goroutine.
+type pState struct {
+ bHeap priorityQueue
+ heapUpdated bool
+ pMatrix map[int][]chan int
+ aMatrix map[int][]chan int
+ barShutdownQueue []*Bar
+
+ // following are provided/overrided by user
+ idCount int
+ reqWidth int
+ popCompleted bool
+ outputDiscarded bool
+ rr time.Duration
+ uwg *sync.WaitGroup
+ externalRefresh <-chan interface{}
+ renderDelay <-chan struct{}
+ shutdownNotifier chan struct{}
+ parkedBars map[*Bar]*Bar
+ output io.Writer
+ debugOut io.Writer
+}
+
+// New creates new Progress container instance. It's not possible to
+// reuse instance after *Progress.Wait() method has been called.
+func New(options ...ContainerOption) *Progress {
+ return NewWithContext(context.Background(), options...)
+}
+
+// NewWithContext creates new Progress container instance with provided
+// context. It's not possible to reuse instance after *Progress.Wait()
+// method has been called.
+func NewWithContext(ctx context.Context, options ...ContainerOption) *Progress {
+ s := &pState{
+ bHeap: priorityQueue{},
+ rr: prr,
+ parkedBars: make(map[*Bar]*Bar),
+ output: os.Stdout,
+ debugOut: ioutil.Discard,
+ }
+
+ for _, opt := range options {
+ if opt != nil {
+ opt(s)
+ }
+ }
+
+ p := &Progress{
+ ctx: ctx,
+ uwg: s.uwg,
+ cwg: new(sync.WaitGroup),
+ bwg: new(sync.WaitGroup),
+ operateState: make(chan func(*pState)),
+ done: make(chan struct{}),
+ dlogger: log.New(s.debugOut, "[mpb] ", log.Lshortfile),
+ }
+
+ p.cwg.Add(1)
+ go p.serve(s, cwriter.New(s.output))
+ return p
+}
+
+// AddBar creates a bar with default bar filler. Different filler can
+// be choosen and applied via `*Progress.Add(...) *Bar` method.
+func (p *Progress) AddBar(total int64, options ...BarOption) *Bar {
+ return p.Add(total, NewBarFiller(BarDefaultStyle), options...)
+}
+
+// AddSpinner creates a bar with default spinner filler. Different
+// filler can be choosen and applied via `*Progress.Add(...) *Bar`
+// method.
+func (p *Progress) AddSpinner(total int64, alignment SpinnerAlignment, options ...BarOption) *Bar {
+ return p.Add(total, NewSpinnerFiller(SpinnerDefaultStyle, alignment), options...)
+}
+
+// Add creates a bar which renders itself by provided filler.
+// If `total <= 0` trigger complete event is disabled until reset with *bar.SetTotal(int64, bool).
+// Panics if *Progress instance is done, i.e. called after *Progress.Wait().
+func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) *Bar {
+ if filler == nil {
+ filler = BarFillerFunc(func(io.Writer, int, decor.Statistics) {})
+ }
+ p.bwg.Add(1)
+ result := make(chan *Bar)
+ select {
+ case p.operateState <- func(ps *pState) {
+ bs := ps.makeBarState(total, filler, options...)
+ bar := newBar(p, bs)
+ if bs.runningBar != nil {
+ bs.runningBar.noPop = true
+ ps.parkedBars[bs.runningBar] = bar
+ } else {
+ heap.Push(&ps.bHeap, bar)
+ ps.heapUpdated = true
+ }
+ ps.idCount++
+ result <- bar
+ }:
+ bar := <-result
+ bar.subscribeDecorators()
+ return bar
+ case <-p.done:
+ p.bwg.Done()
+ panic(fmt.Sprintf("%T instance can't be reused after it's done!", p))
+ }
+}
+
+func (p *Progress) dropBar(b *Bar) {
+ select {
+ case p.operateState <- func(s *pState) {
+ if b.index < 0 {
+ return
+ }
+ heap.Remove(&s.bHeap, b.index)
+ s.heapUpdated = true
+ }:
+ case <-p.done:
+ }
+}
+
+func (p *Progress) setBarPriority(b *Bar, priority int) {
+ select {
+ case p.operateState <- func(s *pState) {
+ if b.index < 0 {
+ return
+ }
+ b.priority = priority
+ heap.Fix(&s.bHeap, b.index)
+ }:
+ case <-p.done:
+ }
+}
+
+// UpdateBarPriority same as *Bar.SetPriority(int).
+func (p *Progress) UpdateBarPriority(b *Bar, priority int) {
+ p.setBarPriority(b, priority)
+}
+
+// BarCount returns bars count.
+func (p *Progress) BarCount() int {
+ result := make(chan int, 1)
+ select {
+ case p.operateState <- func(s *pState) { result <- s.bHeap.Len() }:
+ return <-result
+ case <-p.done:
+ return 0
+ }
+}
+
+// Wait waits for all bars to complete and finally shutdowns container.
+// After this method has been called, there is no way to reuse *Progress
+// instance.
+func (p *Progress) Wait() {
+ if p.uwg != nil {
+ // wait for user wg
+ p.uwg.Wait()
+ }
+
+ // wait for bars to quit, if any
+ p.bwg.Wait()
+
+ p.once.Do(p.shutdown)
+
+ // wait for container to quit
+ p.cwg.Wait()
+}
+
+func (p *Progress) shutdown() {
+ close(p.done)
+}
+
+func (p *Progress) serve(s *pState, cw *cwriter.Writer) {
+ defer p.cwg.Done()
+
+ p.refreshCh = s.newTicker(p.done)
+
+ for {
+ select {
+ case op := <-p.operateState:
+ op(s)
+ case <-p.refreshCh:
+ if err := s.render(cw); err != nil {
+ p.dlogger.Println(err)
+ }
+ case <-s.shutdownNotifier:
+ if s.heapUpdated {
+ if err := s.render(cw); err != nil {
+ p.dlogger.Println(err)
+ }
+ }
+ return
+ }
+ }
+}
+
+func (s *pState) newTicker(done <-chan struct{}) chan time.Time {
+ ch := make(chan time.Time)
+ if s.shutdownNotifier == nil {
+ s.shutdownNotifier = make(chan struct{})
+ }
+ go func() {
+ if s.renderDelay != nil {
+ <-s.renderDelay
+ }
+ var internalRefresh <-chan time.Time
+ if !s.outputDiscarded {
+ if s.externalRefresh == nil {
+ ticker := time.NewTicker(s.rr)
+ defer ticker.Stop()
+ internalRefresh = ticker.C
+ }
+ } else {
+ s.externalRefresh = nil
+ }
+ for {
+ select {
+ case t := <-internalRefresh:
+ ch <- t
+ case x := <-s.externalRefresh:
+ if t, ok := x.(time.Time); ok {
+ ch <- t
+ } else {
+ ch <- time.Now()
+ }
+ case <-done:
+ close(s.shutdownNotifier)
+ return
+ }
+ }
+ }()
+ return ch
+}
+
+func (s *pState) render(cw *cwriter.Writer) error {
+ if s.heapUpdated {
+ s.updateSyncMatrix()
+ s.heapUpdated = false
+ }
+ syncWidth(s.pMatrix)
+ syncWidth(s.aMatrix)
+
+ tw, err := cw.GetWidth()
+ if err != nil {
+ tw = s.reqWidth
+ }
+ for i := 0; i < s.bHeap.Len(); i++ {
+ bar := s.bHeap[i]
+ go bar.render(tw)
+ }
+
+ return s.flush(cw)
+}
+
+func (s *pState) flush(cw *cwriter.Writer) error {
+ var lineCount int
+ bm := make(map[*Bar]struct{}, s.bHeap.Len())
+ for s.bHeap.Len() > 0 {
+ b := heap.Pop(&s.bHeap).(*Bar)
+ cw.ReadFrom(<-b.frameCh)
+ if b.toShutdown {
+ if b.recoveredPanic != nil {
+ s.barShutdownQueue = append(s.barShutdownQueue, b)
+ b.toShutdown = false
+ } else {
+ // shutdown at next flush
+ // this ensures no bar ends up with less than 100% rendered
+ defer func() {
+ s.barShutdownQueue = append(s.barShutdownQueue, b)
+ }()
+ }
+ }
+ lineCount += b.extendedLines + 1
+ bm[b] = struct{}{}
+ }
+
+ for _, b := range s.barShutdownQueue {
+ if parkedBar := s.parkedBars[b]; parkedBar != nil {
+ parkedBar.priority = b.priority
+ heap.Push(&s.bHeap, parkedBar)
+ delete(s.parkedBars, b)
+ b.toDrop = true
+ }
+ if s.popCompleted && !b.noPop {
+ lineCount -= b.extendedLines + 1
+ b.toDrop = true
+ }
+ if b.toDrop {
+ delete(bm, b)
+ s.heapUpdated = true
+ }
+ b.cancel()
+ }
+ s.barShutdownQueue = s.barShutdownQueue[0:0]
+
+ for b := range bm {
+ heap.Push(&s.bHeap, b)
+ }
+
+ return cw.Flush(lineCount)
+}
+
+func (s *pState) updateSyncMatrix() {
+ s.pMatrix = make(map[int][]chan int)
+ s.aMatrix = make(map[int][]chan int)
+ for i := 0; i < s.bHeap.Len(); i++ {
+ bar := s.bHeap[i]
+ table := bar.wSyncTable()
+ pRow, aRow := table[0], table[1]
+
+ for i, ch := range pRow {
+ s.pMatrix[i] = append(s.pMatrix[i], ch)
+ }
+
+ for i, ch := range aRow {
+ s.aMatrix[i] = append(s.aMatrix[i], ch)
+ }
+ }
+}
+
+func (s *pState) makeBarState(total int64, filler BarFiller, options ...BarOption) *bState {
+ bs := &bState{
+ id: s.idCount,
+ priority: s.idCount,
+ reqWidth: s.reqWidth,
+ total: total,
+ filler: filler,
+ extender: func(r io.Reader, _ int, _ decor.Statistics) (io.Reader, int) { return r, 0 },
+ debugOut: s.debugOut,
+ }
+
+ if total > 0 {
+ bs.triggerComplete = true
+ }
+
+ for _, opt := range options {
+ if opt != nil {
+ opt(bs)
+ }
+ }
+
+ if bs.middleware != nil {
+ bs.filler = bs.middleware(filler)
+ bs.middleware = nil
+ }
+
+ if s.popCompleted && !bs.noPop {
+ bs.priority = -(math.MaxInt32 - s.idCount)
+ }
+
+ bs.bufP = bytes.NewBuffer(make([]byte, 0, 128))
+ bs.bufB = bytes.NewBuffer(make([]byte, 0, 256))
+ bs.bufA = bytes.NewBuffer(make([]byte, 0, 128))
+
+ return bs
+}
+
+func syncWidth(matrix map[int][]chan int) {
+ for _, column := range matrix {
+ go maxWidthDistributor(column)
+ }
+}
+
+var maxWidthDistributor = func(column []chan int) {
+ var maxWidth int
+ for _, ch := range column {
+ if w := <-ch; w > maxWidth {
+ maxWidth = w
+ }
+ }
+ for _, ch := range column {
+ ch <- maxWidth
+ }
+}
diff --git a/vendor/github.com/vbauerster/mpb/v6/proxyreader.go b/vendor/github.com/vbauerster/mpb/v6/proxyreader.go
new file mode 100644
index 000000000..316f438d7
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/v6/proxyreader.go
@@ -0,0 +1,90 @@
+package mpb
+
+import (
+ "io"
+ "io/ioutil"
+ "time"
+)
+
+type proxyReader struct {
+ io.ReadCloser
+ bar *Bar
+}
+
+func (x *proxyReader) Read(p []byte) (int, error) {
+ n, err := x.ReadCloser.Read(p)
+ x.bar.IncrBy(n)
+ if err == io.EOF {
+ go x.bar.SetTotal(0, true)
+ }
+ return n, err
+}
+
+type proxyWriterTo struct {
+ io.ReadCloser // *proxyReader
+ wt io.WriterTo
+ bar *Bar
+}
+
+func (x *proxyWriterTo) WriteTo(w io.Writer) (int64, error) {
+ n, err := x.wt.WriteTo(w)
+ x.bar.IncrInt64(n)
+ if err == io.EOF {
+ go x.bar.SetTotal(0, true)
+ }
+ return n, err
+}
+
+type ewmaProxyReader struct {
+ io.ReadCloser // *proxyReader
+ bar *Bar
+ iT time.Time
+}
+
+func (x *ewmaProxyReader) Read(p []byte) (int, error) {
+ n, err := x.ReadCloser.Read(p)
+ if n > 0 {
+ x.bar.DecoratorEwmaUpdate(time.Since(x.iT))
+ x.iT = time.Now()
+ }
+ return n, err
+}
+
+type ewmaProxyWriterTo struct {
+ io.ReadCloser // *ewmaProxyReader
+ wt io.WriterTo // *proxyWriterTo
+ bar *Bar
+ iT time.Time
+}
+
+func (x *ewmaProxyWriterTo) WriteTo(w io.Writer) (int64, error) {
+ n, err := x.wt.WriteTo(w)
+ if n > 0 {
+ x.bar.DecoratorEwmaUpdate(time.Since(x.iT))
+ x.iT = time.Now()
+ }
+ return n, err
+}
+
+func newProxyReader(r io.Reader, bar *Bar) io.ReadCloser {
+ rc := toReadCloser(r)
+ rc = &proxyReader{rc, bar}
+
+ if wt, isWriterTo := r.(io.WriterTo); bar.hasEwmaDecorators {
+ now := time.Now()
+ rc = &ewmaProxyReader{rc, bar, now}
+ if isWriterTo {
+ rc = &ewmaProxyWriterTo{rc, wt, bar, now}
+ }
+ } else if isWriterTo {
+ rc = &proxyWriterTo{rc, wt, bar}
+ }
+ return rc
+}
+
+func toReadCloser(r io.Reader) io.ReadCloser {
+ if rc, ok := r.(io.ReadCloser); ok {
+ return rc
+ }
+ return ioutil.NopCloser(r)
+}
diff --git a/vendor/golang.org/x/sys/execabs/execabs.go b/vendor/golang.org/x/sys/execabs/execabs.go
new file mode 100644
index 000000000..78192498d
--- /dev/null
+++ b/vendor/golang.org/x/sys/execabs/execabs.go
@@ -0,0 +1,102 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package execabs is a drop-in replacement for os/exec
+// that requires PATH lookups to find absolute paths.
+// That is, execabs.Command("cmd") runs the same PATH lookup
+// as exec.Command("cmd"), but if the result is a path
+// which is relative, the Run and Start methods will report
+// an error instead of running the executable.
+//
+// See https://blog.golang.org/path-security for more information
+// about when it may be necessary or appropriate to use this package.
+package execabs
+
+import (
+ "context"
+ "fmt"
+ "os/exec"
+ "path/filepath"
+ "reflect"
+ "unsafe"
+)
+
+// ErrNotFound is the error resulting if a path search failed to find an executable file.
+// It is an alias for exec.ErrNotFound.
+var ErrNotFound = exec.ErrNotFound
+
+// Cmd represents an external command being prepared or run.
+// It is an alias for exec.Cmd.
+type Cmd = exec.Cmd
+
+// Error is returned by LookPath when it fails to classify a file as an executable.
+// It is an alias for exec.Error.
+type Error = exec.Error
+
+// An ExitError reports an unsuccessful exit by a command.
+// It is an alias for exec.ExitError.
+type ExitError = exec.ExitError
+
+func relError(file, path string) error {
+ return fmt.Errorf("%s resolves to executable in current directory (.%c%s)", file, filepath.Separator, path)
+}
+
+// LookPath searches for an executable named file in the directories
+// named by the PATH environment variable. If file contains a slash,
+// it is tried directly and the PATH is not consulted. The result will be
+// an absolute path.
+//
+// LookPath differs from exec.LookPath in its handling of PATH lookups,
+// which are used for file names without slashes. If exec.LookPath's
+// PATH lookup would have returned an executable from the current directory,
+// LookPath instead returns an error.
+func LookPath(file string) (string, error) {
+ path, err := exec.LookPath(file)
+ if err != nil {
+ return "", err
+ }
+ if filepath.Base(file) == file && !filepath.IsAbs(path) {
+ return "", relError(file, path)
+ }
+ return path, nil
+}
+
+func fixCmd(name string, cmd *exec.Cmd) {
+ if filepath.Base(name) == name && !filepath.IsAbs(cmd.Path) {
+ // exec.Command was called with a bare binary name and
+ // exec.LookPath returned a path which is not absolute.
+ // Set cmd.lookPathErr and clear cmd.Path so that it
+ // cannot be run.
+ lookPathErr := (*error)(unsafe.Pointer(reflect.ValueOf(cmd).Elem().FieldByName("lookPathErr").Addr().Pointer()))
+ if *lookPathErr == nil {
+ *lookPathErr = relError(name, cmd.Path)
+ }
+ cmd.Path = ""
+ }
+}
+
+// CommandContext is like Command but includes a context.
+//
+// The provided context is used to kill the process (by calling os.Process.Kill)
+// if the context becomes done before the command completes on its own.
+func CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd {
+ cmd := exec.CommandContext(ctx, name, arg...)
+ fixCmd(name, cmd)
+ return cmd
+
+}
+
+// Command returns the Cmd struct to execute the named program with the given arguments.
+// See exec.Command for most details.
+//
+// Command differs from exec.Command in its handling of PATH lookups,
+// which are used when the program name contains no slashes.
+// If exec.Command would have returned an exec.Cmd configured to run an
+// executable from the current directory, Command instead
+// returns an exec.Cmd that will return an error from Start or Run.
+func Command(name string, arg ...string) *exec.Cmd {
+ cmd := exec.Command(name, arg...)
+ fixCmd(name, cmd)
+ return cmd
+}
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/golang.org/x/sys/unix/asm_bsd_386.s
index 49f0ac236..7f29275fa 100644
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_386.s
@@ -1,14 +1,14 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
// +build gc
#include "textflag.h"
-//
-// System call support for 386, FreeBSD
-//
+// System call support for 386 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
@@ -22,7 +22,7 @@ TEXT ·Syscall6(SB),NOSPLIT,$0-40
TEXT ·Syscall9(SB),NOSPLIT,$0-52
JMP syscall·Syscall9(SB)
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
+TEXT ·RawSyscall(SB),NOSPLIT,$0-28
JMP syscall·RawSyscall(SB)
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
index e57367c17..2b99c349a 100644
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
@@ -1,14 +1,14 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc
+// +build darwin dragonfly freebsd netbsd openbsd
// +build gc
#include "textflag.h"
-//
-// System call support for AMD64, NetBSD
-//
+// System call support for AMD64 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s
index d7da175e1..98ebfad9d 100644
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s
@@ -1,14 +1,14 @@
-// Copyright 2013 The Go Authors. All rights reserved.
+// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
// +build gc
#include "textflag.h"
-//
-// System call support for ARM, NetBSD
-//
+// System call support for ARM BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
index f2397fde5..fe36a7391 100644
--- a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
@@ -1,14 +1,14 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
// +build gc
#include "textflag.h"
-//
-// System call support for AMD64, Darwin
-//
+// System call support for ARM64 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/golang.org/x/sys/unix/asm_darwin_386.s
deleted file mode 100644
index 8a06b87d7..000000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for 386, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
deleted file mode 100644
index c9e6b6fc8..000000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-// +build arm,darwin
-
-#include "textflag.h"
-
-//
-// System call support for ARM, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
deleted file mode 100644
index 89843f8f4..000000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-// +build arm64,darwin
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
deleted file mode 100644
index 27674e1ca..000000000
--- a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, DragonFly
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
deleted file mode 100644
index f2dfc57b8..000000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
deleted file mode 100644
index 6d740db2c..000000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for ARM, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
deleted file mode 100644
index a8f5a29b3..000000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for ARM64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
deleted file mode 100644
index ae7b498d5..000000000
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for 386, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
deleted file mode 100644
index e7cbe1904..000000000
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for ARM64, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
deleted file mode 100644
index 2f00b0310..000000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for 386, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
deleted file mode 100644
index 07632c99c..000000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
deleted file mode 100644
index 73e997320..000000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for ARM, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s
deleted file mode 100644
index c47302aa4..000000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gc
-
-#include "textflag.h"
-
-//
-// System call support for arm64, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
index d257fac50..d727cad19 100644
--- a/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/vendor/golang.org/x/sys/unix/mkall.sh
@@ -199,7 +199,7 @@ illumos_amd64)
mksyscall="go run mksyscall_solaris.go"
mkerrors=
mksysnum=
- mktypes=
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
*)
echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 87f9d1e35..086d69411 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -56,6 +56,7 @@ includes_Darwin='
#define _DARWIN_C_SOURCE
#define KERNEL
#define _DARWIN_USE_64_BIT_INODE
+#define __APPLE_USE_RFC_3542
#include <stdint.h>
#include <sys/attr.h>
#include <sys/clonefile.h>
@@ -216,6 +217,7 @@ struct ltchars {
#include <linux/genetlink.h>
#include <linux/hdreg.h>
#include <linux/hidraw.h>
+#include <linux/icmp.h>
#include <linux/icmpv6.h>
#include <linux/if.h>
#include <linux/if_addr.h>
@@ -500,7 +502,7 @@ ccflags="$@"
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ ||
$2 ~ /^TP_STATUS_/ ||
$2 ~ /^FALLOC_/ ||
- $2 == "ICMPV6_FILTER" ||
+ $2 ~ /^ICMP(V6)?_FILTER$/ ||
$2 == "SOMAXCONN" ||
$2 == "NAME_MAX" ||
$2 == "IFNAMSIZ" ||
diff --git a/vendor/golang.org/x/sys/unix/syscall_illumos.go b/vendor/golang.org/x/sys/unix/syscall_illumos.go
index bc442e3ba..c5c58806c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_illumos.go
+++ b/vendor/golang.org/x/sys/unix/syscall_illumos.go
@@ -9,7 +9,9 @@
package unix
-import "unsafe"
+import (
+ "unsafe"
+)
func bytes2iovec(bs [][]byte) []Iovec {
iovecs := make([]Iovec, len(bs))
@@ -76,3 +78,52 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
}
return
}
+
+//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
+
+func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Len: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
+ }
+ if len(data) > 0 {
+ datap = &strbuf{
+ Len: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+ return putmsg(fd, clp, datap, flags)
+}
+
+//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
+
+func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Maxlen: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
+ }
+ if len(data) > 0 {
+ datap = &strbuf{
+ Maxlen: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+
+ if err = getmsg(fd, clp, datap, &flags); err != nil {
+ return nil, nil, 0, err
+ }
+
+ if len(cl) > 0 {
+ retCl = cl[:clp.Len]
+ }
+ if len(data) > 0 {
+ retData = data[:datap.Len]
+ }
+ return retCl, retData, flags, nil
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index a941d8881..a1e45694b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -250,7 +250,7 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
}
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
- args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)}
+ args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen}
_, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
if err != 0 {
return err
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index 169497f06..77fcde7c1 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -565,7 +565,12 @@ func Minor(dev uint64) uint32 {
* Expose the ioctl function
*/
-//sys ioctl(fd int, req uint, arg uintptr) (err error)
+//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, err = ioctlRet(fd, req, arg)
+ return err
+}
func IoctlSetTermio(fd int, req uint, value *Termio) error {
err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index 0100cb12f..991996b60 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -776,15 +776,24 @@ const (
IPV6_2292PKTINFO = 0x13
IPV6_2292PKTOPTIONS = 0x19
IPV6_2292RTHDR = 0x18
+ IPV6_3542DSTOPTS = 0x32
+ IPV6_3542HOPLIMIT = 0x2f
+ IPV6_3542HOPOPTS = 0x31
+ IPV6_3542NEXTHOP = 0x30
+ IPV6_3542PKTINFO = 0x2e
+ IPV6_3542RTHDR = 0x33
IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
+ IPV6_AUTOFLOWLABEL = 0x3b
IPV6_BINDV6ONLY = 0x1b
IPV6_BOUND_IF = 0x7d
IPV6_CHECKSUM = 0x1a
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
IPV6_DEFAULT_MULTICAST_LOOP = 0x1
IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
@@ -796,6 +805,8 @@ const (
IPV6_FW_GET = 0x22
IPV6_FW_ZERO = 0x21
IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
IPV6_IPSEC_POLICY = 0x1c
IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd
@@ -807,20 +818,34 @@ const (
IPV6_MAX_SOCK_SRC_FILTER = 0x80
IPV6_MIN_MEMBERSHIPS = 0x1f
IPV6_MMTU = 0x500
+ IPV6_MSFILTER = 0x4a
IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_PATHMTU = 0x2c
+ IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
IPV6_PORTRANGE_DEFAULT = 0x0
IPV6_PORTRANGE_HIGH = 0x1
IPV6_PORTRANGE_LOW = 0x2
+ IPV6_PREFER_TEMPADDR = 0x3f
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x3d
+ IPV6_RECVRTHDR = 0x26
IPV6_RECVTCLASS = 0x23
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x39
IPV6_RTHDR_LOOSE = 0x0
IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0x0
IPV6_SOCKOPT_RESERVED1 = 0x3
IPV6_TCLASS = 0x24
IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
IPV6_V6ONLY = 0x1b
IPV6_VERSION = 0x60
IPV6_VERSION_MASK = 0xf0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index df26a1968..e644eaf5e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -776,15 +776,24 @@ const (
IPV6_2292PKTINFO = 0x13
IPV6_2292PKTOPTIONS = 0x19
IPV6_2292RTHDR = 0x18
+ IPV6_3542DSTOPTS = 0x32
+ IPV6_3542HOPLIMIT = 0x2f
+ IPV6_3542HOPOPTS = 0x31
+ IPV6_3542NEXTHOP = 0x30
+ IPV6_3542PKTINFO = 0x2e
+ IPV6_3542RTHDR = 0x33
IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
+ IPV6_AUTOFLOWLABEL = 0x3b
IPV6_BINDV6ONLY = 0x1b
IPV6_BOUND_IF = 0x7d
IPV6_CHECKSUM = 0x1a
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
IPV6_DEFAULT_MULTICAST_LOOP = 0x1
IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
@@ -796,6 +805,8 @@ const (
IPV6_FW_GET = 0x22
IPV6_FW_ZERO = 0x21
IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
IPV6_IPSEC_POLICY = 0x1c
IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd
@@ -807,20 +818,34 @@ const (
IPV6_MAX_SOCK_SRC_FILTER = 0x80
IPV6_MIN_MEMBERSHIPS = 0x1f
IPV6_MMTU = 0x500
+ IPV6_MSFILTER = 0x4a
IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_PATHMTU = 0x2c
+ IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
IPV6_PORTRANGE_DEFAULT = 0x0
IPV6_PORTRANGE_HIGH = 0x1
IPV6_PORTRANGE_LOW = 0x2
+ IPV6_PREFER_TEMPADDR = 0x3f
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x3d
+ IPV6_RECVRTHDR = 0x26
IPV6_RECVTCLASS = 0x23
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x39
IPV6_RTHDR_LOOSE = 0x0
IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0x0
IPV6_SOCKOPT_RESERVED1 = 0x3
IPV6_TCLASS = 0x24
IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
IPV6_V6ONLY = 0x1b
IPV6_VERSION = 0x60
IPV6_VERSION_MASK = 0xf0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index 504dd6cd2..3b1b9287b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -974,6 +974,7 @@ const (
HUGETLBFS_MAGIC = 0x958458f6
IBSHIFT = 0x10
ICMPV6_FILTER = 0x1
+ ICMP_FILTER = 0x1
ICRNL = 0x100
IFA_F_DADFAILED = 0x8
IFA_F_DEPRECATED = 0x20
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
index b57c7050d..af5cb064e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
@@ -15,19 +15,25 @@ import (
//go:cgo_import_dynamic libc_writev writev "libc.so"
//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
+//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
+//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
//go:linkname procreadv libc_readv
//go:linkname procpreadv libc_preadv
//go:linkname procwritev libc_writev
//go:linkname procpwritev libc_pwritev
//go:linkname procaccept4 libc_accept4
+//go:linkname procputmsg libc_putmsg
+//go:linkname procgetmsg libc_getmsg
var (
procreadv,
procpreadv,
procwritev,
procpwritev,
- procaccept4 syscallFunc
+ procaccept4,
+ procputmsg,
+ procgetmsg syscallFunc
)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -100,3 +106,23 @@ func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int,
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index 7099f555a..4e18d5c99 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -619,8 +619,9 @@ func __minor(version int, dev uint64) (val uint) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
+func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
+ ret = int(r0)
if e1 != 0 {
err = e1
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
new file mode 100644
index 000000000..1137a5a1f
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
@@ -0,0 +1,40 @@
+// cgo -godefs types_illumos.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build amd64 && illumos
+// +build amd64,illumos
+
+package unix
+
+const (
+ TUNNEWPPA = 0x540001
+ TUNSETPPA = 0x540002
+
+ I_STR = 0x5308
+ I_POP = 0x5303
+ I_PUSH = 0x5302
+ I_PLINK = 0x5316
+ I_PUNLINK = 0x5317
+
+ IF_UNITSEL = -0x7ffb8cca
+)
+
+type strbuf struct {
+ Maxlen int32
+ Len int32
+ Buf *int8
+}
+
+type strioctl struct {
+ Cmd int32
+ Timout int32
+ Len int32
+ Dp *int8
+}
+
+type lifreq struct {
+ Name [32]int8
+ Lifru1 [4]byte
+ Type uint32
+ Lifru [336]byte
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 02c5d7867..4e02c35f7 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -56,7 +56,7 @@ github.com/containerd/containerd/errdefs
github.com/containerd/containerd/log
github.com/containerd/containerd/platforms
github.com/containerd/containerd/sys
-# github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7
+# github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e
github.com/containerd/continuity/fs
github.com/containerd/continuity/sysx
# github.com/containernetworking/cni v0.8.1
@@ -74,7 +74,7 @@ github.com/containernetworking/plugins/pkg/utils/hwaddr
github.com/containernetworking/plugins/pkg/utils/sysctl
github.com/containernetworking/plugins/plugins/ipam/host-local/backend
github.com/containernetworking/plugins/plugins/ipam/host-local/backend/allocator
-# github.com/containers/buildah v1.19.8
+# github.com/containers/buildah v1.20.0
github.com/containers/buildah
github.com/containers/buildah/bind
github.com/containers/buildah/chroot
@@ -93,7 +93,7 @@ github.com/containers/buildah/pkg/parse
github.com/containers/buildah/pkg/rusage
github.com/containers/buildah/pkg/supplemented
github.com/containers/buildah/util
-# github.com/containers/common v0.35.3
+# github.com/containers/common v0.35.4
github.com/containers/common/pkg/apparmor
github.com/containers/common/pkg/apparmor/internal/supported
github.com/containers/common/pkg/auth
@@ -187,7 +187,7 @@ github.com/containers/psgo/internal/dev
github.com/containers/psgo/internal/host
github.com/containers/psgo/internal/proc
github.com/containers/psgo/internal/process
-# github.com/containers/storage v1.28.0
+# github.com/containers/storage v1.28.1
github.com/containers/storage
github.com/containers/storage/drivers
github.com/containers/storage/drivers/aufs
@@ -240,12 +240,24 @@ github.com/coreos/go-systemd/v22/dbus
github.com/coreos/go-systemd/v22/internal/dlopen
github.com/coreos/go-systemd/v22/journal
github.com/coreos/go-systemd/v22/sdjournal
+# github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3
+github.com/coreos/stream-metadata-go/fedoracoreos
+github.com/coreos/stream-metadata-go/fedoracoreos/internals
+github.com/coreos/stream-metadata-go/stream
+github.com/coreos/stream-metadata-go/stream/rhcos
# github.com/cri-o/ocicni v0.2.1-0.20210301205850-541cf7c703cf
github.com/cri-o/ocicni/pkg/ocicni
# github.com/cyphar/filepath-securejoin v0.2.2
github.com/cyphar/filepath-securejoin
# github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew/spew
+# github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1
+github.com/digitalocean/go-libvirt
+github.com/digitalocean/go-libvirt/internal/constants
+github.com/digitalocean/go-libvirt/internal/event
+github.com/digitalocean/go-libvirt/internal/go-xdr/xdr2
+# github.com/digitalocean/go-qemu v0.0.0-20210209191958-152a1535e49f
+github.com/digitalocean/go-qemu/qmp
# github.com/docker/distribution v2.7.1+incompatible
github.com/docker/distribution
github.com/docker/distribution/digestset
@@ -258,7 +270,7 @@ github.com/docker/distribution/registry/client/auth/challenge
github.com/docker/distribution/registry/client/transport
github.com/docker/distribution/registry/storage/cache
github.com/docker/distribution/registry/storage/cache/memory
-# github.com/docker/docker v20.10.0-beta1.0.20201113105859-b6bfff2a628f+incompatible
+# github.com/docker/docker v20.10.3-0.20210216175712-646072ed6524+incompatible
github.com/docker/docker/api
github.com/docker/docker/api/types
github.com/docker/docker/api/types/blkiodev
@@ -309,7 +321,7 @@ github.com/docker/libnetwork/resolvconf/dns
github.com/docker/libnetwork/types
# github.com/fsnotify/fsnotify v1.4.9
github.com/fsnotify/fsnotify
-# github.com/fsouza/go-dockerclient v1.6.6
+# github.com/fsouza/go-dockerclient v1.7.2
github.com/fsouza/go-dockerclient
# github.com/ghodss/yaml v1.0.0
github.com/ghodss/yaml
@@ -390,11 +402,11 @@ github.com/matttproud/golang_protobuf_extensions/pbutil
github.com/miekg/pkcs11
# github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible
github.com/mistifyio/go-zfs
-# github.com/moby/sys/mount v0.1.1
+# github.com/moby/sys/mount v0.2.0
github.com/moby/sys/mount
# github.com/moby/sys/mountinfo v0.4.1
github.com/moby/sys/mountinfo
-# github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf
+# github.com/moby/term v0.0.0-20201216013528-df9cb8a40635
github.com/moby/term
github.com/moby/term/windows
# github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
@@ -484,7 +496,7 @@ github.com/opencontainers/runtime-tools/validate
github.com/opencontainers/selinux/go-selinux
github.com/opencontainers/selinux/go-selinux/label
github.com/opencontainers/selinux/pkg/pwalk
-# github.com/openshift/imagebuilder v1.1.8
+# github.com/openshift/imagebuilder v1.2.0
github.com/openshift/imagebuilder
github.com/openshift/imagebuilder/dockerfile/command
github.com/openshift/imagebuilder/dockerfile/parser
@@ -512,13 +524,13 @@ github.com/prometheus/client_model/go
github.com/prometheus/common/expfmt
github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg
github.com/prometheus/common/model
-# github.com/prometheus/procfs v0.2.0
+# github.com/prometheus/procfs v0.6.0
github.com/prometheus/procfs
github.com/prometheus/procfs/internal/fs
github.com/prometheus/procfs/internal/util
# github.com/rivo/uniseg v0.2.0
github.com/rivo/uniseg
-# github.com/rootless-containers/rootlesskit v0.14.0-beta.0
+# github.com/rootless-containers/rootlesskit v0.14.0
github.com/rootless-containers/rootlesskit/pkg/api
github.com/rootless-containers/rootlesskit/pkg/msgutil
github.com/rootless-containers/rootlesskit/pkg/port
@@ -558,7 +570,7 @@ github.com/uber/jaeger-client-go/thrift-gen/agent
github.com/uber/jaeger-client-go/thrift-gen/jaeger
github.com/uber/jaeger-client-go/thrift-gen/zipkincore
github.com/uber/jaeger-client-go/utils
-# github.com/ulikunitz/xz v0.5.9
+# github.com/ulikunitz/xz v0.5.10
github.com/ulikunitz/xz
github.com/ulikunitz/xz/internal/hash
github.com/ulikunitz/xz/internal/xlog
@@ -572,6 +584,11 @@ github.com/vbauerster/mpb/v5
github.com/vbauerster/mpb/v5/cwriter
github.com/vbauerster/mpb/v5/decor
github.com/vbauerster/mpb/v5/internal
+# github.com/vbauerster/mpb/v6 v6.0.3
+github.com/vbauerster/mpb/v6
+github.com/vbauerster/mpb/v6/cwriter
+github.com/vbauerster/mpb/v6/decor
+github.com/vbauerster/mpb/v6/internal
# github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852
github.com/vishvananda/netlink
github.com/vishvananda/netlink/nl
@@ -629,11 +646,12 @@ golang.org/x/net/internal/socks
golang.org/x/net/internal/timeseries
golang.org/x/net/proxy
golang.org/x/net/trace
-# golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
+# golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
golang.org/x/sync/errgroup
golang.org/x/sync/semaphore
-# golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005
+# golang.org/x/sys v0.0.0-20210324051608-47abb6519492
golang.org/x/sys/cpu
+golang.org/x/sys/execabs
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/plan9
golang.org/x/sys/unix