ionoscloud-dbaas-postgres 1.0.0 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/docs/CHANGELOG.md +21 -0
  4. data/docs/api/LogsApi.md +8 -6
  5. data/docs/models/ClusterBackup.md +5 -1
  6. data/docs/models/ClusterProperties.md +4 -4
  7. data/docs/models/Connection.md +1 -1
  8. data/docs/models/CreateClusterProperties.md +4 -2
  9. data/docs/models/DBUser.md +1 -1
  10. data/docs/models/ErrorResponse.md +1 -1
  11. data/docs/models/MaintenanceWindow.md +1 -1
  12. data/git_push.sh +1 -3
  13. data/ionoscloud-dbaas-postgres.gemspec +1 -1
  14. data/lib/ionoscloud-dbaas-postgres/api/backups_api.rb +1 -1
  15. data/lib/ionoscloud-dbaas-postgres/api/clusters_api.rb +1 -1
  16. data/lib/ionoscloud-dbaas-postgres/api/logs_api.rb +15 -8
  17. data/lib/ionoscloud-dbaas-postgres/api/metadata_api.rb +1 -1
  18. data/lib/ionoscloud-dbaas-postgres/api/restores_api.rb +1 -1
  19. data/lib/ionoscloud-dbaas-postgres/api_client.rb +2 -2
  20. data/lib/ionoscloud-dbaas-postgres/api_error.rb +1 -1
  21. data/lib/ionoscloud-dbaas-postgres/configuration.rb +12 -27
  22. data/lib/ionoscloud-dbaas-postgres/models/api_version.rb +19 -3
  23. data/lib/ionoscloud-dbaas-postgres/models/backup_metadata.rb +19 -3
  24. data/lib/ionoscloud-dbaas-postgres/models/backup_response.rb +38 -6
  25. data/lib/ionoscloud-dbaas-postgres/models/cluster_backup.rb +86 -10
  26. data/lib/ionoscloud-dbaas-postgres/models/cluster_backup_list.rb +56 -8
  27. data/lib/ionoscloud-dbaas-postgres/models/cluster_backup_list_all_of.rb +28 -4
  28. data/lib/ionoscloud-dbaas-postgres/models/cluster_list.rb +56 -8
  29. data/lib/ionoscloud-dbaas-postgres/models/cluster_list_all_of.rb +28 -4
  30. data/lib/ionoscloud-dbaas-postgres/models/cluster_logs.rb +10 -2
  31. data/lib/ionoscloud-dbaas-postgres/models/cluster_logs_instances.rb +19 -3
  32. data/lib/ionoscloud-dbaas-postgres/models/cluster_logs_messages.rb +19 -3
  33. data/lib/ionoscloud-dbaas-postgres/models/cluster_properties.rb +123 -16
  34. data/lib/ionoscloud-dbaas-postgres/models/cluster_response.rb +38 -6
  35. data/lib/ionoscloud-dbaas-postgres/models/connection.rb +28 -4
  36. data/lib/ionoscloud-dbaas-postgres/models/create_cluster_properties.rb +148 -16
  37. data/lib/ionoscloud-dbaas-postgres/models/create_cluster_request.rb +19 -3
  38. data/lib/ionoscloud-dbaas-postgres/models/create_restore_request.rb +19 -3
  39. data/lib/ionoscloud-dbaas-postgres/models/day_of_the_week.rb +1 -1
  40. data/lib/ionoscloud-dbaas-postgres/models/db_user.rb +20 -4
  41. data/lib/ionoscloud-dbaas-postgres/models/error_message.rb +19 -3
  42. data/lib/ionoscloud-dbaas-postgres/models/error_response.rb +20 -4
  43. data/lib/ionoscloud-dbaas-postgres/models/maintenance_window.rb +21 -4
  44. data/lib/ionoscloud-dbaas-postgres/models/metadata.rb +65 -9
  45. data/lib/ionoscloud-dbaas-postgres/models/pagination.rb +28 -4
  46. data/lib/ionoscloud-dbaas-postgres/models/pagination_links.rb +28 -4
  47. data/lib/ionoscloud-dbaas-postgres/models/patch_cluster_properties.rb +83 -10
  48. data/lib/ionoscloud-dbaas-postgres/models/patch_cluster_request.rb +20 -4
  49. data/lib/ionoscloud-dbaas-postgres/models/postgres_version_list.rb +11 -3
  50. data/lib/ionoscloud-dbaas-postgres/models/postgres_version_list_data.rb +10 -2
  51. data/lib/ionoscloud-dbaas-postgres/models/resource_type.rb +1 -1
  52. data/lib/ionoscloud-dbaas-postgres/models/state.rb +1 -1
  53. data/lib/ionoscloud-dbaas-postgres/models/storage_type.rb +3 -1
  54. data/lib/ionoscloud-dbaas-postgres/models/synchronization_mode.rb +1 -1
  55. data/lib/ionoscloud-dbaas-postgres/version.rb +2 -2
  56. data/lib/ionoscloud-dbaas-postgres.rb +1 -3
  57. data/spec/api_client_spec.rb +1 -1
  58. data/spec/configuration_spec.rb +1 -1
  59. data/spec/spec_helper.rb +1 -1
  60. metadata +3 -7
  61. data/docs/models/BackupLocation.md +0 -15
  62. data/docs/models/Location.md +0 -15
  63. data/lib/ionoscloud-dbaas-postgres/models/backup_location.rb +0 -36
  64. data/lib/ionoscloud-dbaas-postgres/models/location.rb +0 -41
  65. data/lib/test_driver.rb +0 -119
