unikraft-cloud 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/LICENSE.md +28 -0
- data/README.md +587 -0
- data/lib/unikraft/cloud/api/controlplane/auth.gen.rb +83 -0
- data/lib/unikraft/cloud/api/controlplane/images.gen.rb +51 -0
- data/lib/unikraft/cloud/api/controlplane/metros.gen.rb +45 -0
- data/lib/unikraft/cloud/api/controlplane/models.gen.rb +865 -0
- data/lib/unikraft/cloud/api/controlplane/node_activation_service.gen.rb +79 -0
- data/lib/unikraft/cloud/api/controlplane/node_service.gen.rb +276 -0
- data/lib/unikraft/cloud/api/controlplane/resources.gen.rb +12 -0
- data/lib/unikraft/cloud/api/controlplane.rb +49 -0
- data/lib/unikraft/cloud/api/platform/audit.gen.rb +55 -0
- data/lib/unikraft/cloud/api/platform/autoscale.gen.rb +231 -0
- data/lib/unikraft/cloud/api/platform/certificates.gen.rb +168 -0
- data/lib/unikraft/cloud/api/platform/images.gen.rb +109 -0
- data/lib/unikraft/cloud/api/platform/instances.gen.rb +873 -0
- data/lib/unikraft/cloud/api/platform/models.gen.rb +6456 -0
- data/lib/unikraft/cloud/api/platform/node.gen.rb +45 -0
- data/lib/unikraft/cloud/api/platform/resources.gen.rb +16 -0
- data/lib/unikraft/cloud/api/platform/services.gen.rb +172 -0
- data/lib/unikraft/cloud/api/platform/users.gen.rb +134 -0
- data/lib/unikraft/cloud/api/platform/volumes.gen.rb +430 -0
- data/lib/unikraft/cloud/api/platform.rb +64 -0
- data/lib/unikraft/cloud/api.rb +45 -0
- data/lib/unikraft/cloud/client.rb +186 -0
- data/lib/unikraft/cloud/core/base64.rb +36 -0
- data/lib/unikraft/cloud/core/errors.rb +96 -0
- data/lib/unikraft/cloud/core/fanout.rb +150 -0
- data/lib/unikraft/cloud/core/handle.rb +214 -0
- data/lib/unikraft/cloud/core/handle_set.rb +105 -0
- data/lib/unikraft/cloud/core/http.rb +361 -0
- data/lib/unikraft/cloud/core/metro.rb +75 -0
- data/lib/unikraft/cloud/core/pagination.rb +43 -0
- data/lib/unikraft/cloud/core/patch.rb +113 -0
- data/lib/unikraft/cloud/core/pool.rb +97 -0
- data/lib/unikraft/cloud/core/ready.rb +145 -0
- data/lib/unikraft/cloud/core/ref.rb +95 -0
- data/lib/unikraft/cloud/core/resource.rb +399 -0
- data/lib/unikraft/cloud/core/response.rb +96 -0
- data/lib/unikraft/cloud/core/session.rb +182 -0
- data/lib/unikraft/cloud/core/url.rb +34 -0
- data/lib/unikraft/cloud/model.rb +194 -0
- data/lib/unikraft/cloud/resources/certificates.rb +57 -0
- data/lib/unikraft/cloud/resources/instances.rb +172 -0
- data/lib/unikraft/cloud/resources/service_groups.rb +36 -0
- data/lib/unikraft/cloud/resources/users.rb +39 -0
- data/lib/unikraft/cloud/resources/volumes.rb +93 -0
- data/lib/unikraft/cloud/version.rb +11 -0
- data/lib/unikraft/cloud.rb +29 -0
- metadata +89 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Code generated by openapi-gen; DO NOT EDIT.
|
|
4
|
+
|
|
5
|
+
require_relative "../../core/url"
|
|
6
|
+
require_relative "models.gen"
|
|
7
|
+
|
|
8
|
+
module Unikraft
|
|
9
|
+
module Cloud
|
|
10
|
+
class API
|
|
11
|
+
class Platform
|
|
12
|
+
# Low-level "plumbing" client for the `autoscale` resource of the
|
|
13
|
+
# Platform API. Methods mirror the OpenAPI specification: they are
|
|
14
|
+
# named after the operationId and return the response envelope
|
|
15
|
+
# untouched.
|
|
16
|
+
class AutoscaleApi
|
|
17
|
+
# @return [#request, #bytes, #stream] the transport, usually a
|
|
18
|
+
# {Unikraft::Cloud::Core::ApiClient}
|
|
19
|
+
attr_reader :client
|
|
20
|
+
|
|
21
|
+
# @param client [#request, #bytes, #stream] the transport
|
|
22
|
+
def initialize(client)
|
|
23
|
+
@client = client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Create Autoscale Configuration by Service Group UUID
|
|
27
|
+
#
|
|
28
|
+
# `POST /v1/services/{uuid}/autoscale`
|
|
29
|
+
#
|
|
30
|
+
# @param uuid [String]
|
|
31
|
+
# @param body [Models::CreateAutoscaleConfigurationByServiceGroupUUIDRequest, Hash, Array] the request body
|
|
32
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
33
|
+
# @return [Models::CreateAutoscaleConfigurationsResponse, nil] the response envelope
|
|
34
|
+
# @raise [Unikraft::Cloud::Error]
|
|
35
|
+
def create_autoscale_configuration_by_service_group_uuid(uuid:, body:, **options)
|
|
36
|
+
res = @client.request(
|
|
37
|
+
method: "POST",
|
|
38
|
+
path: "/v1/services/#{Core::URL.escape_segment(uuid)}/autoscale",
|
|
39
|
+
body:,
|
|
40
|
+
**options
|
|
41
|
+
)
|
|
42
|
+
Models::CreateAutoscaleConfigurationsResponse.from(res)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Create Autoscale Configuration Policy
|
|
46
|
+
#
|
|
47
|
+
# `POST /v1/services/{uuid}/autoscale/policies`
|
|
48
|
+
#
|
|
49
|
+
# @param uuid [String]
|
|
50
|
+
# @param body [Models::CreateAutoscaleConfigurationPolicyRequest, Hash, Array] the request body
|
|
51
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
52
|
+
# @return [Models::CreateAutoscaleConfigurationPolicyResponse, nil] the response envelope
|
|
53
|
+
# @raise [Unikraft::Cloud::Error]
|
|
54
|
+
def create_autoscale_configuration_policy(uuid:, body:, **options)
|
|
55
|
+
res = @client.request(
|
|
56
|
+
method: "POST",
|
|
57
|
+
path: "/v1/services/#{Core::URL.escape_segment(uuid)}/autoscale/policies",
|
|
58
|
+
body:,
|
|
59
|
+
**options
|
|
60
|
+
)
|
|
61
|
+
Models::CreateAutoscaleConfigurationPolicyResponse.from(res)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Create Autoscale Configurations
|
|
65
|
+
#
|
|
66
|
+
# `POST /v1/services/autoscale`
|
|
67
|
+
#
|
|
68
|
+
# @param body [Hash, Array] the request body
|
|
69
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
70
|
+
# @return [Models::CreateAutoscaleConfigurationsResponse, nil] the response envelope
|
|
71
|
+
# @raise [Unikraft::Cloud::Error]
|
|
72
|
+
def create_autoscale_configurations(body:, **options)
|
|
73
|
+
res = @client.request(
|
|
74
|
+
method: "POST",
|
|
75
|
+
path: "/v1/services/autoscale",
|
|
76
|
+
body:,
|
|
77
|
+
**options
|
|
78
|
+
)
|
|
79
|
+
Models::CreateAutoscaleConfigurationsResponse.from(res)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Delete Autoscale Configuration Policies
|
|
83
|
+
#
|
|
84
|
+
# `DELETE /v1/services/{uuid}/autoscale/policies`
|
|
85
|
+
#
|
|
86
|
+
# @param uuid [String]
|
|
87
|
+
# @param body [Models::DeletePolicyRequest, Hash, Array] the request body
|
|
88
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
89
|
+
# @return [Models::DeleteAutoscaleConfigurationPolicyResponse, nil] the response envelope
|
|
90
|
+
# @raise [Unikraft::Cloud::Error]
|
|
91
|
+
def delete_autoscale_configuration_policies(uuid:, body:, **options)
|
|
92
|
+
res = @client.request(
|
|
93
|
+
method: "DELETE",
|
|
94
|
+
path: "/v1/services/#{Core::URL.escape_segment(uuid)}/autoscale/policies",
|
|
95
|
+
body:,
|
|
96
|
+
**options
|
|
97
|
+
)
|
|
98
|
+
Models::DeleteAutoscaleConfigurationPolicyResponse.from(res)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Delete Autoscale Configuration Policy by Name
|
|
102
|
+
#
|
|
103
|
+
# `DELETE /v1/services/{uuid}/autoscale/policies/{name}`
|
|
104
|
+
#
|
|
105
|
+
# @param uuid [String]
|
|
106
|
+
# @param name [String]
|
|
107
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
108
|
+
# @return [Models::DeleteAutoscaleConfigurationPolicyResponse, nil] the response envelope
|
|
109
|
+
# @raise [Unikraft::Cloud::Error]
|
|
110
|
+
def delete_autoscale_configuration_policy_by_name(uuid:, name:, **options)
|
|
111
|
+
res = @client.request(
|
|
112
|
+
method: "DELETE",
|
|
113
|
+
path: "/v1/services/#{Core::URL.escape_segment(uuid)}/autoscale/policies/#{Core::URL.escape_segment(name)}",
|
|
114
|
+
**options
|
|
115
|
+
)
|
|
116
|
+
Models::DeleteAutoscaleConfigurationPolicyResponse.from(res)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Delete Autoscale Configurations
|
|
120
|
+
#
|
|
121
|
+
# `DELETE /v1/services/autoscale`
|
|
122
|
+
#
|
|
123
|
+
# @param body [Hash, Array] the request body
|
|
124
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
125
|
+
# @return [Models::DeleteAutoscaleConfigurationsResponse, nil] the response envelope
|
|
126
|
+
# @raise [Unikraft::Cloud::Error]
|
|
127
|
+
def delete_autoscale_configurations(body:, **options)
|
|
128
|
+
res = @client.request(
|
|
129
|
+
method: "DELETE",
|
|
130
|
+
path: "/v1/services/autoscale",
|
|
131
|
+
body:,
|
|
132
|
+
**options
|
|
133
|
+
)
|
|
134
|
+
Models::DeleteAutoscaleConfigurationsResponse.from(res)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Delete Autoscale Configurations by Service Group UUID
|
|
138
|
+
#
|
|
139
|
+
# `DELETE /v1/services/{uuid}/autoscale`
|
|
140
|
+
#
|
|
141
|
+
# @param uuid [String]
|
|
142
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
143
|
+
# @return [Models::DeleteAutoscaleConfigurationsResponse, nil] the response envelope
|
|
144
|
+
# @raise [Unikraft::Cloud::Error]
|
|
145
|
+
def delete_autoscale_configurations_by_service_group_uuid(uuid:, **options)
|
|
146
|
+
res = @client.request(
|
|
147
|
+
method: "DELETE",
|
|
148
|
+
path: "/v1/services/#{Core::URL.escape_segment(uuid)}/autoscale",
|
|
149
|
+
**options
|
|
150
|
+
)
|
|
151
|
+
Models::DeleteAutoscaleConfigurationsResponse.from(res)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# List Autoscale Configuration Policies
|
|
155
|
+
#
|
|
156
|
+
# `GET /v1/services/{uuid}/autoscale/policies`
|
|
157
|
+
#
|
|
158
|
+
# @param uuid [String]
|
|
159
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
160
|
+
# @return [Models::GetAutoscaleConfigurationPolicyResponse, nil] the response envelope
|
|
161
|
+
# @raise [Unikraft::Cloud::Error]
|
|
162
|
+
def get_autoscale_configuration_policies(uuid:, **options)
|
|
163
|
+
res = @client.request(
|
|
164
|
+
method: "GET",
|
|
165
|
+
path: "/v1/services/#{Core::URL.escape_segment(uuid)}/autoscale/policies",
|
|
166
|
+
**options
|
|
167
|
+
)
|
|
168
|
+
Models::GetAutoscaleConfigurationPolicyResponse.from(res)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Get Autoscale Configuration Policy by Name
|
|
172
|
+
#
|
|
173
|
+
# `GET /v1/services/{uuid}/autoscale/policies/{name}`
|
|
174
|
+
#
|
|
175
|
+
# @param uuid [String]
|
|
176
|
+
# @param name [String]
|
|
177
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
178
|
+
# @return [Models::GetAutoscaleConfigurationPolicyResponse, nil] the response envelope
|
|
179
|
+
# @raise [Unikraft::Cloud::Error]
|
|
180
|
+
def get_autoscale_configuration_policy_by_name(uuid:, name:, **options)
|
|
181
|
+
res = @client.request(
|
|
182
|
+
method: "GET",
|
|
183
|
+
path: "/v1/services/#{Core::URL.escape_segment(uuid)}/autoscale/policies/#{Core::URL.escape_segment(name)}",
|
|
184
|
+
**options
|
|
185
|
+
)
|
|
186
|
+
Models::GetAutoscaleConfigurationPolicyResponse.from(res)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# List Autoscale Configurations
|
|
190
|
+
#
|
|
191
|
+
# `GET /v1/services/autoscale`
|
|
192
|
+
#
|
|
193
|
+
# @param uuid [Array<String>, nil] The UUID of the resource.
|
|
194
|
+
# @param name [Array<String>, nil] The name of the resource.
|
|
195
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
196
|
+
# @return [Models::GetAutoscaleConfigurationsResponse, nil] the response envelope
|
|
197
|
+
# @raise [Unikraft::Cloud::Error]
|
|
198
|
+
def get_autoscale_configurations(uuid: nil, name: nil, **options)
|
|
199
|
+
res = @client.request(
|
|
200
|
+
method: "GET",
|
|
201
|
+
path: "/v1/services/autoscale",
|
|
202
|
+
query: {
|
|
203
|
+
uuid:,
|
|
204
|
+
name:
|
|
205
|
+
},
|
|
206
|
+
**options
|
|
207
|
+
)
|
|
208
|
+
Models::GetAutoscaleConfigurationsResponse.from(res)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Get Autoscale Configurations by Service Group UUID
|
|
212
|
+
#
|
|
213
|
+
# `GET /v1/services/{uuid}/autoscale`
|
|
214
|
+
#
|
|
215
|
+
# @param uuid [String]
|
|
216
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
217
|
+
# @return [Models::GetAutoscaleConfigurationsResponse, nil] the response envelope
|
|
218
|
+
# @raise [Unikraft::Cloud::Error]
|
|
219
|
+
def get_autoscale_configurations_by_service_group_uuid(uuid:, **options)
|
|
220
|
+
res = @client.request(
|
|
221
|
+
method: "GET",
|
|
222
|
+
path: "/v1/services/#{Core::URL.escape_segment(uuid)}/autoscale",
|
|
223
|
+
**options
|
|
224
|
+
)
|
|
225
|
+
Models::GetAutoscaleConfigurationsResponse.from(res)
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Code generated by openapi-gen; DO NOT EDIT.
|
|
4
|
+
|
|
5
|
+
require_relative "../../core/url"
|
|
6
|
+
require_relative "models.gen"
|
|
7
|
+
|
|
8
|
+
module Unikraft
|
|
9
|
+
module Cloud
|
|
10
|
+
class API
|
|
11
|
+
class Platform
|
|
12
|
+
# Low-level "plumbing" client for the `certificates` resource of the
|
|
13
|
+
# Platform API. Methods mirror the OpenAPI specification: they are
|
|
14
|
+
# named after the operationId and return the response envelope
|
|
15
|
+
# untouched.
|
|
16
|
+
class CertificatesApi
|
|
17
|
+
# @return [#request, #bytes, #stream] the transport, usually a
|
|
18
|
+
# {Unikraft::Cloud::Core::ApiClient}
|
|
19
|
+
attr_reader :client
|
|
20
|
+
|
|
21
|
+
# @param client [#request, #bytes, #stream] the transport
|
|
22
|
+
def initialize(client)
|
|
23
|
+
@client = client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Create Certificate
|
|
27
|
+
#
|
|
28
|
+
# `POST /v1/certificates`
|
|
29
|
+
#
|
|
30
|
+
# @param body [Models::CreateCertificateRequest, Hash, Array] the request body
|
|
31
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
32
|
+
# @return [Models::CreateCertificateResponse, nil] the response envelope
|
|
33
|
+
# @raise [Unikraft::Cloud::Error]
|
|
34
|
+
def create_certificate(body:, **options)
|
|
35
|
+
res = @client.request(
|
|
36
|
+
method: "POST",
|
|
37
|
+
path: "/v1/certificates",
|
|
38
|
+
body:,
|
|
39
|
+
**options
|
|
40
|
+
)
|
|
41
|
+
Models::CreateCertificateResponse.from(res)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Delete Certificate by UUID
|
|
45
|
+
#
|
|
46
|
+
# `DELETE /v1/certificates/{uuid}`
|
|
47
|
+
#
|
|
48
|
+
# @param uuid [String]
|
|
49
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
50
|
+
# @return [Models::DeleteCertificatesResponse, nil] the response envelope
|
|
51
|
+
# @raise [Unikraft::Cloud::Error]
|
|
52
|
+
def delete_certificate_by_uuid(uuid:, **options)
|
|
53
|
+
res = @client.request(
|
|
54
|
+
method: "DELETE",
|
|
55
|
+
path: "/v1/certificates/#{Core::URL.escape_segment(uuid)}",
|
|
56
|
+
**options
|
|
57
|
+
)
|
|
58
|
+
Models::DeleteCertificatesResponse.from(res)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Delete Certificates
|
|
62
|
+
#
|
|
63
|
+
# `DELETE /v1/certificates`
|
|
64
|
+
#
|
|
65
|
+
# @param body [Hash, Array] the request body
|
|
66
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
67
|
+
# @return [Models::DeleteCertificatesResponse, nil] the response envelope
|
|
68
|
+
# @raise [Unikraft::Cloud::Error]
|
|
69
|
+
def delete_certificates(body:, **options)
|
|
70
|
+
res = @client.request(
|
|
71
|
+
method: "DELETE",
|
|
72
|
+
path: "/v1/certificates",
|
|
73
|
+
body:,
|
|
74
|
+
**options
|
|
75
|
+
)
|
|
76
|
+
Models::DeleteCertificatesResponse.from(res)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Get Certificate by UUID
|
|
80
|
+
#
|
|
81
|
+
# `GET /v1/certificates/{uuid}`
|
|
82
|
+
#
|
|
83
|
+
# @param uuid [String]
|
|
84
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
85
|
+
# @return [Models::GetCertificatesResponse, nil] the response envelope
|
|
86
|
+
# @raise [Unikraft::Cloud::Error]
|
|
87
|
+
def get_certificate_by_uuid(uuid:, **options)
|
|
88
|
+
res = @client.request(
|
|
89
|
+
method: "GET",
|
|
90
|
+
path: "/v1/certificates/#{Core::URL.escape_segment(uuid)}",
|
|
91
|
+
**options
|
|
92
|
+
)
|
|
93
|
+
Models::GetCertificatesResponse.from(res)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# List Certificates
|
|
97
|
+
#
|
|
98
|
+
# `GET /v1/certificates`
|
|
99
|
+
#
|
|
100
|
+
# @param uuid [Array<String>, nil] The UUID of the resource.
|
|
101
|
+
# @param name [Array<String>, nil] The name of the resource.
|
|
102
|
+
# @param details [Boolean, nil]
|
|
103
|
+
# @param count [Integer, nil]
|
|
104
|
+
# @param from [String, nil]
|
|
105
|
+
# @param order [String, nil]
|
|
106
|
+
# @param sortby [String, nil]
|
|
107
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
108
|
+
# @return [Models::GetCertificatesResponse, nil] the response envelope
|
|
109
|
+
# @raise [Unikraft::Cloud::Error]
|
|
110
|
+
def get_certificates(uuid: nil, name: nil, details: nil, count: nil, from: nil, order: nil, sortby: nil, **options)
|
|
111
|
+
res = @client.request(
|
|
112
|
+
method: "GET",
|
|
113
|
+
path: "/v1/certificates",
|
|
114
|
+
query: {
|
|
115
|
+
uuid:,
|
|
116
|
+
name:,
|
|
117
|
+
details:,
|
|
118
|
+
count:,
|
|
119
|
+
from:,
|
|
120
|
+
order:,
|
|
121
|
+
sortby:
|
|
122
|
+
},
|
|
123
|
+
**options
|
|
124
|
+
)
|
|
125
|
+
Models::GetCertificatesResponse.from(res)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Update Certificate by UUID
|
|
129
|
+
#
|
|
130
|
+
# `PUT /v1/certificates/{uuid}`
|
|
131
|
+
#
|
|
132
|
+
# @param uuid [String]
|
|
133
|
+
# @param body [Models::UpdateCertificateByUUIDRequestBody, Hash, Array] the request body
|
|
134
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
135
|
+
# @return [Models::UpdateCertificatesResponse, nil] the response envelope
|
|
136
|
+
# @raise [Unikraft::Cloud::Error]
|
|
137
|
+
def update_certificate_by_uuid(uuid:, body:, **options)
|
|
138
|
+
res = @client.request(
|
|
139
|
+
method: "PUT",
|
|
140
|
+
path: "/v1/certificates/#{Core::URL.escape_segment(uuid)}",
|
|
141
|
+
body:,
|
|
142
|
+
**options
|
|
143
|
+
)
|
|
144
|
+
Models::UpdateCertificatesResponse.from(res)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Update Certificates
|
|
148
|
+
#
|
|
149
|
+
# `PUT /v1/certificates`
|
|
150
|
+
#
|
|
151
|
+
# @param body [Hash, Array] the request body
|
|
152
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
153
|
+
# @return [Models::UpdateCertificatesResponse, nil] the response envelope
|
|
154
|
+
# @raise [Unikraft::Cloud::Error]
|
|
155
|
+
def update_certificates(body:, **options)
|
|
156
|
+
res = @client.request(
|
|
157
|
+
method: "PUT",
|
|
158
|
+
path: "/v1/certificates",
|
|
159
|
+
body:,
|
|
160
|
+
**options
|
|
161
|
+
)
|
|
162
|
+
Models::UpdateCertificatesResponse.from(res)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
end
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Code generated by openapi-gen; DO NOT EDIT.
|
|
4
|
+
|
|
5
|
+
require_relative "../../core/url"
|
|
6
|
+
require_relative "models.gen"
|
|
7
|
+
|
|
8
|
+
module Unikraft
|
|
9
|
+
module Cloud
|
|
10
|
+
class API
|
|
11
|
+
class Platform
|
|
12
|
+
# Low-level "plumbing" client for the `images` resource of the
|
|
13
|
+
# Platform API. Methods mirror the OpenAPI specification: they are
|
|
14
|
+
# named after the operationId and return the response envelope
|
|
15
|
+
# untouched.
|
|
16
|
+
class ImagesApi
|
|
17
|
+
# @return [#request, #bytes, #stream] the transport, usually a
|
|
18
|
+
# {Unikraft::Cloud::Core::ApiClient}
|
|
19
|
+
attr_reader :client
|
|
20
|
+
|
|
21
|
+
# @param client [#request, #bytes, #stream] the transport
|
|
22
|
+
def initialize(client)
|
|
23
|
+
@client = client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Get Images in Store
|
|
27
|
+
#
|
|
28
|
+
# `GET /v1/image-store`
|
|
29
|
+
#
|
|
30
|
+
# @param digest [String, nil]
|
|
31
|
+
# @param tag [String, nil]
|
|
32
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
33
|
+
# @return [Models::GetImagesResponse, nil] the response envelope
|
|
34
|
+
# @raise [Unikraft::Cloud::Error]
|
|
35
|
+
def get_image_store(digest: nil, tag: nil, **options)
|
|
36
|
+
res = @client.request(
|
|
37
|
+
method: "GET",
|
|
38
|
+
path: "/v1/image-store",
|
|
39
|
+
query: {
|
|
40
|
+
digest:,
|
|
41
|
+
tag:
|
|
42
|
+
},
|
|
43
|
+
**options
|
|
44
|
+
)
|
|
45
|
+
Models::GetImagesResponse.from(res)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Get Images
|
|
49
|
+
#
|
|
50
|
+
# `GET /v1/images`
|
|
51
|
+
#
|
|
52
|
+
# @param digest [String, nil]
|
|
53
|
+
# @param tag [String, nil]
|
|
54
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
55
|
+
# @return [Models::GetImagesResponse, nil] the response envelope
|
|
56
|
+
# @raise [Unikraft::Cloud::Error]
|
|
57
|
+
def get_images(digest: nil, tag: nil, **options)
|
|
58
|
+
res = @client.request(
|
|
59
|
+
method: "GET",
|
|
60
|
+
path: "/v1/images",
|
|
61
|
+
query: {
|
|
62
|
+
digest:,
|
|
63
|
+
tag:
|
|
64
|
+
},
|
|
65
|
+
**options
|
|
66
|
+
)
|
|
67
|
+
Models::GetImagesResponse.from(res)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Pin Images
|
|
71
|
+
#
|
|
72
|
+
# `POST /v1/images`
|
|
73
|
+
#
|
|
74
|
+
# @param body [Hash, Array] the request body
|
|
75
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
76
|
+
# @return [Models::PinImagesResponse, nil] the response envelope
|
|
77
|
+
# @raise [Unikraft::Cloud::Error]
|
|
78
|
+
def pin_images(body:, **options)
|
|
79
|
+
res = @client.request(
|
|
80
|
+
method: "POST",
|
|
81
|
+
path: "/v1/images",
|
|
82
|
+
body:,
|
|
83
|
+
**options
|
|
84
|
+
)
|
|
85
|
+
Models::PinImagesResponse.from(res)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Unpin Images
|
|
89
|
+
#
|
|
90
|
+
# `DELETE /v1/images`
|
|
91
|
+
#
|
|
92
|
+
# @param body [Hash, Array] the request body
|
|
93
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
94
|
+
# @return [Models::UnpinImagesResponse, nil] the response envelope
|
|
95
|
+
# @raise [Unikraft::Cloud::Error]
|
|
96
|
+
def unpin_images(body:, **options)
|
|
97
|
+
res = @client.request(
|
|
98
|
+
method: "DELETE",
|
|
99
|
+
path: "/v1/images",
|
|
100
|
+
body:,
|
|
101
|
+
**options
|
|
102
|
+
)
|
|
103
|
+
Models::UnpinImagesResponse.from(res)
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|