pulpcore_client 3.69.2 → 3.70.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -17
- data/docs/AccessPoliciesApi.md +169 -84
- data/docs/AccessPolicy.md +14 -13
- data/docs/AccessPolicyResponse.md +26 -25
- data/docs/ApiAppStatusResponse.md +12 -11
- data/docs/ArtifactDistributionResponse.md +28 -27
- data/docs/ArtifactResponse.md +30 -29
- data/docs/ArtifactsApi.md +145 -78
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/CompositeContentGuard.md +12 -11
- data/docs/CompositeContentGuardResponse.md +20 -19
- data/docs/ContentApi.md +52 -36
- data/docs/ContentAppStatusResponse.md +12 -11
- data/docs/ContentGuardResponse.md +18 -17
- data/docs/ContentOpenpgpPublickeyApi.md +111 -61
- data/docs/ContentOpenpgpPublicsubkeyApi.md +80 -47
- data/docs/ContentOpenpgpSignatureApi.md +80 -47
- data/docs/ContentOpenpgpUserattributeApi.md +80 -47
- data/docs/ContentOpenpgpUseridApi.md +89 -56
- data/docs/ContentRedirectContentGuard.md +10 -9
- data/docs/ContentRedirectContentGuardResponse.md +18 -17
- data/docs/ContentSettingsResponse.md +10 -9
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/ContentguardsApi.md +57 -41
- data/docs/ContentguardsCompositeApi.md +315 -146
- data/docs/ContentguardsContentRedirectApi.md +315 -146
- data/docs/ContentguardsHeaderApi.md +315 -146
- data/docs/ContentguardsRbacApi.md +315 -146
- data/docs/DatabaseConnectionResponse.md +8 -7
- data/docs/DistributionResponse.md +30 -29
- data/docs/DistributionsApi.md +68 -52
- data/docs/DistributionsArtifactsApi.md +95 -62
- data/docs/DistributionsOpenpgpApi.md +248 -113
- data/docs/Domain.md +18 -17
- data/docs/DomainBackendMigrator.md +10 -9
- data/docs/DomainResponse.md +26 -25
- data/docs/DomainsApi.md +224 -106
- data/docs/EvaluationResponse.md +12 -11
- data/docs/ExportersFilesystemApi.md +196 -95
- data/docs/ExportersFilesystemExportsApi.md +120 -53
- data/docs/ExportersPulpApi.md +196 -95
- data/docs/ExportersPulpExportsApi.md +120 -53
- data/docs/FilesystemExport.md +14 -13
- data/docs/FilesystemExportResponse.md +20 -19
- data/docs/FilesystemExporter.md +12 -11
- data/docs/FilesystemExporterResponse.md +20 -19
- data/docs/GenericRemoteResponse.md +58 -0
- data/docs/GenericRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/Group.md +8 -7
- data/docs/GroupProgressReportResponse.md +16 -15
- data/docs/GroupResponse.md +14 -13
- data/docs/GroupRole.md +12 -11
- data/docs/GroupRoleResponse.md +24 -23
- data/docs/GroupUser.md +8 -7
- data/docs/GroupUserResponse.md +12 -11
- data/docs/GroupsApi.md +314 -145
- data/docs/GroupsRolesApi.md +139 -72
- data/docs/GroupsUsersApi.md +90 -40
- data/docs/HeaderContentGuard.md +16 -15
- data/docs/HeaderContentGuardResponse.md +24 -23
- data/docs/ImportResponse.md +18 -17
- data/docs/ImportersPulpApi.md +195 -94
- data/docs/ImportersPulpImportCheckApi.md +29 -13
- data/docs/ImportersPulpImportsApi.md +120 -53
- data/docs/LivezApi.md +25 -8
- data/docs/LoginApi.md +204 -0
- data/docs/LoginResponse.md +22 -0
- data/docs/MethodEnum.md +4 -5
- data/docs/MinimalTaskResponse.md +26 -25
- data/docs/MultipleArtifactContentResponse.md +16 -15
- data/docs/MyPermissionsResponse.md +8 -7
- data/docs/NestedOpenPGPPublicSubkey.md +10 -9
- data/docs/NestedOpenPGPPublicSubkeyResponse.md +12 -11
- data/docs/NestedOpenPGPSignature.md +18 -17
- data/docs/NestedOpenPGPSignatureResponse.md +20 -19
- data/docs/NestedOpenPGPUserAttribute.md +8 -7
- data/docs/NestedOpenPGPUserAttributeResponse.md +10 -9
- data/docs/NestedOpenPGPUserID.md +8 -7
- data/docs/NestedOpenPGPUserIDResponse.md +10 -9
- data/docs/NestedRole.md +12 -11
- data/docs/NestedRoleResponse.md +12 -11
- data/docs/ObjectRolesResponse.md +8 -7
- data/docs/OpenPGPDistribution.md +20 -19
- data/docs/OpenPGPDistributionResponse.md +32 -31
- data/docs/OpenPGPKeyring.md +16 -15
- data/docs/OpenPGPKeyringResponse.md +28 -27
- data/docs/OpenPGPPublicKeyResponse.md +24 -23
- data/docs/OpenPGPPublicSubkeyResponse.md +22 -21
- data/docs/OpenPGPSignatureResponse.md +30 -29
- data/docs/OpenPGPUserAttributeResponse.md +20 -19
- data/docs/OpenPGPUserIDResponse.md +20 -19
- data/docs/OrphansApi.md +26 -9
- data/docs/OrphansCleanup.md +10 -9
- data/docs/OrphansCleanupApi.md +29 -12
- data/docs/PaginatedAccessPolicyResponseList.md +14 -13
- data/docs/PaginatedArtifactDistributionResponseList.md +14 -13
- data/docs/PaginatedArtifactResponseList.md +14 -13
- data/docs/PaginatedCompositeContentGuardResponseList.md +14 -13
- data/docs/PaginatedContentGuardResponseList.md +14 -13
- data/docs/PaginatedContentRedirectContentGuardResponseList.md +14 -13
- data/docs/PaginatedDistributionResponseList.md +14 -13
- data/docs/PaginatedDomainResponseList.md +14 -13
- data/docs/PaginatedFilesystemExportResponseList.md +14 -13
- data/docs/PaginatedFilesystemExporterResponseList.md +14 -13
- data/docs/PaginatedGenericRemoteResponseList.md +24 -0
- data/docs/PaginatedGroupResponseList.md +14 -13
- data/docs/PaginatedGroupRoleResponseList.md +14 -13
- data/docs/PaginatedGroupUserResponseList.md +14 -13
- data/docs/PaginatedHeaderContentGuardResponseList.md +14 -13
- data/docs/PaginatedImportResponseList.md +14 -13
- data/docs/PaginatedMultipleArtifactContentResponseList.md +14 -13
- data/docs/PaginatedOpenPGPDistributionResponseList.md +14 -13
- data/docs/PaginatedOpenPGPKeyringResponseList.md +14 -13
- data/docs/PaginatedOpenPGPPublicKeyResponseList.md +14 -13
- data/docs/PaginatedOpenPGPPublicSubkeyResponseList.md +14 -13
- data/docs/PaginatedOpenPGPSignatureResponseList.md +14 -13
- data/docs/PaginatedOpenPGPUserAttributeResponseList.md +14 -13
- data/docs/PaginatedOpenPGPUserIDResponseList.md +14 -13
- data/docs/PaginatedPublicationResponseList.md +14 -13
- data/docs/PaginatedPulpExportResponseList.md +14 -13
- data/docs/PaginatedPulpExporterResponseList.md +14 -13
- data/docs/PaginatedPulpImporterResponseList.md +14 -13
- data/docs/PaginatedRBACContentGuardResponseList.md +14 -13
- data/docs/PaginatedRepositoryResponseList.md +14 -13
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedRoleResponseList.md +14 -13
- data/docs/PaginatedSigningServiceResponseList.md +14 -13
- data/docs/PaginatedTaskGroupResponseList.md +14 -13
- data/docs/PaginatedTaskResponseList.md +14 -13
- data/docs/PaginatedTaskScheduleResponseList.md +14 -13
- data/docs/PaginatedUploadResponseList.md +14 -13
- data/docs/PaginatedUpstreamPulpResponseList.md +14 -13
- data/docs/PaginatedUserResponseList.md +14 -13
- data/docs/PaginatedUserRoleResponseList.md +14 -13
- data/docs/PaginatedWorkerResponseList.md +14 -13
- data/docs/PatchedAccessPolicy.md +14 -13
- data/docs/PatchedCompositeContentGuard.md +12 -11
- data/docs/PatchedContentRedirectContentGuard.md +10 -9
- data/docs/PatchedDomain.md +18 -17
- data/docs/PatchedFilesystemExporter.md +12 -11
- data/docs/PatchedGroup.md +8 -7
- data/docs/PatchedHeaderContentGuard.md +16 -15
- data/docs/PatchedOpenPGPDistribution.md +20 -19
- data/docs/PatchedOpenPGPKeyring.md +16 -15
- data/docs/PatchedPulpExporter.md +14 -13
- data/docs/PatchedPulpImporter.md +10 -9
- data/docs/PatchedRBACContentGuard.md +10 -9
- data/docs/PatchedRole.md +12 -11
- data/docs/PatchedTaskCancel.md +8 -7
- data/docs/PatchedUpstreamPulp.md +28 -27
- data/docs/PatchedUser.md +20 -19
- data/docs/PolicyEnum.md +4 -5
- data/docs/ProfileArtifactResponse.md +8 -7
- data/docs/ProgressReportResponse.md +18 -17
- data/docs/PublicationResponse.md +18 -17
- data/docs/PublicationsApi.md +67 -49
- data/docs/PulpExport.md +18 -17
- data/docs/PulpExportResponse.md +24 -23
- data/docs/PulpExporter.md +14 -13
- data/docs/PulpExporterResponse.md +22 -21
- data/docs/PulpImport.md +12 -11
- data/docs/PulpImportCheck.md +12 -11
- data/docs/PulpImportCheckResponse.md +12 -11
- data/docs/PulpImporter.md +10 -9
- data/docs/PulpImporterResponse.md +18 -17
- data/docs/Purge.md +10 -9
- data/docs/RBACContentGuard.md +10 -9
- data/docs/RBACContentGuardResponse.md +22 -21
- data/docs/ReclaimSpace.md +10 -9
- data/docs/RedisConnectionResponse.md +8 -7
- data/docs/RemotesApi.md +73 -55
- data/docs/Repair.md +8 -7
- data/docs/RepairApi.md +29 -13
- data/docs/RepositoriesApi.md +71 -55
- data/docs/RepositoriesOpenpgpKeyringApi.md +416 -196
- data/docs/RepositoriesReclaimSpaceApi.md +30 -13
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositoryResponse.md +28 -27
- data/docs/RepositoryVersionResponse.md +22 -21
- data/docs/RepositoryVersionsApi.md +65 -47
- data/docs/Role.md +12 -11
- data/docs/RoleResponse.md +22 -21
- data/docs/RolesApi.md +203 -102
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/SigningServiceResponse.md +22 -21
- data/docs/SigningServicesApi.md +75 -42
- data/docs/StatesEnum.md +4 -5
- data/docs/StatusApi.md +26 -9
- data/docs/StatusResponse.md +24 -23
- data/docs/StorageClassEnum.md +4 -5
- data/docs/StorageResponse.md +12 -11
- data/docs/TaskGroupOperationResponse.md +8 -7
- data/docs/TaskGroupResponse.md +32 -31
- data/docs/TaskGroupsApi.md +93 -43
- data/docs/TaskResponse.md +44 -43
- data/docs/TaskScheduleResponse.md +24 -23
- data/docs/TaskSchedulesApi.md +198 -97
- data/docs/TasksApi.md +382 -195
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/docs/Upload.md +8 -7
- data/docs/UploadChunkResponse.md +10 -9
- data/docs/UploadCommit.md +8 -7
- data/docs/UploadDetailResponse.md +20 -19
- data/docs/UploadResponse.md +18 -17
- data/docs/UploadsApi.md +313 -144
- data/docs/UpstreamPulp.md +28 -27
- data/docs/UpstreamPulpResponse.md +34 -33
- data/docs/UpstreamPulpsApi.md +366 -178
- data/docs/User.md +20 -19
- data/docs/UserGroup.md +8 -7
- data/docs/UserGroupResponse.md +12 -11
- data/docs/UserResponse.md +30 -29
- data/docs/UserRole.md +12 -11
- data/docs/UserRoleResponse.md +24 -23
- data/docs/UsersApi.md +211 -110
- data/docs/UsersRolesApi.md +139 -72
- data/docs/VersionResponse.md +16 -15
- data/docs/WorkerResponse.md +22 -21
- data/docs/WorkersApi.md +100 -65
- data/lib/pulpcore_client/api/access_policies_api.rb +34 -23
- data/lib/pulpcore_client/api/artifacts_api.rb +24 -17
- data/lib/pulpcore_client/api/content_api.rb +6 -5
- data/lib/pulpcore_client/api/content_openpgp_publickey_api.rb +20 -14
- data/lib/pulpcore_client/api/content_openpgp_publicsubkey_api.rb +11 -9
- data/lib/pulpcore_client/api/content_openpgp_signature_api.rb +11 -9
- data/lib/pulpcore_client/api/content_openpgp_userattribute_api.rb +11 -9
- data/lib/pulpcore_client/api/content_openpgp_userid_api.rb +11 -9
- data/lib/pulpcore_client/api/contentguards_api.rb +6 -5
- data/lib/pulpcore_client/api/contentguards_composite_api.rb +70 -45
- data/lib/pulpcore_client/api/contentguards_content_redirect_api.rb +70 -45
- data/lib/pulpcore_client/api/contentguards_header_api.rb +70 -45
- data/lib/pulpcore_client/api/contentguards_rbac_api.rb +70 -45
- data/lib/pulpcore_client/api/distributions_api.rb +6 -5
- data/lib/pulpcore_client/api/distributions_artifacts_api.rb +11 -9
- data/lib/pulpcore_client/api/distributions_openpgp_api.rb +61 -38
- data/lib/pulpcore_client/api/domains_api.rb +52 -33
- data/lib/pulpcore_client/api/exporters_filesystem_api.rb +43 -28
- data/lib/pulpcore_client/api/exporters_filesystem_exports_api.rb +24 -17
- data/lib/pulpcore_client/api/exporters_pulp_api.rb +43 -28
- data/lib/pulpcore_client/api/exporters_pulp_exports_api.rb +24 -17
- data/lib/pulpcore_client/api/groups_api.rb +70 -45
- data/lib/pulpcore_client/api/groups_roles_api.rb +24 -17
- data/lib/pulpcore_client/api/groups_users_api.rb +19 -13
- data/lib/pulpcore_client/api/importers_pulp_api.rb +42 -27
- data/lib/pulpcore_client/api/importers_pulp_import_check_api.rb +10 -6
- data/lib/pulpcore_client/api/importers_pulp_imports_api.rb +24 -17
- data/lib/pulpcore_client/api/livez_api.rb +5 -4
- data/lib/pulpcore_client/api/login_api.rb +179 -0
- data/lib/pulpcore_client/api/orphans_api.rb +6 -5
- data/lib/pulpcore_client/api/orphans_cleanup_api.rb +10 -6
- data/lib/pulpcore_client/api/publications_api.rb +21 -17
- data/lib/pulpcore_client/api/remotes_api.rb +23 -19
- data/lib/pulpcore_client/api/repair_api.rb +10 -6
- data/lib/pulpcore_client/api/repositories_api.rb +6 -5
- data/lib/pulpcore_client/api/repositories_openpgp_keyring_api.rb +98 -61
- data/lib/pulpcore_client/api/repositories_reclaim_space_api.rb +10 -6
- data/lib/pulpcore_client/api/repository_versions_api.rb +21 -17
- data/lib/pulpcore_client/api/roles_api.rb +42 -27
- data/lib/pulpcore_client/api/signing_services_api.rb +11 -9
- data/lib/pulpcore_client/api/status_api.rb +6 -5
- data/lib/pulpcore_client/api/task_groups_api.rb +20 -14
- data/lib/pulpcore_client/api/task_schedules_api.rb +39 -27
- data/lib/pulpcore_client/api/tasks_api.rb +117 -68
- data/lib/pulpcore_client/api/uploads_api.rb +70 -45
- data/lib/pulpcore_client/api/upstream_pulps_api.rb +93 -64
- data/lib/pulpcore_client/api/users_api.rb +42 -27
- data/lib/pulpcore_client/api/users_roles_api.rb +24 -17
- data/lib/pulpcore_client/api/workers_api.rb +26 -21
- data/lib/pulpcore_client/api_client.rb +137 -102
- data/lib/pulpcore_client/api_error.rb +2 -1
- data/lib/pulpcore_client/configuration.rb +162 -21
- data/lib/pulpcore_client/models/access_policy.rb +32 -22
- data/lib/pulpcore_client/models/access_policy_response.rb +34 -24
- data/lib/pulpcore_client/models/api_app_status_response.rb +31 -23
- data/lib/pulpcore_client/models/artifact_distribution_response.rb +91 -79
- data/lib/pulpcore_client/models/artifact_response.rb +34 -24
- data/lib/pulpcore_client/models/async_operation_response.rb +32 -22
- data/lib/pulpcore_client/models/composite_content_guard.rb +32 -22
- data/lib/pulpcore_client/models/composite_content_guard_response.rb +34 -24
- data/lib/pulpcore_client/models/content_app_status_response.rb +31 -23
- data/lib/pulpcore_client/models/content_guard_response.rb +34 -24
- data/lib/pulpcore_client/models/content_redirect_content_guard.rb +32 -22
- data/lib/pulpcore_client/models/content_redirect_content_guard_response.rb +34 -24
- data/lib/pulpcore_client/models/content_settings_response.rb +33 -27
- data/lib/pulpcore_client/models/content_summary_response.rb +36 -22
- data/lib/pulpcore_client/models/database_connection_response.rb +32 -22
- data/lib/pulpcore_client/models/distribution_response.rb +36 -24
- data/lib/pulpcore_client/models/domain.rb +58 -22
- data/lib/pulpcore_client/models/domain_backend_migrator.rb +56 -22
- data/lib/pulpcore_client/models/domain_response.rb +60 -24
- data/lib/pulpcore_client/models/evaluation_response.rb +36 -22
- data/lib/pulpcore_client/models/filesystem_export.rb +30 -22
- data/lib/pulpcore_client/models/filesystem_export_response.rb +32 -24
- data/lib/pulpcore_client/models/filesystem_exporter.rb +56 -22
- data/lib/pulpcore_client/models/filesystem_exporter_response.rb +58 -24
- data/lib/pulpcore_client/models/{remote_response.rb → generic_remote_response.rb} +63 -29
- data/lib/pulpcore_client/models/{remote_response_hidden_fields.rb → generic_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulpcore_client/models/group.rb +32 -22
- data/lib/pulpcore_client/models/group_progress_report_response.rb +30 -22
- data/lib/pulpcore_client/models/group_response.rb +32 -22
- data/lib/pulpcore_client/models/group_role.rb +35 -23
- data/lib/pulpcore_client/models/group_role_response.rb +36 -24
- data/lib/pulpcore_client/models/group_user.rb +32 -22
- data/lib/pulpcore_client/models/group_user_response.rb +32 -22
- data/lib/pulpcore_client/models/header_content_guard.rb +36 -22
- data/lib/pulpcore_client/models/header_content_guard_response.rb +38 -24
- data/lib/pulpcore_client/models/import_response.rb +36 -24
- data/lib/pulpcore_client/models/{upload_chunk.rb → login_response.rb} +55 -62
- data/lib/pulpcore_client/models/method_enum.rb +8 -4
- data/lib/pulpcore_client/models/minimal_task_response.rb +37 -27
- data/lib/pulpcore_client/models/multiple_artifact_content_response.rb +34 -24
- data/lib/pulpcore_client/models/my_permissions_response.rb +32 -22
- data/lib/pulpcore_client/models/nested_open_pgp_public_subkey.rb +35 -23
- data/lib/pulpcore_client/models/nested_open_pgp_public_subkey_response.rb +35 -23
- data/lib/pulpcore_client/models/nested_open_pgp_signature.rb +35 -23
- data/lib/pulpcore_client/models/nested_open_pgp_signature_response.rb +35 -23
- data/lib/pulpcore_client/models/nested_open_pgp_user_attribute.rb +32 -22
- data/lib/pulpcore_client/models/nested_open_pgp_user_attribute_response.rb +32 -22
- data/lib/pulpcore_client/models/nested_open_pgp_user_id.rb +32 -22
- data/lib/pulpcore_client/models/nested_open_pgp_user_id_response.rb +32 -22
- data/lib/pulpcore_client/models/nested_role.rb +32 -22
- data/lib/pulpcore_client/models/nested_role_response.rb +32 -22
- data/lib/pulpcore_client/models/object_roles_response.rb +32 -22
- data/lib/pulpcore_client/models/open_pgp_distribution.rb +34 -22
- data/lib/pulpcore_client/models/open_pgp_distribution_response.rb +36 -24
- data/lib/pulpcore_client/models/open_pgp_keyring.rb +32 -22
- data/lib/pulpcore_client/models/open_pgp_keyring_response.rb +34 -24
- data/lib/pulpcore_client/models/open_pgp_public_key_response.rb +38 -26
- data/lib/pulpcore_client/models/open_pgp_public_subkey_response.rb +37 -25
- data/lib/pulpcore_client/models/open_pgp_signature_response.rb +37 -25
- data/lib/pulpcore_client/models/open_pgp_user_attribute_response.rb +34 -24
- data/lib/pulpcore_client/models/open_pgp_user_id_response.rb +34 -24
- data/lib/pulpcore_client/models/orphans_cleanup.rb +31 -23
- data/lib/pulpcore_client/models/paginated_access_policy_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_artifact_distribution_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_artifact_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_composite_content_guard_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_content_guard_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_content_redirect_content_guard_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_distribution_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_domain_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_filesystem_export_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_filesystem_exporter_response_list.rb +34 -22
- data/lib/pulpcore_client/models/{paginated_remote_response_list.rb → paginated_generic_remote_response_list.rb} +38 -26
- data/lib/pulpcore_client/models/paginated_group_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_group_role_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_group_user_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_header_content_guard_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_import_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_multiple_artifact_content_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_open_pgp_distribution_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_open_pgp_keyring_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_open_pgp_public_key_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_open_pgp_public_subkey_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_open_pgp_signature_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_open_pgp_user_attribute_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_open_pgp_user_id_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_publication_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_pulp_export_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_pulp_exporter_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_pulp_importer_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_rbac_content_guard_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_repository_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_role_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_signing_service_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_task_group_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_task_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_task_schedule_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_upload_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_upstream_pulp_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_user_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_user_role_response_list.rb +34 -22
- data/lib/pulpcore_client/models/paginated_worker_response_list.rb +34 -22
- data/lib/pulpcore_client/models/patched_access_policy.rb +30 -22
- data/lib/pulpcore_client/models/patched_composite_content_guard.rb +35 -23
- data/lib/pulpcore_client/models/patched_content_redirect_content_guard.rb +35 -23
- data/lib/pulpcore_client/models/patched_domain.rb +59 -25
- data/lib/pulpcore_client/models/patched_filesystem_exporter.rb +62 -24
- data/lib/pulpcore_client/models/patched_group.rb +36 -24
- data/lib/pulpcore_client/models/patched_header_content_guard.rb +45 -25
- data/lib/pulpcore_client/models/patched_open_pgp_distribution.rb +40 -24
- data/lib/pulpcore_client/models/patched_open_pgp_keyring.rb +35 -23
- data/lib/pulpcore_client/models/patched_pulp_exporter.rb +40 -24
- data/lib/pulpcore_client/models/patched_pulp_importer.rb +35 -23
- data/lib/pulpcore_client/models/patched_rbac_content_guard.rb +35 -23
- data/lib/pulpcore_client/models/patched_role.rb +35 -23
- data/lib/pulpcore_client/models/patched_task_cancel.rb +35 -23
- data/lib/pulpcore_client/models/patched_upstream_pulp.rb +45 -25
- data/lib/pulpcore_client/models/patched_user.rb +46 -26
- data/lib/pulpcore_client/models/policy_enum.rb +10 -5
- data/lib/pulpcore_client/models/profile_artifact_response.rb +32 -22
- data/lib/pulpcore_client/models/progress_report_response.rb +30 -22
- data/lib/pulpcore_client/models/publication_response.rb +32 -24
- data/lib/pulpcore_client/models/pulp_export.rb +35 -23
- data/lib/pulpcore_client/models/pulp_export_response.rb +32 -24
- data/lib/pulpcore_client/models/pulp_exporter.rb +36 -22
- data/lib/pulpcore_client/models/pulp_exporter_response.rb +38 -24
- data/lib/pulpcore_client/models/pulp_import.rb +40 -24
- data/lib/pulpcore_client/models/pulp_import_check.rb +45 -25
- data/lib/pulpcore_client/models/pulp_import_check_response.rb +30 -22
- data/lib/pulpcore_client/models/pulp_importer.rb +32 -22
- data/lib/pulpcore_client/models/pulp_importer_response.rb +34 -24
- data/lib/pulpcore_client/models/purge.rb +31 -23
- data/lib/pulpcore_client/models/rbac_content_guard.rb +32 -22
- data/lib/pulpcore_client/models/rbac_content_guard_response.rb +34 -24
- data/lib/pulpcore_client/models/reclaim_space.rb +33 -23
- data/lib/pulpcore_client/models/redis_connection_response.rb +32 -22
- data/lib/pulpcore_client/models/repair.rb +30 -22
- data/lib/pulpcore_client/models/repository_add_remove_content.rb +30 -22
- data/lib/pulpcore_client/models/repository_response.rb +34 -24
- data/lib/pulpcore_client/models/repository_version_response.rb +32 -24
- data/lib/pulpcore_client/models/role.rb +34 -22
- data/lib/pulpcore_client/models/role_response.rb +36 -24
- data/lib/pulpcore_client/models/set_label.rb +34 -22
- data/lib/pulpcore_client/models/set_label_response.rb +34 -22
- data/lib/pulpcore_client/models/signing_service_response.rb +40 -24
- data/lib/pulpcore_client/models/states_enum.rb +8 -4
- data/lib/pulpcore_client/models/status_response.rb +44 -22
- data/lib/pulpcore_client/models/storage_class_enum.rb +8 -4
- data/lib/pulpcore_client/models/storage_response.rb +39 -25
- data/lib/pulpcore_client/models/task_group_operation_response.rb +32 -22
- data/lib/pulpcore_client/models/task_group_response.rb +34 -22
- data/lib/pulpcore_client/models/task_response.rb +39 -27
- data/lib/pulpcore_client/models/task_schedule_response.rb +39 -25
- data/lib/pulpcore_client/models/unset_label.rb +32 -22
- data/lib/pulpcore_client/models/unset_label_response.rb +32 -22
- data/lib/pulpcore_client/models/upload.rb +32 -22
- data/lib/pulpcore_client/models/upload_chunk_response.rb +30 -22
- data/lib/pulpcore_client/models/upload_commit.rb +32 -22
- data/lib/pulpcore_client/models/upload_detail_response.rb +35 -25
- data/lib/pulpcore_client/models/upload_response.rb +35 -25
- data/lib/pulpcore_client/models/upstream_pulp.rb +36 -22
- data/lib/pulpcore_client/models/upstream_pulp_response.rb +40 -26
- data/lib/pulpcore_client/models/user.rb +42 -24
- data/lib/pulpcore_client/models/user_group.rb +32 -22
- data/lib/pulpcore_client/models/user_group_response.rb +32 -22
- data/lib/pulpcore_client/models/user_response.rb +44 -26
- data/lib/pulpcore_client/models/user_role.rb +35 -23
- data/lib/pulpcore_client/models/user_role_response.rb +36 -24
- data/lib/pulpcore_client/models/version_response.rb +40 -22
- data/lib/pulpcore_client/models/worker_response.rb +33 -25
- data/lib/pulpcore_client/version.rb +2 -2
- data/lib/pulpcore_client.rb +6 -7
- data/pulpcore_client.gemspec +9 -6
- data/spec/api/access_policies_api_spec.rb +6 -6
- data/spec/api/artifacts_api_spec.rb +5 -5
- data/spec/api/content_api_spec.rb +2 -2
- data/spec/api/content_openpgp_publickey_api_spec.rb +4 -4
- data/spec/api/content_openpgp_publicsubkey_api_spec.rb +3 -3
- data/spec/api/content_openpgp_signature_api_spec.rb +3 -3
- data/spec/api/content_openpgp_userattribute_api_spec.rb +3 -3
- data/spec/api/content_openpgp_userid_api_spec.rb +3 -3
- data/spec/api/contentguards_api_spec.rb +2 -2
- data/spec/api/contentguards_composite_api_spec.rb +11 -11
- data/spec/api/contentguards_content_redirect_api_spec.rb +11 -11
- data/spec/api/contentguards_header_api_spec.rb +11 -11
- data/spec/api/contentguards_rbac_api_spec.rb +11 -11
- data/spec/api/distributions_api_spec.rb +2 -2
- data/spec/api/distributions_artifacts_api_spec.rb +3 -3
- data/spec/api/distributions_openpgp_api_spec.rb +9 -9
- data/spec/api/domains_api_spec.rb +8 -8
- data/spec/api/exporters_filesystem_api_spec.rb +7 -7
- data/spec/api/exporters_filesystem_exports_api_spec.rb +5 -5
- data/spec/api/exporters_pulp_api_spec.rb +7 -7
- data/spec/api/exporters_pulp_exports_api_spec.rb +5 -5
- data/spec/api/groups_api_spec.rb +11 -11
- data/spec/api/groups_roles_api_spec.rb +5 -5
- data/spec/api/groups_users_api_spec.rb +4 -4
- data/spec/api/importers_pulp_api_spec.rb +7 -7
- data/spec/api/importers_pulp_import_check_api_spec.rb +2 -2
- data/spec/api/importers_pulp_imports_api_spec.rb +5 -5
- data/spec/api/livez_api_spec.rb +2 -2
- data/spec/api/login_api_spec.rb +62 -0
- data/spec/api/orphans_api_spec.rb +2 -2
- data/spec/api/orphans_cleanup_api_spec.rb +2 -2
- data/spec/api/publications_api_spec.rb +9 -8
- data/spec/api/remotes_api_spec.rb +10 -9
- data/spec/api/repair_api_spec.rb +2 -2
- data/spec/api/repositories_api_spec.rb +2 -2
- data/spec/api/repositories_openpgp_keyring_api_spec.rb +14 -14
- data/spec/api/repositories_reclaim_space_api_spec.rb +2 -2
- data/spec/api/repository_versions_api_spec.rb +9 -8
- data/spec/api/roles_api_spec.rb +7 -7
- data/spec/api/signing_services_api_spec.rb +3 -3
- data/spec/api/status_api_spec.rb +2 -2
- data/spec/api/task_groups_api_spec.rb +4 -4
- data/spec/api/task_schedules_api_spec.rb +7 -7
- data/spec/api/tasks_api_spec.rb +32 -23
- data/spec/api/uploads_api_spec.rb +11 -11
- data/spec/api/upstream_pulps_api_spec.rb +20 -19
- data/spec/api/users_api_spec.rb +7 -7
- data/spec/api/users_roles_api_spec.rb +5 -5
- data/spec/api/workers_api_spec.rb +10 -9
- data/spec/models/access_policy_response_spec.rb +16 -21
- data/spec/models/access_policy_spec.rb +10 -15
- data/spec/models/api_app_status_response_spec.rb +9 -14
- data/spec/models/artifact_distribution_response_spec.rb +27 -32
- data/spec/models/artifact_response_spec.rb +18 -23
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/composite_content_guard_response_spec.rb +13 -18
- data/spec/models/composite_content_guard_spec.rb +9 -14
- data/spec/models/content_app_status_response_spec.rb +9 -14
- data/spec/models/content_guard_response_spec.rb +12 -17
- data/spec/models/content_redirect_content_guard_response_spec.rb +12 -17
- data/spec/models/content_redirect_content_guard_spec.rb +8 -13
- data/spec/models/content_settings_response_spec.rb +8 -13
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/database_connection_response_spec.rb +7 -12
- data/spec/models/distribution_response_spec.rb +18 -23
- data/spec/models/domain_backend_migrator_spec.rb +8 -13
- data/spec/models/domain_response_spec.rb +16 -21
- data/spec/models/domain_spec.rb +12 -17
- data/spec/models/evaluation_response_spec.rb +9 -14
- data/spec/models/filesystem_export_response_spec.rb +13 -18
- data/spec/models/filesystem_export_spec.rb +10 -15
- data/spec/models/filesystem_exporter_response_spec.rb +13 -18
- data/spec/models/filesystem_exporter_spec.rb +9 -14
- data/spec/models/generic_remote_response_hidden_fields_inner_spec.rb +42 -0
- data/spec/models/generic_remote_response_spec.rb +156 -0
- data/spec/models/group_progress_report_response_spec.rb +11 -16
- data/spec/models/group_response_spec.rb +10 -15
- data/spec/models/group_role_response_spec.rb +15 -20
- data/spec/models/group_role_spec.rb +9 -14
- data/spec/models/group_spec.rb +7 -12
- data/spec/models/group_user_response_spec.rb +9 -14
- data/spec/models/group_user_spec.rb +7 -12
- data/spec/models/header_content_guard_response_spec.rb +15 -20
- data/spec/models/header_content_guard_spec.rb +11 -16
- data/spec/models/import_response_spec.rb +12 -17
- data/spec/models/login_response_spec.rb +48 -0
- data/spec/models/method_enum_spec.rb +6 -11
- data/spec/models/minimal_task_response_spec.rb +16 -21
- data/spec/models/multiple_artifact_content_response_spec.rb +11 -16
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_open_pgp_public_subkey_response_spec.rb +9 -14
- data/spec/models/nested_open_pgp_public_subkey_spec.rb +8 -13
- data/spec/models/nested_open_pgp_signature_response_spec.rb +13 -18
- data/spec/models/nested_open_pgp_signature_spec.rb +12 -17
- data/spec/models/nested_open_pgp_user_attribute_response_spec.rb +8 -13
- data/spec/models/nested_open_pgp_user_attribute_spec.rb +7 -12
- data/spec/models/nested_open_pgp_user_id_response_spec.rb +8 -13
- data/spec/models/nested_open_pgp_user_id_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/open_pgp_distribution_response_spec.rb +19 -24
- data/spec/models/open_pgp_distribution_spec.rb +13 -18
- data/spec/models/open_pgp_keyring_response_spec.rb +17 -22
- data/spec/models/open_pgp_keyring_spec.rb +11 -16
- data/spec/models/open_pgp_public_key_response_spec.rb +15 -20
- data/spec/models/open_pgp_public_subkey_response_spec.rb +14 -19
- data/spec/models/open_pgp_signature_response_spec.rb +18 -23
- data/spec/models/open_pgp_user_attribute_response_spec.rb +13 -18
- data/spec/models/open_pgp_user_id_response_spec.rb +13 -18
- data/spec/models/orphans_cleanup_spec.rb +8 -13
- data/spec/models/paginated_access_policy_response_list_spec.rb +10 -15
- data/spec/models/paginated_artifact_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginated_artifact_response_list_spec.rb +10 -15
- data/spec/models/paginated_composite_content_guard_response_list_spec.rb +10 -15
- data/spec/models/paginated_content_guard_response_list_spec.rb +10 -15
- data/spec/models/paginated_content_redirect_content_guard_response_list_spec.rb +10 -15
- data/spec/models/paginated_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginated_domain_response_list_spec.rb +10 -15
- data/spec/models/paginated_filesystem_export_response_list_spec.rb +10 -15
- data/spec/models/paginated_filesystem_exporter_response_list_spec.rb +10 -15
- data/spec/models/paginated_generic_remote_response_list_spec.rb +54 -0
- data/spec/models/paginated_group_response_list_spec.rb +10 -15
- data/spec/models/paginated_group_role_response_list_spec.rb +10 -15
- data/spec/models/paginated_group_user_response_list_spec.rb +10 -15
- data/spec/models/paginated_header_content_guard_response_list_spec.rb +10 -15
- data/spec/models/paginated_import_response_list_spec.rb +10 -15
- data/spec/models/paginated_multiple_artifact_content_response_list_spec.rb +10 -15
- data/spec/models/paginated_open_pgp_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginated_open_pgp_keyring_response_list_spec.rb +10 -15
- data/spec/models/paginated_open_pgp_public_key_response_list_spec.rb +10 -15
- data/spec/models/paginated_open_pgp_public_subkey_response_list_spec.rb +10 -15
- data/spec/models/paginated_open_pgp_signature_response_list_spec.rb +10 -15
- data/spec/models/paginated_open_pgp_user_attribute_response_list_spec.rb +10 -15
- data/spec/models/paginated_open_pgp_user_id_response_list_spec.rb +10 -15
- data/spec/models/paginated_publication_response_list_spec.rb +10 -15
- data/spec/models/paginated_pulp_export_response_list_spec.rb +10 -15
- data/spec/models/paginated_pulp_exporter_response_list_spec.rb +10 -15
- data/spec/models/paginated_pulp_importer_response_list_spec.rb +10 -15
- data/spec/models/paginated_rbac_content_guard_response_list_spec.rb +10 -15
- data/spec/models/paginated_repository_response_list_spec.rb +10 -15
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginated_role_response_list_spec.rb +10 -15
- data/spec/models/paginated_signing_service_response_list_spec.rb +10 -15
- data/spec/models/paginated_task_group_response_list_spec.rb +10 -15
- data/spec/models/paginated_task_response_list_spec.rb +10 -15
- data/spec/models/paginated_task_schedule_response_list_spec.rb +10 -15
- data/spec/models/paginated_upload_response_list_spec.rb +10 -15
- data/spec/models/paginated_upstream_pulp_response_list_spec.rb +10 -15
- data/spec/models/paginated_user_response_list_spec.rb +10 -15
- data/spec/models/paginated_user_role_response_list_spec.rb +10 -15
- data/spec/models/paginated_worker_response_list_spec.rb +10 -15
- data/spec/models/patched_access_policy_spec.rb +10 -15
- data/spec/models/patched_composite_content_guard_spec.rb +9 -14
- data/spec/models/patched_content_redirect_content_guard_spec.rb +8 -13
- data/spec/models/patched_domain_spec.rb +12 -17
- data/spec/models/patched_filesystem_exporter_spec.rb +9 -14
- data/spec/models/patched_group_spec.rb +7 -12
- data/spec/models/patched_header_content_guard_spec.rb +11 -16
- data/spec/models/patched_open_pgp_distribution_spec.rb +13 -18
- data/spec/models/patched_open_pgp_keyring_spec.rb +11 -16
- data/spec/models/patched_pulp_exporter_spec.rb +10 -15
- data/spec/models/patched_pulp_importer_spec.rb +8 -13
- data/spec/models/patched_rbac_content_guard_spec.rb +8 -13
- data/spec/models/patched_role_spec.rb +9 -14
- data/spec/models/patched_task_cancel_spec.rb +7 -12
- data/spec/models/patched_upstream_pulp_spec.rb +17 -22
- data/spec/models/patched_user_spec.rb +13 -18
- data/spec/models/policy_enum_spec.rb +6 -11
- data/spec/models/profile_artifact_response_spec.rb +7 -12
- data/spec/models/progress_report_response_spec.rb +12 -17
- data/spec/models/publication_response_spec.rb +12 -17
- data/spec/models/pulp_export_response_spec.rb +15 -20
- data/spec/models/pulp_export_spec.rb +12 -17
- data/spec/models/pulp_exporter_response_spec.rb +14 -19
- data/spec/models/pulp_exporter_spec.rb +10 -15
- data/spec/models/pulp_import_check_response_spec.rb +9 -14
- data/spec/models/pulp_import_check_spec.rb +9 -14
- data/spec/models/pulp_import_spec.rb +9 -14
- data/spec/models/pulp_importer_response_spec.rb +12 -17
- data/spec/models/pulp_importer_spec.rb +8 -13
- data/spec/models/purge_spec.rb +8 -13
- data/spec/models/rbac_content_guard_response_spec.rb +14 -19
- data/spec/models/rbac_content_guard_spec.rb +8 -13
- data/spec/models/reclaim_space_spec.rb +8 -13
- data/spec/models/redis_connection_response_spec.rb +7 -12
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_add_remove_content_spec.rb +9 -14
- data/spec/models/repository_response_spec.rb +17 -22
- data/spec/models/repository_version_response_spec.rb +14 -19
- data/spec/models/role_response_spec.rb +14 -19
- data/spec/models/role_spec.rb +9 -14
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/signing_service_response_spec.rb +14 -19
- data/spec/models/states_enum_spec.rb +6 -11
- data/spec/models/status_response_spec.rb +15 -20
- data/spec/models/storage_class_enum_spec.rb +6 -11
- data/spec/models/storage_response_spec.rb +9 -14
- data/spec/models/task_group_operation_response_spec.rb +7 -12
- data/spec/models/task_group_response_spec.rb +19 -24
- data/spec/models/task_response_spec.rb +25 -30
- data/spec/models/task_schedule_response_spec.rb +15 -20
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/models/upload_chunk_response_spec.rb +8 -13
- data/spec/models/upload_commit_spec.rb +7 -12
- data/spec/models/upload_detail_response_spec.rb +13 -18
- data/spec/models/upload_response_spec.rb +12 -17
- data/spec/models/upload_spec.rb +7 -12
- data/spec/models/upstream_pulp_response_spec.rb +20 -25
- data/spec/models/upstream_pulp_spec.rb +17 -22
- data/spec/models/user_group_response_spec.rb +9 -14
- data/spec/models/user_group_spec.rb +7 -12
- data/spec/models/user_response_spec.rb +18 -23
- data/spec/models/user_role_response_spec.rb +15 -20
- data/spec/models/user_role_spec.rb +9 -14
- data/spec/models/user_spec.rb +13 -18
- data/spec/models/version_response_spec.rb +11 -16
- data/spec/models/worker_response_spec.rb +14 -19
- data/spec/spec_helper.rb +1 -1
- metadata +61 -41
- data/docs/Artifact.md +0 -31
- data/docs/OpenPGPPublicKey.md +0 -23
- data/docs/PaginatedRemoteResponseList.md +0 -23
- data/docs/RemoteResponse.md +0 -57
- data/docs/RemoteResponseHiddenFields.md +0 -19
- data/docs/UploadChunk.md +0 -19
- data/lib/pulpcore_client/models/artifact.rb +0 -379
- data/lib/pulpcore_client/models/open_pgp_public_key.rb +0 -253
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/artifact_spec.rb +0 -83
- data/spec/models/open_pgp_public_key_spec.rb +0 -59
- data/spec/models/paginated_remote_response_list_spec.rb +0 -59
- data/spec/models/remote_response_hidden_fields_spec.rb +0 -47
- data/spec/models/remote_response_spec.rb +0 -161
- data/spec/models/upload_chunk_spec.rb +0 -47
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -57,23 +57,27 @@ module PulpcoreClient
|
|
57
57
|
# header parameters
|
58
58
|
header_params = opts[:header_params] || {}
|
59
59
|
# HTTP header 'Accept' (if needed)
|
60
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
61
61
|
# HTTP header 'Content-Type'
|
62
|
-
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
63
|
+
if !content_type.nil?
|
64
|
+
header_params['Content-Type'] = content_type
|
65
|
+
end
|
63
66
|
|
64
67
|
# form parameters
|
65
68
|
form_params = opts[:form_params] || {}
|
66
69
|
|
67
70
|
# http body (model)
|
68
|
-
post_body = opts[:
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(user_role)
|
69
72
|
|
70
73
|
# return_type
|
71
|
-
return_type = opts[:
|
74
|
+
return_type = opts[:debug_return_type] || 'UserRoleResponse'
|
72
75
|
|
73
76
|
# auth_names
|
74
|
-
auth_names = opts[:
|
77
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
75
78
|
|
76
79
|
new_options = opts.merge(
|
80
|
+
:operation => :"UsersRolesApi.create",
|
77
81
|
:header_params => header_params,
|
78
82
|
:query_params => query_params,
|
79
83
|
:form_params => form_params,
|
@@ -125,15 +129,16 @@ module PulpcoreClient
|
|
125
129
|
form_params = opts[:form_params] || {}
|
126
130
|
|
127
131
|
# http body (model)
|
128
|
-
post_body = opts[:
|
132
|
+
post_body = opts[:debug_body]
|
129
133
|
|
130
134
|
# return_type
|
131
|
-
return_type = opts[:
|
135
|
+
return_type = opts[:debug_return_type]
|
132
136
|
|
133
137
|
# auth_names
|
134
|
-
auth_names = opts[:
|
138
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
135
139
|
|
136
140
|
new_options = opts.merge(
|
141
|
+
:operation => :"UsersRolesApi.delete",
|
137
142
|
:header_params => header_params,
|
138
143
|
:query_params => query_params,
|
139
144
|
:form_params => form_params,
|
@@ -233,21 +238,22 @@ module PulpcoreClient
|
|
233
238
|
# header parameters
|
234
239
|
header_params = opts[:header_params] || {}
|
235
240
|
# HTTP header 'Accept' (if needed)
|
236
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
241
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
237
242
|
|
238
243
|
# form parameters
|
239
244
|
form_params = opts[:form_params] || {}
|
240
245
|
|
241
246
|
# http body (model)
|
242
|
-
post_body = opts[:
|
247
|
+
post_body = opts[:debug_body]
|
243
248
|
|
244
249
|
# return_type
|
245
|
-
return_type = opts[:
|
250
|
+
return_type = opts[:debug_return_type] || 'PaginatedUserRoleResponseList'
|
246
251
|
|
247
252
|
# auth_names
|
248
|
-
auth_names = opts[:
|
253
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
249
254
|
|
250
255
|
new_options = opts.merge(
|
256
|
+
:operation => :"UsersRolesApi.list",
|
251
257
|
:header_params => header_params,
|
252
258
|
:query_params => query_params,
|
253
259
|
:form_params => form_params,
|
@@ -301,21 +307,22 @@ module PulpcoreClient
|
|
301
307
|
# header parameters
|
302
308
|
header_params = opts[:header_params] || {}
|
303
309
|
# HTTP header 'Accept' (if needed)
|
304
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
310
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
305
311
|
|
306
312
|
# form parameters
|
307
313
|
form_params = opts[:form_params] || {}
|
308
314
|
|
309
315
|
# http body (model)
|
310
|
-
post_body = opts[:
|
316
|
+
post_body = opts[:debug_body]
|
311
317
|
|
312
318
|
# return_type
|
313
|
-
return_type = opts[:
|
319
|
+
return_type = opts[:debug_return_type] || 'UserRoleResponse'
|
314
320
|
|
315
321
|
# auth_names
|
316
|
-
auth_names = opts[:
|
322
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
317
323
|
|
318
324
|
new_options = opts.merge(
|
325
|
+
:operation => :"UsersRolesApi.read",
|
319
326
|
:header_params => header_params,
|
320
327
|
:query_params => query_params,
|
321
328
|
:form_params => form_params,
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -22,12 +22,13 @@ module PulpcoreClient
|
|
22
22
|
# List workers
|
23
23
|
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
|
-
# @option opts [
|
26
|
-
# @option opts [
|
27
|
-
# @option opts [
|
28
|
-
# @option opts [
|
29
|
-
# @option opts [
|
30
|
-
# @option opts [
|
25
|
+
# @option opts [Time] :last_heartbeat Filter results where last_heartbeat matches value
|
26
|
+
# @option opts [Time] :last_heartbeat__gt Filter results where last_heartbeat is greater than value
|
27
|
+
# @option opts [Time] :last_heartbeat__gte Filter results where last_heartbeat is greater than or equal to value
|
28
|
+
# @option opts [Boolean] :last_heartbeat__isnull Filter results where last_heartbeat has a null value
|
29
|
+
# @option opts [Time] :last_heartbeat__lt Filter results where last_heartbeat is less than value
|
30
|
+
# @option opts [Time] :last_heartbeat__lte Filter results where last_heartbeat is less than or equal to value
|
31
|
+
# @option opts [Array<Time>] :last_heartbeat__range Filter results where last_heartbeat is between two comma separated values
|
31
32
|
# @option opts [Integer] :limit Number of results to return per page.
|
32
33
|
# @option opts [Boolean] :missing
|
33
34
|
# @option opts [String] :name Filter results where name matches value
|
@@ -57,12 +58,13 @@ module PulpcoreClient
|
|
57
58
|
# List workers
|
58
59
|
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
59
60
|
# @param [Hash] opts the optional parameters
|
60
|
-
# @option opts [
|
61
|
-
# @option opts [
|
62
|
-
# @option opts [
|
63
|
-
# @option opts [
|
64
|
-
# @option opts [
|
65
|
-
# @option opts [
|
61
|
+
# @option opts [Time] :last_heartbeat Filter results where last_heartbeat matches value
|
62
|
+
# @option opts [Time] :last_heartbeat__gt Filter results where last_heartbeat is greater than value
|
63
|
+
# @option opts [Time] :last_heartbeat__gte Filter results where last_heartbeat is greater than or equal to value
|
64
|
+
# @option opts [Boolean] :last_heartbeat__isnull Filter results where last_heartbeat has a null value
|
65
|
+
# @option opts [Time] :last_heartbeat__lt Filter results where last_heartbeat is less than value
|
66
|
+
# @option opts [Time] :last_heartbeat__lte Filter results where last_heartbeat is less than or equal to value
|
67
|
+
# @option opts [Array<Time>] :last_heartbeat__range Filter results where last_heartbeat is between two comma separated values
|
66
68
|
# @option opts [Integer] :limit Number of results to return per page.
|
67
69
|
# @option opts [Boolean] :missing
|
68
70
|
# @option opts [String] :name Filter results where name matches value
|
@@ -100,6 +102,7 @@ module PulpcoreClient
|
|
100
102
|
query_params[:'last_heartbeat'] = opts[:'last_heartbeat'] if !opts[:'last_heartbeat'].nil?
|
101
103
|
query_params[:'last_heartbeat__gt'] = opts[:'last_heartbeat__gt'] if !opts[:'last_heartbeat__gt'].nil?
|
102
104
|
query_params[:'last_heartbeat__gte'] = opts[:'last_heartbeat__gte'] if !opts[:'last_heartbeat__gte'].nil?
|
105
|
+
query_params[:'last_heartbeat__isnull'] = opts[:'last_heartbeat__isnull'] if !opts[:'last_heartbeat__isnull'].nil?
|
103
106
|
query_params[:'last_heartbeat__lt'] = opts[:'last_heartbeat__lt'] if !opts[:'last_heartbeat__lt'].nil?
|
104
107
|
query_params[:'last_heartbeat__lte'] = opts[:'last_heartbeat__lte'] if !opts[:'last_heartbeat__lte'].nil?
|
105
108
|
query_params[:'last_heartbeat__range'] = @api_client.build_collection_param(opts[:'last_heartbeat__range'], :csv) if !opts[:'last_heartbeat__range'].nil?
|
@@ -127,21 +130,22 @@ module PulpcoreClient
|
|
127
130
|
# header parameters
|
128
131
|
header_params = opts[:header_params] || {}
|
129
132
|
# HTTP header 'Accept' (if needed)
|
130
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
131
134
|
|
132
135
|
# form parameters
|
133
136
|
form_params = opts[:form_params] || {}
|
134
137
|
|
135
138
|
# http body (model)
|
136
|
-
post_body = opts[:
|
139
|
+
post_body = opts[:debug_body]
|
137
140
|
|
138
141
|
# return_type
|
139
|
-
return_type = opts[:
|
142
|
+
return_type = opts[:debug_return_type] || 'PaginatedWorkerResponseList'
|
140
143
|
|
141
144
|
# auth_names
|
142
|
-
auth_names = opts[:
|
145
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
143
146
|
|
144
147
|
new_options = opts.merge(
|
148
|
+
:operation => :"WorkersApi.list",
|
145
149
|
:header_params => header_params,
|
146
150
|
:query_params => query_params,
|
147
151
|
:form_params => form_params,
|
@@ -195,21 +199,22 @@ module PulpcoreClient
|
|
195
199
|
# header parameters
|
196
200
|
header_params = opts[:header_params] || {}
|
197
201
|
# HTTP header 'Accept' (if needed)
|
198
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
199
203
|
|
200
204
|
# form parameters
|
201
205
|
form_params = opts[:form_params] || {}
|
202
206
|
|
203
207
|
# http body (model)
|
204
|
-
post_body = opts[:
|
208
|
+
post_body = opts[:debug_body]
|
205
209
|
|
206
210
|
# return_type
|
207
|
-
return_type = opts[:
|
211
|
+
return_type = opts[:debug_return_type] || 'WorkerResponse'
|
208
212
|
|
209
213
|
# auth_names
|
210
|
-
auth_names = opts[:
|
214
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
211
215
|
|
212
216
|
new_options = opts.merge(
|
217
|
+
:operation => :"WorkersApi.read",
|
213
218
|
:header_params => header_params,
|
214
219
|
:query_params => query_params,
|
215
220
|
:form_params => form_params,
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,7 +14,12 @@ require 'date'
|
|
14
14
|
require 'json'
|
15
15
|
require 'logger'
|
16
16
|
require 'tempfile'
|
17
|
+
require 'time'
|
17
18
|
require 'faraday'
|
19
|
+
require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0')
|
20
|
+
require 'marcel'
|
21
|
+
require 'pathname'
|
22
|
+
|
18
23
|
|
19
24
|
module PulpcoreClient
|
20
25
|
class ApiClient
|
@@ -46,51 +51,38 @@ module PulpcoreClient
|
|
46
51
|
# @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
|
47
52
|
# the data deserialized from response body (could be nil), response status code and response headers.
|
48
53
|
def call_api(http_method, path, opts = {})
|
49
|
-
|
50
|
-
:ca_file => @config.ssl_ca_file,
|
51
|
-
:verify => @config.ssl_verify,
|
52
|
-
:verify_mode => @config.ssl_verify_mode,
|
53
|
-
:client_cert => @config.ssl_client_cert,
|
54
|
-
:client_key => @config.ssl_client_key
|
55
|
-
}
|
56
|
-
request_options = {
|
57
|
-
:params_encoder => @config.params_encoder
|
58
|
-
}
|
59
|
-
connection = Faraday.new(:url => config.base_url, :ssl => ssl_options, :request => request_options) do |conn|
|
60
|
-
conn.basic_auth(config.username, config.password)
|
61
|
-
if opts[:header_params]["Content-Type"] == "multipart/form-data"
|
62
|
-
conn.request :multipart
|
63
|
-
conn.request :url_encoded
|
64
|
-
end
|
65
|
-
conn.adapter(Faraday.default_adapter)
|
66
|
-
end
|
67
|
-
|
54
|
+
stream = nil
|
68
55
|
begin
|
69
|
-
response = connection.public_send(http_method.to_sym.downcase) do |req|
|
70
|
-
build_request(http_method, path, req, opts)
|
56
|
+
response = connection(opts).public_send(http_method.to_sym.downcase) do |req|
|
57
|
+
request = build_request(http_method, path, req, opts)
|
58
|
+
stream = download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary'
|
71
59
|
end
|
72
60
|
|
73
|
-
if
|
74
|
-
|
61
|
+
if config.debugging
|
62
|
+
config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
75
63
|
end
|
76
64
|
|
77
65
|
unless response.success?
|
78
|
-
if response.status == 0
|
66
|
+
if response.status == 0 && response.respond_to?(:return_message)
|
79
67
|
# Errors from libcurl will be made visible here
|
80
|
-
fail ApiError.new(:
|
81
|
-
:
|
68
|
+
fail ApiError.new(code: 0,
|
69
|
+
message: response.return_message)
|
82
70
|
else
|
83
|
-
fail ApiError.new(:
|
84
|
-
:
|
85
|
-
:
|
71
|
+
fail ApiError.new(code: response.status,
|
72
|
+
response_headers: response.headers,
|
73
|
+
response_body: response.body),
|
86
74
|
response.reason_phrase
|
87
75
|
end
|
88
76
|
end
|
89
77
|
rescue Faraday::TimeoutError
|
90
78
|
fail ApiError.new('Connection timed out')
|
79
|
+
rescue Faraday::ConnectionFailed
|
80
|
+
fail ApiError.new('Connection failed')
|
91
81
|
end
|
92
82
|
|
93
|
-
if opts[:return_type]
|
83
|
+
if opts[:return_type] == 'File' || opts[:return_type] == 'Binary'
|
84
|
+
data = deserialize_file(response, stream)
|
85
|
+
elsif opts[:return_type]
|
94
86
|
data = deserialize(response, opts[:return_type])
|
95
87
|
else
|
96
88
|
data = nil
|
@@ -106,9 +98,9 @@ module PulpcoreClient
|
|
106
98
|
# @option opts [Hash] :query_params Query parameters
|
107
99
|
# @option opts [Hash] :form_params Query parameters
|
108
100
|
# @option opts [Object] :body HTTP body (JSON/XML)
|
109
|
-
# @return [
|
101
|
+
# @return [Faraday::Request] A Faraday Request
|
110
102
|
def build_request(http_method, path, request, opts = {})
|
111
|
-
url = build_request_url(path)
|
103
|
+
url = build_request_url(path, opts)
|
112
104
|
http_method = http_method.to_sym.downcase
|
113
105
|
|
114
106
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
@@ -117,24 +109,21 @@ module PulpcoreClient
|
|
117
109
|
|
118
110
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
119
111
|
|
120
|
-
req_opts = {
|
121
|
-
:params_encoding => @config.params_encoding,
|
122
|
-
:timeout => @config.timeout,
|
123
|
-
:verbose => @config.debugging
|
124
|
-
}
|
125
|
-
|
126
112
|
if [:post, :patch, :put, :delete].include?(http_method)
|
127
113
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
128
|
-
if
|
129
|
-
|
114
|
+
if config.debugging
|
115
|
+
config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
130
116
|
end
|
131
117
|
end
|
132
118
|
request.headers = header_params
|
133
119
|
request.body = req_body
|
134
|
-
|
120
|
+
|
121
|
+
# Overload default options only if provided
|
122
|
+
request.options.params_encoder = config.params_encoder if config.params_encoder
|
123
|
+
request.options.timeout = config.timeout if config.timeout
|
124
|
+
|
135
125
|
request.url url
|
136
126
|
request.params = query_params
|
137
|
-
download_file(request) if opts[:return_type] == 'File'
|
138
127
|
request
|
139
128
|
end
|
140
129
|
|
@@ -153,8 +142,7 @@ module PulpcoreClient
|
|
153
142
|
form_params.each do |key, value|
|
154
143
|
case value
|
155
144
|
when ::File, ::Tempfile
|
156
|
-
|
157
|
-
data[key] = Faraday::FilePart.new(value.path, 'application/octet-stream', value.path)
|
145
|
+
data[key] = Faraday::FilePart.new(value.path, Marcel::MimeType.for(Pathname.new(value.path)))
|
158
146
|
when ::Array, nil
|
159
147
|
# let Faraday handle Array and nil parameters
|
160
148
|
data[key] = value
|
@@ -170,6 +158,95 @@ module PulpcoreClient
|
|
170
158
|
data
|
171
159
|
end
|
172
160
|
|
161
|
+
def download_file(request)
|
162
|
+
stream = []
|
163
|
+
|
164
|
+
# handle streaming Responses
|
165
|
+
request.options.on_data = Proc.new do |chunk, overall_received_bytes|
|
166
|
+
stream << chunk
|
167
|
+
end
|
168
|
+
|
169
|
+
stream
|
170
|
+
end
|
171
|
+
|
172
|
+
def deserialize_file(response, stream)
|
173
|
+
body = response.body
|
174
|
+
encoding = body.encoding
|
175
|
+
|
176
|
+
# reconstruct content
|
177
|
+
content = stream.join
|
178
|
+
content = content.unpack('m').join if response.headers['Content-Transfer-Encoding'] == 'binary'
|
179
|
+
content = content.force_encoding(encoding)
|
180
|
+
|
181
|
+
# return byte stream
|
182
|
+
return content if @config.return_binary_data == true
|
183
|
+
|
184
|
+
# return file instead of binary data
|
185
|
+
content_disposition = response.headers['Content-Disposition']
|
186
|
+
if content_disposition && content_disposition =~ /filename=/i
|
187
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
188
|
+
prefix = sanitize_filename(filename)
|
189
|
+
else
|
190
|
+
prefix = 'download-'
|
191
|
+
end
|
192
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
193
|
+
|
194
|
+
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
195
|
+
tempfile.write(content)
|
196
|
+
tempfile.close
|
197
|
+
|
198
|
+
config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
199
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
200
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
201
|
+
"explicitly with `tempfile.delete`"
|
202
|
+
tempfile
|
203
|
+
end
|
204
|
+
|
205
|
+
def connection(opts)
|
206
|
+
opts[:header_params]['Content-Type'] == 'multipart/form-data' ? connection_multipart : connection_regular
|
207
|
+
end
|
208
|
+
|
209
|
+
def connection_multipart
|
210
|
+
@connection_multipart ||= build_connection do |conn|
|
211
|
+
conn.request :multipart
|
212
|
+
conn.request :url_encoded
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
def connection_regular
|
217
|
+
@connection_regular ||= build_connection
|
218
|
+
end
|
219
|
+
|
220
|
+
def build_connection
|
221
|
+
Faraday.new(url: config.base_url, ssl: ssl_options, proxy: config.proxy) do |conn|
|
222
|
+
basic_auth(conn)
|
223
|
+
config.configure_middleware(conn)
|
224
|
+
yield(conn) if block_given?
|
225
|
+
conn.adapter(Faraday.default_adapter)
|
226
|
+
config.configure_connection(conn)
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
def ssl_options
|
231
|
+
{
|
232
|
+
ca_file: config.ssl_ca_file,
|
233
|
+
verify: config.ssl_verify,
|
234
|
+
verify_mode: config.ssl_verify_mode,
|
235
|
+
client_cert: config.ssl_client_cert,
|
236
|
+
client_key: config.ssl_client_key
|
237
|
+
}
|
238
|
+
end
|
239
|
+
|
240
|
+
def basic_auth(conn)
|
241
|
+
if config.username && config.password
|
242
|
+
if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0')
|
243
|
+
conn.request(:authorization, :basic, config.username, config.password)
|
244
|
+
else
|
245
|
+
conn.request(:basic_auth, config.username, config.password)
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
173
250
|
# Check if the given MIME is a JSON MIME.
|
174
251
|
# JSON MIME examples:
|
175
252
|
# application/json
|
@@ -179,7 +256,7 @@ module PulpcoreClient
|
|
179
256
|
# @param [String] mime MIME
|
180
257
|
# @return [Boolean] True if the MIME is application/json
|
181
258
|
def json_mime?(mime)
|
182
|
-
(mime == '*/*') || !(mime =~
|
259
|
+
(mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil?
|
183
260
|
end
|
184
261
|
|
185
262
|
# Deserialize the response to the given return type.
|
@@ -188,15 +265,10 @@ module PulpcoreClient
|
|
188
265
|
# @param [String] return_type some examples: "User", "Array<User>", "Hash<String, Integer>"
|
189
266
|
def deserialize(response, return_type)
|
190
267
|
body = response.body
|
191
|
-
|
192
|
-
# handle file downloading - return the File instance processed in request callbacks
|
193
|
-
# note that response body is empty when the file is written in chunks in request on_body callback
|
194
|
-
return @tempfile if return_type == 'File'
|
195
|
-
|
196
268
|
return nil if body.nil? || body.empty?
|
197
269
|
|
198
270
|
# return response body directly for String return type
|
199
|
-
return body if return_type == 'String'
|
271
|
+
return body.to_s if return_type == 'String'
|
200
272
|
|
201
273
|
# ensuring a default content type
|
202
274
|
content_type = response.headers['Content-Type'] || 'application/json'
|
@@ -206,7 +278,7 @@ module PulpcoreClient
|
|
206
278
|
begin
|
207
279
|
data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
|
208
280
|
rescue JSON::ParserError => e
|
209
|
-
if %w(String Date
|
281
|
+
if %w(String Date Time).include?(return_type)
|
210
282
|
data = body
|
211
283
|
else
|
212
284
|
raise e
|
@@ -231,9 +303,9 @@ module PulpcoreClient
|
|
231
303
|
data.to_f
|
232
304
|
when 'Boolean'
|
233
305
|
data == true
|
234
|
-
when '
|
306
|
+
when 'Time'
|
235
307
|
# parse date time (expecting ISO 8601 format)
|
236
|
-
|
308
|
+
Time.parse data
|
237
309
|
when 'Date'
|
238
310
|
# parse date time (expecting ISO 8601 format)
|
239
311
|
Date.parse data
|
@@ -251,46 +323,9 @@ module PulpcoreClient
|
|
251
323
|
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
252
324
|
end
|
253
325
|
else
|
254
|
-
# models
|
255
|
-
PulpcoreClient.const_get(return_type)
|
256
|
-
|
257
|
-
end
|
258
|
-
|
259
|
-
# Save response body into a file in (the defined) temporary folder, using the filename
|
260
|
-
# from the "Content-Disposition" header if provided, otherwise a random filename.
|
261
|
-
# The response body is written to the file in chunks in order to handle files which
|
262
|
-
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
|
263
|
-
# process can use.
|
264
|
-
#
|
265
|
-
# @see Configuration#temp_folder_path
|
266
|
-
def download_file(request)
|
267
|
-
tempfile = nil
|
268
|
-
encoding = nil
|
269
|
-
request.on_headers do |response|
|
270
|
-
content_disposition = response.headers['Content-Disposition']
|
271
|
-
if content_disposition && content_disposition =~ /filename=/i
|
272
|
-
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
273
|
-
prefix = sanitize_filename(filename)
|
274
|
-
else
|
275
|
-
prefix = 'download-'
|
276
|
-
end
|
277
|
-
prefix = prefix + '-' unless prefix.end_with?('-')
|
278
|
-
encoding = response.body.encoding
|
279
|
-
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
280
|
-
@tempfile = tempfile
|
281
|
-
end
|
282
|
-
request.on_body do |chunk|
|
283
|
-
chunk.force_encoding(encoding)
|
284
|
-
tempfile.write(chunk)
|
285
|
-
end
|
286
|
-
request.on_complete do |response|
|
287
|
-
if tempfile
|
288
|
-
tempfile.close
|
289
|
-
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
290
|
-
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
291
|
-
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
292
|
-
"explicitly with `tempfile.delete`"
|
293
|
-
end
|
326
|
+
# models (e.g. Pet) or oneOf
|
327
|
+
klass = PulpcoreClient.const_get(return_type)
|
328
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
|
294
329
|
end
|
295
330
|
end
|
296
331
|
|
@@ -300,16 +335,16 @@ module PulpcoreClient
|
|
300
335
|
# @param [String] filename the filename to be sanitized
|
301
336
|
# @return [String] the sanitized filename
|
302
337
|
def sanitize_filename(filename)
|
303
|
-
filename.
|
338
|
+
filename.split(/[\/\\]/).last
|
304
339
|
end
|
305
340
|
|
306
|
-
def build_request_url(path)
|
341
|
+
def build_request_url(path, opts = {})
|
307
342
|
# Add leading and trailing slashes to path
|
308
343
|
path = "/#{path}".gsub(/\/+/, '/')
|
309
|
-
@config.base_url + path
|
344
|
+
@config.base_url(opts[:operation]) + path
|
310
345
|
end
|
311
346
|
|
312
|
-
# Update
|
347
|
+
# Update header and query params based on authentication settings.
|
313
348
|
#
|
314
349
|
# @param [Hash] header_params Header parameters
|
315
350
|
# @param [Hash] query_params Query parameters
|
@@ -321,7 +356,7 @@ module PulpcoreClient
|
|
321
356
|
case auth_setting[:in]
|
322
357
|
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
323
358
|
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
324
|
-
else fail ArgumentError, 'Authentication token must be in `query`
|
359
|
+
else fail ArgumentError, 'Authentication token must be in `query` or `header`'
|
325
360
|
end
|
326
361
|
end
|
327
362
|
end
|
@@ -348,8 +383,8 @@ module PulpcoreClient
|
|
348
383
|
# @param [Array] content_types array for Content-Type
|
349
384
|
# @return [String] the Content-Type header (e.g. application/json)
|
350
385
|
def select_header_content_type(content_types)
|
351
|
-
#
|
352
|
-
return
|
386
|
+
# return nil by default
|
387
|
+
return if content_types.nil? || content_types.empty?
|
353
388
|
# use JSON when present, otherwise use the first one
|
354
389
|
json_content_type = content_types.find { |s| json_mime?(s) }
|
355
390
|
json_content_type || content_types.first
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -32,6 +32,7 @@ module PulpcoreClient
|
|
32
32
|
end
|
33
33
|
else
|
34
34
|
super arg
|
35
|
+
@message = arg
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|