pnap_bmc_api 1.3.0 → 1.5.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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -0
  3. data/VERSION +1 -1
  4. data/docs/IpBlocksConfiguration.md +1 -1
  5. data/docs/OsConfiguration.md +8 -4
  6. data/docs/OsConfigurationMapEsxi.md +2 -2
  7. data/docs/OsConfigurationMapProxmox.md +2 -2
  8. data/docs/OsConfigurationNetrisController.md +22 -0
  9. data/docs/OsConfigurationNetrisSoftgate.md +24 -0
  10. data/docs/PrivateNetworkConfiguration.md +1 -1
  11. data/docs/QuotaEditLimitRequest.md +1 -1
  12. data/docs/QuotaEditLimitRequestDetails.md +1 -1
  13. data/docs/Server.md +7 -5
  14. data/docs/ServerCreate.md +6 -4
  15. data/docs/ServerIpBlock.md +1 -1
  16. data/docs/ServerNetworkUpdate.md +18 -0
  17. data/docs/ServerPrivateNetwork.md +1 -1
  18. data/docs/ServerPublicNetwork.md +1 -1
  19. data/docs/ServersApi.md +156 -0
  20. data/docs/StorageConfiguration.md +18 -0
  21. data/docs/StorageConfigurationRootPartition.md +20 -0
  22. data/lib/pnap_bmc_api/api/servers_api.rb +158 -0
  23. data/lib/pnap_bmc_api/models/ip_blocks_configuration.rb +1 -1
  24. data/lib/pnap_bmc_api/models/os_configuration.rb +22 -4
  25. data/lib/pnap_bmc_api/models/os_configuration_map_esxi.rb +2 -2
  26. data/lib/pnap_bmc_api/models/os_configuration_map_proxmox.rb +2 -2
  27. data/lib/pnap_bmc_api/models/os_configuration_netris_controller.rb +241 -0
  28. data/lib/pnap_bmc_api/models/os_configuration_netris_softgate.rb +294 -0
  29. data/lib/pnap_bmc_api/models/private_network_configuration.rb +1 -1
  30. data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +1 -1
  31. data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +1 -1
  32. data/lib/pnap_bmc_api/models/server.rb +22 -8
  33. data/lib/pnap_bmc_api/models/server_create.rb +16 -7
  34. data/lib/pnap_bmc_api/models/server_ip_block.rb +1 -1
  35. data/lib/pnap_bmc_api/models/server_network_update.rb +223 -0
  36. data/lib/pnap_bmc_api/models/server_private_network.rb +6 -6
  37. data/lib/pnap_bmc_api/models/server_public_network.rb +1 -1
  38. data/lib/pnap_bmc_api/models/storage_configuration.rb +220 -0
  39. data/lib/pnap_bmc_api/models/storage_configuration_root_partition.rb +235 -0
  40. data/lib/pnap_bmc_api.rb +5 -0
  41. data/spec/models/os_configuration_netris_controller_spec.rb +46 -0
  42. data/spec/models/os_configuration_netris_softgate_spec.rb +52 -0
  43. data/spec/models/server_network_update_spec.rb +34 -0
  44. data/spec/models/storage_configuration_root_partition_spec.rb +40 -0
  45. data/spec/models/storage_configuration_spec.rb +34 -0
  46. metadata +48 -28