@@ -3,7 +3,7 @@
3
3
 
4
4
  #An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
5
5
 
6
- The version of the OpenAPI document: 0.0.1
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.1-SNAPSHOT
@@ -18,7 +18,6 @@ require 'ionoscloud-dbaas-postgres/configuration'
18
18
 
19
19
  # Models
20
20
  require 'ionoscloud-dbaas-postgres/models/api_version'
21
- require 'ionoscloud-dbaas-postgres/models/backup_location'
22
21
  require 'ionoscloud-dbaas-postgres/models/backup_metadata'
23
22
  require 'ionoscloud-dbaas-postgres/models/backup_response'
24
23
  require 'ionoscloud-dbaas-postgres/models/cluster_backup'
@@ -39,7 +38,6 @@ require 'ionoscloud-dbaas-postgres/models/db_user'
39
38
  require 'ionoscloud-dbaas-postgres/models/day_of_the_week'
40
39
  require 'ionoscloud-dbaas-postgres/models/error_message'
41
40
  require 'ionoscloud-dbaas-postgres/models/error_response'
42
- require 'ionoscloud-dbaas-postgres/models/location'
43
41
  require 'ionoscloud-dbaas-postgres/models/maintenance_window'
44
42
  require 'ionoscloud-dbaas-postgres/models/metadata'
45
43
  require 'ionoscloud-dbaas-postgres/models/pagination'
@@ -3,7 +3,7 @@
3
3
 
4
4
  #An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
5
5
 
6
- The version of the OpenAPI document: 0.0.1
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.1-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
5
5
 
6
- The version of the OpenAPI document: 0.0.1
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.1-SNAPSHOT
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  #An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
5
5
 
6
- The version of the OpenAPI document: 0.0.1
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.1-SNAPSHOT
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ionoscloud-dbaas-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-12 00:00:00.000000000 Z
11
+ date: 2022-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -67,6 +67,7 @@ files:
67
67
  - LICENSE
68
68
  - README.md
69
69
  - Rakefile
70
+ - docs/CHANGELOG.md
70
71
  - docs/README.md
71
72
  - docs/api/BackupsApi.md
72
73
  - docs/api/ClustersApi.md
@@ -74,7 +75,6 @@ files:
74
75
  - docs/api/MetadataApi.md
75
76
  - docs/api/RestoresApi.md
76
77
  - docs/models/APIVersion.md
77
- - docs/models/BackupLocation.md
78
78
  - docs/models/BackupMetadata.md
79
79
  - docs/models/BackupResponse.md
80
80
  - docs/models/ClusterBackup.md
@@ -95,7 +95,6 @@ files:
95
95
  - docs/models/DayOfTheWeek.md
96
96
  - docs/models/ErrorMessage.md
97
97
  - docs/models/ErrorResponse.md
98
- - docs/models/Location.md
99
98
  - docs/models/MaintenanceWindow.md
