pnap_bmc_api 2.2.2 → 2.4.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 +6 -0
- data/VERSION +1 -1
- data/docs/IpBlocksConfiguration.md +1 -1
- data/docs/OsConfiguration.md +3 -1
- data/docs/OsConfigurationCloudInit.md +1 -1
- data/docs/OsConfigurationIPXE.md +20 -0
- data/docs/OsConfigurationIPXENativeVlanConfiguration.md +22 -0
- data/docs/OsConfigurationWindows.md +3 -1
- data/docs/PrivateNetworkConfiguration.md +1 -1
- data/docs/PublicNetworkConfiguration.md +1 -1
- data/docs/RebootRequest.md +20 -0
- data/docs/ReservationTransferDetails.md +18 -0
- data/docs/Server.md +4 -4
- data/docs/ServerCreate.md +3 -3
- data/docs/ServerNetworkUpdate.md +1 -1
- data/docs/ServerPrivateNetwork.md +3 -1
- data/docs/ServerProvision.md +1 -1
- data/docs/ServerPublicNetwork.md +5 -3
- data/docs/ServersApi.md +157 -7
- data/lib/pnap_bmc_api/api/quotas_api.rb +4 -4
- data/lib/pnap_bmc_api/api/servers_api.rb +182 -24
- data/lib/pnap_bmc_api/api/ssh_keys_api.rb +6 -6
- data/lib/pnap_bmc_api/api_client.rb +17 -14
- data/lib/pnap_bmc_api/api_error.rb +1 -1
- data/lib/pnap_bmc_api/api_model_base.rb +88 -0
- data/lib/pnap_bmc_api/configuration.rb +11 -1
- data/lib/pnap_bmc_api/models/action_result.rb +21 -78
- data/lib/pnap_bmc_api/models/delete_result.rb +31 -78
- data/lib/pnap_bmc_api/models/delete_ssh_key_result.rb +31 -78
- data/lib/pnap_bmc_api/models/error.rb +21 -78
- data/lib/pnap_bmc_api/models/esxi_datastore_configuration.rb +13 -80
- data/lib/pnap_bmc_api/models/esxi_os_configuration.rb +11 -78
- data/lib/pnap_bmc_api/models/gpu_configuration.rb +11 -78
- data/lib/pnap_bmc_api/models/ip_blocks_configuration.rb +12 -79
- data/lib/pnap_bmc_api/models/network_configuration.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration.rb +24 -82
- data/lib/pnap_bmc_api/models/os_configuration_cloud_init.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_ipxe.rb +186 -0
- data/lib/pnap_bmc_api/models/os_configuration_ipxe_native_vlan_configuration.rb +224 -0
- data/lib/pnap_bmc_api/models/os_configuration_map.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_map_esxi.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_map_proxmox.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_netris_controller.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_netris_softgate.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_windows.rb +27 -82
- data/lib/pnap_bmc_api/models/private_network_configuration.rb +12 -79
- data/lib/pnap_bmc_api/models/public_network_configuration.rb +12 -79
- data/lib/pnap_bmc_api/models/quota.rb +61 -78
- data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +14 -81
- data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +25 -86
- data/lib/pnap_bmc_api/models/reboot_request.rb +212 -0
- data/lib/pnap_bmc_api/models/relinquish_ip_block.rb +11 -78
- data/lib/pnap_bmc_api/models/reservation_transfer_details.rb +166 -0
- data/lib/pnap_bmc_api/models/reset_result.rb +21 -78
- data/lib/pnap_bmc_api/models/server.rb +117 -84
- data/lib/pnap_bmc_api/models/server_create.rb +46 -83
- data/lib/pnap_bmc_api/models/server_ip_block.rb +21 -78
- data/lib/pnap_bmc_api/models/server_network_update.rb +12 -79
- data/lib/pnap_bmc_api/models/server_patch.rb +13 -80
- data/lib/pnap_bmc_api/models/server_private_network.rb +35 -82
- data/lib/pnap_bmc_api/models/server_provision.rb +24 -81
- data/lib/pnap_bmc_api/models/server_public_network.rb +53 -83
- data/lib/pnap_bmc_api/models/server_reserve.rb +21 -78
- data/lib/pnap_bmc_api/models/server_reset.rb +11 -78
- data/lib/pnap_bmc_api/models/ssh_key.rb +81 -78
- data/lib/pnap_bmc_api/models/ssh_key_create.rb +23 -80
- data/lib/pnap_bmc_api/models/ssh_key_update.rb +23 -80
- data/lib/pnap_bmc_api/models/storage_configuration.rb +11 -78
- data/lib/pnap_bmc_api/models/storage_configuration_root_partition.rb +11 -78
- data/lib/pnap_bmc_api/models/tag_assignment.rb +41 -78
- data/lib/pnap_bmc_api/models/tag_assignment_request.rb +21 -78
- data/lib/pnap_bmc_api/version.rb +1 -2
- data/lib/pnap_bmc_api.rb +6 -1
- data/pnap_bmc_api.gemspec +6 -6
- data/spec/api/quotas_api_spec.rb +1 -1
- data/spec/api/servers_api_spec.rb +29 -1
- data/spec/api/ssh_keys_api_spec.rb +1 -1
- data/spec/models/action_result_spec.rb +2 -2
- data/spec/models/delete_result_spec.rb +2 -2
- data/spec/models/delete_ssh_key_result_spec.rb +2 -2
- data/spec/models/error_spec.rb +2 -2
- data/spec/models/esxi_datastore_configuration_spec.rb +2 -2
- data/spec/models/esxi_os_configuration_spec.rb +2 -2
- data/spec/models/gpu_configuration_spec.rb +2 -2
- data/spec/models/ip_blocks_configuration_spec.rb +2 -2
- data/spec/models/network_configuration_spec.rb +2 -2
- data/spec/models/os_configuration_cloud_init_spec.rb +2 -2
- data/spec/models/os_configuration_ipxe_native_vlan_configuration_spec.rb +52 -0
- data/spec/models/os_configuration_ipxe_spec.rb +42 -0
- data/spec/models/os_configuration_map_esxi_spec.rb +2 -2
- data/spec/models/os_configuration_map_proxmox_spec.rb +2 -2
- data/spec/models/os_configuration_map_spec.rb +2 -2
- data/spec/models/os_configuration_netris_controller_spec.rb +2 -2
- data/spec/models/os_configuration_netris_softgate_spec.rb +2 -2
- data/spec/models/os_configuration_spec.rb +8 -2
- data/spec/models/os_configuration_windows_spec.rb +8 -2
- data/spec/models/private_network_configuration_spec.rb +2 -2
- data/spec/models/public_network_configuration_spec.rb +2 -2
- data/spec/models/quota_edit_limit_request_details_spec.rb +2 -2
- data/spec/models/quota_edit_limit_request_spec.rb +2 -2
- data/spec/models/quota_spec.rb +2 -2
- data/spec/models/reboot_request_spec.rb +46 -0
- data/spec/models/relinquish_ip_block_spec.rb +2 -2
- data/spec/models/reservation_transfer_details_spec.rb +36 -0
- data/spec/models/reset_result_spec.rb +2 -2
- data/spec/models/server_create_spec.rb +2 -2
- data/spec/models/server_ip_block_spec.rb +2 -2
- data/spec/models/server_network_update_spec.rb +2 -2
- data/spec/models/server_patch_spec.rb +2 -2
- data/spec/models/server_private_network_spec.rb +8 -2
- data/spec/models/server_provision_spec.rb +2 -2
- data/spec/models/server_public_network_spec.rb +8 -2
- data/spec/models/server_reserve_spec.rb +2 -2
- data/spec/models/server_reset_spec.rb +2 -2
- data/spec/models/server_spec.rb +2 -2
- data/spec/models/ssh_key_create_spec.rb +2 -2
- data/spec/models/ssh_key_spec.rb +2 -2
- data/spec/models/ssh_key_update_spec.rb +2 -2
- data/spec/models/storage_configuration_root_partition_spec.rb +2 -2
- data/spec/models/storage_configuration_spec.rb +2 -2
- data/spec/models/tag_assignment_request_spec.rb +2 -2
- data/spec/models/tag_assignment_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +60 -39
|
@@ -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
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module BmcApi
|
|
17
17
|
# Root partition configuration.
|
|
18
|
-
class StorageConfigurationRootPartition
|
|
18
|
+
class StorageConfigurationRootPartition < ApiModelBase
|
|
19
19
|
# Software RAID configuration. The following RAID options are available: NO_RAID, RAID_0, RAID_1.
|
|
20
20
|
attr_accessor :raid
|
|
21
21
|
|
|
@@ -30,9 +30,14 @@ module BmcApi
|
|
|
30
30
|
}
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
33
38
|
# Returns all the JSON keys this model knows about
|
|
34
39
|
def self.acceptable_attributes
|
|
35
|
-
|
|
40
|
+
acceptable_attribute_map.values
|
|
36
41
|
end
|
|
37
42
|
|
|
38
43
|
# Attribute type mapping.
|
|
@@ -57,9 +62,10 @@ module BmcApi
|
|
|
57
62
|
end
|
|
58
63
|
|
|
59
64
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
-
if (!
|
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::StorageConfigurationRootPartition`. Please check the name to make sure it's valid. List of attributes: " +
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::StorageConfigurationRootPartition`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
69
|
end
|
|
64
70
|
h[k.to_sym] = v
|
|
65
71
|
}
|
|
@@ -136,61 +142,6 @@ module BmcApi
|
|
|
136
142
|
new(transformed_hash)
|
|
137
143
|
end
|
|
138
144
|
|
|
139
|
-
# Deserializes the data based on type
|
|
140
|
-
# @param string type Data type
|
|
141
|
-
# @param string value Value to be deserialized
|
|
142
|
-
# @return [Object] Deserialized data
|
|
143
|
-
def self._deserialize(type, value)
|
|
144
|
-
case type.to_sym
|
|
145
|
-
when :Time
|
|
146
|
-
Time.parse(value)
|
|
147
|
-
when :Date
|
|
148
|
-
Date.parse(value)
|
|
149
|
-
when :String
|
|
150
|
-
value.to_s
|
|
151
|
-
when :Integer
|
|
152
|
-
value.to_i
|
|
153
|
-
when :Float
|
|
154
|
-
value.to_f
|
|
155
|
-
when :Boolean
|
|
156
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
157
|
-
true
|
|
158
|
-
else
|
|
159
|
-
false
|
|
160
|
-
end
|
|
161
|
-
when :Object
|
|
162
|
-
# generic object (usually a Hash), return directly
|
|
163
|
-
value
|
|
164
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
168
|
-
k_type = Regexp.last_match[:k_type]
|
|
169
|
-
v_type = Regexp.last_match[:v_type]
|
|
170
|
-
{}.tap do |hash|
|
|
171
|
-
value.each do |k, v|
|
|
172
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
-
end
|
|
174
|
-
end
|
|
175
|
-
else # model
|
|
176
|
-
# models (e.g. Pet) or oneOf
|
|
177
|
-
klass = BmcApi.const_get(type)
|
|
178
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
179
|
-
end
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
# Returns the string representation of the object
|
|
183
|
-
# @return [String] String presentation of the object
|
|
184
|
-
def to_s
|
|
185
|
-
to_hash.to_s
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
-
# @return [Hash] Returns the object in the form of hash
|
|
190
|
-
def to_body
|
|
191
|
-
to_hash
|
|
192
|
-
end
|
|
193
|
-
|
|
194
145
|
# Returns the object in the form of hash
|
|
195
146
|
# @return [Hash] Returns the object in the form of hash
|
|
196
147
|
def to_hash
|
|
@@ -207,24 +158,6 @@ module BmcApi
|
|
|
207
158
|
hash
|
|
208
159
|
end
|
|
209
160
|
|
|
210
|
-
# Outputs non-array value in the form of hash
|
|
211
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
212
|
-
# @param [Object] value Any valid value
|
|
213
|
-
# @return [Hash] Returns the value in the form of hash
|
|
214
|
-
def _to_hash(value)
|
|
215
|
-
if value.is_a?(Array)
|
|
216
|
-
value.compact.map { |v| _to_hash(v) }
|
|
217
|
-
elsif value.is_a?(Hash)
|
|
218
|
-
{}.tap do |hash|
|
|
219
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
-
end
|
|
221
|
-
elsif value.respond_to? :to_hash
|
|
222
|
-
value.to_hash
|
|
223
|
-
else
|
|
224
|
-
value
|
|
225
|
-
end
|
|
226
|
-
end
|
|
227
|
-
|
|
228
161
|
end
|
|
229
162
|
|
|
230
163
|
end
|
|
@@ -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
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module BmcApi
|
|
17
17
|
# Tag assigned to resource.
|
|
18
|
-
class TagAssignment
|
|
18
|
+
class TagAssignment < ApiModelBase
|
|
19
19
|
# The unique id of the tag.
|
|
20
20
|
attr_accessor :id
|
|
21
21
|
|
|
@@ -64,9 +64,14 @@ module BmcApi
|
|
|
64
64
|
}
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
+
# Returns attribute mapping this model knows about
|
|
68
|
+
def self.acceptable_attribute_map
|
|
69
|
+
attribute_map
|
|
70
|
+
end
|
|
71
|
+
|
|
67
72
|
# Returns all the JSON keys this model knows about
|
|
68
73
|
def self.acceptable_attributes
|
|
69
|
-
|
|
74
|
+
acceptable_attribute_map.values
|
|
70
75
|
end
|
|
71
76
|
|
|
72
77
|
# Attribute type mapping.
|
|
@@ -94,9 +99,10 @@ module BmcApi
|
|
|
94
99
|
end
|
|
95
100
|
|
|
96
101
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
102
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
97
103
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
98
|
-
if (!
|
|
99
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::TagAssignment`. Please check the name to make sure it's valid. List of attributes: " +
|
|
104
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::TagAssignment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
100
106
|
end
|
|
101
107
|
h[k.to_sym] = v
|
|
102
108
|
}
|
|
@@ -160,6 +166,36 @@ module BmcApi
|
|
|
160
166
|
true
|
|
161
167
|
end
|
|
162
168
|
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] id Value to be assigned
|
|
171
|
+
def id=(id)
|
|
172
|
+
if id.nil?
|
|
173
|
+
fail ArgumentError, 'id cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@id = id
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Custom attribute writer method with validation
|
|
180
|
+
# @param [Object] name Value to be assigned
|
|
181
|
+
def name=(name)
|
|
182
|
+
if name.nil?
|
|
183
|
+
fail ArgumentError, 'name cannot be nil'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
@name = name
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Custom attribute writer method with validation
|
|
190
|
+
# @param [Object] is_billing_tag Value to be assigned
|
|
191
|
+
def is_billing_tag=(is_billing_tag)
|
|
192
|
+
if is_billing_tag.nil?
|
|
193
|
+
fail ArgumentError, 'is_billing_tag cannot be nil'
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
@is_billing_tag = is_billing_tag
|
|
197
|
+
end
|
|
198
|
+
|
|
163
199
|
# Custom attribute writer method checking allowed values (enum).
|
|
164
200
|
# @param [Object] created_by Object to be assigned
|
|
165
201
|
def created_by=(created_by)
|
|
@@ -217,61 +253,6 @@ module BmcApi
|
|
|
217
253
|
new(transformed_hash)
|
|
218
254
|
end
|
|
219
255
|
|
|
220
|
-
# Deserializes the data based on type
|
|
221
|
-
# @param string type Data type
|
|
222
|
-
# @param string value Value to be deserialized
|
|
223
|
-
# @return [Object] Deserialized data
|
|
224
|
-
def self._deserialize(type, value)
|
|
225
|
-
case type.to_sym
|
|
226
|
-
when :Time
|
|
227
|
-
Time.parse(value)
|
|
228
|
-
when :Date
|
|
229
|
-
Date.parse(value)
|
|
230
|
-
when :String
|
|
231
|
-
value.to_s
|
|
232
|
-
when :Integer
|
|
233
|
-
value.to_i
|
|
234
|
-
when :Float
|
|
235
|
-
value.to_f
|
|
236
|
-
when :Boolean
|
|
237
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
238
|
-
true
|
|
239
|
-
else
|
|
240
|
-
false
|
|
241
|
-
end
|
|
242
|
-
when :Object
|
|
243
|
-
# generic object (usually a Hash), return directly
|
|
244
|
-
value
|
|
245
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
246
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
247
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
248
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
249
|
-
k_type = Regexp.last_match[:k_type]
|
|
250
|
-
v_type = Regexp.last_match[:v_type]
|
|
251
|
-
{}.tap do |hash|
|
|
252
|
-
value.each do |k, v|
|
|
253
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
254
|
-
end
|
|
255
|
-
end
|
|
256
|
-
else # model
|
|
257
|
-
# models (e.g. Pet) or oneOf
|
|
258
|
-
klass = BmcApi.const_get(type)
|
|
259
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
260
|
-
end
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
# Returns the string representation of the object
|
|
264
|
-
# @return [String] String presentation of the object
|
|
265
|
-
def to_s
|
|
266
|
-
to_hash.to_s
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
270
|
-
# @return [Hash] Returns the object in the form of hash
|
|
271
|
-
def to_body
|
|
272
|
-
to_hash
|
|
273
|
-
end
|
|
274
|
-
|
|
275
256
|
# Returns the object in the form of hash
|
|
276
257
|
# @return [Hash] Returns the object in the form of hash
|
|
277
258
|
def to_hash
|
|
@@ -288,24 +269,6 @@ module BmcApi
|
|
|
288
269
|
hash
|
|
289
270
|
end
|
|
290
271
|
|
|
291
|
-
# Outputs non-array value in the form of hash
|
|
292
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
293
|
-
# @param [Object] value Any valid value
|
|
294
|
-
# @return [Hash] Returns the value in the form of hash
|
|
295
|
-
def _to_hash(value)
|
|
296
|
-
if value.is_a?(Array)
|
|
297
|
-
value.compact.map { |v| _to_hash(v) }
|
|
298
|
-
elsif value.is_a?(Hash)
|
|
299
|
-
{}.tap do |hash|
|
|
300
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
301
|
-
end
|
|
302
|
-
elsif value.respond_to? :to_hash
|
|
303
|
-
value.to_hash
|
|
304
|
-
else
|
|
305
|
-
value
|
|
306
|
-
end
|
|
307
|
-
end
|
|
308
|
-
|
|
309
272
|
end
|
|
310
273
|
|
|
311
274
|
end
|
|
@@ -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
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module BmcApi
|
|
17
17
|
# Tag request to assign to resource.
|
|
18
|
-
class TagAssignmentRequest
|
|
18
|
+
class TagAssignmentRequest < ApiModelBase
|
|
19
19
|
# The name of the tag. Tag names are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: '-', '_'. Regex: [A-zÀ-ú0-9_-]{1,100}.
|
|
20
20
|
attr_accessor :name
|
|
21
21
|
|
|
@@ -30,9 +30,14 @@ module BmcApi
|
|
|
30
30
|
}
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
33
38
|
# Returns all the JSON keys this model knows about
|
|
34
39
|
def self.acceptable_attributes
|
|
35
|
-
|
|
40
|
+
acceptable_attribute_map.values
|
|
36
41
|
end
|
|
37
42
|
|
|
38
43
|
# Attribute type mapping.
|
|
@@ -57,9 +62,10 @@ module BmcApi
|
|
|
57
62
|
end
|
|
58
63
|
|
|
59
64
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
-
if (!
|
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::TagAssignmentRequest`. Please check the name to make sure it's valid. List of attributes: " +
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::TagAssignmentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
69
|
end
|
|
64
70
|
h[k.to_sym] = v
|
|
65
71
|
}
|
|
@@ -95,6 +101,16 @@ module BmcApi
|
|
|
95
101
|
true
|
|
96
102
|
end
|
|
97
103
|
|
|
104
|
+
# Custom attribute writer method with validation
|
|
105
|
+
# @param [Object] name Value to be assigned
|
|
106
|
+
def name=(name)
|
|
107
|
+
if name.nil?
|
|
108
|
+
fail ArgumentError, 'name cannot be nil'
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
@name = name
|
|
112
|
+
end
|
|
113
|
+
|
|
98
114
|
# Checks equality by comparing each attribute.
|
|
99
115
|
# @param [Object] Object to be compared
|
|
100
116
|
def ==(o)
|
|
@@ -139,61 +155,6 @@ module BmcApi
|
|
|
139
155
|
new(transformed_hash)
|
|
140
156
|
end
|
|
141
157
|
|
|
142
|
-
# Deserializes the data based on type
|
|
143
|
-
# @param string type Data type
|
|
144
|
-
# @param string value Value to be deserialized
|
|
145
|
-
# @return [Object] Deserialized data
|
|
146
|
-
def self._deserialize(type, value)
|
|
147
|
-
case type.to_sym
|
|
148
|
-
when :Time
|
|
149
|
-
Time.parse(value)
|
|
150
|
-
when :Date
|
|
151
|
-
Date.parse(value)
|
|
152
|
-
when :String
|
|
153
|
-
value.to_s
|
|
154
|
-
when :Integer
|
|
155
|
-
value.to_i
|
|
156
|
-
when :Float
|
|
157
|
-
value.to_f
|
|
158
|
-
when :Boolean
|
|
159
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
160
|
-
true
|
|
161
|
-
else
|
|
162
|
-
false
|
|
163
|
-
end
|
|
164
|
-
when :Object
|
|
165
|
-
# generic object (usually a Hash), return directly
|
|
166
|
-
value
|
|
167
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
168
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
169
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
170
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
171
|
-
k_type = Regexp.last_match[:k_type]
|
|
172
|
-
v_type = Regexp.last_match[:v_type]
|
|
173
|
-
{}.tap do |hash|
|
|
174
|
-
value.each do |k, v|
|
|
175
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
176
|
-
end
|
|
177
|
-
end
|
|
178
|
-
else # model
|
|
179
|
-
# models (e.g. Pet) or oneOf
|
|
180
|
-
klass = BmcApi.const_get(type)
|
|
181
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
182
|
-
end
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
# Returns the string representation of the object
|
|
186
|
-
# @return [String] String presentation of the object
|
|
187
|
-
def to_s
|
|
188
|
-
to_hash.to_s
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
192
|
-
# @return [Hash] Returns the object in the form of hash
|
|
193
|
-
def to_body
|
|
194
|
-
to_hash
|
|
195
|
-
end
|
|
196
|
-
|
|
197
158
|
# Returns the object in the form of hash
|
|
198
159
|
# @return [Hash] Returns the object in the form of hash
|
|
199
160
|
def to_hash
|
|
@@ -210,24 +171,6 @@ module BmcApi
|
|
|
210
171
|
hash
|
|
211
172
|
end
|
|
212
173
|
|
|
213
|
-
# Outputs non-array value in the form of hash
|
|
214
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
215
|
-
# @param [Object] value Any valid value
|
|
216
|
-
# @return [Hash] Returns the value in the form of hash
|
|
217
|
-
def _to_hash(value)
|
|
218
|
-
if value.is_a?(Array)
|
|
219
|
-
value.compact.map { |v| _to_hash(v) }
|
|
220
|
-
elsif value.is_a?(Hash)
|
|
221
|
-
{}.tap do |hash|
|
|
222
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
223
|
-
end
|
|
224
|
-
elsif value.respond_to? :to_hash
|
|
225
|
-
value.to_hash
|
|
226
|
-
else
|
|
227
|
-
value
|
|
228
|
-
end
|
|
229
|
-
end
|
|
230
|
-
|
|
231
174
|
end
|
|
232
175
|
|
|
233
176
|
end
|
data/lib/pnap_bmc_api/version.rb
CHANGED
data/lib/pnap_bmc_api.rb
CHANGED
|
@@ -6,13 +6,14 @@
|
|
|
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
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
# Common files
|
|
14
14
|
require 'pnap_bmc_api/api_client'
|
|
15
15
|
require 'pnap_bmc_api/api_error'
|
|
16
|
+
require 'pnap_bmc_api/api_model_base'
|
|
16
17
|
require 'pnap_bmc_api/version'
|
|
17
18
|
require 'pnap_bmc_api/configuration'
|
|
18
19
|
|
|
@@ -28,6 +29,8 @@ require 'pnap_bmc_api/models/ip_blocks_configuration'
|
|
|
28
29
|
require 'pnap_bmc_api/models/network_configuration'
|
|
29
30
|
require 'pnap_bmc_api/models/os_configuration'
|
|
30
31
|
require 'pnap_bmc_api/models/os_configuration_cloud_init'
|
|
32
|
+
require 'pnap_bmc_api/models/os_configuration_ipxe'
|
|
33
|
+
require 'pnap_bmc_api/models/os_configuration_ipxe_native_vlan_configuration'
|
|
31
34
|
require 'pnap_bmc_api/models/os_configuration_map'
|
|
32
35
|
require 'pnap_bmc_api/models/os_configuration_map_esxi'
|
|
33
36
|
require 'pnap_bmc_api/models/os_configuration_map_proxmox'
|
|
@@ -39,7 +42,9 @@ require 'pnap_bmc_api/models/public_network_configuration'
|
|
|
39
42
|
require 'pnap_bmc_api/models/quota'
|
|
40
43
|
require 'pnap_bmc_api/models/quota_edit_limit_request'
|
|
41
44
|
require 'pnap_bmc_api/models/quota_edit_limit_request_details'
|
|
45
|
+
require 'pnap_bmc_api/models/reboot_request'
|
|
42
46
|
require 'pnap_bmc_api/models/relinquish_ip_block'
|
|
47
|
+
require 'pnap_bmc_api/models/reservation_transfer_details'
|
|
43
48
|
require 'pnap_bmc_api/models/reset_result'
|
|
44
49
|
require 'pnap_bmc_api/models/server'
|
|
45
50
|
require 'pnap_bmc_api/models/server_create'
|
data/pnap_bmc_api.gemspec
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
The version of the OpenAPI document: 0.1
|
|
9
9
|
Contact: support@phoenixnap.com
|
|
10
10
|
Generated by: https://openapi-generator.tech
|
|
11
|
-
|
|
11
|
+
Generator version: 7.20.0
|
|
12
12
|
|
|
13
13
|
=end
|
|
14
14
|
|
|
@@ -19,14 +19,14 @@ Gem::Specification.new do |s|
|
|
|
19
19
|
s.name = "pnap_bmc_api"
|
|
20
20
|
s.version = BmcApi::VERSION
|
|
21
21
|
s.platform = Gem::Platform::RUBY
|
|
22
|
-
s.authors = ["
|
|
22
|
+
s.authors = ["OpenAPI-Generator"]
|
|
23
23
|
s.email = ["support@phoenixnap.com"]
|
|
24
|
-
s.homepage = "https://
|
|
24
|
+
s.homepage = "https://openapi-generator.tech"
|
|
25
25
|
s.summary = "Bare Metal Cloud API Ruby Gem"
|
|
26
|
-
s.description = "Bare Metal Cloud API
|
|
26
|
+
s.description = "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> "
|
|
27
27
|
s.license = "MPL-2.0"
|
|
28
28
|
s.required_ruby_version = ">= 2.7"
|
|
29
|
-
s.metadata = {
|
|
29
|
+
s.metadata = {}
|
|
30
30
|
|
|
31
31
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
32
32
|
|
|
@@ -36,4 +36,4 @@ Gem::Specification.new do |s|
|
|
|
36
36
|
s.test_files = `find spec/*`.split("\n")
|
|
37
37
|
s.executables = []
|
|
38
38
|
s.require_paths = ["lib"]
|
|
39
|
-
end
|
|
39
|
+
end
|
data/spec/api/quotas_api_spec.rb
CHANGED
|
@@ -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
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -50,6 +50,7 @@ describe 'ServersApi' do
|
|
|
50
50
|
# List all servers owned by account.
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @option opts [Array<String>] :tag A list of query parameters related to tags in the form of tagName.tagValue
|
|
53
|
+
# @option opts [Array<String>] :location Filters servers by server location
|
|
53
54
|
# @return [Array<Server>]
|
|
54
55
|
describe 'servers_get test' do
|
|
55
56
|
it 'should work' do
|
|
@@ -126,6 +127,7 @@ describe 'ServersApi' do
|
|
|
126
127
|
# Reboot specific server.
|
|
127
128
|
# @param server_id The server's ID.
|
|
128
129
|
# @param [Hash] opts the optional parameters
|
|
130
|
+
# @option opts [RebootRequest] :reboot_request Configuration option to specify the reboot type: STANDARD or IPXE (default: STANDARD).
|
|
129
131
|
# @return [ActionResult]
|
|
130
132
|
describe 'servers_server_id_actions_reboot_post test' do
|
|
131
133
|
it 'should work' do
|
|
@@ -171,6 +173,19 @@ describe 'ServersApi' do
|
|
|
171
173
|
end
|
|
172
174
|
end
|
|
173
175
|
|
|
176
|
+
# unit tests for servers_server_id_actions_transfer_reservation
|
|
177
|
+
# Transfer server reservation.
|
|
178
|
+
# Transfer server reservation. An active (READY) reservation can be transferred from a server in ERROR or RESERVED status to another HOURLY provisioned server of the same location and type.
|
|
179
|
+
# @param server_id The server's ID.
|
|
180
|
+
# @param reservation_transfer_details
|
|
181
|
+
# @param [Hash] opts the optional parameters
|
|
182
|
+
# @return [Server]
|
|
183
|
+
describe 'servers_server_id_actions_transfer_reservation test' do
|
|
184
|
+
it 'should work' do
|
|
185
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
174
189
|
# unit tests for servers_server_id_delete
|
|
175
190
|
# Delete server.
|
|
176
191
|
# Deprovision specific server. Any IP blocks assigned to this server will also be relinquished and deleted. Deprecated: see /servers/{serverId}/actions/deprovision
|
|
@@ -222,6 +237,19 @@ describe 'ServersApi' do
|
|
|
222
237
|
end
|
|
223
238
|
end
|
|
224
239
|
|
|
240
|
+
# unit tests for servers_server_id_os_configuration_ipxe_put
|
|
241
|
+
# Updates the iPXE OS configuration.
|
|
242
|
+
# Updates the iPXE OS configuration by updating the URL and the native VLAN configuration.
|
|
243
|
+
# @param server_id The server's ID.
|
|
244
|
+
# @param os_configuration_ipxe
|
|
245
|
+
# @param [Hash] opts the optional parameters
|
|
246
|
+
# @return [OsConfigurationIPXE]
|
|
247
|
+
describe 'servers_server_id_os_configuration_ipxe_put test' do
|
|
248
|
+
it 'should work' do
|
|
249
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
225
253
|
# unit tests for servers_server_id_patch
|
|
226
254
|
# Patch a Server.
|
|
227
255
|
# Any changes to the hostname or description using the BMC API will reflect solely in the BMC API and portal. The changes are intended to keep the BMC data up to date with your server. We do not have access to your server's settings. Local changes to the server's hostname will not be reflected in the API or portal.
|
|
@@ -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
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ require 'date'
|
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
20
|
describe BmcApi::ActionResult do
|
|
21
|
-
let(:instance) { BmcApi::ActionResult.new }
|
|
21
|
+
#let(:instance) { BmcApi::ActionResult.new }
|
|
22
22
|
|
|
23
23
|
describe 'test an instance of ActionResult' do
|
|
24
24
|
it 'should create an instance of ActionResult' do
|
|
@@ -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
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ require 'date'
|
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
20
|
describe BmcApi::DeleteResult do
|
|
21
|
-
let(:instance) { BmcApi::DeleteResult.new }
|
|
21
|
+
#let(:instance) { BmcApi::DeleteResult.new }
|
|
22
22
|
|
|
23
23
|
describe 'test an instance of DeleteResult' do
|
|
24
24
|
it 'should create an instance of DeleteResult' do
|
|
@@ -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
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ require 'date'
|
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
20
|
describe BmcApi::DeleteSshKeyResult do
|
|
21
|
-
let(:instance) { BmcApi::DeleteSshKeyResult.new }
|
|
21
|
+
#let(:instance) { BmcApi::DeleteSshKeyResult.new }
|
|
22
22
|
|
|
23
23
|
describe 'test an instance of DeleteSshKeyResult' do
|
|
24
24
|
it 'should create an instance of DeleteSshKeyResult' do
|
data/spec/models/error_spec.rb
CHANGED
|
@@ -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
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ require 'date'
|
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
20
|
describe BmcApi::Error do
|
|
21
|
-
let(:instance) { BmcApi::Error.new }
|
|
21
|
+
#let(:instance) { BmcApi::Error.new }
|
|
22
22
|
|
|
23
23
|
describe 'test an instance of Error' do
|
|
24
24
|
it 'should create an instance of Error' do
|