func generateLegacyUUID(bd blockdevice.BlockDevice) (string, bool) {
	localDiskModels := []string{
		"EphemeralDisk",
		"Virtual_disk",
		"QEMU_HARDDISK",
	}
	uid := bd.DeviceAttributes.WWN +
		bd.DeviceAttributes.Model +
		bd.DeviceAttributes.Serial +
		bd.DeviceAttributes.Vendor
	uuidUsesPath := false
	if len(bd.DeviceAttributes.IDType) == 0 || util.Contains(localDiskModels, bd.DeviceAttributes.Model) {
		host, _ := os.Hostname()
		uid += host + bd.DevPath
		uuidUsesPath = true
	}
	uuid := blockdevice.BlockDevicePrefix + util.Hash(uid)

	return uuid, uuidUsesPath
}
// generate old UUID, returns true if the UUID has used path or hostname for generation.
generate old UUID, returns true if the UUID has used path or hostname for generation.
// generate old UUID returns true if the UUID has used path or hostname for generation .
func generateLegacyUUID(bd blockdevice.BlockDevice) (string, bool) {
	localDiskModels := []string{
		"EphemeralDisk",
		"Virtual_disk",
		"QEMU_HARDDISK",
	}
	uid := bd.DeviceAttributes.WWN +
		bd.DeviceAttributes.Model +
		bd.DeviceAttributes.Serial +
		bd.DeviceAttributes.Vendor
	uuidUsesPath := false
	if len(bd.DeviceAttributes.IDType) == 0 || util.Contains(localDiskModels, bd.DeviceAttributes.Model) {
		host, _ := os.Hostname()
		uid += host + bd.DevPath
		uuidUsesPath = true
	}
	uuid := blockdevice.BlockDevicePrefix + util.Hash(uid)
	return uuid, uuidUsesPath
}
func generateLegacyUUID ( bd blockdevice . BlockDevice ) ( string , bool ) { localDiskModels := [ ] string { " " , " " , " " , } uid := bd . DeviceAttributes . WWN + bd . DeviceAttributes . Model + bd . DeviceAttributes . Serial + bd . DeviceAttributes . Vendor uuidUsesPath := false if len ( bd . DeviceAttributes . IDType ) == 0 || util . Contains ( localDiskModels , bd . DeviceAttributes . Model ) { host , _ := os . Hostname ( ) uid += host + bd . DevPath uuidUsesPath = true } uuid := blockdevice . BlockDevicePrefix + util . Hash ( uid ) return uuid , uuidUsesPath }
generate old UUID, returns true if the UUID has used path or hostname for generation.
generate old UUID returns true if the UUID has used path or hostname for generation .