Skip to content

Commit

Permalink
add --dryRun flag to flytectl subcommands (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamersaw authored Aug 21, 2021
1 parent 3a48b4a commit ce15cf0
Show file tree
Hide file tree
Showing 72 changed files with 627 additions and 104 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package clusterresourceattribute
// AttrDeleteConfig Matchable resource attributes configuration passed from command line
type AttrDeleteConfig struct {
AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."`
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
}

var DefaultDelConfig = &AttrDeleteConfig{}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package clusterresourceattribute
// AttrUpdateConfig Matchable resource attributes configuration passed from command line
type AttrUpdateConfig struct {
AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."`
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
}

var DefaultUpdateConfig = &AttrUpdateConfig{}
10 changes: 10 additions & 0 deletions flytectl/cmd/config/subcommand/execution/delete_config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package execution

//go:generate pflags ExecDeleteConfig --default-var DefaultExecDeleteConfig --bind-default-var

var DefaultExecDeleteConfig = &ExecDeleteConfig{}

// ExecutionDeleteConfig stores the flags required by delete execution
type ExecDeleteConfig struct {
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
}
55 changes: 55 additions & 0 deletions flytectl/cmd/config/subcommand/execution/execdeleteconfig_flags.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package executionclusterlabel
// AttrDeleteConfig Matchable resource attributes configuration passed from command line
type AttrDeleteConfig struct {
AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."`
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
}

var DefaultDelConfig = &AttrDeleteConfig{}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package executionclusterlabel
// AttrUpdateConfig Matchable resource attributes configuration passed from command line
type AttrUpdateConfig struct {
AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."`
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
}

var DefaultUpdateConfig = &AttrUpdateConfig{}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package executionqueueattribute
// AttrDeleteConfig Matchable resource attributes configuration passed from command line
type AttrDeleteConfig struct {
AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."`
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
}

var DefaultDelConfig = &AttrDeleteConfig{}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package executionqueueattribute
// AttrUpdateConfig Matchable resource attributes configuration passed from command line
type AttrUpdateConfig struct {
AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."`
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
}

var DefaultUpdateConfig = &AttrUpdateConfig{}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ce15cf0

Please sign in to comment.