def get_vmdk_detach_config_spec(client_factory, device):
 config_spec = client_factory.create('ns0:VirtualMachineConfigSpec')
 device_config_spec = []
 virtual_device_config_spec = delete_virtual_disk_spec(client_factory, device)
 device_config_spec.append(virtual_device_config_spec)
 config_spec.deviceChange = device_config_spec
 return config_spec

def get_vmdk_detach_config_spec ( client_factory , device ) : config_spec = client_factory . create ( 'ns0:VirtualMachineConfigSpec' ) device_config_spec = [ ] virtual_device_config_spec = delete_virtual_disk_spec ( client_factory , device ) device_config_spec . append ( virtual_device_config_spec ) config_spec . deviceChange = device_config_spec return config_spec
builds the vmdk detach config spec .