forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
validate.go
32 lines (24 loc) · 903 Bytes
/
validate.go
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
}