@@ -0,0 +1,294 @@
1
+ =begin
2
+ #Bare Metal Cloud API
3
+
4
+ #Create, power off, power on, reset, reboot, or shut down your server with the Bare Metal Cloud API. Deprovision servers, get or edit SSH key details, assign public IPs, assign servers to networks and a lot more. Manage your infrastructure more efficiently using just a few simple API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/how-to-deploy-bare-metal-cloud-server' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/bmc/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.1.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BmcApi
17
+ # Netris Softgate configuration properties. Follow <a href='https://phoenixnap.com/kb/netris-bare-metal-cloud#deploy-netris-softgate' target='_blank'>instructions</a> for retrieving the required details.
18
+ class OsConfigurationNetrisSoftgate
19
+ # (Read-only) Host OS on which the Netris Softgate is installed.
20
+ attr_accessor :host_os
21
+
22
+ # (Write-only) IP address or hostname through which to reach the Netris Controller.
23
+ attr_accessor :controller_address
24
+
25
+ # (Write-only) The version of the Netris Controller to connect to.
26
+ attr_accessor :controller_version
27
+
28
+ # (Write-only) The authentication key of the Netris Controller to connect to. Required for the softgate agent to be able to interact with the Netris Controller.
29
+ attr_accessor :controller_auth_key
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'host_os' => :'hostOs',
35
+ :'controller_address' => :'controllerAddress',
36
+ :'controller_version' => :'controllerVersion',
37
+ :'controller_auth_key' => :'controllerAuthKey'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'host_os' => :'String',
50
+ :'controller_address' => :'String',
51
+ :'controller_version' => :'String',
52
+ :'controller_auth_key' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BmcApi::OsConfigurationNetrisSoftgate` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::OsConfigurationNetrisSoftgate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'host_os')
78
+ self.host_os = attributes[:'host_os']
79
+ end
80
+
81
+ if attributes.key?(:'controller_address')
82
+ self.controller_address = attributes[:'controller_address']
83
+ end
84
+
85
+ if attributes.key?(:'controller_version')
86
+ self.controller_version = attributes[:'controller_version']
87
+ end
88
+
89
+ if attributes.key?(:'controller_auth_key')
90
+ self.controller_auth_key = attributes[:'controller_auth_key']
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ invalid_properties = Array.new
98
+ if !@controller_address.nil? && @controller_address.to_s.length > 253
99
+ invalid_properties.push('invalid value for "controller_address", the character length must be smaller than or equal to 253.')
100
+ end
101
+
102
+ pattern = Regexp.new(/^(?!-)[\w\-]{1,63}(?<!-)(\.(?!-)[\w\-]{1,63}(?<!-))*$/)
103
+ if !@controller_address.nil? && @controller_address !~ pattern
104
+ invalid_properties.push("invalid value for \"controller_address\", must conform to the pattern #{pattern}.")
105
+ end
106
+
107
+ pattern = Regexp.new(/^\S+$/)
108
+ if !@controller_auth_key.nil? && @controller_auth_key !~ pattern
109
+ invalid_properties.push("invalid value for \"controller_auth_key\", must conform to the pattern #{pattern}.")
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ return false if !@controller_address.nil? && @controller_address.to_s.length > 253
119
+ return false if !@controller_address.nil? && @controller_address !~ Regexp.new(/^(?!-)[\w\-]{1,63}(?<!-)(\.(?!-)[\w\-]{1,63}(?<!-))*$/)
120
+ return false if !@controller_auth_key.nil? && @controller_auth_key !~ Regexp.new(/^\S+$/)
121
+ true
122
+ end
123
+
124
+ # Custom attribute writer method with validation
125
+ # @param [Object] controller_address Value to be assigned
126
+ def controller_address=(controller_address)
127
+ if !controller_address.nil? && controller_address.to_s.length > 253
128
+ fail ArgumentError, 'invalid value for "controller_address", the character length must be smaller than or equal to 253.'
129
+ end
130
+
131
+ pattern = Regexp.new(/^(?!-)[\w\-]{1,63}(?<!-)(\.(?!-)[\w\-]{1,63}(?<!-))*$/)
132
+ if !controller_address.nil? && controller_address !~ pattern
133
+ fail ArgumentError, "invalid value for \"controller_address\", must conform to the pattern #{pattern}."
134
+ end
135
+
136
+ @controller_address = controller_address
137
+ end
138
+
139
+ # Custom attribute writer method with validation
140
+ # @param [Object] controller_auth_key Value to be assigned
141
+ def controller_auth_key=(controller_auth_key)
142
+ pattern = Regexp.new(/^\S+$/)
143
+ if !controller_auth_key.nil? && controller_auth_key !~ pattern
144
+ fail ArgumentError, "invalid value for \"controller_auth_key\", must conform to the pattern #{pattern}."
145
+ end
146
+
147
+ @controller_auth_key = controller_auth_key
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ host_os == o.host_os &&
156
+ controller_address == o.controller_address &&
157
+ controller_version == o.controller_version &&
158
+ controller_auth_key == o.controller_auth_key
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(o)
164
+ self == o
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Integer] Hash code
169
+ def hash
170
+ [host_os, controller_address, controller_version, controller_auth_key].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def self.build_from_hash(attributes)
177
+ new.build_from_hash(attributes)
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ attributes = attributes.transform_keys(&:to_sym)
186
+ self.class.openapi_types.each_pair do |key, type|
187
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
188
+ self.send("#{key}=", nil)
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
193
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
194
+ end
195
+ elsif !attributes[self.class.attribute_map[key]].nil?
196
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
197
+ end
198
+ end
199
+
200
+ self
201
+ end
202
+
203
+ # Deserializes the data based on type
204
+ # @param string type Data type
205
+ # @param string value Value to be deserialized
206
+ # @return [Object] Deserialized data
207
+ def _deserialize(type, value)
208
+ case type.to_sym
209
+ when :Time
210
+ Time.parse(value)
211
+ when :Date
212
+ Date.parse(value)
213
+ when :String
214
+ value.to_s
215
+ when :Integer
216
+ value.to_i
217
+ when :Float
218
+ value.to_f
219
+ when :Boolean
220
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
221
+ true
222
+ else
223
+ false
224
+ end
225
+ when :Object
226
+ # generic object (usually a Hash), return directly
227
+ value
228
+ when /\AArray<(?<inner_type>.+)>\z/
229
+ inner_type = Regexp.last_match[:inner_type]
230
+ value.map { |v| _deserialize(inner_type, v) }
231
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
232
+ k_type = Regexp.last_match[:k_type]
233
+ v_type = Regexp.last_match[:v_type]
234
+ {}.tap do |hash|
235
+ value.each do |k, v|
236
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
237
+ end
238
+ end
239
+ else # model
240
+ # models (e.g. Pet) or oneOf
241
+ klass = BmcApi.const_get(type)
242
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
243
+ end
244
+ end
245
+
246
+ # Returns the string representation of the object
247
+ # @return [String] String presentation of the object
248
+ def to_s
249
+ to_hash.to_s
250
+ end
251
+
252
+ # to_body is an alias to to_hash (backward compatibility)
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_body
255
+ to_hash
256
+ end
257
+
258
+ # Returns the object in the form of hash
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_hash
261
+ hash = {}
262
+ self.class.attribute_map.each_pair do |attr, param|
263
+ value = self.send(attr)
264
+ if value.nil?
265
+ is_nullable = self.class.openapi_nullable.include?(attr)
266
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
267
+ end
268
+
269
+ hash[param] = _to_hash(value)
270
+ end
271
+ hash
272
+ end
273
+
274
+ # Outputs non-array value in the form of hash
275
+ # For object, use to_hash. Otherwise, just return the value
276
+ # @param [Object] value Any valid value
277
+ # @return [Hash] Returns the value in the form of hash
278
+ def _to_hash(value)
279
+ if value.is_a?(Array)
280
+ value.compact.map { |v| _to_hash(v) }
281
+ elsif value.is_a?(Hash)
282
+ {}.tap do |hash|
283
+ value.each { |k, v| hash[k] = _to_hash(v) }
284
+ end
285
+ elsif value.respond_to? :to_hash
286
+ value.to_hash
287
+ else
288
+ value
289
+ end
290
+ end
291
+
292
+ end
293
+
294
+ end
@@ -19,7 +19,7 @@ module BmcApi
19
19
  # Deprecated in favour of a common gateway address across all networks available under NetworkConfiguration.<br> The address of the gateway assigned / to assign to the server.<br> When used as part of request body, IP address has to be part of private network assigned to this server.<br> Gateway address also has to be assigned on an already deployed resource unless the `force` query parameter is true.
20
20
  attr_accessor :gateway_address
21
21
 
22
- # Determines the approach for configuring private network(s) for the server being provisioned. Currently this field should be set to `USE_OR_CREATE_DEFAULT` or `USER_DEFINED`.
22
+ # (Write-only) Determines the approach for configuring private network(s) for the server being provisioned. Currently this field should be set to `USE_OR_CREATE_DEFAULT`, `USER_DEFINED` or `NONE`.
23
23
  attr_accessor :configuration_type
24
24
 
25
25
  # The list of private networks this server is member of. When this field is part of request body, it'll be used to specify the private networks to assign to this server upon provisioning. Used alongside the `USER_DEFINED` configurationType.
@@ -16,7 +16,7 @@ require 'time'
16
16
  module BmcApi
17
17
  # A request to change the limit on a quota.
18
18
  class QuotaEditLimitRequest
19
- # The new limit that is requested.
19
+ # The new limit that is requested. Minimum allowed limit values: - 0 (Server, IPs) - 1000 (Network Storage)
20
20
  attr_accessor :limit
21
21
 
22
22
  # The reason for changing the limit.
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module BmcApi
17
17
  class QuotaEditLimitRequestDetails
18
- # The new limit that is requested.
18
+ # The new limit that is requested. Minimum allowed limit values: - 0 (Server, IPs) - 1000 (Network Storage)
19
19
  attr_accessor :limit
20
20
 
21
21
  # The reason for changing the limit.
@@ -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`, `debian/bullseye` or `proxmox/bullseye`.
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/softgate_10g`.
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.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge` or `d2.c4.storage.pliops1`.
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.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.db1.pliops1`, `d3.m4.xlarge`, `d3.m5.xlarge`, `d3.m6.xlarge` or `a1.c5.large`.
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`.
@@ -67,10 +67,10 @@ module BmcApi
67
67
  # The pricing model this server is being billed. Currently this field should be set to `HOURLY`, `ONE_MONTH_RESERVATION`, `TWELVE_MONTHS_RESERVATION`, `TWENTY_FOUR_MONTHS_RESERVATION` or `THIRTY_SIX_MONTHS_RESERVATION`.
