pnap_bmc_api 1.5.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/VERSION +1 -1
- data/docs/DeleteResult.md +1 -1
- data/docs/EsxiDatastoreConfiguration.md +18 -0
- data/docs/EsxiOsConfiguration.md +18 -0
- data/docs/OsConfiguration.md +2 -0
- data/docs/OsConfigurationCloudInit.md +1 -1
- data/docs/QuotasApi.md +6 -8
- data/docs/SSHKeysApi.md +12 -16
- data/docs/Server.md +11 -7
- data/docs/ServerCreate.md +3 -3
- data/docs/ServerNetworkUpdate.md +2 -2
- data/docs/ServerPrivateNetwork.md +3 -3
- data/docs/ServerProvision.md +38 -0
- data/docs/ServerPublicNetwork.md +2 -2
- data/docs/ServersApi.md +173 -111
- data/docs/StorageConfigurationRootPartition.md +2 -2
- data/lib/pnap_bmc_api/api/quotas_api.rb +11 -7
- data/lib/pnap_bmc_api/api/servers_api.rb +200 -75
- data/lib/pnap_bmc_api/api/ssh_keys_api.rb +21 -13
- data/lib/pnap_bmc_api/api_client.rb +26 -23
- data/lib/pnap_bmc_api/api_error.rb +2 -1
- data/lib/pnap_bmc_api/configuration.rb +28 -9
- data/lib/pnap_bmc_api/models/action_result.rb +16 -19
- data/lib/pnap_bmc_api/models/delete_result.rb +18 -19
- data/lib/pnap_bmc_api/models/delete_ssh_key_result.rb +18 -19
- data/lib/pnap_bmc_api/models/error.rb +16 -19
- data/lib/pnap_bmc_api/models/esxi_datastore_configuration.rb +262 -0
- data/lib/pnap_bmc_api/models/{quota_edit_limit_request_details_all_of.rb → esxi_os_configuration.rb} +25 -36
- data/lib/pnap_bmc_api/models/ip_blocks_configuration.rb +19 -20
- data/lib/pnap_bmc_api/models/network_configuration.rb +14 -19
- data/lib/pnap_bmc_api/models/os_configuration.rb +29 -21
- data/lib/pnap_bmc_api/models/os_configuration_cloud_init.rb +15 -20
- data/lib/pnap_bmc_api/models/os_configuration_map.rb +14 -19
- data/lib/pnap_bmc_api/models/os_configuration_map_esxi.rb +19 -20
- data/lib/pnap_bmc_api/models/os_configuration_map_proxmox.rb +19 -20
- data/lib/pnap_bmc_api/models/os_configuration_netris_controller.rb +14 -19
- data/lib/pnap_bmc_api/models/os_configuration_netris_softgate.rb +25 -22
- data/lib/pnap_bmc_api/models/os_configuration_windows.rb +19 -20
- data/lib/pnap_bmc_api/models/private_network_configuration.rb +14 -19
- data/lib/pnap_bmc_api/models/public_network_configuration.rb +14 -19
- data/lib/pnap_bmc_api/models/quota.rb +30 -19
- data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +39 -19
- data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +42 -21
- data/lib/pnap_bmc_api/models/relinquish_ip_block.rb +14 -19
- data/lib/pnap_bmc_api/models/reset_result.rb +16 -19
- data/lib/pnap_bmc_api/models/server.rb +79 -33
- data/lib/pnap_bmc_api/models/server_create.rb +29 -22
- data/lib/pnap_bmc_api/models/server_ip_block.rb +16 -19
- data/lib/pnap_bmc_api/models/server_network_update.rb +15 -20
- data/lib/pnap_bmc_api/models/server_patch.rb +27 -24
- data/lib/pnap_bmc_api/models/server_private_network.rb +23 -22
- data/lib/pnap_bmc_api/models/server_provision.rb +395 -0
- data/lib/pnap_bmc_api/models/server_public_network.rb +17 -20
- data/lib/pnap_bmc_api/models/server_reserve.rb +16 -19
- data/lib/pnap_bmc_api/models/server_reset.rb +14 -19
- data/lib/pnap_bmc_api/models/ssh_key.rb +28 -19
- data/lib/pnap_bmc_api/models/ssh_key_create.rb +52 -19
- data/lib/pnap_bmc_api/models/ssh_key_update.rb +29 -19
- data/lib/pnap_bmc_api/models/storage_configuration.rb +14 -19
- data/lib/pnap_bmc_api/models/storage_configuration_root_partition.rb +14 -19
- data/lib/pnap_bmc_api/models/tag_assignment.rb +20 -19
- data/lib/pnap_bmc_api/models/tag_assignment_request.rb +16 -19
- data/lib/pnap_bmc_api/version.rb +1 -1
- data/lib/pnap_bmc_api.rb +4 -2
- data/pnap_bmc_api.gemspec +2 -2
- data/spec/api/quotas_api_spec.rb +6 -6
- data/spec/api/servers_api_spec.rb +109 -36
- data/spec/api/ssh_keys_api_spec.rb +9 -9
- data/spec/models/action_result_spec.rb +6 -4
- data/spec/models/delete_result_spec.rb +7 -5
- data/spec/models/delete_ssh_key_result_spec.rb +7 -5
- data/spec/models/error_spec.rb +7 -5
- data/spec/models/esxi_datastore_configuration_spec.rb +36 -0
- data/spec/models/esxi_os_configuration_spec.rb +36 -0
- data/spec/models/ip_blocks_configuration_spec.rb +7 -5
- data/spec/models/network_configuration_spec.rb +19 -5
- data/spec/models/os_configuration_cloud_init_spec.rb +5 -3
- data/spec/models/os_configuration_map_esxi_spec.rb +8 -6
- data/spec/models/os_configuration_map_proxmox_spec.rb +8 -6
- data/spec/models/os_configuration_map_spec.rb +8 -6
- data/spec/models/os_configuration_netris_controller_spec.rb +7 -5
- data/spec/models/os_configuration_netris_softgate_spec.rb +8 -6
- data/spec/models/os_configuration_spec.rb +39 -7
- data/spec/models/os_configuration_windows_spec.rb +6 -4
- data/spec/models/private_network_configuration_spec.rb +8 -6
- data/spec/models/public_network_configuration_spec.rb +6 -4
- data/spec/models/quota_edit_limit_request_details_spec.rb +8 -6
- data/spec/models/quota_edit_limit_request_spec.rb +7 -5
- data/spec/models/quota_spec.rb +13 -15
- data/spec/models/relinquish_ip_block_spec.rb +6 -4
- data/spec/models/reset_result_spec.rb +8 -6
- data/spec/models/server_create_spec.rb +25 -17
- data/spec/models/server_ip_block_spec.rb +7 -5
- data/spec/models/server_network_update_spec.rb +5 -3
- data/spec/models/server_patch_spec.rb +7 -5
- data/spec/models/server_private_network_spec.rb +9 -7
- data/spec/models/server_provision_spec.rb +96 -0
- data/spec/models/server_public_network_spec.rb +8 -6
- data/spec/models/server_reserve_spec.rb +6 -4
- data/spec/models/server_reset_spec.rb +9 -7
- data/spec/models/server_spec.rb +47 -27
- data/spec/models/ssh_key_create_spec.rb +8 -6
- data/spec/models/ssh_key_spec.rb +12 -10
- data/spec/models/ssh_key_update_spec.rb +7 -5
- data/spec/models/storage_configuration_root_partition_spec.rb +6 -4
- data/spec/models/storage_configuration_spec.rb +5 -3
- data/spec/models/tag_assignment_request_spec.rb +7 -5
- data/spec/models/tag_assignment_spec.rb +10 -8
- data/spec/spec_helper.rb +1 -1
- metadata +43 -39
- data/docs/QuotaEditLimitRequestDetailsAllOf.md +0 -18
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/quota_edit_limit_request_details_all_of_spec.rb +0 -34
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -56,8 +56,7 @@ module BmcApi
|
|
56
56
|
# List of class defined in allOf (OpenAPI v3)
|
57
57
|
def self.openapi_all_of
|
58
58
|
[
|
59
|
-
:'QuotaEditLimitRequest'
|
60
|
-
:'QuotaEditLimitRequestDetailsAllOf'
|
59
|
+
:'QuotaEditLimitRequest'
|
61
60
|
]
|
62
61
|
end
|
63
62
|
|
@@ -78,20 +77,27 @@ module BmcApi
|
|
78
77
|
|
79
78
|
if attributes.key?(:'limit')
|
80
79
|
self.limit = attributes[:'limit']
|
80
|
+
else
|
81
|
+
self.limit = nil
|
81
82
|
end
|
82
83
|
|
83
84
|
if attributes.key?(:'reason')
|
84
85
|
self.reason = attributes[:'reason']
|
86
|
+
else
|
87
|
+
self.reason = nil
|
85
88
|
end
|
86
89
|
|
87
90
|
if attributes.key?(:'requested_on')
|
88
91
|
self.requested_on = attributes[:'requested_on']
|
92
|
+
else
|
93
|
+
self.requested_on = nil
|
89
94
|
end
|
90
95
|
end
|
91
96
|
|
92
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
93
98
|
# @return Array for valid properties with the reasons
|
94
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
95
101
|
invalid_properties = Array.new
|
96
102
|
if @limit.nil?
|
97
103
|
invalid_properties.push('invalid value for "limit", limit cannot be nil.')
|
@@ -105,6 +111,11 @@ module BmcApi
|
|
105
111
|
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
106
112
|
end
|
107
113
|
|
114
|
+
pattern = Regexp.new(/^(?!\s*$).+/)
|
115
|
+
if @reason !~ pattern
|
116
|
+
invalid_properties.push("invalid value for \"reason\", must conform to the pattern #{pattern}.")
|
117
|
+
end
|
118
|
+
|
108
119
|
if @requested_on.nil?
|
109
120
|
invalid_properties.push('invalid value for "requested_on", requested_on cannot be nil.')
|
110
121
|
end
|
@@ -115,9 +126,11 @@ module BmcApi
|
|
115
126
|
# Check to see if the all the properties in the model are valid
|
116
127
|
# @return true if the model is valid
|
117
128
|
def valid?
|
129
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
118
130
|
return false if @limit.nil?
|
119
131
|
return false if @limit < 0
|
120
132
|
return false if @reason.nil?
|
133
|
+
return false if @reason !~ Regexp.new(/^(?!\s*$).+/)
|
121
134
|
return false if @requested_on.nil?
|
122
135
|
true
|
123
136
|
end
|
@@ -136,6 +149,21 @@ module BmcApi
|
|
136
149
|
@limit = limit
|
137
150
|
end
|
138
151
|
|
152
|
+
# Custom attribute writer method with validation
|
153
|
+
# @param [Object] reason Value to be assigned
|
154
|
+
def reason=(reason)
|
155
|
+
if reason.nil?
|
156
|
+
fail ArgumentError, 'reason cannot be nil'
|
157
|
+
end
|
158
|
+
|
159
|
+
pattern = Regexp.new(/^(?!\s*$).+/)
|
160
|
+
if reason !~ pattern
|
161
|
+
fail ArgumentError, "invalid value for \"reason\", must conform to the pattern #{pattern}."
|
162
|
+
end
|
163
|
+
|
164
|
+
@reason = reason
|
165
|
+
end
|
166
|
+
|
139
167
|
# Checks equality by comparing each attribute.
|
140
168
|
# @param [Object] Object to be compared
|
141
169
|
def ==(o)
|
@@ -162,37 +190,30 @@ module BmcApi
|
|
162
190
|
# @param [Hash] attributes Model attributes in the form of hash
|
163
191
|
# @return [Object] Returns the model itself
|
164
192
|
def self.build_from_hash(attributes)
|
165
|
-
new.build_from_hash(attributes)
|
166
|
-
end
|
167
|
-
|
168
|
-
# Builds the object from hash
|
169
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
170
|
-
# @return [Object] Returns the model itself
|
171
|
-
def build_from_hash(attributes)
|
172
193
|
return nil unless attributes.is_a?(Hash)
|
173
194
|
attributes = attributes.transform_keys(&:to_sym)
|
174
|
-
|
175
|
-
|
176
|
-
|
195
|
+
transformed_hash = {}
|
196
|
+
openapi_types.each_pair do |key, type|
|
197
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
198
|
+
transformed_hash["#{key}"] = nil
|
177
199
|
elsif type =~ /\AArray<(.*)>/i
|
178
200
|
# check to ensure the input is an array given that the attribute
|
179
201
|
# is documented as an array but the input is not
|
180
|
-
if attributes[
|
181
|
-
|
202
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
203
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
182
204
|
end
|
183
|
-
elsif !attributes[
|
184
|
-
|
205
|
+
elsif !attributes[attribute_map[key]].nil?
|
206
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
185
207
|
end
|
186
208
|
end
|
187
|
-
|
188
|
-
self
|
209
|
+
new(transformed_hash)
|
189
210
|
end
|
190
211
|
|
191
212
|
# Deserializes the data based on type
|
192
213
|
# @param string type Data type
|
193
214
|
# @param string value Value to be deserialized
|
194
215
|
# @return [Object] Deserialized data
|
195
|
-
def _deserialize(type, value)
|
216
|
+
def self._deserialize(type, value)
|
196
217
|
case type.to_sym
|
197
218
|
when :Time
|
198
219
|
Time.parse(value)
|
@@ -227,7 +248,7 @@ module BmcApi
|
|
227
248
|
else # model
|
228
249
|
# models (e.g. Pet) or oneOf
|
229
250
|
klass = BmcApi.const_get(type)
|
230
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
251
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
231
252
|
end
|
232
253
|
end
|
233
254
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -69,6 +69,7 @@ module BmcApi
|
|
69
69
|
# Show invalid properties with the reasons. Usually used together with valid?
|
70
70
|
# @return Array for valid properties with the reasons
|
71
71
|
def list_invalid_properties
|
72
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
72
73
|
invalid_properties = Array.new
|
73
74
|
invalid_properties
|
74
75
|
end
|
@@ -76,6 +77,7 @@ module BmcApi
|
|
76
77
|
# Check to see if the all the properties in the model are valid
|
77
78
|
# @return true if the model is valid
|
78
79
|
def valid?
|
80
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
79
81
|
true
|
80
82
|
end
|
81
83
|
|
@@ -103,37 +105,30 @@ module BmcApi
|
|
103
105
|
# @param [Hash] attributes Model attributes in the form of hash
|
104
106
|
# @return [Object] Returns the model itself
|
105
107
|
def self.build_from_hash(attributes)
|
106
|
-
new.build_from_hash(attributes)
|
107
|
-
end
|
108
|
-
|
109
|
-
# Builds the object from hash
|
110
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
-
# @return [Object] Returns the model itself
|
112
|
-
def build_from_hash(attributes)
|
113
108
|
return nil unless attributes.is_a?(Hash)
|
114
109
|
attributes = attributes.transform_keys(&:to_sym)
|
115
|
-
|
116
|
-
|
117
|
-
|
110
|
+
transformed_hash = {}
|
111
|
+
openapi_types.each_pair do |key, type|
|
112
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
113
|
+
transformed_hash["#{key}"] = nil
|
118
114
|
elsif type =~ /\AArray<(.*)>/i
|
119
115
|
# check to ensure the input is an array given that the attribute
|
120
116
|
# is documented as an array but the input is not
|
121
|
-
if attributes[
|
122
|
-
|
117
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
118
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
123
119
|
end
|
124
|
-
elsif !attributes[
|
125
|
-
|
120
|
+
elsif !attributes[attribute_map[key]].nil?
|
121
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
126
122
|
end
|
127
123
|
end
|
128
|
-
|
129
|
-
self
|
124
|
+
new(transformed_hash)
|
130
125
|
end
|
131
126
|
|
132
127
|
# Deserializes the data based on type
|
133
128
|
# @param string type Data type
|
134
129
|
# @param string value Value to be deserialized
|
135
130
|
# @return [Object] Deserialized data
|
136
|
-
def _deserialize(type, value)
|
131
|
+
def self._deserialize(type, value)
|
137
132
|
case type.to_sym
|
138
133
|
when :Time
|
139
134
|
Time.parse(value)
|
@@ -168,7 +163,7 @@ module BmcApi
|
|
168
163
|
else # model
|
169
164
|
# models (e.g. Pet) or oneOf
|
170
165
|
klass = BmcApi.const_get(type)
|
171
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
166
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
172
167
|
end
|
173
168
|
end
|
174
169
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -70,6 +70,8 @@ module BmcApi
|
|
70
70
|
|
71
71
|
if attributes.key?(:'result')
|
72
72
|
self.result = attributes[:'result']
|
73
|
+
else
|
74
|
+
self.result = nil
|
73
75
|
end
|
74
76
|
|
75
77
|
if attributes.key?(:'password')
|
@@ -84,6 +86,7 @@ module BmcApi
|
|
84
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
85
87
|
# @return Array for valid properties with the reasons
|
86
88
|
def list_invalid_properties
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
87
90
|
invalid_properties = Array.new
|
88
91
|
if @result.nil?
|
89
92
|
invalid_properties.push('invalid value for "result", result cannot be nil.')
|
@@ -95,6 +98,7 @@ module BmcApi
|
|
95
98
|
# Check to see if the all the properties in the model are valid
|
96
99
|
# @return true if the model is valid
|
97
100
|
def valid?
|
101
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
98
102
|
return false if @result.nil?
|
99
103
|
true
|
100
104
|
end
|
@@ -125,37 +129,30 @@ module BmcApi
|
|
125
129
|
# @param [Hash] attributes Model attributes in the form of hash
|
126
130
|
# @return [Object] Returns the model itself
|
127
131
|
def self.build_from_hash(attributes)
|
128
|
-
new.build_from_hash(attributes)
|
129
|
-
end
|
130
|
-
|
131
|
-
# Builds the object from hash
|
132
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
-
# @return [Object] Returns the model itself
|
134
|
-
def build_from_hash(attributes)
|
135
132
|
return nil unless attributes.is_a?(Hash)
|
136
133
|
attributes = attributes.transform_keys(&:to_sym)
|
137
|
-
|
138
|
-
|
139
|
-
|
134
|
+
transformed_hash = {}
|
135
|
+
openapi_types.each_pair do |key, type|
|
136
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
137
|
+
transformed_hash["#{key}"] = nil
|
140
138
|
elsif type =~ /\AArray<(.*)>/i
|
141
139
|
# check to ensure the input is an array given that the attribute
|
142
140
|
# is documented as an array but the input is not
|
143
|
-
if attributes[
|
144
|
-
|
141
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
142
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
145
143
|
end
|
146
|
-
elsif !attributes[
|
147
|
-
|
144
|
+
elsif !attributes[attribute_map[key]].nil?
|
145
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
148
146
|
end
|
149
147
|
end
|
150
|
-
|
151
|
-
self
|
148
|
+
new(transformed_hash)
|
152
149
|
end
|
153
150
|
|
154
151
|
# Deserializes the data based on type
|
155
152
|
# @param string type Data type
|
156
153
|
# @param string value Value to be deserialized
|
157
154
|
# @return [Object] Deserialized data
|
158
|
-
def _deserialize(type, value)
|
155
|
+
def self._deserialize(type, value)
|
159
156
|
case type.to_sym
|
160
157
|
when :Time
|
161
158
|
Time.parse(value)
|
@@ -190,7 +187,7 @@ module BmcApi
|
|
190
187
|
else # model
|
191
188
|
# models (e.g. Pet) or oneOf
|
192
189
|
klass = BmcApi.const_get(type)
|
193
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
190
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
194
191
|
end
|
195
192
|
end
|
196
193
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,7 +19,7 @@ module BmcApi
|
|
19
19
|
# The unique identifier of the server.
|
20
20
|
attr_accessor :id
|
21
21
|
|
22
|
-
# The status of the server.
|
22
|
+
# The status of the server. Can have one of the following values: `creating` , `powered-on` , `powered-off` , `rebooting` , `resetting` , `deleting` , `reserved` , `error` or `reinstating`.
|
23
23
|
attr_accessor :status
|
24
24
|
|
25
25
|
# Hostname of server.
|
@@ -28,10 +28,10 @@ module BmcApi
|
|
28
28
|
# Description of server.
|
29
29
|
attr_accessor :description
|
30
30
|
|
31
|
-
# The server’s OS ID used when the server was created. Currently this field should be set to either `ubuntu/bionic`, `ubuntu/focal`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70`, `esxi/esxi80`, `debian/bullseye`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g` or `netris/
|
31
|
+
# The server’s OS ID used when the server was created. Currently this field should be set to either `ubuntu/bionic`, `ubuntu/focal`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `windows/srv2022std`, `windows/srv2022dc`, `esxi/esxi70`, `esxi/esxi80`, `almalinux/almalinux8`, `rockylinux/rockylinux8`, `almalinux/almalinux9`, `rockylinux/rockylinux9`, `debian/bullseye`, `debian/bookworm`, `proxmox/bullseye`, `proxmox/proxmox8`, `netris/controller`, `netris/softgate_1g`, `netris/softgate_10g` or `netris/softgate_25g`.
|
32
32
|
attr_accessor :os
|
33
33
|
|
34
|
-
# Server type ID. Cannot be changed once a server is created. Currently this field should be set to either `s0.d1.small`, `s0.d1.medium`, `s1.c1.small`, `s1.c1.medium`, `s1.c2.medium`, `s1.c2.large`, `s1.e1.small`, `s1.e1.medium`, `s1.e1.large`, `s2.c1.small`, `s2.c1.medium`, `s2.c1.large`, `s2.c2.small`, `s2.c2.medium`, `s2.c2.large`, `d1.c1.small`, `d1.c2.small`, `d1.c3.small`, `d1.c4.small`, `d1.c1.medium`, `d1.c2.medium`, `d1.c3.medium`, `d1.c4.medium`, `d1.c1.large`, `d1.c2.large`, `d1.c3.large`, `d1.c4.large`, `d1.m1.medium`, `d1.m2.medium`, `d1.m3.medium`, `d1.m4.medium`, `d2.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.
|
34
|
+
# Server type ID. Cannot be changed once a server is created. Currently this field should be set to either `s0.d1.small`, `s0.d1.medium`, `s1.c1.small`, `s1.c1.medium`, `s1.c2.medium`, `s1.c2.large`, `s1.e1.small`, `s1.e1.medium`, `s1.e1.large`, `s2.c1.small`, `s2.c1.medium`, `s2.c1.large`, `s2.c2.small`, `s2.c2.medium`, `s2.c2.large`, `d1.c1.small`, `d1.c2.small`, `d1.c3.small`, `d1.c4.small`, `d1.c1.medium`, `d1.c2.medium`, `d1.c3.medium`, `d1.c4.medium`, `d1.c1.large`, `d1.c2.large`, `d1.c3.large`, `d1.c4.large`, `d1.m1.medium`, `d1.m2.medium`, `d1.m3.medium`, `d1.m4.medium`, `d2.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.xlarge`, `d2.m2.xxlarge`, `d2.m3.xlarge`, `d2.m4.xlarge`, `d2.m5.xlarge`, `d2.c4.db1.pliops1`, `d3.m4.xlarge`, `d3.m5.xlarge`, `d3.m6.xlarge`, `a1.c5.large`, `d3.s5.xlarge`, `d3.m4.xxlarge`, `d3.m5.xxlarge`, `d3.m6.xxlarge`, `s3.c3.medium`, `s3.c3.large`, `d3.c4.medium`, `d3.c5.medium` or `d3.c6.medium`.
|
35
35
|
attr_accessor :type
|
36
36
|
|
37
37
|
# Server location ID. Cannot be changed once a server is created. Currently this field should be set to `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` or `AUS`.
|
@@ -88,6 +88,12 @@ module BmcApi
|
|
88
88
|
|
89
89
|
attr_accessor :storage_configuration
|
90
90
|
|
91
|
+
# Unique identifier of the server to which the reservation has been transferred.
|
92
|
+
attr_accessor :superseded_by
|
93
|
+
|
94
|
+
# Unique identifier of the server from which the reservation has been transferred.
|
95
|
+
attr_accessor :supersedes
|
96
|
+
|
91
97
|
# Attribute mapping from ruby-style variable name to JSON key.
|
92
98
|
def self.attribute_map
|
93
99
|
{
|
@@ -115,7 +121,9 @@ module BmcApi
|
|
115
121
|
:'provisioned_on' => :'provisionedOn',
|
116
122
|
:'os_configuration' => :'osConfiguration',
|
117
123
|
:'network_configuration' => :'networkConfiguration',
|
118
|
-
:'storage_configuration' => :'storageConfiguration'
|
124
|
+
:'storage_configuration' => :'storageConfiguration',
|
125
|
+
:'superseded_by' => :'supersededBy',
|
126
|
+
:'supersedes' => :'supersedes'
|
119
127
|
}
|
120
128
|
end
|
121
129
|
|
@@ -151,7 +159,9 @@ module BmcApi
|
|
151
159
|
:'provisioned_on' => :'Time',
|
152
160
|
:'os_configuration' => :'OsConfiguration',
|
153
161
|
:'network_configuration' => :'NetworkConfiguration',
|
154
|
-
:'storage_configuration' => :'StorageConfiguration'
|
162
|
+
:'storage_configuration' => :'StorageConfiguration',
|
163
|
+
:'superseded_by' => :'String',
|
164
|
+
:'supersedes' => :'String'
|
155
165
|
}
|
156
166
|
end
|
157
167
|
|
@@ -178,14 +188,20 @@ module BmcApi
|
|
178
188
|
|
179
189
|
if attributes.key?(:'id')
|
180
190
|
self.id = attributes[:'id']
|
191
|
+
else
|
192
|
+
self.id = nil
|
181
193
|
end
|
182
194
|
|
183
195
|
if attributes.key?(:'status')
|
184
196
|
self.status = attributes[:'status']
|
197
|
+
else
|
198
|
+
self.status = nil
|
185
199
|
end
|
186
200
|
|
187
201
|
if attributes.key?(:'hostname')
|
188
202
|
self.hostname = attributes[:'hostname']
|
203
|
+
else
|
204
|
+
self.hostname = nil
|
189
205
|
end
|
190
206
|
|
191
207
|
if attributes.key?(:'description')
|
@@ -198,40 +214,58 @@ module BmcApi
|
|
198
214
|
|
199
215
|
if attributes.key?(:'type')
|
200
216
|
self.type = attributes[:'type']
|
217
|
+
else
|
218
|
+
self.type = nil
|
201
219
|
end
|
202
220
|
|
203
221
|
if attributes.key?(:'location')
|
204
222
|
self.location = attributes[:'location']
|
223
|
+
else
|
224
|
+
self.location = nil
|
205
225
|
end
|
206
226
|
|
207
227
|
if attributes.key?(:'cpu')
|
208
228
|
self.cpu = attributes[:'cpu']
|
229
|
+
else
|
230
|
+
self.cpu = nil
|
209
231
|
end
|
210
232
|
|
211
233
|
if attributes.key?(:'cpu_count')
|
212
234
|
self.cpu_count = attributes[:'cpu_count']
|
235
|
+
else
|
236
|
+
self.cpu_count = nil
|
213
237
|
end
|
214
238
|
|
215
239
|
if attributes.key?(:'cores_per_cpu')
|
216
240
|
self.cores_per_cpu = attributes[:'cores_per_cpu']
|
241
|
+
else
|
242
|
+
self.cores_per_cpu = nil
|
217
243
|
end
|
218
244
|
|
219
245
|
if attributes.key?(:'cpu_frequency')
|
220
246
|
self.cpu_frequency = attributes[:'cpu_frequency']
|
247
|
+
else
|
248
|
+
self.cpu_frequency = nil
|
221
249
|
end
|
222
250
|
|
223
251
|
if attributes.key?(:'ram')
|
224
252
|
self.ram = attributes[:'ram']
|
253
|
+
else
|
254
|
+
self.ram = nil
|
225
255
|
end
|
226
256
|
|
227
257
|
if attributes.key?(:'storage')
|
228
258
|
self.storage = attributes[:'storage']
|
259
|
+
else
|
260
|
+
self.storage = nil
|
229
261
|
end
|
230
262
|
|
231
263
|
if attributes.key?(:'private_ip_addresses')
|
232
264
|
if (value = attributes[:'private_ip_addresses']).is_a?(Array)
|
233
265
|
self.private_ip_addresses = value
|
234
266
|
end
|
267
|
+
else
|
268
|
+
self.private_ip_addresses = nil
|
235
269
|
end
|
236
270
|
|
237
271
|
if attributes.key?(:'public_ip_addresses')
|
@@ -280,16 +314,29 @@ module BmcApi
|
|
280
314
|
|
281
315
|
if attributes.key?(:'network_configuration')
|
282
316
|
self.network_configuration = attributes[:'network_configuration']
|
317
|
+
else
|
318
|
+
self.network_configuration = nil
|
283
319
|
end
|
284
320
|
|
285
321
|
if attributes.key?(:'storage_configuration')
|
286
322
|
self.storage_configuration = attributes[:'storage_configuration']
|
323
|
+
else
|
324
|
+
self.storage_configuration = nil
|
325
|
+
end
|
326
|
+
|
327
|
+
if attributes.key?(:'superseded_by')
|
328
|
+
self.superseded_by = attributes[:'superseded_by']
|
329
|
+
end
|
330
|
+
|
331
|
+
if attributes.key?(:'supersedes')
|
332
|
+
self.supersedes = attributes[:'supersedes']
|
287
333
|
end
|
288
334
|
end
|
289
335
|
|
290
336
|
# Show invalid properties with the reasons. Usually used together with valid?
|
291
337
|
# @return Array for valid properties with the reasons
|
292
338
|
def list_invalid_properties
|
339
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
293
340
|
invalid_properties = Array.new
|
294
341
|
if @id.nil?
|
295
342
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
@@ -320,10 +367,6 @@ module BmcApi
|
|
320
367
|
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 250.')
|
321
368
|
end
|
322
369
|
|
323
|
-
if @os.nil?
|
324
|
-
invalid_properties.push('invalid value for "os", os cannot be nil.')
|
325
|
-
end
|
326
|
-
|
327
370
|
if @type.nil?
|
328
371
|
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
329
372
|
end
|
@@ -398,6 +441,7 @@ module BmcApi
|
|
398
441
|
# Check to see if the all the properties in the model are valid
|
399
442
|
# @return true if the model is valid
|
400
443
|
def valid?
|
444
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
401
445
|
return false if @id.nil?
|
402
446
|
return false if @status.nil?
|
403
447
|
return false if @hostname.nil?
|
@@ -405,7 +449,6 @@ module BmcApi
|
|
405
449
|
return false if @hostname.to_s.length < 1
|
406
450
|
return false if @hostname !~ Regexp.new(/^(?=.*[a-zA-Z])([a-zA-Z0-9().-])+$/)
|
407
451
|
return false if !@description.nil? && @description.to_s.length > 250
|
408
|
-
return false if @os.nil?
|
409
452
|
return false if @type.nil?
|
410
453
|
return false if @location.nil?
|
411
454
|
return false if @cpu.nil?
|
@@ -452,7 +495,11 @@ module BmcApi
|
|
452
495
|
# Custom attribute writer method with validation
|
453
496
|
# @param [Object] description Value to be assigned
|
454
497
|
def description=(description)
|
455
|
-
if
|
498
|
+
if description.nil?
|
499
|
+
fail ArgumentError, 'description cannot be nil'
|
500
|
+
end
|
501
|
+
|
502
|
+
if description.to_s.length > 250
|
456
503
|
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 250.'
|
457
504
|
end
|
458
505
|
|
@@ -518,7 +565,11 @@ module BmcApi
|
|
518
565
|
# Custom attribute writer method with validation
|
519
566
|
# @param [Object] public_ip_addresses Value to be assigned
|
520
567
|
def public_ip_addresses=(public_ip_addresses)
|
521
|
-
if
|
568
|
+
if public_ip_addresses.nil?
|
569
|
+
fail ArgumentError, 'public_ip_addresses cannot be nil'
|
570
|
+
end
|
571
|
+
|
572
|
+
if public_ip_addresses.length < 0
|
522
573
|
fail ArgumentError, 'invalid value for "public_ip_addresses", number of items must be greater than or equal to 0.'
|
523
574
|
end
|
524
575
|
|
@@ -554,7 +605,9 @@ module BmcApi
|
|
554
605
|
provisioned_on == o.provisioned_on &&
|
555
606
|
os_configuration == o.os_configuration &&
|
556
607
|
network_configuration == o.network_configuration &&
|
557
|
-
storage_configuration == o.storage_configuration
|
608
|
+
storage_configuration == o.storage_configuration &&
|
609
|
+
superseded_by == o.superseded_by &&
|
610
|
+
supersedes == o.supersedes
|
558
611
|
end
|
559
612
|
|
560
613
|
# @see the `==` method
|
@@ -566,44 +619,37 @@ module BmcApi
|
|
566
619
|
# Calculates hash code according to all attributes.
|
567
620
|
# @return [Integer] Hash code
|
568
621
|
def hash
|
569
|
-
[id, status, hostname, description, os, type, location, cpu, cpu_count, cores_per_cpu, cpu_frequency, ram, storage, private_ip_addresses, public_ip_addresses, reservation_id, pricing_model, password, network_type, cluster_id, tags, provisioned_on, os_configuration, network_configuration, storage_configuration].hash
|
622
|
+
[id, status, hostname, description, os, type, location, cpu, cpu_count, cores_per_cpu, cpu_frequency, ram, storage, private_ip_addresses, public_ip_addresses, reservation_id, pricing_model, password, network_type, cluster_id, tags, provisioned_on, os_configuration, network_configuration, storage_configuration, superseded_by, supersedes].hash
|
570
623
|
end
|
571
624
|
|
572
625
|
# Builds the object from hash
|
573
626
|
# @param [Hash] attributes Model attributes in the form of hash
|
574
627
|
# @return [Object] Returns the model itself
|
575
628
|
def self.build_from_hash(attributes)
|
576
|
-
new.build_from_hash(attributes)
|
577
|
-
end
|
578
|
-
|
579
|
-
# Builds the object from hash
|
580
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
581
|
-
# @return [Object] Returns the model itself
|
582
|
-
def build_from_hash(attributes)
|
583
629
|
return nil unless attributes.is_a?(Hash)
|
584
630
|
attributes = attributes.transform_keys(&:to_sym)
|
585
|
-
|
586
|
-
|
587
|
-
|
631
|
+
transformed_hash = {}
|
632
|
+
openapi_types.each_pair do |key, type|
|
633
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
634
|
+
transformed_hash["#{key}"] = nil
|
588
635
|
elsif type =~ /\AArray<(.*)>/i
|
589
636
|
# check to ensure the input is an array given that the attribute
|
590
637
|
# is documented as an array but the input is not
|
591
|
-
if attributes[
|
592
|
-
|
638
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
639
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
593
640
|
end
|
594
|
-
elsif !attributes[
|
595
|
-
|
641
|
+
elsif !attributes[attribute_map[key]].nil?
|
642
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
596
643
|
end
|
597
644
|
end
|
598
|
-
|
599
|
-
self
|
645
|
+
new(transformed_hash)
|
600
646
|
end
|
601
647
|
|
602
648
|
# Deserializes the data based on type
|
603
649
|
# @param string type Data type
|
604
650
|
# @param string value Value to be deserialized
|
605
651
|
# @return [Object] Deserialized data
|
606
|
-
def _deserialize(type, value)
|
652
|
+
def self._deserialize(type, value)
|
607
653
|
case type.to_sym
|
608
654
|
when :Time
|
609
655
|
Time.parse(value)
|
@@ -638,7 +684,7 @@ module BmcApi
|
|
638
684
|
else # model
|
639
685
|
# models (e.g. Pet) or oneOf
|
640
686
|
klass = BmcApi.const_get(type)
|
641
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
687
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
642
688
|
end
|
643
689
|
end
|
644
690
|
|