summaryrefslogtreecommitdiff
path: root/pkg/bindings/volumes
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-09-30 14:43:39 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-10-04 07:07:56 -0400
commit21c9dc3c406bb486c44c4a27e5b0497bab1cd40d (patch)
tree56793ffd885f835fa54013e9914844ff9ba20d92 /pkg/bindings/volumes
parent36821d302e3787a42d6eefdbd0bdbb6d9da261fb (diff)
downloadpodman-21c9dc3c406bb486c44c4a27e5b0497bab1cd40d.tar.gz
podman-21c9dc3c406bb486c44c4a27e5b0497bab1cd40d.tar.bz2
podman-21c9dc3c406bb486c44c4a27e5b0497bab1cd40d.zip
Add --time out for podman * rm -f commands
Add --time flag to podman container rm Add --time flag to podman pod rm Add --time flag to podman volume rm Add --time flag to podman network rm Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/bindings/volumes')
-rw-r--r--pkg/bindings/volumes/types.go3
-rw-r--r--pkg/bindings/volumes/types_remove_options.go15
2 files changed, 17 insertions, 1 deletions
diff --git a/pkg/bindings/volumes/types.go b/pkg/bindings/volumes/types.go
index 3fda77ddd..d2f19c0c8 100644
--- a/pkg/bindings/volumes/types.go
+++ b/pkg/bindings/volumes/types.go
@@ -28,7 +28,8 @@ type PruneOptions struct {
// RemoveOptions are optional options for removing volumes
type RemoveOptions struct {
// Force removes the volume even if it is being used
- Force *bool
+ Force *bool
+ Timeout *uint
}
//go:generate go run ../generator/generator.go ExistsOptions
diff --git a/pkg/bindings/volumes/types_remove_options.go b/pkg/bindings/volumes/types_remove_options.go
index 0e0a3c804..fe079cddf 100644
--- a/pkg/bindings/volumes/types_remove_options.go
+++ b/pkg/bindings/volumes/types_remove_options.go
@@ -31,3 +31,18 @@ func (o *RemoveOptions) GetForce() bool {
}
return *o.Force
}
+
+// WithTimeout set field Timeout to given value
+func (o *RemoveOptions) WithTimeout(value uint) *RemoveOptions {
+ o.Timeout = &value
+ return o
+}
+
+// GetTimeout returns value of field Timeout
+func (o *RemoveOptions) GetTimeout() uint {
+ if o.Timeout == nil {
+ var z uint
+ return z
+ }
+ return *o.Timeout
+}