func (r *CdromSubresource) Update(l object.VirtualDeviceList) ([]types.BaseVirtualDeviceConfigSpec, error) {
	log.Printf("[DEBUG] %s: Beginning update", r)
	d, err := r.FindVirtualDevice(l)
	if err != nil {
		return nil, fmt.Errorf("cannot find disk device: %s", err)
	}
	device, ok := d.(*types.VirtualCdrom)
	if !ok {
		return nil, fmt.Errorf("device at %q is not a virtual CDROM device", l.Name(d))
	}

	// Map the CDROM to the correct device
	r.mapCdrom(device, l)
	spec, err := object.VirtualDeviceList{device}.ConfigSpec(types.VirtualDeviceConfigSpecOperationEdit)
	if err != nil {
		return nil, err
	}
	log.Printf("[DEBUG] %s: Device config operations from update: %s", r, DeviceChangeString(spec))
	log.Printf("[DEBUG] %s: Update complete", r)
	return spec, nil
}
func (r *CdromSubresource) Update(l object.VirtualDeviceList) ([]types.BaseVirtualDeviceConfigSpec, error) {
	log.Printf("[DEBUG] %s: Beginning update", r)
	d, err := r.FindVirtualDevice(l)
	if err != nil {
		return nil, fmt.Errorf("cannot find disk device: %s", err)
	}
	device, ok := d.(*types.VirtualCdrom)
	if !ok {
		return nil, fmt.Errorf("device at %q is not a virtual CDROM device", l.Name(d))
	}

	
	r.mapCdrom(device, l)
	spec, err := object.VirtualDeviceList{device}.ConfigSpec(types.VirtualDeviceConfigSpecOperationEdit)
	if err != nil {
		return nil, err
	}
	log.Printf("[DEBUG] %s: Device config operations from update: %s", r, DeviceChangeString(spec))
	log.Printf("[DEBUG] %s: Update complete", r)
	return spec, nil
}
func ( r * CdromSubresource ) Update ( l object . VirtualDeviceList ) ( [ ] types . BaseVirtualDeviceConfigSpec , error ) { log . Printf ( " " , r ) d , err := r . FindVirtualDevice ( l ) if err != nil { return nil , fmt . Errorf ( " " , err ) } device , ok := d . ( * types . VirtualCdrom ) if ! ok { return nil , fmt . Errorf ( " " , l . Name ( d ) ) } // Map the CDROM to the correct device r . mapCdrom ( device , l ) spec , err := object . VirtualDeviceList { device } . ConfigSpec ( types . VirtualDeviceConfigSpecOperationEdit ) if err != nil { return nil , err } log . Printf ( " " , r , DeviceChangeString ( spec ) ) log . Printf ( " " , r ) return spec , nil }
// Update updates a vsphere_virtual_machine cdrom sub-resource.
Update updates a vsphere_virtual_machine cdrom sub - resource .