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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +196 -0
- data/Rakefile +10 -0
- data/VERSION +1 -0
- data/docs/ActionResult.md +18 -0
- data/docs/DeleteResult.md +20 -0
- data/docs/DeleteSshKeyResult.md +20 -0
- data/docs/Error.md +20 -0
- data/docs/IpBlocksConfiguration.md +20 -0
- data/docs/NetworkConfiguration.md +20 -0
- data/docs/OsConfiguration.md +24 -0
- data/docs/OsConfigurationMap.md +22 -0
- data/docs/OsConfigurationMapEsxi.md +22 -0
- data/docs/OsConfigurationMapProxmox.md +22 -0
- data/docs/OsConfigurationWindows.md +18 -0
- data/docs/PrivateNetworkConfiguration.md +22 -0
- data/docs/Quota.md +32 -0
- data/docs/QuotaEditLimitRequest.md +20 -0
- data/docs/QuotaEditLimitRequestDetails.md +22 -0
- data/docs/QuotaEditLimitRequestDetailsAllOf.md +18 -0
- data/docs/QuotasApi.md +217 -0
- data/docs/RelinquishIpBlock.md +18 -0
- data/docs/ResetResult.md +22 -0
- data/docs/SSHKeysApi.md +360 -0
- data/docs/Server.md +64 -0
- data/docs/ServerCreate.md +44 -0
- data/docs/ServerIpBlock.md +20 -0
- data/docs/ServerPatch.md +20 -0
- data/docs/ServerPrivateNetwork.md +24 -0
- data/docs/ServerReserve.md +18 -0
- data/docs/ServerReset.md +24 -0
- data/docs/ServersApi.md +1237 -0
- data/docs/SshKey.md +30 -0
- data/docs/SshKeyCreate.md +22 -0
- data/docs/SshKeyUpdate.md +20 -0
- data/docs/TagAssignment.md +26 -0
- data/docs/TagAssignmentRequest.md +20 -0
- data/lib/pnap_bmc_api/api/quotas_api.rb +212 -0
- data/lib/pnap_bmc_api/api/servers_api.rb +1159 -0
- data/lib/pnap_bmc_api/api/ssh_keys_api.rb +339 -0
- data/lib/pnap_bmc_api/api_client.rb +392 -0
- data/lib/pnap_bmc_api/api_error.rb +57 -0
- data/lib/pnap_bmc_api/configuration.rb +278 -0
- data/lib/pnap_bmc_api/models/action_result.rb +225 -0
- data/lib/pnap_bmc_api/models/delete_result.rb +240 -0
- data/lib/pnap_bmc_api/models/delete_ssh_key_result.rb +240 -0
- data/lib/pnap_bmc_api/models/error.rb +236 -0
- data/lib/pnap_bmc_api/models/ip_blocks_configuration.rb +283 -0
- data/lib/pnap_bmc_api/models/network_configuration.rb +228 -0
- data/lib/pnap_bmc_api/models/os_configuration.rb +266 -0
- data/lib/pnap_bmc_api/models/os_configuration_map.rb +237 -0
- data/lib/pnap_bmc_api/models/os_configuration_map_esxi.rb +257 -0
- data/lib/pnap_bmc_api/models/os_configuration_map_proxmox.rb +257 -0
- data/lib/pnap_bmc_api/models/os_configuration_windows.rb +237 -0
- data/lib/pnap_bmc_api/models/private_network_configuration.rb +244 -0
- data/lib/pnap_bmc_api/models/quota.rb +415 -0
- data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +259 -0
- data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +281 -0
- data/lib/pnap_bmc_api/models/quota_edit_limit_request_details_all_of.rb +225 -0
- data/lib/pnap_bmc_api/models/relinquish_ip_block.rb +222 -0
- data/lib/pnap_bmc_api/models/reset_result.rb +244 -0
- data/lib/pnap_bmc_api/models/server.rb +687 -0
- data/lib/pnap_bmc_api/models/server_create.rb +434 -0
- data/lib/pnap_bmc_api/models/server_ip_block.rb +235 -0
- data/lib/pnap_bmc_api/models/server_patch.rb +280 -0
- data/lib/pnap_bmc_api/models/server_private_network.rb +274 -0
- data/lib/pnap_bmc_api/models/server_reserve.rb +225 -0
- data/lib/pnap_bmc_api/models/server_reset.rb +255 -0
- data/lib/pnap_bmc_api/models/ssh_key.rb +315 -0
- data/lib/pnap_bmc_api/models/ssh_key_create.rb +283 -0
- data/lib/pnap_bmc_api/models/ssh_key_update.rb +268 -0
- data/lib/pnap_bmc_api/models/tag_assignment.rb +309 -0
- data/lib/pnap_bmc_api/models/tag_assignment_request.rb +235 -0
- data/lib/pnap_bmc_api/version.rb +19 -0
- data/lib/pnap_bmc_api.rb +72 -0
- data/pnap_bmc_api.gemspec +39 -0
- data/spec/api/quotas_api_spec.rb +71 -0
- data/spec/api/servers_api_spec.rb +249 -0
- data/spec/api/ssh_keys_api_spec.rb +95 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/action_result_spec.rb +34 -0
- data/spec/models/delete_result_spec.rb +40 -0
- data/spec/models/delete_ssh_key_result_spec.rb +40 -0
- data/spec/models/error_spec.rb +40 -0
- data/spec/models/ip_blocks_configuration_spec.rb +44 -0
- data/spec/models/network_configuration_spec.rb +40 -0
- data/spec/models/os_configuration_map_esxi_spec.rb +46 -0
- data/spec/models/os_configuration_map_proxmox_spec.rb +46 -0
- data/spec/models/os_configuration_map_spec.rb +46 -0
- data/spec/models/os_configuration_spec.rb +52 -0
- data/spec/models/os_configuration_windows_spec.rb +34 -0
- data/spec/models/private_network_configuration_spec.rb +46 -0
- data/spec/models/quota_edit_limit_request_details_all_of_spec.rb +34 -0
- data/spec/models/quota_edit_limit_request_details_spec.rb +46 -0
- data/spec/models/quota_edit_limit_request_spec.rb +40 -0
- data/spec/models/quota_spec.rb +84 -0
- data/spec/models/relinquish_ip_block_spec.rb +34 -0
- data/spec/models/reset_result_spec.rb +46 -0
- data/spec/models/server_create_spec.rb +112 -0
- data/spec/models/server_ip_block_spec.rb +40 -0
- data/spec/models/server_patch_spec.rb +40 -0
- data/spec/models/server_private_network_spec.rb +52 -0
- data/spec/models/server_reserve_spec.rb +34 -0
- data/spec/models/server_reset_spec.rb +52 -0
- data/spec/models/server_spec.rb +172 -0
- data/spec/models/ssh_key_create_spec.rb +46 -0
- data/spec/models/ssh_key_spec.rb +70 -0
- data/spec/models/ssh_key_update_spec.rb +40 -0
- data/spec/models/tag_assignment_request_spec.rb +40 -0
- data/spec/models/tag_assignment_spec.rb +62 -0
- data/spec/spec_helper.rb +111 -0
- 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<Quota>**](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
|
+
|
data/docs/ResetResult.md
ADDED
@@ -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
|
+
|
data/docs/SSHKeysApi.md
ADDED
@@ -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<SshKey>**](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'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'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'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 `ubuntu/bionic`, `ubuntu/focal`, `centos/centos7`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70u2`, `debian/bullseye` or `proxmox/bullseye`. | |
|
12
|
+
| **type** | **String** | 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.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m2.medium`, `d2.m2.large` or `d2.m2.xlarge`. | |
|
13
|
+
| **location** | **String** | 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`. | |
|
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<String>** | Private IP addresses assigned to server. | |
|
21
|
+
| **public_ip_addresses** | **Array<String>** | 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 `HOURLY`, `ONE_MONTH_RESERVATION`, `TWELVE_MONTHS_RESERVATION`, `TWENTY_FOUR_MONTHS_RESERVATION` or `THIRTY_SIX_MONTHS_RESERVATION`. | [default to 'HOURLY'] |
|
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 `PUBLIC_AND_PRIVATE` or `PRIVATE_ONLY`. | [optional][default to 'PUBLIC_AND_PRIVATE'] |
|
26
|
+
| **cluster_id** | **String** | The cluster reference id if any. | [optional] |
|
27
|
+
| **tags** | [**Array<TagAssignment>**](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: ["172.16.0.1"],
|
52
|
+
public_ip_addresses: ["182.16.0.1","183.16.0.1"],
|
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
|
+
|