-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from rsteube/add-docker-engine
addedd docker engine subcommand
- Loading branch information
Showing
4 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var engineCmd = &cobra.Command{ | ||
Use: "engine", | ||
Short: "Manage the docker engine", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(engineCmd).Standalone() | ||
|
||
rootCmd.AddCommand(engineCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var engine_activateCmd = &cobra.Command{ | ||
Use: "activate", | ||
Short: "Activate Enterprise Edition.", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(engine_activateCmd).Standalone() | ||
|
||
engine_activateCmd.Flags().String("containerd", "", "override default location of containerd endpoint") | ||
engine_activateCmd.Flags().Bool("display-only", false, "only display license information and exit") | ||
engine_activateCmd.Flags().String("engine-image", "", "Specify engine image") | ||
engine_activateCmd.Flags().String("format", "", "Pretty-print licenses using a Go template") | ||
engine_activateCmd.Flags().String("license", "", "License File") | ||
engine_activateCmd.Flags().Bool("quiet", false, "Only display available licenses by ID") | ||
engine_activateCmd.Flags().String("registry-prefix", "", "Override the default location where engine images are pulled") | ||
engine_activateCmd.Flags().String("version", "", "Specify engine version (default is to use currently running") | ||
engineCmd.AddCommand(engine_activateCmd) | ||
|
||
carapace.Gen(engine_activateCmd).FlagCompletion(carapace.ActionMap{ | ||
"license": carapace.ActionFiles(""), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var engine_checkCmd = &cobra.Command{ | ||
Use: "check", | ||
Short: "Check for available engine updates", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(engine_checkCmd).Standalone() | ||
|
||
engine_checkCmd.Flags().String("containerd", "", "override default location of containerd endpoint") | ||
engine_checkCmd.Flags().Bool("downgrades", false, "Report downgrades (default omits older versions)") | ||
engine_checkCmd.Flags().String("engine-image", "", "Specify engine image (default uses the same image as currently") | ||
engine_checkCmd.Flags().String("format", "", "Pretty-print updates using a Go template") | ||
engine_checkCmd.Flags().Bool("pre-releases", false, "Include pre-release versions") | ||
engine_checkCmd.Flags().BoolP("quiet", "q", false, "Only display available versions") | ||
engine_checkCmd.Flags().String("registry-prefix", "", "Override the existing location where engine images are pulled") | ||
engine_checkCmd.Flags().Bool("upgrades", false, "Report available upgrades (default true)") | ||
engineCmd.AddCommand(engine_checkCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var engine_updateCmd = &cobra.Command{ | ||
Use: "update", | ||
Short: "Update a local engine", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(engine_updateCmd).Standalone() | ||
|
||
engine_updateCmd.Flags().String("containerd", "", "override default location of containerd endpoint") | ||
engine_updateCmd.Flags().String("engine-image", "", "Specify engine image (default uses the same image as currently") | ||
engine_updateCmd.Flags().String("registry-prefix", "", "Override the current location where engine images are pulled") | ||
engine_updateCmd.Flags().String("version", "", "Specify engine version") | ||
engineCmd.AddCommand(engine_updateCmd) | ||
} |