Backend for container delete

This commit is contained in:
Gregory Kurtzer
2020-12-07 19:43:56 -08:00
parent 28e66e8659
commit dd1913c1de

View File

@@ -77,9 +77,15 @@ func ValidSource(name string) bool {
}
if util.IsDir(fullPath) == false {
wwlog.Printf(wwlog.WARN, "Location is not a VNFS source directory: %s\n", name)
wwlog.Printf(wwlog.VERBOSE, "Location is not a VNFS source directory: %s\n", name)
return false
}
return true
}
func DeleteSource(name string) error {
fullPath := RootFsDir(name)
return os.RemoveAll(fullPath)
}