daytona_api_client 0.187.0 → 0.189.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 +4 -4
- data/lib/daytona_api_client/api/sandbox_api.rb +69 -3
- data/lib/daytona_api_client/models/job_type.rb +2 -1
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +2 -1
- data/lib/daytona_api_client/models/sandbox_state.rb +4 -1
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +2 -2
- data/lib/daytona_api_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8429aa6627e3b62210051c540aaf1dc012e669febb2db6c0c0cda8a03672e17a
|
|
4
|
+
data.tar.gz: 04245de0e94fc36080ecc57926ecfd0d8baddb59501b984e65f7ca84a16c16f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 211bce6930473612dac646e1f9cb2d6ff1e605651f62df3a6e24d809164f2c860c75187e8635f3c64aae3f4ece1861bc9c07dbcdcd426d3166baf9d32d7e4a08
|
|
7
|
+
data.tar.gz: da8b6b6c94d7368e3824eed5fd4d3e92a387f3914f27de6f8e01cda704df9c0e22d90daf77a437db1a6f76367b7e828285796fb1def23114030bfeb5ff185da5
|
|
@@ -1927,7 +1927,7 @@ module DaytonaApiClient
|
|
|
1927
1927
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
|
|
1928
1928
|
end
|
|
1929
1929
|
|
|
1930
|
-
allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "unknown_default_open_api"]
|
|
1930
|
+
allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "pausing", "paused", "resuming", "unknown_default_open_api"]
|
|
1931
1931
|
if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
|
|
1932
1932
|
fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
|
|
1933
1933
|
end
|
|
@@ -2023,6 +2023,70 @@ module DaytonaApiClient
|
|
|
2023
2023
|
return data, status_code, headers
|
|
2024
2024
|
end
|
|
2025
2025
|
|
|
2026
|
+
# Pause sandbox
|
|
2027
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2028
|
+
# @param [Hash] opts the optional parameters
|
|
2029
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2030
|
+
# @return [Sandbox]
|
|
2031
|
+
def pause_sandbox(sandbox_id_or_name, opts = {})
|
|
2032
|
+
data, _status_code, _headers = pause_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2033
|
+
data
|
|
2034
|
+
end
|
|
2035
|
+
|
|
2036
|
+
# Pause sandbox
|
|
2037
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2038
|
+
# @param [Hash] opts the optional parameters
|
|
2039
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2040
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2041
|
+
def pause_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2042
|
+
if @api_client.config.debugging
|
|
2043
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.pause_sandbox ...'
|
|
2044
|
+
end
|
|
2045
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2046
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2047
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.pause_sandbox"
|
|
2048
|
+
end
|
|
2049
|
+
# resource path
|
|
2050
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/pause'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2051
|
+
|
|
2052
|
+
# query parameters
|
|
2053
|
+
query_params = opts[:query_params] || {}
|
|
2054
|
+
|
|
2055
|
+
# header parameters
|
|
2056
|
+
header_params = opts[:header_params] || {}
|
|
2057
|
+
# HTTP header 'Accept' (if needed)
|
|
2058
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2059
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2060
|
+
|
|
2061
|
+
# form parameters
|
|
2062
|
+
form_params = opts[:form_params] || {}
|
|
2063
|
+
|
|
2064
|
+
# http body (model)
|
|
2065
|
+
post_body = opts[:debug_body]
|
|
2066
|
+
|
|
2067
|
+
# return_type
|
|
2068
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2069
|
+
|
|
2070
|
+
# auth_names
|
|
2071
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2072
|
+
|
|
2073
|
+
new_options = opts.merge(
|
|
2074
|
+
:operation => :"SandboxApi.pause_sandbox",
|
|
2075
|
+
:header_params => header_params,
|
|
2076
|
+
:query_params => query_params,
|
|
2077
|
+
:form_params => form_params,
|
|
2078
|
+
:body => post_body,
|
|
2079
|
+
:auth_names => auth_names,
|
|
2080
|
+
:return_type => return_type
|
|
2081
|
+
)
|
|
2082
|
+
|
|
2083
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2084
|
+
if @api_client.config.debugging
|
|
2085
|
+
@api_client.config.logger.debug "API called: SandboxApi#pause_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2086
|
+
end
|
|
2087
|
+
return data, status_code, headers
|
|
2088
|
+
end
|
|
2089
|
+
|
|
2026
2090
|
# Recover sandbox from error state
|
|
2027
2091
|
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2028
2092
|
# @param [Hash] opts the optional parameters
|
|
@@ -2517,7 +2581,8 @@ module DaytonaApiClient
|
|
|
2517
2581
|
return data, status_code, headers
|
|
2518
2582
|
end
|
|
2519
2583
|
|
|
2520
|
-
# Start sandbox
|
|
2584
|
+
# Start or resume sandbox
|
|
2585
|
+
# Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.
|
|
2521
2586
|
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2522
2587
|
# @param [Hash] opts the optional parameters
|
|
2523
2588
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
@@ -2527,7 +2592,8 @@ module DaytonaApiClient
|
|
|
2527
2592
|
data
|
|
2528
2593
|
end
|
|
2529
2594
|
|
|
2530
|
-
# Start sandbox
|
|
2595
|
+
# Start or resume sandbox
|
|
2596
|
+
# Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.
|
|
2531
2597
|
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2532
2598
|
# @param [Hash] opts the optional parameters
|
|
2533
2599
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
@@ -29,10 +29,11 @@ module DaytonaApiClient
|
|
|
29
29
|
UPDATE_SANDBOX_NETWORK_SETTINGS = "UPDATE_SANDBOX_NETWORK_SETTINGS".freeze
|
|
30
30
|
SNAPSHOT_SANDBOX = "SNAPSHOT_SANDBOX".freeze
|
|
31
31
|
FORK_SANDBOX = "FORK_SANDBOX".freeze
|
|
32
|
+
PAUSE_SANDBOX = "PAUSE_SANDBOX".freeze
|
|
32
33
|
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
33
34
|
|
|
34
35
|
def self.all_vars
|
|
35
|
-
@all_vars ||= [CREATE_SANDBOX, START_SANDBOX, STOP_SANDBOX, DESTROY_SANDBOX, RESIZE_SANDBOX, CREATE_BACKUP, BUILD_SNAPSHOT, PULL_SNAPSHOT, RECOVER_SANDBOX, INSPECT_SNAPSHOT_IN_REGISTRY, REMOVE_SNAPSHOT, UPDATE_SANDBOX_NETWORK_SETTINGS, SNAPSHOT_SANDBOX, FORK_SANDBOX, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
36
|
+
@all_vars ||= [CREATE_SANDBOX, START_SANDBOX, STOP_SANDBOX, DESTROY_SANDBOX, RESIZE_SANDBOX, CREATE_BACKUP, BUILD_SNAPSHOT, PULL_SNAPSHOT, RECOVER_SANDBOX, INSPECT_SNAPSHOT_IN_REGISTRY, REMOVE_SNAPSHOT, UPDATE_SANDBOX_NETWORK_SETTINGS, SNAPSHOT_SANDBOX, FORK_SANDBOX, PAUSE_SANDBOX, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
# Builds the enum from string
|
|
@@ -20,10 +20,11 @@ module DaytonaApiClient
|
|
|
20
20
|
STOPPED = "stopped".freeze
|
|
21
21
|
RESIZED = "resized".freeze
|
|
22
22
|
ARCHIVED = "archived".freeze
|
|
23
|
+
PAUSED = "paused".freeze
|
|
23
24
|
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
24
25
|
|
|
25
26
|
def self.all_vars
|
|
26
|
-
@all_vars ||= [DESTROYED, STARTED, STOPPED, RESIZED, ARCHIVED, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
27
|
+
@all_vars ||= [DESTROYED, STARTED, STOPPED, RESIZED, ARCHIVED, PAUSED, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
27
28
|
end
|
|
28
29
|
|
|
29
30
|
# Builds the enum from string
|
|
@@ -34,10 +34,13 @@ module DaytonaApiClient
|
|
|
34
34
|
RESIZING = "resizing".freeze
|
|
35
35
|
SNAPSHOTTING = "snapshotting".freeze
|
|
36
36
|
FORKING = "forking".freeze
|
|
37
|
+
PAUSING = "pausing".freeze
|
|
38
|
+
PAUSED = "paused".freeze
|
|
39
|
+
RESUMING = "resuming".freeze
|
|
37
40
|
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
38
41
|
|
|
39
42
|
def self.all_vars
|
|
40
|
-
@all_vars ||= [CREATING, RESTORING, DESTROYED, DESTROYING, STARTED, STOPPED, STARTING, STOPPING, ERROR, BUILD_FAILED, PENDING_BUILD, BUILDING_SNAPSHOT, UNKNOWN, PULLING_SNAPSHOT, ARCHIVED, ARCHIVING, RESIZING, SNAPSHOTTING, FORKING, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
43
|
+
@all_vars ||= [CREATING, RESTORING, DESTROYED, DESTROYING, STARTED, STOPPED, STARTING, STOPPING, ERROR, BUILD_FAILED, PENDING_BUILD, BUILDING_SNAPSHOT, UNKNOWN, PULLING_SNAPSHOT, ARCHIVED, ARCHIVING, RESIZING, SNAPSHOTTING, FORKING, PAUSING, PAUSED, RESUMING, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
41
44
|
end
|
|
42
45
|
|
|
43
46
|
# Builds the enum from string
|
|
@@ -128,7 +128,7 @@ module DaytonaApiClient
|
|
|
128
128
|
def valid?
|
|
129
129
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
130
130
|
return false if @state.nil?
|
|
131
|
-
state_validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "unknown_default_open_api"])
|
|
131
|
+
state_validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "pausing", "paused", "resuming", "unknown_default_open_api"])
|
|
132
132
|
return false unless state_validator.valid?(@state)
|
|
133
133
|
true
|
|
134
134
|
end
|
|
@@ -136,7 +136,7 @@ module DaytonaApiClient
|
|
|
136
136
|
# Custom attribute writer method checking allowed values (enum).
|
|
137
137
|
# @param [Object] state Object to be assigned
|
|
138
138
|
def state=(state)
|
|
139
|
-
validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "unknown_default_open_api"])
|
|
139
|
+
validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "pausing", "paused", "resuming", "unknown_default_open_api"])
|
|
140
140
|
unless validator.valid?(state)
|
|
141
141
|
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
142
142
|
end
|