summaryrefslogtreecommitdiff
path: root/cmd/podman/system
diff options
context:
space:
mode:
authorSujil02 <sushah@redhat.com>2020-05-05 22:29:54 -0400
committerSujil02 <sushah@redhat.com>2020-05-11 17:03:32 -0400
commit1c6ae73a898222a14b98526339d9985c51f88d35 (patch)
tree0abf9eebf0625817cf92b77e03348543402d96b3 /cmd/podman/system
parentdc7d6f4818f4b986cfd15208d53f6765d8fad986 (diff)
downloadpodman-1c6ae73a898222a14b98526339d9985c51f88d35.tar.gz
podman-1c6ae73a898222a14b98526339d9985c51f88d35.tar.bz2
podman-1c6ae73a898222a14b98526339d9985c51f88d35.zip
Adds tunnel routes for system reset.
Adds tunnel routes for system reset. Makes forces flag local as options are not propogated down the stack. Adds relevant test cases and swagger docs. Signed-off-by: Sujil02 <sushah@redhat.com>
Diffstat (limited to 'cmd/podman/system')
-rw-r--r--cmd/podman/system/reset.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go
index 22ddc7529..6caa91690 100644
--- a/cmd/podman/system/reset.go
+++ b/cmd/podman/system/reset.go
@@ -26,10 +26,8 @@ var (
Long: systemResetDescription,
Run: reset,
}
-)
-var (
- systemResetOptions entities.SystemResetOptions
+ forceFlag bool
)
func init() {
@@ -39,12 +37,12 @@ func init() {
Parent: systemCmd,
})
flags := systemResetCommand.Flags()
- flags.BoolVarP(&systemResetOptions.Force, "force", "f", false, "Do not prompt for confirmation")
+ flags.BoolVarP(&forceFlag, "force", "f", false, "Do not prompt for confirmation")
}
func reset(cmd *cobra.Command, args []string) {
// Prompt for confirmation if --force is not set
- if !systemResetOptions.Force {
+ if !forceFlag {
reader := bufio.NewReader(os.Stdin)
fmt.Print(`
WARNING! This will remove:
@@ -74,7 +72,7 @@ Are you sure you want to continue? [y/N] `)
}
defer engine.Shutdown(registry.Context())
- if err := engine.Reset(registry.Context(), systemResetOptions); err != nil {
+ if err := engine.Reset(registry.Context()); err != nil {
fmt.Println(err)
os.Exit(125)
}