harbor_swagger_client 1.0.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/README.md +119 -271
- data/docs/Access.md +10 -0
- data/docs/AdditionLink.md +9 -0
- data/docs/{QuotaRefObject.md → AdditionLinks.md} +1 -1
- data/docs/{EventType.md → Annotations.md} +1 -1
- data/docs/Artifact.md +25 -0
- data/docs/ArtifactApi.md +694 -0
- data/docs/AuditLog.md +13 -0
- data/docs/AuditlogApi.md +69 -0
- data/docs/AuthproxySetting.md +12 -0
- data/docs/CVEAllowlist.md +13 -0
- data/docs/{CVEWhitelistItem.md → CVEAllowlistItem.md} +1 -1
- data/docs/Error.md +9 -0
- data/docs/{Action.md → Errors.md} +2 -2
- data/docs/Execution.md +17 -0
- data/docs/{NotifyType.md → ExtraAttrs.md} +1 -1
- data/docs/GeneralInfo.md +4 -0
- data/docs/Icon.md +9 -0
- data/docs/IconApi.md +66 -0
- data/docs/Instance.md +19 -0
- data/docs/Label.md +8 -9
- data/docs/Metadata.md +13 -0
- data/docs/Metrics.md +14 -0
- data/docs/NativeReportSummary.md +15 -0
- data/docs/Permission.md +3 -2
- data/docs/PingApi.md +56 -0
- data/docs/Platform.md +12 -0
- data/docs/PreheatApi.md +1176 -0
- data/docs/PreheatPolicy.md +18 -0
- data/docs/Project.md +4 -3
- data/docs/ProjectApi.md +544 -0
- data/docs/ProjectDeletable.md +9 -0
- data/docs/ProjectMetadata.md +2 -1
- data/docs/ProjectReq.md +3 -2
- data/docs/ProjectSummary.md +3 -1
- data/docs/{ImmutableTagRule.md → ProviderUnderProject.md} +3 -3
- data/docs/Reference.md +13 -0
- data/docs/ReplicationApi.md +352 -0
- data/docs/ReplicationExecution.md +11 -11
- data/docs/ReplicationTask.md +10 -9
- data/docs/Repository.md +15 -0
- data/docs/RepositoryApi.md +256 -0
- data/docs/Robot.md +19 -0
- data/docs/RobotApi.md +363 -0
- data/docs/RobotCreate.md +14 -0
- data/docs/{RobotAccountCreate.md → RobotCreateV1.md} +2 -2
- data/docs/RobotCreated.md +12 -0
- data/docs/{Action1.md → RobotSec.md} +2 -2
- data/docs/Robotv1Api.md +317 -0
- data/docs/ScanApi.md +61 -27
- data/docs/{Labels.md → ScanOverview.md} +1 -1
- data/docs/StartReplicationExecution.md +8 -0
- data/docs/SysteminfoApi.md +152 -0
- data/docs/Tag.md +15 -0
- data/docs/Task.md +17 -0
- data/docs/VulnerabilitySummary.md +10 -0
- data/harbor_swagger_client-1.0.3.gem +0 -0
- data/harbor_swagger_client.gemspec +2 -1
- data/lib/harbor_swagger_client.rb +46 -106
- data/lib/harbor_swagger_client/api/artifact_api.rb +848 -0
- data/lib/harbor_swagger_client/api/auditlog_api.rb +91 -0
- data/lib/harbor_swagger_client/api/icon_api.rb +84 -0
- data/lib/harbor_swagger_client/api/ping_api.rb +71 -0
- data/lib/harbor_swagger_client/api/preheat_api.rb +1327 -0
- data/lib/harbor_swagger_client/api/project_api.rb +604 -0
- data/lib/harbor_swagger_client/api/replication_api.rb +380 -0
- data/lib/harbor_swagger_client/api/repository_api.rb +302 -0
- data/lib/harbor_swagger_client/api/robot_api.rb +406 -0
- data/lib/harbor_swagger_client/api/robotv1_api.rb +369 -0
- data/lib/harbor_swagger_client/api/scan_api.rb +89 -34
- data/lib/harbor_swagger_client/api/systeminfo_api.rb +167 -0
- data/lib/harbor_swagger_client/api_client.rb +6 -4
- data/lib/harbor_swagger_client/api_error.rb +1 -1
- data/lib/harbor_swagger_client/configuration.rb +4 -4
- data/lib/harbor_swagger_client/models/{robot_account_access.rb → access.rb} +20 -9
- data/lib/harbor_swagger_client/models/{namespace.rb → addition_link.rb} +19 -19
- data/lib/harbor_swagger_client/models/{quota_ref_object.rb → addition_links.rb} +4 -3
- data/lib/harbor_swagger_client/models/{labels.rb → annotations.rb} +4 -4
- data/lib/harbor_swagger_client/models/{chart_version.rb → artifact.rb} +133 -139
- data/lib/harbor_swagger_client/models/audit_log.rb +235 -0
- data/lib/harbor_swagger_client/models/{email_server_setting.rb → authproxy_setting.rb} +40 -49
- data/lib/harbor_swagger_client/models/{cve_whitelist.rb → cve_allowlist.rb} +32 -11
- data/lib/harbor_swagger_client/models/{cve_whitelist_item.rb → cve_allowlist_item.rb} +5 -4
- data/lib/harbor_swagger_client/models/{ldap_failed_import_users.rb → error.rb} +20 -18
- data/lib/harbor_swagger_client/models/{action_1.rb → errors.rb} +14 -10
- data/lib/harbor_swagger_client/models/{retention_execution.rb → execution.rb} +67 -31
- data/lib/harbor_swagger_client/models/{event_type.rb → extra_attrs.rb} +4 -4
- data/lib/harbor_swagger_client/models/general_info.rb +47 -6
- data/lib/harbor_swagger_client/models/{endpoint.rb → icon.rb} +19 -18
- data/lib/harbor_swagger_client/models/instance.rb +297 -0
- data/lib/harbor_swagger_client/models/label.rb +16 -25
- data/lib/harbor_swagger_client/models/{scanner.rb → metadata.rb} +49 -16
- data/lib/harbor_swagger_client/models/{webhook_job.rb → metrics.rb} +54 -64
- data/lib/harbor_swagger_client/models/{component_overview_entry.rb → native_report_summary.rb} +74 -13
- data/lib/harbor_swagger_client/models/permission.rb +29 -18
- data/lib/harbor_swagger_client/models/{retention_policy.rb → platform.rb} +42 -37
- data/lib/harbor_swagger_client/models/{webhook_policy.rb → preheat_policy.rb} +56 -48
- data/lib/harbor_swagger_client/models/project.rb +23 -12
- data/lib/harbor_swagger_client/models/{configurations_scan_all_policy.rb → project_deletable.rb} +19 -17
- data/lib/harbor_swagger_client/models/project_metadata.rb +21 -10
- data/lib/harbor_swagger_client/models/project_req.rb +34 -23
- data/lib/harbor_swagger_client/models/project_summary.rb +33 -13
- data/lib/harbor_swagger_client/models/project_summary_quota.rb +3 -2
- data/lib/harbor_swagger_client/models/{immutable_tag_rule.rb → provider_under_project.rb} +23 -22
- data/lib/harbor_swagger_client/models/{stats.rb → reference.rb} +52 -34
- data/lib/harbor_swagger_client/models/registry.rb +3 -2
- data/lib/harbor_swagger_client/models/registry_credential.rb +3 -2
- data/lib/harbor_swagger_client/models/replication_execution.rb +45 -44
- data/lib/harbor_swagger_client/models/replication_task.rb +43 -32
- data/lib/harbor_swagger_client/models/{robot_account.rb → repository.rb} +36 -36
- data/lib/harbor_swagger_client/models/resource_list.rb +3 -2
- data/lib/harbor_swagger_client/models/{replication_policy.rb → robot.rb} +62 -71
- data/lib/harbor_swagger_client/models/{put_registry.rb → robot_create.rb} +44 -41
- data/lib/harbor_swagger_client/models/{robot_account_create.rb → robot_create_v1.rb} +5 -4
- data/lib/harbor_swagger_client/models/{quota.rb → robot_created.rb} +30 -39
- data/lib/harbor_swagger_client/models/{input_secret.rb → robot_sec.rb} +6 -4
- data/lib/harbor_swagger_client/models/{notify_type.rb → scan_overview.rb} +5 -4
- data/lib/harbor_swagger_client/models/{action.rb → start_replication_execution.rb} +12 -10
- data/lib/harbor_swagger_client/models/storage.rb +3 -2
- data/lib/harbor_swagger_client/models/system_info.rb +3 -2
- data/lib/harbor_swagger_client/models/{retention_rule.rb → tag.rb} +55 -52
- data/lib/harbor_swagger_client/models/{retention_execution_task.rb → task.rb} +53 -52
- data/lib/harbor_swagger_client/models/{scanner_adapter_metadata.rb → vulnerability_summary.rb} +28 -26
- data/lib/harbor_swagger_client/version.rb +2 -2
- data/spec/api/artifact_api_spec.rb +209 -0
- data/spec/api/auditlog_api_spec.rb +50 -0
- data/spec/api/icon_api_spec.rb +48 -0
- data/spec/api/ping_api_spec.rb +46 -0
- data/spec/api/preheat_api_spec.rb +311 -0
- data/spec/api/project_api_spec.rb +161 -0
- data/spec/api/replication_api_spec.rb +116 -0
- data/spec/api/repository_api_spec.rb +94 -0
- data/spec/api/robot_api_spec.rb +117 -0
- data/spec/api/robotv1_api_spec.rb +108 -0
- data/spec/api/scan_api_spec.rb +20 -11
- data/spec/api/systeminfo_api_spec.rb +68 -0
- data/spec/api_client_spec.rb +18 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/{search_spec.rb → access_spec.rb} +10 -10
- data/spec/models/{password_spec.rb → addition_link_spec.rb} +9 -9
- data/spec/models/{quota_ref_object_spec.rb → addition_links_spec.rb} +7 -7
- data/spec/models/{labels_spec.rb → annotations_spec.rb} +7 -7
- data/spec/models/{chart_version_spec.rb → artifact_spec.rb} +39 -21
- data/spec/models/{search_repository_spec.rb → audit_log_spec.rb} +13 -13
- data/spec/models/authproxy_setting_spec.rb +65 -0
- data/spec/models/{cve_whitelist_item_spec.rb → cve_allowlist_item_spec.rb} +7 -7
- data/spec/models/{quota_spec.rb → cve_allowlist_spec.rb} +10 -10
- data/spec/models/{endpoint_spec.rb → error_spec.rb} +9 -9
- data/spec/models/{action_spec.rb → errors_spec.rb} +8 -8
- data/spec/models/{gc_result_spec.rb → execution_spec.rb} +21 -15
- data/spec/models/{event_type_spec.rb → extra_attrs_spec.rb} +7 -7
- data/spec/models/general_info_spec.rb +25 -1
- data/spec/models/{namespace_spec.rb → icon_spec.rb} +9 -9
- data/spec/models/{chart_metadata_spec.rb → instance_spec.rb} +23 -17
- data/spec/models/label_spec.rb +1 -7
- data/spec/models/{email_server_setting_spec.rb → metadata_spec.rb} +13 -13
- data/spec/models/{ping_registry_spec.rb → metrics_spec.rb} +14 -14
- data/spec/models/{ldap_conf_spec.rb → native_report_summary_spec.rb} +15 -15
- data/spec/models/permission_spec.rb +9 -3
- data/spec/models/{registry_info_spec.rb → platform_spec.rb} +17 -11
- data/spec/models/{webhook_policy_spec.rb → preheat_policy_spec.rb} +19 -13
- data/spec/models/{bool_config_item_spec.rb → project_deletable_spec.rb} +9 -9
- data/spec/models/project_metadata_spec.rb +8 -2
- data/spec/models/project_req_spec.rb +10 -4
- data/spec/models/project_spec.rb +8 -2
- data/spec/models/project_summary_quota_spec.rb +1 -1
- data/spec/models/project_summary_spec.rb +14 -2
- data/spec/models/{immutable_tag_rule_spec.rb → provider_under_project_spec.rb} +10 -10
- data/spec/models/{statistic_map_spec.rb → reference_spec.rb} +13 -13
- data/spec/models/registry_credential_spec.rb +1 -1
- data/spec/models/registry_spec.rb +1 -1
- data/spec/models/replication_execution_spec.rb +10 -10
- data/spec/models/replication_task_spec.rb +12 -6
- data/spec/models/{robot_account_spec.rb → repository_spec.rb} +12 -12
- data/spec/models/resource_list_spec.rb +1 -1
- data/spec/models/{put_registry_spec.rb → robot_create_spec.rb} +12 -12
- data/spec/models/{robot_account_create_spec.rb → robot_create_v1_spec.rb} +7 -7
- data/spec/models/{retention_policy_spec.rb → robot_created_spec.rb} +11 -11
- data/spec/models/{input_secret_spec.rb → robot_sec_spec.rb} +7 -7
- data/spec/models/{replication_policy_spec.rb → robot_spec.rb} +14 -20
- data/spec/models/{notify_type_spec.rb → scan_overview_spec.rb} +7 -7
- data/spec/models/{unauthorized_chart_api_error_spec.rb → start_replication_execution_spec.rb} +8 -8
- data/spec/models/storage_spec.rb +1 -1
- data/spec/models/system_info_spec.rb +1 -1
- data/spec/models/{webhook_job_spec.rb → tag_spec.rb} +14 -14
- data/spec/models/{retention_execution_task_spec.rb → task_spec.rb} +15 -21
- data/spec/models/{project_member_spec.rb → vulnerability_summary_spec.rb} +10 -10
- data/spec/spec_helper.rb +1 -1
- metadata +204 -423
- data/docs/AdminJobSchedule.md +0 -9
- data/docs/AdminJobScheduleObj.md +0 -9
- data/docs/BadRequestFormatedError.md +0 -8
- data/docs/BoolConfigItem.md +0 -9
- data/docs/CVEWhitelist.md +0 -11
- data/docs/ChartAPIError.md +0 -8
- data/docs/ChartMetadata.md +0 -18
- data/docs/ChartRepositoryApi.md +0 -191
- data/docs/ChartVersion.md +0 -22
- data/docs/ComponentHealthStatus.md +0 -10
- data/docs/ComponentOverviewEntry.md +0 -9
- data/docs/Configurations.md +0 -42
- data/docs/ConfigurationsResponse.md +0 -41
- data/docs/ConfigurationsScanAllPolicy.md +0 -9
- data/docs/ConfigurationsScanAllPolicyParameter.md +0 -8
- data/docs/ConflictFormatedError.md +0 -8
- data/docs/EmailServerSetting.md +0 -13
- data/docs/Endpoint.md +0 -9
- data/docs/FilterStyle.md +0 -10
- data/docs/ForbiddenChartAPIError.md +0 -8
- data/docs/GCResult.md +0 -16
- data/docs/InputSecret.md +0 -8
- data/docs/InsufficientStorageChartAPIError.md +0 -8
- data/docs/IntegerConfigItem.md +0 -9
- data/docs/InternalChartAPIError.md +0 -8
- data/docs/IsDefault.md +0 -8
- data/docs/LabelApi.md +0 -191
- data/docs/LdapConf.md +0 -15
- data/docs/LdapFailedImportUsers.md +0 -9
- data/docs/LdapImportUsers.md +0 -8
- data/docs/LdapUsers.md +0 -10
- data/docs/Namespace.md +0 -9
- data/docs/NotFoundChartAPIError.md +0 -8
- data/docs/OverallHealthStatus.md +0 -9
- data/docs/Password.md +0 -9
- data/docs/PingRegistry.md +0 -14
- data/docs/ProductsApi.md +0 -6768
- data/docs/ProjectMember.md +0 -10
- data/docs/ProjectMemberEntity.md +0 -14
- data/docs/ProjectScanner.md +0 -8
- data/docs/PutRegistry.md +0 -14
- data/docs/Quota.md +0 -13
- data/docs/QuotaApi.md +0 -118
- data/docs/QuotaSwitcher.md +0 -8
- data/docs/QuotaUpdateReq.md +0 -8
- data/docs/RegistryInfo.md +0 -11
- data/docs/ReplicationFilter.md +0 -9
- data/docs/ReplicationPolicy.md +0 -20
- data/docs/ReplicationTrigger.md +0 -9
- data/docs/RetentionApi.md +0 -449
- data/docs/RetentionExecution.md +0 -14
- data/docs/RetentionExecutionTask.md +0 -18
- data/docs/RetentionMetadata.md +0 -10
- data/docs/RetentionPolicy.md +0 -12
- data/docs/RetentionPolicyScope.md +0 -9
- data/docs/RetentionRule.md +0 -15
- data/docs/RetentionRuleMetadata.md +0 -11
- data/docs/RetentionRuleParamMetadata.md +0 -10
- data/docs/RetentionRuleTrigger.md +0 -10
- data/docs/RetentionSelector.md +0 -11
- data/docs/RetentionSelectorMetadata.md +0 -10
- data/docs/RobotAccount.md +0 -15
- data/docs/RobotAccountAccess.md +0 -9
- data/docs/RobotAccountApi.md +0 -291
- data/docs/RobotAccountPostRep.md +0 -9
- data/docs/RobotAccountUpdate.md +0 -8
- data/docs/Role.md +0 -11
- data/docs/RoleParam.md +0 -9
- data/docs/RoleRequest.md +0 -8
- data/docs/Scanner.md +0 -10
- data/docs/ScannerAdapterMetadata.md +0 -10
- data/docs/ScannerCapability.md +0 -9
- data/docs/ScannerRegistration.md +0 -21
- data/docs/ScannerRegistrationReq.md +0 -15
- data/docs/ScannerRegistrationSettings.md +0 -11
- data/docs/ScannersApi.md +0 -600
- data/docs/Search.md +0 -10
- data/docs/SearchRepository.md +0 -13
- data/docs/SearchResult.md +0 -10
- data/docs/StatisticMap.md +0 -13
- data/docs/Stats.md +0 -11
- data/docs/StringConfigItem.md +0 -9
- data/docs/SupportedWebhookEventTypes.md +0 -9
- data/docs/SysAdminFlag.md +0 -8
- data/docs/SystemApi.md +0 -163
- data/docs/TriggerSettings.md +0 -8
- data/docs/UnauthorizedChartAPIError.md +0 -8
- data/docs/User.md +0 -22
- data/docs/UserEntity.md +0 -9
- data/docs/UserGroup.md +0 -11
- data/docs/UserProfile.md +0 -10
- data/docs/UserSearch.md +0 -9
- data/docs/WebhookJob.md +0 -15
- data/docs/WebhookLastTrigger.md +0 -11
- data/docs/WebhookPolicy.md +0 -17
- data/docs/WebhookTargetObject.md +0 -11
- data/lib/harbor_swagger_client/api/chart_repository_api.rb +0 -230
- data/lib/harbor_swagger_client/api/label_api.rb +0 -230
- data/lib/harbor_swagger_client/api/products_api.rb +0 -6879
- data/lib/harbor_swagger_client/api/quota_api.rb +0 -136
- data/lib/harbor_swagger_client/api/retention_api.rb +0 -482
- data/lib/harbor_swagger_client/api/robot_account_api.rb +0 -321
- data/lib/harbor_swagger_client/api/scanners_api.rb +0 -624
- data/lib/harbor_swagger_client/api/system_api.rb +0 -173
- data/lib/harbor_swagger_client/models/admin_job_schedule.rb +0 -195
- data/lib/harbor_swagger_client/models/admin_job_schedule_obj.rb +0 -194
- data/lib/harbor_swagger_client/models/bad_request_formated_error.rb +0 -190
- data/lib/harbor_swagger_client/models/bool_config_item.rb +0 -194
- data/lib/harbor_swagger_client/models/chart_api_error.rb +0 -190
- data/lib/harbor_swagger_client/models/chart_metadata.rb +0 -319
- data/lib/harbor_swagger_client/models/component_health_status.rb +0 -205
- data/lib/harbor_swagger_client/models/configurations.rb +0 -523
- data/lib/harbor_swagger_client/models/configurations_response.rb +0 -513
- data/lib/harbor_swagger_client/models/configurations_scan_all_policy_parameter.rb +0 -185
- data/lib/harbor_swagger_client/models/conflict_formated_error.rb +0 -190
- data/lib/harbor_swagger_client/models/filter_style.rb +0 -207
- data/lib/harbor_swagger_client/models/forbidden_chart_api_error.rb +0 -190
- data/lib/harbor_swagger_client/models/gc_result.rb +0 -263
- data/lib/harbor_swagger_client/models/insufficient_storage_chart_api_error.rb +0 -190
- data/lib/harbor_swagger_client/models/integer_config_item.rb +0 -194
- data/lib/harbor_swagger_client/models/internal_chart_api_error.rb +0 -190
- data/lib/harbor_swagger_client/models/is_default.rb +0 -184
- data/lib/harbor_swagger_client/models/ldap_conf.rb +0 -254
- data/lib/harbor_swagger_client/models/ldap_import_users.rb +0 -186
- data/lib/harbor_swagger_client/models/ldap_users.rb +0 -204
- data/lib/harbor_swagger_client/models/not_found_chart_api_error.rb +0 -190
- data/lib/harbor_swagger_client/models/overall_health_status.rb +0 -196
- data/lib/harbor_swagger_client/models/password.rb +0 -194
- data/lib/harbor_swagger_client/models/ping_registry.rb +0 -244
- data/lib/harbor_swagger_client/models/project_member.rb +0 -202
- data/lib/harbor_swagger_client/models/project_member_entity.rb +0 -244
- data/lib/harbor_swagger_client/models/project_scanner.rb +0 -184
- data/lib/harbor_swagger_client/models/quota_switcher.rb +0 -184
- data/lib/harbor_swagger_client/models/quota_update_req.rb +0 -184
- data/lib/harbor_swagger_client/models/registry_info.rb +0 -219
- data/lib/harbor_swagger_client/models/replication_filter.rb +0 -194
- data/lib/harbor_swagger_client/models/replication_trigger.rb +0 -193
- data/lib/harbor_swagger_client/models/retention_metadata.rb +0 -211
- data/lib/harbor_swagger_client/models/retention_policy_scope.rb +0 -192
- data/lib/harbor_swagger_client/models/retention_rule_metadata.rb +0 -217
- data/lib/harbor_swagger_client/models/retention_rule_param_metadata.rb +0 -202
- data/lib/harbor_swagger_client/models/retention_rule_trigger.rb +0 -201
- data/lib/harbor_swagger_client/models/retention_selector.rb +0 -210
- data/lib/harbor_swagger_client/models/retention_selector_metadata.rb +0 -204
- data/lib/harbor_swagger_client/models/robot_account_post_rep.rb +0 -194
- data/lib/harbor_swagger_client/models/robot_account_update.rb +0 -184
- data/lib/harbor_swagger_client/models/role.rb +0 -213
- data/lib/harbor_swagger_client/models/role_param.rb +0 -196
- data/lib/harbor_swagger_client/models/role_request.rb +0 -184
- data/lib/harbor_swagger_client/models/scanner_capability.rb +0 -196
- data/lib/harbor_swagger_client/models/scanner_registration.rb +0 -327
- data/lib/harbor_swagger_client/models/scanner_registration_req.rb +0 -262
- data/lib/harbor_swagger_client/models/scanner_registration_settings.rb +0 -216
- data/lib/harbor_swagger_client/models/search.rb +0 -210
- data/lib/harbor_swagger_client/models/search_repository.rb +0 -234
- data/lib/harbor_swagger_client/models/search_result.rb +0 -204
- data/lib/harbor_swagger_client/models/statistic_map.rb +0 -234
- data/lib/harbor_swagger_client/models/string_config_item.rb +0 -194
- data/lib/harbor_swagger_client/models/supported_webhook_event_types.rb +0 -197
- data/lib/harbor_swagger_client/models/sys_admin_flag.rb +0 -184
- data/lib/harbor_swagger_client/models/trigger_settings.rb +0 -184
- data/lib/harbor_swagger_client/models/unauthorized_chart_api_error.rb +0 -190
- data/lib/harbor_swagger_client/models/user.rb +0 -311
- data/lib/harbor_swagger_client/models/user_entity.rb +0 -194
- data/lib/harbor_swagger_client/models/user_group.rb +0 -214
- data/lib/harbor_swagger_client/models/user_profile.rb +0 -204
- data/lib/harbor_swagger_client/models/user_search.rb +0 -193
- data/lib/harbor_swagger_client/models/webhook_last_trigger.rb +0 -215
- data/lib/harbor_swagger_client/models/webhook_target_object.rb +0 -215
- data/spec/api/chart_repository_api_spec.rb +0 -79
- data/spec/api/label_api_spec.rb +0 -79
- data/spec/api/products_api_spec.rb +0 -1581
- data/spec/api/quota_api_spec.rb +0 -60
- data/spec/api/retention_api_spec.rb +0 -136
- data/spec/api/robot_account_api_spec.rb +0 -100
- data/spec/api/scanners_api_spec.rb +0 -169
- data/spec/api/system_api_spec.rb +0 -70
- data/spec/models/action_1_spec.rb +0 -41
- data/spec/models/admin_job_schedule_obj_spec.rb +0 -47
- data/spec/models/admin_job_schedule_spec.rb +0 -47
- data/spec/models/bad_request_formated_error_spec.rb +0 -41
- data/spec/models/chart_api_error_spec.rb +0 -41
- data/spec/models/component_health_status_spec.rb +0 -53
- data/spec/models/component_overview_entry_spec.rb +0 -47
- data/spec/models/configurations_response_spec.rb +0 -239
- data/spec/models/configurations_scan_all_policy_parameter_spec.rb +0 -41
- data/spec/models/configurations_scan_all_policy_spec.rb +0 -47
- data/spec/models/configurations_spec.rb +0 -245
- data/spec/models/conflict_formated_error_spec.rb +0 -41
- data/spec/models/cve_whitelist_spec.rb +0 -59
- data/spec/models/filter_style_spec.rb +0 -53
- data/spec/models/forbidden_chart_api_error_spec.rb +0 -41
- data/spec/models/insufficient_storage_chart_api_error_spec.rb +0 -41
- data/spec/models/integer_config_item_spec.rb +0 -47
- data/spec/models/internal_chart_api_error_spec.rb +0 -41
- data/spec/models/is_default_spec.rb +0 -41
- data/spec/models/ldap_failed_import_users_spec.rb +0 -47
- data/spec/models/ldap_import_users_spec.rb +0 -41
- data/spec/models/ldap_users_spec.rb +0 -53
- data/spec/models/not_found_chart_api_error_spec.rb +0 -41
- data/spec/models/overall_health_status_spec.rb +0 -47
- data/spec/models/project_member_entity_spec.rb +0 -77
- data/spec/models/project_scanner_spec.rb +0 -41
- data/spec/models/quota_switcher_spec.rb +0 -41
- data/spec/models/quota_update_req_spec.rb +0 -41
- data/spec/models/replication_filter_spec.rb +0 -47
- data/spec/models/replication_trigger_spec.rb +0 -47
- data/spec/models/retention_execution_spec.rb +0 -77
- data/spec/models/retention_metadata_spec.rb +0 -53
- data/spec/models/retention_policy_scope_spec.rb +0 -47
- data/spec/models/retention_rule_metadata_spec.rb +0 -59
- data/spec/models/retention_rule_param_metadata_spec.rb +0 -53
- data/spec/models/retention_rule_spec.rb +0 -83
- data/spec/models/retention_rule_trigger_spec.rb +0 -53
- data/spec/models/retention_selector_metadata_spec.rb +0 -53
- data/spec/models/retention_selector_spec.rb +0 -59
- data/spec/models/robot_account_access_spec.rb +0 -47
- data/spec/models/robot_account_post_rep_spec.rb +0 -47
- data/spec/models/robot_account_update_spec.rb +0 -41
- data/spec/models/role_param_spec.rb +0 -47
- data/spec/models/role_request_spec.rb +0 -41
- data/spec/models/role_spec.rb +0 -59
- data/spec/models/scanner_adapter_metadata_spec.rb +0 -53
- data/spec/models/scanner_capability_spec.rb +0 -47
- data/spec/models/scanner_registration_req_spec.rb +0 -83
- data/spec/models/scanner_registration_settings_spec.rb +0 -59
- data/spec/models/scanner_registration_spec.rb +0 -119
- data/spec/models/scanner_spec.rb +0 -53
- data/spec/models/search_result_spec.rb +0 -53
- data/spec/models/stats_spec.rb +0 -59
- data/spec/models/string_config_item_spec.rb +0 -47
- data/spec/models/supported_webhook_event_types_spec.rb +0 -47
- data/spec/models/sys_admin_flag_spec.rb +0 -41
- data/spec/models/trigger_settings_spec.rb +0 -41
- data/spec/models/user_entity_spec.rb +0 -47
- data/spec/models/user_group_spec.rb +0 -59
- data/spec/models/user_profile_spec.rb +0 -53
- data/spec/models/user_search_spec.rb +0 -47
- data/spec/models/user_spec.rb +0 -125
- data/spec/models/webhook_last_trigger_spec.rb +0 -59
- data/spec/models/webhook_target_object_spec.rb +0 -59
@@ -0,0 +1,380 @@
|
|
1
|
+
=begin
|
2
|
+
#Harbor API
|
3
|
+
|
4
|
+
#These APIs provide services for manipulating Harbor project.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.17
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module SwaggerClient
|
16
|
+
class ReplicationApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get the specific replication execution
|
23
|
+
# Get the replication execution specified by ID
|
24
|
+
# @param id The ID of the execution.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [ReplicationExecution]
|
27
|
+
def get_replication_execution(id, opts = {})
|
28
|
+
data, _status_code, _headers = get_replication_execution_with_http_info(id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get the specific replication execution
|
33
|
+
# Get the replication execution specified by ID
|
34
|
+
# @param id The ID of the execution.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(ReplicationExecution, Fixnum, Hash)>] ReplicationExecution data, response status code and response headers
|
37
|
+
def get_replication_execution_with_http_info(id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ReplicationApi.get_replication_execution ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'id' is set
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ReplicationApi.get_replication_execution"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/replication/executions/{id}'.sub('{' + 'id' + '}', id.to_s)
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = nil
|
63
|
+
auth_names = ['basic']
|
64
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
65
|
+
:header_params => header_params,
|
66
|
+
:query_params => query_params,
|
67
|
+
:form_params => form_params,
|
68
|
+
:body => post_body,
|
69
|
+
:auth_names => auth_names,
|
70
|
+
:return_type => 'ReplicationExecution')
|
71
|
+
if @api_client.config.debugging
|
72
|
+
@api_client.config.logger.debug "API called: ReplicationApi#get_replication_execution\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
73
|
+
end
|
74
|
+
return data, status_code, headers
|
75
|
+
end
|
76
|
+
# Get the log of the specific replication task
|
77
|
+
# Get the log of the specific replication task
|
78
|
+
# @param id The ID of the execution that the tasks belongs to.
|
79
|
+
# @param task_id The ID of the task.
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [String]
|
82
|
+
def get_replication_log(id, task_id, opts = {})
|
83
|
+
data, _status_code, _headers = get_replication_log_with_http_info(id, task_id, opts)
|
84
|
+
data
|
85
|
+
end
|
86
|
+
|
87
|
+
# Get the log of the specific replication task
|
88
|
+
# Get the log of the specific replication task
|
89
|
+
# @param id The ID of the execution that the tasks belongs to.
|
90
|
+
# @param task_id The ID of the task.
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
93
|
+
def get_replication_log_with_http_info(id, task_id, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug 'Calling API: ReplicationApi.get_replication_log ...'
|
96
|
+
end
|
97
|
+
# verify the required parameter 'id' is set
|
98
|
+
if @api_client.config.client_side_validation && id.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ReplicationApi.get_replication_log"
|
100
|
+
end
|
101
|
+
# verify the required parameter 'task_id' is set
|
102
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
103
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling ReplicationApi.get_replication_log"
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/replication/executions/{id}/tasks/{task_id}/log'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'task_id' + '}', task_id.to_s)
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
# HTTP header 'Content-Type'
|
116
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = nil
|
123
|
+
auth_names = ['basic']
|
124
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
125
|
+
:header_params => header_params,
|
126
|
+
:query_params => query_params,
|
127
|
+
:form_params => form_params,
|
128
|
+
:body => post_body,
|
129
|
+
:auth_names => auth_names,
|
130
|
+
:return_type => 'String')
|
131
|
+
if @api_client.config.debugging
|
132
|
+
@api_client.config.logger.debug "API called: ReplicationApi#get_replication_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
133
|
+
end
|
134
|
+
return data, status_code, headers
|
135
|
+
end
|
136
|
+
# List replication executions
|
137
|
+
# List replication executions
|
138
|
+
# @param [Hash] opts the optional parameters
|
139
|
+
# @option opts [Integer] :page The page number (default to 1)
|
140
|
+
# @option opts [Integer] :page_size The size of per page (default to 10)
|
141
|
+
# @option opts [Integer] :policy_id The ID of the policy that the executions belong to.
|
142
|
+
# @option opts [String] :status The execution status.
|
143
|
+
# @option opts [String] :trigger The trigger mode.
|
144
|
+
# @return [Array<ReplicationExecution>]
|
145
|
+
def list_replication_executions(opts = {})
|
146
|
+
data, _status_code, _headers = list_replication_executions_with_http_info(opts)
|
147
|
+
data
|
148
|
+
end
|
149
|
+
|
150
|
+
# List replication executions
|
151
|
+
# List replication executions
|
152
|
+
# @param [Hash] opts the optional parameters
|
153
|
+
# @option opts [Integer] :page The page number
|
154
|
+
# @option opts [Integer] :page_size The size of per page
|
155
|
+
# @option opts [Integer] :policy_id The ID of the policy that the executions belong to.
|
156
|
+
# @option opts [String] :status The execution status.
|
157
|
+
# @option opts [String] :trigger The trigger mode.
|
158
|
+
# @return [Array<(Array<ReplicationExecution>, Fixnum, Hash)>] Array<ReplicationExecution> data, response status code and response headers
|
159
|
+
def list_replication_executions_with_http_info(opts = {})
|
160
|
+
if @api_client.config.debugging
|
161
|
+
@api_client.config.logger.debug 'Calling API: ReplicationApi.list_replication_executions ...'
|
162
|
+
end
|
163
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
164
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ReplicationApi.list_replication_executions, must be smaller than or equal to 100.'
|
165
|
+
end
|
166
|
+
|
167
|
+
# resource path
|
168
|
+
local_var_path = '/replication/executions'
|
169
|
+
|
170
|
+
# query parameters
|
171
|
+
query_params = {}
|
172
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
173
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
174
|
+
query_params[:'policy_id'] = opts[:'policy_id'] if !opts[:'policy_id'].nil?
|
175
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
176
|
+
query_params[:'trigger'] = opts[:'trigger'] if !opts[:'trigger'].nil?
|
177
|
+
|
178
|
+
# header parameters
|
179
|
+
header_params = {}
|
180
|
+
# HTTP header 'Accept' (if needed)
|
181
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
182
|
+
# HTTP header 'Content-Type'
|
183
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
184
|
+
|
185
|
+
# form parameters
|
186
|
+
form_params = {}
|
187
|
+
|
188
|
+
# http body (model)
|
189
|
+
post_body = nil
|
190
|
+
auth_names = ['basic']
|
191
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
192
|
+
:header_params => header_params,
|
193
|
+
:query_params => query_params,
|
194
|
+
:form_params => form_params,
|
195
|
+
:body => post_body,
|
196
|
+
:auth_names => auth_names,
|
197
|
+
:return_type => 'Array<ReplicationExecution>')
|
198
|
+
if @api_client.config.debugging
|
199
|
+
@api_client.config.logger.debug "API called: ReplicationApi#list_replication_executions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
200
|
+
end
|
201
|
+
return data, status_code, headers
|
202
|
+
end
|
203
|
+
# List replication tasks for a specific execution
|
204
|
+
# List replication tasks for a specific execution
|
205
|
+
# @param id The ID of the execution that the tasks belongs to.
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @option opts [Integer] :page The page number (default to 1)
|
208
|
+
# @option opts [Integer] :page_size The size of per page (default to 10)
|
209
|
+
# @option opts [String] :status The task status.
|
210
|
+
# @option opts [String] :resource_type The resource type.
|
211
|
+
# @return [Array<ReplicationTask>]
|
212
|
+
def list_replication_tasks(id, opts = {})
|
213
|
+
data, _status_code, _headers = list_replication_tasks_with_http_info(id, opts)
|
214
|
+
data
|
215
|
+
end
|
216
|
+
|
217
|
+
# List replication tasks for a specific execution
|
218
|
+
# List replication tasks for a specific execution
|
219
|
+
# @param id The ID of the execution that the tasks belongs to.
|
220
|
+
# @param [Hash] opts the optional parameters
|
221
|
+
# @option opts [Integer] :page The page number
|
222
|
+
# @option opts [Integer] :page_size The size of per page
|
223
|
+
# @option opts [String] :status The task status.
|
224
|
+
# @option opts [String] :resource_type The resource type.
|
225
|
+
# @return [Array<(Array<ReplicationTask>, Fixnum, Hash)>] Array<ReplicationTask> data, response status code and response headers
|
226
|
+
def list_replication_tasks_with_http_info(id, opts = {})
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug 'Calling API: ReplicationApi.list_replication_tasks ...'
|
229
|
+
end
|
230
|
+
# verify the required parameter 'id' is set
|
231
|
+
if @api_client.config.client_side_validation && id.nil?
|
232
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ReplicationApi.list_replication_tasks"
|
233
|
+
end
|
234
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
235
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ReplicationApi.list_replication_tasks, must be smaller than or equal to 100.'
|
236
|
+
end
|
237
|
+
|
238
|
+
# resource path
|
239
|
+
local_var_path = '/replication/executions/{id}/tasks'.sub('{' + 'id' + '}', id.to_s)
|
240
|
+
|
241
|
+
# query parameters
|
242
|
+
query_params = {}
|
243
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
244
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
245
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
246
|
+
query_params[:'resource_type'] = opts[:'resource_type'] if !opts[:'resource_type'].nil?
|
247
|
+
|
248
|
+
# header parameters
|
249
|
+
header_params = {}
|
250
|
+
# HTTP header 'Accept' (if needed)
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
252
|
+
# HTTP header 'Content-Type'
|
253
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
254
|
+
|
255
|
+
# form parameters
|
256
|
+
form_params = {}
|
257
|
+
|
258
|
+
# http body (model)
|
259
|
+
post_body = nil
|
260
|
+
auth_names = ['basic']
|
261
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
262
|
+
:header_params => header_params,
|
263
|
+
:query_params => query_params,
|
264
|
+
:form_params => form_params,
|
265
|
+
:body => post_body,
|
266
|
+
:auth_names => auth_names,
|
267
|
+
:return_type => 'Array<ReplicationTask>')
|
268
|
+
if @api_client.config.debugging
|
269
|
+
@api_client.config.logger.debug "API called: ReplicationApi#list_replication_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
270
|
+
end
|
271
|
+
return data, status_code, headers
|
272
|
+
end
|
273
|
+
# Start one replication execution
|
274
|
+
# Start one replication execution according to the policy
|
275
|
+
# @param execution The ID of policy that the execution belongs to
|
276
|
+
# @param [Hash] opts the optional parameters
|
277
|
+
# @return [nil]
|
278
|
+
def start_replication(execution, opts = {})
|
279
|
+
start_replication_with_http_info(execution, opts)
|
280
|
+
nil
|
281
|
+
end
|
282
|
+
|
283
|
+
# Start one replication execution
|
284
|
+
# Start one replication execution according to the policy
|
285
|
+
# @param execution The ID of policy that the execution belongs to
|
286
|
+
# @param [Hash] opts the optional parameters
|
287
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
288
|
+
def start_replication_with_http_info(execution, opts = {})
|
289
|
+
if @api_client.config.debugging
|
290
|
+
@api_client.config.logger.debug 'Calling API: ReplicationApi.start_replication ...'
|
291
|
+
end
|
292
|
+
# verify the required parameter 'execution' is set
|
293
|
+
if @api_client.config.client_side_validation && execution.nil?
|
294
|
+
fail ArgumentError, "Missing the required parameter 'execution' when calling ReplicationApi.start_replication"
|
295
|
+
end
|
296
|
+
# resource path
|
297
|
+
local_var_path = '/replication/executions'
|
298
|
+
|
299
|
+
# query parameters
|
300
|
+
query_params = {}
|
301
|
+
|
302
|
+
# header parameters
|
303
|
+
header_params = {}
|
304
|
+
# HTTP header 'Accept' (if needed)
|
305
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
306
|
+
# HTTP header 'Content-Type'
|
307
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
308
|
+
|
309
|
+
# form parameters
|
310
|
+
form_params = {}
|
311
|
+
|
312
|
+
# http body (model)
|
313
|
+
post_body = @api_client.object_to_http_body(execution)
|
314
|
+
auth_names = ['basic']
|
315
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
316
|
+
:header_params => header_params,
|
317
|
+
:query_params => query_params,
|
318
|
+
:form_params => form_params,
|
319
|
+
:body => post_body,
|
320
|
+
:auth_names => auth_names)
|
321
|
+
if @api_client.config.debugging
|
322
|
+
@api_client.config.logger.debug "API called: ReplicationApi#start_replication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
323
|
+
end
|
324
|
+
return data, status_code, headers
|
325
|
+
end
|
326
|
+
# Stop the specific replication execution
|
327
|
+
# Stop the replication execution specified by ID
|
328
|
+
# @param id The ID of the execution.
|
329
|
+
# @param [Hash] opts the optional parameters
|
330
|
+
# @return [nil]
|
331
|
+
def stop_replication(id, opts = {})
|
332
|
+
stop_replication_with_http_info(id, opts)
|
333
|
+
nil
|
334
|
+
end
|
335
|
+
|
336
|
+
# Stop the specific replication execution
|
337
|
+
# Stop the replication execution specified by ID
|
338
|
+
# @param id The ID of the execution.
|
339
|
+
# @param [Hash] opts the optional parameters
|
340
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
341
|
+
def stop_replication_with_http_info(id, opts = {})
|
342
|
+
if @api_client.config.debugging
|
343
|
+
@api_client.config.logger.debug 'Calling API: ReplicationApi.stop_replication ...'
|
344
|
+
end
|
345
|
+
# verify the required parameter 'id' is set
|
346
|
+
if @api_client.config.client_side_validation && id.nil?
|
347
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ReplicationApi.stop_replication"
|
348
|
+
end
|
349
|
+
# resource path
|
350
|
+
local_var_path = '/replication/executions/{id}'.sub('{' + 'id' + '}', id.to_s)
|
351
|
+
|
352
|
+
# query parameters
|
353
|
+
query_params = {}
|
354
|
+
|
355
|
+
# header parameters
|
356
|
+
header_params = {}
|
357
|
+
# HTTP header 'Accept' (if needed)
|
358
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
359
|
+
# HTTP header 'Content-Type'
|
360
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
361
|
+
|
362
|
+
# form parameters
|
363
|
+
form_params = {}
|
364
|
+
|
365
|
+
# http body (model)
|
366
|
+
post_body = nil
|
367
|
+
auth_names = ['basic']
|
368
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
369
|
+
:header_params => header_params,
|
370
|
+
:query_params => query_params,
|
371
|
+
:form_params => form_params,
|
372
|
+
:body => post_body,
|
373
|
+
:auth_names => auth_names)
|
374
|
+
if @api_client.config.debugging
|
375
|
+
@api_client.config.logger.debug "API called: ReplicationApi#stop_replication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
376
|
+
end
|
377
|
+
return data, status_code, headers
|
378
|
+
end
|
379
|
+
end
|
380
|
+
end
|
@@ -0,0 +1,302 @@
|
|
1
|
+
=begin
|
2
|
+
#Harbor API
|
3
|
+
|
4
|
+
#These APIs provide services for manipulating Harbor project.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.17
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module SwaggerClient
|
16
|
+
class RepositoryApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete repository
|
23
|
+
# Delete the repository specified by name
|
24
|
+
# @param project_name The name of the project
|
25
|
+
# @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [String] :x_request_id An unique ID for the request
|
28
|
+
# @return [nil]
|
29
|
+
def delete_repository(project_name, repository_name, opts = {})
|
30
|
+
delete_repository_with_http_info(project_name, repository_name, opts)
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
# Delete repository
|
35
|
+
# Delete the repository specified by name
|
36
|
+
# @param project_name The name of the project
|
37
|
+
# @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :x_request_id An unique ID for the request
|
40
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
41
|
+
def delete_repository_with_http_info(project_name, repository_name, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: RepositoryApi.delete_repository ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'project_name' is set
|
46
|
+
if @api_client.config.client_side_validation && project_name.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'project_name' when calling RepositoryApi.delete_repository"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'repository_name' is set
|
50
|
+
if @api_client.config.client_side_validation && repository_name.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'repository_name' when calling RepositoryApi.delete_repository"
|
52
|
+
end
|
53
|
+
if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
|
54
|
+
fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RepositoryApi.delete_repository, the character length must be great than or equal to 1.'
|
55
|
+
end
|
56
|
+
|
57
|
+
# resource path
|
58
|
+
local_var_path = '/projects/{project_name}/repositories/{repository_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'repository_name' + '}', repository_name.to_s)
|
59
|
+
|
60
|
+
# query parameters
|
61
|
+
query_params = {}
|
62
|
+
|
63
|
+
# header parameters
|
64
|
+
header_params = {}
|
65
|
+
# HTTP header 'Accept' (if needed)
|
66
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
67
|
+
# HTTP header 'Content-Type'
|
68
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
69
|
+
header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
|
70
|
+
|
71
|
+
# form parameters
|
72
|
+
form_params = {}
|
73
|
+
|
74
|
+
# http body (model)
|
75
|
+
post_body = nil
|
76
|
+
auth_names = ['basic']
|
77
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: RepositoryApi#delete_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
# Get repository
|
89
|
+
# Get the repository specified by name
|
90
|
+
# @param project_name The name of the project
|
91
|
+
# @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @option opts [String] :x_request_id An unique ID for the request
|
94
|
+
# @return [Repository]
|
95
|
+
def get_repository(project_name, repository_name, opts = {})
|
96
|
+
data, _status_code, _headers = get_repository_with_http_info(project_name, repository_name, opts)
|
97
|
+
data
|
98
|
+
end
|
99
|
+
|
100
|
+
# Get repository
|
101
|
+
# Get the repository specified by name
|
102
|
+
# @param project_name The name of the project
|
103
|
+
# @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @option opts [String] :x_request_id An unique ID for the request
|
106
|
+
# @return [Array<(Repository, Fixnum, Hash)>] Repository data, response status code and response headers
|
107
|
+
def get_repository_with_http_info(project_name, repository_name, opts = {})
|
108
|
+
if @api_client.config.debugging
|
109
|
+
@api_client.config.logger.debug 'Calling API: RepositoryApi.get_repository ...'
|
110
|
+
end
|
111
|
+
# verify the required parameter 'project_name' is set
|
112
|
+
if @api_client.config.client_side_validation && project_name.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'project_name' when calling RepositoryApi.get_repository"
|
114
|
+
end
|
115
|
+
# verify the required parameter 'repository_name' is set
|
116
|
+
if @api_client.config.client_side_validation && repository_name.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'repository_name' when calling RepositoryApi.get_repository"
|
118
|
+
end
|
119
|
+
if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
|
120
|
+
fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RepositoryApi.get_repository, the character length must be great than or equal to 1.'
|
121
|
+
end
|
122
|
+
|
123
|
+
# resource path
|
124
|
+
local_var_path = '/projects/{project_name}/repositories/{repository_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'repository_name' + '}', repository_name.to_s)
|
125
|
+
|
126
|
+
# query parameters
|
127
|
+
query_params = {}
|
128
|
+
|
129
|
+
# header parameters
|
130
|
+
header_params = {}
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
|
+
# HTTP header 'Content-Type'
|
134
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
135
|
+
header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
|
136
|
+
|
137
|
+
# form parameters
|
138
|
+
form_params = {}
|
139
|
+
|
140
|
+
# http body (model)
|
141
|
+
post_body = nil
|
142
|
+
auth_names = ['basic']
|
143
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
144
|
+
:header_params => header_params,
|
145
|
+
:query_params => query_params,
|
146
|
+
:form_params => form_params,
|
147
|
+
:body => post_body,
|
148
|
+
:auth_names => auth_names,
|
149
|
+
:return_type => 'Repository')
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug "API called: RepositoryApi#get_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
152
|
+
end
|
153
|
+
return data, status_code, headers
|
154
|
+
end
|
155
|
+
# List repositories
|
156
|
+
# List repositories of the specified project
|
157
|
+
# @param project_name The name of the project
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @option opts [String] :x_request_id An unique ID for the request
|
160
|
+
# @option opts [String] :q Query string to query resources. Supported query patterns are \"exact match(k=v)\", \"fuzzy match(k=~v)\", \"range(k=[min~max])\", \"list with union releationship(k={v1 v2 v3})\" and \"list with intersetion relationship(k=(v1 v2 v3))\". The value of range and list can be string(enclosed by \" or '), integer or time(in format \"2020-04-09 02:36:00\"). All of these query patterns should be put in the query string \"q=xxx\" and splitted by \",\". e.g. q=k1=v1,k2=~v2,k3=[min~max]
|
161
|
+
# @option opts [Integer] :page The page number (default to 1)
|
162
|
+
# @option opts [Integer] :page_size The size of per page (default to 10)
|
163
|
+
# @return [Array<Repository>]
|
164
|
+
def list_repositories(project_name, opts = {})
|
165
|
+
data, _status_code, _headers = list_repositories_with_http_info(project_name, opts)
|
166
|
+
data
|
167
|
+
end
|
168
|
+
|
169
|
+
# List repositories
|
170
|
+
# List repositories of the specified project
|
171
|
+
# @param project_name The name of the project
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @option opts [String] :x_request_id An unique ID for the request
|
174
|
+
# @option opts [String] :q Query string to query resources. Supported query patterns are \"exact match(k=v)\", \"fuzzy match(k=~v)\", \"range(k=[min~max])\", \"list with union releationship(k={v1 v2 v3})\" and \"list with intersetion relationship(k=(v1 v2 v3))\". The value of range and list can be string(enclosed by \" or '), integer or time(in format \"2020-04-09 02:36:00\"). All of these query patterns should be put in the query string \"q=xxx\" and splitted by \",\". e.g. q=k1=v1,k2=~v2,k3=[min~max]
|
175
|
+
# @option opts [Integer] :page The page number
|
176
|
+
# @option opts [Integer] :page_size The size of per page
|
177
|
+
# @return [Array<(Array<Repository>, Fixnum, Hash)>] Array<Repository> data, response status code and response headers
|
178
|
+
def list_repositories_with_http_info(project_name, opts = {})
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug 'Calling API: RepositoryApi.list_repositories ...'
|
181
|
+
end
|
182
|
+
# verify the required parameter 'project_name' is set
|
183
|
+
if @api_client.config.client_side_validation && project_name.nil?
|
184
|
+
fail ArgumentError, "Missing the required parameter 'project_name' when calling RepositoryApi.list_repositories"
|
185
|
+
end
|
186
|
+
if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
|
187
|
+
fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RepositoryApi.list_repositories, the character length must be great than or equal to 1.'
|
188
|
+
end
|
189
|
+
|
190
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
191
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling RepositoryApi.list_repositories, must be smaller than or equal to 100.'
|
192
|
+
end
|
193
|
+
|
194
|
+
# resource path
|
195
|
+
local_var_path = '/projects/{project_name}/repositories'.sub('{' + 'project_name' + '}', project_name.to_s)
|
196
|
+
|
197
|
+
# query parameters
|
198
|
+
query_params = {}
|
199
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
200
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
201
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
202
|
+
|
203
|
+
# header parameters
|
204
|
+
header_params = {}
|
205
|
+
# HTTP header 'Accept' (if needed)
|
206
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
207
|
+
# HTTP header 'Content-Type'
|
208
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
209
|
+
header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
|
210
|
+
|
211
|
+
# form parameters
|
212
|
+
form_params = {}
|
213
|
+
|
214
|
+
# http body (model)
|
215
|
+
post_body = nil
|
216
|
+
auth_names = ['basic']
|
217
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
218
|
+
:header_params => header_params,
|
219
|
+
:query_params => query_params,
|
220
|
+
:form_params => form_params,
|
221
|
+
:body => post_body,
|
222
|
+
:auth_names => auth_names,
|
223
|
+
:return_type => 'Array<Repository>')
|
224
|
+
if @api_client.config.debugging
|
225
|
+
@api_client.config.logger.debug "API called: RepositoryApi#list_repositories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
226
|
+
end
|
227
|
+
return data, status_code, headers
|
228
|
+
end
|
229
|
+
# Update repository
|
230
|
+
# Update the repository specified by name
|
231
|
+
# @param project_name The name of the project
|
232
|
+
# @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
|
233
|
+
# @param repository The JSON object of repository.
|
234
|
+
# @param [Hash] opts the optional parameters
|
235
|
+
# @option opts [String] :x_request_id An unique ID for the request
|
236
|
+
# @return [nil]
|
237
|
+
def update_repository(project_name, repository_name, repository, opts = {})
|
238
|
+
update_repository_with_http_info(project_name, repository_name, repository, opts)
|
239
|
+
nil
|
240
|
+
end
|
241
|
+
|
242
|
+
# Update repository
|
243
|
+
# Update the repository specified by name
|
244
|
+
# @param project_name The name of the project
|
245
|
+
# @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
|
246
|
+
# @param repository The JSON object of repository.
|
247
|
+
# @param [Hash] opts the optional parameters
|
248
|
+
# @option opts [String] :x_request_id An unique ID for the request
|
249
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
250
|
+
def update_repository_with_http_info(project_name, repository_name, repository, opts = {})
|
251
|
+
if @api_client.config.debugging
|
252
|
+
@api_client.config.logger.debug 'Calling API: RepositoryApi.update_repository ...'
|
253
|
+
end
|
254
|
+
# verify the required parameter 'project_name' is set
|
255
|
+
if @api_client.config.client_side_validation && project_name.nil?
|
256
|
+
fail ArgumentError, "Missing the required parameter 'project_name' when calling RepositoryApi.update_repository"
|
257
|
+
end
|
258
|
+
# verify the required parameter 'repository_name' is set
|
259
|
+
if @api_client.config.client_side_validation && repository_name.nil?
|
260
|
+
fail ArgumentError, "Missing the required parameter 'repository_name' when calling RepositoryApi.update_repository"
|
261
|
+
end
|
262
|
+
# verify the required parameter 'repository' is set
|
263
|
+
if @api_client.config.client_side_validation && repository.nil?
|
264
|
+
fail ArgumentError, "Missing the required parameter 'repository' when calling RepositoryApi.update_repository"
|
265
|
+
end
|
266
|
+
if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
|
267
|
+
fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RepositoryApi.update_repository, the character length must be great than or equal to 1.'
|
268
|
+
end
|
269
|
+
|
270
|
+
# resource path
|
271
|
+
local_var_path = '/projects/{project_name}/repositories/{repository_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'repository_name' + '}', repository_name.to_s)
|
272
|
+
|
273
|
+
# query parameters
|
274
|
+
query_params = {}
|
275
|
+
|
276
|
+
# header parameters
|
277
|
+
header_params = {}
|
278
|
+
# HTTP header 'Accept' (if needed)
|
279
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
280
|
+
# HTTP header 'Content-Type'
|
281
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
282
|
+
header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
|
283
|
+
|
284
|
+
# form parameters
|
285
|
+
form_params = {}
|
286
|
+
|
287
|
+
# http body (model)
|
288
|
+
post_body = @api_client.object_to_http_body(repository)
|
289
|
+
auth_names = ['basic']
|
290
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
291
|
+
:header_params => header_params,
|
292
|
+
:query_params => query_params,
|
293
|
+
:form_params => form_params,
|
294
|
+
:body => post_body,
|
295
|
+
:auth_names => auth_names)
|
296
|
+
if @api_client.config.debugging
|
297
|
+
@api_client.config.logger.debug "API called: RepositoryApi#update_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
298
|
+
end
|
299
|
+
return data, status_code, headers
|
300
|
+
end
|
301
|
+
end
|
302
|
+
end
|