100
99
  - docs/models/Metadata.md
101
100
  - docs/models/Pagination.md
@@ -121,7 +120,6 @@ files:
121
120
  - lib/ionoscloud-dbaas-postgres/api_error.rb
122
121
  - lib/ionoscloud-dbaas-postgres/configuration.rb
123
122
  - lib/ionoscloud-dbaas-postgres/models/api_version.rb
124
- - lib/ionoscloud-dbaas-postgres/models/backup_location.rb
125
123
  - lib/ionoscloud-dbaas-postgres/models/backup_metadata.rb
126
124
  - lib/ionoscloud-dbaas-postgres/models/backup_response.rb
127
125
  - lib/ionoscloud-dbaas-postgres/models/cluster_backup.rb
@@ -142,7 +140,6 @@ files:
142
140
  - lib/ionoscloud-dbaas-postgres/models/db_user.rb
143
141
  - lib/ionoscloud-dbaas-postgres/models/error_message.rb
144
142
  - lib/ionoscloud-dbaas-postgres/models/error_response.rb
145
- - lib/ionoscloud-dbaas-postgres/models/location.rb
146
143
  - lib/ionoscloud-dbaas-postgres/models/maintenance_window.rb
147
144
  - lib/ionoscloud-dbaas-postgres/models/metadata.rb
148
145
  - lib/ionoscloud-dbaas-postgres/models/pagination.rb
@@ -156,7 +153,6 @@ files:
156
153
  - lib/ionoscloud-dbaas-postgres/models/storage_type.rb
157
154
  - lib/ionoscloud-dbaas-postgres/models/synchronization_mode.rb
158
155
  - lib/ionoscloud-dbaas-postgres/version.rb
159
- - lib/test_driver.rb
160
156
  - sonar-project.properties
161
157
  - spec/api_client_spec.rb
162
158
  - spec/configuration_spec.rb
