def get_cdrom_attach_config_spec(client_factory, datastore, file_path, controller_key, cdrom_unit_number):
 config_spec = client_factory.create('ns0:VirtualMachineConfigSpec')
 device_config_spec = []
 virtual_device_config_spec = create_virtual_cdrom_spec(client_factory, datastore, controller_key, file_path, cdrom_unit_number)
 device_config_spec.append(virtual_device_config_spec)
 config_spec.deviceChange = device_config_spec
 return config_spec

def get_cdrom_attach_config_spec ( client_factory , datastore , file_path , controller_key , cdrom_unit_number ) : config_spec = client_factory . create ( 'ns0:VirtualMachineConfigSpec' ) device_config_spec = [ ] virtual_device_config_spec = create_virtual_cdrom_spec ( client_factory , datastore , controller_key , file_path , cdrom_unit_number ) device_config_spec . append ( virtual_device_config_spec ) config_spec . deviceChange = device_config_spec return config_spec
builds and returns the cdrom attach config spec .