harbor2_client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +186 -0
  4. data/Rakefile +8 -0
  5. data/docs/AdditionLink.md +9 -0
  6. data/docs/AdditionLinks.md +7 -0
  7. data/docs/Annotations.md +7 -0
  8. data/docs/Artifact.md +25 -0
  9. data/docs/ArtifactApi.md +694 -0
  10. data/docs/AuditLog.md +13 -0
  11. data/docs/AuditlogApi.md +69 -0
  12. data/docs/CVEAllowlist.md +13 -0
  13. data/docs/CVEAllowlistItem.md +8 -0
  14. data/docs/Error.md +9 -0
  15. data/docs/Errors.md +8 -0
  16. data/docs/Execution.md +17 -0
  17. data/docs/ExtraAttrs.md +7 -0
  18. data/docs/Icon.md +9 -0
  19. data/docs/IconApi.md +66 -0
  20. data/docs/Instance.md +19 -0
  21. data/docs/Label.md +15 -0
  22. data/docs/Metadata.md +13 -0
  23. data/docs/Metrics.md +14 -0
  24. data/docs/NativeReportSummary.md +15 -0
  25. data/docs/Platform.md +12 -0
  26. data/docs/PreheatApi.md +1176 -0
  27. data/docs/PreheatPolicy.md +18 -0
  28. data/docs/Project.md +22 -0
  29. data/docs/ProjectApi.md +542 -0
  30. data/docs/ProjectDeletable.md +9 -0
  31. data/docs/ProjectMetadata.md +14 -0
  32. data/docs/ProjectReq.md +13 -0
  33. data/docs/ProjectSummary.md +16 -0
  34. data/docs/ProjectSummaryQuota.md +9 -0
  35. data/docs/ProviderUnderProject.md +11 -0
  36. data/docs/Reference.md +13 -0
  37. data/docs/Registry.md +17 -0
  38. data/docs/RegistryCredential.md +10 -0
  39. data/docs/Repository.md +15 -0
  40. data/docs/RepositoryApi.md +256 -0
  41. data/docs/ResourceList.md +7 -0
  42. data/docs/ScanApi.md +138 -0
  43. data/docs/ScanOverview.md +7 -0
  44. data/docs/Tag.md +15 -0
  45. data/docs/Task.md +17 -0
  46. data/docs/VulnerabilitySummary.md +10 -0
  47. data/git_push.sh +55 -0
  48. data/harbor2_client.gemspec +46 -0
  49. data/lib/harbor2_client.rb +81 -0
  50. data/lib/harbor2_client/api/artifact_api.rb +848 -0
  51. data/lib/harbor2_client/api/auditlog_api.rb +91 -0
  52. data/lib/harbor2_client/api/icon_api.rb +84 -0
  53. data/lib/harbor2_client/api/preheat_api.rb +1327 -0
  54. data/lib/harbor2_client/api/project_api.rb +601 -0
  55. data/lib/harbor2_client/api/repository_api.rb +302 -0
  56. data/lib/harbor2_client/api/scan_api.rb +174 -0
  57. data/lib/harbor2_client/api_client.rb +391 -0
  58. data/lib/harbor2_client/api_error.rb +38 -0
  59. data/lib/harbor2_client/configuration.rb +209 -0
  60. data/lib/harbor2_client/models/addition_link.rb +195 -0
  61. data/lib/harbor2_client/models/addition_links.rb +175 -0
  62. data/lib/harbor2_client/models/annotations.rb +175 -0
  63. data/lib/harbor2_client/models/artifact.rb +355 -0
  64. data/lib/harbor2_client/models/audit_log.rb +235 -0
  65. data/lib/harbor2_client/models/cve_allowlist.rb +237 -0
  66. data/lib/harbor2_client/models/cve_allowlist_item.rb +186 -0
  67. data/lib/harbor2_client/models/error.rb +196 -0
  68. data/lib/harbor2_client/models/errors.rb +187 -0
  69. data/lib/harbor2_client/models/execution.rb +273 -0
  70. data/lib/harbor2_client/models/extra_attrs.rb +175 -0
  71. data/lib/harbor2_client/models/icon.rb +195 -0
  72. data/lib/harbor2_client/models/instance.rb +297 -0
  73. data/lib/harbor2_client/models/label.rb +255 -0
  74. data/lib/harbor2_client/models/metadata.rb +237 -0
  75. data/lib/harbor2_client/models/metrics.rb +245 -0
  76. data/lib/harbor2_client/models/native_report_summary.rb +255 -0
  77. data/lib/harbor2_client/models/platform.rb +227 -0
  78. data/lib/harbor2_client/models/preheat_policy.rb +285 -0
  79. data/lib/harbor2_client/models/project.rb +327 -0
  80. data/lib/harbor2_client/models/project_deletable.rb +195 -0
  81. data/lib/harbor2_client/models/project_metadata.rb +245 -0
  82. data/lib/harbor2_client/models/project_req.rb +235 -0
  83. data/lib/harbor2_client/models/project_summary.rb +263 -0
  84. data/lib/harbor2_client/models/project_summary_quota.rb +195 -0
  85. data/lib/harbor2_client/models/provider_under_project.rb +211 -0
  86. data/lib/harbor2_client/models/reference.rb +235 -0
  87. data/lib/harbor2_client/models/registry.rb +274 -0
  88. data/lib/harbor2_client/models/registry_credential.rb +205 -0
  89. data/lib/harbor2_client/models/repository.rb +255 -0
  90. data/lib/harbor2_client/models/resource_list.rb +175 -0
  91. data/lib/harbor2_client/models/scan_overview.rb +176 -0
  92. data/lib/harbor2_client/models/tag.rb +255 -0
  93. data/lib/harbor2_client/models/task.rb +274 -0
  94. data/lib/harbor2_client/models/vulnerability_summary.rb +208 -0
  95. data/lib/harbor2_client/version.rb +15 -0
  96. data/spec/api/artifact_api_spec.rb +209 -0
  97. data/spec/api/auditlog_api_spec.rb +50 -0
  98. data/spec/api/icon_api_spec.rb +48 -0
  99. data/spec/api/preheat_api_spec.rb +311 -0
  100. data/spec/api/project_api_spec.rb +160 -0
  101. data/spec/api/repository_api_spec.rb +94 -0
  102. data/spec/api/scan_api_spec.rb +66 -0
  103. data/spec/api_client_spec.rb +243 -0
  104. data/spec/configuration_spec.rb +42 -0
  105. data/spec/models/addition_link_spec.rb +47 -0
  106. data/spec/models/addition_links_spec.rb +35 -0
  107. data/spec/models/annotations_spec.rb +35 -0
  108. data/spec/models/artifact_spec.rb +143 -0
  109. data/spec/models/audit_log_spec.rb +71 -0
  110. data/spec/models/cve_allowlist_item_spec.rb +41 -0
  111. data/spec/models/cve_allowlist_spec.rb +71 -0
  112. data/spec/models/error_spec.rb +47 -0
  113. data/spec/models/errors_spec.rb +41 -0
  114. data/spec/models/execution_spec.rb +95 -0
  115. data/spec/models/extra_attrs_spec.rb +35 -0
  116. data/spec/models/icon_spec.rb +47 -0
  117. data/spec/models/instance_spec.rb +107 -0
  118. data/spec/models/label_spec.rb +83 -0
  119. data/spec/models/metadata_spec.rb +71 -0
  120. data/spec/models/metrics_spec.rb +77 -0
  121. data/spec/models/native_report_summary_spec.rb +83 -0
  122. data/spec/models/platform_spec.rb +65 -0
  123. data/spec/models/preheat_policy_spec.rb +101 -0
  124. data/spec/models/project_deletable_spec.rb +47 -0
  125. data/spec/models/project_metadata_spec.rb +77 -0
  126. data/spec/models/project_req_spec.rb +71 -0
  127. data/spec/models/project_spec.rb +125 -0
  128. data/spec/models/project_summary_quota_spec.rb +47 -0
  129. data/spec/models/project_summary_spec.rb +89 -0
  130. data/spec/models/provider_under_project_spec.rb +59 -0
  131. data/spec/models/reference_spec.rb +71 -0
  132. data/spec/models/registry_credential_spec.rb +53 -0
  133. data/spec/models/registry_spec.rb +95 -0
  134. data/spec/models/repository_spec.rb +83 -0
  135. data/spec/models/resource_list_spec.rb +35 -0
  136. data/spec/models/scan_overview_spec.rb +35 -0
  137. data/spec/models/tag_spec.rb +83 -0
  138. data/spec/models/task_spec.rb +95 -0
  139. data/spec/models/vulnerability_summary_spec.rb +53 -0
  140. data/spec/spec_helper.rb +111 -0
  141. metadata +428 -0
