mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 18:58:02 +08:00
add node must set hostname
This commit is contained in:
parent
daf150101a
commit
5d09c8a186
@ -151,7 +151,7 @@ func getStatusShow(v *client.HostNode) (status string) {
|
||||
nss.color = color.FgRed
|
||||
}
|
||||
|
||||
result := nss.String()
|
||||
result := nss.String()
|
||||
if strings.Contains(result, "unknown") {
|
||||
result = "unknown"
|
||||
}
|
||||
@ -650,6 +650,9 @@ func addNodeCommand(c *cli.Context) error {
|
||||
if !c.IsSet("role") {
|
||||
showError("role must not null")
|
||||
}
|
||||
if c.String("hostname") == "" {
|
||||
showError("node hostname must be set")
|
||||
}
|
||||
if c.String("root-pass") != "" && c.String("private-key") != "" {
|
||||
showError("Options private-key and root-pass are conflicting")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user