flywheel-sdk 21.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flywheel/__init__.py +784 -0
- flywheel/api/__init__.py +46 -0
- flywheel/api/acquisitions_api.py +5014 -0
- flywheel/api/analyses_api.py +3848 -0
- flywheel/api/audit_trail_api.py +568 -0
- flywheel/api/auth_api.py +121 -0
- flywheel/api/batch_api.py +630 -0
- flywheel/api/bulk_api.py +140 -0
- flywheel/api/change_log_api.py +254 -0
- flywheel/api/collections_api.py +3913 -0
- flywheel/api/config_api.py +299 -0
- flywheel/api/container_tasks_api.py +137 -0
- flywheel/api/container_type_api.py +137 -0
- flywheel/api/containers_api.py +4784 -0
- flywheel/api/custom_filters_api.py +466 -0
- flywheel/api/data_view_executions_api.py +549 -0
- flywheel/api/dataexplorer_api.py +1192 -0
- flywheel/api/devices_api.py +1071 -0
- flywheel/api/dimse_api.py +814 -0
- flywheel/api/download_api.py +261 -0
- flywheel/api/files_api.py +1868 -0
- flywheel/api/form_responses_api.py +703 -0
- flywheel/api/gears_api.py +1875 -0
- flywheel/api/groups_api.py +2829 -0
- flywheel/api/jobs_api.py +2320 -0
- flywheel/api/jupyterlab_servers_api.py +245 -0
- flywheel/api/modalities_api.py +562 -0
- flywheel/api/packfiles_api.py +121 -0
- flywheel/api/projects_api.py +7820 -0
- flywheel/api/protocols_api.py +757 -0
- flywheel/api/reports_api.py +1057 -0
- flywheel/api/resolve_api.py +276 -0
- flywheel/api/roles_api.py +563 -0
- flywheel/api/sessions_api.py +5296 -0
- flywheel/api/site_api.py +1552 -0
- flywheel/api/staffing_pools_api.py +677 -0
- flywheel/api/subjects_api.py +5349 -0
- flywheel/api/tasks_api.py +897 -0
- flywheel/api/tree_api.py +266 -0
- flywheel/api/uids_api.py +140 -0
- flywheel/api/upload_api.py +842 -0
- flywheel/api/users_api.py +2142 -0
- flywheel/api/views_api.py +1089 -0
- flywheel/api_client.py +748 -0
- flywheel/client.py +291 -0
- flywheel/configuration.py +308 -0
- flywheel/drone_login.py +65 -0
- flywheel/file_spec.py +67 -0
- flywheel/finder.py +168 -0
- flywheel/flywheel.py +9867 -0
- flywheel/gear_context.py +374 -0
- flywheel/models/__init__.py +726 -0
- flywheel/models/access_level.py +30 -0
- flywheel/models/access_permission.py +197 -0
- flywheel/models/access_permission_output.py +192 -0
- flywheel/models/access_permission_update.py +166 -0
- flywheel/models/access_type.py +54 -0
- flywheel/models/accumulator.py +33 -0
- flywheel/models/acquisition.py +25 -0
- flywheel/models/acquisition_container_output.py +34 -0
- flywheel/models/acquisition_copy_input.py +223 -0
- flywheel/models/acquisition_input.py +297 -0
- flywheel/models/acquisition_list_output.py +767 -0
- flywheel/models/acquisition_modify_input.py +299 -0
- flywheel/models/acquisition_node.py +35 -0
- flywheel/models/acquisition_output.py +767 -0
- flywheel/models/acquisition_parents.py +241 -0
- flywheel/models/acquisition_template_options.py +275 -0
- flywheel/models/acquisition_upsert_input.py +383 -0
- flywheel/models/acquisition_upsert_output.py +243 -0
- flywheel/models/action.py +91 -0
- flywheel/models/adhoc_analysis_input.py +247 -0
- flywheel/models/analysis.py +25 -0
- flywheel/models/analysis_container_output.py +34 -0
- flywheel/models/analysis_files_create_ticket_output.py +241 -0
- flywheel/models/analysis_input.py +310 -0
- flywheel/models/analysis_input_legacy.py +25 -0
- flywheel/models/analysis_list_output.py +680 -0
- flywheel/models/analysis_list_output_inflated_job.py +650 -0
- flywheel/models/analysis_modify_input.py +191 -0
- flywheel/models/analysis_node.py +35 -0
- flywheel/models/analysis_output.py +683 -0
- flywheel/models/analysis_output_inflated_job.py +674 -0
- flywheel/models/analysis_parents.py +270 -0
- flywheel/models/analysis_update.py +25 -0
- flywheel/models/api_key_input_with_optional_label.py +191 -0
- flywheel/models/api_key_output.py +297 -0
- flywheel/models/as_storage.py +298 -0
- flywheel/models/assignee.py +192 -0
- flywheel/models/assignee_type.py +29 -0
- flywheel/models/audit_trail_report.py +486 -0
- flywheel/models/audit_trail_report_status.py +32 -0
- flywheel/models/auth0_auth_out.py +323 -0
- flywheel/models/auth0_options_out.py +319 -0
- flywheel/models/auth_out.py +357 -0
- flywheel/models/auth_session_output.py +272 -0
- flywheel/models/avatars.py +218 -0
- flywheel/models/aws_creds.py +191 -0
- flywheel/models/aws_storage.py +354 -0
- flywheel/models/azure_creds.py +190 -0
- flywheel/models/base_aet.py +245 -0
- flywheel/models/base_compute.py +426 -0
- flywheel/models/batch.py +360 -0
- flywheel/models/batch_cancel_output.py +36 -0
- flywheel/models/batch_create_filters.py +220 -0
- flywheel/models/batch_job_analysis_input.py +281 -0
- flywheel/models/batch_jobs_proposal_input.py +36 -0
- flywheel/models/batch_proposal.py +25 -0
- flywheel/models/batch_proposal_detail.py +36 -0
- flywheel/models/batch_proposal_input.py +25 -0
- flywheel/models/body.py +36 -0
- flywheel/models/body_regenerate_key_api_devices_device_id_key_post.py +25 -0
- flywheel/models/body_region.py +46 -0
- flywheel/models/bookmark.py +189 -0
- flywheel/models/bulk_move_input.py +272 -0
- flywheel/models/bulk_move_sessions.py +25 -0
- flywheel/models/callbacks_virus_scan_input.py +36 -0
- flywheel/models/cancelled_batch_output.py +163 -0
- flywheel/models/catalog_list_output.py +407 -0
- flywheel/models/central_out.py +299 -0
- flywheel/models/change.py +379 -0
- flywheel/models/change_log_container_type.py +38 -0
- flywheel/models/change_log_document.py +245 -0
- flywheel/models/change_method.py +33 -0
- flywheel/models/classic_batch_job_output.py +352 -0
- flywheel/models/classic_batch_job_output_inflated_jobs.py +379 -0
- flywheel/models/classic_batch_proposal_input.py +388 -0
- flywheel/models/classic_batch_proposal_output.py +471 -0
- flywheel/models/classification_add_delete.py +36 -0
- flywheel/models/classification_replace.py +36 -0
- flywheel/models/classification_update_input.py +36 -0
- flywheel/models/cohort.py +29 -0
- flywheel/models/collection.py +25 -0
- flywheel/models/collection_container_output.py +32 -0
- flywheel/models/collection_input.py +217 -0
- flywheel/models/collection_input_with_contents.py +248 -0
- flywheel/models/collection_node.py +192 -0
- flywheel/models/collection_node_level.py +31 -0
- flywheel/models/collection_operation.py +193 -0
- flywheel/models/collection_operation_type.py +29 -0
- flywheel/models/collection_output.py +639 -0
- flywheel/models/collection_with_stats.py +637 -0
- flywheel/models/column.py +286 -0
- flywheel/models/column_type.py +32 -0
- flywheel/models/common_classification.py +135 -0
- flywheel/models/common_deleted_count.py +25 -0
- flywheel/models/common_editions.py +25 -0
- flywheel/models/common_info.py +135 -0
- flywheel/models/common_join_origins.py +25 -0
- flywheel/models/common_key.py +36 -0
- flywheel/models/common_modified_count.py +25 -0
- flywheel/models/common_object_created.py +36 -0
- flywheel/models/common_project_settings.py +25 -0
- flywheel/models/common_settings.py +36 -0
- flywheel/models/complete_multipart_upload_output.py +189 -0
- flywheel/models/complete_s3_multipart_upload_input.py +241 -0
- flywheel/models/config_feature_map.py +36 -0
- flywheel/models/config_out.py +381 -0
- flywheel/models/config_output.py +36 -0
- flywheel/models/config_site_config_output.py +36 -0
- flywheel/models/config_site_settings.py +36 -0
- flywheel/models/config_site_settings_input.py +36 -0
- flywheel/models/conflict_types.py +30 -0
- flywheel/models/container_delete_reason.py +39 -0
- flywheel/models/container_filter.py +193 -0
- flywheel/models/container_id_view_input.py +521 -0
- flywheel/models/container_id_view_input_execute_and_save.py +308 -0
- flywheel/models/container_modify.py +536 -0
- flywheel/models/container_new_output.py +25 -0
- flywheel/models/container_node_min.py +350 -0
- flywheel/models/container_output.py +36 -0
- flywheel/models/container_output_with_files.py +283 -0
- flywheel/models/container_parents.py +311 -0
- flywheel/models/container_pipeline_input.py +536 -0
- flywheel/models/container_project_parents.py +25 -0
- flywheel/models/container_reference.py +193 -0
- flywheel/models/container_reference_with_label.py +219 -0
- flywheel/models/container_session_parents.py +25 -0
- flywheel/models/container_subject_parents.py +25 -0
- flywheel/models/container_type.py +39 -0
- flywheel/models/container_uidcheck.py +253 -0
- flywheel/models/container_update.py +135 -0
- flywheel/models/context_input.py +217 -0
- flywheel/models/copy_filter.py +299 -0
- flywheel/models/copy_status.py +32 -0
- flywheel/models/core_models_api_key_api_key_input.py +190 -0
- flywheel/models/core_models_audit_trail_create_report_input.py +273 -0
- flywheel/models/core_models_audit_trail_modify_report_input.py +167 -0
- flywheel/models/core_models_common_source.py +189 -0
- flywheel/models/core_models_jobs_api_key_input.py +191 -0
- flywheel/models/core_models_search_parent_type.py +33 -0
- flywheel/models/core_workflows_form_responses_models_form_parents.py +163 -0
- flywheel/models/core_workflows_form_responses_models_form_response_output.py +440 -0
- flywheel/models/core_workflows_reader_models_reader_task_parents.py +295 -0
- flywheel/models/creds.py +135 -0
- flywheel/models/curator.py +221 -0
- flywheel/models/current_user_output.py +707 -0
- flywheel/models/custom_field.py +437 -0
- flywheel/models/custom_form.py +244 -0
- flywheel/models/cvat_info.py +275 -0
- flywheel/models/cvat_settings.py +272 -0
- flywheel/models/cvat_settings_input.py +272 -0
- flywheel/models/cvat_sync_state.py +30 -0
- flywheel/models/daily_report_usage.py +565 -0
- flywheel/models/data_strategy.py +29 -0
- flywheel/models/data_view.py +25 -0
- flywheel/models/data_view_analysis_file_spec.py +221 -0
- flywheel/models/data_view_analysis_filter_spec.py +221 -0
- flywheel/models/data_view_column_alias.py +337 -0
- flywheel/models/data_view_column_spec.py +286 -0
- flywheel/models/data_view_execution.py +505 -0
- flywheel/models/data_view_execution_state.py +31 -0
- flywheel/models/data_view_file_spec.py +392 -0
- flywheel/models/data_view_group_by.py +166 -0
- flywheel/models/data_view_group_by_column.py +194 -0
- flywheel/models/data_view_name_filter_spec.py +194 -0
- flywheel/models/data_view_output.py +25 -0
- flywheel/models/data_view_save_data_view_input.py +25 -0
- flywheel/models/data_view_zip_filter_spec.py +223 -0
- flywheel/models/default_flywheel_role.py +30 -0
- flywheel/models/deid_log_skip_reason.py +29 -0
- flywheel/models/delete_by_search_query.py +253 -0
- flywheel/models/deleted_file.py +514 -0
- flywheel/models/deleted_result.py +194 -0
- flywheel/models/deprecated_action.py +29 -0
- flywheel/models/destination_container_type.py +30 -0
- flywheel/models/device.py +437 -0
- flywheel/models/device_admin_update.py +194 -0
- flywheel/models/device_create.py +219 -0
- flywheel/models/device_self_update.py +272 -0
- flywheel/models/device_status.py +36 -0
- flywheel/models/device_status_entry.py +221 -0
- flywheel/models/device_storage_strategy_update.py +193 -0
- flywheel/models/dimse_project_input.py +36 -0
- flywheel/models/dimse_project_output.py +36 -0
- flywheel/models/dimse_service_input.py +36 -0
- flywheel/models/dimse_service_output.py +36 -0
- flywheel/models/download.py +249 -0
- flywheel/models/download_container_filter.py +167 -0
- flywheel/models/download_container_filter_definition.py +222 -0
- flywheel/models/download_filter.py +221 -0
- flywheel/models/download_filter_definition.py +195 -0
- flywheel/models/download_format.py +29 -0
- flywheel/models/download_input.py +25 -0
- flywheel/models/download_node.py +189 -0
- flywheel/models/download_strategy.py +31 -0
- flywheel/models/download_ticket.py +36 -0
- flywheel/models/download_ticket_stub.py +249 -0
- flywheel/models/download_ticket_with_summary.py +36 -0
- flywheel/models/e_signature.py +242 -0
- flywheel/models/edition.py +169 -0
- flywheel/models/egress_device.py +597 -0
- flywheel/models/egress_device_page.py +219 -0
- flywheel/models/egress_provider.py +408 -0
- flywheel/models/egress_provider_id.py +164 -0
- flywheel/models/exchange_storage.py +243 -0
- flywheel/models/executor_info.py +353 -0
- flywheel/models/export_templates.py +195 -0
- flywheel/models/features.py +1838 -0
- flywheel/models/field_change.py +271 -0
- flywheel/models/field_change_log_document.py +245 -0
- flywheel/models/field_type.py +37 -0
- flywheel/models/file.py +1139 -0
- flywheel/models/file_classification_delta.py +245 -0
- flywheel/models/file_container_type.py +34 -0
- flywheel/models/file_entry.py +740 -0
- flywheel/models/file_export_templates.py +272 -0
- flywheel/models/file_format.py +33 -0
- flywheel/models/file_gear_info.py +215 -0
- flywheel/models/file_group.py +29 -0
- flywheel/models/file_list_output.py +1115 -0
- flywheel/models/file_modify_input.py +191 -0
- flywheel/models/file_move_input.py +221 -0
- flywheel/models/file_node.py +1138 -0
- flywheel/models/file_node_min.py +321 -0
- flywheel/models/file_origin.py +283 -0
- flywheel/models/file_output.py +1135 -0
- flywheel/models/file_parents.py +297 -0
- flywheel/models/file_reference.py +221 -0
- flywheel/models/file_suggestion.py +241 -0
- flywheel/models/file_template_options.py +299 -0
- flywheel/models/file_upsert_input.py +612 -0
- flywheel/models/file_upsert_origin.py +36 -0
- flywheel/models/file_upsert_output.py +1154 -0
- flywheel/models/file_version.py +190 -0
- flywheel/models/file_version_copy_of.py +273 -0
- flywheel/models/file_version_output.py +325 -0
- flywheel/models/file_via.py +245 -0
- flywheel/models/file_zip_entry.py +25 -0
- flywheel/models/file_zip_info.py +25 -0
- flywheel/models/filter.py +350 -0
- flywheel/models/filter_input.py +218 -0
- flywheel/models/filter_values.py +195 -0
- flywheel/models/filter_view.py +28 -0
- flywheel/models/fixed_file_version_input.py +216 -0
- flywheel/models/fixed_input.py +299 -0
- flywheel/models/form_definition.py +163 -0
- flywheel/models/form_response_base.py +311 -0
- flywheel/models/form_response_create.py +193 -0
- flywheel/models/gcp_creds.py +397 -0
- flywheel/models/gcp_storage.py +298 -0
- flywheel/models/gear.py +619 -0
- flywheel/models/gear_category.py +32 -0
- flywheel/models/gear_config.py +138 -0
- flywheel/models/gear_context_input.py +164 -0
- flywheel/models/gear_context_lookup.py +25 -0
- flywheel/models/gear_context_lookup_item.py +36 -0
- flywheel/models/gear_context_value_output.py +272 -0
- flywheel/models/gear_context_value_output_unfound.py +164 -0
- flywheel/models/gear_custom.py +135 -0
- flywheel/models/gear_directive.py +135 -0
- flywheel/models/gear_doc.py +25 -0
- flywheel/models/gear_document.py +332 -0
- flywheel/models/gear_document_input.py +303 -0
- flywheel/models/gear_document_legacy_input.py +302 -0
- flywheel/models/gear_environment.py +135 -0
- flywheel/models/gear_exchange.py +221 -0
- flywheel/models/gear_file_input.py +192 -0
- flywheel/models/gear_id_output.py +170 -0
- flywheel/models/gear_info.py +251 -0
- flywheel/models/gear_input_item.py +231 -0
- flywheel/models/gear_inputs.py +140 -0
- flywheel/models/gear_invocation.py +138 -0
- flywheel/models/gear_key_input.py +191 -0
- flywheel/models/gear_manifest.py +624 -0
- flywheel/models/gear_mixin.py +218 -0
- flywheel/models/gear_node.py +355 -0
- flywheel/models/gear_output_configuration.py +164 -0
- flywheel/models/gear_permissions.py +191 -0
- flywheel/models/gear_permissions_input.py +163 -0
- flywheel/models/gear_permissions_type.py +29 -0
- flywheel/models/gear_return_ticket.py +25 -0
- flywheel/models/gear_rule.py +653 -0
- flywheel/models/gear_rule_condition.py +219 -0
- flywheel/models/gear_rule_condition_type.py +37 -0
- flywheel/models/gear_rule_input.py +517 -0
- flywheel/models/gear_rule_modify_input.py +492 -0
- flywheel/models/gear_rule_output.py +652 -0
- flywheel/models/gear_save_submission.py +221 -0
- flywheel/models/gear_series.py +298 -0
- flywheel/models/gear_series_update.py +163 -0
- flywheel/models/gear_suggestion_output.py +301 -0
- flywheel/models/gear_ticket.py +245 -0
- flywheel/models/gear_ticket_output.py +163 -0
- flywheel/models/google_auth_out.py +299 -0
- flywheel/models/graph_filter.py +329 -0
- flywheel/models/group.py +25 -0
- flywheel/models/group_by.py +163 -0
- flywheel/models/group_by_column.py +36 -0
- flywheel/models/group_container_output.py +33 -0
- flywheel/models/group_input.py +248 -0
- flywheel/models/group_metadata_input.py +36 -0
- flywheel/models/group_node.py +34 -0
- flywheel/models/group_output.py +471 -0
- flywheel/models/group_report.py +218 -0
- flywheel/models/group_role.py +163 -0
- flywheel/models/group_settings_output.py +249 -0
- flywheel/models/group_update.py +249 -0
- flywheel/models/header_feature.py +37 -0
- flywheel/models/hierarchy_export_templates.py +272 -0
- flywheel/models/http_validation_error.py +167 -0
- flywheel/models/info.py +218 -0
- flywheel/models/info_add_remove.py +36 -0
- flywheel/models/info_container_type.py +35 -0
- flywheel/models/info_replace.py +36 -0
- flywheel/models/info_update_input.py +36 -0
- flywheel/models/ingress_provider.py +299 -0
- flywheel/models/ingress_providers.py +272 -0
- flywheel/models/ingress_site_settings.py +305 -0
- flywheel/models/ingress_update_provider.py +218 -0
- flywheel/models/inline_response200.py +163 -0
- flywheel/models/inline_response2001.py +171 -0
- flywheel/models/inline_response2002.py +163 -0
- flywheel/models/inline_response2003.py +36 -0
- flywheel/models/inline_response2005.py +25 -0
- flywheel/models/input_filter.py +221 -0
- flywheel/models/input_job.py +521 -0
- flywheel/models/input_job_profile.py +275 -0
- flywheel/models/inserted_id.py +163 -0
- flywheel/models/job.py +841 -0
- flywheel/models/job_analysis_input.py +273 -0
- flywheel/models/job_ask.py +301 -0
- flywheel/models/job_ask_response.py +195 -0
- flywheel/models/job_ask_response_job.py +978 -0
- flywheel/models/job_ask_return.py +25 -0
- flywheel/models/job_ask_return_criteria.py +245 -0
- flywheel/models/job_ask_state.py +25 -0
- flywheel/models/job_ask_state_response.py +163 -0
- flywheel/models/job_complete.py +220 -0
- flywheel/models/job_completion_input.py +25 -0
- flywheel/models/job_completion_ticket.py +25 -0
- flywheel/models/job_config.py +135 -0
- flywheel/models/job_config_input.py +272 -0
- flywheel/models/job_config_inputs.py +25 -0
- flywheel/models/job_config_output.py +25 -0
- flywheel/models/job_container_detail.py +25 -0
- flywheel/models/job_destination.py +189 -0
- flywheel/models/job_detail.py +925 -0
- flywheel/models/job_detail_container.py +190 -0
- flywheel/models/job_detail_file_entry.py +194 -0
- flywheel/models/job_detail_group.py +190 -0
- flywheel/models/job_detail_parent_info.py +303 -0
- flywheel/models/job_executor_info.py +369 -0
- flywheel/models/job_file_input.py +247 -0
- flywheel/models/job_file_input_list_output.py +247 -0
- flywheel/models/job_file_object.py +435 -0
- flywheel/models/job_file_object_list_output.py +407 -0
- flywheel/models/job_gear_match.py +25 -0
- flywheel/models/job_inputs_array_item.py +305 -0
- flywheel/models/job_inputs_item.py +242 -0
- flywheel/models/job_inputs_object.py +138 -0
- flywheel/models/job_list_entry.py +25 -0
- flywheel/models/job_list_output.py +979 -0
- flywheel/models/job_list_output_config.py +220 -0
- flywheel/models/job_log.py +189 -0
- flywheel/models/job_log_column.py +40 -0
- flywheel/models/job_log_record.py +192 -0
- flywheel/models/job_modify.py +193 -0
- flywheel/models/job_origin.py +190 -0
- flywheel/models/job_output.py +1005 -0
- flywheel/models/job_output_config.py +247 -0
- flywheel/models/job_parents.py +297 -0
- flywheel/models/job_priority.py +31 -0
- flywheel/models/job_priority_update.py +192 -0
- flywheel/models/job_profile.py +427 -0
- flywheel/models/job_profile_input.py +25 -0
- flywheel/models/job_request.py +221 -0
- flywheel/models/job_request_item.py +246 -0
- flywheel/models/job_request_item_type.py +31 -0
- flywheel/models/job_request_target.py +270 -0
- flywheel/models/job_state.py +32 -0
- flywheel/models/job_state_counts.py +25 -0
- flywheel/models/job_stats_by_state.py +25 -0
- flywheel/models/job_ticket_output.py +165 -0
- flywheel/models/job_transition_times.py +253 -0
- flywheel/models/job_version_info.py +135 -0
- flywheel/models/jobs_by_state.py +272 -0
- flywheel/models/jobs_list.py +166 -0
- flywheel/models/join_origin_device.py +164 -0
- flywheel/models/join_origin_job.py +219 -0
- flywheel/models/join_origin_user.py +189 -0
- flywheel/models/join_origins.py +223 -0
- flywheel/models/join_type.py +28 -0
- flywheel/models/jupyterhub_workspace.py +163 -0
- flywheel/models/jupyterlab_server_modify.py +275 -0
- flywheel/models/jupyterlab_server_origin.py +25 -0
- flywheel/models/jupyterlab_server_output.py +25 -0
- flywheel/models/jupyterlab_server_response.py +415 -0
- flywheel/models/jupyterlab_server_update.py +25 -0
- flywheel/models/ldap_sync.py +36 -0
- flywheel/models/ldap_sync_config.py +163 -0
- flywheel/models/ldap_sync_input.py +36 -0
- flywheel/models/ldap_sync_status.py +250 -0
- flywheel/models/legacy_api_key_output.py +271 -0
- flywheel/models/legacy_input.py +244 -0
- flywheel/models/legacy_usage_report.py +309 -0
- flywheel/models/legacys_usage_project_entry.py +194 -0
- flywheel/models/libs_workflows_models_parent_type.py +33 -0
- flywheel/models/libs_workflows_models_task_status.py +32 -0
- flywheel/models/local_storage.py +217 -0
- flywheel/models/location.py +189 -0
- flywheel/models/locked.py +219 -0
- flywheel/models/master_subject_code_dob_input.py +279 -0
- flywheel/models/master_subject_code_input.py +281 -0
- flywheel/models/master_subject_code_output.py +166 -0
- flywheel/models/matched_acquisition_output.py +518 -0
- flywheel/models/mfa_channel.py +30 -0
- flywheel/models/mfa_settings.py +167 -0
- flywheel/models/mixins.py +794 -0
- flywheel/models/ml_set_filter.py +194 -0
- flywheel/models/ml_type.py +30 -0
- flywheel/models/modality.py +250 -0
- flywheel/models/modality_input.py +244 -0
- flywheel/models/modality_modify.py +218 -0
- flywheel/models/modality_output.py +271 -0
- flywheel/models/modified_result.py +190 -0
- flywheel/models/modify_user_input.py +466 -0
- flywheel/models/move_conflict.py +300 -0
- flywheel/models/note.py +391 -0
- flywheel/models/note_input.py +165 -0
- flywheel/models/optional_input_policy.py +30 -0
- flywheel/models/order.py +29 -0
- flywheel/models/organ_system.py +64 -0
- flywheel/models/origin.py +193 -0
- flywheel/models/origin_type.py +35 -0
- flywheel/models/orphaned_count.py +163 -0
- flywheel/models/output_user_page.py +219 -0
- flywheel/models/packfile_cleanup_output.py +166 -0
- flywheel/models/packfile_removed_output.py +189 -0
- flywheel/models/page.py +216 -0
- flywheel/models/page_generic_file_output.py +219 -0
- flywheel/models/page_generic_filter.py +219 -0
- flywheel/models/page_generic_form_response_output.py +219 -0
- flywheel/models/page_generic_protocol.py +244 -0
- flywheel/models/page_generic_reader_task_output.py +244 -0
- flywheel/models/page_generic_staffing_pool.py +244 -0
- flywheel/models/parsed_query_response.py +194 -0
- flywheel/models/permission_access_permission.py +25 -0
- flywheel/models/premade_jobs_batch_job_output.py +298 -0
- flywheel/models/premade_jobs_batch_job_output_inflated_jobs.py +299 -0
- flywheel/models/premade_jobs_batch_proposal.py +334 -0
- flywheel/models/premade_jobs_batch_proposal_detail.py +166 -0
- flywheel/models/premade_jobs_batch_proposal_input.py +166 -0
- flywheel/models/project.py +25 -0
- flywheel/models/project_acquisition_upsert_input.py +25 -0
- flywheel/models/project_acquisition_upsert_output.py +25 -0
- flywheel/models/project_aet.py +331 -0
- flywheel/models/project_aet_input.py +248 -0
- flywheel/models/project_catalog_list_output.py +25 -0
- flywheel/models/project_contact.py +194 -0
- flywheel/models/project_container_output.py +41 -0
- flywheel/models/project_copy_input.py +245 -0
- flywheel/models/project_copy_output.py +215 -0
- flywheel/models/project_counters.py +346 -0
- flywheel/models/project_hierarchy_input.py +278 -0
- flywheel/models/project_hierarchy_output.py +222 -0
- flywheel/models/project_hierarchy_upsert_input.py +25 -0
- flywheel/models/project_hierarchy_upsert_output.py +25 -0
- flywheel/models/project_input.py +384 -0
- flywheel/models/project_institution.py +194 -0
- flywheel/models/project_list_output.py +897 -0
- flywheel/models/project_locking_reason.py +32 -0
- flywheel/models/project_modify.py +413 -0
- flywheel/models/project_node.py +42 -0
- flywheel/models/project_output.py +899 -0
- flywheel/models/project_parents.py +168 -0
- flywheel/models/project_report.py +463 -0
- flywheel/models/project_report_list.py +167 -0
- flywheel/models/project_session_upsert_input.py +25 -0
- flywheel/models/project_session_upsert_output.py +25 -0
- flywheel/models/project_settings_input.py +333 -0
- flywheel/models/project_settings_output.py +333 -0
- flywheel/models/project_settings_sharing.py +327 -0
- flywheel/models/project_settings_sharing_input.py +334 -0
- flywheel/models/project_settings_workspaces.py +167 -0
- flywheel/models/project_settings_workspaces_input.py +167 -0
- flywheel/models/project_share_level.py +29 -0
- flywheel/models/project_sharing_settings_project_contact.py +25 -0
- flywheel/models/project_sharing_settings_project_counters.py +36 -0
- flywheel/models/project_sharing_settings_project_institution.py +25 -0
- flywheel/models/project_sharing_settings_project_settings_input.py +25 -0
- flywheel/models/project_sharing_settings_project_settings_output.py +25 -0
- flywheel/models/project_sharing_settings_project_settings_sharing.py +25 -0
- flywheel/models/project_sharing_settings_project_settings_sharing_input.py +25 -0
- flywheel/models/project_sharing_settings_project_stats.py +36 -0
- flywheel/models/project_stats.py +270 -0
- flywheel/models/project_subject_upsert_input.py +25 -0
- flywheel/models/project_subject_upsert_output.py +25 -0
- flywheel/models/project_template.py +195 -0
- flywheel/models/project_template_input.py +195 -0
- flywheel/models/project_template_list_input.py +166 -0
- flywheel/models/project_template_requirement.py +36 -0
- flywheel/models/project_template_session_template.py +36 -0
- flywheel/models/project_upsert_origin.py +36 -0
- flywheel/models/protocol.py +515 -0
- flywheel/models/protocol_e_signature_config.py +191 -0
- flywheel/models/protocol_input.py +354 -0
- flywheel/models/protocol_modify.py +277 -0
- flywheel/models/protocol_status.py +30 -0
- flywheel/models/provider.py +461 -0
- flywheel/models/provider_access_type.py +29 -0
- flywheel/models/provider_class.py +29 -0
- flywheel/models/provider_deletion_status.py +189 -0
- flywheel/models/provider_input.py +25 -0
- flywheel/models/provider_links.py +282 -0
- flywheel/models/provider_type.py +34 -0
- flywheel/models/providers.py +277 -0
- flywheel/models/reader_batch_create.py +463 -0
- flywheel/models/reader_task.py +725 -0
- flywheel/models/reader_task_config.py +189 -0
- flywheel/models/reader_task_create.py +543 -0
- flywheel/models/reader_task_modify.py +303 -0
- flywheel/models/reader_task_output.py +752 -0
- flywheel/models/reader_task_parent_details.py +322 -0
- flywheel/models/report_access_log_context.py +301 -0
- flywheel/models/report_access_log_context_entry.py +194 -0
- flywheel/models/report_access_log_context_file_entry.py +165 -0
- flywheel/models/report_access_log_entry.py +624 -0
- flywheel/models/report_access_log_origin.py +194 -0
- flywheel/models/report_availability_list.py +167 -0
- flywheel/models/report_daily_usage_entry.py +501 -0
- flywheel/models/report_demographics_grid.py +36 -0
- flywheel/models/report_ethnicity_grid.py +252 -0
- flywheel/models/report_gender_count.py +222 -0
- flywheel/models/report_group_report.py +217 -0
- flywheel/models/report_legacy_usage_entry.py +36 -0
- flywheel/models/report_legacy_usage_project_entry.py +36 -0
- flywheel/models/report_project.py +25 -0
- flywheel/models/report_site.py +192 -0
- flywheel/models/report_time_period.py +193 -0
- flywheel/models/report_usage.py +630 -0
- flywheel/models/report_usage_entry.py +25 -0
- flywheel/models/resolve_input.py +163 -0
- flywheel/models/resolve_output.py +194 -0
- flywheel/models/resolver_acquisition_node.py +36 -0
- flywheel/models/resolver_analysis_node.py +36 -0
- flywheel/models/resolver_file_node.py +36 -0
- flywheel/models/resolver_gear_node.py +36 -0
- flywheel/models/resolver_group_node.py +36 -0
- flywheel/models/resolver_input.py +25 -0
- flywheel/models/resolver_node.py +182 -0
- flywheel/models/resolver_output.py +25 -0
- flywheel/models/resolver_project_node.py +36 -0
- flywheel/models/resolver_session_node.py +36 -0
- flywheel/models/resolver_subject_node.py +36 -0
- flywheel/models/role_input.py +192 -0
- flywheel/models/role_output.py +273 -0
- flywheel/models/role_permission.py +194 -0
- flywheel/models/role_permission_output.py +189 -0
- flywheel/models/role_permission_update.py +163 -0
- flywheel/models/role_type.py +32 -0
- flywheel/models/role_update.py +194 -0
- flywheel/models/roles_backwards_compatible_role_assignment.py +36 -0
- flywheel/models/roles_group_role_pool_input.py +36 -0
- flywheel/models/roles_role.py +36 -0
- flywheel/models/roles_role_assignment.py +195 -0
- flywheel/models/roles_role_input.py +36 -0
- flywheel/models/rule.py +467 -0
- flywheel/models/rule_any.py +216 -0
- flywheel/models/s3_addressing_style.py +29 -0
- flywheel/models/s3_compat_storage.py +381 -0
- flywheel/models/save_search.py +298 -0
- flywheel/models/save_search_input.py +219 -0
- flywheel/models/save_search_output.py +301 -0
- flywheel/models/save_search_page.py +219 -0
- flywheel/models/save_search_parent.py +192 -0
- flywheel/models/save_search_update.py +194 -0
- flywheel/models/search_acquisition_response.py +252 -0
- flywheel/models/search_analysis_response.py +254 -0
- flywheel/models/search_collection_response.py +254 -0
- flywheel/models/search_file_response.py +312 -0
- flywheel/models/search_group_response.py +196 -0
- flywheel/models/search_parent_acquisition.py +47 -0
- flywheel/models/search_parent_analysis.py +47 -0
- flywheel/models/search_parent_collection.py +46 -0
- flywheel/models/search_parent_project.py +54 -0
- flywheel/models/search_parent_response.py +213 -0
- flywheel/models/search_parent_session.py +48 -0
- flywheel/models/search_parent_subject.py +48 -0
- flywheel/models/search_parse_error.py +252 -0
- flywheel/models/search_parse_search_query_result.py +36 -0
- flywheel/models/search_project_response.py +196 -0
- flywheel/models/search_query.py +337 -0
- flywheel/models/search_query_suggestions.py +36 -0
- flywheel/models/search_response.py +448 -0
- flywheel/models/search_return_type.py +33 -0
- flywheel/models/search_save_search.py +36 -0
- flywheel/models/search_save_search_input.py +36 -0
- flywheel/models/search_save_search_parent.py +36 -0
- flywheel/models/search_save_search_update.py +36 -0
- flywheel/models/search_session_response.py +252 -0
- flywheel/models/search_status.py +166 -0
- flywheel/models/search_structured_search_query.py +25 -0
- flywheel/models/search_subject_response.py +225 -0
- flywheel/models/search_suggestion.py +36 -0
- flywheel/models/select_item.py +190 -0
- flywheel/models/server_state.py +303 -0
- flywheel/models/service_aet.py +301 -0
- flywheel/models/service_aet_input.py +276 -0
- flywheel/models/session.py +25 -0
- flywheel/models/session_container_output.py +35 -0
- flywheel/models/session_copy_input.py +253 -0
- flywheel/models/session_embedded_subject.py +299 -0
- flywheel/models/session_input.py +431 -0
- flywheel/models/session_list_output.py +897 -0
- flywheel/models/session_metadata_input.py +36 -0
- flywheel/models/session_modify.py +464 -0
- flywheel/models/session_node.py +36 -0
- flywheel/models/session_output.py +897 -0
- flywheel/models/session_parents.py +220 -0
- flywheel/models/session_template_options.py +221 -0
- flywheel/models/session_template_recalc_output.py +165 -0
- flywheel/models/session_upsert_input.py +464 -0
- flywheel/models/session_upsert_output.py +243 -0
- flywheel/models/sharing_filter_options.py +345 -0
- flywheel/models/signed_fs_upload_output.py +189 -0
- flywheel/models/signed_url_cleanup_input.py +189 -0
- flywheel/models/signed_url_upload_input.py +190 -0
- flywheel/models/signed_url_upload_output.py +349 -0
- flywheel/models/site.py +623 -0
- flywheel/models/site_report.py +194 -0
- flywheel/models/site_settings.py +385 -0
- flywheel/models/sort.py +192 -0
- flywheel/models/stable_api_key_input.py +25 -0
- flywheel/models/staffing_pool.py +324 -0
- flywheel/models/staffing_pool_create.py +216 -0
- flywheel/models/staffing_pool_list.py +164 -0
- flywheel/models/staffing_pool_modify.py +218 -0
- flywheel/models/state.py +32 -0
- flywheel/models/static_compute.py +218 -0
- flywheel/models/status_transitions.py +245 -0
- flywheel/models/status_type.py +31 -0
- flywheel/models/status_value.py +31 -0
- flywheel/models/storage_strategy.py +30 -0
- flywheel/models/storage_strategy_config.py +194 -0
- flywheel/models/structured_query.py +165 -0
- flywheel/models/structured_query_suggestions.py +196 -0
- flywheel/models/structured_query_value_suggestion.py +247 -0
- flywheel/models/subject.py +34 -0
- flywheel/models/subject_container_output.py +36 -0
- flywheel/models/subject_copy_input.py +223 -0
- flywheel/models/subject_input.py +627 -0
- flywheel/models/subject_modify.py +684 -0
- flywheel/models/subject_node.py +37 -0
- flywheel/models/subject_output.py +1008 -0
- flywheel/models/subject_output_for_list.py +1005 -0
- flywheel/models/subject_parents.py +194 -0
- flywheel/models/subject_role_permission.py +194 -0
- flywheel/models/subject_state.py +30 -0
- flywheel/models/subject_template_options.py +191 -0
- flywheel/models/subject_upsert_input.py +573 -0
- flywheel/models/subject_upsert_output.py +216 -0
- flywheel/models/sync_user_input.py +322 -0
- flywheel/models/tag.py +165 -0
- flywheel/models/task_assign.py +194 -0
- flywheel/models/task_facet.py +29 -0
- flywheel/models/task_parent_ref.py +245 -0
- flywheel/models/task_parent_ref_input.py +219 -0
- flywheel/models/task_priority.py +31 -0
- flywheel/models/task_submission.py +189 -0
- flywheel/models/therapeutic_area.py +60 -0
- flywheel/models/transitions.py +272 -0
- flywheel/models/tree_container_request_spec.py +281 -0
- flywheel/models/tree_graph.py +142 -0
- flywheel/models/tree_graph_connection.py +244 -0
- flywheel/models/tree_graph_connections.py +142 -0
- flywheel/models/tree_graph_node.py +166 -0
- flywheel/models/tree_request.py +25 -0
- flywheel/models/tree_response_item.py +142 -0
- flywheel/models/type_str.py +31 -0
- flywheel/models/uid_check_input_acquisitions.py +244 -0
- flywheel/models/uid_check_input_sessions.py +244 -0
- flywheel/models/uid_check_output.py +191 -0
- flywheel/models/upload_complete_s3_multipart_input.py +25 -0
- flywheel/models/upload_complete_s3_multipart_output.py +25 -0
- flywheel/models/upload_signed_fs_file_upload_output.py +36 -0
- flywheel/models/upload_signed_upload_url_input.py +36 -0
- flywheel/models/upload_signed_upload_url_output.py +36 -0
- flywheel/models/upload_ticket_output.py +215 -0
- flywheel/models/upload_token_output.py +163 -0
- flywheel/models/upsert_result.py +31 -0
- flywheel/models/user.py +760 -0
- flywheel/models/user_api_key.py +220 -0
- flywheel/models/user_input.py +461 -0
- flywheel/models/user_jobs.py +219 -0
- flywheel/models/user_jobs_output.py +25 -0
- flywheel/models/user_output.py +36 -0
- flywheel/models/user_output_id.py +163 -0
- flywheel/models/user_preferences.py +135 -0
- flywheel/models/user_wechat.py +135 -0
- flywheel/models/validation_error.py +215 -0
- flywheel/models/validation_rule.py +190 -0
- flywheel/models/version.py +363 -0
- flywheel/models/version_output.py +25 -0
- flywheel/models/view_id_output.py +164 -0
- flywheel/models/view_output.py +440 -0
- flywheel/models/viewer_app.py +381 -0
- flywheel/models/viewer_app_input.py +382 -0
- flywheel/models/viewer_app_type.py +29 -0
- flywheel/models/virus_scan.py +166 -0
- flywheel/models/virus_scan_state.py +30 -0
- flywheel/models/work_in_progress_features.py +135 -0
- flywheel/models/zipfile_info.py +192 -0
- flywheel/models/zipfile_member_info.py +241 -0
- flywheel/partial_reader.py +50 -0
- flywheel/rest.py +352 -0
- flywheel/util.py +95 -0
- flywheel/view_builder.py +449 -0
- flywheel_sdk-21.2.0.dist-info/METADATA +42 -0
- flywheel_sdk-21.2.0.dist-info/RECORD +772 -0
- flywheel_sdk-21.2.0.dist-info/WHEEL +4 -0
- flywheel_sdk-21.2.0.dist-info/licenses/LICENSE.txt +18 -0
flywheel/api/jobs_api.py
ADDED
|
@@ -0,0 +1,2320 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Flywheel
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 0.0.1
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from __future__ import absolute_import
|
|
15
|
+
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
|
|
18
|
+
# python 2 and python 3 compatibility library
|
|
19
|
+
import six
|
|
20
|
+
|
|
21
|
+
from flywheel.api_client import ApiClient
|
|
22
|
+
import flywheel.models
|
|
23
|
+
from flywheel.util import check_filename_params
|
|
24
|
+
|
|
25
|
+
# NOTE: This file is auto generated by the swagger code generator program.
|
|
26
|
+
# Do not edit the class manually.
|
|
27
|
+
|
|
28
|
+
class JobsApi(object):
|
|
29
|
+
def __init__(self, api_client=None):
|
|
30
|
+
if api_client is None:
|
|
31
|
+
api_client = ApiClient()
|
|
32
|
+
self.api_client = api_client
|
|
33
|
+
|
|
34
|
+
def add_job(self, body, **kwargs): # noqa: E501
|
|
35
|
+
"""Add a job
|
|
36
|
+
|
|
37
|
+
Add a job
|
|
38
|
+
This method makes a synchronous HTTP request by default.
|
|
39
|
+
|
|
40
|
+
:param InputJob body: (required)
|
|
41
|
+
:param bool async_: Perform the request asynchronously
|
|
42
|
+
:return: InsertedId
|
|
43
|
+
"""
|
|
44
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
45
|
+
kwargs['_return_http_data_only'] = True
|
|
46
|
+
|
|
47
|
+
if kwargs.get('async_'):
|
|
48
|
+
return self.add_job_with_http_info(body, **kwargs) # noqa: E501
|
|
49
|
+
else:
|
|
50
|
+
(data) = self.add_job_with_http_info(body, **kwargs) # noqa: E501
|
|
51
|
+
if (
|
|
52
|
+
data
|
|
53
|
+
and hasattr(data, 'return_value')
|
|
54
|
+
and not ignore_simplified_return_value
|
|
55
|
+
):
|
|
56
|
+
return data.return_value()
|
|
57
|
+
return data
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def add_job_with_http_info(self, body, **kwargs): # noqa: E501
|
|
61
|
+
"""Add a job
|
|
62
|
+
|
|
63
|
+
Add a job
|
|
64
|
+
This method makes a synchronous HTTP request by default.
|
|
65
|
+
|
|
66
|
+
:param InputJob body: (required)
|
|
67
|
+
:param bool async_: Perform the request asynchronously
|
|
68
|
+
:return: InsertedId
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
all_params = ['body',] # noqa: E501
|
|
72
|
+
all_params.append('async_')
|
|
73
|
+
all_params.append('_return_http_data_only')
|
|
74
|
+
all_params.append('_preload_content')
|
|
75
|
+
all_params.append('_request_timeout')
|
|
76
|
+
all_params.append('_request_out')
|
|
77
|
+
|
|
78
|
+
params = locals()
|
|
79
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
80
|
+
if key not in all_params:
|
|
81
|
+
raise TypeError(
|
|
82
|
+
"Got an unexpected keyword argument '%s'"
|
|
83
|
+
" to method add_job" % key
|
|
84
|
+
)
|
|
85
|
+
params[key] = val
|
|
86
|
+
del params['kwargs']
|
|
87
|
+
# verify the required parameter 'body' is set
|
|
88
|
+
if ('body' not in params or
|
|
89
|
+
params['body'] is None):
|
|
90
|
+
raise ValueError("Missing the required parameter `body` when calling `add_job`") # noqa: E501
|
|
91
|
+
check_filename_params(params)
|
|
92
|
+
|
|
93
|
+
collection_formats = {}
|
|
94
|
+
|
|
95
|
+
path_params = {}
|
|
96
|
+
|
|
97
|
+
query_params = []
|
|
98
|
+
|
|
99
|
+
header_params = {}
|
|
100
|
+
|
|
101
|
+
form_params = []
|
|
102
|
+
local_var_files = {}
|
|
103
|
+
|
|
104
|
+
body_params = None
|
|
105
|
+
if 'body' in params:
|
|
106
|
+
if 'InputJob'.startswith('union'):
|
|
107
|
+
body_type = type(params['body'])
|
|
108
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
109
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
110
|
+
else:
|
|
111
|
+
body_params = params['body']
|
|
112
|
+
else:
|
|
113
|
+
body_params = flywheel.models.InputJob.positional_to_model(params['body'])
|
|
114
|
+
# HTTP header `Accept`
|
|
115
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
116
|
+
['application/json']) # noqa: E501
|
|
117
|
+
|
|
118
|
+
# HTTP header `Content-Type`
|
|
119
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
120
|
+
['application/json']) # noqa: E501
|
|
121
|
+
|
|
122
|
+
# Authentication setting
|
|
123
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
124
|
+
|
|
125
|
+
return self.api_client.call_api(
|
|
126
|
+
'/jobs/add', 'POST',
|
|
127
|
+
path_params,
|
|
128
|
+
query_params,
|
|
129
|
+
header_params,
|
|
130
|
+
body=body_params,
|
|
131
|
+
post_params=form_params,
|
|
132
|
+
files=local_var_files,
|
|
133
|
+
response_type='InsertedId', # noqa: E501
|
|
134
|
+
auth_settings=auth_settings,
|
|
135
|
+
async_=params.get('async_'),
|
|
136
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
137
|
+
_preload_content=params.get('_preload_content', True),
|
|
138
|
+
_request_timeout=params.get('_request_timeout'),
|
|
139
|
+
_request_out=params.get('_request_out'),
|
|
140
|
+
collection_formats=collection_formats)
|
|
141
|
+
|
|
142
|
+
def add_job_logs(self, job_id, body, **kwargs): # noqa: E501
|
|
143
|
+
"""Add logs to a job.
|
|
144
|
+
|
|
145
|
+
This method makes a synchronous HTTP request by default.
|
|
146
|
+
|
|
147
|
+
:param str job_id: (required)
|
|
148
|
+
:param list[JobLog] body: (required)
|
|
149
|
+
:param bool async_: Perform the request asynchronously
|
|
150
|
+
:return: None
|
|
151
|
+
"""
|
|
152
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
153
|
+
kwargs['_return_http_data_only'] = True
|
|
154
|
+
|
|
155
|
+
if kwargs.get('async_'):
|
|
156
|
+
return self.add_job_logs_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
157
|
+
else:
|
|
158
|
+
(data) = self.add_job_logs_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
159
|
+
if (
|
|
160
|
+
data
|
|
161
|
+
and hasattr(data, 'return_value')
|
|
162
|
+
and not ignore_simplified_return_value
|
|
163
|
+
):
|
|
164
|
+
return data.return_value()
|
|
165
|
+
return data
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def add_job_logs_with_http_info(self, job_id, body, **kwargs): # noqa: E501
|
|
169
|
+
"""Add logs to a job.
|
|
170
|
+
|
|
171
|
+
This method makes a synchronous HTTP request by default.
|
|
172
|
+
|
|
173
|
+
:param str job_id: (required)
|
|
174
|
+
:param list[JobLog] body: (required)
|
|
175
|
+
:param bool async_: Perform the request asynchronously
|
|
176
|
+
:return: None
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
all_params = ['job_id','body',] # noqa: E501
|
|
180
|
+
all_params.append('async_')
|
|
181
|
+
all_params.append('_return_http_data_only')
|
|
182
|
+
all_params.append('_preload_content')
|
|
183
|
+
all_params.append('_request_timeout')
|
|
184
|
+
all_params.append('_request_out')
|
|
185
|
+
|
|
186
|
+
params = locals()
|
|
187
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
188
|
+
if key not in all_params:
|
|
189
|
+
raise TypeError(
|
|
190
|
+
"Got an unexpected keyword argument '%s'"
|
|
191
|
+
" to method add_job_logs" % key
|
|
192
|
+
)
|
|
193
|
+
params[key] = val
|
|
194
|
+
del params['kwargs']
|
|
195
|
+
# verify the required parameter 'job_id' is set
|
|
196
|
+
if ('job_id' not in params or
|
|
197
|
+
params['job_id'] is None):
|
|
198
|
+
raise ValueError("Missing the required parameter `job_id` when calling `add_job_logs`") # noqa: E501
|
|
199
|
+
# verify the required parameter 'body' is set
|
|
200
|
+
if ('body' not in params or
|
|
201
|
+
params['body'] is None):
|
|
202
|
+
raise ValueError("Missing the required parameter `body` when calling `add_job_logs`") # noqa: E501
|
|
203
|
+
check_filename_params(params)
|
|
204
|
+
|
|
205
|
+
collection_formats = {}
|
|
206
|
+
|
|
207
|
+
path_params = {}
|
|
208
|
+
if 'job_id' in params:
|
|
209
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
210
|
+
|
|
211
|
+
query_params = []
|
|
212
|
+
|
|
213
|
+
header_params = {}
|
|
214
|
+
|
|
215
|
+
form_params = []
|
|
216
|
+
local_var_files = {}
|
|
217
|
+
|
|
218
|
+
body_params = None
|
|
219
|
+
if 'body' in params:
|
|
220
|
+
body_params = params['body']
|
|
221
|
+
# HTTP header `Accept`
|
|
222
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
223
|
+
['application/json']) # noqa: E501
|
|
224
|
+
|
|
225
|
+
# HTTP header `Content-Type`
|
|
226
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
227
|
+
['application/json']) # noqa: E501
|
|
228
|
+
|
|
229
|
+
# Authentication setting
|
|
230
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
231
|
+
|
|
232
|
+
return self.api_client.call_api(
|
|
233
|
+
'/jobs/{job_id}/logs', 'POST',
|
|
234
|
+
path_params,
|
|
235
|
+
query_params,
|
|
236
|
+
header_params,
|
|
237
|
+
body=body_params,
|
|
238
|
+
post_params=form_params,
|
|
239
|
+
files=local_var_files,
|
|
240
|
+
response_type=None, # noqa: E501
|
|
241
|
+
auth_settings=auth_settings,
|
|
242
|
+
async_=params.get('async_'),
|
|
243
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
244
|
+
_preload_content=params.get('_preload_content', True),
|
|
245
|
+
_request_timeout=params.get('_request_timeout'),
|
|
246
|
+
_request_out=params.get('_request_out'),
|
|
247
|
+
collection_formats=collection_formats)
|
|
248
|
+
|
|
249
|
+
def ask_jobs(self, body, **kwargs): # noqa: E501
|
|
250
|
+
"""Ask the queue a question
|
|
251
|
+
|
|
252
|
+
Ask the queue a question, receiving work or statistics in return.
|
|
253
|
+
This method makes a synchronous HTTP request by default.
|
|
254
|
+
|
|
255
|
+
:param JobAsk body: (required)
|
|
256
|
+
:param bool async_: Perform the request asynchronously
|
|
257
|
+
:return: JobAskResponse
|
|
258
|
+
"""
|
|
259
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
260
|
+
kwargs['_return_http_data_only'] = True
|
|
261
|
+
|
|
262
|
+
if kwargs.get('async_'):
|
|
263
|
+
return self.ask_jobs_with_http_info(body, **kwargs) # noqa: E501
|
|
264
|
+
else:
|
|
265
|
+
(data) = self.ask_jobs_with_http_info(body, **kwargs) # noqa: E501
|
|
266
|
+
if (
|
|
267
|
+
data
|
|
268
|
+
and hasattr(data, 'return_value')
|
|
269
|
+
and not ignore_simplified_return_value
|
|
270
|
+
):
|
|
271
|
+
return data.return_value()
|
|
272
|
+
return data
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
def ask_jobs_with_http_info(self, body, **kwargs): # noqa: E501
|
|
276
|
+
"""Ask the queue a question
|
|
277
|
+
|
|
278
|
+
Ask the queue a question, receiving work or statistics in return.
|
|
279
|
+
This method makes a synchronous HTTP request by default.
|
|
280
|
+
|
|
281
|
+
:param JobAsk body: (required)
|
|
282
|
+
:param bool async_: Perform the request asynchronously
|
|
283
|
+
:return: JobAskResponse
|
|
284
|
+
"""
|
|
285
|
+
|
|
286
|
+
all_params = ['body',] # noqa: E501
|
|
287
|
+
all_params.append('async_')
|
|
288
|
+
all_params.append('_return_http_data_only')
|
|
289
|
+
all_params.append('_preload_content')
|
|
290
|
+
all_params.append('_request_timeout')
|
|
291
|
+
all_params.append('_request_out')
|
|
292
|
+
|
|
293
|
+
params = locals()
|
|
294
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
295
|
+
if key not in all_params:
|
|
296
|
+
raise TypeError(
|
|
297
|
+
"Got an unexpected keyword argument '%s'"
|
|
298
|
+
" to method ask_jobs" % key
|
|
299
|
+
)
|
|
300
|
+
params[key] = val
|
|
301
|
+
del params['kwargs']
|
|
302
|
+
# verify the required parameter 'body' is set
|
|
303
|
+
if ('body' not in params or
|
|
304
|
+
params['body'] is None):
|
|
305
|
+
raise ValueError("Missing the required parameter `body` when calling `ask_jobs`") # noqa: E501
|
|
306
|
+
check_filename_params(params)
|
|
307
|
+
|
|
308
|
+
collection_formats = {}
|
|
309
|
+
|
|
310
|
+
path_params = {}
|
|
311
|
+
|
|
312
|
+
query_params = []
|
|
313
|
+
|
|
314
|
+
header_params = {}
|
|
315
|
+
|
|
316
|
+
form_params = []
|
|
317
|
+
local_var_files = {}
|
|
318
|
+
|
|
319
|
+
body_params = None
|
|
320
|
+
if 'body' in params:
|
|
321
|
+
if 'JobAsk'.startswith('union'):
|
|
322
|
+
body_type = type(params['body'])
|
|
323
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
324
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
325
|
+
else:
|
|
326
|
+
body_params = params['body']
|
|
327
|
+
else:
|
|
328
|
+
body_params = flywheel.models.JobAsk.positional_to_model(params['body'])
|
|
329
|
+
# HTTP header `Accept`
|
|
330
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
331
|
+
['application/json']) # noqa: E501
|
|
332
|
+
|
|
333
|
+
# HTTP header `Content-Type`
|
|
334
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
335
|
+
['application/json']) # noqa: E501
|
|
336
|
+
|
|
337
|
+
# Authentication setting
|
|
338
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
339
|
+
|
|
340
|
+
return self.api_client.call_api(
|
|
341
|
+
'/jobs/ask', 'POST',
|
|
342
|
+
path_params,
|
|
343
|
+
query_params,
|
|
344
|
+
header_params,
|
|
345
|
+
body=body_params,
|
|
346
|
+
post_params=form_params,
|
|
347
|
+
files=local_var_files,
|
|
348
|
+
response_type='JobAskResponse', # noqa: E501
|
|
349
|
+
auth_settings=auth_settings,
|
|
350
|
+
async_=params.get('async_'),
|
|
351
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
352
|
+
_preload_content=params.get('_preload_content', True),
|
|
353
|
+
_request_timeout=params.get('_request_timeout'),
|
|
354
|
+
_request_out=params.get('_request_out'),
|
|
355
|
+
collection_formats=collection_formats)
|
|
356
|
+
|
|
357
|
+
def ask_jobs_state(self, job_state, body, **kwargs): # noqa: E501
|
|
358
|
+
"""Ask job count by state
|
|
359
|
+
|
|
360
|
+
Ask the queue for the number of jobs for a given state and query.
|
|
361
|
+
This method makes a synchronous HTTP request by default.
|
|
362
|
+
|
|
363
|
+
:param JobState job_state: (required)
|
|
364
|
+
:param JobAsk body: (required)
|
|
365
|
+
:param bool async_: Perform the request asynchronously
|
|
366
|
+
:return: JobAskStateResponse
|
|
367
|
+
"""
|
|
368
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
369
|
+
kwargs['_return_http_data_only'] = True
|
|
370
|
+
|
|
371
|
+
if kwargs.get('async_'):
|
|
372
|
+
return self.ask_jobs_state_with_http_info(job_state, body, **kwargs) # noqa: E501
|
|
373
|
+
else:
|
|
374
|
+
(data) = self.ask_jobs_state_with_http_info(job_state, body, **kwargs) # noqa: E501
|
|
375
|
+
if (
|
|
376
|
+
data
|
|
377
|
+
and hasattr(data, 'return_value')
|
|
378
|
+
and not ignore_simplified_return_value
|
|
379
|
+
):
|
|
380
|
+
return data.return_value()
|
|
381
|
+
return data
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
def ask_jobs_state_with_http_info(self, job_state, body, **kwargs): # noqa: E501
|
|
385
|
+
"""Ask job count by state
|
|
386
|
+
|
|
387
|
+
Ask the queue for the number of jobs for a given state and query.
|
|
388
|
+
This method makes a synchronous HTTP request by default.
|
|
389
|
+
|
|
390
|
+
:param JobState job_state: (required)
|
|
391
|
+
:param JobAsk body: (required)
|
|
392
|
+
:param bool async_: Perform the request asynchronously
|
|
393
|
+
:return: JobAskStateResponse
|
|
394
|
+
"""
|
|
395
|
+
|
|
396
|
+
all_params = ['job_state','body',] # noqa: E501
|
|
397
|
+
all_params.append('async_')
|
|
398
|
+
all_params.append('_return_http_data_only')
|
|
399
|
+
all_params.append('_preload_content')
|
|
400
|
+
all_params.append('_request_timeout')
|
|
401
|
+
all_params.append('_request_out')
|
|
402
|
+
|
|
403
|
+
params = locals()
|
|
404
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
405
|
+
if key not in all_params:
|
|
406
|
+
raise TypeError(
|
|
407
|
+
"Got an unexpected keyword argument '%s'"
|
|
408
|
+
" to method ask_jobs_state" % key
|
|
409
|
+
)
|
|
410
|
+
params[key] = val
|
|
411
|
+
del params['kwargs']
|
|
412
|
+
# verify the required parameter 'job_state' is set
|
|
413
|
+
if ('job_state' not in params or
|
|
414
|
+
params['job_state'] is None):
|
|
415
|
+
raise ValueError("Missing the required parameter `job_state` when calling `ask_jobs_state`") # noqa: E501
|
|
416
|
+
# verify the required parameter 'body' is set
|
|
417
|
+
if ('body' not in params or
|
|
418
|
+
params['body'] is None):
|
|
419
|
+
raise ValueError("Missing the required parameter `body` when calling `ask_jobs_state`") # noqa: E501
|
|
420
|
+
check_filename_params(params)
|
|
421
|
+
|
|
422
|
+
collection_formats = {}
|
|
423
|
+
|
|
424
|
+
path_params = {}
|
|
425
|
+
if 'job_state' in params:
|
|
426
|
+
path_params['job_state'] = params['job_state'] # noqa: E501
|
|
427
|
+
|
|
428
|
+
query_params = []
|
|
429
|
+
|
|
430
|
+
header_params = {}
|
|
431
|
+
|
|
432
|
+
form_params = []
|
|
433
|
+
local_var_files = {}
|
|
434
|
+
|
|
435
|
+
body_params = None
|
|
436
|
+
if 'body' in params:
|
|
437
|
+
if 'JobAsk'.startswith('union'):
|
|
438
|
+
body_type = type(params['body'])
|
|
439
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
440
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
441
|
+
else:
|
|
442
|
+
body_params = params['body']
|
|
443
|
+
else:
|
|
444
|
+
body_params = flywheel.models.JobAsk.positional_to_model(params['body'])
|
|
445
|
+
# HTTP header `Accept`
|
|
446
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
447
|
+
['application/json']) # noqa: E501
|
|
448
|
+
|
|
449
|
+
# HTTP header `Content-Type`
|
|
450
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
451
|
+
['application/json']) # noqa: E501
|
|
452
|
+
|
|
453
|
+
# Authentication setting
|
|
454
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
455
|
+
|
|
456
|
+
return self.api_client.call_api(
|
|
457
|
+
'/jobs/ask/{job_state}', 'POST',
|
|
458
|
+
path_params,
|
|
459
|
+
query_params,
|
|
460
|
+
header_params,
|
|
461
|
+
body=body_params,
|
|
462
|
+
post_params=form_params,
|
|
463
|
+
files=local_var_files,
|
|
464
|
+
response_type='JobAskStateResponse', # noqa: E501
|
|
465
|
+
auth_settings=auth_settings,
|
|
466
|
+
async_=params.get('async_'),
|
|
467
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
468
|
+
_preload_content=params.get('_preload_content', True),
|
|
469
|
+
_request_timeout=params.get('_request_timeout'),
|
|
470
|
+
_request_out=params.get('_request_out'),
|
|
471
|
+
collection_formats=collection_formats)
|
|
472
|
+
|
|
473
|
+
def complete_job(self, job_id, body, **kwargs): # noqa: E501
|
|
474
|
+
"""Complete a job, with information
|
|
475
|
+
|
|
476
|
+
This method makes a synchronous HTTP request by default.
|
|
477
|
+
|
|
478
|
+
:param str job_id: (required)
|
|
479
|
+
:param JobComplete body: (required)
|
|
480
|
+
:param str job_ticket_id: ticket id for job completion
|
|
481
|
+
:param bool async_: Perform the request asynchronously
|
|
482
|
+
:return: None
|
|
483
|
+
"""
|
|
484
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
485
|
+
kwargs['_return_http_data_only'] = True
|
|
486
|
+
|
|
487
|
+
if kwargs.get('async_'):
|
|
488
|
+
return self.complete_job_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
489
|
+
else:
|
|
490
|
+
(data) = self.complete_job_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
491
|
+
if (
|
|
492
|
+
data
|
|
493
|
+
and hasattr(data, 'return_value')
|
|
494
|
+
and not ignore_simplified_return_value
|
|
495
|
+
):
|
|
496
|
+
return data.return_value()
|
|
497
|
+
return data
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
def complete_job_with_http_info(self, job_id, body, **kwargs): # noqa: E501
|
|
501
|
+
"""Complete a job, with information
|
|
502
|
+
|
|
503
|
+
This method makes a synchronous HTTP request by default.
|
|
504
|
+
|
|
505
|
+
:param str job_id: (required)
|
|
506
|
+
:param JobComplete body: (required)
|
|
507
|
+
:param str job_ticket_id: ticket id for job completion
|
|
508
|
+
:param bool async_: Perform the request asynchronously
|
|
509
|
+
:return: None
|
|
510
|
+
"""
|
|
511
|
+
|
|
512
|
+
all_params = ['job_id','body','job_ticket_id',] # noqa: E501
|
|
513
|
+
all_params.append('async_')
|
|
514
|
+
all_params.append('_return_http_data_only')
|
|
515
|
+
all_params.append('_preload_content')
|
|
516
|
+
all_params.append('_request_timeout')
|
|
517
|
+
all_params.append('_request_out')
|
|
518
|
+
|
|
519
|
+
params = locals()
|
|
520
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
521
|
+
if key not in all_params:
|
|
522
|
+
raise TypeError(
|
|
523
|
+
"Got an unexpected keyword argument '%s'"
|
|
524
|
+
" to method complete_job" % key
|
|
525
|
+
)
|
|
526
|
+
params[key] = val
|
|
527
|
+
del params['kwargs']
|
|
528
|
+
# verify the required parameter 'job_id' is set
|
|
529
|
+
if ('job_id' not in params or
|
|
530
|
+
params['job_id'] is None):
|
|
531
|
+
raise ValueError("Missing the required parameter `job_id` when calling `complete_job`") # noqa: E501
|
|
532
|
+
# verify the required parameter 'body' is set
|
|
533
|
+
if ('body' not in params or
|
|
534
|
+
params['body'] is None):
|
|
535
|
+
raise ValueError("Missing the required parameter `body` when calling `complete_job`") # noqa: E501
|
|
536
|
+
check_filename_params(params)
|
|
537
|
+
|
|
538
|
+
collection_formats = {}
|
|
539
|
+
|
|
540
|
+
path_params = {}
|
|
541
|
+
if 'job_id' in params:
|
|
542
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
543
|
+
|
|
544
|
+
query_params = []
|
|
545
|
+
if 'job_ticket_id' in params:
|
|
546
|
+
query_params.append(('job_ticket_id', params['job_ticket_id'])) # noqa: E501
|
|
547
|
+
|
|
548
|
+
header_params = {}
|
|
549
|
+
|
|
550
|
+
form_params = []
|
|
551
|
+
local_var_files = {}
|
|
552
|
+
|
|
553
|
+
body_params = None
|
|
554
|
+
if 'body' in params:
|
|
555
|
+
if 'JobComplete'.startswith('union'):
|
|
556
|
+
body_type = type(params['body'])
|
|
557
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
558
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
559
|
+
else:
|
|
560
|
+
body_params = params['body']
|
|
561
|
+
else:
|
|
562
|
+
body_params = flywheel.models.JobComplete.positional_to_model(params['body'])
|
|
563
|
+
# HTTP header `Accept`
|
|
564
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
565
|
+
['application/json']) # noqa: E501
|
|
566
|
+
|
|
567
|
+
# HTTP header `Content-Type`
|
|
568
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
569
|
+
['application/json']) # noqa: E501
|
|
570
|
+
|
|
571
|
+
# Authentication setting
|
|
572
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
573
|
+
|
|
574
|
+
return self.api_client.call_api(
|
|
575
|
+
'/jobs/{job_id}/complete', 'POST',
|
|
576
|
+
path_params,
|
|
577
|
+
query_params,
|
|
578
|
+
header_params,
|
|
579
|
+
body=body_params,
|
|
580
|
+
post_params=form_params,
|
|
581
|
+
files=local_var_files,
|
|
582
|
+
response_type=None, # noqa: E501
|
|
583
|
+
auth_settings=auth_settings,
|
|
584
|
+
async_=params.get('async_'),
|
|
585
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
586
|
+
_preload_content=params.get('_preload_content', True),
|
|
587
|
+
_request_timeout=params.get('_request_timeout'),
|
|
588
|
+
_request_out=params.get('_request_out'),
|
|
589
|
+
collection_formats=collection_formats)
|
|
590
|
+
|
|
591
|
+
def determine_provider_for_job(self, body, **kwargs): # noqa: E501
|
|
592
|
+
"""Determine the effective compute provider for a proposed job.
|
|
593
|
+
|
|
594
|
+
This method makes a synchronous HTTP request by default.
|
|
595
|
+
|
|
596
|
+
:param InputJob body: (required)
|
|
597
|
+
:param bool async_: Perform the request asynchronously
|
|
598
|
+
:return: Provider
|
|
599
|
+
"""
|
|
600
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
601
|
+
kwargs['_return_http_data_only'] = True
|
|
602
|
+
|
|
603
|
+
if kwargs.get('async_'):
|
|
604
|
+
return self.determine_provider_for_job_with_http_info(body, **kwargs) # noqa: E501
|
|
605
|
+
else:
|
|
606
|
+
(data) = self.determine_provider_for_job_with_http_info(body, **kwargs) # noqa: E501
|
|
607
|
+
if (
|
|
608
|
+
data
|
|
609
|
+
and hasattr(data, 'return_value')
|
|
610
|
+
and not ignore_simplified_return_value
|
|
611
|
+
):
|
|
612
|
+
return data.return_value()
|
|
613
|
+
return data
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
def determine_provider_for_job_with_http_info(self, body, **kwargs): # noqa: E501
|
|
617
|
+
"""Determine the effective compute provider for a proposed job.
|
|
618
|
+
|
|
619
|
+
This method makes a synchronous HTTP request by default.
|
|
620
|
+
|
|
621
|
+
:param InputJob body: (required)
|
|
622
|
+
:param bool async_: Perform the request asynchronously
|
|
623
|
+
:return: Provider
|
|
624
|
+
"""
|
|
625
|
+
|
|
626
|
+
all_params = ['body',] # noqa: E501
|
|
627
|
+
all_params.append('async_')
|
|
628
|
+
all_params.append('_return_http_data_only')
|
|
629
|
+
all_params.append('_preload_content')
|
|
630
|
+
all_params.append('_request_timeout')
|
|
631
|
+
all_params.append('_request_out')
|
|
632
|
+
|
|
633
|
+
params = locals()
|
|
634
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
635
|
+
if key not in all_params:
|
|
636
|
+
raise TypeError(
|
|
637
|
+
"Got an unexpected keyword argument '%s'"
|
|
638
|
+
" to method determine_provider_for_job" % key
|
|
639
|
+
)
|
|
640
|
+
params[key] = val
|
|
641
|
+
del params['kwargs']
|
|
642
|
+
# verify the required parameter 'body' is set
|
|
643
|
+
if ('body' not in params or
|
|
644
|
+
params['body'] is None):
|
|
645
|
+
raise ValueError("Missing the required parameter `body` when calling `determine_provider_for_job`") # noqa: E501
|
|
646
|
+
check_filename_params(params)
|
|
647
|
+
|
|
648
|
+
collection_formats = {}
|
|
649
|
+
|
|
650
|
+
path_params = {}
|
|
651
|
+
|
|
652
|
+
query_params = []
|
|
653
|
+
|
|
654
|
+
header_params = {}
|
|
655
|
+
|
|
656
|
+
form_params = []
|
|
657
|
+
local_var_files = {}
|
|
658
|
+
|
|
659
|
+
body_params = None
|
|
660
|
+
if 'body' in params:
|
|
661
|
+
if 'InputJob'.startswith('union'):
|
|
662
|
+
body_type = type(params['body'])
|
|
663
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
664
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
665
|
+
else:
|
|
666
|
+
body_params = params['body']
|
|
667
|
+
else:
|
|
668
|
+
body_params = flywheel.models.InputJob.positional_to_model(params['body'])
|
|
669
|
+
# HTTP header `Accept`
|
|
670
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
671
|
+
['application/json']) # noqa: E501
|
|
672
|
+
|
|
673
|
+
# HTTP header `Content-Type`
|
|
674
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
675
|
+
['application/json']) # noqa: E501
|
|
676
|
+
|
|
677
|
+
# Authentication setting
|
|
678
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
679
|
+
|
|
680
|
+
return self.api_client.call_api(
|
|
681
|
+
'/jobs/determine_provider', 'POST',
|
|
682
|
+
path_params,
|
|
683
|
+
query_params,
|
|
684
|
+
header_params,
|
|
685
|
+
body=body_params,
|
|
686
|
+
post_params=form_params,
|
|
687
|
+
files=local_var_files,
|
|
688
|
+
response_type='Provider', # noqa: E501
|
|
689
|
+
auth_settings=auth_settings,
|
|
690
|
+
async_=params.get('async_'),
|
|
691
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
692
|
+
_preload_content=params.get('_preload_content', True),
|
|
693
|
+
_request_timeout=params.get('_request_timeout'),
|
|
694
|
+
_request_out=params.get('_request_out'),
|
|
695
|
+
collection_formats=collection_formats)
|
|
696
|
+
|
|
697
|
+
def engine_complete_job(self, job_id, body, **kwargs): # noqa: E501
|
|
698
|
+
"""Complete a job, with information.
|
|
699
|
+
|
|
700
|
+
This method makes a synchronous HTTP request by default.
|
|
701
|
+
|
|
702
|
+
:param str job_id: (required)
|
|
703
|
+
:param JobComplete body: (required)
|
|
704
|
+
:param str job_ticket_id: ticket id for job completion
|
|
705
|
+
:param bool async_: Perform the request asynchronously
|
|
706
|
+
:return: None
|
|
707
|
+
"""
|
|
708
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
709
|
+
kwargs['_return_http_data_only'] = True
|
|
710
|
+
|
|
711
|
+
if kwargs.get('async_'):
|
|
712
|
+
return self.engine_complete_job_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
713
|
+
else:
|
|
714
|
+
(data) = self.engine_complete_job_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
715
|
+
if (
|
|
716
|
+
data
|
|
717
|
+
and hasattr(data, 'return_value')
|
|
718
|
+
and not ignore_simplified_return_value
|
|
719
|
+
):
|
|
720
|
+
return data.return_value()
|
|
721
|
+
return data
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
def engine_complete_job_with_http_info(self, job_id, body, **kwargs): # noqa: E501
|
|
725
|
+
"""Complete a job, with information.
|
|
726
|
+
|
|
727
|
+
This method makes a synchronous HTTP request by default.
|
|
728
|
+
|
|
729
|
+
:param str job_id: (required)
|
|
730
|
+
:param JobComplete body: (required)
|
|
731
|
+
:param str job_ticket_id: ticket id for job completion
|
|
732
|
+
:param bool async_: Perform the request asynchronously
|
|
733
|
+
:return: None
|
|
734
|
+
"""
|
|
735
|
+
|
|
736
|
+
all_params = ['job_id','body','job_ticket_id',] # noqa: E501
|
|
737
|
+
all_params.append('async_')
|
|
738
|
+
all_params.append('_return_http_data_only')
|
|
739
|
+
all_params.append('_preload_content')
|
|
740
|
+
all_params.append('_request_timeout')
|
|
741
|
+
all_params.append('_request_out')
|
|
742
|
+
|
|
743
|
+
params = locals()
|
|
744
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
745
|
+
if key not in all_params:
|
|
746
|
+
raise TypeError(
|
|
747
|
+
"Got an unexpected keyword argument '%s'"
|
|
748
|
+
" to method engine_complete_job" % key
|
|
749
|
+
)
|
|
750
|
+
params[key] = val
|
|
751
|
+
del params['kwargs']
|
|
752
|
+
# verify the required parameter 'job_id' is set
|
|
753
|
+
if ('job_id' not in params or
|
|
754
|
+
params['job_id'] is None):
|
|
755
|
+
raise ValueError("Missing the required parameter `job_id` when calling `engine_complete_job`") # noqa: E501
|
|
756
|
+
# verify the required parameter 'body' is set
|
|
757
|
+
if ('body' not in params or
|
|
758
|
+
params['body'] is None):
|
|
759
|
+
raise ValueError("Missing the required parameter `body` when calling `engine_complete_job`") # noqa: E501
|
|
760
|
+
check_filename_params(params)
|
|
761
|
+
|
|
762
|
+
collection_formats = {}
|
|
763
|
+
|
|
764
|
+
path_params = {}
|
|
765
|
+
if 'job_id' in params:
|
|
766
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
767
|
+
|
|
768
|
+
query_params = []
|
|
769
|
+
if 'job_ticket_id' in params:
|
|
770
|
+
query_params.append(('job_ticket_id', params['job_ticket_id'])) # noqa: E501
|
|
771
|
+
|
|
772
|
+
header_params = {}
|
|
773
|
+
|
|
774
|
+
form_params = []
|
|
775
|
+
local_var_files = {}
|
|
776
|
+
|
|
777
|
+
body_params = None
|
|
778
|
+
if 'body' in params:
|
|
779
|
+
if 'JobComplete'.startswith('union'):
|
|
780
|
+
body_type = type(params['body'])
|
|
781
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
782
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
783
|
+
else:
|
|
784
|
+
body_params = params['body']
|
|
785
|
+
else:
|
|
786
|
+
body_params = flywheel.models.JobComplete.positional_to_model(params['body'])
|
|
787
|
+
# HTTP header `Accept`
|
|
788
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
789
|
+
['application/json']) # noqa: E501
|
|
790
|
+
|
|
791
|
+
# HTTP header `Content-Type`
|
|
792
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
793
|
+
['application/json']) # noqa: E501
|
|
794
|
+
|
|
795
|
+
# Authentication setting
|
|
796
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
797
|
+
|
|
798
|
+
return self.api_client.call_api(
|
|
799
|
+
'/jobs/{job_id}/complete', 'PUT',
|
|
800
|
+
path_params,
|
|
801
|
+
query_params,
|
|
802
|
+
header_params,
|
|
803
|
+
body=body_params,
|
|
804
|
+
post_params=form_params,
|
|
805
|
+
files=local_var_files,
|
|
806
|
+
response_type=None, # noqa: E501
|
|
807
|
+
auth_settings=auth_settings,
|
|
808
|
+
async_=params.get('async_'),
|
|
809
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
810
|
+
_preload_content=params.get('_preload_content', True),
|
|
811
|
+
_request_timeout=params.get('_request_timeout'),
|
|
812
|
+
_request_out=params.get('_request_out'),
|
|
813
|
+
collection_formats=collection_formats)
|
|
814
|
+
|
|
815
|
+
def engine_prepare_complete_job(self, job_id, **kwargs): # noqa: E501
|
|
816
|
+
"""Create a ticket for completing a job, with id and status.
|
|
817
|
+
|
|
818
|
+
This method makes a synchronous HTTP request by default.
|
|
819
|
+
|
|
820
|
+
:param str job_id: (required)
|
|
821
|
+
:param bool async_: Perform the request asynchronously
|
|
822
|
+
:return: JobTicketOutput
|
|
823
|
+
"""
|
|
824
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
825
|
+
kwargs['_return_http_data_only'] = True
|
|
826
|
+
|
|
827
|
+
if kwargs.get('async_'):
|
|
828
|
+
return self.engine_prepare_complete_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
829
|
+
else:
|
|
830
|
+
(data) = self.engine_prepare_complete_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
831
|
+
if (
|
|
832
|
+
data
|
|
833
|
+
and hasattr(data, 'return_value')
|
|
834
|
+
and not ignore_simplified_return_value
|
|
835
|
+
):
|
|
836
|
+
return data.return_value()
|
|
837
|
+
return data
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
def engine_prepare_complete_job_with_http_info(self, job_id, **kwargs): # noqa: E501
|
|
841
|
+
"""Create a ticket for completing a job, with id and status.
|
|
842
|
+
|
|
843
|
+
This method makes a synchronous HTTP request by default.
|
|
844
|
+
|
|
845
|
+
:param str job_id: (required)
|
|
846
|
+
:param bool async_: Perform the request asynchronously
|
|
847
|
+
:return: JobTicketOutput
|
|
848
|
+
"""
|
|
849
|
+
|
|
850
|
+
all_params = ['job_id',] # noqa: E501
|
|
851
|
+
all_params.append('async_')
|
|
852
|
+
all_params.append('_return_http_data_only')
|
|
853
|
+
all_params.append('_preload_content')
|
|
854
|
+
all_params.append('_request_timeout')
|
|
855
|
+
all_params.append('_request_out')
|
|
856
|
+
|
|
857
|
+
params = locals()
|
|
858
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
859
|
+
if key not in all_params:
|
|
860
|
+
raise TypeError(
|
|
861
|
+
"Got an unexpected keyword argument '%s'"
|
|
862
|
+
" to method engine_prepare_complete_job" % key
|
|
863
|
+
)
|
|
864
|
+
params[key] = val
|
|
865
|
+
del params['kwargs']
|
|
866
|
+
# verify the required parameter 'job_id' is set
|
|
867
|
+
if ('job_id' not in params or
|
|
868
|
+
params['job_id'] is None):
|
|
869
|
+
raise ValueError("Missing the required parameter `job_id` when calling `engine_prepare_complete_job`") # noqa: E501
|
|
870
|
+
check_filename_params(params)
|
|
871
|
+
|
|
872
|
+
collection_formats = {}
|
|
873
|
+
|
|
874
|
+
path_params = {}
|
|
875
|
+
if 'job_id' in params:
|
|
876
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
877
|
+
|
|
878
|
+
query_params = []
|
|
879
|
+
|
|
880
|
+
header_params = {}
|
|
881
|
+
|
|
882
|
+
form_params = []
|
|
883
|
+
local_var_files = {}
|
|
884
|
+
|
|
885
|
+
body_params = None
|
|
886
|
+
# HTTP header `Accept`
|
|
887
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
888
|
+
['application/json']) # noqa: E501
|
|
889
|
+
|
|
890
|
+
# Authentication setting
|
|
891
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
892
|
+
|
|
893
|
+
return self.api_client.call_api(
|
|
894
|
+
'/jobs/{job_id}/prepare-complete', 'PUT',
|
|
895
|
+
path_params,
|
|
896
|
+
query_params,
|
|
897
|
+
header_params,
|
|
898
|
+
body=body_params,
|
|
899
|
+
post_params=form_params,
|
|
900
|
+
files=local_var_files,
|
|
901
|
+
response_type='JobTicketOutput', # noqa: E501
|
|
902
|
+
auth_settings=auth_settings,
|
|
903
|
+
async_=params.get('async_'),
|
|
904
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
905
|
+
_preload_content=params.get('_preload_content', True),
|
|
906
|
+
_request_timeout=params.get('_request_timeout'),
|
|
907
|
+
_request_out=params.get('_request_out'),
|
|
908
|
+
collection_formats=collection_formats)
|
|
909
|
+
|
|
910
|
+
def get_all_jobs(self, **kwargs): # noqa: E501
|
|
911
|
+
"""Return all jobs
|
|
912
|
+
|
|
913
|
+
This method makes a synchronous HTTP request by default.
|
|
914
|
+
|
|
915
|
+
:param bool include_parent_info: Include the parent info for the jobs
|
|
916
|
+
:param bool include_all_info: Include all info in returned objects
|
|
917
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
918
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
919
|
+
:param int limit: The maximum number of entries to return.
|
|
920
|
+
:param int skip: The number of entries to skip.
|
|
921
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
922
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
923
|
+
:param list[str] x_accept_feature:
|
|
924
|
+
:param bool async_: Perform the request asynchronously
|
|
925
|
+
:return: union[list[JobListOutput],Page]
|
|
926
|
+
"""
|
|
927
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
928
|
+
kwargs['_return_http_data_only'] = True
|
|
929
|
+
|
|
930
|
+
if kwargs.get('async_'):
|
|
931
|
+
return self.get_all_jobs_with_http_info(**kwargs) # noqa: E501
|
|
932
|
+
else:
|
|
933
|
+
(data) = self.get_all_jobs_with_http_info(**kwargs) # noqa: E501
|
|
934
|
+
if (
|
|
935
|
+
data
|
|
936
|
+
and hasattr(data, 'return_value')
|
|
937
|
+
and not ignore_simplified_return_value
|
|
938
|
+
):
|
|
939
|
+
return data.return_value()
|
|
940
|
+
return data
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
def get_all_jobs_with_http_info(self, **kwargs): # noqa: E501
|
|
944
|
+
"""Return all jobs
|
|
945
|
+
|
|
946
|
+
This method makes a synchronous HTTP request by default.
|
|
947
|
+
|
|
948
|
+
:param bool include_parent_info: Include the parent info for the jobs
|
|
949
|
+
:param bool include_all_info: Include all info in returned objects
|
|
950
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
951
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
952
|
+
:param int limit: The maximum number of entries to return.
|
|
953
|
+
:param int skip: The number of entries to skip.
|
|
954
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
955
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
956
|
+
:param list[str] x_accept_feature:
|
|
957
|
+
:param bool async_: Perform the request asynchronously
|
|
958
|
+
:return: union[list[JobListOutput],Page]
|
|
959
|
+
"""
|
|
960
|
+
|
|
961
|
+
all_params = ['include_parent_info','include_all_info','filter','sort','limit','skip','page','after_id','x_accept_feature',] # noqa: E501
|
|
962
|
+
all_params.append('async_')
|
|
963
|
+
all_params.append('_return_http_data_only')
|
|
964
|
+
all_params.append('_preload_content')
|
|
965
|
+
all_params.append('_request_timeout')
|
|
966
|
+
all_params.append('_request_out')
|
|
967
|
+
|
|
968
|
+
params = locals()
|
|
969
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
970
|
+
if key not in all_params:
|
|
971
|
+
raise TypeError(
|
|
972
|
+
"Got an unexpected keyword argument '%s'"
|
|
973
|
+
" to method get_all_jobs" % key
|
|
974
|
+
)
|
|
975
|
+
params[key] = val
|
|
976
|
+
del params['kwargs']
|
|
977
|
+
check_filename_params(params)
|
|
978
|
+
|
|
979
|
+
collection_formats = {}
|
|
980
|
+
|
|
981
|
+
path_params = {}
|
|
982
|
+
|
|
983
|
+
query_params = []
|
|
984
|
+
if 'include_parent_info' in params:
|
|
985
|
+
query_params.append(('include_parent_info', params['include_parent_info'])) # noqa: E501
|
|
986
|
+
if 'include_all_info' in params:
|
|
987
|
+
query_params.append(('include_all_info', params['include_all_info'])) # noqa: E501
|
|
988
|
+
if 'filter' in params:
|
|
989
|
+
query_params.append(('filter', params['filter'])) # noqa: E501
|
|
990
|
+
if 'sort' in params:
|
|
991
|
+
query_params.append(('sort', params['sort'])) # noqa: E501
|
|
992
|
+
if 'limit' in params:
|
|
993
|
+
query_params.append(('limit', params['limit'])) # noqa: E501
|
|
994
|
+
if 'skip' in params:
|
|
995
|
+
query_params.append(('skip', params['skip'])) # noqa: E501
|
|
996
|
+
if 'page' in params:
|
|
997
|
+
query_params.append(('page', params['page'])) # noqa: E501
|
|
998
|
+
if 'after_id' in params:
|
|
999
|
+
query_params.append(('after_id', params['after_id'])) # noqa: E501
|
|
1000
|
+
|
|
1001
|
+
header_params = {}
|
|
1002
|
+
if 'x_accept_feature' in params:
|
|
1003
|
+
header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
|
|
1004
|
+
collection_formats['x-accept-feature'] = '' # noqa: E501
|
|
1005
|
+
|
|
1006
|
+
form_params = []
|
|
1007
|
+
local_var_files = {}
|
|
1008
|
+
|
|
1009
|
+
body_params = None
|
|
1010
|
+
# HTTP header `Accept`
|
|
1011
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1012
|
+
['application/json']) # noqa: E501
|
|
1013
|
+
|
|
1014
|
+
# Authentication setting
|
|
1015
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1016
|
+
|
|
1017
|
+
return self.api_client.call_api(
|
|
1018
|
+
'/jobs', 'GET',
|
|
1019
|
+
path_params,
|
|
1020
|
+
query_params,
|
|
1021
|
+
header_params,
|
|
1022
|
+
body=body_params,
|
|
1023
|
+
post_params=form_params,
|
|
1024
|
+
files=local_var_files,
|
|
1025
|
+
response_type='union[list[JobListOutput],Page]', # noqa: E501
|
|
1026
|
+
auth_settings=auth_settings,
|
|
1027
|
+
async_=params.get('async_'),
|
|
1028
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1029
|
+
_preload_content=params.get('_preload_content', True),
|
|
1030
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1031
|
+
_request_out=params.get('_request_out'),
|
|
1032
|
+
collection_formats=collection_formats)
|
|
1033
|
+
|
|
1034
|
+
def get_job(self, job_id, **kwargs): # noqa: E501
|
|
1035
|
+
"""Get job details
|
|
1036
|
+
|
|
1037
|
+
This method makes a synchronous HTTP request by default.
|
|
1038
|
+
|
|
1039
|
+
:param str job_id: (required)
|
|
1040
|
+
:param bool async_: Perform the request asynchronously
|
|
1041
|
+
:return: JobOutput
|
|
1042
|
+
"""
|
|
1043
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1044
|
+
kwargs['_return_http_data_only'] = True
|
|
1045
|
+
|
|
1046
|
+
if kwargs.get('async_'):
|
|
1047
|
+
return self.get_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1048
|
+
else:
|
|
1049
|
+
(data) = self.get_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1050
|
+
if (
|
|
1051
|
+
data
|
|
1052
|
+
and hasattr(data, 'return_value')
|
|
1053
|
+
and not ignore_simplified_return_value
|
|
1054
|
+
):
|
|
1055
|
+
return data.return_value()
|
|
1056
|
+
return data
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
def get_job_with_http_info(self, job_id, **kwargs): # noqa: E501
|
|
1060
|
+
"""Get job details
|
|
1061
|
+
|
|
1062
|
+
This method makes a synchronous HTTP request by default.
|
|
1063
|
+
|
|
1064
|
+
:param str job_id: (required)
|
|
1065
|
+
:param bool async_: Perform the request asynchronously
|
|
1066
|
+
:return: JobOutput
|
|
1067
|
+
"""
|
|
1068
|
+
|
|
1069
|
+
all_params = ['job_id',] # noqa: E501
|
|
1070
|
+
all_params.append('async_')
|
|
1071
|
+
all_params.append('_return_http_data_only')
|
|
1072
|
+
all_params.append('_preload_content')
|
|
1073
|
+
all_params.append('_request_timeout')
|
|
1074
|
+
all_params.append('_request_out')
|
|
1075
|
+
|
|
1076
|
+
params = locals()
|
|
1077
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1078
|
+
if key not in all_params:
|
|
1079
|
+
raise TypeError(
|
|
1080
|
+
"Got an unexpected keyword argument '%s'"
|
|
1081
|
+
" to method get_job" % key
|
|
1082
|
+
)
|
|
1083
|
+
params[key] = val
|
|
1084
|
+
del params['kwargs']
|
|
1085
|
+
# verify the required parameter 'job_id' is set
|
|
1086
|
+
if ('job_id' not in params or
|
|
1087
|
+
params['job_id'] is None):
|
|
1088
|
+
raise ValueError("Missing the required parameter `job_id` when calling `get_job`") # noqa: E501
|
|
1089
|
+
check_filename_params(params)
|
|
1090
|
+
|
|
1091
|
+
collection_formats = {}
|
|
1092
|
+
|
|
1093
|
+
path_params = {}
|
|
1094
|
+
if 'job_id' in params:
|
|
1095
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
1096
|
+
|
|
1097
|
+
query_params = []
|
|
1098
|
+
|
|
1099
|
+
header_params = {}
|
|
1100
|
+
|
|
1101
|
+
form_params = []
|
|
1102
|
+
local_var_files = {}
|
|
1103
|
+
|
|
1104
|
+
body_params = None
|
|
1105
|
+
# HTTP header `Accept`
|
|
1106
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1107
|
+
['application/json']) # noqa: E501
|
|
1108
|
+
|
|
1109
|
+
# Authentication setting
|
|
1110
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1111
|
+
|
|
1112
|
+
return self.api_client.call_api(
|
|
1113
|
+
'/jobs/{job_id}', 'GET',
|
|
1114
|
+
path_params,
|
|
1115
|
+
query_params,
|
|
1116
|
+
header_params,
|
|
1117
|
+
body=body_params,
|
|
1118
|
+
post_params=form_params,
|
|
1119
|
+
files=local_var_files,
|
|
1120
|
+
response_type='JobOutput', # noqa: E501
|
|
1121
|
+
auth_settings=auth_settings,
|
|
1122
|
+
async_=params.get('async_'),
|
|
1123
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1124
|
+
_preload_content=params.get('_preload_content', True),
|
|
1125
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1126
|
+
_request_out=params.get('_request_out'),
|
|
1127
|
+
collection_formats=collection_formats)
|
|
1128
|
+
|
|
1129
|
+
def get_job_config(self, job_id, **kwargs): # noqa: E501
|
|
1130
|
+
"""Get a job's config
|
|
1131
|
+
|
|
1132
|
+
This method makes a synchronous HTTP request by default.
|
|
1133
|
+
|
|
1134
|
+
:param str job_id: (required)
|
|
1135
|
+
:param bool async_: Perform the request asynchronously
|
|
1136
|
+
:return: JobOutputConfig
|
|
1137
|
+
"""
|
|
1138
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1139
|
+
kwargs['_return_http_data_only'] = True
|
|
1140
|
+
|
|
1141
|
+
if kwargs.get('async_'):
|
|
1142
|
+
return self.get_job_config_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1143
|
+
else:
|
|
1144
|
+
(data) = self.get_job_config_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1145
|
+
if (
|
|
1146
|
+
data
|
|
1147
|
+
and hasattr(data, 'return_value')
|
|
1148
|
+
and not ignore_simplified_return_value
|
|
1149
|
+
):
|
|
1150
|
+
return data.return_value()
|
|
1151
|
+
return data
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
def get_job_config_with_http_info(self, job_id, **kwargs): # noqa: E501
|
|
1155
|
+
"""Get a job's config
|
|
1156
|
+
|
|
1157
|
+
This method makes a synchronous HTTP request by default.
|
|
1158
|
+
|
|
1159
|
+
:param str job_id: (required)
|
|
1160
|
+
:param bool async_: Perform the request asynchronously
|
|
1161
|
+
:return: JobOutputConfig
|
|
1162
|
+
"""
|
|
1163
|
+
|
|
1164
|
+
all_params = ['job_id',] # noqa: E501
|
|
1165
|
+
all_params.append('async_')
|
|
1166
|
+
all_params.append('_return_http_data_only')
|
|
1167
|
+
all_params.append('_preload_content')
|
|
1168
|
+
all_params.append('_request_timeout')
|
|
1169
|
+
all_params.append('_request_out')
|
|
1170
|
+
|
|
1171
|
+
params = locals()
|
|
1172
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1173
|
+
if key not in all_params:
|
|
1174
|
+
raise TypeError(
|
|
1175
|
+
"Got an unexpected keyword argument '%s'"
|
|
1176
|
+
" to method get_job_config" % key
|
|
1177
|
+
)
|
|
1178
|
+
params[key] = val
|
|
1179
|
+
del params['kwargs']
|
|
1180
|
+
# verify the required parameter 'job_id' is set
|
|
1181
|
+
if ('job_id' not in params or
|
|
1182
|
+
params['job_id'] is None):
|
|
1183
|
+
raise ValueError("Missing the required parameter `job_id` when calling `get_job_config`") # noqa: E501
|
|
1184
|
+
check_filename_params(params)
|
|
1185
|
+
|
|
1186
|
+
collection_formats = {}
|
|
1187
|
+
|
|
1188
|
+
path_params = {}
|
|
1189
|
+
if 'job_id' in params:
|
|
1190
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
1191
|
+
|
|
1192
|
+
query_params = []
|
|
1193
|
+
|
|
1194
|
+
header_params = {}
|
|
1195
|
+
|
|
1196
|
+
form_params = []
|
|
1197
|
+
local_var_files = {}
|
|
1198
|
+
|
|
1199
|
+
body_params = None
|
|
1200
|
+
# HTTP header `Accept`
|
|
1201
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1202
|
+
['application/json']) # noqa: E501
|
|
1203
|
+
|
|
1204
|
+
# Authentication setting
|
|
1205
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1206
|
+
|
|
1207
|
+
return self.api_client.call_api(
|
|
1208
|
+
'/jobs/{job_id}/config.json', 'GET',
|
|
1209
|
+
path_params,
|
|
1210
|
+
query_params,
|
|
1211
|
+
header_params,
|
|
1212
|
+
body=body_params,
|
|
1213
|
+
post_params=form_params,
|
|
1214
|
+
files=local_var_files,
|
|
1215
|
+
response_type='JobOutputConfig', # noqa: E501
|
|
1216
|
+
auth_settings=auth_settings,
|
|
1217
|
+
async_=params.get('async_'),
|
|
1218
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1219
|
+
_preload_content=params.get('_preload_content', True),
|
|
1220
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1221
|
+
_request_out=params.get('_request_out'),
|
|
1222
|
+
collection_formats=collection_formats)
|
|
1223
|
+
|
|
1224
|
+
def get_job_detail(self, job_id, **kwargs): # noqa: E501
|
|
1225
|
+
"""Get job container details
|
|
1226
|
+
|
|
1227
|
+
This method makes a synchronous HTTP request by default.
|
|
1228
|
+
|
|
1229
|
+
:param str job_id: (required)
|
|
1230
|
+
:param bool async_: Perform the request asynchronously
|
|
1231
|
+
:return: JobDetail
|
|
1232
|
+
"""
|
|
1233
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1234
|
+
kwargs['_return_http_data_only'] = True
|
|
1235
|
+
|
|
1236
|
+
if kwargs.get('async_'):
|
|
1237
|
+
return self.get_job_detail_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1238
|
+
else:
|
|
1239
|
+
(data) = self.get_job_detail_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1240
|
+
if (
|
|
1241
|
+
data
|
|
1242
|
+
and hasattr(data, 'return_value')
|
|
1243
|
+
and not ignore_simplified_return_value
|
|
1244
|
+
):
|
|
1245
|
+
return data.return_value()
|
|
1246
|
+
return data
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
def get_job_detail_with_http_info(self, job_id, **kwargs): # noqa: E501
|
|
1250
|
+
"""Get job container details
|
|
1251
|
+
|
|
1252
|
+
This method makes a synchronous HTTP request by default.
|
|
1253
|
+
|
|
1254
|
+
:param str job_id: (required)
|
|
1255
|
+
:param bool async_: Perform the request asynchronously
|
|
1256
|
+
:return: JobDetail
|
|
1257
|
+
"""
|
|
1258
|
+
|
|
1259
|
+
all_params = ['job_id',] # noqa: E501
|
|
1260
|
+
all_params.append('async_')
|
|
1261
|
+
all_params.append('_return_http_data_only')
|
|
1262
|
+
all_params.append('_preload_content')
|
|
1263
|
+
all_params.append('_request_timeout')
|
|
1264
|
+
all_params.append('_request_out')
|
|
1265
|
+
|
|
1266
|
+
params = locals()
|
|
1267
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1268
|
+
if key not in all_params:
|
|
1269
|
+
raise TypeError(
|
|
1270
|
+
"Got an unexpected keyword argument '%s'"
|
|
1271
|
+
" to method get_job_detail" % key
|
|
1272
|
+
)
|
|
1273
|
+
params[key] = val
|
|
1274
|
+
del params['kwargs']
|
|
1275
|
+
# verify the required parameter 'job_id' is set
|
|
1276
|
+
if ('job_id' not in params or
|
|
1277
|
+
params['job_id'] is None):
|
|
1278
|
+
raise ValueError("Missing the required parameter `job_id` when calling `get_job_detail`") # noqa: E501
|
|
1279
|
+
check_filename_params(params)
|
|
1280
|
+
|
|
1281
|
+
collection_formats = {}
|
|
1282
|
+
|
|
1283
|
+
path_params = {}
|
|
1284
|
+
if 'job_id' in params:
|
|
1285
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
1286
|
+
|
|
1287
|
+
query_params = []
|
|
1288
|
+
|
|
1289
|
+
header_params = {}
|
|
1290
|
+
|
|
1291
|
+
form_params = []
|
|
1292
|
+
local_var_files = {}
|
|
1293
|
+
|
|
1294
|
+
body_params = None
|
|
1295
|
+
# HTTP header `Accept`
|
|
1296
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1297
|
+
['application/json']) # noqa: E501
|
|
1298
|
+
|
|
1299
|
+
# Authentication setting
|
|
1300
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1301
|
+
|
|
1302
|
+
return self.api_client.call_api(
|
|
1303
|
+
'/jobs/{job_id}/detail', 'GET',
|
|
1304
|
+
path_params,
|
|
1305
|
+
query_params,
|
|
1306
|
+
header_params,
|
|
1307
|
+
body=body_params,
|
|
1308
|
+
post_params=form_params,
|
|
1309
|
+
files=local_var_files,
|
|
1310
|
+
response_type='JobDetail', # noqa: E501
|
|
1311
|
+
auth_settings=auth_settings,
|
|
1312
|
+
async_=params.get('async_'),
|
|
1313
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1314
|
+
_preload_content=params.get('_preload_content', True),
|
|
1315
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1316
|
+
_request_out=params.get('_request_out'),
|
|
1317
|
+
collection_formats=collection_formats)
|
|
1318
|
+
|
|
1319
|
+
def get_job_logs(self, job_id, **kwargs): # noqa: E501
|
|
1320
|
+
"""Get job logs
|
|
1321
|
+
|
|
1322
|
+
This method makes a synchronous HTTP request by default.
|
|
1323
|
+
|
|
1324
|
+
:param str job_id: (required)
|
|
1325
|
+
:param bool async_: Perform the request asynchronously
|
|
1326
|
+
:return: JobLogRecord
|
|
1327
|
+
"""
|
|
1328
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1329
|
+
kwargs['_return_http_data_only'] = True
|
|
1330
|
+
|
|
1331
|
+
if kwargs.get('async_'):
|
|
1332
|
+
return self.get_job_logs_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1333
|
+
else:
|
|
1334
|
+
(data) = self.get_job_logs_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1335
|
+
if (
|
|
1336
|
+
data
|
|
1337
|
+
and hasattr(data, 'return_value')
|
|
1338
|
+
and not ignore_simplified_return_value
|
|
1339
|
+
):
|
|
1340
|
+
return data.return_value()
|
|
1341
|
+
return data
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
def get_job_logs_with_http_info(self, job_id, **kwargs): # noqa: E501
|
|
1345
|
+
"""Get job logs
|
|
1346
|
+
|
|
1347
|
+
This method makes a synchronous HTTP request by default.
|
|
1348
|
+
|
|
1349
|
+
:param str job_id: (required)
|
|
1350
|
+
:param bool async_: Perform the request asynchronously
|
|
1351
|
+
:return: JobLogRecord
|
|
1352
|
+
"""
|
|
1353
|
+
|
|
1354
|
+
all_params = ['job_id',] # noqa: E501
|
|
1355
|
+
all_params.append('async_')
|
|
1356
|
+
all_params.append('_return_http_data_only')
|
|
1357
|
+
all_params.append('_preload_content')
|
|
1358
|
+
all_params.append('_request_timeout')
|
|
1359
|
+
all_params.append('_request_out')
|
|
1360
|
+
|
|
1361
|
+
params = locals()
|
|
1362
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1363
|
+
if key not in all_params:
|
|
1364
|
+
raise TypeError(
|
|
1365
|
+
"Got an unexpected keyword argument '%s'"
|
|
1366
|
+
" to method get_job_logs" % key
|
|
1367
|
+
)
|
|
1368
|
+
params[key] = val
|
|
1369
|
+
del params['kwargs']
|
|
1370
|
+
# verify the required parameter 'job_id' is set
|
|
1371
|
+
if ('job_id' not in params or
|
|
1372
|
+
params['job_id'] is None):
|
|
1373
|
+
raise ValueError("Missing the required parameter `job_id` when calling `get_job_logs`") # noqa: E501
|
|
1374
|
+
check_filename_params(params)
|
|
1375
|
+
|
|
1376
|
+
collection_formats = {}
|
|
1377
|
+
|
|
1378
|
+
path_params = {}
|
|
1379
|
+
if 'job_id' in params:
|
|
1380
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
1381
|
+
|
|
1382
|
+
query_params = []
|
|
1383
|
+
|
|
1384
|
+
header_params = {}
|
|
1385
|
+
|
|
1386
|
+
form_params = []
|
|
1387
|
+
local_var_files = {}
|
|
1388
|
+
|
|
1389
|
+
body_params = None
|
|
1390
|
+
# HTTP header `Accept`
|
|
1391
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1392
|
+
['application/json']) # noqa: E501
|
|
1393
|
+
|
|
1394
|
+
# Authentication setting
|
|
1395
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1396
|
+
|
|
1397
|
+
return self.api_client.call_api(
|
|
1398
|
+
'/jobs/{job_id}/logs', 'GET',
|
|
1399
|
+
path_params,
|
|
1400
|
+
query_params,
|
|
1401
|
+
header_params,
|
|
1402
|
+
body=body_params,
|
|
1403
|
+
post_params=form_params,
|
|
1404
|
+
files=local_var_files,
|
|
1405
|
+
response_type='JobLogRecord', # noqa: E501
|
|
1406
|
+
auth_settings=auth_settings,
|
|
1407
|
+
async_=params.get('async_'),
|
|
1408
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1409
|
+
_preload_content=params.get('_preload_content', True),
|
|
1410
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1411
|
+
_request_out=params.get('_request_out'),
|
|
1412
|
+
collection_formats=collection_formats)
|
|
1413
|
+
|
|
1414
|
+
def get_jobs_stats(self, **kwargs): # noqa: E501
|
|
1415
|
+
"""Get stats about all current jobs
|
|
1416
|
+
|
|
1417
|
+
This method makes a synchronous HTTP request by default.
|
|
1418
|
+
|
|
1419
|
+
:param bool async_: Perform the request asynchronously
|
|
1420
|
+
:return: object
|
|
1421
|
+
"""
|
|
1422
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1423
|
+
kwargs['_return_http_data_only'] = True
|
|
1424
|
+
|
|
1425
|
+
if kwargs.get('async_'):
|
|
1426
|
+
return self.get_jobs_stats_with_http_info(**kwargs) # noqa: E501
|
|
1427
|
+
else:
|
|
1428
|
+
(data) = self.get_jobs_stats_with_http_info(**kwargs) # noqa: E501
|
|
1429
|
+
if (
|
|
1430
|
+
data
|
|
1431
|
+
and hasattr(data, 'return_value')
|
|
1432
|
+
and not ignore_simplified_return_value
|
|
1433
|
+
):
|
|
1434
|
+
return data.return_value()
|
|
1435
|
+
return data
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
def get_jobs_stats_with_http_info(self, **kwargs): # noqa: E501
|
|
1439
|
+
"""Get stats about all current jobs
|
|
1440
|
+
|
|
1441
|
+
This method makes a synchronous HTTP request by default.
|
|
1442
|
+
|
|
1443
|
+
:param bool async_: Perform the request asynchronously
|
|
1444
|
+
:return: object
|
|
1445
|
+
"""
|
|
1446
|
+
|
|
1447
|
+
all_params = [] # noqa: E501
|
|
1448
|
+
all_params.append('async_')
|
|
1449
|
+
all_params.append('_return_http_data_only')
|
|
1450
|
+
all_params.append('_preload_content')
|
|
1451
|
+
all_params.append('_request_timeout')
|
|
1452
|
+
all_params.append('_request_out')
|
|
1453
|
+
|
|
1454
|
+
params = locals()
|
|
1455
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1456
|
+
if key not in all_params:
|
|
1457
|
+
raise TypeError(
|
|
1458
|
+
"Got an unexpected keyword argument '%s'"
|
|
1459
|
+
" to method get_jobs_stats" % key
|
|
1460
|
+
)
|
|
1461
|
+
params[key] = val
|
|
1462
|
+
del params['kwargs']
|
|
1463
|
+
check_filename_params(params)
|
|
1464
|
+
|
|
1465
|
+
collection_formats = {}
|
|
1466
|
+
|
|
1467
|
+
path_params = {}
|
|
1468
|
+
|
|
1469
|
+
query_params = []
|
|
1470
|
+
|
|
1471
|
+
header_params = {}
|
|
1472
|
+
|
|
1473
|
+
form_params = []
|
|
1474
|
+
local_var_files = {}
|
|
1475
|
+
|
|
1476
|
+
body_params = None
|
|
1477
|
+
# HTTP header `Accept`
|
|
1478
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1479
|
+
['application/json']) # noqa: E501
|
|
1480
|
+
|
|
1481
|
+
# Authentication setting
|
|
1482
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1483
|
+
|
|
1484
|
+
return self.api_client.call_api(
|
|
1485
|
+
'/jobs/stats', 'GET',
|
|
1486
|
+
path_params,
|
|
1487
|
+
query_params,
|
|
1488
|
+
header_params,
|
|
1489
|
+
body=body_params,
|
|
1490
|
+
post_params=form_params,
|
|
1491
|
+
files=local_var_files,
|
|
1492
|
+
response_type='object', # noqa: E501
|
|
1493
|
+
auth_settings=auth_settings,
|
|
1494
|
+
async_=params.get('async_'),
|
|
1495
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1496
|
+
_preload_content=params.get('_preload_content', True),
|
|
1497
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1498
|
+
_request_out=params.get('_request_out'),
|
|
1499
|
+
collection_formats=collection_formats)
|
|
1500
|
+
|
|
1501
|
+
def get_next_job(self, **kwargs): # noqa: E501
|
|
1502
|
+
"""Get the next job in the queue
|
|
1503
|
+
|
|
1504
|
+
Used by the engine.
|
|
1505
|
+
This method makes a synchronous HTTP request by default.
|
|
1506
|
+
|
|
1507
|
+
:param list[str] tags:
|
|
1508
|
+
:param list[str] tags:
|
|
1509
|
+
:param bool async_: Perform the request asynchronously
|
|
1510
|
+
:return: Job
|
|
1511
|
+
"""
|
|
1512
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1513
|
+
kwargs['_return_http_data_only'] = True
|
|
1514
|
+
|
|
1515
|
+
if kwargs.get('async_'):
|
|
1516
|
+
return self.get_next_job_with_http_info(**kwargs) # noqa: E501
|
|
1517
|
+
else:
|
|
1518
|
+
(data) = self.get_next_job_with_http_info(**kwargs) # noqa: E501
|
|
1519
|
+
if (
|
|
1520
|
+
data
|
|
1521
|
+
and hasattr(data, 'return_value')
|
|
1522
|
+
and not ignore_simplified_return_value
|
|
1523
|
+
):
|
|
1524
|
+
return data.return_value()
|
|
1525
|
+
return data
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
def get_next_job_with_http_info(self, **kwargs): # noqa: E501
|
|
1529
|
+
"""Get the next job in the queue
|
|
1530
|
+
|
|
1531
|
+
Used by the engine.
|
|
1532
|
+
This method makes a synchronous HTTP request by default.
|
|
1533
|
+
|
|
1534
|
+
:param list[str] tags:
|
|
1535
|
+
:param list[str] tags:
|
|
1536
|
+
:param bool async_: Perform the request asynchronously
|
|
1537
|
+
:return: Job
|
|
1538
|
+
"""
|
|
1539
|
+
|
|
1540
|
+
all_params = ['tags','tags',] # noqa: E501
|
|
1541
|
+
all_params.append('async_')
|
|
1542
|
+
all_params.append('_return_http_data_only')
|
|
1543
|
+
all_params.append('_preload_content')
|
|
1544
|
+
all_params.append('_request_timeout')
|
|
1545
|
+
all_params.append('_request_out')
|
|
1546
|
+
|
|
1547
|
+
params = locals()
|
|
1548
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1549
|
+
if key not in all_params:
|
|
1550
|
+
raise TypeError(
|
|
1551
|
+
"Got an unexpected keyword argument '%s'"
|
|
1552
|
+
" to method get_next_job" % key
|
|
1553
|
+
)
|
|
1554
|
+
params[key] = val
|
|
1555
|
+
del params['kwargs']
|
|
1556
|
+
check_filename_params(params)
|
|
1557
|
+
|
|
1558
|
+
collection_formats = {}
|
|
1559
|
+
|
|
1560
|
+
path_params = {}
|
|
1561
|
+
|
|
1562
|
+
query_params = []
|
|
1563
|
+
if 'tags' in params:
|
|
1564
|
+
query_params.append(('tags', params['tags'])) # noqa: E501
|
|
1565
|
+
collection_formats['tags'] = 'multi' # noqa: E501
|
|
1566
|
+
if 'tags' in params:
|
|
1567
|
+
query_params.append(('tags', params['tags'])) # noqa: E501
|
|
1568
|
+
collection_formats['tags'] = 'multi' # noqa: E501
|
|
1569
|
+
|
|
1570
|
+
header_params = {}
|
|
1571
|
+
|
|
1572
|
+
form_params = []
|
|
1573
|
+
local_var_files = {}
|
|
1574
|
+
|
|
1575
|
+
body_params = None
|
|
1576
|
+
# HTTP header `Accept`
|
|
1577
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1578
|
+
['application/json']) # noqa: E501
|
|
1579
|
+
|
|
1580
|
+
# Authentication setting
|
|
1581
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1582
|
+
|
|
1583
|
+
return self.api_client.call_api(
|
|
1584
|
+
'/jobs/next', 'GET',
|
|
1585
|
+
path_params,
|
|
1586
|
+
query_params,
|
|
1587
|
+
header_params,
|
|
1588
|
+
body=body_params,
|
|
1589
|
+
post_params=form_params,
|
|
1590
|
+
files=local_var_files,
|
|
1591
|
+
response_type='Job', # noqa: E501
|
|
1592
|
+
auth_settings=auth_settings,
|
|
1593
|
+
async_=params.get('async_'),
|
|
1594
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1595
|
+
_preload_content=params.get('_preload_content', True),
|
|
1596
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1597
|
+
_request_out=params.get('_request_out'),
|
|
1598
|
+
collection_formats=collection_formats)
|
|
1599
|
+
|
|
1600
|
+
def heartbeat_job(self, job_id, **kwargs): # noqa: E501
|
|
1601
|
+
"""Heartbeat a running job to update its modified timestamp.
|
|
1602
|
+
|
|
1603
|
+
Updates the modified timestamp for a running job without changing its state. Used by engines to keep jobs alive.
|
|
1604
|
+
This method makes a synchronous HTTP request by default.
|
|
1605
|
+
|
|
1606
|
+
:param str job_id: (required)
|
|
1607
|
+
:param bool async_: Perform the request asynchronously
|
|
1608
|
+
:return: ModifiedResult
|
|
1609
|
+
"""
|
|
1610
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1611
|
+
kwargs['_return_http_data_only'] = True
|
|
1612
|
+
|
|
1613
|
+
if kwargs.get('async_'):
|
|
1614
|
+
return self.heartbeat_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1615
|
+
else:
|
|
1616
|
+
(data) = self.heartbeat_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1617
|
+
if (
|
|
1618
|
+
data
|
|
1619
|
+
and hasattr(data, 'return_value')
|
|
1620
|
+
and not ignore_simplified_return_value
|
|
1621
|
+
):
|
|
1622
|
+
return data.return_value()
|
|
1623
|
+
return data
|
|
1624
|
+
|
|
1625
|
+
|
|
1626
|
+
def heartbeat_job_with_http_info(self, job_id, **kwargs): # noqa: E501
|
|
1627
|
+
"""Heartbeat a running job to update its modified timestamp.
|
|
1628
|
+
|
|
1629
|
+
Updates the modified timestamp for a running job without changing its state. Used by engines to keep jobs alive.
|
|
1630
|
+
This method makes a synchronous HTTP request by default.
|
|
1631
|
+
|
|
1632
|
+
:param str job_id: (required)
|
|
1633
|
+
:param bool async_: Perform the request asynchronously
|
|
1634
|
+
:return: ModifiedResult
|
|
1635
|
+
"""
|
|
1636
|
+
|
|
1637
|
+
all_params = ['job_id',] # noqa: E501
|
|
1638
|
+
all_params.append('async_')
|
|
1639
|
+
all_params.append('_return_http_data_only')
|
|
1640
|
+
all_params.append('_preload_content')
|
|
1641
|
+
all_params.append('_request_timeout')
|
|
1642
|
+
all_params.append('_request_out')
|
|
1643
|
+
|
|
1644
|
+
params = locals()
|
|
1645
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1646
|
+
if key not in all_params:
|
|
1647
|
+
raise TypeError(
|
|
1648
|
+
"Got an unexpected keyword argument '%s'"
|
|
1649
|
+
" to method heartbeat_job" % key
|
|
1650
|
+
)
|
|
1651
|
+
params[key] = val
|
|
1652
|
+
del params['kwargs']
|
|
1653
|
+
# verify the required parameter 'job_id' is set
|
|
1654
|
+
if ('job_id' not in params or
|
|
1655
|
+
params['job_id'] is None):
|
|
1656
|
+
raise ValueError("Missing the required parameter `job_id` when calling `heartbeat_job`") # noqa: E501
|
|
1657
|
+
check_filename_params(params)
|
|
1658
|
+
|
|
1659
|
+
collection_formats = {}
|
|
1660
|
+
|
|
1661
|
+
path_params = {}
|
|
1662
|
+
if 'job_id' in params:
|
|
1663
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
1664
|
+
|
|
1665
|
+
query_params = []
|
|
1666
|
+
|
|
1667
|
+
header_params = {}
|
|
1668
|
+
|
|
1669
|
+
form_params = []
|
|
1670
|
+
local_var_files = {}
|
|
1671
|
+
|
|
1672
|
+
body_params = None
|
|
1673
|
+
# HTTP header `Accept`
|
|
1674
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1675
|
+
['application/json']) # noqa: E501
|
|
1676
|
+
|
|
1677
|
+
# Authentication setting
|
|
1678
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1679
|
+
|
|
1680
|
+
return self.api_client.call_api(
|
|
1681
|
+
'/jobs/{job_id}/heartbeat', 'PUT',
|
|
1682
|
+
path_params,
|
|
1683
|
+
query_params,
|
|
1684
|
+
header_params,
|
|
1685
|
+
body=body_params,
|
|
1686
|
+
post_params=form_params,
|
|
1687
|
+
files=local_var_files,
|
|
1688
|
+
response_type='ModifiedResult', # noqa: E501
|
|
1689
|
+
auth_settings=auth_settings,
|
|
1690
|
+
async_=params.get('async_'),
|
|
1691
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1692
|
+
_preload_content=params.get('_preload_content', True),
|
|
1693
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1694
|
+
_request_out=params.get('_request_out'),
|
|
1695
|
+
collection_formats=collection_formats)
|
|
1696
|
+
|
|
1697
|
+
def modify_job(self, job_id, body, **kwargs): # noqa: E501
|
|
1698
|
+
"""Update a job.
|
|
1699
|
+
|
|
1700
|
+
Updates timestamp. Enforces a valid state machine transition, if any. Rejects any change to a job that is not currently in 'pending' or 'running' state. Accepts the same body as /api/jobs/add, except all fields are optional.
|
|
1701
|
+
This method makes a synchronous HTTP request by default.
|
|
1702
|
+
|
|
1703
|
+
:param str job_id: (required)
|
|
1704
|
+
:param JobModify body: (required)
|
|
1705
|
+
:param bool async_: Perform the request asynchronously
|
|
1706
|
+
:return: ModifiedResult
|
|
1707
|
+
"""
|
|
1708
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1709
|
+
kwargs['_return_http_data_only'] = True
|
|
1710
|
+
|
|
1711
|
+
if kwargs.get('async_'):
|
|
1712
|
+
return self.modify_job_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
1713
|
+
else:
|
|
1714
|
+
(data) = self.modify_job_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
1715
|
+
if (
|
|
1716
|
+
data
|
|
1717
|
+
and hasattr(data, 'return_value')
|
|
1718
|
+
and not ignore_simplified_return_value
|
|
1719
|
+
):
|
|
1720
|
+
return data.return_value()
|
|
1721
|
+
return data
|
|
1722
|
+
|
|
1723
|
+
|
|
1724
|
+
def modify_job_with_http_info(self, job_id, body, **kwargs): # noqa: E501
|
|
1725
|
+
"""Update a job.
|
|
1726
|
+
|
|
1727
|
+
Updates timestamp. Enforces a valid state machine transition, if any. Rejects any change to a job that is not currently in 'pending' or 'running' state. Accepts the same body as /api/jobs/add, except all fields are optional.
|
|
1728
|
+
This method makes a synchronous HTTP request by default.
|
|
1729
|
+
|
|
1730
|
+
:param str job_id: (required)
|
|
1731
|
+
:param JobModify body: (required)
|
|
1732
|
+
:param bool async_: Perform the request asynchronously
|
|
1733
|
+
:return: ModifiedResult
|
|
1734
|
+
"""
|
|
1735
|
+
|
|
1736
|
+
all_params = ['job_id','body',] # noqa: E501
|
|
1737
|
+
all_params.append('async_')
|
|
1738
|
+
all_params.append('_return_http_data_only')
|
|
1739
|
+
all_params.append('_preload_content')
|
|
1740
|
+
all_params.append('_request_timeout')
|
|
1741
|
+
all_params.append('_request_out')
|
|
1742
|
+
|
|
1743
|
+
params = locals()
|
|
1744
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1745
|
+
if key not in all_params:
|
|
1746
|
+
raise TypeError(
|
|
1747
|
+
"Got an unexpected keyword argument '%s'"
|
|
1748
|
+
" to method modify_job" % key
|
|
1749
|
+
)
|
|
1750
|
+
params[key] = val
|
|
1751
|
+
del params['kwargs']
|
|
1752
|
+
# verify the required parameter 'job_id' is set
|
|
1753
|
+
if ('job_id' not in params or
|
|
1754
|
+
params['job_id'] is None):
|
|
1755
|
+
raise ValueError("Missing the required parameter `job_id` when calling `modify_job`") # noqa: E501
|
|
1756
|
+
# verify the required parameter 'body' is set
|
|
1757
|
+
if ('body' not in params or
|
|
1758
|
+
params['body'] is None):
|
|
1759
|
+
raise ValueError("Missing the required parameter `body` when calling `modify_job`") # noqa: E501
|
|
1760
|
+
check_filename_params(params)
|
|
1761
|
+
|
|
1762
|
+
collection_formats = {}
|
|
1763
|
+
|
|
1764
|
+
path_params = {}
|
|
1765
|
+
if 'job_id' in params:
|
|
1766
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
1767
|
+
|
|
1768
|
+
query_params = []
|
|
1769
|
+
|
|
1770
|
+
header_params = {}
|
|
1771
|
+
|
|
1772
|
+
form_params = []
|
|
1773
|
+
local_var_files = {}
|
|
1774
|
+
|
|
1775
|
+
body_params = None
|
|
1776
|
+
if 'body' in params:
|
|
1777
|
+
if 'JobModify'.startswith('union'):
|
|
1778
|
+
body_type = type(params['body'])
|
|
1779
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
1780
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
1781
|
+
else:
|
|
1782
|
+
body_params = params['body']
|
|
1783
|
+
else:
|
|
1784
|
+
body_params = flywheel.models.JobModify.positional_to_model(params['body'])
|
|
1785
|
+
# HTTP header `Accept`
|
|
1786
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1787
|
+
['application/json']) # noqa: E501
|
|
1788
|
+
|
|
1789
|
+
# HTTP header `Content-Type`
|
|
1790
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
1791
|
+
['application/json']) # noqa: E501
|
|
1792
|
+
|
|
1793
|
+
# Authentication setting
|
|
1794
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1795
|
+
|
|
1796
|
+
return self.api_client.call_api(
|
|
1797
|
+
'/jobs/{job_id}', 'PUT',
|
|
1798
|
+
path_params,
|
|
1799
|
+
query_params,
|
|
1800
|
+
header_params,
|
|
1801
|
+
body=body_params,
|
|
1802
|
+
post_params=form_params,
|
|
1803
|
+
files=local_var_files,
|
|
1804
|
+
response_type='ModifiedResult', # noqa: E501
|
|
1805
|
+
auth_settings=auth_settings,
|
|
1806
|
+
async_=params.get('async_'),
|
|
1807
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1808
|
+
_preload_content=params.get('_preload_content', True),
|
|
1809
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1810
|
+
_request_out=params.get('_request_out'),
|
|
1811
|
+
collection_formats=collection_formats)
|
|
1812
|
+
|
|
1813
|
+
def prepare_complete_job(self, job_id, **kwargs): # noqa: E501
|
|
1814
|
+
"""Create a ticket for completing a job, with id and status.
|
|
1815
|
+
|
|
1816
|
+
This method makes a synchronous HTTP request by default.
|
|
1817
|
+
|
|
1818
|
+
:param str job_id: (required)
|
|
1819
|
+
:param bool async_: Perform the request asynchronously
|
|
1820
|
+
:return: JobTicketOutput
|
|
1821
|
+
"""
|
|
1822
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1823
|
+
kwargs['_return_http_data_only'] = True
|
|
1824
|
+
|
|
1825
|
+
if kwargs.get('async_'):
|
|
1826
|
+
return self.prepare_complete_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1827
|
+
else:
|
|
1828
|
+
(data) = self.prepare_complete_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
1829
|
+
if (
|
|
1830
|
+
data
|
|
1831
|
+
and hasattr(data, 'return_value')
|
|
1832
|
+
and not ignore_simplified_return_value
|
|
1833
|
+
):
|
|
1834
|
+
return data.return_value()
|
|
1835
|
+
return data
|
|
1836
|
+
|
|
1837
|
+
|
|
1838
|
+
def prepare_complete_job_with_http_info(self, job_id, **kwargs): # noqa: E501
|
|
1839
|
+
"""Create a ticket for completing a job, with id and status.
|
|
1840
|
+
|
|
1841
|
+
This method makes a synchronous HTTP request by default.
|
|
1842
|
+
|
|
1843
|
+
:param str job_id: (required)
|
|
1844
|
+
:param bool async_: Perform the request asynchronously
|
|
1845
|
+
:return: JobTicketOutput
|
|
1846
|
+
"""
|
|
1847
|
+
|
|
1848
|
+
all_params = ['job_id',] # noqa: E501
|
|
1849
|
+
all_params.append('async_')
|
|
1850
|
+
all_params.append('_return_http_data_only')
|
|
1851
|
+
all_params.append('_preload_content')
|
|
1852
|
+
all_params.append('_request_timeout')
|
|
1853
|
+
all_params.append('_request_out')
|
|
1854
|
+
|
|
1855
|
+
params = locals()
|
|
1856
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1857
|
+
if key not in all_params:
|
|
1858
|
+
raise TypeError(
|
|
1859
|
+
"Got an unexpected keyword argument '%s'"
|
|
1860
|
+
" to method prepare_complete_job" % key
|
|
1861
|
+
)
|
|
1862
|
+
params[key] = val
|
|
1863
|
+
del params['kwargs']
|
|
1864
|
+
# verify the required parameter 'job_id' is set
|
|
1865
|
+
if ('job_id' not in params or
|
|
1866
|
+
params['job_id'] is None):
|
|
1867
|
+
raise ValueError("Missing the required parameter `job_id` when calling `prepare_complete_job`") # noqa: E501
|
|
1868
|
+
check_filename_params(params)
|
|
1869
|
+
|
|
1870
|
+
collection_formats = {}
|
|
1871
|
+
|
|
1872
|
+
path_params = {}
|
|
1873
|
+
if 'job_id' in params:
|
|
1874
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
1875
|
+
|
|
1876
|
+
query_params = []
|
|
1877
|
+
|
|
1878
|
+
header_params = {}
|
|
1879
|
+
|
|
1880
|
+
form_params = []
|
|
1881
|
+
local_var_files = {}
|
|
1882
|
+
|
|
1883
|
+
body_params = None
|
|
1884
|
+
# HTTP header `Accept`
|
|
1885
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1886
|
+
['application/json']) # noqa: E501
|
|
1887
|
+
|
|
1888
|
+
# Authentication setting
|
|
1889
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1890
|
+
|
|
1891
|
+
return self.api_client.call_api(
|
|
1892
|
+
'/jobs/{job_id}/prepare-complete', 'POST',
|
|
1893
|
+
path_params,
|
|
1894
|
+
query_params,
|
|
1895
|
+
header_params,
|
|
1896
|
+
body=body_params,
|
|
1897
|
+
post_params=form_params,
|
|
1898
|
+
files=local_var_files,
|
|
1899
|
+
response_type='JobTicketOutput', # noqa: E501
|
|
1900
|
+
auth_settings=auth_settings,
|
|
1901
|
+
async_=params.get('async_'),
|
|
1902
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1903
|
+
_preload_content=params.get('_preload_content', True),
|
|
1904
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1905
|
+
_request_out=params.get('_request_out'),
|
|
1906
|
+
collection_formats=collection_formats)
|
|
1907
|
+
|
|
1908
|
+
def reap_jobs(self, **kwargs): # noqa: E501
|
|
1909
|
+
"""Reap stale jobs
|
|
1910
|
+
|
|
1911
|
+
This method makes a synchronous HTTP request by default.
|
|
1912
|
+
|
|
1913
|
+
:param bool async_: Perform the request asynchronously
|
|
1914
|
+
:return: OrphanedCount
|
|
1915
|
+
"""
|
|
1916
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
1917
|
+
kwargs['_return_http_data_only'] = True
|
|
1918
|
+
|
|
1919
|
+
if kwargs.get('async_'):
|
|
1920
|
+
return self.reap_jobs_with_http_info(**kwargs) # noqa: E501
|
|
1921
|
+
else:
|
|
1922
|
+
(data) = self.reap_jobs_with_http_info(**kwargs) # noqa: E501
|
|
1923
|
+
if (
|
|
1924
|
+
data
|
|
1925
|
+
and hasattr(data, 'return_value')
|
|
1926
|
+
and not ignore_simplified_return_value
|
|
1927
|
+
):
|
|
1928
|
+
return data.return_value()
|
|
1929
|
+
return data
|
|
1930
|
+
|
|
1931
|
+
|
|
1932
|
+
def reap_jobs_with_http_info(self, **kwargs): # noqa: E501
|
|
1933
|
+
"""Reap stale jobs
|
|
1934
|
+
|
|
1935
|
+
This method makes a synchronous HTTP request by default.
|
|
1936
|
+
|
|
1937
|
+
:param bool async_: Perform the request asynchronously
|
|
1938
|
+
:return: OrphanedCount
|
|
1939
|
+
"""
|
|
1940
|
+
|
|
1941
|
+
all_params = [] # noqa: E501
|
|
1942
|
+
all_params.append('async_')
|
|
1943
|
+
all_params.append('_return_http_data_only')
|
|
1944
|
+
all_params.append('_preload_content')
|
|
1945
|
+
all_params.append('_request_timeout')
|
|
1946
|
+
all_params.append('_request_out')
|
|
1947
|
+
|
|
1948
|
+
params = locals()
|
|
1949
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1950
|
+
if key not in all_params:
|
|
1951
|
+
raise TypeError(
|
|
1952
|
+
"Got an unexpected keyword argument '%s'"
|
|
1953
|
+
" to method reap_jobs" % key
|
|
1954
|
+
)
|
|
1955
|
+
params[key] = val
|
|
1956
|
+
del params['kwargs']
|
|
1957
|
+
check_filename_params(params)
|
|
1958
|
+
|
|
1959
|
+
collection_formats = {}
|
|
1960
|
+
|
|
1961
|
+
path_params = {}
|
|
1962
|
+
|
|
1963
|
+
query_params = []
|
|
1964
|
+
|
|
1965
|
+
header_params = {}
|
|
1966
|
+
|
|
1967
|
+
form_params = []
|
|
1968
|
+
local_var_files = {}
|
|
1969
|
+
|
|
1970
|
+
body_params = None
|
|
1971
|
+
# HTTP header `Accept`
|
|
1972
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1973
|
+
['application/json']) # noqa: E501
|
|
1974
|
+
|
|
1975
|
+
# Authentication setting
|
|
1976
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
1977
|
+
|
|
1978
|
+
return self.api_client.call_api(
|
|
1979
|
+
'/jobs/reap', 'POST',
|
|
1980
|
+
path_params,
|
|
1981
|
+
query_params,
|
|
1982
|
+
header_params,
|
|
1983
|
+
body=body_params,
|
|
1984
|
+
post_params=form_params,
|
|
1985
|
+
files=local_var_files,
|
|
1986
|
+
response_type='OrphanedCount', # noqa: E501
|
|
1987
|
+
auth_settings=auth_settings,
|
|
1988
|
+
async_=params.get('async_'),
|
|
1989
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1990
|
+
_preload_content=params.get('_preload_content', True),
|
|
1991
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1992
|
+
_request_out=params.get('_request_out'),
|
|
1993
|
+
collection_formats=collection_formats)
|
|
1994
|
+
|
|
1995
|
+
def retry_job(self, job_id, **kwargs): # noqa: E501
|
|
1996
|
+
"""Retry a job.
|
|
1997
|
+
|
|
1998
|
+
The job must have a state of 'failed', and must not have already been retried. The failed jobs config is copied to a new job. The ID of the new job is returned.
|
|
1999
|
+
This method makes a synchronous HTTP request by default.
|
|
2000
|
+
|
|
2001
|
+
:param str job_id: (required)
|
|
2002
|
+
:param str compute_provider_id:
|
|
2003
|
+
:param bool ignore_state:
|
|
2004
|
+
:param bool async_: Perform the request asynchronously
|
|
2005
|
+
:return: InsertedId
|
|
2006
|
+
"""
|
|
2007
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
2008
|
+
kwargs['_return_http_data_only'] = True
|
|
2009
|
+
|
|
2010
|
+
if kwargs.get('async_'):
|
|
2011
|
+
return self.retry_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
2012
|
+
else:
|
|
2013
|
+
(data) = self.retry_job_with_http_info(job_id, **kwargs) # noqa: E501
|
|
2014
|
+
if (
|
|
2015
|
+
data
|
|
2016
|
+
and hasattr(data, 'return_value')
|
|
2017
|
+
and not ignore_simplified_return_value
|
|
2018
|
+
):
|
|
2019
|
+
return data.return_value()
|
|
2020
|
+
return data
|
|
2021
|
+
|
|
2022
|
+
|
|
2023
|
+
def retry_job_with_http_info(self, job_id, **kwargs): # noqa: E501
|
|
2024
|
+
"""Retry a job.
|
|
2025
|
+
|
|
2026
|
+
The job must have a state of 'failed', and must not have already been retried. The failed jobs config is copied to a new job. The ID of the new job is returned.
|
|
2027
|
+
This method makes a synchronous HTTP request by default.
|
|
2028
|
+
|
|
2029
|
+
:param str job_id: (required)
|
|
2030
|
+
:param str compute_provider_id:
|
|
2031
|
+
:param bool ignore_state:
|
|
2032
|
+
:param bool async_: Perform the request asynchronously
|
|
2033
|
+
:return: InsertedId
|
|
2034
|
+
"""
|
|
2035
|
+
|
|
2036
|
+
all_params = ['job_id','compute_provider_id','ignore_state',] # noqa: E501
|
|
2037
|
+
all_params.append('async_')
|
|
2038
|
+
all_params.append('_return_http_data_only')
|
|
2039
|
+
all_params.append('_preload_content')
|
|
2040
|
+
all_params.append('_request_timeout')
|
|
2041
|
+
all_params.append('_request_out')
|
|
2042
|
+
|
|
2043
|
+
params = locals()
|
|
2044
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
2045
|
+
if key not in all_params:
|
|
2046
|
+
raise TypeError(
|
|
2047
|
+
"Got an unexpected keyword argument '%s'"
|
|
2048
|
+
" to method retry_job" % key
|
|
2049
|
+
)
|
|
2050
|
+
params[key] = val
|
|
2051
|
+
del params['kwargs']
|
|
2052
|
+
# verify the required parameter 'job_id' is set
|
|
2053
|
+
if ('job_id' not in params or
|
|
2054
|
+
params['job_id'] is None):
|
|
2055
|
+
raise ValueError("Missing the required parameter `job_id` when calling `retry_job`") # noqa: E501
|
|
2056
|
+
check_filename_params(params)
|
|
2057
|
+
|
|
2058
|
+
collection_formats = {}
|
|
2059
|
+
|
|
2060
|
+
path_params = {}
|
|
2061
|
+
if 'job_id' in params:
|
|
2062
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
2063
|
+
|
|
2064
|
+
query_params = []
|
|
2065
|
+
if 'compute_provider_id' in params:
|
|
2066
|
+
query_params.append(('computeProviderId', params['compute_provider_id'])) # noqa: E501
|
|
2067
|
+
if 'ignore_state' in params:
|
|
2068
|
+
query_params.append(('ignoreState', params['ignore_state'])) # noqa: E501
|
|
2069
|
+
|
|
2070
|
+
header_params = {}
|
|
2071
|
+
|
|
2072
|
+
form_params = []
|
|
2073
|
+
local_var_files = {}
|
|
2074
|
+
|
|
2075
|
+
body_params = None
|
|
2076
|
+
# HTTP header `Accept`
|
|
2077
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
2078
|
+
['application/json']) # noqa: E501
|
|
2079
|
+
|
|
2080
|
+
# Authentication setting
|
|
2081
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
2082
|
+
|
|
2083
|
+
return self.api_client.call_api(
|
|
2084
|
+
'/jobs/{job_id}/retry', 'POST',
|
|
2085
|
+
path_params,
|
|
2086
|
+
query_params,
|
|
2087
|
+
header_params,
|
|
2088
|
+
body=body_params,
|
|
2089
|
+
post_params=form_params,
|
|
2090
|
+
files=local_var_files,
|
|
2091
|
+
response_type='InsertedId', # noqa: E501
|
|
2092
|
+
auth_settings=auth_settings,
|
|
2093
|
+
async_=params.get('async_'),
|
|
2094
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
2095
|
+
_preload_content=params.get('_preload_content', True),
|
|
2096
|
+
_request_timeout=params.get('_request_timeout'),
|
|
2097
|
+
_request_out=params.get('_request_out'),
|
|
2098
|
+
collection_formats=collection_formats)
|
|
2099
|
+
|
|
2100
|
+
def update_job_profile(self, job_id, body, **kwargs): # noqa: E501
|
|
2101
|
+
"""Update profile information on a job. (e.g. machine type, etc)
|
|
2102
|
+
|
|
2103
|
+
Update profile information on a job. (e.g. machine type, etc)
|
|
2104
|
+
This method makes a synchronous HTTP request by default.
|
|
2105
|
+
|
|
2106
|
+
:param str job_id: (required)
|
|
2107
|
+
:param InputJobProfile body: (required)
|
|
2108
|
+
:param bool async_: Perform the request asynchronously
|
|
2109
|
+
:return: ModifiedResult
|
|
2110
|
+
"""
|
|
2111
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
2112
|
+
kwargs['_return_http_data_only'] = True
|
|
2113
|
+
|
|
2114
|
+
if kwargs.get('async_'):
|
|
2115
|
+
return self.update_job_profile_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
2116
|
+
else:
|
|
2117
|
+
(data) = self.update_job_profile_with_http_info(job_id, body, **kwargs) # noqa: E501
|
|
2118
|
+
if (
|
|
2119
|
+
data
|
|
2120
|
+
and hasattr(data, 'return_value')
|
|
2121
|
+
and not ignore_simplified_return_value
|
|
2122
|
+
):
|
|
2123
|
+
return data.return_value()
|
|
2124
|
+
return data
|
|
2125
|
+
|
|
2126
|
+
|
|
2127
|
+
def update_job_profile_with_http_info(self, job_id, body, **kwargs): # noqa: E501
|
|
2128
|
+
"""Update profile information on a job. (e.g. machine type, etc)
|
|
2129
|
+
|
|
2130
|
+
Update profile information on a job. (e.g. machine type, etc)
|
|
2131
|
+
This method makes a synchronous HTTP request by default.
|
|
2132
|
+
|
|
2133
|
+
:param str job_id: (required)
|
|
2134
|
+
:param InputJobProfile body: (required)
|
|
2135
|
+
:param bool async_: Perform the request asynchronously
|
|
2136
|
+
:return: ModifiedResult
|
|
2137
|
+
"""
|
|
2138
|
+
|
|
2139
|
+
all_params = ['job_id','body',] # noqa: E501
|
|
2140
|
+
all_params.append('async_')
|
|
2141
|
+
all_params.append('_return_http_data_only')
|
|
2142
|
+
all_params.append('_preload_content')
|
|
2143
|
+
all_params.append('_request_timeout')
|
|
2144
|
+
all_params.append('_request_out')
|
|
2145
|
+
|
|
2146
|
+
params = locals()
|
|
2147
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
2148
|
+
if key not in all_params:
|
|
2149
|
+
raise TypeError(
|
|
2150
|
+
"Got an unexpected keyword argument '%s'"
|
|
2151
|
+
" to method update_job_profile" % key
|
|
2152
|
+
)
|
|
2153
|
+
params[key] = val
|
|
2154
|
+
del params['kwargs']
|
|
2155
|
+
# verify the required parameter 'job_id' is set
|
|
2156
|
+
if ('job_id' not in params or
|
|
2157
|
+
params['job_id'] is None):
|
|
2158
|
+
raise ValueError("Missing the required parameter `job_id` when calling `update_job_profile`") # noqa: E501
|
|
2159
|
+
# verify the required parameter 'body' is set
|
|
2160
|
+
if ('body' not in params or
|
|
2161
|
+
params['body'] is None):
|
|
2162
|
+
raise ValueError("Missing the required parameter `body` when calling `update_job_profile`") # noqa: E501
|
|
2163
|
+
check_filename_params(params)
|
|
2164
|
+
|
|
2165
|
+
collection_formats = {}
|
|
2166
|
+
|
|
2167
|
+
path_params = {}
|
|
2168
|
+
if 'job_id' in params:
|
|
2169
|
+
path_params['job_id'] = params['job_id'] # noqa: E501
|
|
2170
|
+
|
|
2171
|
+
query_params = []
|
|
2172
|
+
|
|
2173
|
+
header_params = {}
|
|
2174
|
+
|
|
2175
|
+
form_params = []
|
|
2176
|
+
local_var_files = {}
|
|
2177
|
+
|
|
2178
|
+
body_params = None
|
|
2179
|
+
if 'body' in params:
|
|
2180
|
+
if 'InputJobProfile'.startswith('union'):
|
|
2181
|
+
body_type = type(params['body'])
|
|
2182
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
2183
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
2184
|
+
else:
|
|
2185
|
+
body_params = params['body']
|
|
2186
|
+
else:
|
|
2187
|
+
body_params = flywheel.models.InputJobProfile.positional_to_model(params['body'])
|
|
2188
|
+
# HTTP header `Accept`
|
|
2189
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
2190
|
+
['application/json']) # noqa: E501
|
|
2191
|
+
|
|
2192
|
+
# HTTP header `Content-Type`
|
|
2193
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
2194
|
+
['application/json']) # noqa: E501
|
|
2195
|
+
|
|
2196
|
+
# Authentication setting
|
|
2197
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
2198
|
+
|
|
2199
|
+
return self.api_client.call_api(
|
|
2200
|
+
'/jobs/{job_id}/profile', 'PUT',
|
|
2201
|
+
path_params,
|
|
2202
|
+
query_params,
|
|
2203
|
+
header_params,
|
|
2204
|
+
body=body_params,
|
|
2205
|
+
post_params=form_params,
|
|
2206
|
+
files=local_var_files,
|
|
2207
|
+
response_type='ModifiedResult', # noqa: E501
|
|
2208
|
+
auth_settings=auth_settings,
|
|
2209
|
+
async_=params.get('async_'),
|
|
2210
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
2211
|
+
_preload_content=params.get('_preload_content', True),
|
|
2212
|
+
_request_timeout=params.get('_request_timeout'),
|
|
2213
|
+
_request_out=params.get('_request_out'),
|
|
2214
|
+
collection_formats=collection_formats)
|
|
2215
|
+
|
|
2216
|
+
def update_jobs_priority(self, body, **kwargs): # noqa: E501
|
|
2217
|
+
"""Update a job priority.
|
|
2218
|
+
|
|
2219
|
+
This method makes a synchronous HTTP request by default.
|
|
2220
|
+
|
|
2221
|
+
:param JobPriorityUpdate body: (required)
|
|
2222
|
+
:param bool async_: Perform the request asynchronously
|
|
2223
|
+
:return: ModifiedResult
|
|
2224
|
+
"""
|
|
2225
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
2226
|
+
kwargs['_return_http_data_only'] = True
|
|
2227
|
+
|
|
2228
|
+
if kwargs.get('async_'):
|
|
2229
|
+
return self.update_jobs_priority_with_http_info(body, **kwargs) # noqa: E501
|
|
2230
|
+
else:
|
|
2231
|
+
(data) = self.update_jobs_priority_with_http_info(body, **kwargs) # noqa: E501
|
|
2232
|
+
if (
|
|
2233
|
+
data
|
|
2234
|
+
and hasattr(data, 'return_value')
|
|
2235
|
+
and not ignore_simplified_return_value
|
|
2236
|
+
):
|
|
2237
|
+
return data.return_value()
|
|
2238
|
+
return data
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
def update_jobs_priority_with_http_info(self, body, **kwargs): # noqa: E501
|
|
2242
|
+
"""Update a job priority.
|
|
2243
|
+
|
|
2244
|
+
This method makes a synchronous HTTP request by default.
|
|
2245
|
+
|
|
2246
|
+
:param JobPriorityUpdate body: (required)
|
|
2247
|
+
:param bool async_: Perform the request asynchronously
|
|
2248
|
+
:return: ModifiedResult
|
|
2249
|
+
"""
|
|
2250
|
+
|
|
2251
|
+
all_params = ['body',] # noqa: E501
|
|
2252
|
+
all_params.append('async_')
|
|
2253
|
+
all_params.append('_return_http_data_only')
|
|
2254
|
+
all_params.append('_preload_content')
|
|
2255
|
+
all_params.append('_request_timeout')
|
|
2256
|
+
all_params.append('_request_out')
|
|
2257
|
+
|
|
2258
|
+
params = locals()
|
|
2259
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
2260
|
+
if key not in all_params:
|
|
2261
|
+
raise TypeError(
|
|
2262
|
+
"Got an unexpected keyword argument '%s'"
|
|
2263
|
+
" to method update_jobs_priority" % key
|
|
2264
|
+
)
|
|
2265
|
+
params[key] = val
|
|
2266
|
+
del params['kwargs']
|
|
2267
|
+
# verify the required parameter 'body' is set
|
|
2268
|
+
if ('body' not in params or
|
|
2269
|
+
params['body'] is None):
|
|
2270
|
+
raise ValueError("Missing the required parameter `body` when calling `update_jobs_priority`") # noqa: E501
|
|
2271
|
+
check_filename_params(params)
|
|
2272
|
+
|
|
2273
|
+
collection_formats = {}
|
|
2274
|
+
|
|
2275
|
+
path_params = {}
|
|
2276
|
+
|
|
2277
|
+
query_params = []
|
|
2278
|
+
|
|
2279
|
+
header_params = {}
|
|
2280
|
+
|
|
2281
|
+
form_params = []
|
|
2282
|
+
local_var_files = {}
|
|
2283
|
+
|
|
2284
|
+
body_params = None
|
|
2285
|
+
if 'body' in params:
|
|
2286
|
+
if 'JobPriorityUpdate'.startswith('union'):
|
|
2287
|
+
body_type = type(params['body'])
|
|
2288
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
2289
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
2290
|
+
else:
|
|
2291
|
+
body_params = params['body']
|
|
2292
|
+
else:
|
|
2293
|
+
body_params = flywheel.models.JobPriorityUpdate.positional_to_model(params['body'])
|
|
2294
|
+
# HTTP header `Accept`
|
|
2295
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
2296
|
+
['application/json']) # noqa: E501
|
|
2297
|
+
|
|
2298
|
+
# HTTP header `Content-Type`
|
|
2299
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
2300
|
+
['application/json']) # noqa: E501
|
|
2301
|
+
|
|
2302
|
+
# Authentication setting
|
|
2303
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
2304
|
+
|
|
2305
|
+
return self.api_client.call_api(
|
|
2306
|
+
'/jobs/priority', 'PUT',
|
|
2307
|
+
path_params,
|
|
2308
|
+
query_params,
|
|
2309
|
+
header_params,
|
|
2310
|
+
body=body_params,
|
|
2311
|
+
post_params=form_params,
|
|
2312
|
+
files=local_var_files,
|
|
2313
|
+
response_type='ModifiedResult', # noqa: E501
|
|
2314
|
+
auth_settings=auth_settings,
|
|
2315
|
+
async_=params.get('async_'),
|
|
2316
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
2317
|
+
_preload_content=params.get('_preload_content', True),
|
|
2318
|
+
_request_timeout=params.get('_request_timeout'),
|
|
2319
|
+
_request_out=params.get('_request_out'),
|
|
2320
|
+
collection_formats=collection_formats)
|