@@ -0,0 +1,13 @@
1
+ # Harbor2Client::AuditLog
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | The ID of the audit log entry. | [optional]
7
+ **username** | **String** | Username of the user in this log entry. | [optional]
8
+ **resource** | **String** | Name of the repository in this log entry. | [optional]
9
+ **resource_type** | **String** | Tag of the repository in this log entry. | [optional]
10
+ **operation** | **String** | The operation against the repository in this log entry. | [optional]
11
+ **op_time** | **DateTime** | The time when this operation is triggered. | [optional]
12
+
13
+
@@ -0,0 +1,69 @@
1
+ # Harbor2Client::AuditlogApi
2
+
3
+ All URIs are relative to *http://localhost/api/v2.0*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**list_audit_logs**](AuditlogApi.md#list_audit_logs) | **GET** /audit-logs | Get recent logs of the projects which the user is a member of
8
+
9
+
10
+ # **list_audit_logs**
11
+ > Array<AuditLog> list_audit_logs(opts)
12
+
13
+ Get recent logs of the projects which the user is a member of
14
+
15
+ This endpoint let user see the recent operation logs of the projects which he is member of
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'harbor2_client'
21
+ # setup authorization
22
+ Harbor2Client.configure do |config|
23
+ # Configure HTTP basic authorization: basic
24
+ config.username = 'YOUR USERNAME'
25
+ config.password = 'YOUR PASSWORD'
26
+ end
27
+
28
+ api_instance = Harbor2Client::AuditlogApi.new
29
+
30
+ opts = {
31
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
32
+ q: 'q_example' # String | 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]
33
+ page: 1, # Integer | The page number
34
+ page_size: 10, # Integer | The size of per page
35
+ }
36
+
37
+ begin
38
+ #Get recent logs of the projects which the user is a member of
39
+ result = api_instance.list_audit_logs(opts)
40
+ p result
41
+ rescue Harbor2Client::ApiError => e
42
+ puts "Exception when calling AuditlogApi->list_audit_logs: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ Name | Type | Description | Notes
49
+ ------------- | ------------- | ------------- | -------------
50
+ **x_request_id** | **String**| An unique ID for the request | [optional]
51
+ **q** | **String**| 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] | [optional]
52
+ **page** | **Integer**| The page number | [optional] [default to 1]
53
+ **page_size** | **Integer**| The size of per page | [optional] [default to 10]
54
+
55
+ ### Return type
56
+
57
+ [**Array<AuditLog>**](AuditLog.md)
58
+
59
+ ### Authorization
60
+
61
+ [basic](../README.md#basic)
62
+
63
+ ### HTTP request headers
64
+
65
+ - **Content-Type**: application/json
66
+ - **Accept**: application/json
67
+
68
+
69
+
@@ -0,0 +1,13 @@
1
+ # Harbor2Client::CVEAllowlist
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | ID of the allowlist | [optional]
7
+ **project_id** | **Integer** | ID of the project which the allowlist belongs to. For system level allowlist this attribute is zero. | [optional]
8
+ **expires_at** | **Integer** | the time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire. | [optional]
9
+ **items** | [**Array<CVEAllowlistItem>**](CVEAllowlistItem.md) | | [optional]
10
+ **creation_time** | **DateTime** | The creation time of the allowlist. | [optional]
11
+ **update_time** | **DateTime** | The update time of the allowlist. | [optional]
12
+
13
+
@@ -0,0 +1,8 @@
1
+ # Harbor2Client::CVEAllowlistItem
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **cve_id** | **String** | The ID of the CVE, such as \"CVE-2019-10164\" | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # Harbor2Client::Error
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **code** | **String** | The error code | [optional]
7
+ **message** | **String** | The error message | [optional]
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # Harbor2Client::Errors
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **errors** | [**Array<Error>**](Error.md) | | [optional]
7
+
8
+
@@ -0,0 +1,17 @@
1
+ # Harbor2Client::Execution
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | The ID of execution | [optional]
7
+ **vendor_type** | **String** | The vendor type of execution | [optional]
8
+ **vendor_id** | **Integer** | The vendor id of execution | [optional]
9
+ **status** | **String** | The status of execution | [optional]
10
+ **status_message** | **String** | The status message of execution | [optional]
11
+ **metrics** | [**Metrics**](Metrics.md) | | [optional]
12
+ **trigger** | **String** | The trigger of execution | [optional]
13
+ **extra_attrs** | [**ExtraAttrs**](ExtraAttrs.md) | | [optional]
14
+ **start_time** | **String** | The start time of execution | [optional]
15
+ **end_time** | **String** | The end time of execution | [optional]
16
+
17
+
@@ -0,0 +1,7 @@
1
+ # Harbor2Client::ExtraAttrs
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,9 @@
1
+ # Harbor2Client::Icon
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **content_type** | **String** | The content type of the icon | [optional]
7
+ **content** | **String** | The base64 encoded content of the icon | [optional]
8
+
9
+
@@ -0,0 +1,66 @@
1
+ # Harbor2Client::IconApi
2
+
3
+ All URIs are relative to *http://localhost/api/v2.0*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_icon**](IconApi.md#get_icon) | **GET** /icons/{digest} | Get artifact icon
8
+
9
+
10
+ # **get_icon**
11
+ > Icon get_icon(digest, opts)
12
+
13
+ Get artifact icon
14
+
15
+ Get the artifact icon with the specified digest. As the original icon image is resized and encoded before returning, the parameter \"digest\" in the path doesn't match the hash of the returned content
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'harbor2_client'
21
+ # setup authorization
22
+ Harbor2Client.configure do |config|
23
+ # Configure HTTP basic authorization: basic
24
+ config.username = 'YOUR USERNAME'
25
+ config.password = 'YOUR PASSWORD'
26
+ end
27
+
28
+ api_instance = Harbor2Client::IconApi.new
29
+
30
+ digest = 'digest_example' # String | The digest of the resource
31
+
32
+ opts = {
33
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
34
+ }
35
+
36
+ begin
37
+ #Get artifact icon
38
+ result = api_instance.get_icon(digest, opts)
39
+ p result
40
+ rescue Harbor2Client::ApiError => e
41
+ puts "Exception when calling IconApi->get_icon: #{e}"
42
+ end
43
+ ```
44
+
45
+ ### Parameters
46
+
47
+ Name | Type | Description | Notes
48
+ ------------- | ------------- | ------------- | -------------
49
+ **digest** | **String**| The digest of the resource |
50
+ **x_request_id** | **String**| An unique ID for the request | [optional]
51
+
52
+ ### Return type
53
+
54
+ [**Icon**](Icon.md)
55
+
56
+ ### Authorization
57
+
58
+ [basic](../README.md#basic)
59
+
60
+ ### HTTP request headers
61
+
62
+ - **Content-Type**: application/json
63
+ - **Accept**: application/json
64
+
65
+
66
+
@@ -0,0 +1,19 @@
1
+ # Harbor2Client::Instance
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | Unique ID | [optional]
7
+ **name** | **String** | Instance name | [optional]
8
+ **description** | **String** | Description of instance | [optional]
9
+ **vendor** | **String** | Based on which driver, identified by ID | [optional]
10
+ **endpoint** | **String** | The service endpoint of this instance | [optional]
11
+ **auth_mode** | **String** | The authentication way supported | [optional]
12
+ **auth_info** | **Hash<String, String>** | The auth credential data if exists | [optional]
13
+ **status** | **String** | The health status | [optional]
14
+ **enabled** | **BOOLEAN** | Whether the instance is activated or not | [optional]
15
+ **default** | **BOOLEAN** | Whether the instance is default or not | [optional]
16
+ **insecure** | **BOOLEAN** | Whether the instance endpoint is insecure or not | [optional]
17
+ **setup_timestamp** | **Integer** | The timestamp of instance setting up | [optional]
18
+
19
+
@@ -0,0 +1,15 @@
1
+ # Harbor2Client::Label
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | The ID of the label | [optional]
7
+ **name** | **String** | The name the label | [optional]
8
+ **description** | **String** | The description the label | [optional]
9
+ **color** | **String** | The color the label | [optional]
10
+ **scope** | **String** | The scope the label | [optional]
11
+ **project_id** | **Integer** | The ID of project that the label belongs to | [optional]
12
+ **creation_time** | **DateTime** | The creation time the label | [optional]
13
+ **update_time** | **DateTime** | The update time of the label | [optional]
14
+
15
+
@@ -0,0 +1,13 @@
1
+ # Harbor2Client::Metadata
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | id | [optional]
7
+ **name** | **String** | name | [optional]
8
+ **icon** | **String** | icon | [optional]
9
+ **maintainers** | **Array<String>** | maintainers | [optional]
10
+ **version** | **String** | version | [optional]
11
+ **source** | **String** | source | [optional]
12
+
13
+
@@ -0,0 +1,14 @@
1
+ # Harbor2Client::Metrics
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **task_count** | **Integer** | The count of task | [optional]
7
+ **success_task_count** | **Integer** | The count of success task | [optional]
8
+ **error_task_count** | **Integer** | The count of error task | [optional]
9
+ **pending_task_count** | **Integer** | The count of pending task | [optional]
10
+ **running_task_count** | **Integer** | The count of running task | [optional]
11
+ **scheduled_task_count** | **Integer** | The count of scheduled task | [optional]
12
+ **stopped_task_count** | **Integer** | The count of stopped task | [optional]
13
+
14
+
@@ -0,0 +1,15 @@
1
+ # Harbor2Client::NativeReportSummary
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **report_id** | **String** | id of the native scan report | [optional]
7
+ **scan_status** | **String** | The status of the report generating process | [optional]
8
+ **severity** | **String** | The overall severity | [optional]
9
+ **duration** | **Integer** | The seconds spent for generating the report | [optional]
10
+ **summary** | [**VulnerabilitySummary**](VulnerabilitySummary.md) | | [optional]
11
+ **start_time** | **DateTime** | The start time of the scan process that generating report | [optional]
12
+ **end_time** | **DateTime** | The end time of the scan process that generating report | [optional]
13
+ **complete_percent** | **Integer** | The complete percent of the scanning which value is between 0 and 100 | [optional]
14
+
15
+
@@ -0,0 +1,12 @@
1
+ # Harbor2Client::Platform
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **architecture** | **String** | The architecture that the artifact applys to | [optional]
7
+ **os** | **String** | The OS that the artifact applys to | [optional]
8
+ **os_version** | **String** | The version of the OS that the artifact applys to | [optional]
9
+ **os_features** | **Array<String>** | The features of the OS that the artifact applys to | [optional]
10
+ **variant** | **String** | The variant of the CPU | [optional]
11
+
12
+
@@ -0,0 +1,1176 @@
1
+ # Harbor2Client::PreheatApi
2
+
3
+ All URIs are relative to *http://localhost/api/v2.0*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_instance**](PreheatApi.md#create_instance) | **POST** /p2p/preheat/instances | Create p2p provider instances
8
+ [**create_policy**](PreheatApi.md#create_policy) | **POST** /projects/{project_name}/preheat/policies | Create a preheat policy under a project
9
+ [**delete_instance**](PreheatApi.md#delete_instance) | **DELETE** /p2p/preheat/instances/{preheat_instance_name} | Delete the specified P2P provider instance
10
+ [**delete_policy**](PreheatApi.md#delete_policy) | **DELETE** /projects/{project_name}/preheat/policies/{preheat_policy_name} | Delete a preheat policy
11
+ [**get_execution**](PreheatApi.md#get_execution) | **GET** /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id} | Get a execution detail by id
12
+ [**get_instance**](PreheatApi.md#get_instance) | **GET** /p2p/preheat/instances/{preheat_instance_name} | Get a P2P provider instance
13
+ [**get_policy**](PreheatApi.md#get_policy) | **GET** /projects/{project_name}/preheat/policies/{preheat_policy_name} | Get a preheat policy
14
+ [**get_preheat_log**](PreheatApi.md#get_preheat_log) | **GET** /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}/tasks/{task_id}/logs | Get the log text stream of the specified task for the given execution
15
+ [**list_executions**](PreheatApi.md#list_executions) | **GET** /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions | List executions for the given policy
16
+ [**list_instances**](PreheatApi.md#list_instances) | **GET** /p2p/preheat/instances | List P2P provider instances
17
+ [**list_policies**](PreheatApi.md#list_policies) | **GET** /projects/{project_name}/preheat/policies | List preheat policies
18
+ [**list_providers**](PreheatApi.md#list_providers) | **GET** /p2p/preheat/providers | List P2P providers
19
+ [**list_providers_under_project**](PreheatApi.md#list_providers_under_project) | **GET** /projects/{project_name}/preheat/providers | Get all providers at project level
20
+ [**list_tasks**](PreheatApi.md#list_tasks) | **GET** /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}/tasks | List all the related tasks for the given execution
21
+ [**manual_preheat**](PreheatApi.md#manual_preheat) | **POST** /projects/{project_name}/preheat/policies/{preheat_policy_name} | Manual preheat
22
+ [**ping_instances**](PreheatApi.md#ping_instances) | **POST** /p2p/preheat/instances/ping | Ping status of a instance.
23
+ [**stop_execution**](PreheatApi.md#stop_execution) | **PATCH** /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id} | Stop a execution
24
+ [**update_instance**](PreheatApi.md#update_instance) | **PUT** /p2p/preheat/instances/{preheat_instance_name} | Update the specified P2P provider instance
25
+ [**update_policy**](PreheatApi.md#update_policy) | **PUT** /projects/{project_name}/preheat/policies/{preheat_policy_name} | Update preheat policy
26
+
27
+
28
+ # **create_instance**
29
+ > create_instance(instance, opts)
30
+
31
+ Create p2p provider instances
32
+
33
+ Create p2p provider instances
34
+
35
+ ### Example
36
+ ```ruby
37
+ # load the gem
38
+ require 'harbor2_client'
39
+ # setup authorization
40
+ Harbor2Client.configure do |config|
41
+ # Configure HTTP basic authorization: basic
42
+ config.username = 'YOUR USERNAME'
43
+ config.password = 'YOUR PASSWORD'
44
+ end
45
+
46
+ api_instance = Harbor2Client::PreheatApi.new
47
+
48
+ instance = Harbor2Client::Instance.new # Instance | The JSON object of instance.
49
+
50
+ opts = {
51
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
52
+ }
53
+
54
+ begin
55
+ #Create p2p provider instances
56
+ api_instance.create_instance(instance, opts)
57
+ rescue Harbor2Client::ApiError => e
58
+ puts "Exception when calling PreheatApi->create_instance: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ Name | Type | Description | Notes
65
+ ------------- | ------------- | ------------- | -------------
66
+ **instance** | [**Instance**](Instance.md)| The JSON object of instance. |
67
+ **x_request_id** | **String**| An unique ID for the request | [optional]
68
+
69
+ ### Return type
70
+
71
+ nil (empty response body)
72
+
73
+ ### Authorization
74
+
75
+ [basic](../README.md#basic)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: application/json
80
+ - **Accept**: application/json
81
+
82
+
83
+
84
+ # **create_policy**
85
+ > create_policy(project_namepolicy, opts)
86
+
87
+ Create a preheat policy under a project
88
+
89
+ Create a preheat policy under a project
90
+
91
+ ### Example
92
+ ```ruby
93
+ # load the gem
94
+ require 'harbor2_client'
95
+ # setup authorization
96
+ Harbor2Client.configure do |config|
97
+ # Configure HTTP basic authorization: basic
98
+ config.username = 'YOUR USERNAME'
99
+ config.password = 'YOUR PASSWORD'
100
+ end
101
+
102
+ api_instance = Harbor2Client::PreheatApi.new
103
+
104
+ project_name = 'project_name_example' # String | The name of the project
105
+
106
+ policy = Harbor2Client::PreheatPolicy.new # PreheatPolicy | The policy schema info
107
+
108
+ opts = {
109
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
110
+ }
111
+
112
+ begin
113
+ #Create a preheat policy under a project
114
+ api_instance.create_policy(project_namepolicy, opts)
115
+ rescue Harbor2Client::ApiError => e
116
+ puts "Exception when calling PreheatApi->create_policy: #{e}"
117
+ end
118
+ ```
119
+
120
+ ### Parameters
121
+
122
+ Name | Type | Description | Notes
123
+ ------------- | ------------- | ------------- | -------------
124
+ **project_name** | **String**| The name of the project |
125
+ **policy** | [**PreheatPolicy**](PreheatPolicy.md)| The policy schema info |
126
+ **x_request_id** | **String**| An unique ID for the request | [optional]
127
+
128
+ ### Return type
129
+
130
+ nil (empty response body)
131
+
132
+ ### Authorization
133
+
134
+ [basic](../README.md#basic)
135
+
136
+ ### HTTP request headers
137
+
138
+ - **Content-Type**: application/json
139
+ - **Accept**: application/json
140
+
141
+
142
+
143
+ # **delete_instance**
144
+ > delete_instance(preheat_instance_name, opts)
145
+
146
+ Delete the specified P2P provider instance
147
+
148
+ Delete the specified P2P provider instance
149
+
150
+ ### Example
151
+ ```ruby
152
+ # load the gem
153
+ require 'harbor2_client'
154
+ # setup authorization
155
+ Harbor2Client.configure do |config|
156
+ # Configure HTTP basic authorization: basic
157
+ config.username = 'YOUR USERNAME'
158
+ config.password = 'YOUR PASSWORD'
159
+ end
160
+
161
+ api_instance = Harbor2Client::PreheatApi.new
162
+
163
+ preheat_instance_name = 'preheat_instance_name_example' # String | Instance Name
164
+
165
+ opts = {
166
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
167
+ }
168
+
169
+ begin
170
+ #Delete the specified P2P provider instance
171
+ api_instance.delete_instance(preheat_instance_name, opts)
172
+ rescue Harbor2Client::ApiError => e
173
+ puts "Exception when calling PreheatApi->delete_instance: #{e}"
174
+ end
175
+ ```
176
+
177
+ ### Parameters
178
+
179
+ Name | Type | Description | Notes
180
+ ------------- | ------------- | ------------- | -------------
181
+ **preheat_instance_name** | **String**| Instance Name |
182
+ **x_request_id** | **String**| An unique ID for the request | [optional]
183
+
184
+ ### Return type
185
+
186
+ nil (empty response body)
187
+
188
+ ### Authorization
189
+
190
+ [basic](../README.md#basic)
191
+
192
+ ### HTTP request headers
193
+
194
+ - **Content-Type**: application/json
195
+ - **Accept**: application/json
196
+
197
+
198
+
199
+ # **delete_policy**
200
+ > delete_policy(project_namepreheat_policy_name, , opts)
201
+
202
+ Delete a preheat policy
203
+
204
+ Delete a preheat policy
205
+
206
+ ### Example
207
+ ```ruby
208
+ # load the gem
209
+ require 'harbor2_client'
210
+ # setup authorization
211
+ Harbor2Client.configure do |config|
212
+ # Configure HTTP basic authorization: basic
213
+ config.username = 'YOUR USERNAME'
214
+ config.password = 'YOUR PASSWORD'
215
+ end
216
+
217
+ api_instance = Harbor2Client::PreheatApi.new
218
+
219
+ project_name = 'project_name_example' # String | The name of the project
220
+
221
+ preheat_policy_name = 'preheat_policy_name_example' # String | Preheat Policy Name
222
+
223
+ opts = {
224
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
225
+ }
226
+
227
+ begin
228
+ #Delete a preheat policy
229
+ api_instance.delete_policy(project_namepreheat_policy_name, , opts)
230
+ rescue Harbor2Client::ApiError => e
231
+ puts "Exception when calling PreheatApi->delete_policy: #{e}"
232
+ end
233
+ ```
234
+
235
+ ### Parameters
236
+
237
+ Name | Type | Description | Notes
238
+ ------------- | ------------- | ------------- | -------------
239
+ **project_name** | **String**| The name of the project |
240
+ **preheat_policy_name** | **String**| Preheat Policy Name |
241
+ **x_request_id** | **String**| An unique ID for the request | [optional]
242
+
243
+ ### Return type
244
+
245
+ nil (empty response body)
246
+
247
+ ### Authorization
248
+
249
+ [basic](../README.md#basic)
250
+
251
+ ### HTTP request headers
252
+
253
+ - **Content-Type**: application/json
254
+ - **Accept**: application/json
255
+
256
+
257
+
258
+ # **get_execution**
259
+ > Execution get_execution(project_namepreheat_policy_name, execution_id, , opts)
260
+
261
+ Get a execution detail by id
262
+
263
+ Get a execution detail by id
264
+
265
+ ### Example
266
+ ```ruby
267
+ # load the gem
268
+ require 'harbor2_client'
269
+ # setup authorization
270
+ Harbor2Client.configure do |config|
271
+ # Configure HTTP basic authorization: basic
272
+ config.username = 'YOUR USERNAME'
273
+ config.password = 'YOUR PASSWORD'
274
+ end
275
+
276
+ api_instance = Harbor2Client::PreheatApi.new
277
+
278
+ project_name = 'project_name_example' # String | The name of the project
279
+
280
+ preheat_policy_name = 'preheat_policy_name_example' # String | Preheat Policy Name
281
+
282
+ execution_id = 56 # Integer | Execution ID
283
+
284
+ opts = {
285
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
286
+ }
287
+
288
+ begin
289
+ #Get a execution detail by id
290
+ result = api_instance.get_execution(project_namepreheat_policy_name, execution_id, , opts)
291
+ p result
292
+ rescue Harbor2Client::ApiError => e
293
+ puts "Exception when calling PreheatApi->get_execution: #{e}"
294
+ end
295
+ ```
296
+
297
+ ### Parameters
298
+
299
+ Name | Type | Description | Notes
300
+ ------------- | ------------- | ------------- | -------------
301
+ **project_name** | **String**| The name of the project |
302
+ **preheat_policy_name** | **String**| Preheat Policy Name |
303
+ **execution_id** | **Integer**| Execution ID |
304
+ **x_request_id** | **String**| An unique ID for the request | [optional]
305
+
306
+ ### Return type
307
+
308
+ [**Execution**](Execution.md)
309
+
310
+ ### Authorization
311
+
312
+ [basic](../README.md#basic)
313
+
314
+ ### HTTP request headers
315
+
316
+ - **Content-Type**: application/json
317
+ - **Accept**: application/json
318
+
319
+
320
+
321
+ # **get_instance**
322
+ > Instance get_instance(preheat_instance_name, opts)
323
+
324
+ Get a P2P provider instance
325
+
326
+ Get a P2P provider instance
327
+
328
+ ### Example
329
+ ```ruby
330
+ # load the gem
331
+ require 'harbor2_client'
332
+ # setup authorization
333
+ Harbor2Client.configure do |config|
334
+ # Configure HTTP basic authorization: basic
335
+ config.username = 'YOUR USERNAME'
336
+ config.password = 'YOUR PASSWORD'
337
+ end
338
+
339
+ api_instance = Harbor2Client::PreheatApi.new
340
+
341
+ preheat_instance_name = 'preheat_instance_name_example' # String | Instance Name
342
+
343
+ opts = {
344
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
345
+ }
346
+
347
+ begin
348
+ #Get a P2P provider instance
349
+ result = api_instance.get_instance(preheat_instance_name, opts)
350
+ p result
351
+ rescue Harbor2Client::ApiError => e
352
+ puts "Exception when calling PreheatApi->get_instance: #{e}"
353
+ end
354
+ ```
355
+
356
+ ### Parameters
357
+
358
+ Name | Type | Description | Notes
359
+ ------------- | ------------- | ------------- | -------------
360
+ **preheat_instance_name** | **String**| Instance Name |
361
+ **x_request_id** | **String**| An unique ID for the request | [optional]
362
+
363
+ ### Return type
364
+
365
+ [**Instance**](Instance.md)
366
+
367
+ ### Authorization
368
+
369
+ [basic](../README.md#basic)
370
+
371
+ ### HTTP request headers
372
+
373
+ - **Content-Type**: application/json
374
+ - **Accept**: application/json
375
+
376
+
377
+
378
+ # **get_policy**
379
+ > PreheatPolicy get_policy(project_namepreheat_policy_name, , opts)
380
+
381
+ Get a preheat policy
382
+
383
+ Get a preheat policy
384
+
385
+ ### Example
386
+ ```ruby
387
+ # load the gem
388
+ require 'harbor2_client'
389
+ # setup authorization
390
+ Harbor2Client.configure do |config|
391
+ # Configure HTTP basic authorization: basic
392
+ config.username = 'YOUR USERNAME'
393
+ config.password = 'YOUR PASSWORD'
394
+ end
395
+
396
+ api_instance = Harbor2Client::PreheatApi.new
397
+
398
+ project_name = 'project_name_example' # String | The name of the project
399
+
400
+ preheat_policy_name = 'preheat_policy_name_example' # String | Preheat Policy Name
401
+
402
+ opts = {
403
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
404
+ }
405
+
406
+ begin
407
+ #Get a preheat policy
408
+ result = api_instance.get_policy(project_namepreheat_policy_name, , opts)
409
+ p result
410
+ rescue Harbor2Client::ApiError => e
411
+ puts "Exception when calling PreheatApi->get_policy: #{e}"
412
+ end
413
+ ```
414
+
415
+ ### Parameters
416
+
417
+ Name | Type | Description | Notes
418
+ ------------- | ------------- | ------------- | -------------
419
+ **project_name** | **String**| The name of the project |
420
+ **preheat_policy_name** | **String**| Preheat Policy Name |
421
+ **x_request_id** | **String**| An unique ID for the request | [optional]
422
+
423
+ ### Return type
424
+
425
+ [**PreheatPolicy**](PreheatPolicy.md)
426
+
427
+ ### Authorization
428
+
429
+ [basic](../README.md#basic)
430
+
431
+ ### HTTP request headers
432
+
433
+ - **Content-Type**: application/json
434
+ - **Accept**: application/json
435
+
436
+
437
+
438
+ # **get_preheat_log**
439
+ > String get_preheat_log(project_namepreheat_policy_name, execution_id, task_id, opts)
440
+
441
+ Get the log text stream of the specified task for the given execution
442
+
443
+ Get the log text stream of the specified task for the given execution
444
+
445
+ ### Example
446
+ ```ruby
447
+ # load the gem
448
+ require 'harbor2_client'
449
+ # setup authorization
450
+ Harbor2Client.configure do |config|
451
+ # Configure HTTP basic authorization: basic
452
+ config.username = 'YOUR USERNAME'
453
+ config.password = 'YOUR PASSWORD'
454
+ end
455
+
456
+ api_instance = Harbor2Client::PreheatApi.new
457
+
458
+ project_name = 'project_name_example' # String | The name of the project
459
+
460
+ preheat_policy_name = 'preheat_policy_name_example' # String | Preheat Policy Name
461
+
462
+ execution_id = 56 # Integer | Execution ID
463
+
464
+ task_id = 56 # Integer | Task ID
465
+
466
+ opts = {
467
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
468
+ }
469
+
470
+ begin
471
+ #Get the log text stream of the specified task for the given execution
472
+ result = api_instance.get_preheat_log(project_namepreheat_policy_name, execution_id, task_id, opts)
473
+ p result
474
+ rescue Harbor2Client::ApiError => e
475
+ puts "Exception when calling PreheatApi->get_preheat_log: #{e}"
476
+ end
477
+ ```
478
+
479
+ ### Parameters
480
+
481
+ Name | Type | Description | Notes
482
+ ------------- | ------------- | ------------- | -------------
483
+ **project_name** | **String**| The name of the project |
484
+ **preheat_policy_name** | **String**| Preheat Policy Name |
485
+ **execution_id** | **Integer**| Execution ID |
486
+ **task_id** | **Integer**| Task ID |
487
+ **x_request_id** | **String**| An unique ID for the request | [optional]
488
+
489
+ ### Return type
490
+
491
+ **String**
492
+
493
+ ### Authorization
494
+
495
+ [basic](../README.md#basic)
496
+
497
+ ### HTTP request headers
498
+
499
+ - **Content-Type**: application/json
500
+ - **Accept**: text/plain
501
+
502
+
503
+
504
+ # **list_executions**
505
+ > Array<Execution> list_executions(project_namepreheat_policy_name, , opts)
506
+
507
+ List executions for the given policy
508
+
509
+ List executions for the given policy
510
+
511
+ ### Example
512
+ ```ruby
513
+ # load the gem
514
+ require 'harbor2_client'
515
+ # setup authorization
516
+ Harbor2Client.configure do |config|
517
+ # Configure HTTP basic authorization: basic
518
+ config.username = 'YOUR USERNAME'
519
+ config.password = 'YOUR PASSWORD'
520
+ end
521
+
522
+ api_instance = Harbor2Client::PreheatApi.new
523
+
524
+ project_name = 'project_name_example' # String | The name of the project
525
+
526
+ preheat_policy_name = 'preheat_policy_name_example' # String | Preheat Policy Name
527
+
528
+ opts = {
529
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
530
+ page: 1, # Integer | The page number
531
+ page_size: 10, # Integer | The size of per page
532
+ q: 'q_example' # String | 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]
533
+ }
534
+
535
+ begin
536
+ #List executions for the given policy
537
+ result = api_instance.list_executions(project_namepreheat_policy_name, , opts)
538
+ p result
539
+ rescue Harbor2Client::ApiError => e
540
+ puts "Exception when calling PreheatApi->list_executions: #{e}"
541
+ end
542
+ ```
543
+
544
+ ### Parameters
545
+
546
+ Name | Type | Description | Notes
547
+ ------------- | ------------- | ------------- | -------------
548
+ **project_name** | **String**| The name of the project |
549
+ **preheat_policy_name** | **String**| Preheat Policy Name |
550
+ **x_request_id** | **String**| An unique ID for the request | [optional]
551
+ **page** | **Integer**| The page number | [optional] [default to 1]
552
+ **page_size** | **Integer**| The size of per page | [optional] [default to 10]
553
+ **q** | **String**| 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] | [optional]
554
+
555
+ ### Return type
556
+
557
+ [**Array<Execution>**](Execution.md)
558
+
559
+ ### Authorization
560
+
561
+ [basic](../README.md#basic)
562
+
563
+ ### HTTP request headers
564
+
565
+ - **Content-Type**: application/json
566
+ - **Accept**: application/json
567
+
568
+
569
+
570
+ # **list_instances**
571
+ > Array<Instance> list_instances(opts)
572
+
573
+ List P2P provider instances
574
+
575
+ List P2P provider instances
576
+
577
+ ### Example
578
+ ```ruby
579
+ # load the gem
580
+ require 'harbor2_client'
581
+ # setup authorization
582
+ Harbor2Client.configure do |config|
583
+ # Configure HTTP basic authorization: basic
584
+ config.username = 'YOUR USERNAME'
585
+ config.password = 'YOUR PASSWORD'
586
+ end
587
+
588
+ api_instance = Harbor2Client::PreheatApi.new
589
+
590
+ opts = {
591
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
592
+ page: 1, # Integer | The page number
593
+ page_size: 10, # Integer | The size of per page
594
+ q: 'q_example' # String | 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]
595
+ }
596
+
597
+ begin
598
+ #List P2P provider instances
599
+ result = api_instance.list_instances(opts)
600
+ p result
601
+ rescue Harbor2Client::ApiError => e
602
+ puts "Exception when calling PreheatApi->list_instances: #{e}"
603
+ end
604
+ ```
605
+
606
+ ### Parameters
607
+
608
+ Name | Type | Description | Notes
609
+ ------------- | ------------- | ------------- | -------------
610
+ **x_request_id** | **String**| An unique ID for the request | [optional]
611
+ **page** | **Integer**| The page number | [optional] [default to 1]
612
+ **page_size** | **Integer**| The size of per page | [optional] [default to 10]
613
+ **q** | **String**| 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] | [optional]
614
+
615
+ ### Return type
616
+
617
+ [**Array<Instance>**](Instance.md)
618
+
619
+ ### Authorization
620
+
621
+ [basic](../README.md#basic)
622
+
623
+ ### HTTP request headers
624
+
625
+ - **Content-Type**: application/json
626
+ - **Accept**: application/json
627
+
628
+
629
+
630
+ # **list_policies**
631
+ > Array<PreheatPolicy> list_policies(project_name, opts)
632
+
633
+ List preheat policies
634
+
635
+ List preheat policies
636
+
637
+ ### Example
638
+ ```ruby
639
+ # load the gem
640
+ require 'harbor2_client'
641
+ # setup authorization
642
+ Harbor2Client.configure do |config|
643
+ # Configure HTTP basic authorization: basic
644
+ config.username = 'YOUR USERNAME'
645
+ config.password = 'YOUR PASSWORD'
646
+ end
647
+
648
+ api_instance = Harbor2Client::PreheatApi.new
649
+
650
+ project_name = 'project_name_example' # String | The name of the project
651
+
652
+ opts = {
653
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
654
+ page: 1, # Integer | The page number
655
+ page_size: 10, # Integer | The size of per page
656
+ q: 'q_example' # String | 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]
657
+ }
658
+
659
+ begin
660
+ #List preheat policies
661
+ result = api_instance.list_policies(project_name, opts)
662
+ p result
663
+ rescue Harbor2Client::ApiError => e
664
+ puts "Exception when calling PreheatApi->list_policies: #{e}"
665
+ end
666
+ ```
667
+
668
+ ### Parameters
669
+
670
+ Name | Type | Description | Notes
671
+ ------------- | ------------- | ------------- | -------------
672
+ **project_name** | **String**| The name of the project |
673
+ **x_request_id** | **String**| An unique ID for the request | [optional]
674
+ **page** | **Integer**| The page number | [optional] [default to 1]
675
+ **page_size** | **Integer**| The size of per page | [optional] [default to 10]
676
+ **q** | **String**| 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] | [optional]
677
+
678
+ ### Return type
679
+
680
+ [**Array<PreheatPolicy>**](PreheatPolicy.md)
681
+
682
+ ### Authorization
683
+
684
+ [basic](../README.md#basic)
685
+
686
+ ### HTTP request headers
687
+
688
+ - **Content-Type**: application/json
689
+ - **Accept**: application/json
690
+
691
+
692
+
693
+ # **list_providers**
694
+ > Array<Metadata> list_providers(opts)
695
+
696
+ List P2P providers
697
+
698
+ List P2P providers
699
+
700
+ ### Example
701
+ ```ruby
702
+ # load the gem
703
+ require 'harbor2_client'
704
+ # setup authorization
705
+ Harbor2Client.configure do |config|
706
+ # Configure HTTP basic authorization: basic
707
+ config.username = 'YOUR USERNAME'
708
+ config.password = 'YOUR PASSWORD'
709
+ end
710
+
711
+ api_instance = Harbor2Client::PreheatApi.new
712
+
713
+ opts = {
714
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
715
+ }
716
+
717
+ begin
718
+ #List P2P providers
719
+ result = api_instance.list_providers(opts)
720
+ p result
721
+ rescue Harbor2Client::ApiError => e
722
+ puts "Exception when calling PreheatApi->list_providers: #{e}"
723
+ end
724
+ ```
725
+
726
+ ### Parameters
727
+
728
+ Name | Type | Description | Notes
729
+ ------------- | ------------- | ------------- | -------------
730
+ **x_request_id** | **String**| An unique ID for the request | [optional]
731
+
732
+ ### Return type
733
+
734
+ [**Array<Metadata>**](Metadata.md)
735
+
736
+ ### Authorization
737
+
738
+ [basic](../README.md#basic)
739
+
740
+ ### HTTP request headers
741
+
742
+ - **Content-Type**: application/json
743
+ - **Accept**: application/json
744
+
745
+
746
+
747
+ # **list_providers_under_project**
748
+ > Array<ProviderUnderProject> list_providers_under_project(project_name, opts)
749
+
750
+ Get all providers at project level
751
+
752
+ Get all providers at project level
753
+
754
+ ### Example
755
+ ```ruby
756
+ # load the gem
757
+ require 'harbor2_client'
758
+ # setup authorization
759
+ Harbor2Client.configure do |config|
760
+ # Configure HTTP basic authorization: basic
761
+ config.username = 'YOUR USERNAME'
762
+ config.password = 'YOUR PASSWORD'
763
+ end
764
+
765
+ api_instance = Harbor2Client::PreheatApi.new
766
+
767
+ project_name = 'project_name_example' # String | The name of the project
768
+
769
+ opts = {
770
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
771
+ }
772
+
773
+ begin
774
+ #Get all providers at project level
775
+ result = api_instance.list_providers_under_project(project_name, opts)
776
+ p result
777
+ rescue Harbor2Client::ApiError => e
778
+ puts "Exception when calling PreheatApi->list_providers_under_project: #{e}"
779
+ end
780
+ ```
781
+
782
+ ### Parameters
783
+
784
+ Name | Type | Description | Notes
785
+ ------------- | ------------- | ------------- | -------------
786
+ **project_name** | **String**| The name of the project |
787
+ **x_request_id** | **String**| An unique ID for the request | [optional]
788
+
789
+ ### Return type
790
+
791
+ [**Array<ProviderUnderProject>**](ProviderUnderProject.md)
792
+
793
+ ### Authorization
794
+
795
+ [basic](../README.md#basic)
796
+
797
+ ### HTTP request headers
798
+
799
+ - **Content-Type**: application/json
800
+ - **Accept**: application/json
801
+
802
+
803
+
804
+ # **list_tasks**
805
+ > Array<Task> list_tasks(project_namepreheat_policy_name, execution_id, , opts)
806
+
807
+ List all the related tasks for the given execution
808
+
809
+ List all the related tasks for the given execution
810
+
811
+ ### Example
812
+ ```ruby
813
+ # load the gem
814
+ require 'harbor2_client'
815
+ # setup authorization
816
+ Harbor2Client.configure do |config|
817
+ # Configure HTTP basic authorization: basic
818
+ config.username = 'YOUR USERNAME'
819
+ config.password = 'YOUR PASSWORD'
820
+ end
821
+
822
+ api_instance = Harbor2Client::PreheatApi.new
823
+
824
+ project_name = 'project_name_example' # String | The name of the project
825
+
826
+ preheat_policy_name = 'preheat_policy_name_example' # String | Preheat Policy Name
827
+
828
+ execution_id = 56 # Integer | Execution ID
829
+
830
+ opts = {
831
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
832
+ page: 1, # Integer | The page number
833
+ page_size: 10, # Integer | The size of per page
834
+ q: 'q_example' # String | 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]
835
+ }
836
+
837
+ begin
838
+ #List all the related tasks for the given execution
839
+ result = api_instance.list_tasks(project_namepreheat_policy_name, execution_id, , opts)
840
+ p result
841
+ rescue Harbor2Client::ApiError => e
842
+ puts "Exception when calling PreheatApi->list_tasks: #{e}"
843
+ end
844
+ ```
845
+
846
+ ### Parameters
847
+
848
+ Name | Type | Description | Notes
849
+ ------------- | ------------- | ------------- | -------------
850
+ **project_name** | **String**| The name of the project |
851
+ **preheat_policy_name** | **String**| Preheat Policy Name |
852
+ **execution_id** | **Integer**| Execution ID |
853
+ **x_request_id** | **String**| An unique ID for the request | [optional]
854
+ **page** | **Integer**| The page number | [optional] [default to 1]
855
+ **page_size** | **Integer**| The size of per page | [optional] [default to 10]
856
+ **q** | **String**| 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] | [optional]
857
+
858
+ ### Return type
859
+
860
+ [**Array<Task>**](Task.md)
861
+
862
+ ### Authorization
863
+
864
+ [basic](../README.md#basic)
865
+
866
+ ### HTTP request headers
867
+
868
+ - **Content-Type**: application/json
869
+ - **Accept**: application/json
870
+
871
+
872
+
873
+ # **manual_preheat**
874
+ > manual_preheat(project_namepreheat_policy_name, policy, opts)
875
+
876
+ Manual preheat
877
+
878
+ Manual preheat
879
+
880
+ ### Example
881
+ ```ruby
882
+ # load the gem
883
+ require 'harbor2_client'
884
+ # setup authorization
885
+ Harbor2Client.configure do |config|
886
+ # Configure HTTP basic authorization: basic
887
+ config.username = 'YOUR USERNAME'
888
+ config.password = 'YOUR PASSWORD'
889
+ end
890
+
891
+ api_instance = Harbor2Client::PreheatApi.new
892
+
893
+ project_name = 'project_name_example' # String | The name of the project
894
+
895
+ preheat_policy_name = 'preheat_policy_name_example' # String | Preheat Policy Name
896
+
897
+ policy = Harbor2Client::PreheatPolicy.new # PreheatPolicy | The policy schema info
898
+
899
+ opts = {
900
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
901
+ }
902
+
903
+ begin
904
+ #Manual preheat
905
+ api_instance.manual_preheat(project_namepreheat_policy_name, policy, opts)
906
+ rescue Harbor2Client::ApiError => e
907
+ puts "Exception when calling PreheatApi->manual_preheat: #{e}"
908
+ end
909
+ ```
910
+
911
+ ### Parameters
912
+
913
+ Name | Type | Description | Notes
914
+ ------------- | ------------- | ------------- | -------------
915
+ **project_name** | **String**| The name of the project |
916
+ **preheat_policy_name** | **String**| Preheat Policy Name |
917
+ **policy** | [**PreheatPolicy**](PreheatPolicy.md)| The policy schema info |
918
+ **x_request_id** | **String**| An unique ID for the request | [optional]
919
+
920
+ ### Return type
921
+
922
+ nil (empty response body)
923
+
924
+ ### Authorization
925
+
926
+ [basic](../README.md#basic)
927
+
928
+ ### HTTP request headers
929
+
930
+ - **Content-Type**: application/json
931
+ - **Accept**: application/json
932
+
933
+
934
+
935
+ # **ping_instances**
936
+ > ping_instances(instance, opts)
937
+
938
+ Ping status of a instance.
939
+
940
+ This endpoint checks status of a instance, the instance can be given by ID or Endpoint URL (together with credential)
941
+
942
+ ### Example
943
+ ```ruby
944
+ # load the gem
945
+ require 'harbor2_client'
946
+ # setup authorization
947
+ Harbor2Client.configure do |config|
948
+ # Configure HTTP basic authorization: basic
949
+ config.username = 'YOUR USERNAME'
950
+ config.password = 'YOUR PASSWORD'
951
+ end
952
+
953
+ api_instance = Harbor2Client::PreheatApi.new
954
+
955
+ instance = Harbor2Client::Instance.new # Instance | The JSON object of instance.
956
+
957
+ opts = {
958
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
959
+ }
960
+
961
+ begin
962
+ #Ping status of a instance.
963
+ api_instance.ping_instances(instance, opts)
964
+ rescue Harbor2Client::ApiError => e
965
+ puts "Exception when calling PreheatApi->ping_instances: #{e}"
966
+ end
967
+ ```
968
+
969
+ ### Parameters
970
+
971
+ Name | Type | Description | Notes
972
+ ------------- | ------------- | ------------- | -------------
973
+ **instance** | [**Instance**](Instance.md)| The JSON object of instance. |
974
+ **x_request_id** | **String**| An unique ID for the request | [optional]
975
+
976
+ ### Return type
977
+
978
+ nil (empty response body)
979
+
980
+ ### Authorization
981
+
982
+ [basic](../README.md#basic)
983
+
984
+ ### HTTP request headers
985
+
986
+ - **Content-Type**: application/json
987
+ - **Accept**: application/json
988
+
989
+
990
+
991
+ # **stop_execution**
992
+ > stop_execution(project_namepreheat_policy_name, execution_id, execution, opts)
993
+
994
+ Stop a execution
995
+
996
+ Stop a execution
997
+
998
+ ### Example
999
+ ```ruby
1000
+ # load the gem
1001
+ require 'harbor2_client'
1002
+ # setup authorization
1003
+ Harbor2Client.configure do |config|
1004
+ # Configure HTTP basic authorization: basic
1005
+ config.username = 'YOUR USERNAME'
1006
+ config.password = 'YOUR PASSWORD'
1007
+ end
1008
+
1009
+ api_instance = Harbor2Client::PreheatApi.new
1010
+
1011
+ project_name = 'project_name_example' # String | The name of the project
1012
+
1013
+ preheat_policy_name = 'preheat_policy_name_example' # String | Preheat Policy Name
1014
+
1015
+ execution_id = 56 # Integer | Execution ID
1016
+
1017
+ execution = Harbor2Client::Execution.new # Execution | The data of execution
1018
+
1019
+ opts = {
1020
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
1021
+ }
1022
+
1023
+ begin
1024
+ #Stop a execution
1025
+ api_instance.stop_execution(project_namepreheat_policy_name, execution_id, execution, opts)
1026
+ rescue Harbor2Client::ApiError => e
1027
+ puts "Exception when calling PreheatApi->stop_execution: #{e}"
1028
+ end
1029
+ ```
1030
+
1031
+ ### Parameters
1032
+
1033
+ Name | Type | Description | Notes
1034
+ ------------- | ------------- | ------------- | -------------
1035
+ **project_name** | **String**| The name of the project |
1036
+ **preheat_policy_name** | **String**| Preheat Policy Name |
1037
+ **execution_id** | **Integer**| Execution ID |
1038
+ **execution** | [**Execution**](Execution.md)| The data of execution |
1039
+ **x_request_id** | **String**| An unique ID for the request | [optional]
1040
+
1041
+ ### Return type
1042
+
1043
+ nil (empty response body)
1044
+
1045
+ ### Authorization
1046
+
1047
+ [basic](../README.md#basic)
1048
+
1049
+ ### HTTP request headers
1050
+
1051
+ - **Content-Type**: application/json
1052
+ - **Accept**: application/json
1053
+
1054
+
1055
+
1056
+ # **update_instance**
1057
+ > update_instance(preheat_instance_nameinstance, opts)
1058
+
1059
+ Update the specified P2P provider instance
1060
+
1061
+ Update the specified P2P provider instance
1062
+
1063
+ ### Example
1064
+ ```ruby
1065
+ # load the gem
1066
+ require 'harbor2_client'
1067
+ # setup authorization
1068
+ Harbor2Client.configure do |config|
1069
+ # Configure HTTP basic authorization: basic
1070
+ config.username = 'YOUR USERNAME'
1071
+ config.password = 'YOUR PASSWORD'
1072
+ end
1073
+
1074
+ api_instance = Harbor2Client::PreheatApi.new
1075
+
1076
+ preheat_instance_name = 'preheat_instance_name_example' # String | Instance Name
1077
+
1078
+ instance = Harbor2Client::Instance.new # Instance | The instance to update
1079
+
1080
+ opts = {
1081
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
1082
+ }
1083
+
1084
+ begin
1085
+ #Update the specified P2P provider instance
1086
+ api_instance.update_instance(preheat_instance_nameinstance, opts)
1087
+ rescue Harbor2Client::ApiError => e
1088
+ puts "Exception when calling PreheatApi->update_instance: #{e}"
1089
+ end
1090
+ ```
1091
+
1092
+ ### Parameters
1093
+
1094
+ Name | Type | Description | Notes
1095
+ ------------- | ------------- | ------------- | -------------
1096
+ **preheat_instance_name** | **String**| Instance Name |
1097
+ **instance** | [**Instance**](Instance.md)| The instance to update |
1098
+ **x_request_id** | **String**| An unique ID for the request | [optional]
1099
+
1100
+ ### Return type
1101
+
1102
+ nil (empty response body)
1103
+
1104
+ ### Authorization
1105
+
1106
+ [basic](../README.md#basic)
1107
+
1108
+ ### HTTP request headers
1109
+
1110
+ - **Content-Type**: application/json
1111
+ - **Accept**: application/json
1112
+
1113
+
1114
+
1115
+ # **update_policy**
1116
+ > update_policy(project_namepreheat_policy_name, policy, opts)
1117
+
1118
+ Update preheat policy
1119
+
1120
+ Update preheat policy
1121
+
1122
+ ### Example
1123
+ ```ruby
1124
+ # load the gem
1125
+ require 'harbor2_client'
1126
+ # setup authorization
1127
+ Harbor2Client.configure do |config|
1128
+ # Configure HTTP basic authorization: basic
1129
+ config.username = 'YOUR USERNAME'
1130
+ config.password = 'YOUR PASSWORD'
1131
+ end
1132
+
1133
+ api_instance = Harbor2Client::PreheatApi.new
1134
+
1135
+ project_name = 'project_name_example' # String | The name of the project
1136
+
1137
+ preheat_policy_name = 'preheat_policy_name_example' # String | Preheat Policy Name
1138
+
1139
+ policy = Harbor2Client::PreheatPolicy.new # PreheatPolicy | The policy schema info
1140
+
1141
+ opts = {
1142
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
1143
+ }
1144
+
1145
+ begin
1146
+ #Update preheat policy
1147
+ api_instance.update_policy(project_namepreheat_policy_name, policy, opts)
1148
+ rescue Harbor2Client::ApiError => e
1149
+ puts "Exception when calling PreheatApi->update_policy: #{e}"
1150
+ end
1151
+ ```
1152
+
1153
+ ### Parameters
1154
+
1155
+ Name | Type | Description | Notes
1156
+ ------------- | ------------- | ------------- | -------------
1157
+ **project_name** | **String**| The name of the project |
1158
+ **preheat_policy_name** | **String**| Preheat Policy Name |
1159
+ **policy** | [**PreheatPolicy**](PreheatPolicy.md)| The policy schema info |
1160
+ **x_request_id** | **String**| An unique ID for the request | [optional]
1161
+
1162
+ ### Return type
1163
+
1164
+ nil (empty response body)
1165
+
1166
+ ### Authorization
1167
+
1168
+ [basic](../README.md#basic)
1169
+
1170
+ ### HTTP request headers
1171
+
1172
+ - **Content-Type**: application/json
1173
+ - **Accept**: application/json
1174
+
1175
+
1176
+