~ubuntu-branches/ubuntu/quantal/virtinst/quantal-proposed

« back to all changes in this revision

Viewing changes to virtconv/parsers/vmx.py

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Léonard
  • Date: 2011-01-29 21:41:21 UTC
  • mto: (1.6.3 sid)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: james.westby@ubuntu.com-20110129214121-pjuxf2xz08l5zqew
Tags: upstream-0.500.5
Import upstream version 0.500.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
        return
94
94
 
95
95
    if not vm.netdevs.get(inst):
96
 
        vm.netdevs[inst] = netdevcfg.netdev(type = netdevcfg.NETDEV_TYPE_UNKNOWN)
 
96
        vm.netdevs[inst] = netdevcfg.netdev(type=netdevcfg.NETDEV_TYPE_UNKNOWN)
97
97
 
98
98
    # "vlance", "vmxnet", "e1000"
99
99
    if key == "virtualdev":
132
132
 
133
133
    devid = (bus, inst)
134
134
    if not vm.disks.get(devid):
135
 
        vm.disks[devid] = diskcfg.disk(bus = bus,
136
 
            type = diskcfg.DISK_TYPE_DISK)
 
135
        vm.disks[devid] = diskcfg.disk(bus=bus,
 
136
            type=diskcfg.DISK_TYPE_DISK)
137
137
 
138
138
    if key == "devicetype":
139
139
        if lvalue == "atapi-cdrom" or lvalue == "cdrom-raw":
197
197
                continue
198
198
            else:
199
199
                lines.append(line)
200
 
    
 
200
 
201
201
        config = {}
202
202
 
203
203
        # split out all remaining entries of key = value form
234
234
        vm.memory = config.get("memsize")
235
235
        vm.description = config.get("annotation")
236
236
        vm.nr_vcpus = config.get("numvcpus")
237
 
     
 
237
 
238
238
        vm.validate()
239
239
        return vm
240
240
 
248
248
        """
249
249
 
250
250
        vm.description = vm.description.strip()
251
 
        vm.description = vm.description.replace("\n","|")
 
251
        vm.description = vm.description.replace("\n", "|")
252
252
        vmx_out_template = []
253
253
        vmx_dict = {
254
254
            #"now": time.strftime("%Y-%m-%dT%H:%M:%S %Z", time.localtime()),