@@ -1,15 +0,0 @@
1
- # BackupLocation
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- ## Example
9
-
10
- ```ruby
11
- require 'ionoscloud-dbaas-postgres'
12
-
13
- instance = IonoscloudDbaasPostgres::BackupLocation.new()
14
- ```
15
-
@@ -1,15 +0,0 @@
1
- # Location
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- ## Example
9
-
10
- ```ruby
11
- require 'ionoscloud-dbaas-postgres'
12
-
13
- instance = IonoscloudDbaasPostgres::Location.new()
14
- ```
15
-
@@ -1,36 +0,0 @@
1
- =begin
2
- #IONOS DBaaS REST API
3
-
4
- #An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
5
-
6
- The version of the OpenAPI document: 0.0.1
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module IonoscloudDbaasPostgres
17
- class BackupLocation
18
- DE = "de".freeze
19
-
20
- # Builds the enum from string
21
- # @param [String] The enum value in the form of the string
22
- # @return [String] The enum value
23
- def self.build_from_hash(value)
24
- new.build_from_hash(value)
25
- end
26
-
27
- # Builds the enum from string
28
- # @param [String] The enum value in the form of the string
29
- # @return [String] The enum value
30
- def build_from_hash(value)
31
- constantValues = BackupLocation.constants.select { |c| BackupLocation::const_get(c) == value }
32
- raise "Invalid ENUM value #{value} for class #BackupLocation" if constantValues.empty?
33
- value
34
- end
35
- end
36
- end
@@ -1,41 +0,0 @@
1
- =begin
2
- #IONOS DBaaS REST API
3
-
4
- #An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
5
-
6
- The version of the OpenAPI document: 0.0.1
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module IonoscloudDbaasPostgres
17
- class Location
18
- DE_FRA = "de/fra".freeze
19
- DE_TXL = "de/txl".freeze
20
- GB_LHR = "gb/lhr".freeze
21
- ES_VIT = "es/vit".freeze
22
- US_EWR = "us/ewr".freeze
23
- US_LAS = "us/las".freeze
24
-
25
- # Builds the enum from string
26
- # @param [String] The enum value in the form of the string
27
- # @return [String] The enum value
28
- def self.build_from_hash(value)
29
- new.build_from_hash(value)
30
- end
31
-
32
- # Builds the enum from string
33
- # @param [String] The enum value in the form of the string
34
- # @return [String] The enum value
35
- def build_from_hash(value)
36
- constantValues = Location.constants.select { |c| Location::const_get(c) == value }
37
- raise "Invalid ENUM value #{value} for class #Location" if constantValues.empty?
38
- value
39
- end
40
- end
41
- end
data/lib/test_driver.rb DELETED
@@ -1,119 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH << '.'
4
-
5
- require 'json'
6
-
7
- {
8
- 'ionoscloud' => 'Ionoscloud',
9
- 'ionoscloud-autoscaling' => 'IonoscloudAutoscaling',
10
- 'ionoscloud-dbaas-postgres' => 'IonoscloudDbaasPostgres',
11
- }.each do |module_name, namespace|
12
- begin
13
- require module_name
14
- Ionoscloud = Object.const_get(namespace)
15
- break
16
- rescue LoadError
17
- end
18
- end
19
-
20
- config = Ionoscloud::Configuration.new
21
-
22
- config.username = ENV['IONOS_USERNAME']
23
- config.password = ENV['IONOS_PASSWORD']
24
-
25
- api_client = Ionoscloud::ApiClient.new(config)
26
-
27
- def underscore_string(str)
28
- str.gsub(/::/, '/')
29
- .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
30
- .gsub(/([a-z\d])([A-Z])/, '\1_\2')
31
- .tr('-', '_')
32
- .downcase
33
- end
34
-
35
- def get_class(operation)
36
- Ionoscloud.constants.select do |c|
37
- Ionoscloud.const_get(c).is_a? Class and Ionoscloud.const_get(c).name.end_with? 'Api'
38
- end.each do |class_symbol|
39
- class_name = class_symbol.to_s
40
- methods = Ionoscloud.const_get(class_name).new.methods - Object.methods
41
- return Ionoscloud.const_get(class_name) if methods.map(&:to_s).include? operation
42
- end
43
- nil
44
- end
45
-
46
- input = gets.chomp
47
- testing_data = JSON.parse(input.gsub('\"', '"'))
48
-
49
- operation = testing_data['operation']
50
-
51
- begin
52
- if operation == 'waitForRequest'
53
- request_id = testing_data['params'][0]['value'].scan(%r{/requests/(\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)}).last.first
54
- api_client.wait_for_completion(request_id)
55
- puts JSON[{}]
56
- else
57
- method_name = "#{underscore_string(operation)}_with_http_info"
58
-
59
- cls = get_class method_name
60
-
61
- special_params_names = %w[pretty depth XContractNumber contractNumber offset limit start end]
62
-
63
- normal_params, special_params = (testing_data['params'].nil? ? [] : testing_data['params']).partition do |el|
64
- special_params_names.none? do |special_param_name|
65
- special_param_name == el['name']
66
- end
67
- end
68
-
69
- normal_params = normal_params.map { |el| el['value'] }
70
-
71
- special_params = special_params.each_with_object({}) do |current, total|
72
- total[current['name'].to_sym] = current['value']
73
- end
74
-
75
- response, status_code, headers = cls.new(api_client).public_send(
76
- method_name.to_sym,
77
- *normal_params,
78
- special_params
79
- )
80
-
81
- begin
82
- response = response.to_hash
83
- rescue NoMethodError
84
- end
85
-
86
- headers = headers.transform_values do |value|
87
- value.split(',', -1)
88
- end
89
-
90
- puts JSON[{
91
- 'result' => response,
92
- 'httpResponse' => {
93
- 'statusCode' => status_code,
94
- 'headers' => headers,
95
- 'body' => response
96
- }
97
- }]
98
- end
99
- rescue Ionoscloud::ApiError => e
100
- puts JSON[{
101
- 'result' => 'ApiException occured',
102
- 'httpResponse' => {
103
- 'statusCode' => e.code,
104
- 'headers' => e.response_headers,
105
- 'body' => JSON.parse(e.response_body)
106
- },
107
- 'error' => JSON.parse(e.response_body)
108
- }]
109
- rescue StandardError => e
110
- puts JSON[{
111
- 'result' => 'GeneralException occured',
112
- 'httpResponse' => {
113
- 'statusCode' => nil,
114
- 'headers' => nil,
115
- 'body' => nil
116
- },
117
- 'error' => e.inspect
118
- }]
119
- end