1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-10 01:17:40 +03:00

B #: fix image str_to_disk_type method (#97)

This commit is contained in:
Christian González 2020-07-15 16:47:04 +02:00 committed by GitHub
parent eac7e1efb8
commit 3cec98a11f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -796,30 +796,42 @@ Image::DiskType Image::str_to_disk_type(string& s_disk_type)
{
type = Image::FILE;
}
else if (s_disk_type == "BLOCK")
{
type = Image::BLOCK;
}
else if (s_disk_type == "ISCSI")
{
type = Image::ISCSI;
}
else if (s_disk_type == "CDROM")
{
type = Image::CD_ROM;
}
else if (s_disk_type == "BLOCK")
{
type = Image::BLOCK;
}
else if (s_disk_type == "RBD")
{
type = Image::RBD;
}
else if (s_disk_type == "SHEEPDOG")
else if (s_disk_type == "RBD_CDROM")
{
type = Image::SHEEPDOG;
type = Image::RBD_CDROM;
}
else if (s_disk_type == "GLUSTER")
{
type = Image::GLUSTER;
}
else if (s_disk_type == "GLUSTER_CDROM")
{
type = Image::GLUSTER_CDROM;
}
else if (s_disk_type == "SHEEPDOG")
{
type = Image::SHEEPDOG;
}
else if (s_disk_type == "SHEEPDOG_CDROM")
{
type = Image::SHEEPDOG_CDROM;
}
else if (s_disk_type == "ISCSI")
{
type = Image::ISCSI;
}
return type;
}