pnap_bmc_api 1.0.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 (114) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +196 -0
  4. data/Rakefile +10 -0
  5. data/VERSION +1 -0
  6. data/docs/ActionResult.md +18 -0
  7. data/docs/DeleteResult.md +20 -0
  8. data/docs/DeleteSshKeyResult.md +20 -0
  9. data/docs/Error.md +20 -0
  10. data/docs/IpBlocksConfiguration.md +20 -0
  11. data/docs/NetworkConfiguration.md +20 -0
  12. data/docs/OsConfiguration.md +24 -0
  13. data/docs/OsConfigurationMap.md +22 -0
  14. data/docs/OsConfigurationMapEsxi.md +22 -0
  15. data/docs/OsConfigurationMapProxmox.md +22 -0
  16. data/docs/OsConfigurationWindows.md +18 -0
  17. data/docs/PrivateNetworkConfiguration.md +22 -0
  18. data/docs/Quota.md +32 -0
  19. data/docs/QuotaEditLimitRequest.md +20 -0
  20. data/docs/QuotaEditLimitRequestDetails.md +22 -0
  21. data/docs/QuotaEditLimitRequestDetailsAllOf.md +18 -0
  22. data/docs/QuotasApi.md +217 -0
  23. data/docs/RelinquishIpBlock.md +18 -0
  24. data/docs/ResetResult.md +22 -0
  25. data/docs/SSHKeysApi.md +360 -0
  26. data/docs/Server.md +64 -0
  27. data/docs/ServerCreate.md +44 -0
  28. data/docs/ServerIpBlock.md +20 -0
  29. data/docs/ServerPatch.md +20 -0
  30. data/docs/ServerPrivateNetwork.md +24 -0
  31. data/docs/ServerReserve.md +18 -0
  32. data/docs/ServerReset.md +24 -0
  33. data/docs/ServersApi.md +1237 -0
  34. data/docs/SshKey.md +30 -0
  35. data/docs/SshKeyCreate.md +22 -0
  36. data/docs/SshKeyUpdate.md +20 -0
  37. data/docs/TagAssignment.md +26 -0
  38. data/docs/TagAssignmentRequest.md +20 -0
  39. data/lib/pnap_bmc_api/api/quotas_api.rb +212 -0
  40. data/lib/pnap_bmc_api/api/servers_api.rb +1159 -0
  41. data/lib/pnap_bmc_api/api/ssh_keys_api.rb +339 -0
  42. data/lib/pnap_bmc_api/api_client.rb +392 -0
  43. data/lib/pnap_bmc_api/api_error.rb +57 -0
  44. data/lib/pnap_bmc_api/configuration.rb +278 -0
  45. data/lib/pnap_bmc_api/models/action_result.rb +225 -0
  46. data/lib/pnap_bmc_api/models/delete_result.rb +240 -0
  47. data/lib/pnap_bmc_api/models/delete_ssh_key_result.rb +240 -0
  48. data/lib/pnap_bmc_api/models/error.rb +236 -0
  49. data/lib/pnap_bmc_api/models/ip_blocks_configuration.rb +283 -0
  50. data/lib/pnap_bmc_api/models/network_configuration.rb +228 -0
  51. data/lib/pnap_bmc_api/models/os_configuration.rb +266 -0
  52. data/lib/pnap_bmc_api/models/os_configuration_map.rb +237 -0
  53. data/lib/pnap_bmc_api/models/os_configuration_map_esxi.rb +257 -0
  54. data/lib/pnap_bmc_api/models/os_configuration_map_proxmox.rb +257 -0
  55. data/lib/pnap_bmc_api/models/os_configuration_windows.rb +237 -0
  56. data/lib/pnap_bmc_api/models/private_network_configuration.rb +244 -0
  57. data/lib/pnap_bmc_api/models/quota.rb +415 -0
  58. data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +259 -0
  59. data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +281 -0
  60. data/lib/pnap_bmc_api/models/quota_edit_limit_request_details_all_of.rb +225 -0
  61. data/lib/pnap_bmc_api/models/relinquish_ip_block.rb +222 -0
  62. data/lib/pnap_bmc_api/models/reset_result.rb +244 -0
  63. data/lib/pnap_bmc_api/models/server.rb +687 -0
  64. data/lib/pnap_bmc_api/models/server_create.rb +434 -0
  65. data/lib/pnap_bmc_api/models/server_ip_block.rb +235 -0
  66. data/lib/pnap_bmc_api/models/server_patch.rb +280 -0
  67. data/lib/pnap_bmc_api/models/server_private_network.rb +274 -0
  68. data/lib/pnap_bmc_api/models/server_reserve.rb +225 -0
  69. data/lib/pnap_bmc_api/models/server_reset.rb +255 -0
  70. data/lib/pnap_bmc_api/models/ssh_key.rb +315 -0
  71. data/lib/pnap_bmc_api/models/ssh_key_create.rb +283 -0
  72. data/lib/pnap_bmc_api/models/ssh_key_update.rb +268 -0
  73. data/lib/pnap_bmc_api/models/tag_assignment.rb +309 -0
  74. data/lib/pnap_bmc_api/models/tag_assignment_request.rb +235 -0
  75. data/lib/pnap_bmc_api/version.rb +19 -0
  76. data/lib/pnap_bmc_api.rb +72 -0
  77. data/pnap_bmc_api.gemspec +39 -0
  78. data/spec/api/quotas_api_spec.rb +71 -0
  79. data/spec/api/servers_api_spec.rb +249 -0
  80. data/spec/api/ssh_keys_api_spec.rb +95 -0
  81. data/spec/api_client_spec.rb +226 -0
  82. data/spec/configuration_spec.rb +42 -0
  83. data/spec/models/action_result_spec.rb +34 -0
  84. data/spec/models/delete_result_spec.rb +40 -0
  85. data/spec/models/delete_ssh_key_result_spec.rb +40 -0
  86. data/spec/models/error_spec.rb +40 -0
  87. data/spec/models/ip_blocks_configuration_spec.rb +44 -0
  88. data/spec/models/network_configuration_spec.rb +40 -0
  89. data/spec/models/os_configuration_map_esxi_spec.rb +46 -0
  90. data/spec/models/os_configuration_map_proxmox_spec.rb +46 -0
  91. data/spec/models/os_configuration_map_spec.rb +46 -0
  92. data/spec/models/os_configuration_spec.rb +52 -0
  93. data/spec/models/os_configuration_windows_spec.rb +34 -0
  94. data/spec/models/private_network_configuration_spec.rb +46 -0
  95. data/spec/models/quota_edit_limit_request_details_all_of_spec.rb +34 -0
  96. data/spec/models/quota_edit_limit_request_details_spec.rb +46 -0
  97. data/spec/models/quota_edit_limit_request_spec.rb +40 -0
  98. data/spec/models/quota_spec.rb +84 -0
  99. data/spec/models/relinquish_ip_block_spec.rb +34 -0
  100. data/spec/models/reset_result_spec.rb +46 -0
  101. data/spec/models/server_create_spec.rb +112 -0
  102. data/spec/models/server_ip_block_spec.rb +40 -0
  103. data/spec/models/server_patch_spec.rb +40 -0
  104. data/spec/models/server_private_network_spec.rb +52 -0
  105. data/spec/models/server_reserve_spec.rb +34 -0
  106. data/spec/models/server_reset_spec.rb +52 -0
  107. data/spec/models/server_spec.rb +172 -0
  108. data/spec/models/ssh_key_create_spec.rb +46 -0
  109. data/spec/models/ssh_key_spec.rb +70 -0
  110. data/spec/models/ssh_key_update_spec.rb +40 -0
  111. data/spec/models/tag_assignment_request_spec.rb +40 -0
  112. data/spec/models/tag_assignment_spec.rb +62 -0
  113. data/spec/spec_helper.rb +111 -0
  114. metadata +232 -0