68
68
  attr_accessor :pricing_model
69
69
 
70
- # Password set for user Admin on Windows server or user root on ESXi server which will only be returned in response to provisioning a server.
70
+ # Auto-generated password set for user `Admin` on Windows server, user `root` on ESXi servers, user `root` on Proxmox server and user `netris` on Netris servers.<br> The password is not stored and therefore will only be returned in response to provisioning a server. Copy and save it for future reference.
71
71
  attr_accessor :password
72
72
 
73
- # The type of network configuration for this server. Currently this field should be set to `PUBLIC_AND_PRIVATE` or `PRIVATE_ONLY`.
73
+ # The type of network configuration for this server. Currently this field should be set to `PUBLIC_AND_PRIVATE`, `PRIVATE_ONLY`, `PUBLIC_ONLY` or `NONE`.
74
74
  attr_accessor :network_type
75
75
 
76
76
  # The cluster reference id if any.
@@ -86,6 +86,8 @@ module BmcApi
86
86
 
87
87
  attr_accessor :network_configuration
88
88
 
89
+ attr_accessor :storage_configuration
90
+
89
91
  # Attribute mapping from ruby-style variable name to JSON key.
90
92
  def self.attribute_map
91
93
  {
@@ -112,7 +114,8 @@ module BmcApi
112
114
  :'tags' => :'tags',
113
115
  :'provisioned_on' => :'provisionedOn',
114
116
  :'os_configuration' => :'osConfiguration',
115
- :'network_configuration' => :'networkConfiguration'
117
+ :'network_configuration' => :'networkConfiguration',
118
+ :'storage_configuration' => :'storageConfiguration'
116
119
  }
