summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel
diff options
context:
space:
mode:
authorCharlie Doern <cdoern@redhat.com>2022-07-12 15:23:45 -0400
committerCharlie Doern <cdoern@redhat.com>2022-08-04 13:59:58 -0400
commit842c6c7c6748f8705698d25a29945f8437f1bed2 (patch)
tree944a6f4e50f76a9f5a2d5e1eae0f698a69f39fd4 /pkg/domain/infra/tunnel
parent1cf6afb788a681fc379d58d7f1cb69eb1690dba9 (diff)
downloadpodman-842c6c7c6748f8705698d25a29945f8437f1bed2.tar.gz
podman-842c6c7c6748f8705698d25a29945f8437f1bed2.tar.bz2
podman-842c6c7c6748f8705698d25a29945f8437f1bed2.zip
podman generate spec
implement a new command `podman generate spec` which can formulate a json specgen to be consumed by both the pod and container creation API. supported flags are --verbose (default true) print output to the terminal --compact print the json output in a single line format to be piped to the API --filename put the output in a file --clone rename the pod/ctr in the spec so it won't conflict w/ an existing entity Signed-off-by: Charlie Doern <cdoern@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r--pkg/domain/infra/tunnel/generate.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go
index 235d478ec..ed63d363a 100644
--- a/pkg/domain/infra/tunnel/generate.go
+++ b/pkg/domain/infra/tunnel/generate.go
@@ -2,6 +2,7 @@ package tunnel
import (
"context"
+ "fmt"
"github.com/containers/podman/v4/pkg/bindings/generate"
"github.com/containers/podman/v4/pkg/domain/entities"
@@ -43,3 +44,7 @@ func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string,
options := new(generate.KubeOptions).WithService(opts.Service)
return generate.Kube(ic.ClientCtx, nameOrIDs, options)
}
+
+func (ic *ContainerEngine) GenerateSpec(ctx context.Context, opts *entities.GenerateSpecOptions) (*entities.GenerateSpecReport, error) {
+ return nil, fmt.Errorf("GenerateSpec is not supported on the remote API")
+}