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.
Files changed (222) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +47 -0
  3. data/LICENSE +21 -0
  4. data/README.md +144 -0
  5. data/eryph-clientruntime.gemspec +42 -0
  6. data/eryph-compute.gemspec +44 -0
  7. data/lib/eryph/clientruntime/client_credentials_lookup.rb +295 -0
  8. data/lib/eryph/clientruntime/config_store.rb +206 -0
  9. data/lib/eryph/clientruntime/config_stores_reader.rb +211 -0
  10. data/lib/eryph/clientruntime/endpoint_lookup.rb +226 -0
  11. data/lib/eryph/clientruntime/environment.rb +440 -0
  12. data/lib/eryph/clientruntime/local_identity_provider_info.rb +153 -0
  13. data/lib/eryph/clientruntime/token_provider.rb +275 -0
  14. data/lib/eryph/clientruntime/version.rb +6 -0
  15. data/lib/eryph/clientruntime.rb +79 -0
  16. data/lib/eryph/compute/client.rb +442 -0
  17. data/lib/eryph/compute/generated/Gemfile +9 -0
  18. data/lib/eryph/compute/generated/README.md +206 -0
  19. data/lib/eryph/compute/generated/Rakefile +10 -0
  20. data/lib/eryph/compute/generated/compute_client.gemspec +41 -0
  21. data/lib/eryph/compute/generated/docs/ApiVersion.md +20 -0
  22. data/lib/eryph/compute/generated/docs/ApiVersionResponse.md +18 -0
  23. data/lib/eryph/compute/generated/docs/Catlet.md +32 -0
  24. data/lib/eryph/compute/generated/docs/CatletConfigOperationResult.md +18 -0
  25. data/lib/eryph/compute/generated/docs/CatletConfigValidationResult.md +20 -0
  26. data/lib/eryph/compute/generated/docs/CatletConfiguration.md +18 -0
  27. data/lib/eryph/compute/generated/docs/CatletDrive.md +20 -0
  28. data/lib/eryph/compute/generated/docs/CatletDriveType.md +15 -0
  29. data/lib/eryph/compute/generated/docs/CatletList.md +18 -0
  30. data/lib/eryph/compute/generated/docs/CatletNetwork.md +30 -0
  31. data/lib/eryph/compute/generated/docs/CatletNetworkAdapter.md +20 -0
  32. data/lib/eryph/compute/generated/docs/CatletStatus.md +15 -0
  33. data/lib/eryph/compute/generated/docs/CatletStopMode.md +15 -0
  34. data/lib/eryph/compute/generated/docs/CatletsApi.md +863 -0
  35. data/lib/eryph/compute/generated/docs/DiskStatus.md +15 -0
  36. data/lib/eryph/compute/generated/docs/ExpandCatletConfigRequestBody.md +22 -0
  37. data/lib/eryph/compute/generated/docs/ExpandNewCatletConfigRequest.md +22 -0
  38. data/lib/eryph/compute/generated/docs/FloatingNetworkPort.md +26 -0
  39. data/lib/eryph/compute/generated/docs/Gene.md +30 -0
  40. data/lib/eryph/compute/generated/docs/GeneList.md +18 -0
  41. data/lib/eryph/compute/generated/docs/GeneType.md +15 -0
  42. data/lib/eryph/compute/generated/docs/GeneWithUsage.md +34 -0
  43. data/lib/eryph/compute/generated/docs/GenesApi.md +281 -0
  44. data/lib/eryph/compute/generated/docs/NewCatletRequest.md +20 -0
  45. data/lib/eryph/compute/generated/docs/NewProjectMemberBody.md +22 -0
  46. data/lib/eryph/compute/generated/docs/NewProjectRequest.md +20 -0
  47. data/lib/eryph/compute/generated/docs/NewVirtualDiskRequest.md +30 -0
  48. data/lib/eryph/compute/generated/docs/Operation.md +32 -0
  49. data/lib/eryph/compute/generated/docs/OperationList.md +18 -0
  50. data/lib/eryph/compute/generated/docs/OperationLogEntry.md +24 -0
  51. data/lib/eryph/compute/generated/docs/OperationResource.md +22 -0
  52. data/lib/eryph/compute/generated/docs/OperationResult.md +18 -0
  53. data/lib/eryph/compute/generated/docs/OperationStatus.md +15 -0
  54. data/lib/eryph/compute/generated/docs/OperationTask.md +30 -0
  55. data/lib/eryph/compute/generated/docs/OperationTaskReference.md +22 -0
  56. data/lib/eryph/compute/generated/docs/OperationTaskStatus.md +15 -0
  57. data/lib/eryph/compute/generated/docs/OperationsApi.md +157 -0
  58. data/lib/eryph/compute/generated/docs/PopulateCatletConfigVariablesRequest.md +20 -0
  59. data/lib/eryph/compute/generated/docs/ProblemDetails.md +26 -0
  60. data/lib/eryph/compute/generated/docs/Project.md +22 -0
  61. data/lib/eryph/compute/generated/docs/ProjectList.md +18 -0
  62. data/lib/eryph/compute/generated/docs/ProjectMemberRole.md +26 -0
  63. data/lib/eryph/compute/generated/docs/ProjectMemberRoleList.md +18 -0
  64. data/lib/eryph/compute/generated/docs/ProjectMembersApi.md +293 -0
  65. data/lib/eryph/compute/generated/docs/ProjectsApi.md +286 -0
  66. data/lib/eryph/compute/generated/docs/ResourceType.md +15 -0
  67. data/lib/eryph/compute/generated/docs/StopCatletRequestBody.md +18 -0
  68. data/lib/eryph/compute/generated/docs/TaskReferenceType.md +15 -0
  69. data/lib/eryph/compute/generated/docs/UpdateCatletRequestBody.md +20 -0
  70. data/lib/eryph/compute/generated/docs/UpdateProjectNetworksRequestBody.md +20 -0
  71. data/lib/eryph/compute/generated/docs/ValidateConfigRequest.md +18 -0
  72. data/lib/eryph/compute/generated/docs/ValidationIssue.md +20 -0
  73. data/lib/eryph/compute/generated/docs/VersionApi.md +69 -0
  74. data/lib/eryph/compute/generated/docs/VirtualDisk.md +42 -0
  75. data/lib/eryph/compute/generated/docs/VirtualDiskAttachedCatlet.md +20 -0
  76. data/lib/eryph/compute/generated/docs/VirtualDiskGeneInfo.md +22 -0
  77. data/lib/eryph/compute/generated/docs/VirtualDiskList.md +18 -0
  78. data/lib/eryph/compute/generated/docs/VirtualDisksApi.md +291 -0
  79. data/lib/eryph/compute/generated/docs/VirtualNetwork.md +28 -0
  80. data/lib/eryph/compute/generated/docs/VirtualNetworkConfiguration.md +18 -0
  81. data/lib/eryph/compute/generated/docs/VirtualNetworkList.md +18 -0
  82. data/lib/eryph/compute/generated/docs/VirtualNetworksApi.md +291 -0
  83. data/lib/eryph/compute/generated/git_push.sh +57 -0
  84. data/lib/eryph/compute/generated/lib/compute_client/api/catlets_api.rb +812 -0
  85. data/lib/eryph/compute/generated/lib/compute_client/api/genes_api.rb +262 -0
  86. data/lib/eryph/compute/generated/lib/compute_client/api/operations_api.rb +154 -0
  87. data/lib/eryph/compute/generated/lib/compute_client/api/project_members_api.rb +297 -0
  88. data/lib/eryph/compute/generated/lib/compute_client/api/projects_api.rb +269 -0
  89. data/lib/eryph/compute/generated/lib/compute_client/api/version_api.rb +79 -0
  90. data/lib/eryph/compute/generated/lib/compute_client/api/virtual_disks_api.rb +272 -0
  91. data/lib/eryph/compute/generated/lib/compute_client/api/virtual_networks_api.rb +282 -0
  92. data/lib/eryph/compute/generated/lib/compute_client/api_client.rb +437 -0
  93. data/lib/eryph/compute/generated/lib/compute_client/api_error.rb +58 -0
  94. data/lib/eryph/compute/generated/lib/compute_client/configuration.rb +392 -0
  95. data/lib/eryph/compute/generated/lib/compute_client/models/api_version.rb +263 -0
  96. data/lib/eryph/compute/generated/lib/compute_client/models/api_version_response.rb +237 -0
  97. data/lib/eryph/compute/generated/lib/compute_client/models/catlet.rb +400 -0
  98. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_config_operation_result.rb +234 -0
  99. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_config_validation_result.rb +251 -0
  100. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_configuration.rb +223 -0
  101. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_drive.rb +270 -0
  102. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_drive_type.rb +43 -0
  103. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_list.rb +239 -0
  104. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_network.rb +318 -0
  105. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_network_adapter.rb +247 -0
  106. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_status.rb +43 -0
  107. data/lib/eryph/compute/generated/lib/compute_client/models/catlet_stop_mode.rb +41 -0
  108. data/lib/eryph/compute/generated/lib/compute_client/models/disk_status.rb +40 -0
  109. data/lib/eryph/compute/generated/lib/compute_client/models/expand_catlet_config_request_body.rb +243 -0
  110. data/lib/eryph/compute/generated/lib/compute_client/models/expand_new_catlet_config_request.rb +243 -0
  111. data/lib/eryph/compute/generated/lib/compute_client/models/floating_network_port.rb +313 -0
  112. data/lib/eryph/compute/generated/lib/compute_client/models/gene.rb +415 -0
  113. data/lib/eryph/compute/generated/lib/compute_client/models/gene_list.rb +239 -0
  114. data/lib/eryph/compute/generated/lib/compute_client/models/gene_type.rb +41 -0
  115. data/lib/eryph/compute/generated/lib/compute_client/models/gene_with_usage.rb +439 -0
  116. data/lib/eryph/compute/generated/lib/compute_client/models/new_catlet_request.rb +233 -0
  117. data/lib/eryph/compute/generated/lib/compute_client/models/new_project_member_body.rb +273 -0
  118. data/lib/eryph/compute/generated/lib/compute_client/models/new_project_request.rb +247 -0
  119. data/lib/eryph/compute/generated/lib/compute_client/models/new_virtual_disk_request.rb +345 -0
  120. data/lib/eryph/compute/generated/lib/compute_client/models/operation.rb +352 -0
  121. data/lib/eryph/compute/generated/lib/compute_client/models/operation_list.rb +239 -0
  122. data/lib/eryph/compute/generated/lib/compute_client/models/operation_log_entry.rb +299 -0
  123. data/lib/eryph/compute/generated/lib/compute_client/models/operation_resource.rb +311 -0
  124. data/lib/eryph/compute/generated/lib/compute_client/models/operation_result.rb +242 -0
  125. data/lib/eryph/compute/generated/lib/compute_client/models/operation_status.rb +42 -0
  126. data/lib/eryph/compute/generated/lib/compute_client/models/operation_task.rb +366 -0
  127. data/lib/eryph/compute/generated/lib/compute_client/models/operation_task_reference.rb +311 -0
  128. data/lib/eryph/compute/generated/lib/compute_client/models/operation_task_status.rb +42 -0
  129. data/lib/eryph/compute/generated/lib/compute_client/models/populate_catlet_config_variables_request.rb +233 -0
  130. data/lib/eryph/compute/generated/lib/compute_client/models/problem_details.rb +261 -0
  131. data/lib/eryph/compute/generated/lib/compute_client/models/project.rb +289 -0
  132. data/lib/eryph/compute/generated/lib/compute_client/models/project_list.rb +239 -0
  133. data/lib/eryph/compute/generated/lib/compute_client/models/project_member_role.rb +341 -0
  134. data/lib/eryph/compute/generated/lib/compute_client/models/project_member_role_list.rb +239 -0
  135. data/lib/eryph/compute/generated/lib/compute_client/models/resource_type.rb +42 -0
  136. data/lib/eryph/compute/generated/lib/compute_client/models/stop_catlet_request_body.rb +259 -0
  137. data/lib/eryph/compute/generated/lib/compute_client/models/task_reference_type.rb +40 -0
  138. data/lib/eryph/compute/generated/lib/compute_client/models/update_catlet_request_body.rb +233 -0
  139. data/lib/eryph/compute/generated/lib/compute_client/models/update_project_networks_request_body.rb +233 -0
  140. data/lib/eryph/compute/generated/lib/compute_client/models/validate_config_request.rb +223 -0
  141. data/lib/eryph/compute/generated/lib/compute_client/models/validation_issue.rb +249 -0
  142. data/lib/eryph/compute/generated/lib/compute_client/models/virtual_disk.rb +479 -0
  143. data/lib/eryph/compute/generated/lib/compute_client/models/virtual_disk_attached_catlet.rb +285 -0
  144. data/lib/eryph/compute/generated/lib/compute_client/models/virtual_disk_gene_info.rb +289 -0
  145. data/lib/eryph/compute/generated/lib/compute_client/models/virtual_disk_list.rb +239 -0
  146. data/lib/eryph/compute/generated/lib/compute_client/models/virtual_network.rb +351 -0
  147. data/lib/eryph/compute/generated/lib/compute_client/models/virtual_network_configuration.rb +223 -0
  148. data/lib/eryph/compute/generated/lib/compute_client/models/virtual_network_list.rb +239 -0
  149. data/lib/eryph/compute/generated/lib/compute_client/version.rb +15 -0
  150. data/lib/eryph/compute/generated/lib/compute_client.rb +101 -0
  151. data/lib/eryph/compute/generated/spec/api/catlets_api_spec.rb +182 -0
  152. data/lib/eryph/compute/generated/spec/api/genes_api_spec.rb +81 -0
  153. data/lib/eryph/compute/generated/spec/api/operations_api_spec.rb +62 -0
  154. data/lib/eryph/compute/generated/spec/api/project_members_api_spec.rb +86 -0
  155. data/lib/eryph/compute/generated/spec/api/projects_api_spec.rb +82 -0
  156. data/lib/eryph/compute/generated/spec/api/version_api_spec.rb +46 -0
  157. data/lib/eryph/compute/generated/spec/api/virtual_disks_api_spec.rb +83 -0
  158. data/lib/eryph/compute/generated/spec/api/virtual_networks_api_spec.rb +84 -0
  159. data/lib/eryph/compute/generated/spec/models/api_version_response_spec.rb +36 -0
  160. data/lib/eryph/compute/generated/spec/models/api_version_spec.rb +42 -0
  161. data/lib/eryph/compute/generated/spec/models/catlet_config_operation_result_spec.rb +36 -0
  162. data/lib/eryph/compute/generated/spec/models/catlet_config_validation_result_spec.rb +42 -0
  163. data/lib/eryph/compute/generated/spec/models/catlet_configuration_spec.rb +36 -0
  164. data/lib/eryph/compute/generated/spec/models/catlet_drive_spec.rb +42 -0
  165. data/lib/eryph/compute/generated/spec/models/catlet_drive_type_spec.rb +30 -0
  166. data/lib/eryph/compute/generated/spec/models/catlet_list_spec.rb +36 -0
  167. data/lib/eryph/compute/generated/spec/models/catlet_network_adapter_spec.rb +42 -0
  168. data/lib/eryph/compute/generated/spec/models/catlet_network_spec.rb +72 -0
  169. data/lib/eryph/compute/generated/spec/models/catlet_spec.rb +78 -0
  170. data/lib/eryph/compute/generated/spec/models/catlet_status_spec.rb +30 -0
  171. data/lib/eryph/compute/generated/spec/models/catlet_stop_mode_spec.rb +30 -0
  172. data/lib/eryph/compute/generated/spec/models/disk_status_spec.rb +30 -0
  173. data/lib/eryph/compute/generated/spec/models/expand_catlet_config_request_body_spec.rb +48 -0
  174. data/lib/eryph/compute/generated/spec/models/expand_new_catlet_config_request_spec.rb +48 -0
  175. data/lib/eryph/compute/generated/spec/models/floating_network_port_spec.rb +60 -0
  176. data/lib/eryph/compute/generated/spec/models/gene_list_spec.rb +36 -0
  177. data/lib/eryph/compute/generated/spec/models/gene_spec.rb +72 -0
  178. data/lib/eryph/compute/generated/spec/models/gene_type_spec.rb +30 -0
  179. data/lib/eryph/compute/generated/spec/models/gene_with_usage_spec.rb +84 -0
  180. data/lib/eryph/compute/generated/spec/models/new_catlet_request_spec.rb +42 -0
  181. data/lib/eryph/compute/generated/spec/models/new_project_member_body_spec.rb +48 -0
  182. data/lib/eryph/compute/generated/spec/models/new_project_request_spec.rb +42 -0
  183. data/lib/eryph/compute/generated/spec/models/new_virtual_disk_request_spec.rb +72 -0
  184. data/lib/eryph/compute/generated/spec/models/operation_list_spec.rb +36 -0
  185. data/lib/eryph/compute/generated/spec/models/operation_log_entry_spec.rb +54 -0
  186. data/lib/eryph/compute/generated/spec/models/operation_resource_spec.rb +48 -0
  187. data/lib/eryph/compute/generated/spec/models/operation_result_spec.rb +36 -0
  188. data/lib/eryph/compute/generated/spec/models/operation_spec.rb +78 -0
  189. data/lib/eryph/compute/generated/spec/models/operation_status_spec.rb +30 -0
  190. data/lib/eryph/compute/generated/spec/models/operation_task_reference_spec.rb +48 -0
  191. data/lib/eryph/compute/generated/spec/models/operation_task_spec.rb +72 -0
  192. data/lib/eryph/compute/generated/spec/models/operation_task_status_spec.rb +30 -0
  193. data/lib/eryph/compute/generated/spec/models/populate_catlet_config_variables_request_spec.rb +42 -0
  194. data/lib/eryph/compute/generated/spec/models/problem_details_spec.rb +60 -0
  195. data/lib/eryph/compute/generated/spec/models/project_list_spec.rb +36 -0
  196. data/lib/eryph/compute/generated/spec/models/project_member_role_list_spec.rb +36 -0
  197. data/lib/eryph/compute/generated/spec/models/project_member_role_spec.rb +60 -0
  198. data/lib/eryph/compute/generated/spec/models/project_spec.rb +48 -0
  199. data/lib/eryph/compute/generated/spec/models/resource_type_spec.rb +30 -0
  200. data/lib/eryph/compute/generated/spec/models/stop_catlet_request_body_spec.rb +36 -0
  201. data/lib/eryph/compute/generated/spec/models/task_reference_type_spec.rb +30 -0
  202. data/lib/eryph/compute/generated/spec/models/update_catlet_request_body_spec.rb +42 -0
  203. data/lib/eryph/compute/generated/spec/models/update_project_networks_request_body_spec.rb +42 -0
  204. data/lib/eryph/compute/generated/spec/models/validate_config_request_spec.rb +36 -0
  205. data/lib/eryph/compute/generated/spec/models/validation_issue_spec.rb +42 -0
  206. data/lib/eryph/compute/generated/spec/models/virtual_disk_attached_catlet_spec.rb +42 -0
  207. data/lib/eryph/compute/generated/spec/models/virtual_disk_gene_info_spec.rb +48 -0
  208. data/lib/eryph/compute/generated/spec/models/virtual_disk_list_spec.rb +36 -0
  209. data/lib/eryph/compute/generated/spec/models/virtual_disk_spec.rb +108 -0
  210. data/lib/eryph/compute/generated/spec/models/virtual_network_configuration_spec.rb +36 -0
  211. data/lib/eryph/compute/generated/spec/models/virtual_network_list_spec.rb +36 -0
  212. data/lib/eryph/compute/generated/spec/models/virtual_network_spec.rb +66 -0
  213. data/lib/eryph/compute/generated/spec/spec_helper.rb +111 -0
  214. data/lib/eryph/compute/generated.rb +137 -0
  215. data/lib/eryph/compute/operation_result.rb +255 -0
  216. data/lib/eryph/compute/operation_tracker.rb +247 -0
  217. data/lib/eryph/compute/problem_details_error.rb +139 -0
  218. data/lib/eryph/compute/version.rb +6 -0
  219. data/lib/eryph/compute.rb +40 -0
  220. data/lib/eryph/version.rb +4 -0
  221. data/lib/eryph.rb +68 -0
  222. metadata +329 -0
