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,83 @@
|
|
|
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 ControlPlane
|
|
12
|
+
# Low-level "plumbing" client for the `Auth` resource of the
|
|
13
|
+
# ControlPlane API. Methods mirror the OpenAPI specification: they are
|
|
14
|
+
# named after the operationId and return the response envelope
|
|
15
|
+
# untouched.
|
|
16
|
+
class AuthApi
|
|
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
|
+
# Check Authorization of Sign-In Request
|
|
27
|
+
#
|
|
28
|
+
# `POST /v1/auth/check`
|
|
29
|
+
#
|
|
30
|
+
# @param body [Models::CheckAuthorizationRequest, Hash, Array] the request body
|
|
31
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
32
|
+
# @yieldparam event [Models::CheckAuthorizationResponse] each event, as it arrives
|
|
33
|
+
# @return [Enumerator, nil] an Enumerator when no block is given
|
|
34
|
+
# @raise [Unikraft::Cloud::Error]
|
|
35
|
+
def check_authorization(body:, **options, &block)
|
|
36
|
+
return enum_for(__method__, body:, **options) unless block
|
|
37
|
+
|
|
38
|
+
@client.stream(
|
|
39
|
+
method: "POST",
|
|
40
|
+
path: "/v1/auth/check",
|
|
41
|
+
body:,
|
|
42
|
+
**options
|
|
43
|
+
) { |event| yield Models::CheckAuthorizationResponse.from(event) }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Get Authorization Status
|
|
47
|
+
#
|
|
48
|
+
# `GET /v1/auth`
|
|
49
|
+
#
|
|
50
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
51
|
+
# @return [Models::GetAuthorizationResponse, nil] the response envelope
|
|
52
|
+
# @raise [Unikraft::Cloud::Error]
|
|
53
|
+
def get_authorization(**options)
|
|
54
|
+
res = @client.request(
|
|
55
|
+
method: "GET",
|
|
56
|
+
path: "/v1/auth",
|
|
57
|
+
**options
|
|
58
|
+
)
|
|
59
|
+
Models::GetAuthorizationResponse.from(res)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Request Sign-In
|
|
63
|
+
#
|
|
64
|
+
# `POST /v1/auth/signin`
|
|
65
|
+
#
|
|
66
|
+
# @param body [Models::RequestSigninRequest, Hash, Array] the request body
|
|
67
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
68
|
+
# @return [Models::RequestSigninResponse, nil] the response envelope
|
|
69
|
+
# @raise [Unikraft::Cloud::Error]
|
|
70
|
+
def request_signin(body:, **options)
|
|
71
|
+
res = @client.request(
|
|
72
|
+
method: "POST",
|
|
73
|
+
path: "/v1/auth/signin",
|
|
74
|
+
body:,
|
|
75
|
+
**options
|
|
76
|
+
)
|
|
77
|
+
Models::RequestSigninResponse.from(res)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
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 ControlPlane
|
|
12
|
+
# Low-level "plumbing" client for the `Images` resource of the
|
|
13
|
+
# ControlPlane 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
|
+
# List Images
|
|
27
|
+
#
|
|
28
|
+
# `GET /v1/images`
|
|
29
|
+
#
|
|
30
|
+
# @param details [Boolean, nil] Whether to include image tag details.
|
|
31
|
+
# @param namespace [Array<String>, nil] Optional namespaces to filter images by.
|
|
32
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
33
|
+
# @return [Models::ListImagesResponse, nil] the response envelope
|
|
34
|
+
# @raise [Unikraft::Cloud::Error]
|
|
35
|
+
def list_images(details: nil, namespace: nil, **options)
|
|
36
|
+
res = @client.request(
|
|
37
|
+
method: "GET",
|
|
38
|
+
path: "/v1/images",
|
|
39
|
+
query: {
|
|
40
|
+
details:,
|
|
41
|
+
namespace:
|
|
42
|
+
},
|
|
43
|
+
**options
|
|
44
|
+
)
|
|
45
|
+
Models::ListImagesResponse.from(res)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
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 ControlPlane
|
|
12
|
+
# Low-level "plumbing" client for the `Metros` resource of the
|
|
13
|
+
# ControlPlane API. Methods mirror the OpenAPI specification: they are
|
|
14
|
+
# named after the operationId and return the response envelope
|
|
15
|
+
# untouched.
|
|
16
|
+
class MetrosApi
|
|
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 Metros
|
|
27
|
+
#
|
|
28
|
+
# `GET /v1/metros`
|
|
29
|
+
#
|
|
30
|
+
# @param options [Hash] per-call `headers:`, `base_url:` and `timeout:`
|
|
31
|
+
# @return [Models::ListMetroResponse, nil] the response envelope
|
|
32
|
+
# @raise [Unikraft::Cloud::Error]
|
|
33
|
+
def list_metros(**options)
|
|
34
|
+
res = @client.request(
|
|
35
|
+
method: "GET",
|
|
36
|
+
path: "/v1/metros",
|
|
37
|
+
**options
|
|
38
|
+
)
|
|
39
|
+
Models::ListMetroResponse.from(res)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|