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,865 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Code generated by openapi-gen; DO NOT EDIT.
|
|
4
|
+
|
|
5
|
+
require_relative "../../model"
|
|
6
|
+
|
|
7
|
+
module Unikraft
|
|
8
|
+
module Cloud
|
|
9
|
+
class API
|
|
10
|
+
class ControlPlane
|
|
11
|
+
# The models of the ControlPlane API, mirroring the wire format.
|
|
12
|
+
module Models
|
|
13
|
+
# AWSConfig contains AWS-specific configuration for node provisioning.
|
|
14
|
+
class AWSConfig < Unikraft::Cloud::Model
|
|
15
|
+
# @!attribute [r] vpc_id
|
|
16
|
+
# @return [String, nil] The VPC ID where the instance will be launched. If not specified, the
|
|
17
|
+
# default VPC for the region will be used.
|
|
18
|
+
attribute :vpc_id
|
|
19
|
+
# @!attribute [r] subnet_id
|
|
20
|
+
# @return [String, nil] The subnet ID where the instance will be launched. If not specified,
|
|
21
|
+
# a subnet will be selected from the VPC.
|
|
22
|
+
attribute :subnet_id
|
|
23
|
+
# @!attribute [r] security_group_ids
|
|
24
|
+
# @return [Array<String>, nil] Security group IDs to attach to the instance. If not specified, the
|
|
25
|
+
# default security group for the VPC will be used.
|
|
26
|
+
attribute :security_group_ids
|
|
27
|
+
# @!attribute [r] iam_instance_profile
|
|
28
|
+
# @return [String, nil] The IAM instance profile ARN or name to attach to the instance.
|
|
29
|
+
attribute :iam_instance_profile
|
|
30
|
+
# @!attribute [r] root_volume
|
|
31
|
+
# @return [AWSEBSConfig, nil] Root EBS volume configuration. If not specified, provider defaults
|
|
32
|
+
# will be used.
|
|
33
|
+
attribute :root_volume, "AWSEBSConfig"
|
|
34
|
+
# @!attribute [r] additional_volumes
|
|
35
|
+
# @return [Array<AWSEBSConfig>, nil] Additional EBS volumes to attach to the instance.
|
|
36
|
+
attribute :additional_volumes, "AWSEBSConfig", array: true
|
|
37
|
+
# @!attribute [r] dedicated_host
|
|
38
|
+
# @return [Boolean, nil] Whether to use a dedicated host. Dedicated hosts provide visibility and
|
|
39
|
+
# control over how instances are placed on physical servers.
|
|
40
|
+
attribute :dedicated_host
|
|
41
|
+
# @!attribute [r] placement_group
|
|
42
|
+
# @return [String, nil] Placement group name for the instance. Placement groups influence how
|
|
43
|
+
# instances are placed on underlying hardware.
|
|
44
|
+
attribute :placement_group
|
|
45
|
+
# @!attribute [r] region
|
|
46
|
+
# @return [String, nil] The AWS region where the machine is located.
|
|
47
|
+
attribute :region
|
|
48
|
+
# @!attribute [r] machine_type
|
|
49
|
+
# @return [String, nil] The AWS machine type. This determines the compute resources
|
|
50
|
+
# (CPU, memory, etc.) available on the machine. The valid values depend
|
|
51
|
+
# on the chosen provider.
|
|
52
|
+
attribute :machine_type
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# AWSEBSConfig defines the configuration for an AWS EBS volume.
|
|
56
|
+
class AWSEBSConfig < Unikraft::Cloud::Model
|
|
57
|
+
# @!attribute [r] device_name
|
|
58
|
+
# @return [String, nil] The device name (e.g., "/dev/sda1", "/dev/xvdf"). Required for
|
|
59
|
+
# additional volumes.
|
|
60
|
+
attribute :device_name
|
|
61
|
+
# @!attribute [r] size_gib
|
|
62
|
+
# @return [Integer, nil] Size of the volume in GiB.
|
|
63
|
+
attribute :size_gib
|
|
64
|
+
# @!attribute [r] volume_type
|
|
65
|
+
# @return [String, nil] The volume type (gp3, gp2, io1, io2, st1, sc1, standard).
|
|
66
|
+
attribute :volume_type
|
|
67
|
+
# @!attribute [r] iops
|
|
68
|
+
# @return [Integer, nil] The number of IOPS. Only valid for io1, io2, and gp3 volumes.
|
|
69
|
+
attribute :iops
|
|
70
|
+
# @!attribute [r] throughput_mibps
|
|
71
|
+
# @return [Integer, nil] The throughput in MiB/s. Only valid for gp3 volumes.
|
|
72
|
+
attribute :throughput_mibps
|
|
73
|
+
# @!attribute [r] encrypted
|
|
74
|
+
# @return [Boolean, nil] Whether the volume should be encrypted.
|
|
75
|
+
attribute :encrypted
|
|
76
|
+
# @!attribute [r] kms_key_id
|
|
77
|
+
# @return [String, nil] The KMS key ID for encryption. If encrypted is true and this is not
|
|
78
|
+
# specified, the default EBS encryption key will be used.
|
|
79
|
+
attribute :kms_key_id
|
|
80
|
+
# @!attribute [r] delete_on_termination
|
|
81
|
+
# @return [Boolean, nil] Whether to delete the volume when the instance is terminated.
|
|
82
|
+
attribute :delete_on_termination
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# The request message for checking authorization given a request ID.
|
|
86
|
+
class CheckAuthorizationRequest < Unikraft::Cloud::Model
|
|
87
|
+
# @!attribute [r] request_id
|
|
88
|
+
# @return [String, nil] The request ID is a unique identifier for the request. This is used to
|
|
89
|
+
# track the request in the system and should be provided by the client.
|
|
90
|
+
attribute :request_id
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# The response message for checking authorization.
|
|
94
|
+
class CheckAuthorizationResponse < Unikraft::Cloud::Model
|
|
95
|
+
# @!attribute [r] status
|
|
96
|
+
# @return [String, nil] The status of the response.
|
|
97
|
+
attribute :status
|
|
98
|
+
# @!attribute [r] message
|
|
99
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
100
|
+
attribute :message
|
|
101
|
+
# @!attribute [r] data
|
|
102
|
+
# @return [CheckAuthorizationResponseData, nil] The response data for this request.
|
|
103
|
+
attribute :data, "CheckAuthorizationResponseData"
|
|
104
|
+
# @!attribute [r] errors
|
|
105
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
106
|
+
attribute :errors, "ResponseError", array: true
|
|
107
|
+
# @!attribute [r] op_time_us
|
|
108
|
+
# @return [Integer, nil] The operation time in microseconds. This is the time it took to process
|
|
109
|
+
# the request and generate the response.
|
|
110
|
+
attribute :op_time_us
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# The `CheckAuthorizationResponseData` model.
|
|
114
|
+
class CheckAuthorizationResponseData < Unikraft::Cloud::Model
|
|
115
|
+
# @!attribute [r] token
|
|
116
|
+
# @return [String, nil] The authorization token which can be used to authenticate requests.
|
|
117
|
+
attribute :token
|
|
118
|
+
# @!attribute [r] organization_name
|
|
119
|
+
# @return [String, nil] The organization name the token is associated with.
|
|
120
|
+
attribute :organization_name
|
|
121
|
+
# @!attribute [r] organization_display_name
|
|
122
|
+
# @return [String, nil] The display name of the organization the token is associated with.
|
|
123
|
+
attribute :organization_display_name
|
|
124
|
+
# @!attribute [r] registry
|
|
125
|
+
# @return [String, nil] The global image registry.
|
|
126
|
+
attribute :registry
|
|
127
|
+
# @!attribute [r] organization_uuid
|
|
128
|
+
# @return [String, nil] The UUID of the organization the token is associated with.
|
|
129
|
+
attribute :organization_uuid
|
|
130
|
+
# @!attribute [r] user_uuid
|
|
131
|
+
# @return [String, nil] The UUID of the user who approved the login.
|
|
132
|
+
attribute :user_uuid
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# CloudProvider identifies the cloud infrastructure provider where nodes are
|
|
136
|
+
# provisioned.
|
|
137
|
+
module CloudProvider
|
|
138
|
+
MANUAL = "manual"
|
|
139
|
+
AWS = "aws"
|
|
140
|
+
|
|
141
|
+
# Every value of this enumeration.
|
|
142
|
+
ALL = [MANUAL, AWS].freeze
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# CloudProviderConfig contains provider-specific configuration for node
|
|
146
|
+
# provisioning.
|
|
147
|
+
class CloudProviderConfig < Unikraft::Cloud::Model
|
|
148
|
+
# @!attribute [r] aws
|
|
149
|
+
# @return [AWSConfig, nil] AWS-specific configuration.
|
|
150
|
+
attribute :aws, "AWSConfig"
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Response message for deleting nodes.
|
|
154
|
+
class DestroyNodeResponse < Unikraft::Cloud::Model
|
|
155
|
+
# @!attribute [r] status
|
|
156
|
+
# @return [String, nil] The status of the response.
|
|
157
|
+
attribute :status
|
|
158
|
+
# @!attribute [r] message
|
|
159
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
160
|
+
attribute :message
|
|
161
|
+
# @!attribute [r] data
|
|
162
|
+
# @return [DestroyNodeResponseData, nil] The response data for this request.
|
|
163
|
+
attribute :data, "DestroyNodeResponseData"
|
|
164
|
+
# @!attribute [r] errors
|
|
165
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
166
|
+
attribute :errors, "ResponseError", array: true
|
|
167
|
+
# @!attribute [r] op_time_us
|
|
168
|
+
# @return [Integer, nil] The operation time in microseconds.
|
|
169
|
+
attribute :op_time_us
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# The `DestroyNodeResponseData` model.
|
|
173
|
+
class DestroyNodeResponseData < Unikraft::Cloud::Model
|
|
174
|
+
# @!attribute [r] nodes
|
|
175
|
+
# @return [Array<Node>, nil] The deleted nodes (with their final state before deletion).
|
|
176
|
+
attribute :nodes, "Node", array: true
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# The response message for getting authorization details.
|
|
180
|
+
class GetAuthorizationResponse < Unikraft::Cloud::Model
|
|
181
|
+
# @!attribute [r] status
|
|
182
|
+
# @return [String, nil] The status of the response.
|
|
183
|
+
attribute :status
|
|
184
|
+
# @!attribute [r] message
|
|
185
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
186
|
+
attribute :message
|
|
187
|
+
# @!attribute [r] data
|
|
188
|
+
# @return [GetAuthorizationResponseData, nil] The response data for this request.
|
|
189
|
+
attribute :data, "GetAuthorizationResponseData"
|
|
190
|
+
# @!attribute [r] errors
|
|
191
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
192
|
+
attribute :errors, "ResponseError", array: true
|
|
193
|
+
# @!attribute [r] op_time_us
|
|
194
|
+
# @return [Integer, nil] The operation time in microseconds. This is the time it took to process
|
|
195
|
+
# the request and generate the response.
|
|
196
|
+
attribute :op_time_us
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# The `GetAuthorizationResponseData` model.
|
|
200
|
+
class GetAuthorizationResponseData < Unikraft::Cloud::Model
|
|
201
|
+
# @!attribute [r] organization_name
|
|
202
|
+
# @return [String, nil] The organization name the token is associated with.
|
|
203
|
+
attribute :organization_name
|
|
204
|
+
# @!attribute [r] organization_display_name
|
|
205
|
+
# @return [String, nil] The display name of the organization the token is associated with.
|
|
206
|
+
attribute :organization_display_name
|
|
207
|
+
# @!attribute [r] registry
|
|
208
|
+
# @return [String, nil] The global image registry.
|
|
209
|
+
attribute :registry
|
|
210
|
+
# @!attribute [r] organization_uuid
|
|
211
|
+
# @return [String, nil] The UUID of the organization the token is associated with.
|
|
212
|
+
attribute :organization_uuid
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# The `Image` model.
|
|
216
|
+
class Image < Unikraft::Cloud::Model
|
|
217
|
+
# @!attribute [r] name
|
|
218
|
+
# @return [String, nil] The canonical name of the image.
|
|
219
|
+
attribute :name
|
|
220
|
+
# @!attribute [r] tags
|
|
221
|
+
# @return [Array<ImageTag>, nil] The list of tags for the image. Only populated when details are requested.
|
|
222
|
+
attribute :tags, "ImageTag", array: true
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# The `ImageTag` model.
|
|
226
|
+
class ImageTag < Unikraft::Cloud::Model
|
|
227
|
+
# @!attribute [r] name
|
|
228
|
+
# @return [String, nil] The tag name.
|
|
229
|
+
attribute :name
|
|
230
|
+
# @!attribute [r] digest
|
|
231
|
+
# @return [String, nil] The digest for the tag.
|
|
232
|
+
attribute :digest
|
|
233
|
+
# @!attribute [r] size
|
|
234
|
+
# @return [Integer, nil] The size of the image in bytes.
|
|
235
|
+
attribute :size
|
|
236
|
+
# @!attribute [r] push_time
|
|
237
|
+
# @return [String, nil] The push time of the image.
|
|
238
|
+
attribute :push_time
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# The `ListImagesResponse` model.
|
|
242
|
+
class ListImagesResponse < Unikraft::Cloud::Model
|
|
243
|
+
# @!attribute [r] status
|
|
244
|
+
# @return [String, nil] The status of the response.
|
|
245
|
+
attribute :status
|
|
246
|
+
# @!attribute [r] message
|
|
247
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
248
|
+
attribute :message
|
|
249
|
+
# @!attribute [r] data
|
|
250
|
+
# @return [ListImagesResponseData, nil] The response data for this request.
|
|
251
|
+
attribute :data, "ListImagesResponseData"
|
|
252
|
+
# @!attribute [r] errors
|
|
253
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
254
|
+
attribute :errors, "ResponseError", array: true
|
|
255
|
+
# @!attribute [r] op_time_us
|
|
256
|
+
# @return [Integer, nil] The operation time in microseconds. This is the time it took to process
|
|
257
|
+
# the request and generate the response.
|
|
258
|
+
attribute :op_time_us
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# The `ListImagesResponseData` model.
|
|
262
|
+
class ListImagesResponseData < Unikraft::Cloud::Model
|
|
263
|
+
# @!attribute [r] images
|
|
264
|
+
# @return [Array<Image>, nil] The list of images.
|
|
265
|
+
attribute :images, "Image", array: true
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Response message for listing machine types.
|
|
269
|
+
class ListMachineTypesResponse < Unikraft::Cloud::Model
|
|
270
|
+
# @!attribute [r] status
|
|
271
|
+
# @return [String, nil] The status of the response.
|
|
272
|
+
attribute :status
|
|
273
|
+
# @!attribute [r] message
|
|
274
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
275
|
+
attribute :message
|
|
276
|
+
# @!attribute [r] data
|
|
277
|
+
# @return [ListMachineTypesResponseData, nil] The response data for this request.
|
|
278
|
+
attribute :data, "ListMachineTypesResponseData"
|
|
279
|
+
# @!attribute [r] errors
|
|
280
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
281
|
+
attribute :errors, "ResponseError", array: true
|
|
282
|
+
# @!attribute [r] op_time_us
|
|
283
|
+
# @return [Integer, nil] The operation time in microseconds.
|
|
284
|
+
attribute :op_time_us
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# The `ListMachineTypesResponseData` model.
|
|
288
|
+
class ListMachineTypesResponseData < Unikraft::Cloud::Model
|
|
289
|
+
# @!attribute [r] machine_types
|
|
290
|
+
# @return [Array<MachineType>, nil] The list of available machine types.
|
|
291
|
+
attribute :machine_types, "MachineType", array: true
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# The `ListMetroResponse` model.
|
|
295
|
+
class ListMetroResponse < Unikraft::Cloud::Model
|
|
296
|
+
# @!attribute [r] status
|
|
297
|
+
# @return [String, nil] The status of the response.
|
|
298
|
+
attribute :status
|
|
299
|
+
# @!attribute [r] message
|
|
300
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
301
|
+
attribute :message
|
|
302
|
+
# @!attribute [r] data
|
|
303
|
+
# @return [ListMetroResponseData, nil] The response data for this request.
|
|
304
|
+
attribute :data, "ListMetroResponseData"
|
|
305
|
+
# @!attribute [r] errors
|
|
306
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
307
|
+
attribute :errors, "ResponseError", array: true
|
|
308
|
+
# @!attribute [r] op_time_us
|
|
309
|
+
# @return [Integer, nil] The operation time in microseconds. This is the time it took to process
|
|
310
|
+
# the request and generate the response.
|
|
311
|
+
attribute :op_time_us
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# The `ListMetroResponseData` model.
|
|
315
|
+
class ListMetroResponseData < Unikraft::Cloud::Model
|
|
316
|
+
# @!attribute [r] metros
|
|
317
|
+
# @return [Array<Metro>, nil] The list of metros.
|
|
318
|
+
attribute :metros, "Metro", array: true
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# Response message for getting nodes.
|
|
322
|
+
class ListNodesResponse < Unikraft::Cloud::Model
|
|
323
|
+
# @!attribute [r] status
|
|
324
|
+
# @return [String, nil] The status of the response.
|
|
325
|
+
attribute :status
|
|
326
|
+
# @!attribute [r] message
|
|
327
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
328
|
+
attribute :message
|
|
329
|
+
# @!attribute [r] data
|
|
330
|
+
# @return [ListNodesResponseData, nil] The response data for this request.
|
|
331
|
+
attribute :data, "ListNodesResponseData"
|
|
332
|
+
# @!attribute [r] errors
|
|
333
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
334
|
+
attribute :errors, "ResponseError", array: true
|
|
335
|
+
# @!attribute [r] op_time_us
|
|
336
|
+
# @return [Integer, nil] The operation time in microseconds.
|
|
337
|
+
attribute :op_time_us
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# The `ListNodesResponseData` model.
|
|
341
|
+
class ListNodesResponseData < Unikraft::Cloud::Model
|
|
342
|
+
# @!attribute [r] nodes
|
|
343
|
+
# @return [Array<Node>, nil] The list of nodes matching the request.
|
|
344
|
+
attribute :nodes, "Node", array: true
|
|
345
|
+
# @!attribute [r] total_count
|
|
346
|
+
# @return [Integer, nil] Total count of nodes matching the filters (for pagination).
|
|
347
|
+
attribute :total_count
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Response message for listing regions.
|
|
351
|
+
class ListRegionsResponse < Unikraft::Cloud::Model
|
|
352
|
+
# @!attribute [r] status
|
|
353
|
+
# @return [String, nil] The status of the response.
|
|
354
|
+
attribute :status
|
|
355
|
+
# @!attribute [r] message
|
|
356
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
357
|
+
attribute :message
|
|
358
|
+
# @!attribute [r] data
|
|
359
|
+
# @return [ListRegionsResponseData, nil] The response data for this request.
|
|
360
|
+
attribute :data, "ListRegionsResponseData"
|
|
361
|
+
# @!attribute [r] errors
|
|
362
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
363
|
+
attribute :errors, "ResponseError", array: true
|
|
364
|
+
# @!attribute [r] op_time_us
|
|
365
|
+
# @return [Integer, nil] The operation time in microseconds.
|
|
366
|
+
attribute :op_time_us
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# The `ListRegionsResponseData` model.
|
|
370
|
+
class ListRegionsResponseData < Unikraft::Cloud::Model
|
|
371
|
+
# @!attribute [r] regions
|
|
372
|
+
# @return [Array<Region>, nil] The list of available regions.
|
|
373
|
+
attribute :regions, "Region", array: true
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# Information about an available machine type.
|
|
377
|
+
class MachineType < Unikraft::Cloud::Model
|
|
378
|
+
# @!attribute [r] name
|
|
379
|
+
# @return [String, nil] The machine type identifier (e.g., "m5.xlarge", "n2-standard-4").
|
|
380
|
+
attribute :name
|
|
381
|
+
# @!attribute [r] description
|
|
382
|
+
# @return [String, nil] Human-readable description.
|
|
383
|
+
attribute :description
|
|
384
|
+
# @!attribute [r] vcpus
|
|
385
|
+
# @return [Integer, nil] Number of vCPUs.
|
|
386
|
+
attribute :vcpus
|
|
387
|
+
# @!attribute [r] memory_mib
|
|
388
|
+
# @return [Integer, nil] Memory in MiB.
|
|
389
|
+
attribute :memory_mib
|
|
390
|
+
# @!attribute [r] category
|
|
391
|
+
# @return [String, nil] Machine category (e.g., "general-purpose", "compute-optimized",
|
|
392
|
+
# "memory-optimized").
|
|
393
|
+
attribute :category
|
|
394
|
+
# @!attribute [r] available_regions
|
|
395
|
+
# @return [Array<String>, nil] Regions where this machine type is available.
|
|
396
|
+
attribute :available_regions
|
|
397
|
+
# @!attribute [r] nested_virtualization
|
|
398
|
+
# @return [Boolean, nil] Whether this machine type supports nested virtualization.
|
|
399
|
+
attribute :nested_virtualization
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# The `Metro` model.
|
|
403
|
+
class Metro < Unikraft::Cloud::Model
|
|
404
|
+
# @!attribute [r] uuid
|
|
405
|
+
# @return [String, nil] The UUID of the metro.
|
|
406
|
+
attribute :uuid
|
|
407
|
+
# @!attribute [r] endpoint
|
|
408
|
+
# @return [String, nil] The API endpoint for the metro.
|
|
409
|
+
attribute :endpoint
|
|
410
|
+
# @!attribute [r] name
|
|
411
|
+
# @return [String, nil] The name of the metro.
|
|
412
|
+
attribute :name
|
|
413
|
+
# @!attribute [r] iata_code
|
|
414
|
+
# @return [String, nil] The IATA code of the metro.
|
|
415
|
+
attribute :iata_code
|
|
416
|
+
# @!attribute [r] country
|
|
417
|
+
# @return [String, nil] The country where the metro is located.
|
|
418
|
+
attribute :country
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
# The operations available on a node's mutable properties.
|
|
422
|
+
module MutableNodeOperation
|
|
423
|
+
SET = "set"
|
|
424
|
+
ADD = "add"
|
|
425
|
+
DEL = "del"
|
|
426
|
+
|
|
427
|
+
# Every value of this enumeration.
|
|
428
|
+
ALL = [SET, ADD, DEL].freeze
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# The mutable properties of a node which can be updated.
|
|
432
|
+
module MutableNodeProperty
|
|
433
|
+
TAGS = "tags"
|
|
434
|
+
DELETE_LOCK = "delete_lock"
|
|
435
|
+
SSH_KEYS = "ssh_keys"
|
|
436
|
+
API_ENDPOINT = "api_endpoint"
|
|
437
|
+
|
|
438
|
+
# Every value of this enumeration.
|
|
439
|
+
ALL = [TAGS, DELETE_LOCK, SSH_KEYS, API_ENDPOINT].freeze
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# An identifier for a resource. Either a name or a UUID.
|
|
443
|
+
class NameOrUUID < Unikraft::Cloud::Model
|
|
444
|
+
# @!attribute [r] uuid
|
|
445
|
+
# @return [String, nil] The UUID of the resource.
|
|
446
|
+
attribute :uuid
|
|
447
|
+
# @!attribute [r] name
|
|
448
|
+
# @return [String, nil] The name of the resource.
|
|
449
|
+
attribute :name
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
# Node represents a physical or virtual compute node provisioned on a
|
|
453
|
+
# cloud provider for use as part of the Unikraft Cloud infrastructure.
|
|
454
|
+
#
|
|
455
|
+
# Node nodes are the underlying compute resources where Unikraft Cloud
|
|
456
|
+
# instances run. They are provisioned on-demand across multiple cloud
|
|
457
|
+
# providers and managed through a unified API.
|
|
458
|
+
class Node < Unikraft::Cloud::Model
|
|
459
|
+
# @!attribute [r] uuid
|
|
460
|
+
# @return [String, nil] The UUID of the machine.
|
|
461
|
+
#
|
|
462
|
+
# This is a unique identifier for the machine that is generated when the
|
|
463
|
+
# machine is created. The UUID is used to reference the machine in API calls and
|
|
464
|
+
# can be used to identify the machine in all API calls that require a machine
|
|
465
|
+
# identifier.
|
|
466
|
+
attribute :uuid
|
|
467
|
+
# @!attribute [r] name
|
|
468
|
+
# @return [String, nil] The name of the machine.
|
|
469
|
+
#
|
|
470
|
+
# This is a human-readable name that can be used to identify the machine.
|
|
471
|
+
# The name must be unique within the context of your account. The name can
|
|
472
|
+
# also be used to identify the machine in API calls.
|
|
473
|
+
attribute :name
|
|
474
|
+
# @!attribute [r] created_at
|
|
475
|
+
# @return [String, nil] The time the machine was created.
|
|
476
|
+
attribute :created_at
|
|
477
|
+
# @!attribute [r] updated_at
|
|
478
|
+
# @return [String, nil] The time the machine was last updated.
|
|
479
|
+
attribute :updated_at
|
|
480
|
+
# @!attribute [r] state
|
|
481
|
+
# @return [String, nil] The current state of the machine.
|
|
482
|
+
attribute :state
|
|
483
|
+
# @!attribute [r] state_message
|
|
484
|
+
# @return [String, nil] An optional message providing additional information about the current
|
|
485
|
+
# state, particularly useful for error states.
|
|
486
|
+
attribute :state_message
|
|
487
|
+
# @!attribute [r] cloudprovider
|
|
488
|
+
# @return [String, nil] The cloud provider where this machine is provisioned.
|
|
489
|
+
attribute :cloudprovider
|
|
490
|
+
# @!attribute [r] vcpus
|
|
491
|
+
# @return [Integer, nil] The number of vCPUs available on this machine.
|
|
492
|
+
attribute :vcpus
|
|
493
|
+
# @!attribute [r] memory_mib
|
|
494
|
+
# @return [Integer, nil] The amount of memory in MiB available on this machine.
|
|
495
|
+
attribute :memory_mib
|
|
496
|
+
# @!attribute [r] ssh_keys
|
|
497
|
+
# @return [Array<SSHKey>, nil] The SSH keys configured for access to this machine.
|
|
498
|
+
attribute :ssh_keys, "SSHKey", array: true
|
|
499
|
+
# @!attribute [r] public_ipv4
|
|
500
|
+
# @return [String, nil] The public IPv4 address of the machine, if assigned.
|
|
501
|
+
attribute :public_ipv4
|
|
502
|
+
# @!attribute [r] public_ipv6
|
|
503
|
+
# @return [String, nil] The public IPv6 address of the machine, if assigned.
|
|
504
|
+
attribute :public_ipv6
|
|
505
|
+
# @!attribute [r] private_ipv4
|
|
506
|
+
# @return [String, nil] The private IPv4 address of the machine within the provider's network.
|
|
507
|
+
attribute :private_ipv4
|
|
508
|
+
# @!attribute [r] metro
|
|
509
|
+
# @return [String, nil] The Unikraft Cloud metro this machine is associated with.
|
|
510
|
+
attribute :metro
|
|
511
|
+
# @!attribute [r] provider_instance_id
|
|
512
|
+
# @return [String, nil] The provider-specific instance ID or resource identifier.
|
|
513
|
+
attribute :provider_instance_id
|
|
514
|
+
# @!attribute [r] provider_config
|
|
515
|
+
# @return [CloudProviderConfig, nil] Provider-specific configuration that was used to provision this node.
|
|
516
|
+
attribute :provider_config, "CloudProviderConfig"
|
|
517
|
+
# @!attribute [r] tags
|
|
518
|
+
# @return [Hash{Symbol => String}, nil] User-defined tags for organizing and filtering nodes.
|
|
519
|
+
attribute :tags
|
|
520
|
+
# @!attribute [r] ready_at
|
|
521
|
+
# @return [String, nil] The time when the machine became ready (entered READY state).
|
|
522
|
+
attribute :ready_at
|
|
523
|
+
# @!attribute [r] uptime_seconds
|
|
524
|
+
# @return [Integer, nil] The total uptime of the machine in seconds since it became ready.
|
|
525
|
+
attribute :uptime_seconds
|
|
526
|
+
# @!attribute [r] delete_lock
|
|
527
|
+
# @return [Boolean, nil] Whether the machine is protected from deletion. When true, delete operations
|
|
528
|
+
# will fail until this is set to false.
|
|
529
|
+
attribute :delete_lock
|
|
530
|
+
# @!attribute [r] api_endpoint
|
|
531
|
+
# @return [String, nil] The API endpoint for the node, used to connect to the node's platform SDK.
|
|
532
|
+
attribute :api_endpoint
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
# The request message for certificate activation.
|
|
536
|
+
class NodeActivateRequest < Unikraft::Cloud::Model
|
|
537
|
+
# @!attribute [r] csr
|
|
538
|
+
# @return [String, nil] The certificate signing request (CSR) for the license which is base64
|
|
539
|
+
# encoded.
|
|
540
|
+
attribute :csr
|
|
541
|
+
# @!attribute [r] secret
|
|
542
|
+
# @return [String, nil] An opaque secret for first-time activation. On renewal (where the node's
|
|
543
|
+
# public key is already known), this field is omitted and the CSR
|
|
544
|
+
# self-signature is used as proof of key possession.
|
|
545
|
+
attribute :secret
|
|
546
|
+
# @!attribute [r] serial
|
|
547
|
+
# @return [String, nil] The serial number of the last issued certificate.
|
|
548
|
+
attribute :serial
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
# The response message for certificate activation.
|
|
552
|
+
class NodeActivateResponse < Unikraft::Cloud::Model
|
|
553
|
+
# @!attribute [r] status
|
|
554
|
+
# @return [String, nil] The status of the response.
|
|
555
|
+
attribute :status
|
|
556
|
+
# @!attribute [r] message
|
|
557
|
+
# @return [String, nil] / An optional message providing additional information about the response.
|
|
558
|
+
attribute :message
|
|
559
|
+
# @!attribute [r] data
|
|
560
|
+
# @return [NodeActivateResponseData, nil] The response data for this request.
|
|
561
|
+
attribute :data, "NodeActivateResponseData"
|
|
562
|
+
# @!attribute [r] errors
|
|
563
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
564
|
+
attribute :errors, "ResponseError", array: true
|
|
565
|
+
# @!attribute [r] op_time_us
|
|
566
|
+
# @return [Integer, nil] The operation time in microseconds.
|
|
567
|
+
attribute :op_time_us
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
# The `NodeActivateResponseData` model.
|
|
571
|
+
class NodeActivateResponseData < Unikraft::Cloud::Model
|
|
572
|
+
# @!attribute [r] license
|
|
573
|
+
# @return [String, nil] The issued license certificate in base64 URL encoded PEM format.
|
|
574
|
+
attribute :license
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
# The request message for license deactivation. The caller is identified by
|
|
578
|
+
# an HTTP message signature (RFC 9421) made with the node's stable private
|
|
579
|
+
# key, the same mechanism used by the private node-facing APIs (e.g.
|
|
580
|
+
# NodeHeartbeat) -- not by any field in this message.
|
|
581
|
+
class NodeDeactivateRequest < Unikraft::Cloud::Model
|
|
582
|
+
# @!attribute [r] serial
|
|
583
|
+
# @return [String, nil] The serial number of the last issued certificate.
|
|
584
|
+
attribute :serial
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
# The response message for license deactivation.
|
|
588
|
+
class NodeDeactivateResponse < Unikraft::Cloud::Model
|
|
589
|
+
# @!attribute [r] status
|
|
590
|
+
# @return [String, nil] The status of the response.
|
|
591
|
+
attribute :status
|
|
592
|
+
# @!attribute [r] message
|
|
593
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
594
|
+
attribute :message
|
|
595
|
+
# @!attribute [r] errors
|
|
596
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
597
|
+
attribute :errors, "ResponseError", array: true
|
|
598
|
+
# @!attribute [r] op_time_us
|
|
599
|
+
# @return [Integer, nil] The operation time in microseconds.
|
|
600
|
+
attribute :op_time_us
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
# NodeState defines the provisioning lifecycle state of a machine which will
|
|
604
|
+
# run the Unikraft Cloud Platform.
|
|
605
|
+
module NodeState
|
|
606
|
+
UNSPECIFIED = "unspecified"
|
|
607
|
+
PENDING = "pending"
|
|
608
|
+
PROVISIONING = "provisioning"
|
|
609
|
+
CONFIGURING = "configuring"
|
|
610
|
+
READY = "ready"
|
|
611
|
+
DEPROVISIONING = "deprovisioning"
|
|
612
|
+
DEPROVISIONED = "deprovisioned"
|
|
613
|
+
ERROR = "error"
|
|
614
|
+
MAINTENANCE = "maintenance"
|
|
615
|
+
|
|
616
|
+
# Every value of this enumeration.
|
|
617
|
+
ALL = [UNSPECIFIED, PENDING, PROVISIONING, CONFIGURING, READY, DEPROVISIONING, DEPROVISIONED, ERROR, MAINTENANCE].freeze
|
|
618
|
+
end
|
|
619
|
+
|
|
620
|
+
# Request message for creating a new node.
|
|
621
|
+
class ProvisionNodeRequest < Unikraft::Cloud::Model
|
|
622
|
+
# @!attribute [r] name
|
|
623
|
+
# @return [String, nil] Optional name for the node. If not provided, a name will be
|
|
624
|
+
# auto-generated.
|
|
625
|
+
attribute :name
|
|
626
|
+
# @!attribute [r] cloudprovider
|
|
627
|
+
# @return [String, nil] The cloud provider where the machine should be provisioned.
|
|
628
|
+
attribute :cloudprovider
|
|
629
|
+
# @!attribute [r] ssh_keys
|
|
630
|
+
# @return [Array<SSHKey>, nil] SSH keys for accessing the node. At least one key is required.
|
|
631
|
+
attribute :ssh_keys, "SSHKey", array: true
|
|
632
|
+
# @!attribute [r] tags
|
|
633
|
+
# @return [Hash{Symbol => String}, nil] Optional user-defined tags.
|
|
634
|
+
attribute :tags
|
|
635
|
+
# @!attribute [r] cloudprovider_config
|
|
636
|
+
# @return [CloudProviderConfig, nil] Optional provider-specific configuration for advanced customization.
|
|
637
|
+
attribute :cloudprovider_config, "CloudProviderConfig"
|
|
638
|
+
# @!attribute [r] metro
|
|
639
|
+
# @return [String, nil] The Unikraft Cloud metro to associate this machine with.
|
|
640
|
+
attribute :metro
|
|
641
|
+
# @!attribute [r] platform_config
|
|
642
|
+
# @return [Hash{Symbol => String}, nil] Optional user overrides for platform configuration. Keys should be
|
|
643
|
+
# kebab-case (e.g., "vm-user-min-memory").
|
|
644
|
+
attribute :platform_config
|
|
645
|
+
# @!attribute [r] image_pulls
|
|
646
|
+
# @return [Array<String>, nil] Optional image references to pre-pull on the provisioned machine.
|
|
647
|
+
attribute :image_pulls
|
|
648
|
+
# @!attribute [r] net_count
|
|
649
|
+
# @return [Integer, nil] Optional network count override. If not specified, defaults to 1000.
|
|
650
|
+
attribute :net_count
|
|
651
|
+
end
|
|
652
|
+
|
|
653
|
+
# Response message for creating a node.
|
|
654
|
+
class ProvisionNodeResponse < Unikraft::Cloud::Model
|
|
655
|
+
# @!attribute [r] status
|
|
656
|
+
# @return [String, nil] The status of the response.
|
|
657
|
+
attribute :status
|
|
658
|
+
# @!attribute [r] message
|
|
659
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
660
|
+
attribute :message
|
|
661
|
+
# @!attribute [r] data
|
|
662
|
+
# @return [ProvisionNodeResponseData, nil] The response data for this request.
|
|
663
|
+
attribute :data, "ProvisionNodeResponseData"
|
|
664
|
+
# @!attribute [r] errors
|
|
665
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
666
|
+
attribute :errors, "ResponseError", array: true
|
|
667
|
+
# @!attribute [r] op_time_us
|
|
668
|
+
# @return [Integer, nil] The operation time in microseconds.
|
|
669
|
+
attribute :op_time_us
|
|
670
|
+
end
|
|
671
|
+
|
|
672
|
+
# The `ProvisionNodeResponseData` model.
|
|
673
|
+
class ProvisionNodeResponseData < Unikraft::Cloud::Model
|
|
674
|
+
# @!attribute [r] node
|
|
675
|
+
# @return [Node, nil] The created node.
|
|
676
|
+
attribute :node, "Node"
|
|
677
|
+
end
|
|
678
|
+
|
|
679
|
+
# Information about an available region.
|
|
680
|
+
class Region < Unikraft::Cloud::Model
|
|
681
|
+
# @!attribute [r] name
|
|
682
|
+
# @return [String, nil] The region identifier (e.g., "us-east-1", "us-central1").
|
|
683
|
+
attribute :name
|
|
684
|
+
# @!attribute [r] iata
|
|
685
|
+
# @return [String, nil] The IATA code for the region.
|
|
686
|
+
attribute :iata
|
|
687
|
+
end
|
|
688
|
+
|
|
689
|
+
# The request message for a sign-in request.
|
|
690
|
+
class RequestSigninRequest < Unikraft::Cloud::Model
|
|
691
|
+
# @!attribute [r] hostname
|
|
692
|
+
# @return [String, nil] The hostname is the name of the machine making the request. This is
|
|
693
|
+
# mandatory as it consitutes a unique identifier for the machine.
|
|
694
|
+
attribute :hostname
|
|
695
|
+
# @!attribute [r] os
|
|
696
|
+
# @return [String, nil] The operating system of the machine making the request.
|
|
697
|
+
attribute :os
|
|
698
|
+
# @!attribute [r] os_version
|
|
699
|
+
# @return [String, nil] The version of the operating system of the machine making the request, if
|
|
700
|
+
# available.
|
|
701
|
+
#
|
|
702
|
+
# For Android, it's like "10", "11", "12", etc. For iOS and macOS it's like
|
|
703
|
+
# "15.6.1" or "12.4.0". For Windows it's like "10.0.19044.1889". For FreeBSD
|
|
704
|
+
# it's like "12.3-STABLE". For Linux, this is simply the kernel version on
|
|
705
|
+
# Linux, like "5.10.0-17-amd64".
|
|
706
|
+
attribute :os_version
|
|
707
|
+
# @!attribute [r] container
|
|
708
|
+
# @return [Boolean, nil] A best-effort whether the client is running in a container.
|
|
709
|
+
attribute :container
|
|
710
|
+
# @!attribute [r] distro
|
|
711
|
+
# @return [String, nil] The OS distribution, if known. E.g. "debian", "ubuntu", "nixos", ...
|
|
712
|
+
attribute :distro
|
|
713
|
+
# @!attribute [r] distro_version
|
|
714
|
+
# @return [String, nil] The OS distribution version if known. E.g. "20.04", ...
|
|
715
|
+
attribute :distro_version
|
|
716
|
+
# @!attribute [r] distro_codename
|
|
717
|
+
# @return [String, nil] TThe OS distribution codename if known. E.g. "jammy", "bullseye", ...
|
|
718
|
+
attribute :distro_codename
|
|
719
|
+
# @!attribute [r] cli_version
|
|
720
|
+
# @return [String, nil] The CLI version is the version of the Unikraft CLI that is making the
|
|
721
|
+
# request.
|
|
722
|
+
attribute :cli_version
|
|
723
|
+
# @!attribute [r] goarch
|
|
724
|
+
# @return [String, nil] If available, the GOARCH value (of the built binary).
|
|
725
|
+
attribute :goarch
|
|
726
|
+
# @!attribute [r] goos
|
|
727
|
+
# @return [String, nil] If available, the GOOS value (of the built binary)
|
|
728
|
+
attribute :goos
|
|
729
|
+
# @!attribute [r] go_version
|
|
730
|
+
# @return [String, nil] if available, the Go version binary was built with.
|
|
731
|
+
attribute :go_version
|
|
732
|
+
end
|
|
733
|
+
|
|
734
|
+
# The response message for a sign-in request.
|
|
735
|
+
class RequestSigninResponse < Unikraft::Cloud::Model
|
|
736
|
+
# @!attribute [r] status
|
|
737
|
+
# @return [String, nil] The status of the response.
|
|
738
|
+
attribute :status
|
|
739
|
+
# @!attribute [r] message
|
|
740
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
741
|
+
attribute :message
|
|
742
|
+
# @!attribute [r] data
|
|
743
|
+
# @return [RequestSigninResponseData, nil] The response data for this request.
|
|
744
|
+
attribute :data, "RequestSigninResponseData"
|
|
745
|
+
# @!attribute [r] errors
|
|
746
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
747
|
+
attribute :errors, "ResponseError", array: true
|
|
748
|
+
# @!attribute [r] op_time_us
|
|
749
|
+
# @return [Integer, nil] The operation time in microseconds. This is the time it took to process
|
|
750
|
+
# the request and generate the response.
|
|
751
|
+
attribute :op_time_us
|
|
752
|
+
end
|
|
753
|
+
|
|
754
|
+
# The `RequestSigninResponseData` model.
|
|
755
|
+
class RequestSigninResponseData < Unikraft::Cloud::Model
|
|
756
|
+
# @!attribute [r] authorization_url
|
|
757
|
+
# @return [String, nil] The full URL which can be used to remotely confirm the signin.
|
|
758
|
+
attribute :authorization_url
|
|
759
|
+
# @!attribute [r] request_id
|
|
760
|
+
# @return [String, nil] A unique identifier for the request. This can be used to track the
|
|
761
|
+
# request in the system.
|
|
762
|
+
attribute :request_id
|
|
763
|
+
end
|
|
764
|
+
|
|
765
|
+
# The error response message for an API request.
|
|
766
|
+
class ResponseError < Unikraft::Cloud::Model
|
|
767
|
+
# @!attribute [r] status
|
|
768
|
+
# @return [Integer, nil] The HTTP status code of the error.
|
|
769
|
+
attribute :status
|
|
770
|
+
end
|
|
771
|
+
|
|
772
|
+
# The response status of an API request.
|
|
773
|
+
module ResponseStatus
|
|
774
|
+
SUCCESS = "success"
|
|
775
|
+
ERROR = "error"
|
|
776
|
+
PARTIAL_SUCCESS = "partial_success"
|
|
777
|
+
|
|
778
|
+
# Every value of this enumeration.
|
|
779
|
+
ALL = [SUCCESS, ERROR, PARTIAL_SUCCESS].freeze
|
|
780
|
+
end
|
|
781
|
+
|
|
782
|
+
# SSHKey represents an SSH public key for authentication.
|
|
783
|
+
class SSHKey < Unikraft::Cloud::Model
|
|
784
|
+
# @!attribute [r] name
|
|
785
|
+
# @return [String, nil] A name or label for this SSH key.
|
|
786
|
+
attribute :name
|
|
787
|
+
# @!attribute [r] public_key
|
|
788
|
+
# @return [String, nil] The SSH public key in OpenSSH format (e.g., "ssh-rsa AAAA... user@host"
|
|
789
|
+
# or "ssh-ed25519 AAAA... user@host").
|
|
790
|
+
attribute :public_key
|
|
791
|
+
end
|
|
792
|
+
|
|
793
|
+
# UpdateNodePayload contains the changes to apply to a node.
|
|
794
|
+
class UpdateNodePayload < Unikraft::Cloud::Model
|
|
795
|
+
# @!attribute [r] property
|
|
796
|
+
# @return [String, nil] The property to update.
|
|
797
|
+
attribute :property
|
|
798
|
+
# @!attribute [r] operation
|
|
799
|
+
# @return [String, nil] The operation to perform on the property.
|
|
800
|
+
attribute :operation
|
|
801
|
+
# @!attribute [r] value
|
|
802
|
+
# @return [String, nil] The value for the update operation. The type depends on the property:
|
|
803
|
+
# - TAGS: google.protobuf.Struct with key-value pairs
|
|
804
|
+
# - DELETE_LOCK: google.protobuf.Value with boolean
|
|
805
|
+
# - SSH_KEYS: google.protobuf.ListValue with SSHKey objects
|
|
806
|
+
# - API_ENDPOINT: the URL as plain text
|
|
807
|
+
attribute :value
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
# Response message for updating nodes.
|
|
811
|
+
class UpdateNodesResponse < Unikraft::Cloud::Model
|
|
812
|
+
# @!attribute [r] status
|
|
813
|
+
# @return [String, nil] The status of the response.
|
|
814
|
+
attribute :status
|
|
815
|
+
# @!attribute [r] message
|
|
816
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
817
|
+
attribute :message
|
|
818
|
+
# @!attribute [r] data
|
|
819
|
+
# @return [UpdateNodesResponseData, nil] The response data for this request.
|
|
820
|
+
attribute :data, "UpdateNodesResponseData"
|
|
821
|
+
# @!attribute [r] errors
|
|
822
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
823
|
+
attribute :errors, "ResponseError", array: true
|
|
824
|
+
# @!attribute [r] op_time_us
|
|
825
|
+
# @return [Integer, nil] The operation time in microseconds.
|
|
826
|
+
attribute :op_time_us
|
|
827
|
+
end
|
|
828
|
+
|
|
829
|
+
# The `UpdateNodesResponseData` model.
|
|
830
|
+
class UpdateNodesResponseData < Unikraft::Cloud::Model
|
|
831
|
+
# @!attribute [r] nodes
|
|
832
|
+
# @return [Array<Node>, nil] The updated nodes.
|
|
833
|
+
attribute :nodes, "Node", array: true
|
|
834
|
+
end
|
|
835
|
+
|
|
836
|
+
# Response message for wait operations.
|
|
837
|
+
class WaitNodesResponse < Unikraft::Cloud::Model
|
|
838
|
+
# @!attribute [r] status
|
|
839
|
+
# @return [String, nil] The status of the response.
|
|
840
|
+
attribute :status
|
|
841
|
+
# @!attribute [r] message
|
|
842
|
+
# @return [String, nil] An optional message providing additional information about the response.
|
|
843
|
+
attribute :message
|
|
844
|
+
# @!attribute [r] data
|
|
845
|
+
# @return [WaitNodesResponseData, nil] The response data for this request.
|
|
846
|
+
attribute :data, "WaitNodesResponseData"
|
|
847
|
+
# @!attribute [r] errors
|
|
848
|
+
# @return [Array<ResponseError>, nil] A list of errors which may have occurred during the request.
|
|
849
|
+
attribute :errors, "ResponseError", array: true
|
|
850
|
+
# @!attribute [r] op_time_us
|
|
851
|
+
# @return [Integer, nil] The operation time in microseconds.
|
|
852
|
+
attribute :op_time_us
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
# The `WaitNodesResponseData` model.
|
|
856
|
+
class WaitNodesResponseData < Unikraft::Cloud::Model
|
|
857
|
+
# @!attribute [r] nodes
|
|
858
|
+
# @return [Array<Node>, nil] The nodes after reaching the desired state.
|
|
859
|
+
attribute :nodes, "Node", array: true
|
|
860
|
+
end
|
|
861
|
+
end
|
|
862
|
+
end
|
|
863
|
+
end
|
|
864
|
+
end
|
|
865
|
+
end
|