Skip to content

Commit

Permalink
Merge pull request #1407 from grycap/devel
Browse files Browse the repository at this point in the history
Fix one volume issue
  • Loading branch information
micafer authored Sep 6, 2022
2 parents bc9d241 + a57882d commit bbddb72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions IM/connectors/OpenNebula.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,6 @@ def setDisksFromTemplate(vm, template):
if disk.TARGET and not vm.info.systems[0].getValue("disk." + str(disk.DISK_ID) + ".device"):
vm.info.systems[0].setValue(
"disk." + str(disk.DISK_ID) + ".device", disk.TARGET)
if disk.FORMAT and not vm.info.systems[0].getValue("disk." + str(disk.DISK_ID) + ".fstype"):
vm.info.systems[0].setValue(
"disk." + str(disk.DISK_ID) + ".fstype", disk.FORMAT)

@staticmethod
def setIPsFromTemplate(vm, template):
Expand Down Expand Up @@ -649,11 +646,8 @@ def getONETemplate(self, radl, sgs, auth_data, vm):
else:
disk_size = system.getFeature(
"disk." + str(cont) + ".size").getValue('M')
disk_fstype = system.getValue("disk." + str(cont) + ".fstype")
if not disk_fstype:
disk_fstype = 'ext3'

disks += ' DISK = [ SAVE = no, TYPE = fs , FORMAT = %s, SIZE = %d' % (disk_fstype, int(disk_size))
disks += ' DISK = [ SAVE = no, TYPE = fs , FORMAT = qcow2, SIZE = %d' % int(disk_size)

if disk_device:
disks += ', TARGET = %s' % disk_device
Expand Down
2 changes: 1 addition & 1 deletion test/unit/connectors/OpenNebula.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def test_20_launch(self, save_data, getONEVersion, server_proxy):
OS = [ ARCH = "x86_64" ]
DISK = [ IMAGE_ID = "1" ]
DISK = [ SAVE = no, TYPE = fs , FORMAT = ext3, SIZE = 1024, TARGET = hdb ]
DISK = [ SAVE = no, TYPE = fs , FORMAT = qcow2, SIZE = 1024, TARGET = hdb ]
SCHED_REQUIREMENTS = "CLUSTER_ID=\\"0\\""\n"""
Expand Down

0 comments on commit bbddb72

Please sign in to comment.