117
120
  end
118
121
 
@@ -147,7 +150,8 @@ module BmcApi
147
150
  :'tags' => :'Array<TagAssignment>',
148
151
  :'provisioned_on' => :'Time',
149
152
  :'os_configuration' => :'OsConfiguration',
150
- :'network_configuration' => :'NetworkConfiguration'
153
+ :'network_configuration' => :'NetworkConfiguration',
154
+ :'storage_configuration' => :'StorageConfiguration'
151
155
  }
152
156
  end
153
157
 
@@ -277,6 +281,10 @@ module BmcApi
277
281
  if attributes.key?(:'network_configuration')
278
282
  self.network_configuration = attributes[:'network_configuration']
279
283
  end
284
+
285
+ if attributes.key?(:'storage_configuration')
286
+ self.storage_configuration = attributes[:'storage_configuration']
287
+ end
280
288
  end
281
289
 
282
290
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -380,6 +388,10 @@ module BmcApi
380
388
  invalid_properties.push('invalid value for "network_configuration", network_configuration cannot be nil.')
381
389
  end
382
390
 
391
+ if @storage_configuration.nil?
392
+ invalid_properties.push('invalid value for "storage_configuration", storage_configuration cannot be nil.')
393
+ end
394
+
383
395
  invalid_properties
384
396
  end
385
397
 
@@ -410,6 +422,7 @@ module BmcApi
410
422
  return false if !@public_ip_addresses.nil? && @public_ip_addresses.length < 0
411
423
  return false if @pricing_model.nil?
412
424
  return false if @network_configuration.nil?
425
+ return false if @storage_configuration.nil?
413
426
  true
414
427
  end
415
428
 
@@ -540,7 +553,8 @@ module BmcApi
540
553
  tags == o.tags &&
541
554
  provisioned_on == o.provisioned_on &&
542
555
  os_configuration == o.os_configuration &&
543
- network_configuration == o.network_configuration
556
+ network_configuration == o.network_configuration &&
557
+ storage_configuration == o.storage_configuration
544
558
  end
545
559
 
546
560
  # @see the `==` method
@@ -552,7 +566,7 @@ module BmcApi
552
566
  # Calculates hash code according to all attributes.
553
567
  # @return [Integer] Hash code
554
568
  def hash
555
- [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].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
556
570
  end
557
571
 
558
572
  # Builds the object from hash
@@ -22,10 +22,10 @@ module BmcApi
22
22
  # Description of server.
