harbor2_legacy_client 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +365 -0
- data/Rakefile +8 -0
- data/docs/Action.md +8 -0
- data/docs/Action1.md +8 -0
- data/docs/AdminJobSchedule.md +9 -0
- data/docs/AdminJobScheduleObj.md +9 -0
- data/docs/BadRequestFormatedError.md +8 -0
- data/docs/BoolConfigItem.md +9 -0
- data/docs/CVEAllowlist.md +11 -0
- data/docs/CVEAllowlistItem.md +8 -0
- data/docs/ChartAPIError.md +8 -0
- data/docs/ChartMetadata.md +18 -0
- data/docs/ChartRepositoryApi.md +191 -0
- data/docs/ChartVersion.md +23 -0
- data/docs/ComponentHealthStatus.md +10 -0
- data/docs/ComponentOverviewEntry.md +9 -0
- data/docs/Configurations.md +42 -0
- data/docs/ConfigurationsResponse.md +41 -0
- data/docs/ConfigurationsScanAllPolicy.md +9 -0
- data/docs/ConfigurationsScanAllPolicyParameter.md +8 -0
- data/docs/ConflictFormatedError.md +8 -0
- data/docs/EmailServerSetting.md +13 -0
- data/docs/Endpoint.md +9 -0
- data/docs/EventType.md +7 -0
- data/docs/FilterStyle.md +10 -0
- data/docs/ForbiddenChartAPIError.md +8 -0
- data/docs/GCResult.md +16 -0
- data/docs/GeneralInfo.md +16 -0
- data/docs/InputSecret.md +8 -0
- data/docs/InsufficientStorageChartAPIError.md +8 -0
- data/docs/IntegerConfigItem.md +9 -0
- data/docs/InternalChartAPIError.md +8 -0
- data/docs/IsDefault.md +8 -0
- data/docs/Label.md +16 -0
- data/docs/LabelApi.md +191 -0
- data/docs/Labels.md +7 -0
- data/docs/LdapConf.md +15 -0
- data/docs/LdapFailedImportUsers.md +9 -0
- data/docs/LdapImportUsers.md +8 -0
- data/docs/LdapUsers.md +10 -0
- data/docs/Namespace.md +9 -0
- data/docs/NotFoundChartAPIError.md +8 -0
- data/docs/NotifyType.md +7 -0
- data/docs/OverallHealthStatus.md +9 -0
- data/docs/Password.md +9 -0
- data/docs/Permission.md +9 -0
- data/docs/PingRegistry.md +14 -0
- data/docs/ProductsApi.md +6382 -0
- data/docs/Project.md +22 -0
- data/docs/ProjectMember.md +10 -0
- data/docs/ProjectMemberEntity.md +14 -0
- data/docs/ProjectMetadata.md +13 -0
- data/docs/ProjectReq.md +13 -0
- data/docs/ProjectScanner.md +8 -0
- data/docs/ProjectSummary.md +15 -0
- data/docs/ProjectSummaryQuota.md +9 -0
- data/docs/PutRegistry.md +14 -0
- data/docs/Quota.md +13 -0
- data/docs/QuotaApi.md +118 -0
- data/docs/QuotaRefObject.md +7 -0
- data/docs/QuotaSwitcher.md +8 -0
- data/docs/QuotaUpdateReq.md +8 -0
- data/docs/Registry.md +17 -0
- data/docs/RegistryCredential.md +10 -0
- data/docs/RegistryInfo.md +11 -0
- data/docs/ReplicationExecution.md +19 -0
- data/docs/ReplicationFilter.md +9 -0
- data/docs/ReplicationPolicy.md +20 -0
- data/docs/ReplicationTask.md +16 -0
- data/docs/ReplicationTrigger.md +9 -0
- data/docs/ResourceList.md +7 -0
- data/docs/RetentionApi.md +449 -0
- data/docs/RetentionExecution.md +14 -0
- data/docs/RetentionExecutionTask.md +18 -0
- data/docs/RetentionMetadata.md +10 -0
- data/docs/RetentionPolicy.md +12 -0
- data/docs/RetentionPolicyScope.md +9 -0
- data/docs/RetentionRule.md +15 -0
- data/docs/RetentionRuleMetadata.md +11 -0
- data/docs/RetentionRuleParamMetadata.md +10 -0
- data/docs/RetentionRuleTrigger.md +10 -0
- data/docs/RetentionSelector.md +11 -0
- data/docs/RetentionSelectorMetadata.md +10 -0
- data/docs/RobotAccount.md +15 -0
- data/docs/RobotAccountAccess.md +9 -0
- data/docs/RobotAccountApi.md +291 -0
- data/docs/RobotAccountCreate.md +11 -0
- data/docs/RobotAccountPostRep.md +9 -0
- data/docs/RobotAccountUpdate.md +8 -0
- data/docs/Role.md +11 -0
- data/docs/RoleParam.md +9 -0
- data/docs/RoleRequest.md +8 -0
- data/docs/ScanApi.md +104 -0
- data/docs/Scanner.md +10 -0
- data/docs/ScannerAdapterMetadata.md +10 -0
- data/docs/ScannerCapability.md +9 -0
- data/docs/ScannerRegistration.md +21 -0
- data/docs/ScannerRegistrationReq.md +15 -0
- data/docs/ScannerRegistrationSettings.md +11 -0
- data/docs/ScannersApi.md +600 -0
- data/docs/Search.md +10 -0
- data/docs/SearchRepository.md +13 -0
- data/docs/SearchResult.md +10 -0
- data/docs/StatisticMap.md +13 -0
- data/docs/Stats.md +12 -0
- data/docs/Storage.md +9 -0
- data/docs/StringConfigItem.md +9 -0
- data/docs/SupportedWebhookEventTypes.md +9 -0
- data/docs/SysAdminFlag.md +8 -0
- data/docs/SystemApi.md +163 -0
- data/docs/SystemInfo.md +8 -0
- data/docs/TriggerSettings.md +8 -0
- data/docs/UnauthorizedChartAPIError.md +8 -0
- data/docs/User.md +22 -0
- data/docs/UserEntity.md +9 -0
- data/docs/UserGroup.md +11 -0
- data/docs/UserProfile.md +10 -0
- data/docs/UserSearch.md +9 -0
- data/docs/WebhookJob.md +15 -0
- data/docs/WebhookLastTrigger.md +11 -0
- data/docs/WebhookPolicy.md +17 -0
- data/docs/WebhookTargetObject.md +11 -0
- data/git_push.sh +55 -0
- data/harbor2_legacy_client.gemspec +46 -0
- data/lib/harbor2_legacy_client.rb +159 -0
- data/lib/harbor2_legacy_client/api/chart_repository_api.rb +230 -0
- data/lib/harbor2_legacy_client/api/label_api.rb +230 -0
- data/lib/harbor2_legacy_client/api/products_api.rb +6500 -0
- data/lib/harbor2_legacy_client/api/quota_api.rb +136 -0
- data/lib/harbor2_legacy_client/api/retention_api.rb +482 -0
- data/lib/harbor2_legacy_client/api/robot_account_api.rb +321 -0
- data/lib/harbor2_legacy_client/api/scan_api.rb +119 -0
- data/lib/harbor2_legacy_client/api/scanners_api.rb +624 -0
- data/lib/harbor2_legacy_client/api/system_api.rb +173 -0
- data/lib/harbor2_legacy_client/api_client.rb +391 -0
- data/lib/harbor2_legacy_client/api_error.rb +38 -0
- data/lib/harbor2_legacy_client/configuration.rb +209 -0
- data/lib/harbor2_legacy_client/models/action.rb +184 -0
- data/lib/harbor2_legacy_client/models/action_1.rb +184 -0
- data/lib/harbor2_legacy_client/models/admin_job_schedule.rb +196 -0
- data/lib/harbor2_legacy_client/models/admin_job_schedule_obj.rb +195 -0
- data/lib/harbor2_legacy_client/models/bad_request_formated_error.rb +191 -0
- data/lib/harbor2_legacy_client/models/bool_config_item.rb +195 -0
- data/lib/harbor2_legacy_client/models/chart_api_error.rb +191 -0
- data/lib/harbor2_legacy_client/models/chart_metadata.rb +320 -0
- data/lib/harbor2_legacy_client/models/chart_version.rb +371 -0
- data/lib/harbor2_legacy_client/models/component_health_status.rb +206 -0
- data/lib/harbor2_legacy_client/models/component_overview_entry.rb +195 -0
- data/lib/harbor2_legacy_client/models/configurations.rb +524 -0
- data/lib/harbor2_legacy_client/models/configurations_response.rb +514 -0
- data/lib/harbor2_legacy_client/models/configurations_scan_all_policy.rb +194 -0
- data/lib/harbor2_legacy_client/models/configurations_scan_all_policy_parameter.rb +186 -0
- data/lib/harbor2_legacy_client/models/conflict_formated_error.rb +191 -0
- data/lib/harbor2_legacy_client/models/cve_allowlist.rb +217 -0
- data/lib/harbor2_legacy_client/models/cve_allowlist_item.rb +186 -0
- data/lib/harbor2_legacy_client/models/email_server_setting.rb +235 -0
- data/lib/harbor2_legacy_client/models/endpoint.rb +195 -0
- data/lib/harbor2_legacy_client/models/event_type.rb +176 -0
- data/lib/harbor2_legacy_client/models/filter_style.rb +208 -0
- data/lib/harbor2_legacy_client/models/forbidden_chart_api_error.rb +191 -0
- data/lib/harbor2_legacy_client/models/gc_result.rb +264 -0
- data/lib/harbor2_legacy_client/models/general_info.rb +265 -0
- data/lib/harbor2_legacy_client/models/input_secret.rb +185 -0
- data/lib/harbor2_legacy_client/models/insufficient_storage_chart_api_error.rb +191 -0
- data/lib/harbor2_legacy_client/models/integer_config_item.rb +195 -0
- data/lib/harbor2_legacy_client/models/internal_chart_api_error.rb +191 -0
- data/lib/harbor2_legacy_client/models/is_default.rb +185 -0
- data/lib/harbor2_legacy_client/models/label.rb +265 -0
- data/lib/harbor2_legacy_client/models/labels.rb +176 -0
- data/lib/harbor2_legacy_client/models/ldap_conf.rb +255 -0
- data/lib/harbor2_legacy_client/models/ldap_failed_import_users.rb +195 -0
- data/lib/harbor2_legacy_client/models/ldap_import_users.rb +187 -0
- data/lib/harbor2_legacy_client/models/ldap_users.rb +205 -0
- data/lib/harbor2_legacy_client/models/namespace.rb +196 -0
- data/lib/harbor2_legacy_client/models/not_found_chart_api_error.rb +191 -0
- data/lib/harbor2_legacy_client/models/notify_type.rb +176 -0
- data/lib/harbor2_legacy_client/models/overall_health_status.rb +197 -0
- data/lib/harbor2_legacy_client/models/password.rb +195 -0
- data/lib/harbor2_legacy_client/models/permission.rb +196 -0
- data/lib/harbor2_legacy_client/models/ping_registry.rb +245 -0
- data/lib/harbor2_legacy_client/models/project.rb +327 -0
- data/lib/harbor2_legacy_client/models/project_member.rb +203 -0
- data/lib/harbor2_legacy_client/models/project_member_entity.rb +245 -0
- data/lib/harbor2_legacy_client/models/project_metadata.rb +235 -0
- data/lib/harbor2_legacy_client/models/project_req.rb +235 -0
- data/lib/harbor2_legacy_client/models/project_scanner.rb +185 -0
- data/lib/harbor2_legacy_client/models/project_summary.rb +253 -0
- data/lib/harbor2_legacy_client/models/project_summary_quota.rb +195 -0
- data/lib/harbor2_legacy_client/models/put_registry.rb +245 -0
- data/lib/harbor2_legacy_client/models/quota.rb +236 -0
- data/lib/harbor2_legacy_client/models/quota_ref_object.rb +175 -0
- data/lib/harbor2_legacy_client/models/quota_switcher.rb +185 -0
- data/lib/harbor2_legacy_client/models/quota_update_req.rb +185 -0
- data/lib/harbor2_legacy_client/models/registry.rb +274 -0
- data/lib/harbor2_legacy_client/models/registry_credential.rb +205 -0
- data/lib/harbor2_legacy_client/models/registry_info.rb +220 -0
- data/lib/harbor2_legacy_client/models/replication_execution.rb +296 -0
- data/lib/harbor2_legacy_client/models/replication_filter.rb +195 -0
- data/lib/harbor2_legacy_client/models/replication_policy.rb +306 -0
- data/lib/harbor2_legacy_client/models/replication_task.rb +266 -0
- data/lib/harbor2_legacy_client/models/replication_trigger.rb +194 -0
- data/lib/harbor2_legacy_client/models/resource_list.rb +175 -0
- data/lib/harbor2_legacy_client/models/retention_execution.rb +238 -0
- data/lib/harbor2_legacy_client/models/retention_execution_task.rb +274 -0
- data/lib/harbor2_legacy_client/models/retention_metadata.rb +212 -0
- data/lib/harbor2_legacy_client/models/retention_policy.rb +223 -0
- data/lib/harbor2_legacy_client/models/retention_policy_scope.rb +193 -0
- data/lib/harbor2_legacy_client/models/retention_rule.rb +253 -0
- data/lib/harbor2_legacy_client/models/retention_rule_metadata.rb +218 -0
- data/lib/harbor2_legacy_client/models/retention_rule_param_metadata.rb +203 -0
- data/lib/harbor2_legacy_client/models/retention_rule_trigger.rb +202 -0
- data/lib/harbor2_legacy_client/models/retention_selector.rb +211 -0
- data/lib/harbor2_legacy_client/models/retention_selector_metadata.rb +205 -0
- data/lib/harbor2_legacy_client/models/robot_account.rb +256 -0
- data/lib/harbor2_legacy_client/models/robot_account_access.rb +195 -0
- data/lib/harbor2_legacy_client/models/robot_account_create.rb +217 -0
- data/lib/harbor2_legacy_client/models/robot_account_post_rep.rb +195 -0
- data/lib/harbor2_legacy_client/models/robot_account_update.rb +185 -0
- data/lib/harbor2_legacy_client/models/role.rb +214 -0
- data/lib/harbor2_legacy_client/models/role_param.rb +197 -0
- data/lib/harbor2_legacy_client/models/role_request.rb +185 -0
- data/lib/harbor2_legacy_client/models/scanner.rb +205 -0
- data/lib/harbor2_legacy_client/models/scanner_adapter_metadata.rb +207 -0
- data/lib/harbor2_legacy_client/models/scanner_capability.rb +197 -0
- data/lib/harbor2_legacy_client/models/scanner_registration.rb +328 -0
- data/lib/harbor2_legacy_client/models/scanner_registration_req.rb +263 -0
- data/lib/harbor2_legacy_client/models/scanner_registration_settings.rb +217 -0
- data/lib/harbor2_legacy_client/models/search.rb +211 -0
- data/lib/harbor2_legacy_client/models/search_repository.rb +235 -0
- data/lib/harbor2_legacy_client/models/search_result.rb +205 -0
- data/lib/harbor2_legacy_client/models/statistic_map.rb +235 -0
- data/lib/harbor2_legacy_client/models/stats.rb +228 -0
- data/lib/harbor2_legacy_client/models/storage.rb +195 -0
- data/lib/harbor2_legacy_client/models/string_config_item.rb +195 -0
- data/lib/harbor2_legacy_client/models/supported_webhook_event_types.rb +198 -0
- data/lib/harbor2_legacy_client/models/sys_admin_flag.rb +185 -0
- data/lib/harbor2_legacy_client/models/system_info.rb +187 -0
- data/lib/harbor2_legacy_client/models/trigger_settings.rb +185 -0
- data/lib/harbor2_legacy_client/models/unauthorized_chart_api_error.rb +191 -0
- data/lib/harbor2_legacy_client/models/user.rb +312 -0
- data/lib/harbor2_legacy_client/models/user_entity.rb +195 -0
- data/lib/harbor2_legacy_client/models/user_group.rb +215 -0
- data/lib/harbor2_legacy_client/models/user_profile.rb +205 -0
- data/lib/harbor2_legacy_client/models/user_search.rb +194 -0
- data/lib/harbor2_legacy_client/models/webhook_job.rb +256 -0
- data/lib/harbor2_legacy_client/models/webhook_last_trigger.rb +216 -0
- data/lib/harbor2_legacy_client/models/webhook_policy.rb +278 -0
- data/lib/harbor2_legacy_client/models/webhook_target_object.rb +216 -0
- data/lib/harbor2_legacy_client/version.rb +15 -0
- data/spec/api/chart_repository_api_spec.rb +79 -0
- data/spec/api/label_api_spec.rb +79 -0
- data/spec/api/products_api_spec.rb +1493 -0
- data/spec/api/quota_api_spec.rb +60 -0
- data/spec/api/retention_api_spec.rb +136 -0
- data/spec/api/robot_account_api_spec.rb +100 -0
- data/spec/api/scan_api_spec.rb +57 -0
- data/spec/api/scanners_api_spec.rb +169 -0
- data/spec/api/system_api_spec.rb +70 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/action_1_spec.rb +41 -0
- data/spec/models/action_spec.rb +41 -0
- data/spec/models/admin_job_schedule_obj_spec.rb +47 -0
- data/spec/models/admin_job_schedule_spec.rb +47 -0
- data/spec/models/bad_request_formated_error_spec.rb +41 -0
- data/spec/models/bool_config_item_spec.rb +47 -0
- data/spec/models/chart_api_error_spec.rb +41 -0
- data/spec/models/chart_metadata_spec.rb +101 -0
- data/spec/models/chart_version_spec.rb +131 -0
- data/spec/models/component_health_status_spec.rb +53 -0
- data/spec/models/component_overview_entry_spec.rb +47 -0
- data/spec/models/configurations_response_spec.rb +239 -0
- data/spec/models/configurations_scan_all_policy_parameter_spec.rb +41 -0
- data/spec/models/configurations_scan_all_policy_spec.rb +47 -0
- data/spec/models/configurations_spec.rb +245 -0
- data/spec/models/conflict_formated_error_spec.rb +41 -0
- data/spec/models/cve_allowlist_item_spec.rb +41 -0
- data/spec/models/cve_allowlist_spec.rb +59 -0
- data/spec/models/email_server_setting_spec.rb +71 -0
- data/spec/models/endpoint_spec.rb +47 -0
- data/spec/models/event_type_spec.rb +35 -0
- data/spec/models/filter_style_spec.rb +53 -0
- data/spec/models/forbidden_chart_api_error_spec.rb +41 -0
- data/spec/models/gc_result_spec.rb +89 -0
- data/spec/models/general_info_spec.rb +89 -0
- data/spec/models/input_secret_spec.rb +41 -0
- data/spec/models/insufficient_storage_chart_api_error_spec.rb +41 -0
- data/spec/models/integer_config_item_spec.rb +47 -0
- data/spec/models/internal_chart_api_error_spec.rb +41 -0
- data/spec/models/is_default_spec.rb +41 -0
- data/spec/models/label_spec.rb +89 -0
- data/spec/models/labels_spec.rb +35 -0
- data/spec/models/ldap_conf_spec.rb +83 -0
- data/spec/models/ldap_failed_import_users_spec.rb +47 -0
- data/spec/models/ldap_import_users_spec.rb +41 -0
- data/spec/models/ldap_users_spec.rb +53 -0
- data/spec/models/namespace_spec.rb +47 -0
- data/spec/models/not_found_chart_api_error_spec.rb +41 -0
- data/spec/models/notify_type_spec.rb +35 -0
- data/spec/models/overall_health_status_spec.rb +47 -0
- data/spec/models/password_spec.rb +47 -0
- data/spec/models/permission_spec.rb +47 -0
- data/spec/models/ping_registry_spec.rb +77 -0
- data/spec/models/project_member_entity_spec.rb +77 -0
- data/spec/models/project_member_spec.rb +53 -0
- data/spec/models/project_metadata_spec.rb +71 -0
- data/spec/models/project_req_spec.rb +71 -0
- data/spec/models/project_scanner_spec.rb +41 -0
- data/spec/models/project_spec.rb +125 -0
- data/spec/models/project_summary_quota_spec.rb +47 -0
- data/spec/models/project_summary_spec.rb +83 -0
- data/spec/models/put_registry_spec.rb +77 -0
- data/spec/models/quota_ref_object_spec.rb +35 -0
- data/spec/models/quota_spec.rb +71 -0
- data/spec/models/quota_switcher_spec.rb +41 -0
- data/spec/models/quota_update_req_spec.rb +41 -0
- data/spec/models/registry_credential_spec.rb +53 -0
- data/spec/models/registry_info_spec.rb +59 -0
- data/spec/models/registry_spec.rb +95 -0
- data/spec/models/replication_execution_spec.rb +107 -0
- data/spec/models/replication_filter_spec.rb +47 -0
- data/spec/models/replication_policy_spec.rb +113 -0
- data/spec/models/replication_task_spec.rb +89 -0
- data/spec/models/replication_trigger_spec.rb +47 -0
- data/spec/models/resource_list_spec.rb +35 -0
- data/spec/models/retention_execution_spec.rb +77 -0
- data/spec/models/retention_execution_task_spec.rb +101 -0
- data/spec/models/retention_metadata_spec.rb +53 -0
- data/spec/models/retention_policy_scope_spec.rb +47 -0
- data/spec/models/retention_policy_spec.rb +65 -0
- data/spec/models/retention_rule_metadata_spec.rb +59 -0
- data/spec/models/retention_rule_param_metadata_spec.rb +53 -0
- data/spec/models/retention_rule_spec.rb +83 -0
- data/spec/models/retention_rule_trigger_spec.rb +53 -0
- data/spec/models/retention_selector_metadata_spec.rb +53 -0
- data/spec/models/retention_selector_spec.rb +59 -0
- data/spec/models/robot_account_access_spec.rb +47 -0
- data/spec/models/robot_account_create_spec.rb +59 -0
- data/spec/models/robot_account_post_rep_spec.rb +47 -0
- data/spec/models/robot_account_spec.rb +83 -0
- data/spec/models/robot_account_update_spec.rb +41 -0
- data/spec/models/role_param_spec.rb +47 -0
- data/spec/models/role_request_spec.rb +41 -0
- data/spec/models/role_spec.rb +59 -0
- data/spec/models/scanner_adapter_metadata_spec.rb +53 -0
- data/spec/models/scanner_capability_spec.rb +47 -0
- data/spec/models/scanner_registration_req_spec.rb +83 -0
- data/spec/models/scanner_registration_settings_spec.rb +59 -0
- data/spec/models/scanner_registration_spec.rb +119 -0
- data/spec/models/scanner_spec.rb +53 -0
- data/spec/models/search_repository_spec.rb +71 -0
- data/spec/models/search_result_spec.rb +53 -0
- data/spec/models/search_spec.rb +53 -0
- data/spec/models/statistic_map_spec.rb +71 -0
- data/spec/models/stats_spec.rb +65 -0
- data/spec/models/storage_spec.rb +47 -0
- data/spec/models/string_config_item_spec.rb +47 -0
- data/spec/models/supported_webhook_event_types_spec.rb +47 -0
- data/spec/models/sys_admin_flag_spec.rb +41 -0
- data/spec/models/system_info_spec.rb +41 -0
- data/spec/models/trigger_settings_spec.rb +41 -0
- data/spec/models/unauthorized_chart_api_error_spec.rb +41 -0
- data/spec/models/user_entity_spec.rb +47 -0
- data/spec/models/user_group_spec.rb +59 -0
- data/spec/models/user_profile_spec.rb +53 -0
- data/spec/models/user_search_spec.rb +47 -0
- data/spec/models/user_spec.rb +125 -0
- data/spec/models/webhook_job_spec.rb +83 -0
- data/spec/models/webhook_last_trigger_spec.rb +59 -0
- data/spec/models/webhook_policy_spec.rb +95 -0
- data/spec/models/webhook_target_object_spec.rb +59 -0
- data/spec/spec_helper.rb +111 -0
- metadata +740 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
=begin
|
|
4
|
+
#Harbor API
|
|
5
|
+
|
|
6
|
+
#These APIs provide services for manipulating Harbor project.
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 2.0
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
Swagger Codegen version: 2.4.17
|
|
12
|
+
|
|
13
|
+
=end
|
|
14
|
+
|
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
+
require "harbor2_legacy_client/version"
|
|
17
|
+
|
|
18
|
+
Gem::Specification.new do |s|
|
|
19
|
+
s.name = "harbor2_legacy_client"
|
|
20
|
+
s.version = Harbor2LegacyClient::VERSION
|
|
21
|
+
s.platform = Gem::Platform::RUBY
|
|
22
|
+
s.authors = ["Richard Grainger","Swagger-Codegen"]
|
|
23
|
+
s.email = [""]
|
|
24
|
+
s.homepage = "https://github.com/liger1978/harbor2_legacy_client/"
|
|
25
|
+
s.summary = "Harbor 2 legacy API Ruby Gem"
|
|
26
|
+
s.description = "These APIs provide services for manipulating Harbor projects."
|
|
27
|
+
s.license = "MIT"
|
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
|
29
|
+
|
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 0.1.0'
|
|
32
|
+
s.add_runtime_dependency 'addressable', '~> 2.3', '>= 2.3.0'
|
|
33
|
+
|
|
34
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
35
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
|
36
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
|
37
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
|
38
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
|
39
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
|
40
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
|
41
|
+
|
|
42
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
43
|
+
s.test_files = `find spec/*`.split("\n")
|
|
44
|
+
s.executables = []
|
|
45
|
+
s.require_paths = ["lib"]
|
|
46
|
+
end
|
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
# Common files
|
|
14
|
+
require 'harbor2_legacy_client/api_client'
|
|
15
|
+
require 'harbor2_legacy_client/api_error'
|
|
16
|
+
require 'harbor2_legacy_client/version'
|
|
17
|
+
require 'harbor2_legacy_client/configuration'
|
|
18
|
+
|
|
19
|
+
# Models
|
|
20
|
+
require 'harbor2_legacy_client/models/action'
|
|
21
|
+
require 'harbor2_legacy_client/models/action_1'
|
|
22
|
+
require 'harbor2_legacy_client/models/admin_job_schedule'
|
|
23
|
+
require 'harbor2_legacy_client/models/admin_job_schedule_obj'
|
|
24
|
+
require 'harbor2_legacy_client/models/bad_request_formated_error'
|
|
25
|
+
require 'harbor2_legacy_client/models/bool_config_item'
|
|
26
|
+
require 'harbor2_legacy_client/models/cve_allowlist'
|
|
27
|
+
require 'harbor2_legacy_client/models/cve_allowlist_item'
|
|
28
|
+
require 'harbor2_legacy_client/models/chart_api_error'
|
|
29
|
+
require 'harbor2_legacy_client/models/chart_metadata'
|
|
30
|
+
require 'harbor2_legacy_client/models/chart_version'
|
|
31
|
+
require 'harbor2_legacy_client/models/component_health_status'
|
|
32
|
+
require 'harbor2_legacy_client/models/component_overview_entry'
|
|
33
|
+
require 'harbor2_legacy_client/models/configurations'
|
|
34
|
+
require 'harbor2_legacy_client/models/configurations_response'
|
|
35
|
+
require 'harbor2_legacy_client/models/configurations_scan_all_policy'
|
|
36
|
+
require 'harbor2_legacy_client/models/configurations_scan_all_policy_parameter'
|
|
37
|
+
require 'harbor2_legacy_client/models/conflict_formated_error'
|
|
38
|
+
require 'harbor2_legacy_client/models/email_server_setting'
|
|
39
|
+
require 'harbor2_legacy_client/models/endpoint'
|
|
40
|
+
require 'harbor2_legacy_client/models/event_type'
|
|
41
|
+
require 'harbor2_legacy_client/models/filter_style'
|
|
42
|
+
require 'harbor2_legacy_client/models/forbidden_chart_api_error'
|
|
43
|
+
require 'harbor2_legacy_client/models/gc_result'
|
|
44
|
+
require 'harbor2_legacy_client/models/general_info'
|
|
45
|
+
require 'harbor2_legacy_client/models/input_secret'
|
|
46
|
+
require 'harbor2_legacy_client/models/insufficient_storage_chart_api_error'
|
|
47
|
+
require 'harbor2_legacy_client/models/integer_config_item'
|
|
48
|
+
require 'harbor2_legacy_client/models/internal_chart_api_error'
|
|
49
|
+
require 'harbor2_legacy_client/models/is_default'
|
|
50
|
+
require 'harbor2_legacy_client/models/label'
|
|
51
|
+
require 'harbor2_legacy_client/models/labels'
|
|
52
|
+
require 'harbor2_legacy_client/models/ldap_conf'
|
|
53
|
+
require 'harbor2_legacy_client/models/ldap_failed_import_users'
|
|
54
|
+
require 'harbor2_legacy_client/models/ldap_import_users'
|
|
55
|
+
require 'harbor2_legacy_client/models/ldap_users'
|
|
56
|
+
require 'harbor2_legacy_client/models/namespace'
|
|
57
|
+
require 'harbor2_legacy_client/models/not_found_chart_api_error'
|
|
58
|
+
require 'harbor2_legacy_client/models/notify_type'
|
|
59
|
+
require 'harbor2_legacy_client/models/overall_health_status'
|
|
60
|
+
require 'harbor2_legacy_client/models/password'
|
|
61
|
+
require 'harbor2_legacy_client/models/permission'
|
|
62
|
+
require 'harbor2_legacy_client/models/ping_registry'
|
|
63
|
+
require 'harbor2_legacy_client/models/project'
|
|
64
|
+
require 'harbor2_legacy_client/models/project_member'
|
|
65
|
+
require 'harbor2_legacy_client/models/project_member_entity'
|
|
66
|
+
require 'harbor2_legacy_client/models/project_metadata'
|
|
67
|
+
require 'harbor2_legacy_client/models/project_req'
|
|
68
|
+
require 'harbor2_legacy_client/models/project_scanner'
|
|
69
|
+
require 'harbor2_legacy_client/models/project_summary'
|
|
70
|
+
require 'harbor2_legacy_client/models/project_summary_quota'
|
|
71
|
+
require 'harbor2_legacy_client/models/put_registry'
|
|
72
|
+
require 'harbor2_legacy_client/models/quota'
|
|
73
|
+
require 'harbor2_legacy_client/models/quota_ref_object'
|
|
74
|
+
require 'harbor2_legacy_client/models/quota_switcher'
|
|
75
|
+
require 'harbor2_legacy_client/models/quota_update_req'
|
|
76
|
+
require 'harbor2_legacy_client/models/registry'
|
|
77
|
+
require 'harbor2_legacy_client/models/registry_credential'
|
|
78
|
+
require 'harbor2_legacy_client/models/registry_info'
|
|
79
|
+
require 'harbor2_legacy_client/models/replication_execution'
|
|
80
|
+
require 'harbor2_legacy_client/models/replication_filter'
|
|
81
|
+
require 'harbor2_legacy_client/models/replication_policy'
|
|
82
|
+
require 'harbor2_legacy_client/models/replication_task'
|
|
83
|
+
require 'harbor2_legacy_client/models/replication_trigger'
|
|
84
|
+
require 'harbor2_legacy_client/models/resource_list'
|
|
85
|
+
require 'harbor2_legacy_client/models/retention_execution'
|
|
86
|
+
require 'harbor2_legacy_client/models/retention_execution_task'
|
|
87
|
+
require 'harbor2_legacy_client/models/retention_metadata'
|
|
88
|
+
require 'harbor2_legacy_client/models/retention_policy'
|
|
89
|
+
require 'harbor2_legacy_client/models/retention_policy_scope'
|
|
90
|
+
require 'harbor2_legacy_client/models/retention_rule'
|
|
91
|
+
require 'harbor2_legacy_client/models/retention_rule_metadata'
|
|
92
|
+
require 'harbor2_legacy_client/models/retention_rule_param_metadata'
|
|
93
|
+
require 'harbor2_legacy_client/models/retention_rule_trigger'
|
|
94
|
+
require 'harbor2_legacy_client/models/retention_selector'
|
|
95
|
+
require 'harbor2_legacy_client/models/retention_selector_metadata'
|
|
96
|
+
require 'harbor2_legacy_client/models/robot_account'
|
|
97
|
+
require 'harbor2_legacy_client/models/robot_account_access'
|
|
98
|
+
require 'harbor2_legacy_client/models/robot_account_create'
|
|
99
|
+
require 'harbor2_legacy_client/models/robot_account_post_rep'
|
|
100
|
+
require 'harbor2_legacy_client/models/robot_account_update'
|
|
101
|
+
require 'harbor2_legacy_client/models/role'
|
|
102
|
+
require 'harbor2_legacy_client/models/role_param'
|
|
103
|
+
require 'harbor2_legacy_client/models/role_request'
|
|
104
|
+
require 'harbor2_legacy_client/models/scanner'
|
|
105
|
+
require 'harbor2_legacy_client/models/scanner_adapter_metadata'
|
|
106
|
+
require 'harbor2_legacy_client/models/scanner_capability'
|
|
107
|
+
require 'harbor2_legacy_client/models/scanner_registration'
|
|
108
|
+
require 'harbor2_legacy_client/models/scanner_registration_req'
|
|
109
|
+
require 'harbor2_legacy_client/models/scanner_registration_settings'
|
|
110
|
+
require 'harbor2_legacy_client/models/search'
|
|
111
|
+
require 'harbor2_legacy_client/models/search_repository'
|
|
112
|
+
require 'harbor2_legacy_client/models/search_result'
|
|
113
|
+
require 'harbor2_legacy_client/models/statistic_map'
|
|
114
|
+
require 'harbor2_legacy_client/models/stats'
|
|
115
|
+
require 'harbor2_legacy_client/models/storage'
|
|
116
|
+
require 'harbor2_legacy_client/models/string_config_item'
|
|
117
|
+
require 'harbor2_legacy_client/models/supported_webhook_event_types'
|
|
118
|
+
require 'harbor2_legacy_client/models/sys_admin_flag'
|
|
119
|
+
require 'harbor2_legacy_client/models/system_info'
|
|
120
|
+
require 'harbor2_legacy_client/models/trigger_settings'
|
|
121
|
+
require 'harbor2_legacy_client/models/unauthorized_chart_api_error'
|
|
122
|
+
require 'harbor2_legacy_client/models/user'
|
|
123
|
+
require 'harbor2_legacy_client/models/user_entity'
|
|
124
|
+
require 'harbor2_legacy_client/models/user_group'
|
|
125
|
+
require 'harbor2_legacy_client/models/user_profile'
|
|
126
|
+
require 'harbor2_legacy_client/models/user_search'
|
|
127
|
+
require 'harbor2_legacy_client/models/webhook_job'
|
|
128
|
+
require 'harbor2_legacy_client/models/webhook_last_trigger'
|
|
129
|
+
require 'harbor2_legacy_client/models/webhook_policy'
|
|
130
|
+
require 'harbor2_legacy_client/models/webhook_target_object'
|
|
131
|
+
|
|
132
|
+
# APIs
|
|
133
|
+
require 'harbor2_legacy_client/api/chart_repository_api'
|
|
134
|
+
require 'harbor2_legacy_client/api/label_api'
|
|
135
|
+
require 'harbor2_legacy_client/api/products_api'
|
|
136
|
+
require 'harbor2_legacy_client/api/quota_api'
|
|
137
|
+
require 'harbor2_legacy_client/api/retention_api'
|
|
138
|
+
require 'harbor2_legacy_client/api/robot_account_api'
|
|
139
|
+
require 'harbor2_legacy_client/api/scan_api'
|
|
140
|
+
require 'harbor2_legacy_client/api/scanners_api'
|
|
141
|
+
require 'harbor2_legacy_client/api/system_api'
|
|
142
|
+
|
|
143
|
+
module Harbor2LegacyClient
|
|
144
|
+
class << self
|
|
145
|
+
# Customize default settings for the SDK using block.
|
|
146
|
+
# Harbor2LegacyClient.configure do |config|
|
|
147
|
+
# config.username = "xxx"
|
|
148
|
+
# config.password = "xxx"
|
|
149
|
+
# end
|
|
150
|
+
# If no block given, return the default Configuration object.
|
|
151
|
+
def configure
|
|
152
|
+
if block_given?
|
|
153
|
+
yield(Configuration.default)
|
|
154
|
+
else
|
|
155
|
+
Configuration.default
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
@@ -0,0 +1,230 @@
|
|
|
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 Harbor2LegacyClient
|
|
16
|
+
class ChartRepositoryApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Return the attahced labels of chart.
|
|
23
|
+
# Return the attahced labels of the specified chart version.
|
|
24
|
+
# @param repo The project name
|
|
25
|
+
# @param name The chart name
|
|
26
|
+
# @param version The chart version
|
|
27
|
+
# @param [Hash] opts the optional parameters
|
|
28
|
+
# @return [nil]
|
|
29
|
+
def chartrepo_repo_charts_name_version_labels_get(repo, name, version, opts = {})
|
|
30
|
+
chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts)
|
|
31
|
+
nil
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Return the attahced labels of chart.
|
|
35
|
+
# Return the attahced labels of the specified chart version.
|
|
36
|
+
# @param repo The project name
|
|
37
|
+
# @param name The chart name
|
|
38
|
+
# @param version The chart version
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
41
|
+
def chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_get ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'repo' is set
|
|
46
|
+
if @api_client.config.client_side_validation && repo.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_get"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'name' is set
|
|
50
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_get"
|
|
52
|
+
end
|
|
53
|
+
# verify the required parameter 'version' is set
|
|
54
|
+
if @api_client.config.client_side_validation && version.nil?
|
|
55
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_get"
|
|
56
|
+
end
|
|
57
|
+
# resource path
|
|
58
|
+
local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.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', 'text/plain'])
|
|
67
|
+
# HTTP header 'Content-Type'
|
|
68
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = nil
|
|
75
|
+
auth_names = ['basicAuth']
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_version_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
# Remove label from chart.
|
|
88
|
+
# Remove label from the specified chart version.
|
|
89
|
+
# @param repo The project name
|
|
90
|
+
# @param name The chart name
|
|
91
|
+
# @param version The chart version
|
|
92
|
+
# @param id The label ID
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def chartrepo_repo_charts_name_version_labels_id_delete(repo, name, version, id, opts = {})
|
|
96
|
+
chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Remove label from chart.
|
|
101
|
+
# Remove label from the specified chart version.
|
|
102
|
+
# @param repo The project name
|
|
103
|
+
# @param name The chart name
|
|
104
|
+
# @param version The chart version
|
|
105
|
+
# @param id The label ID
|
|
106
|
+
# @param [Hash] opts the optional parameters
|
|
107
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
108
|
+
def chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts = {})
|
|
109
|
+
if @api_client.config.debugging
|
|
110
|
+
@api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_delete ...'
|
|
111
|
+
end
|
|
112
|
+
# verify the required parameter 'repo' is set
|
|
113
|
+
if @api_client.config.client_side_validation && repo.nil?
|
|
114
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_delete"
|
|
115
|
+
end
|
|
116
|
+
# verify the required parameter 'name' is set
|
|
117
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
118
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_delete"
|
|
119
|
+
end
|
|
120
|
+
# verify the required parameter 'version' is set
|
|
121
|
+
if @api_client.config.client_side_validation && version.nil?
|
|
122
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_delete"
|
|
123
|
+
end
|
|
124
|
+
# verify the required parameter 'id' is set
|
|
125
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
126
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_delete"
|
|
127
|
+
end
|
|
128
|
+
# resource path
|
|
129
|
+
local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels/{id}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s).sub('{' + 'id' + '}', id.to_s)
|
|
130
|
+
|
|
131
|
+
# query parameters
|
|
132
|
+
query_params = {}
|
|
133
|
+
|
|
134
|
+
# header parameters
|
|
135
|
+
header_params = {}
|
|
136
|
+
# HTTP header 'Accept' (if needed)
|
|
137
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
|
|
138
|
+
# HTTP header 'Content-Type'
|
|
139
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
140
|
+
|
|
141
|
+
# form parameters
|
|
142
|
+
form_params = {}
|
|
143
|
+
|
|
144
|
+
# http body (model)
|
|
145
|
+
post_body = nil
|
|
146
|
+
auth_names = ['basicAuth']
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
148
|
+
:header_params => header_params,
|
|
149
|
+
:query_params => query_params,
|
|
150
|
+
:form_params => form_params,
|
|
151
|
+
:body => post_body,
|
|
152
|
+
:auth_names => auth_names)
|
|
153
|
+
if @api_client.config.debugging
|
|
154
|
+
@api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_version_labels_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
155
|
+
end
|
|
156
|
+
return data, status_code, headers
|
|
157
|
+
end
|
|
158
|
+
# Mark label to chart.
|
|
159
|
+
# Mark label to the specified chart version.
|
|
160
|
+
# @param repo The project name
|
|
161
|
+
# @param name The chart name
|
|
162
|
+
# @param version The chart version
|
|
163
|
+
# @param label The label being marked to the chart version
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [nil]
|
|
166
|
+
def chartrepo_repo_charts_name_version_labels_post(repo, name, version, label, opts = {})
|
|
167
|
+
chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts)
|
|
168
|
+
nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Mark label to chart.
|
|
172
|
+
# Mark label to the specified chart version.
|
|
173
|
+
# @param repo The project name
|
|
174
|
+
# @param name The chart name
|
|
175
|
+
# @param version The chart version
|
|
176
|
+
# @param label The label being marked to the chart version
|
|
177
|
+
# @param [Hash] opts the optional parameters
|
|
178
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
179
|
+
def chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts = {})
|
|
180
|
+
if @api_client.config.debugging
|
|
181
|
+
@api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post ...'
|
|
182
|
+
end
|
|
183
|
+
# verify the required parameter 'repo' is set
|
|
184
|
+
if @api_client.config.client_side_validation && repo.nil?
|
|
185
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post"
|
|
186
|
+
end
|
|
187
|
+
# verify the required parameter 'name' is set
|
|
188
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
189
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post"
|
|
190
|
+
end
|
|
191
|
+
# verify the required parameter 'version' is set
|
|
192
|
+
if @api_client.config.client_side_validation && version.nil?
|
|
193
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post"
|
|
194
|
+
end
|
|
195
|
+
# verify the required parameter 'label' is set
|
|
196
|
+
if @api_client.config.client_side_validation && label.nil?
|
|
197
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post"
|
|
198
|
+
end
|
|
199
|
+
# resource path
|
|
200
|
+
local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)
|
|
201
|
+
|
|
202
|
+
# query parameters
|
|
203
|
+
query_params = {}
|
|
204
|
+
|
|
205
|
+
# header parameters
|
|
206
|
+
header_params = {}
|
|
207
|
+
# HTTP header 'Accept' (if needed)
|
|
208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
|
|
209
|
+
# HTTP header 'Content-Type'
|
|
210
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
211
|
+
|
|
212
|
+
# form parameters
|
|
213
|
+
form_params = {}
|
|
214
|
+
|
|
215
|
+
# http body (model)
|
|
216
|
+
post_body = @api_client.object_to_http_body(label)
|
|
217
|
+
auth_names = ['basicAuth']
|
|
218
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
219
|
+
:header_params => header_params,
|
|
220
|
+
:query_params => query_params,
|
|
221
|
+
:form_params => form_params,
|
|
222
|
+
:body => post_body,
|
|
223
|
+
:auth_names => auth_names)
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_version_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
226
|
+
end
|
|
227
|
+
return data, status_code, headers
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
@@ -0,0 +1,230 @@
|
|
|
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 Harbor2LegacyClient
|
|
16
|
+
class LabelApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Return the attahced labels of chart.
|
|
23
|
+
# Return the attahced labels of the specified chart version.
|
|
24
|
+
# @param repo The project name
|
|
25
|
+
# @param name The chart name
|
|
26
|
+
# @param version The chart version
|
|
27
|
+
# @param [Hash] opts the optional parameters
|
|
28
|
+
# @return [nil]
|
|
29
|
+
def chartrepo_repo_charts_name_version_labels_get(repo, name, version, opts = {})
|
|
30
|
+
chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts)
|
|
31
|
+
nil
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Return the attahced labels of chart.
|
|
35
|
+
# Return the attahced labels of the specified chart version.
|
|
36
|
+
# @param repo The project name
|
|
37
|
+
# @param name The chart name
|
|
38
|
+
# @param version The chart version
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
41
|
+
def chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.chartrepo_repo_charts_name_version_labels_get ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'repo' is set
|
|
46
|
+
if @api_client.config.client_side_validation && repo.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling LabelApi.chartrepo_repo_charts_name_version_labels_get"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'name' is set
|
|
50
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling LabelApi.chartrepo_repo_charts_name_version_labels_get"
|
|
52
|
+
end
|
|
53
|
+
# verify the required parameter 'version' is set
|
|
54
|
+
if @api_client.config.client_side_validation && version.nil?
|
|
55
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling LabelApi.chartrepo_repo_charts_name_version_labels_get"
|
|
56
|
+
end
|
|
57
|
+
# resource path
|
|
58
|
+
local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.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', 'text/plain'])
|
|
67
|
+
# HTTP header 'Content-Type'
|
|
68
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = nil
|
|
75
|
+
auth_names = ['basicAuth']
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: LabelApi#chartrepo_repo_charts_name_version_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
# Remove label from chart.
|
|
88
|
+
# Remove label from the specified chart version.
|
|
89
|
+
# @param repo The project name
|
|
90
|
+
# @param name The chart name
|
|
91
|
+
# @param version The chart version
|
|
92
|
+
# @param id The label ID
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def chartrepo_repo_charts_name_version_labels_id_delete(repo, name, version, id, opts = {})
|
|
96
|
+
chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Remove label from chart.
|
|
101
|
+
# Remove label from the specified chart version.
|
|
102
|
+
# @param repo The project name
|
|
103
|
+
# @param name The chart name
|
|
104
|
+
# @param version The chart version
|
|
105
|
+
# @param id The label ID
|
|
106
|
+
# @param [Hash] opts the optional parameters
|
|
107
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
108
|
+
def chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts = {})
|
|
109
|
+
if @api_client.config.debugging
|
|
110
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.chartrepo_repo_charts_name_version_labels_id_delete ...'
|
|
111
|
+
end
|
|
112
|
+
# verify the required parameter 'repo' is set
|
|
113
|
+
if @api_client.config.client_side_validation && repo.nil?
|
|
114
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling LabelApi.chartrepo_repo_charts_name_version_labels_id_delete"
|
|
115
|
+
end
|
|
116
|
+
# verify the required parameter 'name' is set
|
|
117
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
118
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling LabelApi.chartrepo_repo_charts_name_version_labels_id_delete"
|
|
119
|
+
end
|
|
120
|
+
# verify the required parameter 'version' is set
|
|
121
|
+
if @api_client.config.client_side_validation && version.nil?
|
|
122
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling LabelApi.chartrepo_repo_charts_name_version_labels_id_delete"
|
|
123
|
+
end
|
|
124
|
+
# verify the required parameter 'id' is set
|
|
125
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
126
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LabelApi.chartrepo_repo_charts_name_version_labels_id_delete"
|
|
127
|
+
end
|
|
128
|
+
# resource path
|
|
129
|
+
local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels/{id}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s).sub('{' + 'id' + '}', id.to_s)
|
|
130
|
+
|
|
131
|
+
# query parameters
|
|
132
|
+
query_params = {}
|
|
133
|
+
|
|
134
|
+
# header parameters
|
|
135
|
+
header_params = {}
|
|
136
|
+
# HTTP header 'Accept' (if needed)
|
|
137
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
|
|
138
|
+
# HTTP header 'Content-Type'
|
|
139
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
140
|
+
|
|
141
|
+
# form parameters
|
|
142
|
+
form_params = {}
|
|
143
|
+
|
|
144
|
+
# http body (model)
|
|
145
|
+
post_body = nil
|
|
146
|
+
auth_names = ['basicAuth']
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
148
|
+
:header_params => header_params,
|
|
149
|
+
:query_params => query_params,
|
|
150
|
+
:form_params => form_params,
|
|
151
|
+
:body => post_body,
|
|
152
|
+
:auth_names => auth_names)
|
|
153
|
+
if @api_client.config.debugging
|
|
154
|
+
@api_client.config.logger.debug "API called: LabelApi#chartrepo_repo_charts_name_version_labels_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
155
|
+
end
|
|
156
|
+
return data, status_code, headers
|
|
157
|
+
end
|
|
158
|
+
# Mark label to chart.
|
|
159
|
+
# Mark label to the specified chart version.
|
|
160
|
+
# @param repo The project name
|
|
161
|
+
# @param name The chart name
|
|
162
|
+
# @param version The chart version
|
|
163
|
+
# @param label The label being marked to the chart version
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [nil]
|
|
166
|
+
def chartrepo_repo_charts_name_version_labels_post(repo, name, version, label, opts = {})
|
|
167
|
+
chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts)
|
|
168
|
+
nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Mark label to chart.
|
|
172
|
+
# Mark label to the specified chart version.
|
|
173
|
+
# @param repo The project name
|
|
174
|
+
# @param name The chart name
|
|
175
|
+
# @param version The chart version
|
|
176
|
+
# @param label The label being marked to the chart version
|
|
177
|
+
# @param [Hash] opts the optional parameters
|
|
178
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
179
|
+
def chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts = {})
|
|
180
|
+
if @api_client.config.debugging
|
|
181
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.chartrepo_repo_charts_name_version_labels_post ...'
|
|
182
|
+
end
|
|
183
|
+
# verify the required parameter 'repo' is set
|
|
184
|
+
if @api_client.config.client_side_validation && repo.nil?
|
|
185
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling LabelApi.chartrepo_repo_charts_name_version_labels_post"
|
|
186
|
+
end
|
|
187
|
+
# verify the required parameter 'name' is set
|
|
188
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
189
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling LabelApi.chartrepo_repo_charts_name_version_labels_post"
|
|
190
|
+
end
|
|
191
|
+
# verify the required parameter 'version' is set
|
|
192
|
+
if @api_client.config.client_side_validation && version.nil?
|
|
193
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling LabelApi.chartrepo_repo_charts_name_version_labels_post"
|
|
194
|
+
end
|
|
195
|
+
# verify the required parameter 'label' is set
|
|
196
|
+
if @api_client.config.client_side_validation && label.nil?
|
|
197
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.chartrepo_repo_charts_name_version_labels_post"
|
|
198
|
+
end
|
|
199
|
+
# resource path
|
|
200
|
+
local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)
|
|
201
|
+
|
|
202
|
+
# query parameters
|
|
203
|
+
query_params = {}
|
|
204
|
+
|
|
205
|
+
# header parameters
|
|
206
|
+
header_params = {}
|
|
207
|
+
# HTTP header 'Accept' (if needed)
|
|
208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
|
|
209
|
+
# HTTP header 'Content-Type'
|
|
210
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
211
|
+
|
|
212
|
+
# form parameters
|
|
213
|
+
form_params = {}
|
|
214
|
+
|
|
215
|
+
# http body (model)
|
|
216
|
+
post_body = @api_client.object_to_http_body(label)
|
|
217
|
+
auth_names = ['basicAuth']
|
|
218
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
219
|
+
:header_params => header_params,
|
|
220
|
+
:query_params => query_params,
|
|
221
|
+
:form_params => form_params,
|
|
222
|
+
:body => post_body,
|
|
223
|
+
:auth_names => auth_names)
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug "API called: LabelApi#chartrepo_repo_charts_name_version_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
226
|
+
end
|
|
227
|
+
return data, status_code, headers
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|