-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Expand file tree
/
Copy pathvalidate.go
More file actions
32 lines (24 loc) · 903 Bytes
/
validate.go
File metadata and controls
32 lines (24 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package validate
import (
"io"
"github.com/spf13/cobra"
cmdutil "github.com/openshift/origin/pkg/cmd/util"
)
const ValidateRecommendedName = "validate"
const validateLong = `Validate configuration file integrity
The commands here allow administrators to validate the integrity of configuration files.
`
func NewCommandValidate(name, fullName string, out io.Writer) *cobra.Command {
// Parent command to which all subcommands are added.
cmds := &cobra.Command{
Use: name,
Short: "Validate configuration file integrity",
Long: validateLong,
Run: cmdutil.DefaultSubCommandRun(out),
}
cmds.AddCommand(NewCommandValidateMasterConfig(ValidateMasterConfigRecommendedName,
fullName+" "+ValidateMasterConfigRecommendedName, out))
cmds.AddCommand(NewCommandValidateNodeConfig(ValidateNodeConfigRecommendedName,
fullName+" "+ValidateNodeConfigRecommendedName, out))
return cmds
}