@@ -0,0 +1,442 @@
1
+ require 'logger'
2
+ require 'set'
3
+
4
+ module Eryph
5
+ module Compute
6
+ # Main client class for the Eryph Compute API
7
+ # Provides a high-level interface to the compute API with automatic authentication
8
+ class Client
9
+ # @return [String] configuration name used for this client
10
+ attr_reader :config_name
11
+
12
+ # @return [ClientRuntime::TokenProvider] token provider for authentication
13
+ attr_reader :token_provider
14
+
15
+ # @return [Logger] logger instance
16
+ attr_reader :logger
17
+
18
+ # Initialize compute client with automatic or specific credential discovery
19
+ # @param config_name [String, nil] configuration name for specific config, nil for automatic discovery
20
+ # @param client_id [String, nil] specific client ID to use
21
+ # @param logger [Logger, nil] logger instance
22
+ # @param scopes [Array<String>] OAuth2 scopes
23
+ # @param ssl_config [Hash] SSL configuration options
24
+ # @param environment [ClientRuntime::Environment, nil] environment instance for dependency injection
25
+ # @option ssl_config [Boolean] :verify_ssl (true) whether to verify SSL certificates
26
+ # @option ssl_config [Boolean] :verify_hostname (true) whether to verify hostname
27
+ # @option ssl_config [String] :ca_file path to CA certificate file
28
+ # @option ssl_config [OpenSSL::X509::Certificate] :ca_cert CA certificate object
29
+ def initialize(config_name = nil, client_id: nil, logger: nil, scopes: nil, ssl_config: {}, environment: nil)
30
+ @logger = logger || default_logger
31
+ @ssl_config = ssl_config || {}
32
+ @environment = environment || ClientRuntime::Environment.new
33
+
34
+ # Discover credentials based on parameters
35
+ reader = ClientRuntime::ConfigStoresReader.new(@environment, logger: @logger)
36
+
37
+ if client_id && config_name
38
+ # Specific client in specific config - no fallback
39
+ lookup = ClientRuntime::ClientCredentialsLookup.new(reader, config_name, logger: @logger)
40
+ @credentials = lookup.get_credentials_by_client_id(client_id, config_name)
41
+ unless @credentials
42
+ raise ClientRuntime::CredentialsNotFoundError,
43
+ "Client '#{client_id}' not found in configuration '#{config_name}'"
44
+ end
45
+
46
+ elsif client_id
47
+ # Find client in any config
48
+ @credentials = find_client_in_any_config(reader, client_id)
49
+ unless @credentials
50
+ raise ClientRuntime::CredentialsNotFoundError,
51
+ "Client '#{client_id}' not found in any configuration"
52
+ end
53
+
54
+ elsif config_name
55
+ # Default client in specific config
56
+ lookup = ClientRuntime::ClientCredentialsLookup.new(reader, config_name, logger: @logger)
57
+ @credentials = lookup.find_credentials
58
+
59
+ else
60
+ # Automatic discovery
61
+ lookup = ClientRuntime::ClientCredentialsLookup.new(reader, logger: @logger)
62
+ @credentials = lookup.find_credentials
63
+ end
64
+
65
+ @config_name = @credentials.configuration
66
+
67
+ # Get compute endpoint for the discovered configuration
68
+ endpoint_lookup = ClientRuntime::EndpointLookup.new(reader, @config_name, logger: @logger)
69
+ @compute_endpoint = endpoint_lookup.endpoint('compute')
70
+ unless @compute_endpoint
71
+ raise ClientRuntime::ConfigurationError,
72
+ "Compute endpoint not found in configuration '#{@config_name}'"
73
+ end
74
+
75
+ # Create token provider
76
+ @token_provider = ClientRuntime::TokenProvider.new(
77
+ @credentials,
78
+ scopes: scopes || default_scopes,
79
+ http_config: { logger: @logger }.merge(@ssl_config)
80
+ )
81
+ end
82
+
83
+ # Test the connection and authentication
84
+ # @return [Boolean] true if connection and authentication work
85
+ def test_connection
86
+ # For now, just test if we can get a token
87
+ token = @token_provider.ensure_access_token
88
+ !token.nil? && !token.empty?
89
+ rescue StandardError => e
90
+ @logger.error "Connection test failed: #{e.message}"
91
+ false
92
+ end
93
+
94
+ # Get the current access token
95
+ # @return [String] access token
96
+ def access_token
97
+ @token_provider.access_token
98
+ end
99
+
100
+ # Refresh the authentication token
101
+ # @return [String] new access token
102
+ def refresh_token
103
+ @token_provider.refresh_token
104
+ end
105
+
106
+ # Get the authorization header for HTTP requests
107
+ # @return [String] authorization header value
108
+ def authorization_header
109
+ @token_provider.authorization_header
110
+ end
111
+
112
+ # Access the catlets API
113
+ # @return [Eryph::ComputeClient::CatletsApi, PlaceholderApiClient] catlets API client
114
+ def catlets
115
+ @catlets ||= create_api_client('catlets', 'CatletsApi')
116
+ end
117
+
118
+ # Access the operations API
119
+ # @return [Eryph::ComputeClient::OperationsApi, PlaceholderApiClient] operations API client
120
+ def operations
121
+ @operations ||= create_api_client('operations', 'OperationsApi')
122
+ end
123
+
124
+ # Access the projects API
125
+ # @return [Eryph::ComputeClient::ProjectsApi, PlaceholderApiClient] projects API client
126
+ def projects
127
+ @projects ||= create_api_client('projects', 'ProjectsApi')
128
+ end
129
+
130
+ # Access the virtual disks API
131
+ # @return [Eryph::ComputeClient::VirtualDisksApi, PlaceholderApiClient] virtual disks API client
132
+ def virtual_disks
133
+ @virtual_disks ||= create_api_client('virtual_disks', 'VirtualDisksApi')
134
+ end
135
+
136
+ # Access the virtual networks API
137
+ # @return [Eryph::ComputeClient::VirtualNetworksApi, PlaceholderApiClient] virtual networks API client
138
+ def virtual_networks
139
+ @virtual_networks ||= create_api_client('virtual_networks', 'VirtualNetworksApi')
140
+ end
141
+
142
+ # Access the genes API
143
+ # @return [Eryph::ComputeClient::GenesApi, PlaceholderApiClient] genes API client
144
+ def genes
145
+ @genes ||= create_api_client('genes', 'GenesApi')
146
+ end
147
+
148
+ # Access the version API
149
+ # @return [Eryph::ComputeClient::VersionApi, PlaceholderApiClient] version API client
150
+ def version
151
+ @version ||= create_api_client('version', 'VersionApi')
152
+ end
153
+
154
+ # Get the compute endpoint URL being used by this client
155
+ # @return [String] the compute endpoint URL
156
+ def compute_endpoint_url
157
+ @compute_endpoint
158
+ end
159
+
160
+ # Wait for an operation to complete with optional callbacks for progress tracking
161
+ # @param operation_id [String] the operation ID to wait for
162
+ # @param timeout [Integer] timeout in seconds (default: 300)
163
+ # @param poll_interval [Integer] polling interval in seconds (default: 5)
164
+ # @return [OperationResult] the completed operation result wrapper
165
+ # @raise [Timeout::Error] if the operation times out
166
+ # @yield [event_type, data] callback for operation events
167
+ # @yieldparam event_type [Symbol] :log_entry, :task_new, :task_update, :resource_new, :status
168
+ # @yieldparam data [Object] the event data (log entry, task, resource, or operation)
169
+ def wait_for_operation(operation_id, timeout: 300, poll_interval: 5)
170
+ @logger.info "Waiting for operation #{operation_id} to complete (timeout: #{timeout}s)..."
171
+
172
+ start_time = Time.now
173
+ last_timestamp = Time.parse('2018-01-01')
174
+ processed_log_ids = Set.new
175
+ processed_task_ids = Set.new
176
+ processed_resource_ids = Set.new
177
+
178
+ loop do
179
+ # Get raw JSON using debug_return_type to work around discriminated union bug
180
+ raw_json = nil
181
+ begin
182
+ raw_json = operations.operations_get(
183
+ operation_id,
184
+ expand: 'logs,tasks,resources',
185
+ log_time_stamp: last_timestamp,
186
+ debug_return_type: 'String'
187
+ )
188
+ @logger.debug "Raw JSON captured: #{raw_json ? 'YES' : 'NO'}"
189
+ rescue StandardError => e
190
+ @logger.debug "Failed to capture raw JSON: #{e.message}"
191
+ end
192
+
193
+ # Get normal deserialized operation
194
+ operation = operations.operations_get(
195
+ operation_id,
196
+ expand: 'logs,tasks,resources',
197
+ log_time_stamp: last_timestamp
198
+ )
199
+
200
+ # Process NEW log entries only
201
+ if operation.log_entries && block_given?
202
+ operation.log_entries.each do |log_entry|
203
+ next if processed_log_ids.include?(log_entry.id)
204
+
205
+ processed_log_ids.add(log_entry.id)
206
+ last_timestamp = log_entry.timestamp if log_entry.timestamp > last_timestamp
207
+
208
+ # Callback for new log entry
209
+ yield(:log_entry, log_entry)
210
+ end
211
+ end
212
+
213
+ # Process NEW and UPDATED tasks (tasks can appear and change during execution)
214
+ if operation.tasks && block_given?
215
+ operation.tasks.each do |task|
216
+ if processed_task_ids.include?(task.id)
217
+ # Callback for task update (status/progress changes)
218
+ yield(:task_update, task)
219
+ else
220
+ processed_task_ids.add(task.id)
221
+ # Callback for new task
222
+ yield(:task_new, task)
223
+ end
224
+ end
225
+ end
226
+
227
+ # Process NEW resources (resources appear as they're created)
228
+ if operation.resources && block_given?
229
+ operation.resources.each do |resource|
230
+ next if processed_resource_ids.include?(resource.id)
231
+
232
+ processed_resource_ids.add(resource.id)
233
+ # Callback for new resource
234
+ yield(:resource_new, resource)
235
+ end
236
+ end
237
+
238
+ # Status update callback
239
+ yield(:status, operation) if block_given?
240
+
241
+ case operation.status
242
+ when 'Completed'
243
+ @logger.info "Operation #{operation_id} completed successfully!"
244
+ return OperationResult.new(operation, self, raw_json)
245
+ when 'Failed'
246
+ @logger.error "Operation #{operation_id} failed: #{operation.status_message}"
247
+ return OperationResult.new(operation, self, raw_json)
248
+ when 'Running', 'Queued'
249
+ elapsed = Time.now - start_time
250
+ if elapsed > timeout
251
+ @logger.error "Operation #{operation_id} timed out after #{timeout} seconds"
252
+ raise Timeout::Error, "Operation #{operation_id} timed out after #{timeout} seconds"
253
+ end
254
+
255
+ @logger.debug "Operation #{operation_id} status: #{operation.status} (#{elapsed.round(1)}s elapsed)"
256
+ sleep poll_interval
257
+ else
258
+ @logger.warn "Operation #{operation_id} has unknown status: #{operation.status}"
259
+ return OperationResult.new(operation, self)
260
+ end
261
+ end
262
+ end
263
+
264
+ # Validate a catlet configuration using the quick validation endpoint
265
+ # @param config [Hash, String] catlet configuration as Ruby hash or JSON string
266
+ # @return [Object] validation result with is_valid and errors
267
+ # @raise [ProblemDetailsError] if validation fails due to API error
268
+ def validate_catlet_config(config)
269
+ # Convert input to hash if it's a JSON string
270
+ config_hash = case config
271
+ when String
272
+ begin
273
+ JSON.parse(config)
274
+ rescue JSON::ParserError => e
275
+ raise ArgumentError, "Invalid JSON string: #{e.message}"
276
+ end
277
+ when Hash
278
+ config
279
+ else
280
+ raise ArgumentError, "Config must be a Hash or JSON string, got #{config.class}"
281
+ end
282
+
283
+ # Create the validation request
284
+ request = Eryph::ComputeClient::ValidateConfigRequest.new(configuration: config_hash)
285
+
286
+ # Call the validation endpoint
287
+ handle_api_errors do
288
+ catlets.catlets_validate_config(validate_config_request: request)
289
+ end
290
+ end
291
+
292
+ # Execute a block and convert ApiError to ProblemDetailsError when appropriate
293
+ # @yield the block to execute
294
+ # @return the result of the block
295
+ # @raise [ProblemDetailsError, Exception] the error with enhanced information
296
+ def handle_api_errors
297
+ yield
298
+ rescue StandardError => e
299
+ # Check if this looks like an API error (has code and response_body)
300
+ raise e unless e.respond_to?(:code) && e.respond_to?(:response_body)
301
+
302
+ enhanced_error = ProblemDetailsError.from_api_error(e)
303
+ raise enhanced_error
304
+
305
+ # Re-raise non-API errors as-is
306
+ end
307
+
308
+ private
309
+
310
+ # Search for client ID across all configurations
311
+ # @param reader [ConfigStoresReader] configuration reader
312
+ # @param client_id [String] client ID to find
313
+ # @return [ClientCredentials, nil] credentials if found, nil otherwise
314
+ def find_client_in_any_config(reader, client_id)
315
+ configs = @environment.windows? ? %w[default zero local] : %w[default local]
316
+
317
+ configs.each do |config|
318
+ lookup = ClientRuntime::ClientCredentialsLookup.new(reader, config, logger: @logger)
319
+ creds = lookup.get_credentials_by_client_id(client_id, config)
320
+ return creds if creds
321
+ end
322
+
323
+ nil
324
+ end
325
+
326
+ def default_scopes
327
+ # Default to minimal read-only scope
328
+ %w[compute:read]
329
+ end
330
+
331
+ def default_logger
332
+ logger = Logger.new($stdout)
333
+ logger.level = Logger::WARN
334
+ logger.formatter = proc do |severity, datetime, progname, msg|
335
+ "[#{datetime.strftime('%Y-%m-%d %H:%M:%S')}] #{severity} -- #{progname}: #{msg}\n"
336
+ end
337
+ logger
338
+ end
339
+
340
+ def create_api_client(api_name, api_class_name)
341
+ # Try to use the generated API client
342
+ require_relative 'generated'
343
+
344
+ # Create the generated API client with our configured API client
345
+ api_client = create_generated_api_client
346
+ api_class = Eryph::ComputeClient.const_get(api_class_name)
347
+
348
+ @logger.debug "Creating generated API client for #{api_name} (#{api_class_name})"
349
+ raw_client = api_class.new(api_client)
350
+
351
+ # Wrap the API client to handle errors
352
+ ErrorHandlingApiClientWrapper.new(raw_client, self)
353
+ rescue LoadError, NameError => e
354
+ # Fall back to placeholder if generated client is not available
355
+ @logger.warn "Generated client not available for #{api_name}, using placeholder: #{e.class}: #{e.message}"
356
+ PlaceholderApiClient.new(api_name, self)
357
+ end
358
+
359
+ def create_generated_api_client
360
+ # Use the stored compute endpoint
361
+ compute_uri = URI.parse(@compute_endpoint)
362
+
363
+ # Create and configure the generated API client
364
+ config = Eryph::ComputeClient::Configuration.new
365
+ # Include port in host if it's not the default port for the scheme
366
+ config.host = if compute_uri.port && compute_uri.port != compute_uri.default_port
367
+ "#{compute_uri.host}:#{compute_uri.port}"
368
+ else
369
+ compute_uri.host
370
+ end
371
+ config.scheme = compute_uri.scheme
372
+ # Ensure base_path ends with a slash for proper URL construction
373
+ base_path = compute_uri.path.empty? ? '/' : compute_uri.path
374
+ config.base_path = base_path.end_with?('/') ? base_path : "#{base_path}/"
375
+
376
+ # Configure SSL settings
377
+ config.ssl_verify = @ssl_config.fetch(:verify_ssl, true)
378
+
379
+ # If SSL verification is disabled, set verify_mode to VERIFY_NONE
380
+ if @ssl_config.fetch(:verify_ssl, true) == false
381
+ config.ssl_verify_mode = OpenSSL::SSL::VERIFY_NONE
382
+ else
383
+ config.ssl_verify_mode = @ssl_config.fetch(:verify_hostname, true) ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE
384
+ end
385
+
386
+ config.ssl_ca_file = @ssl_config[:ca_file] if @ssl_config[:ca_file]
387
+
388
+ # Create the API client
389
+ api_client = Eryph::ComputeClient::ApiClient.new(config)
390
+
391
+ # Configure authentication - the generated client expects bearer token in access_token
392
+ api_client.config.access_token = @token_provider.access_token
393
+
394
+ api_client
395
+ end
396
+ end
397
+
398
+ # Wrapper for API clients that handles errors and converts them to ProblemDetailsError
399
+ class ErrorHandlingApiClientWrapper
400
+ def initialize(api_client, parent_client)
401
+ @api_client = api_client
402
+ @parent_client = parent_client
403
+ end
404
+
405
+ def method_missing(method_name, ...)
406
+ @parent_client.handle_api_errors do
407
+ @api_client.send(method_name, ...)
408
+ end
409
+ end
410
+
411
+ def respond_to_missing?(method_name, include_private = false)
412
+ @api_client.respond_to?(method_name, include_private)
413
+ end
414
+ end
415
+
416
+ # Placeholder API client until generated client is available
417
+ class PlaceholderApiClient
418
+ def initialize(api_name, parent_client)
419
+ @api_name = api_name
420
+ @parent_client = parent_client
421
+ end
422
+
423
+ def method_missing(method_name, *args, **kwargs)
424
+ @parent_client.logger.info "#{@api_name.capitalize} API call: #{method_name} " \
425
+ '(placeholder - requires generated client)'
426
+
427
+ # Return a simple response structure
428
+ {
429
+ api: @api_name,
430
+ method: method_name,
431
+ args: args,
432
+ kwargs: kwargs,
433
+ message: 'This is a placeholder response. Please run the generator script to create the actual API client.',
434
+ }
435
+ end
436
+
437
+ def respond_to_missing?(_method_name, _include_private = false)
438
+ true
439
+ end
440
+ end
441
+ end
442
+ end
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
@@ -0,0 +1,206 @@
1
+ # compute_client
2
+
3
+ ComputeClient - the Ruby gem for the Compute Api
4
+
5
+ Compute Api
6
+
7
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
+
9
+ - API version: 1.0
10
+ - Package version: 1.0.0
11
+ - Generator version: 7.14.0
12
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
13
+
14
+ ## Installation
15
+
16
+ ### Build a gem
17
+
18
+ To build the Ruby code into a gem:
19
+
20
+ ```shell
21
+ gem build compute_client.gemspec
22
+ ```
23
+
24
+ Then either install the gem locally:
25
+
26
+ ```shell
27
+ gem install ./compute_client-1.0.0.gem
28
+ ```
29
+
30
+ (for development, run `gem install --dev ./compute_client-1.0.0.gem` to install the development dependencies)
31
+
32
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
+
34
+ Finally add this to the Gemfile:
35
+
36
+ gem 'compute_client', '~> 1.0.0'
37
+
38
+ ### Install from Git
39
+
40
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
41
+
42
+ gem 'compute_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
43
+
44
+ ### Include the Ruby code directly
45
+
46
+ Include the Ruby code directly using `-I` as follows:
47
+
48
+ ```shell
49
+ ruby -Ilib script.rb
50
+ ```
51
+
52
+ ## Getting Started
53
+
54
+ Please follow the [installation](#installation) procedure and then run the following code:
55
+
56
+ ```ruby
57
+ # Load the gem
58
+ require 'compute_client'
59
+
60
+ # Setup authorization
61
+ ComputeClient.configure do |config|
62
+ # Configure OAuth2 access token for authorization: oauth2
63
+ config.access_token = 'YOUR ACCESS TOKEN'
64
+ # Configure a proc to get access tokens in lieu of the static access_token configuration
65
+ config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
66
+ # Configure faraday connection
67
+ config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
68
+ end
69
+
70
+ api_instance = ComputeClient::CatletsApi.new
71
+ opts = {
72
+ new_catlet_request: ComputeClient::NewCatletRequest.new({configuration: 3.56}) # NewCatletRequest |
73
+ }
74
+
75
+ begin
76
+ #Create a new catlet
77
+ result = api_instance.catlets_create(opts)
78
+ p result
79
+ rescue ComputeClient::ApiError => e
80
+ puts "Exception when calling CatletsApi->catlets_create: #{e}"
81
+ end
82
+
83
+ ```
84
+
85
+ ## Documentation for API Endpoints
86
+
87
+ All URIs are relative to *https://localhost:8000/compute*
88
+
89
+ Class | Method | HTTP request | Description
90
+ ------------ | ------------- | ------------- | -------------
91
+ *ComputeClient::CatletsApi* | [**catlets_create**](docs/CatletsApi.md#catlets_create) | **POST** /v1/catlets | Create a new catlet
92
+ *ComputeClient::CatletsApi* | [**catlets_delete**](docs/CatletsApi.md#catlets_delete) | **DELETE** /v1/catlets/{id} | Delete a catlet
93
+ *ComputeClient::CatletsApi* | [**catlets_expand_config**](docs/CatletsApi.md#catlets_expand_config) | **POST** /v1/catlets/{id}/config/expand | Expand catlet config
94
+ *ComputeClient::CatletsApi* | [**catlets_expand_new_config**](docs/CatletsApi.md#catlets_expand_new_config) | **POST** /v1/catlets/config/expand | Expand new catlet config
95
+ *ComputeClient::CatletsApi* | [**catlets_get**](docs/CatletsApi.md#catlets_get) | **GET** /v1/catlets/{id} | Get a catlet
96
+ *ComputeClient::CatletsApi* | [**catlets_get_config**](docs/CatletsApi.md#catlets_get_config) | **GET** /v1/catlets/{id}/config | Get a catlet configuration
97
+ *ComputeClient::CatletsApi* | [**catlets_list**](docs/CatletsApi.md#catlets_list) | **GET** /v1/catlets | List all catlets
98
+ *ComputeClient::CatletsApi* | [**catlets_populate_config_variables**](docs/CatletsApi.md#catlets_populate_config_variables) | **POST** /v1/catlets/config/populate-variables | Populate catlet config variables
99
+ *ComputeClient::CatletsApi* | [**catlets_start**](docs/CatletsApi.md#catlets_start) | **PUT** /v1/catlets/{id}/start | Start a catlet
100
+ *ComputeClient::CatletsApi* | [**catlets_stop**](docs/CatletsApi.md#catlets_stop) | **PUT** /v1/catlets/{id}/stop | Stop a catlet
101
+ *ComputeClient::CatletsApi* | [**catlets_update**](docs/CatletsApi.md#catlets_update) | **PUT** /v1/catlets/{id} | Update a catlet
102
+ *ComputeClient::CatletsApi* | [**catlets_validate_config**](docs/CatletsApi.md#catlets_validate_config) | **POST** /v1/catlets/config/validate | Validate catlet config
103
+ *ComputeClient::GenesApi* | [**genes_cleanup**](docs/GenesApi.md#genes_cleanup) | **DELETE** /v1/genes | Remove all unused genes
104
+ *ComputeClient::GenesApi* | [**genes_delete**](docs/GenesApi.md#genes_delete) | **DELETE** /v1/genes/{id} | Remove a gene
105
+ *ComputeClient::GenesApi* | [**genes_get**](docs/GenesApi.md#genes_get) | **GET** /v1/genes/{id} | Get a gene
106
+ *ComputeClient::GenesApi* | [**genes_list**](docs/GenesApi.md#genes_list) | **GET** /v1/genes | List all genes
107
+ *ComputeClient::OperationsApi* | [**operations_get**](docs/OperationsApi.md#operations_get) | **GET** /v1/operations/{id} | Get an operation
108
+ *ComputeClient::OperationsApi* | [**operations_list**](docs/OperationsApi.md#operations_list) | **GET** /v1/operations | List all operations
109
+ *ComputeClient::ProjectMembersApi* | [**project_members_add**](docs/ProjectMembersApi.md#project_members_add) | **POST** /v1/projects/{project_id}/members | Add a project member
110
+ *ComputeClient::ProjectMembersApi* | [**project_members_get**](docs/ProjectMembersApi.md#project_members_get) | **GET** /v1/projects/{project_id}/members/{id} | Get a project member
111
+ *ComputeClient::ProjectMembersApi* | [**project_members_list**](docs/ProjectMembersApi.md#project_members_list) | **GET** /v1/projects/{project_id}/members | List all project members
112
+ *ComputeClient::ProjectMembersApi* | [**project_members_remove**](docs/ProjectMembersApi.md#project_members_remove) | **DELETE** /v1/projects/{project_id}/members/{id} | Remove a project member
113
+ *ComputeClient::ProjectsApi* | [**projects_create**](docs/ProjectsApi.md#projects_create) | **POST** /v1/projects | Create a new project
114
+ *ComputeClient::ProjectsApi* | [**projects_delete**](docs/ProjectsApi.md#projects_delete) | **DELETE** /v1/projects/{id} | Delete a project
115
+ *ComputeClient::ProjectsApi* | [**projects_get**](docs/ProjectsApi.md#projects_get) | **GET** /v1/projects/{id} | Get a project
116
+ *ComputeClient::ProjectsApi* | [**projects_list**](docs/ProjectsApi.md#projects_list) | **GET** /v1/projects | List all projects
117
+ *ComputeClient::VersionApi* | [**version_get**](docs/VersionApi.md#version_get) | **GET** /v1/version | Get the API version
118
+ *ComputeClient::VirtualDisksApi* | [**virtual_disks_create**](docs/VirtualDisksApi.md#virtual_disks_create) | **POST** /v1/virtualdisks | Create a virtual disk
119
+ *ComputeClient::VirtualDisksApi* | [**virtual_disks_delete**](docs/VirtualDisksApi.md#virtual_disks_delete) | **DELETE** /v1/virtualdisks/{id} | Delete a virtual disk
120
+ *ComputeClient::VirtualDisksApi* | [**virtual_disks_get**](docs/VirtualDisksApi.md#virtual_disks_get) | **GET** /v1/virtualdisks/{id} | Get a virtual disk
121
+ *ComputeClient::VirtualDisksApi* | [**virtual_disks_list**](docs/VirtualDisksApi.md#virtual_disks_list) | **GET** /v1/virtualdisks | List all virtual disks
122
+ *ComputeClient::VirtualNetworksApi* | [**virtual_networks_get**](docs/VirtualNetworksApi.md#virtual_networks_get) | **GET** /v1/virtualnetworks/{id} | Get a virtual network
123
+ *ComputeClient::VirtualNetworksApi* | [**virtual_networks_get_config**](docs/VirtualNetworksApi.md#virtual_networks_get_config) | **GET** /v1/projects/{project_id}/virtualnetworks/config | Get the virtual network configuration of a project
124
+ *ComputeClient::VirtualNetworksApi* | [**virtual_networks_list**](docs/VirtualNetworksApi.md#virtual_networks_list) | **GET** /v1/virtualnetworks | List all virtual networks
125
+ *ComputeClient::VirtualNetworksApi* | [**virtual_networks_update_config**](docs/VirtualNetworksApi.md#virtual_networks_update_config) | **PUT** /v1/projects/{project_id}/virtualnetworks/config | Update the virtual network configuration of a project
126
+
127
+
128
+ ## Documentation for Models
129
+
130
+ - [ComputeClient::ApiVersion](docs/ApiVersion.md)
131
+ - [ComputeClient::ApiVersionResponse](docs/ApiVersionResponse.md)
132
+ - [ComputeClient::Catlet](docs/Catlet.md)
133
+ - [ComputeClient::CatletConfigOperationResult](docs/CatletConfigOperationResult.md)
134
+ - [ComputeClient::CatletConfigValidationResult](docs/CatletConfigValidationResult.md)
135
+ - [ComputeClient::CatletConfiguration](docs/CatletConfiguration.md)
136
+ - [ComputeClient::CatletDrive](docs/CatletDrive.md)
137
+ - [ComputeClient::CatletDriveType](docs/CatletDriveType.md)
138
+ - [ComputeClient::CatletList](docs/CatletList.md)
139
+ - [ComputeClient::CatletNetwork](docs/CatletNetwork.md)
140
+ - [ComputeClient::CatletNetworkAdapter](docs/CatletNetworkAdapter.md)
141
+ - [ComputeClient::CatletStatus](docs/CatletStatus.md)
142
+ - [ComputeClient::CatletStopMode](docs/CatletStopMode.md)
143
+ - [ComputeClient::DiskStatus](docs/DiskStatus.md)
144
+ - [ComputeClient::ExpandCatletConfigRequestBody](docs/ExpandCatletConfigRequestBody.md)
145
+ - [ComputeClient::ExpandNewCatletConfigRequest](docs/ExpandNewCatletConfigRequest.md)
146
+ - [ComputeClient::FloatingNetworkPort](docs/FloatingNetworkPort.md)
147
+ - [ComputeClient::Gene](docs/Gene.md)
148
+ - [ComputeClient::GeneList](docs/GeneList.md)
149
+ - [ComputeClient::GeneType](docs/GeneType.md)
150
+ - [ComputeClient::GeneWithUsage](docs/GeneWithUsage.md)
151
+ - [ComputeClient::NewCatletRequest](docs/NewCatletRequest.md)
152
+ - [ComputeClient::NewProjectMemberBody](docs/NewProjectMemberBody.md)
153
+ - [ComputeClient::NewProjectRequest](docs/NewProjectRequest.md)
154
+ - [ComputeClient::NewVirtualDiskRequest](docs/NewVirtualDiskRequest.md)
155
+ - [ComputeClient::Operation](docs/Operation.md)
156
+ - [ComputeClient::OperationList](docs/OperationList.md)
157
+ - [ComputeClient::OperationLogEntry](docs/OperationLogEntry.md)
158
+ - [ComputeClient::OperationResource](docs/OperationResource.md)
159
+ - [ComputeClient::OperationResult](docs/OperationResult.md)
160
+ - [ComputeClient::OperationStatus](docs/OperationStatus.md)
161
+ - [ComputeClient::OperationTask](docs/OperationTask.md)
162
+ - [ComputeClient::OperationTaskReference](docs/OperationTaskReference.md)
163
+ - [ComputeClient::OperationTaskStatus](docs/OperationTaskStatus.md)
164
+ - [ComputeClient::PopulateCatletConfigVariablesRequest](docs/PopulateCatletConfigVariablesRequest.md)
165
+ - [ComputeClient::ProblemDetails](docs/ProblemDetails.md)
166
+ - [ComputeClient::Project](docs/Project.md)
167
+ - [ComputeClient::ProjectList](docs/ProjectList.md)
168
+ - [ComputeClient::ProjectMemberRole](docs/ProjectMemberRole.md)
169
+ - [ComputeClient::ProjectMemberRoleList](docs/ProjectMemberRoleList.md)
170
+ - [ComputeClient::ResourceType](docs/ResourceType.md)
171
+ - [ComputeClient::StopCatletRequestBody](docs/StopCatletRequestBody.md)
172
+ - [ComputeClient::TaskReferenceType](docs/TaskReferenceType.md)
173
+ - [ComputeClient::UpdateCatletRequestBody](docs/UpdateCatletRequestBody.md)
174
+ - [ComputeClient::UpdateProjectNetworksRequestBody](docs/UpdateProjectNetworksRequestBody.md)
175
+ - [ComputeClient::ValidateConfigRequest](docs/ValidateConfigRequest.md)
176
+ - [ComputeClient::ValidationIssue](docs/ValidationIssue.md)
177
+ - [ComputeClient::VirtualDisk](docs/VirtualDisk.md)
178
+ - [ComputeClient::VirtualDiskAttachedCatlet](docs/VirtualDiskAttachedCatlet.md)
179
+ - [ComputeClient::VirtualDiskGeneInfo](docs/VirtualDiskGeneInfo.md)
180
+ - [ComputeClient::VirtualDiskList](docs/VirtualDiskList.md)
181
+ - [ComputeClient::VirtualNetwork](docs/VirtualNetwork.md)
182
+ - [ComputeClient::VirtualNetworkConfiguration](docs/VirtualNetworkConfiguration.md)
183
+ - [ComputeClient::VirtualNetworkList](docs/VirtualNetworkList.md)
184
+
185
+
186
+ ## Documentation for Authorization
187
+
188
+
189
+ Authentication schemes defined for the API:
190
+ ### oauth2
191
+
192
+
193
+ - **Type**: OAuth
194
+ - **Flow**: application
195
+ - **Authorization URL**:
196
+ - **Scopes**:
197
+ - compute:read: Grants read access to the compute API
198
+ - compute:write: Grants write access to the compute API
199
+ - compute:catlets:read: Grants read access for catlets
200
+ - compute:catlets:write: Grants write access for catlets
201
+ - compute:catlets:control: Grants control access (start, stop) for catlets
202
+ - compute:genes:read: Grants read access for genes
203
+ - compute:genes:write: Grants write access for genes
204
+ - compute:projects:read: Grants read access for projects
205
+ - compute:projects:write: Grants write access for projects
206
+
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end