pnap_bmc_api 2.0.0 → 2.2.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 +3 -0
- data/VERSION +1 -1
- data/docs/EsxiDatastoreConfiguration.md +18 -0
- data/docs/EsxiOsConfiguration.md +18 -0
- data/docs/GpuConfiguration.md +20 -0
- data/docs/OsConfiguration.md +2 -0
- data/docs/OsConfigurationCloudInit.md +2 -2
- data/docs/Quota.md +1 -1
- data/docs/RelinquishIpBlock.md +1 -1
- data/docs/Server.md +4 -2
- data/docs/ServerCreate.md +2 -2
- data/docs/ServerNetworkUpdate.md +2 -2
- data/docs/ServerProvision.md +1 -1
- data/docs/ServerPublicNetwork.md +5 -3
- data/docs/ServersApi.md +1 -1
- data/lib/pnap_bmc_api/api/servers_api.rb +2 -2
- data/lib/pnap_bmc_api/api_client.rb +2 -2
- data/lib/pnap_bmc_api/models/esxi_datastore_configuration.rb +262 -0
- data/lib/pnap_bmc_api/models/esxi_os_configuration.rb +215 -0
- data/lib/pnap_bmc_api/models/gpu_configuration.rb +226 -0
- data/lib/pnap_bmc_api/models/os_configuration.rb +10 -1
- data/lib/pnap_bmc_api/models/os_configuration_cloud_init.rb +1 -1
- data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +7 -3
- data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +7 -3
- data/lib/pnap_bmc_api/models/relinquish_ip_block.rb +2 -2
- data/lib/pnap_bmc_api/models/server.rb +12 -3
- data/lib/pnap_bmc_api/models/server_create.rb +2 -2
- data/lib/pnap_bmc_api/models/server_network_update.rb +1 -1
- data/lib/pnap_bmc_api/models/server_provision.rb +1 -1
- data/lib/pnap_bmc_api/models/server_public_network.rb +15 -5
- data/lib/pnap_bmc_api.rb +3 -0
- data/spec/api/servers_api_spec.rb +1 -1
- data/spec/models/esxi_datastore_configuration_spec.rb +36 -0
- data/spec/models/esxi_os_configuration_spec.rb +36 -0
- data/spec/models/gpu_configuration_spec.rb +42 -0
- data/spec/models/os_configuration_spec.rb +6 -0
- data/spec/models/server_public_network_spec.rb +6 -0
- data/spec/models/server_spec.rb +6 -0
- metadata +51 -39
@@ -0,0 +1,215 @@
|
|
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: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module BmcApi
|
17
|
+
# Esxi OS configuration.
|
18
|
+
class EsxiOsConfiguration
|
19
|
+
attr_accessor :datastore_configuration
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'datastore_configuration' => :'datastoreConfiguration'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'datastore_configuration' => :'EsxiDatastoreConfiguration'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BmcApi::EsxiOsConfiguration` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::EsxiOsConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'datastore_configuration')
|
62
|
+
self.datastore_configuration = attributes[:'datastore_configuration']
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
+
# @return Array for valid properties with the reasons
|
68
|
+
def list_invalid_properties
|
69
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
|
+
invalid_properties = Array.new
|
71
|
+
invalid_properties
|
72
|
+
end
|
73
|
+
|
74
|
+
# Check to see if the all the properties in the model are valid
|
75
|
+
# @return true if the model is valid
|
76
|
+
def valid?
|
77
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
78
|
+
true
|
79
|
+
end
|
80
|
+
|
81
|
+
# Checks equality by comparing each attribute.
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def ==(o)
|
84
|
+
return true if self.equal?(o)
|
85
|
+
self.class == o.class &&
|
86
|
+
datastore_configuration == o.datastore_configuration
|
87
|
+
end
|
88
|
+
|
89
|
+
# @see the `==` method
|
90
|
+
# @param [Object] Object to be compared
|
91
|
+
def eql?(o)
|
92
|
+
self == o
|
93
|
+
end
|
94
|
+
|
95
|
+
# Calculates hash code according to all attributes.
|
96
|
+
# @return [Integer] Hash code
|
97
|
+
def hash
|
98
|
+
[datastore_configuration].hash
|
99
|
+
end
|
100
|
+
|
101
|
+
# Builds the object from hash
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
# @return [Object] Returns the model itself
|
104
|
+
def self.build_from_hash(attributes)
|
105
|
+
return nil unless attributes.is_a?(Hash)
|
106
|
+
attributes = attributes.transform_keys(&:to_sym)
|
107
|
+
transformed_hash = {}
|
108
|
+
openapi_types.each_pair do |key, type|
|
109
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
110
|
+
transformed_hash["#{key}"] = nil
|
111
|
+
elsif type =~ /\AArray<(.*)>/i
|
112
|
+
# check to ensure the input is an array given that the attribute
|
113
|
+
# is documented as an array but the input is not
|
114
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
115
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
116
|
+
end
|
117
|
+
elsif !attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
119
|
+
end
|
120
|
+
end
|
121
|
+
new(transformed_hash)
|
122
|
+
end
|
123
|
+
|
124
|
+
# Deserializes the data based on type
|
125
|
+
# @param string type Data type
|
126
|
+
# @param string value Value to be deserialized
|
127
|
+
# @return [Object] Deserialized data
|
128
|
+
def self._deserialize(type, value)
|
129
|
+
case type.to_sym
|
130
|
+
when :Time
|
131
|
+
Time.parse(value)
|
132
|
+
when :Date
|
133
|
+
Date.parse(value)
|
134
|
+
when :String
|
135
|
+
value.to_s
|
136
|
+
when :Integer
|
137
|
+
value.to_i
|
138
|
+
when :Float
|
139
|
+
value.to_f
|
140
|
+
when :Boolean
|
141
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
142
|
+
true
|
143
|
+
else
|
144
|
+
false
|
145
|
+
end
|
146
|
+
when :Object
|
147
|
+
# generic object (usually a Hash), return directly
|
148
|
+
value
|
149
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
150
|
+
inner_type = Regexp.last_match[:inner_type]
|
151
|
+
value.map { |v| _deserialize(inner_type, v) }
|
152
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
153
|
+
k_type = Regexp.last_match[:k_type]
|
154
|
+
v_type = Regexp.last_match[:v_type]
|
155
|
+
{}.tap do |hash|
|
156
|
+
value.each do |k, v|
|
157
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
else # model
|
161
|
+
# models (e.g. Pet) or oneOf
|
162
|
+
klass = BmcApi.const_get(type)
|
163
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the string representation of the object
|
168
|
+
# @return [String] String presentation of the object
|
169
|
+
def to_s
|
170
|
+
to_hash.to_s
|
171
|
+
end
|
172
|
+
|
173
|
+
# to_body is an alias to to_hash (backward compatibility)
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_body
|
176
|
+
to_hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the object in the form of hash
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_hash
|
182
|
+
hash = {}
|
183
|
+
self.class.attribute_map.each_pair do |attr, param|
|
184
|
+
value = self.send(attr)
|
185
|
+
if value.nil?
|
186
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
|
+
end
|
189
|
+
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map { |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
@@ -0,0 +1,226 @@
|
|
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: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module BmcApi
|
17
|
+
# The GPU configuration.
|
18
|
+
class GpuConfiguration
|
19
|
+
# The long name of the GPU.
|
20
|
+
attr_accessor :long_name
|
21
|
+
|
22
|
+
# The number of GPUs.
|
23
|
+
attr_accessor :count
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'long_name' => :'longName',
|
29
|
+
:'count' => :'count'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'long_name' => :'String',
|
42
|
+
:'count' => :'Integer'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# List of attributes with nullable: true
|
47
|
+
def self.openapi_nullable
|
48
|
+
Set.new([
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
if (!attributes.is_a?(Hash))
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BmcApi::GpuConfiguration` initialize method"
|
57
|
+
end
|
58
|
+
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::GpuConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'long_name')
|
68
|
+
self.long_name = attributes[:'long_name']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'count')
|
72
|
+
self.count = attributes[:'count']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
77
|
+
# @return Array for valid properties with the reasons
|
78
|
+
def list_invalid_properties
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
80
|
+
invalid_properties = Array.new
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
88
|
+
true
|
89
|
+
end
|
90
|
+
|
91
|
+
# Checks equality by comparing each attribute.
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def ==(o)
|
94
|
+
return true if self.equal?(o)
|
95
|
+
self.class == o.class &&
|
96
|
+
long_name == o.long_name &&
|
97
|
+
count == o.count
|
98
|
+
end
|
99
|
+
|
100
|
+
# @see the `==` method
|
101
|
+
# @param [Object] Object to be compared
|
102
|
+
def eql?(o)
|
103
|
+
self == o
|
104
|
+
end
|
105
|
+
|
106
|
+
# Calculates hash code according to all attributes.
|
107
|
+
# @return [Integer] Hash code
|
108
|
+
def hash
|
109
|
+
[long_name, count].hash
|
110
|
+
end
|
111
|
+
|
112
|
+
# Builds the object from hash
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
+
# @return [Object] Returns the model itself
|
115
|
+
def self.build_from_hash(attributes)
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
117
|
+
attributes = attributes.transform_keys(&:to_sym)
|
118
|
+
transformed_hash = {}
|
119
|
+
openapi_types.each_pair do |key, type|
|
120
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
121
|
+
transformed_hash["#{key}"] = nil
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
126
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
127
|
+
end
|
128
|
+
elsif !attributes[attribute_map[key]].nil?
|
129
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
130
|
+
end
|
131
|
+
end
|
132
|
+
new(transformed_hash)
|
133
|
+
end
|
134
|
+
|
135
|
+
# Deserializes the data based on type
|
136
|
+
# @param string type Data type
|
137
|
+
# @param string value Value to be deserialized
|
138
|
+
# @return [Object] Deserialized data
|
139
|
+
def self._deserialize(type, value)
|
140
|
+
case type.to_sym
|
141
|
+
when :Time
|
142
|
+
Time.parse(value)
|
143
|
+
when :Date
|
144
|
+
Date.parse(value)
|
145
|
+
when :String
|
146
|
+
value.to_s
|
147
|
+
when :Integer
|
148
|
+
value.to_i
|
149
|
+
when :Float
|
150
|
+
value.to_f
|
151
|
+
when :Boolean
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
153
|
+
true
|
154
|
+
else
|
155
|
+
false
|
156
|
+
end
|
157
|
+
when :Object
|
158
|
+
# generic object (usually a Hash), return directly
|
159
|
+
value
|
160
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
161
|
+
inner_type = Regexp.last_match[:inner_type]
|
162
|
+
value.map { |v| _deserialize(inner_type, v) }
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
164
|
+
k_type = Regexp.last_match[:k_type]
|
165
|
+
v_type = Regexp.last_match[:v_type]
|
166
|
+
{}.tap do |hash|
|
167
|
+
value.each do |k, v|
|
168
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
else # model
|
172
|
+
# models (e.g. Pet) or oneOf
|
173
|
+
klass = BmcApi.const_get(type)
|
174
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the string representation of the object
|
179
|
+
# @return [String] String presentation of the object
|
180
|
+
def to_s
|
181
|
+
to_hash.to_s
|
182
|
+
end
|
183
|
+
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_body
|
187
|
+
to_hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the object in the form of hash
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_hash
|
193
|
+
hash = {}
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
195
|
+
value = self.send(attr)
|
196
|
+
if value.nil?
|
197
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
198
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
199
|
+
end
|
200
|
+
|
201
|
+
hash[param] = _to_hash(value)
|
202
|
+
end
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map { |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
@@ -34,6 +34,8 @@ module BmcApi
|
|
34
34
|
# If true, OS will be installed to and booted from the server's RAM. On restart RAM OS will be lost and the server will not be reachable unless a custom bootable OS has been deployed. Follow the <a href='https://phoenixnap.com/kb/bmc-custom-os' target='_blank'>instructions</a> on how to install custom OS on BMC. Only supported for ubuntu/focal and ubuntu/jammy.
|
35
35
|
attr_accessor :install_os_to_ram
|
36
36
|
|
37
|
+
attr_accessor :esxi
|
38
|
+
|
37
39
|
attr_accessor :cloud_init
|
38
40
|
|
39
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -46,6 +48,7 @@ module BmcApi
|
|
46
48
|
:'management_ui_url' => :'managementUiUrl',
|
47
49
|
:'management_access_allowed_ips' => :'managementAccessAllowedIps',
|
48
50
|
:'install_os_to_ram' => :'installOsToRam',
|
51
|
+
:'esxi' => :'esxi',
|
49
52
|
:'cloud_init' => :'cloudInit'
|
50
53
|
}
|
51
54
|
end
|
@@ -65,6 +68,7 @@ module BmcApi
|
|
65
68
|
:'management_ui_url' => :'String',
|
66
69
|
:'management_access_allowed_ips' => :'Array<String>',
|
67
70
|
:'install_os_to_ram' => :'Boolean',
|
71
|
+
:'esxi' => :'EsxiOsConfiguration',
|
68
72
|
:'cloud_init' => :'OsConfigurationCloudInit'
|
69
73
|
}
|
70
74
|
end
|
@@ -122,6 +126,10 @@ module BmcApi
|
|
122
126
|
self.install_os_to_ram = false
|
123
127
|
end
|
124
128
|
|
129
|
+
if attributes.key?(:'esxi')
|
130
|
+
self.esxi = attributes[:'esxi']
|
131
|
+
end
|
132
|
+
|
125
133
|
if attributes.key?(:'cloud_init')
|
126
134
|
self.cloud_init = attributes[:'cloud_init']
|
127
135
|
end
|
@@ -173,6 +181,7 @@ module BmcApi
|
|
173
181
|
management_ui_url == o.management_ui_url &&
|
174
182
|
management_access_allowed_ips == o.management_access_allowed_ips &&
|
175
183
|
install_os_to_ram == o.install_os_to_ram &&
|
184
|
+
esxi == o.esxi &&
|
176
185
|
cloud_init == o.cloud_init
|
177
186
|
end
|
178
187
|
|
@@ -185,7 +194,7 @@ module BmcApi
|
|
185
194
|
# Calculates hash code according to all attributes.
|
186
195
|
# @return [Integer] Hash code
|
187
196
|
def hash
|
188
|
-
[netris_controller, netris_softgate, windows, root_password, management_ui_url, management_access_allowed_ips, install_os_to_ram, cloud_init].hash
|
197
|
+
[netris_controller, netris_softgate, windows, root_password, management_ui_url, management_access_allowed_ips, install_os_to_ram, esxi, cloud_init].hash
|
189
198
|
end
|
190
199
|
|
191
200
|
# Builds the object from hash
|
@@ -16,7 +16,7 @@ require 'time'
|
|
16
16
|
module BmcApi
|
17
17
|
# Cloud-init configuration details.
|
18
18
|
class OsConfigurationCloudInit
|
19
|
-
# (Write-only) User data for the <a href='https://cloudinit.readthedocs.io/en/latest/' target='_blank'>cloud-init</a> configuration in base64 encoding. NoCloud format is supported. Follow the <a href='https://phoenixnap.com/kb/bmc-cloud-init' target='_blank'>instructions</a> on how to provision a server using cloud-init. Only ubuntu/bionic, ubuntu/focal
|
19
|
+
# (Write-only) User data for the <a href='https://cloudinit.readthedocs.io/en/latest/' target='_blank'>cloud-init</a> configuration in base64 encoding. NoCloud format is supported. Follow the <a href='https://phoenixnap.com/kb/bmc-cloud-init' target='_blank'>instructions</a> on how to provision a server using cloud-init. Only ubuntu/bionic, ubuntu/focal, ubuntu/jammy, debian/bullseye, debian/bookworm, centos/centos7, centos/centos8, almalinux/almalinux8, almalinux/almalinux9, rockylinux/rockylinux8, rockylinux/rockylinux9 and virtuozzo/virtuozzo7 are supported. User data will not be stored and cannot be retrieved once you deploy the server. Copy and save it for future reference.
|
20
20
|
attr_accessor :user_data
|
21
21
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -94,7 +94,11 @@ module BmcApi
|
|
94
94
|
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
95
95
|
end
|
96
96
|
|
97
|
-
pattern
|
97
|
+
# This pattern is being manually modified.
|
98
|
+
# (?m) was originally (?s) -- it functions the same, except Ruby doesn't understand (?s)
|
99
|
+
# Information here:
|
100
|
+
# - https://www.rexegg.com/regex-ruby.php
|
101
|
+
pattern = Regexp.new(/^(?m)(?!\s*$).+/)
|
98
102
|
if @reason !~ pattern
|
99
103
|
invalid_properties.push("invalid value for \"reason\", must conform to the pattern #{pattern}.")
|
100
104
|
end
|
@@ -109,7 +113,7 @@ module BmcApi
|
|
109
113
|
return false if @limit.nil?
|
110
114
|
return false if @limit < 0
|
111
115
|
return false if @reason.nil?
|
112
|
-
return false if @reason !~ Regexp.new(/^(?!\s*$).+/)
|
116
|
+
return false if @reason !~ Regexp.new(/^(?m)(?!\s*$).+/)
|
113
117
|
true
|
114
118
|
end
|
115
119
|
|
@@ -134,7 +138,7 @@ module BmcApi
|
|
134
138
|
fail ArgumentError, 'reason cannot be nil'
|
135
139
|
end
|
136
140
|
|
137
|
-
pattern = Regexp.new(/^(?!\s*$).+/)
|
141
|
+
pattern = Regexp.new(/^(?m)(?!\s*$).+/)
|
138
142
|
if reason !~ pattern
|
139
143
|
fail ArgumentError, "invalid value for \"reason\", must conform to the pattern #{pattern}."
|
140
144
|
end
|
@@ -111,7 +111,11 @@ module BmcApi
|
|
111
111
|
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
112
112
|
end
|
113
113
|
|
114
|
-
pattern
|
114
|
+
# This pattern is being manually modified.
|
115
|
+
# (?m) was originally (?s) -- it functions the same, except Ruby doesn't understand (?s)
|
116
|
+
# Information here:
|
117
|
+
# - https://www.rexegg.com/regex-ruby.php
|
118
|
+
pattern = Regexp.new(/^(?m)(?!\s*$).+/)
|
115
119
|
if @reason !~ pattern
|
116
120
|
invalid_properties.push("invalid value for \"reason\", must conform to the pattern #{pattern}.")
|
117
121
|
end
|
@@ -130,7 +134,7 @@ module BmcApi
|
|
130
134
|
return false if @limit.nil?
|
131
135
|
return false if @limit < 0
|
132
136
|
return false if @reason.nil?
|
133
|
-
return false if @reason !~ Regexp.new(/^(?!\s*$).+/)
|
137
|
+
return false if @reason !~ Regexp.new(/^(?m)(?!\s*$).+/)
|
134
138
|
return false if @requested_on.nil?
|
135
139
|
true
|
136
140
|
end
|
@@ -156,7 +160,7 @@ module BmcApi
|
|
156
160
|
fail ArgumentError, 'reason cannot be nil'
|
157
161
|
end
|
158
162
|
|
159
|
-
pattern = Regexp.new(/^(?!\s*$).+/)
|
163
|
+
pattern = Regexp.new(/^(?m)(?!\s*$).+/)
|
160
164
|
if reason !~ pattern
|
161
165
|
fail ArgumentError, "invalid value for \"reason\", must conform to the pattern #{pattern}."
|
162
166
|
end
|
@@ -14,9 +14,9 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module BmcApi
|
17
|
-
# Object used to determine whether to relinquish ownership of the IP
|
17
|
+
# Object used to determine whether to relinquish ownership of the IP blocks upon unassignment from server or server deletion.
|
18
18
|
class RelinquishIpBlock
|
19
|
-
# Determines whether the
|
19
|
+
# Determines whether the IPv4 and IPv6 blocks assigned to the server should be deleted or not.
|
20
20
|
attr_accessor :delete_ip_blocks
|
21
21
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -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`, `windows/srv2022std`, `windows/srv2022dc`, `esxi/esxi70`, `esxi/esxi80`, `almalinux/almalinux8`, `rockylinux/rockylinux8`, `almalinux/almalinux9`, `rockylinux/rockylinux9`, `debian/bullseye`, `debian/bookworm`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g`, `netris/softgate_10g` or `netris/softgate_25g`.
|
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`, `ubuntu/jammy+pytorch`, `ubuntu/noble`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `windows/srv2022std`, `windows/srv2022dc`, `esxi/esxi70`, `esxi/esxi80`, `almalinux/almalinux8`, `rockylinux/rockylinux8`, `almalinux/almalinux9`, `rockylinux/rockylinux9`, `oraclelinux/oraclelinux9`, `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.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`
|
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`, `a1.c5.xlarge`, `d3.s5.xlarge`, `d3.m4.xxlarge`, `d3.m5.xxlarge`, `d3.m6.xxlarge`, `s3.c3.medium`, `s3.c3.large`, `d3.c4.medium`, `d3.c5.medium`, `d3.c6.medium`, `d3.c1.large`, `d3.c2.large`, `d3.c3.large`, `d3.m1.xlarge`, `d3.m2.xlarge`, `d3.m3.xlarge`, `d3.g2.c1.xlarge`, `d3.g2.c2.xlarge`, `d3.g2.c3.xlarge`, s4.x6.c6.large or s4.x6.m6.xlarge.
|
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,8 @@ module BmcApi
|
|
88
88
|
|
89
89
|
attr_accessor :storage_configuration
|
90
90
|
|
91
|
+
attr_accessor :gpu_configuration
|
92
|
+
|
91
93
|
# Unique identifier of the server to which the reservation has been transferred.
|
92
94
|
attr_accessor :superseded_by
|
93
95
|
|
@@ -122,6 +124,7 @@ module BmcApi
|
|
122
124
|
:'os_configuration' => :'osConfiguration',
|
123
125
|
:'network_configuration' => :'networkConfiguration',
|
124
126
|
:'storage_configuration' => :'storageConfiguration',
|
127
|
+
:'gpu_configuration' => :'gpuConfiguration',
|
125
128
|
:'superseded_by' => :'supersededBy',
|
126
129
|
:'supersedes' => :'supersedes'
|
127
130
|
}
|
@@ -160,6 +163,7 @@ module BmcApi
|
|
160
163
|
:'os_configuration' => :'OsConfiguration',
|
161
164
|
:'network_configuration' => :'NetworkConfiguration',
|
162
165
|
:'storage_configuration' => :'StorageConfiguration',
|
166
|
+
:'gpu_configuration' => :'GpuConfiguration',
|
163
167
|
:'superseded_by' => :'String',
|
164
168
|
:'supersedes' => :'String'
|
165
169
|
}
|
@@ -324,6 +328,10 @@ module BmcApi
|
|
324
328
|
self.storage_configuration = nil
|
325
329
|
end
|
326
330
|
|
331
|
+
if attributes.key?(:'gpu_configuration')
|
332
|
+
self.gpu_configuration = attributes[:'gpu_configuration']
|
333
|
+
end
|
334
|
+
|
327
335
|
if attributes.key?(:'superseded_by')
|
328
336
|
self.superseded_by = attributes[:'superseded_by']
|
329
337
|
end
|
@@ -606,6 +614,7 @@ module BmcApi
|
|
606
614
|
os_configuration == o.os_configuration &&
|
607
615
|
network_configuration == o.network_configuration &&
|
608
616
|
storage_configuration == o.storage_configuration &&
|
617
|
+
gpu_configuration == o.gpu_configuration &&
|
609
618
|
superseded_by == o.superseded_by &&
|
610
619
|
supersedes == o.supersedes
|
611
620
|
end
|
@@ -619,7 +628,7 @@ module BmcApi
|
|
619
628
|
# Calculates hash code according to all attributes.
|
620
629
|
# @return [Integer] Hash code
|
621
630
|
def 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
|
631
|
+
[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, gpu_configuration, superseded_by, supersedes].hash
|
623
632
|
end
|
624
633
|
|
625
634
|
# 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`, `windows/srv2022std`, `windows/srv2022dc`, `esxi/esxi70`, `esxi/esxi80`, `almalinux/almalinux8`, `rockylinux/rockylinux8`, `almalinux/almalinux9`, `rockylinux/rockylinux9`, `virtuozzo/virtuozzo7`, `debian/bullseye`, `debian/bookworm`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g`, `netris/softgate_10g` or `netris/softgate_25g`.
|
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`, `ubuntu/jammy+pytorch`, `ubuntu/noble`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `windows/srv2022std`, `windows/srv2022dc`, `esxi/esxi70`, `esxi/esxi80`, `almalinux/almalinux8`, `rockylinux/rockylinux8`, `almalinux/almalinux9`, `rockylinux/rockylinux9`, `virtuozzo/virtuozzo7`, `oraclelinux/oraclelinux9`, `debian/bullseye`, `debian/bookworm`, `proxmox/bullseye`, `proxmox/proxmox8`, `netris/controller`, `netris/softgate_1g`, `netris/softgate_10g` or `netris/softgate_25g`.
|
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.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`
|
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.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`, `a1.c5.xlarge`, `d3.s5.xlarge`, `d3.m4.xxlarge`, `d3.m5.xxlarge`, `d3.m6.xxlarge`, `s3.c3.medium`, `s3.c3.large`, `d3.c4.medium`, `d3.c5.medium`, `d3.c6.medium`, `d3.c1.large`, `d3.c2.large`, `d3.c3.large`, `d3.m1.xlarge`, `d3.m2.xlarge`, `d3.m3.xlarge`, `d3.g2.c1.xlarge`, `d3.g2.c2.xlarge`, `d3.g2.c3.xlarge`, s4.x6.c6.large or s4.x6.m6.xlarge.
|
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`.
|
@@ -16,7 +16,7 @@ require 'time'
|
|
16
16
|
module BmcApi
|
17
17
|
# Update network details of bare metal server.
|
18
18
|
class ServerNetworkUpdate
|
19
|
-
# List of IPs to be associated to the server.<br> Valid IP formats
|
19
|
+
# List of IPs to be associated to the server.<br> Valid IP formats include single IP addresses or IP ranges (IPv4 or IPv6). IPs must be within the network's range.<br> Setting the `force` query parameter to `true` allows you to:<ul> <li> Assign no specific IP addresses by designating an empty array of IPs. <li> Assign one or more IP addresses which are already configured on other resource(s) in network. <li> Assign IP addresses which are considered as reserved in network.</ul>
|
20
20
|
attr_accessor :ips
|
21
21
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|