@@ -0,0 +1,235 @@
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, 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: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BmcApi
17
+ # Tag request to assign to resource.
18
+ class TagAssignmentRequest
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
+ attr_accessor :name
21
+
22
+ # The value of the tag assigned to the resource. Tag values 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}.
23
+ attr_accessor :value
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'name' => :'name',
29
+ :'value' => :'value'
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
+ :'name' => :'String',
42
+ :'value' => :'String'
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::TagAssignmentRequest` 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::TagAssignmentRequest`. 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?(:'name')
68
+ self.name = attributes[:'name']
69
+ end
70
+
71
+ if attributes.key?(:'value')
72
+ self.value = attributes[:'value']
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
+ invalid_properties = Array.new
80
+ if @name.nil?
81
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ return false if @name.nil?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ name == o.name &&
100
+ value == o.value
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [name, value].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ new.build_from_hash(attributes)
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ self.class.openapi_types.each_pair do |key, type|
128
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
129
+ self.send("#{key}=", nil)
130
+ elsif type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
134
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
135
+ end
136
+ elsif !attributes[self.class.attribute_map[key]].nil?
137
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
138
+ end
139
+ end
140
+
141
+ self
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def _deserialize(type, value)
149
+ case type.to_sym
150
+ when :Time
151
+ Time.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :Boolean
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ # models (e.g. Pet) or oneOf
182
+ klass = BmcApi.const_get(type)
183
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
184
+ end
185
+ end
186
+
187
+ # Returns the string representation of the object
188
+ # @return [String] String presentation of the object
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_hash (backward compatibility)
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_body
196
+ to_hash
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ if value.nil?
206
+ is_nullable = self.class.openapi_nullable.include?(attr)
207
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
+ end
209
+
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+
235
+ end
@@ -0,0 +1,19 @@
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, 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: 5.4.0
10
+
11
+ =end
12
+
13
+ def get_version()
14
+ return File.read(File.expand_path('../../../VERSION', __FILE__)).strip
15
+ end
16
+
17
+ module BmcApi
18
+ VERSION = get_version()
19
+ end
@@ -0,0 +1,72 @@
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, 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: 5.4.0
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'pnap_bmc_api/api_client'
15
+ require 'pnap_bmc_api/api_error'
16
+ require 'pnap_bmc_api/version'
17
+ require 'pnap_bmc_api/configuration'
18
+
19
+ # Models
20
+ require 'pnap_bmc_api/models/action_result'
21
+ require 'pnap_bmc_api/models/delete_result'
22
+ require 'pnap_bmc_api/models/delete_ssh_key_result'
23
+ require 'pnap_bmc_api/models/error'
24
+ require 'pnap_bmc_api/models/ip_blocks_configuration'
25
+ require 'pnap_bmc_api/models/network_configuration'
26
+ require 'pnap_bmc_api/models/os_configuration'
27
+ require 'pnap_bmc_api/models/os_configuration_map'
28
+ require 'pnap_bmc_api/models/os_configuration_map_esxi'
29
+ require 'pnap_bmc_api/models/os_configuration_map_proxmox'
30
+ require 'pnap_bmc_api/models/os_configuration_windows'
31
+ require 'pnap_bmc_api/models/private_network_configuration'
32
+ require 'pnap_bmc_api/models/quota'
33
+ require 'pnap_bmc_api/models/quota_edit_limit_request'
34
+ require 'pnap_bmc_api/models/quota_edit_limit_request_details'
35
+ require 'pnap_bmc_api/models/quota_edit_limit_request_details_all_of'
36
+ require 'pnap_bmc_api/models/relinquish_ip_block'
37
+ require 'pnap_bmc_api/models/reset_result'
38
+ require 'pnap_bmc_api/models/server'
39
+ require 'pnap_bmc_api/models/server_create'
40
+ require 'pnap_bmc_api/models/server_ip_block'
41
+ require 'pnap_bmc_api/models/server_patch'
42
+ require 'pnap_bmc_api/models/server_private_network'
43
+ require 'pnap_bmc_api/models/server_reserve'
44
+ require 'pnap_bmc_api/models/server_reset'
45
+ require 'pnap_bmc_api/models/ssh_key'
46
+ require 'pnap_bmc_api/models/ssh_key_create'
47
+ require 'pnap_bmc_api/models/ssh_key_update'
48
+ require 'pnap_bmc_api/models/tag_assignment'
49
+ require 'pnap_bmc_api/models/tag_assignment_request'
50
+
51
+ # APIs
52
+ require 'pnap_bmc_api/api/quotas_api'
53
+ require 'pnap_bmc_api/api/ssh_keys_api'
54
+ require 'pnap_bmc_api/api/servers_api'
55
+
56
+ module BmcApi
57
+ class << self
58
+ # Customize default settings for the SDK using block.
59
+ # BmcApi.configure do |config|
60
+ # config.username = "xxx"
61
+ # config.password = "xxx"
62
+ # end
63
+ # If no block given, return the default Configuration object.
64
+ def configure
65
+ if block_given?
66
+ yield(Configuration.default)
67
+ else
68
+ Configuration.default
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,39 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Bare Metal Cloud API
5
+
6
+ #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, 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>
7
+
8
+ The version of the OpenAPI document: 0.1
9
+ Contact: support@phoenixnap.com
10
+ Generated by: https://openapi-generator.tech
11
+ OpenAPI Generator version: 5.4.0
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "pnap_bmc_api/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "pnap_bmc_api"
20
+ s.version = BmcApi::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["PhoenixNAP"]
23
+ s.email = ["support@phoenixnap.com"]
24
+ s.homepage = "https://phoenixnap.com/bare-metal-cloud"
25
+ s.summary = "Bare Metal Cloud API Ruby Gem"
26
+ s.description = "Bare Metal Cloud API Ruby Gem"
27
+ s.license = "MPL-2.0"
28
+ s.required_ruby_version = ">= 2.4"
29
+ s.metadata = { "source_code_uri" => "https://github.com/phoenixnap/ruby-sdk-bmc-poc" }
30
+
31
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+
35
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
36
+ s.test_files = `find spec/*`.split("\n")
37
+ s.executables = []
38
+ s.require_paths = ["lib"]
39
+ end
@@ -0,0 +1,71 @@
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, 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: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for BmcApi::QuotasApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'QuotasApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = BmcApi::QuotasApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of QuotasApi' do
30
+ it 'should create an instance of QuotasApi' do
31
+ expect(@api_instance).to be_instance_of(BmcApi::QuotasApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for quotas_get
36
+ # List quotas
37
+ # Get account quota details.
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [Array<Quota>]
40
+ describe 'quotas_get test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ # unit tests for quotas_quota_id_actions_request_edit_post
47
+ # Request quota limit change.
48
+ # Sends a request to edit the limit of a quota.
49
+ # @param quota_id The ID of the Quota.
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [QuotaEditLimitRequest] :quota_edit_limit_request
52
+ # @return [nil]
53
+ describe 'quotas_quota_id_actions_request_edit_post test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ # unit tests for quotas_quota_id_get
60
+ # Get a quota.
61
+ # Get account quota details.
62
+ # @param quota_id The ID of the Quota.
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [Quota]
65
+ describe 'quotas_quota_id_get test' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ end
@@ -0,0 +1,249 @@
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, 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: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for BmcApi::ServersApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'ServersApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = BmcApi::ServersApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ServersApi' do
30
+ it 'should create an instance of ServersApi' do
31
+ expect(@api_instance).to be_instance_of(BmcApi::ServersApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for delete_private_network
36
+ # Removes the server from private network.
37
+ # Removes the server from private network. &lt;b&gt;No actual configuration is performed on the operating system.&lt;/b&gt; BMC configures exclusively the networking devices in the datacenter infrastructure. You are expected to perform network configuration changes in the operating system of this server. &lt;b&gt;This is an advanced network action that can make your server completely unavailable over any network. Make sure you are able to access this server over remote console in case of misconfiguration.&lt;/b&gt;
38
+ # @param server_id The server&#39;s ID.
39
+ # @param private_network_id The private network identifier.
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [String]
42
+ describe 'delete_private_network test' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ # unit tests for servers_get
49
+ # List servers.
50
+ # List all servers owned by account.
51
+ # @param [Hash] opts the optional parameters
52
+ # @option opts [Array<String>] :tag A list of query parameters related to tags in the form of tagName.tagValue
53
+ # @return [Array<Server>]
54
+ describe 'servers_get test' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
60
+ # unit tests for servers_post
61
+ # Create new server.
62
+ # Create (request) new server for account. Server DNS will be configured to access Google&#39;s public DNS at 8.8.8.8 .
63
+ # @param [Hash] opts the optional parameters
64
+ # @option opts [ServerCreate] :server_create
65
+ # @return [Server]
66
+ describe 'servers_post test' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
72
+ # unit tests for servers_server_id_actions_deprovision_post
73
+ # Deprovision a server.
74
+ # Deprovision the server. Supports advanced deprovision configuration.
75
+ # @param server_id The server&#39;s ID.
76
+ # @param [Hash] opts the optional parameters
77
+ # @option opts [RelinquishIpBlock] :relinquish_ip_block
78
+ # @return [String]
79
+ describe 'servers_server_id_actions_deprovision_post test' do
80
+ it 'should work' do
81
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
+ end
83
+ end
84
+
85
+ # unit tests for servers_server_id_actions_power_off_post
86
+ # Power off server.
87
+ # Power off specific server.
88
+ # @param server_id The server&#39;s ID.
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [ActionResult]
91
+ describe 'servers_server_id_actions_power_off_post test' do
92
+ it 'should work' do
93
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
94
+ end
95
+ end
96
+
97
+ # unit tests for servers_server_id_actions_power_on_post
98
+ # Power on server.
99
+ # Power on specific server.
100
+ # @param server_id The server&#39;s ID.
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [ActionResult]
103
+ describe 'servers_server_id_actions_power_on_post test' do
104
+ it 'should work' do
105
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
106
+ end
107
+ end
108
+
109
+ # unit tests for servers_server_id_actions_reboot_post
110
+ # Reboot server.
111
+ # Reboot specific server.
112
+ # @param server_id The server&#39;s ID.
113
+ # @param [Hash] opts the optional parameters
114
+ # @return [ActionResult]
115
+ describe 'servers_server_id_actions_reboot_post test' do
116
+ it 'should work' do
117
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
118
+ end
119
+ end
120
+
121
+ # unit tests for servers_server_id_actions_reserve_post
122
+ # Reserve server.
123
+ # Reserve specific server.
124
+ # @param server_id The server&#39;s ID.
125
+ # @param [Hash] opts the optional parameters
126
+ # @option opts [ServerReserve] :server_reserve
127
+ # @return [Server]
128
+ describe 'servers_server_id_actions_reserve_post test' do
129
+ it 'should work' do
130
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
131
+ end
132
+ end
133
+
134
+ # unit tests for servers_server_id_actions_reset_post
135
+ # Reset server.
136
+ # Reset specific server.
137
+ # @param server_id The server&#39;s ID.
138
+ # @param [Hash] opts the optional parameters
139
+ # @option opts [ServerReset] :server_reset
140
+ # @return [ResetResult]
141
+ describe 'servers_server_id_actions_reset_post test' do
142
+ it 'should work' do
143
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
144
+ end
145
+ end
146
+
147
+ # unit tests for servers_server_id_actions_shutdown_post
148
+ # Shutdown server.
149
+ # Shut down specific server.
150
+ # @param server_id The server&#39;s ID.
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [ActionResult]
153
+ describe 'servers_server_id_actions_shutdown_post test' do
154
+ it 'should work' do
155
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
156
+ end
157
+ end
158
+
159
+ # unit tests for servers_server_id_delete
160
+ # Delete server.
161
+ # Deprovision specific server. Any IP blocks assigned to this server will also be relinquished and deleted. Deprecated: see /servers/{serverId}/actions/deprovision
162
+ # @param server_id The server&#39;s ID.
163
+ # @param [Hash] opts the optional parameters
164
+ # @return [DeleteResult]
165
+ describe 'servers_server_id_delete test' do
166
+ it 'should work' do
167
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
168
+ end
169
+ end
170
+
171
+ # unit tests for servers_server_id_get
172
+ # Get server.
173
+ # Get server properties.
174
+ # @param server_id The server&#39;s ID.
175
+ # @param [Hash] opts the optional parameters
176
+ # @return [Server]
177
+ describe 'servers_server_id_get test' do
178
+ it 'should work' do
179
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
180
+ end
181
+ end
182
+
183
+ # unit tests for servers_server_id_ip_blocks_ip_block_id_delete
184
+ # Unassign IP Block from Server.
185
+ # Removes the IP block from the server. &lt;b&gt;No actual configuration is performed on the operating system.&lt;/b&gt; BMC configures exclusively the networking devices in the datacenter infrastructure. You are expected to perform network configuration changes in the operating system of this server. &lt;b&gt;This is an advanced network action that can make your server completely unavailable over any network. Make sure you are able to access this server over remote console in case of misconfiguration.&lt;/b&gt;
186
+ # @param server_id The server&#39;s ID.
187
+ # @param ip_block_id The IP Block identifier.
188
+ # @param [Hash] opts the optional parameters
189
+ # @option opts [RelinquishIpBlock] :relinquish_ip_block
190
+ # @return [String]
191
+ describe 'servers_server_id_ip_blocks_ip_block_id_delete test' do
192
+ it 'should work' do
193
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
194
+ end
195
+ end
196
+
197
+ # unit tests for servers_server_id_ip_blocks_post
198
+ # Assign IP Block to Server.
199
+ # Adds an IP block to this server. &lt;b&gt;No actual configuration is performed on the operating system.&lt;/b&gt; BMC configures exclusively the networking devices in the datacenter infrastructure. You are expected to perform network configuration changes in the operating system of this server.
200
+ # @param server_id The server&#39;s ID.
201
+ # @param [Hash] opts the optional parameters
202
+ # @option opts [ServerIpBlock] :server_ip_block
203
+ # @return [ServerIpBlock]
204
+ describe 'servers_server_id_ip_blocks_post test' do
205
+ it 'should work' do
206
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
207
+ end
208
+ end
209
+
210
+ # unit tests for servers_server_id_patch
211
+ # Patch a Server.
212
+ # 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&#39;s settings. Local changes to the server&#39;s hostname will not be reflected in the API or portal.
213
+ # @param server_id The server&#39;s ID.
214
+ # @param [Hash] opts the optional parameters
215
+ # @option opts [ServerPatch] :server_patch
216
+ # @return [Server]
217
+ describe 'servers_server_id_patch test' do
218
+ it 'should work' do
219
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
220
+ end
221
+ end
222
+
223
+ # unit tests for servers_server_id_private_networks_post
224
+ # Adds the server to a private network.
225
+ # Adds the server to a private network.
226
+ # @param server_id The server&#39;s ID.
227
+ # @param [Hash] opts the optional parameters
228
+ # @option opts [ServerPrivateNetwork] :server_private_network
229
+ # @return [ServerPrivateNetwork]
230
+ describe 'servers_server_id_private_networks_post test' do
231
+ it 'should work' do
232
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
233
+ end
234
+ end
235
+
236
+ # unit tests for servers_server_id_tags_put
237
+ # Set server tags.
238
+ # Set tags for server.
239
+ # @param server_id The server&#39;s ID.
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [Array<TagAssignmentRequest>] :tag_assignment_request
242
+ # @return [Server]
243
+ describe 'servers_server_id_tags_put test' do
244
+ it 'should work' do
245
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
246
+ end
247
+ end
248
+
249
+ end