fix add node not set password bug

This commit is contained in:
barnett 2019-06-01 17:00:40 +08:00
parent e41b11909a
commit 6bfb0c651f

View File

@ -618,6 +618,9 @@ func NewCmdNode() cli.Command {
if c.String("root-pass") != "" && c.String("private-key") != "" {
showError("Options private-key and root-pass are conflicting")
}
if c.String("root-pass") == "" && c.String("private-key") == "" {
showError("Options private-key and root-pass must set one")
}
if c.String("role") != "compute" && c.String("role") != "manage" && c.String("role") != "gateway" {
showError("node role only support `compute`, `manage` and `gateway`")
}