feature: support fetch baremetal uuid and use uuid to identify baremetal

This commit is contained in:
Qiu Jian
2019-10-22 10:33:15 +08:00
parent 42ed1f7961
commit 3c9c3ad164
11 changed files with 263 additions and 115 deletions
+12
View File
@@ -347,3 +347,15 @@ func ParseIPMIUser(lines []string) []compute.IPMIUser {
}
return ret
}
const (
UUID_EMPTY = "00000000-0000-0000-0000-000000000000"
)
func NormalizeUuid(uuid string) string {
uuid = strings.ToLower(uuid)
if uuid == UUID_EMPTY {
uuid = ""
}
return uuid
}