23
23
  attr_accessor :description
24
24
 
25
- # 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`, `debian/bullseye` or `proxmox/bullseye`.
25
+ # 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/softgate_10g`.
26
26
  attr_accessor :os
27
27
 
28
- # 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.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge` or `d2.c4.storage.pliops1`.
28
+ # 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.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.db1.pliops1`, `d3.m4.xlarge`, `d3.m5.xlarge`, `d3.m6.xlarge` or `a1.c5.large`.
29
29
  attr_accessor :type
30
30
 
31
31
  # 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`.
@@ -46,7 +46,7 @@ module BmcApi
46
46
  # Server pricing model. Currently this field should be set to `HOURLY`, `ONE_MONTH_RESERVATION`, `TWELVE_MONTHS_RESERVATION`, `TWENTY_FOUR_MONTHS_RESERVATION` or `THIRTY_SIX_MONTHS_RESERVATION`.
47
47
  attr_accessor :pricing_model
48
48
 
49
- # The type of network configuration for this server. Currently this field should be set to `PUBLIC_AND_PRIVATE` or `PRIVATE_ONLY`.
49
+ # The type of network configuration for this server.<br> Currently this field should be set to `PUBLIC_AND_PRIVATE`, `PRIVATE_ONLY`, `PUBLIC_ONLY` or `USER_DEFINED`.<br> Setting the `force` query parameter to `true` allows you to configure network configuration type as `NONE`.
50
50
  attr_accessor :network_type
51
51
 
52
52
  attr_accessor :os_configuration
@@ -56,6 +56,8 @@ module BmcApi
56
56
 
57
57
  attr_accessor :network_configuration
58
58
 
59
+ attr_accessor :storage_configuration
60
+
59
61
  # Attribute mapping from ruby-style variable name to JSON key.
60
62
  def self.attribute_map
61
63
  {
@@ -72,7 +74,8 @@ module BmcApi
72
74
  :'network_type' => :'networkType',
73
75
  :'os_configuration' => :'osConfiguration',
74
76
  :'tags' => :'tags',
75
- :'network_configuration' => :'networkConfiguration'
77
+ :'network_configuration' => :'networkConfiguration',
78
+ :'storage_configuration' => :'storageConfiguration'
76
79
  }
77
80
  end
78
81
 
@@ -97,7 +100,8 @@ module BmcApi
97
100
  :'network_type' => :'String',
98
101
  :'os_configuration' => :'OsConfiguration',
99
102
  :'tags' => :'Array<TagAssignmentRequest>',
100
- :'network_configuration' => :'NetworkConfiguration'
103
+ :'network_configuration' => :'NetworkConfiguration',
104
+ :'storage_configuration' => :'StorageConfiguration'
101
105
  }
102
106
  end
103
107
 
@@ -189,6 +193,10 @@ module BmcApi
189
193
  if attributes.key?(:'network_configuration')
190
194
  self.network_configuration = attributes[:'network_configuration']
191
195
  end
196
+
197
+ if attributes.key?(:'storage_configuration')
198
+ self.storage_configuration = attributes[:'storage_configuration']
199
+ end
192
200
  end
193
201
 
194
202
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -296,7 +304,8 @@ module BmcApi
296
304
  network_type == o.network_type &&
297
305
  os_configuration == o.os_configuration &&
298
306
  tags == o.tags &&
299
- network_configuration == o.network_configuration
307
+ network_configuration == o.network_configuration &&
308
+ storage_configuration == o.storage_configuration
300
309
  end
301
310
 
302
311
  # @see the `==` method
@@ -308,7 +317,7 @@ module BmcApi
308
317
  # Calculates hash code according to all attributes.
309
318
  # @return [Integer] Hash code
310
319
  def hash
311
- [hostname, description, os, type, location, install_default_ssh_keys, ssh_keys, ssh_key_ids, reservation_id, pricing_model, network_type, os_configuration, tags, network_configuration].hash
320
+ [hostname, description, os, type, location, install_default_ssh_keys, ssh_keys, ssh_key_ids, reservation_id, pricing_model, network_type, os_configuration, tags, network_configuration, storage_configuration].hash
312
321
  end
313
322
 
314
323
  # Builds the object from hash
@@ -19,7 +19,7 @@ module BmcApi
19
19
  # The IP block's ID.
20
20
  attr_accessor :id
21
21
 
22
- # The VLAN on which this IP block has been configured within the network switch.
22
+ # (Read-only) The VLAN on which this IP block has been configured within the network switch.
23
23
  attr_accessor :vlan_id
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.