eryph-compute 0.1.1
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/CHANGELOG.md +47 -0
- data/LICENSE +21 -0
- data/README.md +144 -0
- data/eryph-clientruntime.gemspec +42 -0
- data/eryph-compute.gemspec +44 -0
- data/lib/eryph/clientruntime/client_credentials_lookup.rb +295 -0
- data/lib/eryph/clientruntime/config_store.rb +206 -0
- data/lib/eryph/clientruntime/config_stores_reader.rb +211 -0
- data/lib/eryph/clientruntime/endpoint_lookup.rb +226 -0
- data/lib/eryph/clientruntime/environment.rb +440 -0
- data/lib/eryph/clientruntime/local_identity_provider_info.rb +153 -0
- data/lib/eryph/clientruntime/token_provider.rb +275 -0
- data/lib/eryph/clientruntime/version.rb +6 -0
- data/lib/eryph/clientruntime.rb +79 -0
- data/lib/eryph/compute/client.rb +442 -0
- data/lib/eryph/compute/generated/Gemfile +9 -0
- data/lib/eryph/compute/generated/README.md +206 -0
- data/lib/eryph/compute/generated/Rakefile +10 -0
- data/lib/eryph/compute/generated/compute_client.gemspec +41 -0
- data/lib/eryph/compute/generated/docs/ApiVersion.md +20 -0
- data/lib/eryph/compute/generated/docs/ApiVersionResponse.md +18 -0
- data/lib/eryph/compute/generated/docs/Catlet.md +32 -0
- data/lib/eryph/compute/generated/docs/CatletConfigOperationResult.md +18 -0
- data/lib/eryph/compute/generated/docs/CatletConfigValidationResult.md +20 -0
- data/lib/eryph/compute/generated/docs/CatletConfiguration.md +18 -0
- data/lib/eryph/compute/generated/docs/CatletDrive.md +20 -0
- data/lib/eryph/compute/generated/docs/CatletDriveType.md +15 -0
- data/lib/eryph/compute/generated/docs/CatletList.md +18 -0
- data/lib/eryph/compute/generated/docs/CatletNetwork.md +30 -0
- data/lib/eryph/compute/generated/docs/CatletNetworkAdapter.md +20 -0
- data/lib/eryph/compute/generated/docs/CatletStatus.md +15 -0
- data/lib/eryph/compute/generated/docs/CatletStopMode.md +15 -0
- data/lib/eryph/compute/generated/docs/CatletsApi.md +863 -0
- data/lib/eryph/compute/generated/docs/DiskStatus.md +15 -0
- data/lib/eryph/compute/generated/docs/ExpandCatletConfigRequestBody.md +22 -0
- data/lib/eryph/compute/generated/docs/ExpandNewCatletConfigRequest.md +22 -0
- data/lib/eryph/compute/generated/docs/FloatingNetworkPort.md +26 -0
- data/lib/eryph/compute/generated/docs/Gene.md +30 -0
- data/lib/eryph/compute/generated/docs/GeneList.md +18 -0
- data/lib/eryph/compute/generated/docs/GeneType.md +15 -0
- data/lib/eryph/compute/generated/docs/GeneWithUsage.md +34 -0
- data/lib/eryph/compute/generated/docs/GenesApi.md +281 -0
- data/lib/eryph/compute/generated/docs/NewCatletRequest.md +20 -0
- data/lib/eryph/compute/generated/docs/NewProjectMemberBody.md +22 -0
- data/lib/eryph/compute/generated/docs/NewProjectRequest.md +20 -0
- data/lib/eryph/compute/generated/docs/NewVirtualDiskRequest.md +30 -0
- data/lib/eryph/compute/generated/docs/Operation.md +32 -0
- data/lib/eryph/compute/generated/docs/OperationList.md +18 -0
- data/lib/eryph/compute/generated/docs/OperationLogEntry.md +24 -0
- data/lib/eryph/compute/generated/docs/OperationResource.md +22 -0
- data/lib/eryph/compute/generated/docs/OperationResult.md +18 -0
- data/lib/eryph/compute/generated/docs/OperationStatus.md +15 -0
- data/lib/eryph/compute/generated/docs/OperationTask.md +30 -0
- data/lib/eryph/compute/generated/docs/OperationTaskReference.md +22 -0
- data/lib/eryph/compute/generated/docs/OperationTaskStatus.md +15 -0
- data/lib/eryph/compute/generated/docs/OperationsApi.md +157 -0
- data/lib/eryph/compute/generated/docs/PopulateCatletConfigVariablesRequest.md +20 -0
- data/lib/eryph/compute/generated/docs/ProblemDetails.md +26 -0
- data/lib/eryph/compute/generated/docs/Project.md +22 -0
- data/lib/eryph/compute/generated/docs/ProjectList.md +18 -0
- data/lib/eryph/compute/generated/docs/ProjectMemberRole.md +26 -0
- data/lib/eryph/compute/generated/docs/ProjectMemberRoleList.md +18 -0
- data/lib/eryph/compute/generated/docs/ProjectMembersApi.md +293 -0
- data/lib/eryph/compute/generated/docs/ProjectsApi.md +286 -0
- data/lib/eryph/compute/generated/docs/ResourceType.md +15 -0
- data/lib/eryph/compute/generated/docs/StopCatletRequestBody.md +18 -0
- data/lib/eryph/compute/generated/docs/TaskReferenceType.md +15 -0
- data/lib/eryph/compute/generated/docs/UpdateCatletRequestBody.md +20 -0
- data/lib/eryph/compute/generated/docs/UpdateProjectNetworksRequestBody.md +20 -0
- data/lib/eryph/compute/generated/docs/ValidateConfigRequest.md +18 -0
- data/lib/eryph/compute/generated/docs/ValidationIssue.md +20 -0
- data/lib/eryph/compute/generated/docs/VersionApi.md +69 -0
- data/lib/eryph/compute/generated/docs/VirtualDisk.md +42 -0
- data/lib/eryph/compute/generated/docs/VirtualDiskAttachedCatlet.md +20 -0
- data/lib/eryph/compute/generated/docs/VirtualDiskGeneInfo.md +22 -0
- data/lib/eryph/compute/generated/docs/VirtualDiskList.md +18 -0
- data/lib/eryph/compute/generated/docs/VirtualDisksApi.md +291 -0
- data/lib/eryph/compute/generated/docs/VirtualNetwork.md +28 -0
- data/lib/eryph/compute/generated/docs/VirtualNetworkConfiguration.md +18 -0
- data/lib/eryph/compute/generated/docs/VirtualNetworkList.md +18 -0
- data/lib/eryph/compute/generated/docs/VirtualNetworksApi.md +291 -0
- data/lib/eryph/compute/generated/git_push.sh +57 -0
- data/lib/eryph/compute/generated/lib/compute_client/api/catlets_api.rb +812 -0
- data/lib/eryph/compute/generated/lib/compute_client/api/genes_api.rb +262 -0
- data/lib/eryph/compute/generated/lib/compute_client/api/operations_api.rb +154 -0
- data/lib/eryph/compute/generated/lib/compute_client/api/project_members_api.rb +297 -0
- data/lib/eryph/compute/generated/lib/compute_client/api/projects_api.rb +269 -0
- data/lib/eryph/compute/generated/lib/compute_client/api/version_api.rb +79 -0
- data/lib/eryph/compute/generated/lib/compute_client/api/virtual_disks_api.rb +272 -0
- data/lib/eryph/compute/generated/lib/compute_client/api/virtual_networks_api.rb +282 -0
- data/lib/eryph/compute/generated/lib/compute_client/api_client.rb +437 -0
- data/lib/eryph/compute/generated/lib/compute_client/api_error.rb +58 -0
- data/lib/eryph/compute/generated/lib/compute_client/configuration.rb +392 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/api_version.rb +263 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/api_version_response.rb +237 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet.rb +400 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_config_operation_result.rb +234 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_config_validation_result.rb +251 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_configuration.rb +223 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_drive.rb +270 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_drive_type.rb +43 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_list.rb +239 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_network.rb +318 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_network_adapter.rb +247 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_status.rb +43 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/catlet_stop_mode.rb +41 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/disk_status.rb +40 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/expand_catlet_config_request_body.rb +243 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/expand_new_catlet_config_request.rb +243 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/floating_network_port.rb +313 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/gene.rb +415 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/gene_list.rb +239 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/gene_type.rb +41 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/gene_with_usage.rb +439 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/new_catlet_request.rb +233 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/new_project_member_body.rb +273 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/new_project_request.rb +247 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/new_virtual_disk_request.rb +345 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/operation.rb +352 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/operation_list.rb +239 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/operation_log_entry.rb +299 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/operation_resource.rb +311 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/operation_result.rb +242 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/operation_status.rb +42 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/operation_task.rb +366 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/operation_task_reference.rb +311 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/operation_task_status.rb +42 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/populate_catlet_config_variables_request.rb +233 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/problem_details.rb +261 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/project.rb +289 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/project_list.rb +239 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/project_member_role.rb +341 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/project_member_role_list.rb +239 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/resource_type.rb +42 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/stop_catlet_request_body.rb +259 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/task_reference_type.rb +40 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/update_catlet_request_body.rb +233 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/update_project_networks_request_body.rb +233 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/validate_config_request.rb +223 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/validation_issue.rb +249 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/virtual_disk.rb +479 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/virtual_disk_attached_catlet.rb +285 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/virtual_disk_gene_info.rb +289 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/virtual_disk_list.rb +239 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/virtual_network.rb +351 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/virtual_network_configuration.rb +223 -0
- data/lib/eryph/compute/generated/lib/compute_client/models/virtual_network_list.rb +239 -0
- data/lib/eryph/compute/generated/lib/compute_client/version.rb +15 -0
- data/lib/eryph/compute/generated/lib/compute_client.rb +101 -0
- data/lib/eryph/compute/generated/spec/api/catlets_api_spec.rb +182 -0
- data/lib/eryph/compute/generated/spec/api/genes_api_spec.rb +81 -0
- data/lib/eryph/compute/generated/spec/api/operations_api_spec.rb +62 -0
- data/lib/eryph/compute/generated/spec/api/project_members_api_spec.rb +86 -0
- data/lib/eryph/compute/generated/spec/api/projects_api_spec.rb +82 -0
- data/lib/eryph/compute/generated/spec/api/version_api_spec.rb +46 -0
- data/lib/eryph/compute/generated/spec/api/virtual_disks_api_spec.rb +83 -0
- data/lib/eryph/compute/generated/spec/api/virtual_networks_api_spec.rb +84 -0
- data/lib/eryph/compute/generated/spec/models/api_version_response_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/api_version_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/catlet_config_operation_result_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/catlet_config_validation_result_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/catlet_configuration_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/catlet_drive_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/catlet_drive_type_spec.rb +30 -0
- data/lib/eryph/compute/generated/spec/models/catlet_list_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/catlet_network_adapter_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/catlet_network_spec.rb +72 -0
- data/lib/eryph/compute/generated/spec/models/catlet_spec.rb +78 -0
- data/lib/eryph/compute/generated/spec/models/catlet_status_spec.rb +30 -0
- data/lib/eryph/compute/generated/spec/models/catlet_stop_mode_spec.rb +30 -0
- data/lib/eryph/compute/generated/spec/models/disk_status_spec.rb +30 -0
- data/lib/eryph/compute/generated/spec/models/expand_catlet_config_request_body_spec.rb +48 -0
- data/lib/eryph/compute/generated/spec/models/expand_new_catlet_config_request_spec.rb +48 -0
- data/lib/eryph/compute/generated/spec/models/floating_network_port_spec.rb +60 -0
- data/lib/eryph/compute/generated/spec/models/gene_list_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/gene_spec.rb +72 -0
- data/lib/eryph/compute/generated/spec/models/gene_type_spec.rb +30 -0
- data/lib/eryph/compute/generated/spec/models/gene_with_usage_spec.rb +84 -0
- data/lib/eryph/compute/generated/spec/models/new_catlet_request_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/new_project_member_body_spec.rb +48 -0
- data/lib/eryph/compute/generated/spec/models/new_project_request_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/new_virtual_disk_request_spec.rb +72 -0
- data/lib/eryph/compute/generated/spec/models/operation_list_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/operation_log_entry_spec.rb +54 -0
- data/lib/eryph/compute/generated/spec/models/operation_resource_spec.rb +48 -0
- data/lib/eryph/compute/generated/spec/models/operation_result_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/operation_spec.rb +78 -0
- data/lib/eryph/compute/generated/spec/models/operation_status_spec.rb +30 -0
- data/lib/eryph/compute/generated/spec/models/operation_task_reference_spec.rb +48 -0
- data/lib/eryph/compute/generated/spec/models/operation_task_spec.rb +72 -0
- data/lib/eryph/compute/generated/spec/models/operation_task_status_spec.rb +30 -0
- data/lib/eryph/compute/generated/spec/models/populate_catlet_config_variables_request_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/problem_details_spec.rb +60 -0
- data/lib/eryph/compute/generated/spec/models/project_list_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/project_member_role_list_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/project_member_role_spec.rb +60 -0
- data/lib/eryph/compute/generated/spec/models/project_spec.rb +48 -0
- data/lib/eryph/compute/generated/spec/models/resource_type_spec.rb +30 -0
- data/lib/eryph/compute/generated/spec/models/stop_catlet_request_body_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/task_reference_type_spec.rb +30 -0
- data/lib/eryph/compute/generated/spec/models/update_catlet_request_body_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/update_project_networks_request_body_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/validate_config_request_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/validation_issue_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/virtual_disk_attached_catlet_spec.rb +42 -0
- data/lib/eryph/compute/generated/spec/models/virtual_disk_gene_info_spec.rb +48 -0
- data/lib/eryph/compute/generated/spec/models/virtual_disk_list_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/virtual_disk_spec.rb +108 -0
- data/lib/eryph/compute/generated/spec/models/virtual_network_configuration_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/virtual_network_list_spec.rb +36 -0
- data/lib/eryph/compute/generated/spec/models/virtual_network_spec.rb +66 -0
- data/lib/eryph/compute/generated/spec/spec_helper.rb +111 -0
- data/lib/eryph/compute/generated.rb +137 -0
- data/lib/eryph/compute/operation_result.rb +255 -0
- data/lib/eryph/compute/operation_tracker.rb +247 -0
- data/lib/eryph/compute/problem_details_error.rb +139 -0
- data/lib/eryph/compute/version.rb +6 -0
- data/lib/eryph/compute.rb +40 -0
- data/lib/eryph/version.rb +4 -0
- data/lib/eryph.rb +68 -0
- metadata +329 -0
@@ -0,0 +1,111 @@
|
|
1
|
+
=begin
|
2
|
+
#Compute Api
|
3
|
+
|
4
|
+
#Compute Api
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@dbosoft.eu
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.14.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# load the gem
|
14
|
+
require 'compute_client'
|
15
|
+
|
16
|
+
# The following was generated by the `rspec --init` command. Conventionally, all
|
17
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
18
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
19
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
20
|
+
# files.
|
21
|
+
#
|
22
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
23
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
24
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
25
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
26
|
+
# a separate helper file that requires the additional dependencies and performs
|
27
|
+
# the additional setup, and require it from the spec files that actually need
|
28
|
+
# it.
|
29
|
+
#
|
30
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
31
|
+
# users commonly want.
|
32
|
+
#
|
33
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
34
|
+
RSpec.configure do |config|
|
35
|
+
# rspec-expectations config goes here. You can use an alternate
|
36
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
37
|
+
# assertions if you prefer.
|
38
|
+
config.expect_with :rspec do |expectations|
|
39
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
40
|
+
# and `failure_message` of custom matchers include text for helper methods
|
41
|
+
# defined using `chain`, e.g.:
|
42
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
43
|
+
# # => "be bigger than 2 and smaller than 4"
|
44
|
+
# ...rather than:
|
45
|
+
# # => "be bigger than 2"
|
46
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
47
|
+
end
|
48
|
+
|
49
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
50
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
51
|
+
config.mock_with :rspec do |mocks|
|
52
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
53
|
+
# a real object. This is generally recommended, and will default to
|
54
|
+
# `true` in RSpec 4.
|
55
|
+
mocks.verify_partial_doubles = true
|
56
|
+
end
|
57
|
+
|
58
|
+
# The settings below are suggested to provide a good initial experience
|
59
|
+
# with RSpec, but feel free to customize to your heart's content.
|
60
|
+
=begin
|
61
|
+
# These two settings work together to allow you to limit a spec run
|
62
|
+
# to individual examples or groups you care about by tagging them with
|
63
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
64
|
+
# get run.
|
65
|
+
config.filter_run :focus
|
66
|
+
config.run_all_when_everything_filtered = true
|
67
|
+
|
68
|
+
# Allows RSpec to persist some state between runs in order to support
|
69
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
70
|
+
# you configure your source control system to ignore this file.
|
71
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
72
|
+
|
73
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
74
|
+
# recommended. For more details, see:
|
75
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
76
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
77
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
78
|
+
config.disable_monkey_patching!
|
79
|
+
|
80
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
81
|
+
# be too noisy due to issues in dependencies.
|
82
|
+
config.warnings = true
|
83
|
+
|
84
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
85
|
+
# file, and it's useful to allow more verbose output when running an
|
86
|
+
# individual spec file.
|
87
|
+
if config.files_to_run.one?
|
88
|
+
# Use the documentation formatter for detailed output,
|
89
|
+
# unless a formatter has already been configured
|
90
|
+
# (e.g. via a command-line flag).
|
91
|
+
config.default_formatter = 'doc'
|
92
|
+
end
|
93
|
+
|
94
|
+
# Print the 10 slowest examples and example groups at the
|
95
|
+
# end of the spec run, to help surface which specs are running
|
96
|
+
# particularly slow.
|
97
|
+
config.profile_examples = 10
|
98
|
+
|
99
|
+
# Run specs in random order to surface order dependencies. If you find an
|
100
|
+
# order dependency and want to debug it, you can fix the order by providing
|
101
|
+
# the seed, which is printed after each run.
|
102
|
+
# --seed 1234
|
103
|
+
config.order = :random
|
104
|
+
|
105
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
106
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
107
|
+
# test failures related to randomization by passing the same `--seed` value
|
108
|
+
# as the one that triggered the failure.
|
109
|
+
Kernel.srand config.seed
|
110
|
+
=end
|
111
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
2
|
+
# Do not edit this file manually - it will be overwritten during regeneration
|
3
|
+
|
4
|
+
# Add the generated lib directory to the load path
|
5
|
+
# Try multiple path resolution strategies for different contexts (development vs gem)
|
6
|
+
generated_lib_paths = [
|
7
|
+
File.expand_path('generated/lib', __dir__), # Development path
|
8
|
+
File.expand_path('generated/lib', File.dirname(__FILE__)), # From current file directory
|
9
|
+
File.expand_path('../compute/generated/lib', __dir__), # Alternative relative path
|
10
|
+
File.expand_path('../../../compute/generated/lib', __dir__), # From gem context
|
11
|
+
]
|
12
|
+
|
13
|
+
# Debug: print attempted paths in development mode
|
14
|
+
if ENV['ERYPH_DEBUG'] || $DEBUG
|
15
|
+
puts 'DEBUG: Attempting to find generated client in:'
|
16
|
+
generated_lib_paths.each_with_index do |path, i|
|
17
|
+
exists = File.exist?(path)
|
18
|
+
puts " #{i + 1}. #{path} (exists: #{exists})"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
generated_lib_path = generated_lib_paths.find { |path| File.exist?(path) }
|
23
|
+
|
24
|
+
if generated_lib_path
|
25
|
+
$LOAD_PATH.unshift(generated_lib_path) unless $LOAD_PATH.include?(generated_lib_path)
|
26
|
+
|
27
|
+
begin
|
28
|
+
require 'compute_client'
|
29
|
+
rescue LoadError => e
|
30
|
+
# More detailed error in debug mode
|
31
|
+
error_msg = "Failed to load compute_client from #{generated_lib_path}: #{e.message}"
|
32
|
+
if ENV['ERYPH_DEBUG'] || $DEBUG
|
33
|
+
error_msg += "\nLoad path: #{$LOAD_PATH.join(':')}"
|
34
|
+
if File.exist?(generated_lib_path)
|
35
|
+
error_msg += "\nFiles in #{generated_lib_path}: #{Dir.entries(generated_lib_path).join(', ')}"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
raise LoadError, "#{error_msg}. Please run generate.rb to regenerate the client."
|
39
|
+
end
|
40
|
+
else
|
41
|
+
raise LoadError,
|
42
|
+
'Generated compute client directory not found in any of: ' \
|
43
|
+
"#{generated_lib_paths.join(', ')}. Please run generate.rb to regenerate the client."
|
44
|
+
end
|
45
|
+
|
46
|
+
module Eryph
|
47
|
+
# Create ComputeClient namespace that mirrors the generated ComputeClient module
|
48
|
+
module ComputeClient
|
49
|
+
# Re-export all core classes
|
50
|
+
ApiClient = ::ComputeClient::ApiClient
|
51
|
+
Configuration = ::ComputeClient::Configuration
|
52
|
+
ApiError = ::ComputeClient::ApiError
|
53
|
+
|
54
|
+
# Re-export all API endpoint classes
|
55
|
+
CatletsApi = ::ComputeClient::CatletsApi
|
56
|
+
GenesApi = ::ComputeClient::GenesApi
|
57
|
+
OperationsApi = ::ComputeClient::OperationsApi
|
58
|
+
ProjectMembersApi = ::ComputeClient::ProjectMembersApi
|
59
|
+
ProjectsApi = ::ComputeClient::ProjectsApi
|
60
|
+
VersionApi = ::ComputeClient::VersionApi
|
61
|
+
VirtualDisksApi = ::ComputeClient::VirtualDisksApi
|
62
|
+
VirtualNetworksApi = ::ComputeClient::VirtualNetworksApi
|
63
|
+
|
64
|
+
# Re-export all model classes
|
65
|
+
ApiVersion = ::ComputeClient::ApiVersion
|
66
|
+
ApiVersionResponse = ::ComputeClient::ApiVersionResponse
|
67
|
+
Catlet = ::ComputeClient::Catlet
|
68
|
+
CatletConfigOperationResult = ::ComputeClient::CatletConfigOperationResult
|
69
|
+
CatletConfigValidationResult = ::ComputeClient::CatletConfigValidationResult
|
70
|
+
CatletConfiguration = ::ComputeClient::CatletConfiguration
|
71
|
+
CatletDrive = ::ComputeClient::CatletDrive
|
72
|
+
CatletDriveType = ::ComputeClient::CatletDriveType
|
73
|
+
CatletList = ::ComputeClient::CatletList
|
74
|
+
CatletNetwork = ::ComputeClient::CatletNetwork
|
75
|
+
CatletNetworkAdapter = ::ComputeClient::CatletNetworkAdapter
|
76
|
+
CatletStatus = ::ComputeClient::CatletStatus
|
77
|
+
CatletStopMode = ::ComputeClient::CatletStopMode
|
78
|
+
DiskStatus = ::ComputeClient::DiskStatus
|
79
|
+
ExpandCatletConfigRequestBody = ::ComputeClient::ExpandCatletConfigRequestBody
|
80
|
+
ExpandNewCatletConfigRequest = ::ComputeClient::ExpandNewCatletConfigRequest
|
81
|
+
FloatingNetworkPort = ::ComputeClient::FloatingNetworkPort
|
82
|
+
Gene = ::ComputeClient::Gene
|
83
|
+
GeneList = ::ComputeClient::GeneList
|
84
|
+
GeneType = ::ComputeClient::GeneType
|
85
|
+
GeneWithUsage = ::ComputeClient::GeneWithUsage
|
86
|
+
NewCatletRequest = ::ComputeClient::NewCatletRequest
|
87
|
+
NewProjectMemberBody = ::ComputeClient::NewProjectMemberBody
|
88
|
+
NewProjectRequest = ::ComputeClient::NewProjectRequest
|
89
|
+
NewVirtualDiskRequest = ::ComputeClient::NewVirtualDiskRequest
|
90
|
+
Operation = ::ComputeClient::Operation
|
91
|
+
OperationList = ::ComputeClient::OperationList
|
92
|
+
OperationLogEntry = ::ComputeClient::OperationLogEntry
|
93
|
+
OperationResource = ::ComputeClient::OperationResource
|
94
|
+
OperationResult = ::ComputeClient::OperationResult
|
95
|
+
OperationStatus = ::ComputeClient::OperationStatus
|
96
|
+
OperationTask = ::ComputeClient::OperationTask
|
97
|
+
OperationTaskReference = ::ComputeClient::OperationTaskReference
|
98
|
+
OperationTaskStatus = ::ComputeClient::OperationTaskStatus
|
99
|
+
PopulateCatletConfigVariablesRequest = ::ComputeClient::PopulateCatletConfigVariablesRequest
|
100
|
+
ProblemDetails = ::ComputeClient::ProblemDetails
|
101
|
+
Project = ::ComputeClient::Project
|
102
|
+
ProjectList = ::ComputeClient::ProjectList
|
103
|
+
ProjectMemberRole = ::ComputeClient::ProjectMemberRole
|
104
|
+
ProjectMemberRoleList = ::ComputeClient::ProjectMemberRoleList
|
105
|
+
ResourceType = ::ComputeClient::ResourceType
|
106
|
+
StopCatletRequestBody = ::ComputeClient::StopCatletRequestBody
|
107
|
+
TaskReferenceType = ::ComputeClient::TaskReferenceType
|
108
|
+
UpdateCatletRequestBody = ::ComputeClient::UpdateCatletRequestBody
|
109
|
+
UpdateProjectNetworksRequestBody = ::ComputeClient::UpdateProjectNetworksRequestBody
|
110
|
+
ValidateConfigRequest = ::ComputeClient::ValidateConfigRequest
|
111
|
+
ValidationIssue = ::ComputeClient::ValidationIssue
|
112
|
+
VirtualDisk = ::ComputeClient::VirtualDisk
|
113
|
+
VirtualDiskAttachedCatlet = ::ComputeClient::VirtualDiskAttachedCatlet
|
114
|
+
VirtualDiskGeneInfo = ::ComputeClient::VirtualDiskGeneInfo
|
115
|
+
VirtualDiskList = ::ComputeClient::VirtualDiskList
|
116
|
+
VirtualNetwork = ::ComputeClient::VirtualNetwork
|
117
|
+
VirtualNetworkConfiguration = ::ComputeClient::VirtualNetworkConfiguration
|
118
|
+
VirtualNetworkList = ::ComputeClient::VirtualNetworkList
|
119
|
+
end
|
120
|
+
|
121
|
+
# Keep the old Generated namespace for backward compatibility
|
122
|
+
module Generated
|
123
|
+
# Alias the main classes for backward compatibility
|
124
|
+
NewCatletRequest = ::ComputeClient::NewCatletRequest
|
125
|
+
StopCatletRequestBody = ::ComputeClient::StopCatletRequestBody
|
126
|
+
CatletStopMode = ::ComputeClient::CatletStopMode
|
127
|
+
ApiClient = ::ComputeClient::ApiClient
|
128
|
+
Configuration = ::ComputeClient::Configuration
|
129
|
+
end
|
130
|
+
|
131
|
+
module Compute
|
132
|
+
module Generated
|
133
|
+
# Re-export the generated client classes for easier access
|
134
|
+
Client = ::ComputeClient
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
@@ -0,0 +1,255 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module Eryph
|
5
|
+
module Compute
|
6
|
+
# Typed result for CatletConfig operations
|
7
|
+
CatletConfigResult = Struct.new(:result_type, :configuration, keyword_init: true) do
|
8
|
+
def self.from_raw_json(raw_json)
|
9
|
+
parsed = JSON.parse(raw_json)
|
10
|
+
new(
|
11
|
+
result_type: 'CatletConfig',
|
12
|
+
configuration: parsed.dig('result', 'configuration')
|
13
|
+
)
|
14
|
+
rescue JSON::ParserError
|
15
|
+
new(result_type: 'CatletConfig', configuration: nil)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Convenience methods
|
19
|
+
def configuration?
|
20
|
+
!configuration.nil?
|
21
|
+
end
|
22
|
+
|
23
|
+
def name
|
24
|
+
configuration['name'] if configuration
|
25
|
+
end
|
26
|
+
|
27
|
+
def parent
|
28
|
+
configuration['parent'] if configuration
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Wrapper class for operation results that provides convenient access
|
33
|
+
# to operation state and resources
|
34
|
+
class OperationResult
|
35
|
+
attr_reader :operation, :client
|
36
|
+
|
37
|
+
def initialize(operation, client, raw_operation_json = nil)
|
38
|
+
@operation = operation
|
39
|
+
@client = client
|
40
|
+
@fetched_resources = {}
|
41
|
+
@cached_collections = {}
|
42
|
+
@raw_operation_json = raw_operation_json # Cache the raw JSON if provided
|
43
|
+
end
|
44
|
+
|
45
|
+
def id
|
46
|
+
@operation.id
|
47
|
+
end
|
48
|
+
|
49
|
+
def status
|
50
|
+
@operation.status
|
51
|
+
end
|
52
|
+
|
53
|
+
def completed?
|
54
|
+
@operation.status == 'Completed'
|
55
|
+
end
|
56
|
+
|
57
|
+
def failed?
|
58
|
+
@operation.status == 'Failed'
|
59
|
+
end
|
60
|
+
|
61
|
+
def running?
|
62
|
+
@operation.status == 'Running'
|
63
|
+
end
|
64
|
+
|
65
|
+
def queued?
|
66
|
+
@operation.status == 'Queued'
|
67
|
+
end
|
68
|
+
|
69
|
+
def status_message
|
70
|
+
@operation.status_message
|
71
|
+
end
|
72
|
+
|
73
|
+
# Get the raw resource references from the operation
|
74
|
+
def resources
|
75
|
+
@operation.resources || []
|
76
|
+
end
|
77
|
+
|
78
|
+
# Get the raw tasks from the operation
|
79
|
+
def tasks
|
80
|
+
@operation.tasks || []
|
81
|
+
end
|
82
|
+
|
83
|
+
# Get the raw log entries from the operation
|
84
|
+
def log_entries
|
85
|
+
@operation.log_entries || []
|
86
|
+
end
|
87
|
+
|
88
|
+
# Get the projects from the operation
|
89
|
+
def projects
|
90
|
+
@operation.projects || []
|
91
|
+
end
|
92
|
+
|
93
|
+
# Get the raw operation result object
|
94
|
+
# @return [Object, nil] the raw result object from the operation
|
95
|
+
def result
|
96
|
+
@operation.result
|
97
|
+
end
|
98
|
+
|
99
|
+
# Check if the operation has a result
|
100
|
+
# @return [Boolean] true if the operation has a result
|
101
|
+
def result?
|
102
|
+
!@operation.result.nil?
|
103
|
+
end
|
104
|
+
|
105
|
+
# Get the result type discriminator
|
106
|
+
# @return [String, nil] the result type or nil if no result
|
107
|
+
def result_type
|
108
|
+
return nil unless result?
|
109
|
+
|
110
|
+
@operation.result.result_type
|
111
|
+
end
|
112
|
+
|
113
|
+
# Get typed result based on result_type
|
114
|
+
# @return [Struct, nil] typed result or nil
|
115
|
+
def typed_result
|
116
|
+
return @typed_result if defined?(@typed_result)
|
117
|
+
|
118
|
+
return nil unless result?
|
119
|
+
|
120
|
+
@typed_result = case result_type
|
121
|
+
when 'CatletConfig'
|
122
|
+
if @raw_operation_json
|
123
|
+
@client.logger.info 'Creating typed CatletConfigResult from raw JSON'
|
124
|
+
CatletConfigResult.from_raw_json(@raw_operation_json)
|
125
|
+
else
|
126
|
+
@client.logger.warn 'No raw JSON available for typed result creation'
|
127
|
+
CatletConfigResult.new(result_type: 'CatletConfig', configuration: nil)
|
128
|
+
end
|
129
|
+
else
|
130
|
+
@client.logger.warn "Unknown operation result type: #{result_type}" if result_type
|
131
|
+
nil
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# Fetch actual resource objects (lazy loading with caching)
|
136
|
+
# @return [Array] array of fetched resource objects
|
137
|
+
def fetch_resources
|
138
|
+
resources.map do |resource|
|
139
|
+
fetch_resource(resource)
|
140
|
+
end.compact
|
141
|
+
end
|
142
|
+
|
143
|
+
# Fetch a specific resource by its reference
|
144
|
+
# @param resource_ref [Object] the resource reference from operation.resources
|
145
|
+
# @return [Object, nil] the fetched resource object or nil if failed
|
146
|
+
def fetch_resource(resource_ref)
|
147
|
+
cache_key = "#{resource_ref.resource_type}:#{resource_ref.resource_id}"
|
148
|
+
|
149
|
+
return @fetched_resources[cache_key] if @fetched_resources.key?(cache_key)
|
150
|
+
|
151
|
+
@fetched_resources[cache_key] = begin
|
152
|
+
case resource_ref.resource_type
|
153
|
+
when 'Catlet'
|
154
|
+
@client.catlets.catlets_get(resource_ref.resource_id)
|
155
|
+
when 'VirtualDisk'
|
156
|
+
@client.virtual_disks.virtual_disks_get(resource_ref.resource_id)
|
157
|
+
when 'VirtualNetwork'
|
158
|
+
@client.virtual_networks.virtual_networks_get(resource_ref.resource_id)
|
159
|
+
else
|
160
|
+
@client.logger.warn "Unknown resource type: #{resource_ref.resource_type}"
|
161
|
+
nil
|
162
|
+
end
|
163
|
+
rescue StandardError => e
|
164
|
+
@client.logger.error "Error fetching #{resource_ref.resource_type.downcase} " \
|
165
|
+
"#{resource_ref.resource_id}: #{e.message}"
|
166
|
+
nil
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Find raw resource references by type
|
171
|
+
# @param type [String] the resource type to filter by
|
172
|
+
# @return [Array] array of resource references
|
173
|
+
def find_resources_by_type(type)
|
174
|
+
resources.select { |r| r.resource_type == type }
|
175
|
+
end
|
176
|
+
|
177
|
+
# Get all catlet objects created by this operation
|
178
|
+
# @return [Array] array of catlet objects
|
179
|
+
def catlets
|
180
|
+
@cached_collections[:catlets] ||= find_resources_by_type('Catlet').map { |r| fetch_resource(r) }.compact
|
181
|
+
end
|
182
|
+
|
183
|
+
# Get all virtual disk objects created by this operation
|
184
|
+
# @return [Array] array of virtual disk objects
|
185
|
+
def virtual_disks
|
186
|
+
@cached_collections[:virtual_disks] ||= find_resources_by_type('VirtualDisk').map do |r|
|
187
|
+
fetch_resource(r)
|
188
|
+
end.compact
|
189
|
+
end
|
190
|
+
|
191
|
+
# Get all virtual network objects created by this operation
|
192
|
+
# @return [Array] array of virtual network objects
|
193
|
+
def virtual_networks
|
194
|
+
@cached_collections[:virtual_networks] ||= find_resources_by_type('VirtualNetwork').map do |r|
|
195
|
+
fetch_resource(r)
|
196
|
+
end.compact
|
197
|
+
end
|
198
|
+
|
199
|
+
|
200
|
+
# Get the first catlet if this operation created one
|
201
|
+
# @return [Object, nil] the first catlet or nil
|
202
|
+
def catlet
|
203
|
+
catlets.first
|
204
|
+
end
|
205
|
+
|
206
|
+
# Get the first virtual disk if this operation created one
|
207
|
+
# @return [Object, nil] the first virtual disk or nil
|
208
|
+
def virtual_disk
|
209
|
+
virtual_disks.first
|
210
|
+
end
|
211
|
+
|
212
|
+
# Get the first virtual network if this operation created one
|
213
|
+
# @return [Object, nil] the first virtual network or nil
|
214
|
+
def virtual_network
|
215
|
+
virtual_networks.first
|
216
|
+
end
|
217
|
+
|
218
|
+
# Get the first project from the operation
|
219
|
+
# @return [Object, nil] the first project or nil
|
220
|
+
def project
|
221
|
+
projects.first
|
222
|
+
end
|
223
|
+
|
224
|
+
# Get operation summary with counts and resource type breakdown
|
225
|
+
# @return [Hash] summary hash with operation details
|
226
|
+
def summary
|
227
|
+
resource_counts = Hash.new(0)
|
228
|
+
resources.each do |resource|
|
229
|
+
resource_counts[resource.resource_type] += 1
|
230
|
+
end
|
231
|
+
|
232
|
+
{
|
233
|
+
operation_id: id,
|
234
|
+
status: status,
|
235
|
+
status_message: status_message,
|
236
|
+
log_entries_count: log_entries.size,
|
237
|
+
tasks_count: tasks.size,
|
238
|
+
resources_count: resources.size,
|
239
|
+
resource_types: resource_counts,
|
240
|
+
has_result: result?,
|
241
|
+
result_type: result_type,
|
242
|
+
}
|
243
|
+
end
|
244
|
+
|
245
|
+
# String representation
|
246
|
+
def to_s
|
247
|
+
"#<OperationResult id=#{id} status=#{status} resources=#{resources.size}>"
|
248
|
+
end
|
249
|
+
|
250
|
+
def inspect
|
251
|
+
to_s
|
252
|
+
end
|
253
|
+
end
|
254
|
+
end
|
255
|
+
end
|