def generateOVF(name, osname, osid, diskname, disksize, mem=1024, cpus=1, vmname='Mininet-VM', vminfo='A Mininet Virtual Machine'):
 ovf = (name + '.ovf')
 filesize = stat(diskname)[ST_SIZE]
 params = dict(osname=osname, osid=osid, diskname=diskname, filesize=filesize, disksize=disksize, name=name, mem=mem, cpus=cpus, vmname=vmname, vminfo=vminfo)
 xmltext = (OVFTemplate % params)
 with open(ovf, 'w+') as f:
  f.write(xmltext)
 return ovf

def generateOVF ( name , osname , osid , diskname , disksize , mem = 1024 , cpus = 1 , vmname = 'Mininet-VM' , vminfo = 'A Mininet Virtual Machine' ) : ovf = ( name + '.ovf' ) filesize = stat ( diskname ) [ ST_SIZE ] params = dict ( osname = osname , osid = osid , diskname = diskname , filesize = filesize , disksize = disksize , name = name , mem = mem , cpus = cpus , vmname = vmname , vminfo = vminfo ) xmltext = ( OVFTemplate % params ) with open ( ovf , 'w+' ) as f : f . write ( xmltext ) return ovf
generate ovf file "name .