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
data/docs/QuotasApi.md ADDED
@@ -0,0 +1,217 @@
1
+ # BmcApi::QuotasApi
2
+
3
+ All URIs are relative to *https://api.phoenixnap.com/bmc/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**quotas_get**](QuotasApi.md#quotas_get) | **GET** /quotas | List quotas |
8
+ | [**quotas_quota_id_actions_request_edit_post**](QuotasApi.md#quotas_quota_id_actions_request_edit_post) | **POST** /quotas/{quotaId}/actions/request-edit | Request quota limit change. |
9
+ | [**quotas_quota_id_get**](QuotasApi.md#quotas_quota_id_get) | **GET** /quotas/{quotaId} | Get a quota. |
10
+
11
+
12
+ ## quotas_get
13
+
14
+ > <Array<Quota>> quotas_get
15
+
16
+ List quotas
17
+
18
+ Get account quota details.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'pnap_bmc_api'
25
+ # setup authorization
26
+ BmcApi.configure do |config|
27
+ # Configure OAuth2 access token for authorization: OAuth2
28
+ config.access_token = 'YOUR ACCESS TOKEN'
29
+ end
30
+
31
+ api_instance = BmcApi::QuotasApi.new
32
+
33
+ begin
34
+ # List quotas
35
+ result = api_instance.quotas_get
36
+ p result
37
+ rescue BmcApi::ApiError => e
38
+ puts "Error when calling QuotasApi->quotas_get: #{e}"
39
+ end
40
+ ```
41
+
42
+ #### Using the quotas_get_with_http_info variant
43
+
44
+ This returns an Array which contains the response data, status code and headers.
45
+
46
+ > <Array(<Array<Quota>>, Integer, Hash)> quotas_get_with_http_info
47
+
48
+ ```ruby
49
+ begin
50
+ # List quotas
51
+ data, status_code, headers = api_instance.quotas_get_with_http_info
52
+ p status_code # => 2xx
53
+ p headers # => { ... }
54
+ p data # => <Array<Quota>>
55
+ rescue BmcApi::ApiError => e
56
+ puts "Error when calling QuotasApi->quotas_get_with_http_info: #{e}"
57
+ end
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+ This endpoint does not need any parameter.
63
+
64
+ ### Return type
65
+
66
+ [**Array&lt;Quota&gt;**](Quota.md)
67
+
68
+ ### Authorization
69
+
70
+ [OAuth2](../README.md#OAuth2)
71
+
72
+ ### HTTP request headers
73
+
74
+ - **Content-Type**: Not defined
75
+ - **Accept**: application/json
76
+
77
+
78
+ ## quotas_quota_id_actions_request_edit_post
79
+
80
+ > quotas_quota_id_actions_request_edit_post(quota_id, opts)
81
+
82
+ Request quota limit change.
83
+
84
+ Sends a request to edit the limit of a quota.
85
+
86
+ ### Examples
87
+
88
+ ```ruby
89
+ require 'time'
90
+ require 'pnap_bmc_api'
91
+ # setup authorization
92
+ BmcApi.configure do |config|
93
+ # Configure OAuth2 access token for authorization: OAuth2
94
+ config.access_token = 'YOUR ACCESS TOKEN'
95
+ end
96
+
97
+ api_instance = BmcApi::QuotasApi.new
98
+ quota_id = 'bmc.servers.max_count' # String | The ID of the Quota.
99
+ opts = {
100
+ quota_edit_limit_request: BmcApi::QuotaEditLimitRequest.new({limit: 10, reason: 'I need more servers for my cluster.'}) # QuotaEditLimitRequest |
101
+ }
102
+
103
+ begin
104
+ # Request quota limit change.
105
+ api_instance.quotas_quota_id_actions_request_edit_post(quota_id, opts)
106
+ rescue BmcApi::ApiError => e
107
+ puts "Error when calling QuotasApi->quotas_quota_id_actions_request_edit_post: #{e}"
108
+ end
109
+ ```
110
+
111
+ #### Using the quotas_quota_id_actions_request_edit_post_with_http_info variant
112
+
113
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
114
+
115
+ > <Array(nil, Integer, Hash)> quotas_quota_id_actions_request_edit_post_with_http_info(quota_id, opts)
116
+
117
+ ```ruby
118
+ begin
119
+ # Request quota limit change.
120
+ data, status_code, headers = api_instance.quotas_quota_id_actions_request_edit_post_with_http_info(quota_id, opts)
121
+ p status_code # => 2xx
122
+ p headers # => { ... }
123
+ p data # => nil
124
+ rescue BmcApi::ApiError => e
125
+ puts "Error when calling QuotasApi->quotas_quota_id_actions_request_edit_post_with_http_info: #{e}"
126
+ end
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ | Name | Type | Description | Notes |
132
+ | ---- | ---- | ----------- | ----- |
133
+ | **quota_id** | **String** | The ID of the Quota. | |
134
+ | **quota_edit_limit_request** | [**QuotaEditLimitRequest**](QuotaEditLimitRequest.md) | | [optional] |
135
+
136
+ ### Return type
137
+
138
+ nil (empty response body)
139
+
140
+ ### Authorization
141
+
142
+ [OAuth2](../README.md#OAuth2)
143
+
144
+ ### HTTP request headers
145
+
146
+ - **Content-Type**: application/json
147
+ - **Accept**: application/json
148
+
149
+
150
+ ## quotas_quota_id_get
151
+
152
+ > <Quota> quotas_quota_id_get(quota_id)
153
+
154
+ Get a quota.
155
+
156
+ Get account quota details.
157
+
158
+ ### Examples
159
+
160
+ ```ruby
161
+ require 'time'
162
+ require 'pnap_bmc_api'
163
+ # setup authorization
164
+ BmcApi.configure do |config|
165
+ # Configure OAuth2 access token for authorization: OAuth2
166
+ config.access_token = 'YOUR ACCESS TOKEN'
167
+ end
168
+
169
+ api_instance = BmcApi::QuotasApi.new
170
+ quota_id = 'bmc.servers.max_count' # String | The ID of the Quota.
171
+
172
+ begin
173
+ # Get a quota.
174
+ result = api_instance.quotas_quota_id_get(quota_id)
175
+ p result
176
+ rescue BmcApi::ApiError => e
177
+ puts "Error when calling QuotasApi->quotas_quota_id_get: #{e}"
178
+ end
179
+ ```
180
+
181
+ #### Using the quotas_quota_id_get_with_http_info variant
182
+
183
+ This returns an Array which contains the response data, status code and headers.
184
+
185
+ > <Array(<Quota>, Integer, Hash)> quotas_quota_id_get_with_http_info(quota_id)
186
+
187
+ ```ruby
188
+ begin
189
+ # Get a quota.
190
+ data, status_code, headers = api_instance.quotas_quota_id_get_with_http_info(quota_id)
191
+ p status_code # => 2xx
192
+ p headers # => { ... }
193
+ p data # => <Quota>
194
+ rescue BmcApi::ApiError => e
195
+ puts "Error when calling QuotasApi->quotas_quota_id_get_with_http_info: #{e}"
196
+ end
197
+ ```
198
+
199
+ ### Parameters
200
+
201
+ | Name | Type | Description | Notes |
202
+ | ---- | ---- | ----------- | ----- |
203
+ | **quota_id** | **String** | The ID of the Quota. | |
204
+
205
+ ### Return type
206
+
207
+ [**Quota**](Quota.md)
208
+
209
+ ### Authorization
210
+
211
+ [OAuth2](../README.md#OAuth2)
212
+
213
+ ### HTTP request headers
214
+
215
+ - **Content-Type**: Not defined
216
+ - **Accept**: application/json
217
+
@@ -0,0 +1,18 @@
1
+ # BmcApi::RelinquishIpBlock
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **delete_ip_blocks** | **Boolean** | Determines whether the IP blocks assigned to the server should be deleted or not. | [optional][default to false] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'pnap_bmc_api'
13
+
14
+ instance = BmcApi::RelinquishIpBlock.new(
15
+ delete_ip_blocks: true
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # BmcApi::ResetResult
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **result** | **String** | Message describing the reset result. | |
8
+ | **password** | **String** | Password set for user Admin on Windows server or user root on ESXi server. | [optional] |
9
+ | **os_configuration** | [**OsConfigurationMap**](OsConfigurationMap.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'pnap_bmc_api'
15
+
16
+ instance = BmcApi::ResetResult.new(
17
+ result: Resetting server.,
18
+ password: MyP@ssw0rd_01,
19
+ os_configuration: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,360 @@
1
+ # BmcApi::SSHKeysApi
2
+
3
+ All URIs are relative to *https://api.phoenixnap.com/bmc/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**ssh_keys_get**](SSHKeysApi.md#ssh_keys_get) | **GET** /ssh-keys | List SSH Keys. |
8
+ | [**ssh_keys_post**](SSHKeysApi.md#ssh_keys_post) | **POST** /ssh-keys | Create SSH Key. |
9
+ | [**ssh_keys_ssh_key_id_delete**](SSHKeysApi.md#ssh_keys_ssh_key_id_delete) | **DELETE** /ssh-keys/{sshKeyId} | Delete SSH Key. |
10
+ | [**ssh_keys_ssh_key_id_get**](SSHKeysApi.md#ssh_keys_ssh_key_id_get) | **GET** /ssh-keys/{sshKeyId} | Get SSH Key. |
11
+ | [**ssh_keys_ssh_key_id_put**](SSHKeysApi.md#ssh_keys_ssh_key_id_put) | **PUT** /ssh-keys/{sshKeyId} | Edit SSH Key. |
12
+
13
+
14
+ ## ssh_keys_get
15
+
16
+ > <Array<SshKey>> ssh_keys_get
17
+
18
+ List SSH Keys.
19
+
20
+ List all SSH Keys.
21
+
22
+ ### Examples
23
+
24
+ ```ruby
25
+ require 'time'
26
+ require 'pnap_bmc_api'
27
+ # setup authorization
28
+ BmcApi.configure do |config|
29
+ # Configure OAuth2 access token for authorization: OAuth2
30
+ config.access_token = 'YOUR ACCESS TOKEN'
31
+ end
32
+
33
+ api_instance = BmcApi::SSHKeysApi.new
34
+
35
+ begin
36
+ # List SSH Keys.
37
+ result = api_instance.ssh_keys_get
38
+ p result
39
+ rescue BmcApi::ApiError => e
40
+ puts "Error when calling SSHKeysApi->ssh_keys_get: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the ssh_keys_get_with_http_info variant
45
+
46
+ This returns an Array which contains the response data, status code and headers.
47
+
48
+ > <Array(<Array<SshKey>>, Integer, Hash)> ssh_keys_get_with_http_info
49
+
50
+ ```ruby
51
+ begin
52
+ # List SSH Keys.
53
+ data, status_code, headers = api_instance.ssh_keys_get_with_http_info
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => <Array<SshKey>>
57
+ rescue BmcApi::ApiError => e
58
+ puts "Error when calling SSHKeysApi->ssh_keys_get_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ This endpoint does not need any parameter.
65
+
66
+ ### Return type
67
+
68
+ [**Array&lt;SshKey&gt;**](SshKey.md)
69
+
70
+ ### Authorization
71
+
72
+ [OAuth2](../README.md#OAuth2)
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: Not defined
77
+ - **Accept**: application/json
78
+
79
+
80
+ ## ssh_keys_post
81
+
82
+ > <SshKey> ssh_keys_post(opts)
83
+
84
+ Create SSH Key.
85
+
86
+ Create an SSH Key. SSH Keys created can be used for server creation and reset functionality.
87
+
88
+ ### Examples
89
+
90
+ ```ruby
91
+ require 'time'
92
+ require 'pnap_bmc_api'
93
+ # setup authorization
94
+ BmcApi.configure do |config|
95
+ # Configure OAuth2 access token for authorization: OAuth2
96
+ config.access_token = 'YOUR ACCESS TOKEN'
97
+ end
98
+
99
+ api_instance = BmcApi::SSHKeysApi.new
100
+ opts = {
101
+ ssh_key_create: BmcApi::SshKeyCreate.new({default: true, name: 'sshkey-name-01', key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDF9LdAFElNCi7JoWh6KUcchrJ2Gac1aqGRPpdZNowObpRtmiRCecAMb7bUgNAaNfcmwiQi7tos9TlnFgprIcfMWb8MSs3ABYHmBgqEEt3RWYf0fAc9CsIpJdMCUG28TPGTlRXCEUVNKgLMdcseAlJoGp1CgbHWIN65fB3he3kAZcfpPn5mapV0tsl2p+ZyuAGRYdn5dJv2RZDHUZBkOeUobwsij+weHCKAFmKQKtCP7ybgVHaQjAPrj8MGnk1jBbjDt5ws+Be+9JNjQJee9zCKbAOsIo3i+GcUIkrw5jxPU/RTGlWBcemPaKHdciSzGcjWboapzIy49qypQhZe1U75 user@my_ip'}) # SshKeyCreate |
102
+ }
103
+
104
+ begin
105
+ # Create SSH Key.
106
+ result = api_instance.ssh_keys_post(opts)
107
+ p result
108
+ rescue BmcApi::ApiError => e
109
+ puts "Error when calling SSHKeysApi->ssh_keys_post: #{e}"
110
+ end
111
+ ```
112
+
113
+ #### Using the ssh_keys_post_with_http_info variant
114
+
115
+ This returns an Array which contains the response data, status code and headers.
116
+
117
+ > <Array(<SshKey>, Integer, Hash)> ssh_keys_post_with_http_info(opts)
118
+
119
+ ```ruby
120
+ begin
121
+ # Create SSH Key.
122
+ data, status_code, headers = api_instance.ssh_keys_post_with_http_info(opts)
123
+ p status_code # => 2xx
124
+ p headers # => { ... }
125
+ p data # => <SshKey>
126
+ rescue BmcApi::ApiError => e
127
+ puts "Error when calling SSHKeysApi->ssh_keys_post_with_http_info: #{e}"
128
+ end
129
+ ```
130
+
131
+ ### Parameters
132
+
133
+ | Name | Type | Description | Notes |
134
+ | ---- | ---- | ----------- | ----- |
135
+ | **ssh_key_create** | [**SshKeyCreate**](SshKeyCreate.md) | | [optional] |
136
+
137
+ ### Return type
138
+
139
+ [**SshKey**](SshKey.md)
140
+
141
+ ### Authorization
142
+
143
+ [OAuth2](../README.md#OAuth2)
144
+
145
+ ### HTTP request headers
146
+
147
+ - **Content-Type**: application/json
148
+ - **Accept**: application/json
149
+
150
+
151
+ ## ssh_keys_ssh_key_id_delete
152
+
153
+ > <DeleteSshKeyResult> ssh_keys_ssh_key_id_delete(ssh_key_id)
154
+
155
+ Delete SSH Key.
156
+
157
+ Delete an SSH Key.
158
+
159
+ ### Examples
160
+
161
+ ```ruby
162
+ require 'time'
163
+ require 'pnap_bmc_api'
164
+ # setup authorization
165
+ BmcApi.configure do |config|
166
+ # Configure OAuth2 access token for authorization: OAuth2
167
+ config.access_token = 'YOUR ACCESS TOKEN'
168
+ end
169
+
170
+ api_instance = BmcApi::SSHKeysApi.new
171
+ ssh_key_id = '5fa54d1e91867c03a0a7b4a4' # String | The SSH Key's ID.
172
+
173
+ begin
174
+ # Delete SSH Key.
175
+ result = api_instance.ssh_keys_ssh_key_id_delete(ssh_key_id)
176
+ p result
177
+ rescue BmcApi::ApiError => e
178
+ puts "Error when calling SSHKeysApi->ssh_keys_ssh_key_id_delete: #{e}"
179
+ end
180
+ ```
181
+
182
+ #### Using the ssh_keys_ssh_key_id_delete_with_http_info variant
183
+
184
+ This returns an Array which contains the response data, status code and headers.
185
+
186
+ > <Array(<DeleteSshKeyResult>, Integer, Hash)> ssh_keys_ssh_key_id_delete_with_http_info(ssh_key_id)
187
+
188
+ ```ruby
189
+ begin
190
+ # Delete SSH Key.
191
+ data, status_code, headers = api_instance.ssh_keys_ssh_key_id_delete_with_http_info(ssh_key_id)
192
+ p status_code # => 2xx
193
+ p headers # => { ... }
194
+ p data # => <DeleteSshKeyResult>
195
+ rescue BmcApi::ApiError => e
196
+ puts "Error when calling SSHKeysApi->ssh_keys_ssh_key_id_delete_with_http_info: #{e}"
197
+ end
198
+ ```
199
+
200
+ ### Parameters
201
+
202
+ | Name | Type | Description | Notes |
203
+ | ---- | ---- | ----------- | ----- |
204
+ | **ssh_key_id** | **String** | The SSH Key&#39;s ID. | |
205
+
206
+ ### Return type
207
+
208
+ [**DeleteSshKeyResult**](DeleteSshKeyResult.md)
209
+
210
+ ### Authorization
211
+
212
+ [OAuth2](../README.md#OAuth2)
213
+
214
+ ### HTTP request headers
215
+
216
+ - **Content-Type**: Not defined
217
+ - **Accept**: application/json
218
+
219
+
220
+ ## ssh_keys_ssh_key_id_get
221
+
222
+ > <SshKey> ssh_keys_ssh_key_id_get(ssh_key_id)
223
+
224
+ Get SSH Key.
225
+
226
+ Get SSH Key details.
227
+
228
+ ### Examples
229
+
230
+ ```ruby
231
+ require 'time'
232
+ require 'pnap_bmc_api'
233
+ # setup authorization
234
+ BmcApi.configure do |config|
235
+ # Configure OAuth2 access token for authorization: OAuth2
236
+ config.access_token = 'YOUR ACCESS TOKEN'
237
+ end
238
+
239
+ api_instance = BmcApi::SSHKeysApi.new
240
+ ssh_key_id = '5fa54d1e91867c03a0a7b4a4' # String | The SSH Key's ID.
241
+
242
+ begin
243
+ # Get SSH Key.
244
+ result = api_instance.ssh_keys_ssh_key_id_get(ssh_key_id)
245
+ p result
246
+ rescue BmcApi::ApiError => e
247
+ puts "Error when calling SSHKeysApi->ssh_keys_ssh_key_id_get: #{e}"
248
+ end
249
+ ```
250
+
251
+ #### Using the ssh_keys_ssh_key_id_get_with_http_info variant
252
+
253
+ This returns an Array which contains the response data, status code and headers.
254
+
255
+ > <Array(<SshKey>, Integer, Hash)> ssh_keys_ssh_key_id_get_with_http_info(ssh_key_id)
256
+
257
+ ```ruby
258
+ begin
259
+ # Get SSH Key.
260
+ data, status_code, headers = api_instance.ssh_keys_ssh_key_id_get_with_http_info(ssh_key_id)
261
+ p status_code # => 2xx
262
+ p headers # => { ... }
263
+ p data # => <SshKey>
264
+ rescue BmcApi::ApiError => e
265
+ puts "Error when calling SSHKeysApi->ssh_keys_ssh_key_id_get_with_http_info: #{e}"
266
+ end
267
+ ```
268
+
269
+ ### Parameters
270
+
271
+ | Name | Type | Description | Notes |
272
+ | ---- | ---- | ----------- | ----- |
273
+ | **ssh_key_id** | **String** | The SSH Key&#39;s ID. | |
274
+
275
+ ### Return type
276
+
277
+ [**SshKey**](SshKey.md)
278
+
279
+ ### Authorization
280
+
281
+ [OAuth2](../README.md#OAuth2)
282
+
283
+ ### HTTP request headers
284
+
285
+ - **Content-Type**: Not defined
286
+ - **Accept**: application/json
287
+
288
+
289
+ ## ssh_keys_ssh_key_id_put
290
+
291
+ > <SshKey> ssh_keys_ssh_key_id_put(ssh_key_id, opts)
292
+
293
+ Edit SSH Key.
294
+
295
+ Edit SSH Key details.
296
+
297
+ ### Examples
298
+
299
+ ```ruby
300
+ require 'time'
301
+ require 'pnap_bmc_api'
302
+ # setup authorization
303
+ BmcApi.configure do |config|
304
+ # Configure OAuth2 access token for authorization: OAuth2
305
+ config.access_token = 'YOUR ACCESS TOKEN'
306
+ end
307
+
308
+ api_instance = BmcApi::SSHKeysApi.new
309
+ ssh_key_id = '5fa54d1e91867c03a0a7b4a4' # String | The SSH Key's ID.
310
+ opts = {
311
+ ssh_key_update: BmcApi::SshKeyUpdate.new({default: true, name: 'sshkey-name-01'}) # SshKeyUpdate |
312
+ }
313
+
314
+ begin
315
+ # Edit SSH Key.
316
+ result = api_instance.ssh_keys_ssh_key_id_put(ssh_key_id, opts)
317
+ p result
318
+ rescue BmcApi::ApiError => e
319
+ puts "Error when calling SSHKeysApi->ssh_keys_ssh_key_id_put: #{e}"
320
+ end
321
+ ```
322
+
323
+ #### Using the ssh_keys_ssh_key_id_put_with_http_info variant
324
+
325
+ This returns an Array which contains the response data, status code and headers.
326
+
327
+ > <Array(<SshKey>, Integer, Hash)> ssh_keys_ssh_key_id_put_with_http_info(ssh_key_id, opts)
328
+
329
+ ```ruby
330
+ begin
331
+ # Edit SSH Key.
332
+ data, status_code, headers = api_instance.ssh_keys_ssh_key_id_put_with_http_info(ssh_key_id, opts)
333
+ p status_code # => 2xx
334
+ p headers # => { ... }
335
+ p data # => <SshKey>
336
+ rescue BmcApi::ApiError => e
337
+ puts "Error when calling SSHKeysApi->ssh_keys_ssh_key_id_put_with_http_info: #{e}"
338
+ end
339
+ ```
340
+
341
+ ### Parameters
342
+
343
+ | Name | Type | Description | Notes |
344
+ | ---- | ---- | ----------- | ----- |
345
+ | **ssh_key_id** | **String** | The SSH Key&#39;s ID. | |
346
+ | **ssh_key_update** | [**SshKeyUpdate**](SshKeyUpdate.md) | | [optional] |
347
+
348
+ ### Return type
349
+
350
+ [**SshKey**](SshKey.md)
351
+
352
+ ### Authorization
353
+
354
+ [OAuth2](../README.md#OAuth2)
355
+
356
+ ### HTTP request headers
357
+
358
+ - **Content-Type**: application/json
359
+ - **Accept**: application/json
360
+
data/docs/Server.md ADDED
@@ -0,0 +1,64 @@
1
+ # BmcApi::Server
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The unique identifier of the server. | |
8
+ | **status** | **String** | The status of the server. | |
9
+ | **hostname** | **String** | Hostname of server. | |
10
+ | **description** | **String** | Description of server. | [optional] |
11
+ | **os** | **String** | The server’s OS ID used when the server was created. Currently this field should be set to either &#x60;ubuntu/bionic&#x60;, &#x60;ubuntu/focal&#x60;, &#x60;centos/centos7&#x60;, &#x60;windows/srv2019std&#x60;, &#x60;windows/srv2019dc&#x60;, &#x60;esxi/esxi70u2&#x60;, &#x60;debian/bullseye&#x60; or &#x60;proxmox/bullseye&#x60;. | |
12
+ | **type** | **String** | Server type ID. Cannot be changed once a server is created. Currently this field should be set to either &#x60;s0.d1.small&#x60;, &#x60;s0.d1.medium&#x60;, &#x60;s1.c1.small&#x60;, &#x60;s1.c1.medium&#x60;, &#x60;s1.c2.medium&#x60;, &#x60;s1.c2.large&#x60;, &#x60;s1.e1.small&#x60;, &#x60;s1.e1.medium&#x60;, &#x60;s1.e1.large&#x60;, &#x60;s2.c1.small&#x60;, &#x60;s2.c1.medium&#x60;, &#x60;s2.c1.large&#x60;, &#x60;s2.c2.small&#x60;, &#x60;s2.c2.medium&#x60;, &#x60;s2.c2.large&#x60;, &#x60;d1.c1.small&#x60;, &#x60;d1.c2.small&#x60;, &#x60;d1.c3.small&#x60;, &#x60;d1.c4.small&#x60;, &#x60;d1.c1.medium&#x60;, &#x60;d1.c2.medium&#x60;, &#x60;d1.c3.medium&#x60;, &#x60;d1.c4.medium&#x60;, &#x60;d1.c1.large&#x60;, &#x60;d1.c2.large&#x60;, &#x60;d1.c3.large&#x60;, &#x60;d1.c4.large&#x60;, &#x60;d1.m1.medium&#x60;, &#x60;d1.m2.medium&#x60;, &#x60;d1.m3.medium&#x60;, &#x60;d1.m4.medium&#x60;, &#x60;d2.c3.medium&#x60;, &#x60;d2.c4.medium&#x60;, &#x60;d2.c5.medium&#x60;, &#x60;d2.c3.large&#x60;, &#x60;d2.c4.large&#x60;, &#x60;d2.c5.large&#x60;, &#x60;d2.m2.medium&#x60;, &#x60;d2.m2.large&#x60; or &#x60;d2.m2.xlarge&#x60;. | |
13
+ | **location** | **String** | Server location ID. Cannot be changed once a server is created. Currently this field should be set to &#x60;PHX&#x60;, &#x60;ASH&#x60;, &#x60;SGP&#x60;, &#x60;NLD&#x60;, &#x60;CHI&#x60;, &#x60;SEA&#x60; or &#x60;AUS&#x60;. | |
14
+ | **cpu** | **String** | A description of the machine CPU. | |
15
+ | **cpu_count** | **Integer** | The number of CPUs available in the system. | |
16
+ | **cores_per_cpu** | **Integer** | The number of physical cores present on each CPU. | |
17
+ | **cpu_frequency** | **Float** | The CPU frequency in GHz. | |
18
+ | **ram** | **String** | A description of the machine RAM. | |
19
+ | **storage** | **String** | A description of the machine storage. | |
20
+ | **private_ip_addresses** | **Array&lt;String&gt;** | Private IP addresses assigned to server. | |
21
+ | **public_ip_addresses** | **Array&lt;String&gt;** | Public IP addresses assigned to server. | |
22
+ | **reservation_id** | **String** | The reservation reference id if any. | [optional] |
23
+ | **pricing_model** | **String** | The pricing model this server is being billed. Currently this field should be set to &#x60;HOURLY&#x60;, &#x60;ONE_MONTH_RESERVATION&#x60;, &#x60;TWELVE_MONTHS_RESERVATION&#x60;, &#x60;TWENTY_FOUR_MONTHS_RESERVATION&#x60; or &#x60;THIRTY_SIX_MONTHS_RESERVATION&#x60;. | [default to &#39;HOURLY&#39;] |
24
+ | **password** | **String** | Password set for user Admin on Windows server or user root on ESXi server which will only be returned in response to provisioning a server. | [optional] |
25
+ | **network_type** | **String** | The type of network configuration for this server. Currently this field should be set to &#x60;PUBLIC_AND_PRIVATE&#x60; or &#x60;PRIVATE_ONLY&#x60;. | [optional][default to &#39;PUBLIC_AND_PRIVATE&#39;] |
26
+ | **cluster_id** | **String** | The cluster reference id if any. | [optional] |
27
+ | **tags** | [**Array&lt;TagAssignment&gt;**](TagAssignment.md) | The tags assigned if any. | [optional] |
28
+ | **provisioned_on** | **Time** | Date and time when server was provisioned. | [optional] |
29
+ | **os_configuration** | [**OsConfiguration**](OsConfiguration.md) | | [optional] |
30
+ | **network_configuration** | [**NetworkConfiguration**](NetworkConfiguration.md) | | |
31
+
32
+ ## Example
33
+
34
+ ```ruby
35
+ require 'pnap_bmc_api'
36
+
37
+ instance = BmcApi::Server.new(
38
+ id: x78sdkjds879sd7cx8,
39
+ status: creating,
40
+ hostname: my-server-1,
41
+ description: Server #1 used for computing.,
42
+ os: ubuntu/bionic,
43
+ type: s1.c1.small,
44
+ location: PHX,
45
+ cpu: E-2276G,
46
+ cpu_count: 2,
47
+ cores_per_cpu: 28,
48
+ cpu_frequency: 3.6,
49
+ ram: 64GB RAM,
50
+ storage: 1x 960GB NVMe,
51
+ private_ip_addresses: [&quot;172.16.0.1&quot;],
52
+ public_ip_addresses: [&quot;182.16.0.1&quot;,&quot;183.16.0.1&quot;],
53
+ reservation_id: x78sdkjds879sd7cx8,
54
+ pricing_model: HOURLY,
55
+ password: MyP@ssw0rd_01,
56
+ network_type: PUBLIC_AND_PRIVATE,
57
+ cluster_id: x78sdkjds879sd7cx8,
58
+ tags: null,
59
+ provisioned_on: 2021-03-13T20:24:32.491Z,
60
+ os_configuration: null,
61
+ network_configuration: null
62
+ )
63
+ ```
64
+