def _get_args(self, ovf_tool_exe_path, image_params, logger):
        """
        :type image_params: vCenterShell.vm.ovf_image_params.OvfImageParams
        """
        # create vm name
        vm_name_param = VM_NAME_PARAM.format(image_params.vm_name)

        # datastore name
        datastore_param = DATA_STORE_PARAM.format(image_params.datastore)

        # power state
        # power_state = POWER_ON_PARAM if image_params.power_on else POWER_OFF_PARAM
        # due to hotfix 1 for release 1.0,
        # after deployment the vm must be powered off and will be powered on if needed by orchestration driver

        power_state = POWER_OFF_PARAM

        # build basic args
        args = [ovf_tool_exe_path,
                NO_SSL_PARAM,
                ACCEPT_ALL_PARAM,
                power_state,
                vm_name_param,
                datastore_param]
        # append user folder
        if hasattr(image_params, 'vm_folder') and image_params.vm_folder:
            vm_folder_str = VM_FOLDER_PARAM.format(image_params.vm_folder)
            args.append(vm_folder_str)

        # append args that are user inputs
        if hasattr(image_params, 'user_arguments') and image_params.user_arguments:
            args += [key.strip()
                     for key in image_params.user_arguments.split(',')]

        # get ovf destination
        ovf_destination = self._get_ovf_destenation(image_params)

        image_url = image_params.image_url
        self._validate_image_exists(image_url, logger)

        # set location and destination
        args += [image_url,
                 ovf_destination]

        return args
def _get_args ( self , ovf_tool_exe_path , image_params , logger ) : vm_name_param = VM_NAME_PARAM . format ( image_params . vm_name ) datastore_param = DATA_STORE_PARAM . format ( image_params . datastore ) power_state = POWER_OFF_PARAM args = [ ovf_tool_exe_path , NO_SSL_PARAM , ACCEPT_ALL_PARAM , power_state , vm_name_param , datastore_param ] if hasattr ( image_params , 'vm_folder' ) and image_params . vm_folder : vm_folder_str = VM_FOLDER_PARAM . format ( image_params . vm_folder ) args . append ( vm_folder_str ) if hasattr ( image_params , 'user_arguments' ) and image_params . user_arguments : args += [ key . strip ( ) for key in image_params . user_arguments . split ( ',' ) ] ovf_destination = self . _get_ovf_destenation ( image_params ) image_url = image_params . image_url self . _validate_image_exists ( image_url , logger ) args += [ image_url , ovf_destination ] return args
:type image_params: vCenterShell.vm.ovf_image_params.OvfImageParams