def get_vmdk_attach_config_spec(client_factory, disk_type=constants.DEFAULT_DISK_TYPE, file_path=None, disk_size=None, linked_clone=False, controller_key=None, unit_number=None, device_name=None, disk_io_limits=None):
 config_spec = client_factory.create('ns0:VirtualMachineConfigSpec')
 device_config_spec = []
 virtual_device_config_spec = _create_virtual_disk_spec(client_factory, controller_key, disk_type, file_path, disk_size, linked_clone, unit_number, device_name, disk_io_limits)
 device_config_spec.append(virtual_device_config_spec)
 config_spec.deviceChange = device_config_spec
 return config_spec

def get_vmdk_attach_config_spec ( client_factory , disk_type = constants . DEFAULT_DISK_TYPE , file_path = None , disk_size = None , linked_clone = False , controller_key = None , unit_number = None , device_name = None , disk_io_limits = None ) : config_spec = client_factory . create ( 'ns0:VirtualMachineConfigSpec' ) device_config_spec = [ ] virtual_device_config_spec = _create_virtual_disk_spec ( client_factory , controller_key , disk_type , file_path , disk_size , linked_clone , unit_number , device_name , disk_io_limits ) device_config_spec . append ( virtual_device_config_spec ) config_spec . deviceChange = device_config_spec return config_spec
builds the vmdk attach config spec .