Skip to content

Commit

Permalink
ex: docekrgc: remove BindForOutput flags
Browse files Browse the repository at this point in the history
  • Loading branch information
sjenning committed Dec 11, 2017
1 parent 4d15c88 commit bcb8d75
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 45 deletions.
18 changes: 0 additions & 18 deletions contrib/completions/bash/oc
Original file line number Diff line number Diff line change
Expand Up @@ -12056,30 +12056,12 @@ _oc_ex_dockergc()
flags_with_completion=()
flags_completion=()

flags+=("--dry-run")
local_nonpersistent_flags+=("--dry-run")
flags+=("--image-gc-high-threshold=")
local_nonpersistent_flags+=("--image-gc-high-threshold=")
flags+=("--image-gc-low-threshold=")
local_nonpersistent_flags+=("--image-gc-low-threshold=")
flags+=("--minimum-ttl-duration=")
local_nonpersistent_flags+=("--minimum-ttl-duration=")
flags+=("--no-headers")
local_nonpersistent_flags+=("--no-headers")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
flags+=("--show-all")
flags+=("-a")
local_nonpersistent_flags+=("--show-all")
flags+=("--show-labels")
local_nonpersistent_flags+=("--show-labels")
flags+=("--sort-by=")
local_nonpersistent_flags+=("--sort-by=")
flags+=("--template=")
flags_with_completion+=("--template")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--template=")
flags+=("--as=")
flags+=("--as-group=")
flags+=("--cache-dir=")
Expand Down
18 changes: 0 additions & 18 deletions contrib/completions/zsh/oc
Original file line number Diff line number Diff line change
Expand Up @@ -12198,30 +12198,12 @@ _oc_ex_dockergc()
flags_with_completion=()
flags_completion=()

flags+=("--dry-run")
local_nonpersistent_flags+=("--dry-run")
flags+=("--image-gc-high-threshold=")
local_nonpersistent_flags+=("--image-gc-high-threshold=")
flags+=("--image-gc-low-threshold=")
local_nonpersistent_flags+=("--image-gc-low-threshold=")
flags+=("--minimum-ttl-duration=")
local_nonpersistent_flags+=("--minimum-ttl-duration=")
flags+=("--no-headers")
local_nonpersistent_flags+=("--no-headers")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
flags+=("--show-all")
flags+=("-a")
local_nonpersistent_flags+=("--show-all")
flags+=("--show-labels")
local_nonpersistent_flags+=("--show-labels")
flags+=("--sort-by=")
local_nonpersistent_flags+=("--sort-by=")
flags+=("--template=")
flags_with_completion+=("--template")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--template=")
flags+=("--as=")
flags+=("--as-group=")
flags+=("--cache-dir=")
Expand Down
9 changes: 0 additions & 9 deletions pkg/oc/experimental/dockergc/dockergc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
dockerapi "github.com/docker/engine-api/client"
dockertypes "github.com/docker/engine-api/types"
dockerfilters "github.com/docker/engine-api/types/filters"
configcmd "github.com/openshift/origin/pkg/config/cmd"
"github.com/openshift/origin/pkg/oc/cli/util/clientcmd"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand All @@ -35,8 +34,6 @@ var (

// DockerGCConfigCmdOptions are options supported by the dockergc admin command.
type dockerGCConfigCmdOptions struct {
Action configcmd.BulkAction

// MinimumGCAge is the minimum age for a container or unused image before
// it is garbage collected.
MinimumGCAge metav1.Duration
Expand Down Expand Up @@ -68,10 +65,6 @@ var (

func NewCmdDockerGCConfig(f *clientcmd.Factory, parentName, name string, out, errout io.Writer) *cobra.Command {
options := &dockerGCConfigCmdOptions{
Action: configcmd.BulkAction{
Out: out,
ErrOut: errout,
},
MinimumGCAge: DefaultMinimumGCAge,
ImageGCHighThresholdPercent: DefaultImageGCHighThresholdPercent,
ImageGCLowThresholdPercent: DefaultImageGCLowThresholdPercent,
Expand All @@ -94,8 +87,6 @@ func NewCmdDockerGCConfig(f *clientcmd.Factory, parentName, name string, out, er
cmd.Flags().Int32Var(&options.ImageGCHighThresholdPercent, "image-gc-high-threshold", options.ImageGCHighThresholdPercent, "The percent of disk usage after which image garbage collection is always run.")
cmd.Flags().Int32Var(&options.ImageGCLowThresholdPercent, "image-gc-low-threshold", options.ImageGCLowThresholdPercent, "The percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to.")

options.Action.BindForOutput(cmd.Flags())

return cmd
}

Expand Down

0 comments on commit bcb8d75

Please sign in to comment.