def create_cdrom(self, datastore):
        # Convenience variable
        client = self.client
        # This creates what is essentially a virtual CDROM drive with no disk in it
        # Adding this greatly simplifies the process of adding a custom ISO via deltacloud
        connectable = client.create('VirtualDeviceConnectInfo')
        connectable.allowGuestControl = True
        connectable.connected = True
        connectable.startConnected = True
        #connectable.status = None

        backing = client.create('VirtualCdromIsoBackingInfo')
        backing.datastore = None
        backing.fileName = datastore.summary.name % '[%s]'

        cdrom = client.create('VirtualCdrom')
        cdrom.connectable = connectable
        cdrom.backing = backing
        # 201 is the second built in IDE controller
        cdrom.controllerKey = 201
        cdrom.key = 10
        cdrom.unitNumber = 0

        cdrom_spec = client.create('VirtualDeviceConfigSpec')
        cdrom_spec.fileOperation = None
        cdrom_spec.device = cdrom
        operation = client.create('VirtualDeviceConfigSpecOperation')
        cdrom_spec.operation = operation.add

        return cdrom_spec
dataset/ETHPy150Open redhat-imaging/imagefactory/imagefactory_plugins/vSphere/VSphereHelper.py/VSphereHelper.create_cdrom/swapped operands of `%`