pnap_bmc_api 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/VERSION +1 -1
- data/docs/OsConfigurationNetrisController.md +1 -1
- data/docs/PrivateNetworkConfiguration.md +1 -1
- data/docs/QuotaEditLimitRequest.md +1 -1
- data/docs/QuotaEditLimitRequestDetails.md +1 -1
- data/docs/Server.md +6 -4
- data/docs/ServerCreate.md +6 -4
- data/docs/StorageConfiguration.md +18 -0
- data/docs/StorageConfigurationRootPartition.md +20 -0
- data/lib/pnap_bmc_api/models/os_configuration_netris_controller.rb +2 -2
- data/lib/pnap_bmc_api/models/os_configuration_netris_softgate.rb +44 -1
- data/lib/pnap_bmc_api/models/private_network_configuration.rb +1 -1
- data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +1 -1
- data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +1 -1
- data/lib/pnap_bmc_api/models/server.rb +21 -7
- data/lib/pnap_bmc_api/models/server_create.rb +16 -7
- data/lib/pnap_bmc_api/models/server_private_network.rb +5 -5
- data/lib/pnap_bmc_api/models/storage_configuration.rb +220 -0
- data/lib/pnap_bmc_api/models/storage_configuration_root_partition.rb +235 -0
- data/lib/pnap_bmc_api.rb +2 -0
- data/spec/models/storage_configuration_root_partition_spec.rb +40 -0
- data/spec/models/storage_configuration_spec.rb +34 -0
- metadata +37 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ead23be070e780e588d175d96edbcab2f2c0a2ae4c85805b66eec0d3ac8c7d48
|
4
|
+
data.tar.gz: efff57ff9a1eebc9d0441dc022423ca05252afdc448fb507d3695c7b5e273dbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f92e294fc3dfcb1f1095e692bf6021706bf0dc3af962825fdaa7cd795b5cbce13abdf153a3c12703ec79b080bcefb3d007268a42335279c80885ab2d51892dd
|
7
|
+
data.tar.gz: 99930beff8399c83533fd1fd0dc9573f3b97ca1fed88f1f58084bdafcde78dec24d6685d17122ca81236943f88eb3f5dfc8765e4e80fed1090a4e9313611fb21
|
data/README.md
CHANGED
@@ -187,6 +187,8 @@ Class | Method | HTTP request | Description
|
|
187
187
|
- [BmcApi::SshKey](docs/SshKey.md)
|
188
188
|
- [BmcApi::SshKeyCreate](docs/SshKeyCreate.md)
|
189
189
|
- [BmcApi::SshKeyUpdate](docs/SshKeyUpdate.md)
|
190
|
+
- [BmcApi::StorageConfiguration](docs/StorageConfiguration.md)
|
191
|
+
- [BmcApi::StorageConfigurationRootPartition](docs/StorageConfigurationRootPartition.md)
|
190
192
|
- [BmcApi::TagAssignment](docs/TagAssignment.md)
|
191
193
|
- [BmcApi::TagAssignmentRequest](docs/TagAssignmentRequest.md)
|
192
194
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
@@ -5,7 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **host_os** | **String** | (Read-only) Host OS on which the Netris Controller is installed. | [optional][readonly] |
|
8
|
-
| **netris_web_console_url** | **String** | (Read-only) The URL for the Netris Controller web console.
|
8
|
+
| **netris_web_console_url** | **String** | (Read-only) The URL for the Netris Controller web console. It will only be returned in response to provisioning a server. | [optional][readonly] |
|
9
9
|
| **netris_user_password** | **String** | (Read-only) Auto-generated password set for user 'netris' in the web console.<br> The password is not stored and therefore will only be returned in response to provisioning a server. Copy and save it for future reference. | [optional][readonly] |
|
10
10
|
|
11
11
|
## Example
|
@@ -5,7 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **gateway_address** | **String** | Deprecated in favour of a common gateway address across all networks available under NetworkConfiguration.<br> The address of the gateway assigned / to assign to the server.<br> When used as part of request body, IP address has to be part of private network assigned to this server.<br> Gateway address also has to be assigned on an already deployed resource unless the `force` query parameter is true. | [optional] |
|
8
|
-
| **configuration_type** | **String** | (Write-only) Determines the approach for configuring private network(s) for the server being provisioned. Currently this field should be set to `USE_OR_CREATE_DEFAULT` or `
|
8
|
+
| **configuration_type** | **String** | (Write-only) Determines the approach for configuring private network(s) for the server being provisioned. Currently this field should be set to `USE_OR_CREATE_DEFAULT`, `USER_DEFINED` or `NONE`. | [optional][default to 'USE_OR_CREATE_DEFAULT'] |
|
9
9
|
| **private_networks** | [**Array<ServerPrivateNetwork>**](ServerPrivateNetwork.md) | The list of private networks this server is member of. When this field is part of request body, it'll be used to specify the private networks to assign to this server upon provisioning. Used alongside the `USER_DEFINED` configurationType. | [optional] |
|
10
10
|
|
11
11
|
## Example
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **limit** | **Integer** | The new limit that is requested. | |
|
7
|
+
| **limit** | **Integer** | The new limit that is requested. Minimum allowed limit values: - 0 (Server, IPs) - 1000 (Network Storage) | |
|
8
8
|
| **reason** | **String** | The reason for changing the limit. | |
|
9
9
|
|
10
10
|
## Example
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **limit** | **Integer** | The new limit that is requested. | |
|
7
|
+
| **limit** | **Integer** | The new limit that is requested. Minimum allowed limit values: - 0 (Server, IPs) - 1000 (Network Storage) | |
|
8
8
|
| **reason** | **String** | The reason for changing the limit. | |
|
9
9
|
| **requested_on** | **Time** | The point in time the request was submitted. | |
|
10
10
|
|
data/docs/Server.md
CHANGED
@@ -8,8 +8,8 @@
|
|
8
8
|
| **status** | **String** | The status of the server. | |
|
9
9
|
| **hostname** | **String** | Hostname of server. | |
|
10
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`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70`, `debian/bullseye`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g` or `netris/softgate_10g`. | |
|
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.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.
|
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`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70`, `esxi/esxi80`, `debian/bullseye`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g` or `netris/softgate_10g`. | |
|
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.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.db1.pliops1`, `d3.m4.xlarge`, `d3.m5.xlarge`, `d3.m6.xlarge` or `a1.c5.large`. | |
|
13
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
14
|
| **cpu** | **String** | A description of the machine CPU. | |
|
15
15
|
| **cpu_count** | **Integer** | The number of CPUs available in the system. | |
|
@@ -22,12 +22,13 @@
|
|
22
22
|
| **reservation_id** | **String** | The reservation reference id if any. | [optional] |
|
23
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
24
|
| **password** | **String** | Auto-generated password set for user `Admin` on Windows server, user `root` on ESXi servers, user `root` on Proxmox server and user `netris` on Netris servers.<br> The password is not stored and therefore will only be returned in response to provisioning a server. Copy and save it for future reference. | [optional] |
|
25
|
-
| **network_type** | **String** | The type of network configuration for this server. Currently this field should be set to `PUBLIC_AND_PRIVATE` or `
|
25
|
+
| **network_type** | **String** | The type of network configuration for this server. Currently this field should be set to `PUBLIC_AND_PRIVATE`, `PRIVATE_ONLY`, `PUBLIC_ONLY` or `NONE`. | [optional][default to 'PUBLIC_AND_PRIVATE'] |
|
26
26
|
| **cluster_id** | **String** | The cluster reference id if any. | [optional] |
|
27
27
|
| **tags** | [**Array<TagAssignment>**](TagAssignment.md) | The tags assigned if any. | [optional] |
|
28
28
|
| **provisioned_on** | **Time** | Date and time when server was provisioned. | [optional] |
|
29
29
|
| **os_configuration** | [**OsConfiguration**](OsConfiguration.md) | | [optional] |
|
30
30
|
| **network_configuration** | [**NetworkConfiguration**](NetworkConfiguration.md) | | |
|
31
|
+
| **storage_configuration** | [**StorageConfiguration**](StorageConfiguration.md) | | |
|
31
32
|
|
32
33
|
## Example
|
33
34
|
|
@@ -58,7 +59,8 @@ instance = BmcApi::Server.new(
|
|
58
59
|
tags: null,
|
59
60
|
provisioned_on: 2021-03-13T20:24:32.491Z,
|
60
61
|
os_configuration: null,
|
61
|
-
network_configuration: null
|
62
|
+
network_configuration: null,
|
63
|
+
storage_configuration: null
|
62
64
|
)
|
63
65
|
```
|
64
66
|
|
data/docs/ServerCreate.md
CHANGED
@@ -6,18 +6,19 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **hostname** | **String** | Hostname of server. | |
|
8
8
|
| **description** | **String** | Description of server. | [optional] |
|
9
|
-
| **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`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70`, `debian/bullseye`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g` or `netris/softgate_10g`. | |
|
10
|
-
| **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.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.
|
9
|
+
| **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`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70`, `esxi/esxi80`, `debian/bullseye`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g` or `netris/softgate_10g`. | |
|
10
|
+
| **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.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.db1.pliops1`, `d3.m4.xlarge`, `d3.m5.xlarge`, `d3.m6.xlarge` or `a1.c5.large`. | |
|
11
11
|
| **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`. | |
|
12
12
|
| **install_default_ssh_keys** | **Boolean** | Whether or not to install SSH keys marked as default in addition to any SSH keys specified in this request. | [optional][default to true] |
|
13
13
|
| **ssh_keys** | **Array<String>** | A list of SSH keys that will be installed on the server. | [optional] |
|
14
14
|
| **ssh_key_ids** | **Array<String>** | A list of SSH key IDs that will be installed on the server in addition to any SSH keys specified in this request. | [optional] |
|
15
15
|
| **reservation_id** | **String** | Server reservation ID. | [optional] |
|
16
16
|
| **pricing_model** | **String** | Server pricing model. Currently this field should be set to `HOURLY`, `ONE_MONTH_RESERVATION`, `TWELVE_MONTHS_RESERVATION`, `TWENTY_FOUR_MONTHS_RESERVATION` or `THIRTY_SIX_MONTHS_RESERVATION`. | [optional][default to 'HOURLY'] |
|
17
|
-
| **network_type** | **String** | The type of network configuration for this server
|
17
|
+
| **network_type** | **String** | The type of network configuration for this server.<br> Currently this field should be set to `PUBLIC_AND_PRIVATE`, `PRIVATE_ONLY`, `PUBLIC_ONLY` or `USER_DEFINED`.<br> Setting the `force` query parameter to `true` allows you to configure network configuration type as `NONE`. | [optional][default to 'PUBLIC_AND_PRIVATE'] |
|
18
18
|
| **os_configuration** | [**OsConfiguration**](OsConfiguration.md) | | [optional] |
|
19
19
|
| **tags** | [**Array<TagAssignmentRequest>**](TagAssignmentRequest.md) | Tags to set to the server. To create a new tag or list all the existing tags that you can use, refer to [Tags API](https://developers.phoenixnap.com/docs/tags/1/overview). | [optional] |
|
20
20
|
| **network_configuration** | [**NetworkConfiguration**](NetworkConfiguration.md) | | [optional] |
|
21
|
+
| **storage_configuration** | [**StorageConfiguration**](StorageConfiguration.md) | | [optional] |
|
21
22
|
|
22
23
|
## Example
|
23
24
|
|
@@ -38,7 +39,8 @@ instance = BmcApi::ServerCreate.new(
|
|
38
39
|
network_type: PUBLIC_AND_PRIVATE,
|
39
40
|
os_configuration: null,
|
40
41
|
tags: null,
|
41
|
-
network_configuration: null
|
42
|
+
network_configuration: null,
|
43
|
+
storage_configuration: null
|
42
44
|
)
|
43
45
|
```
|
44
46
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# BmcApi::StorageConfiguration
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **root_partition** | [**StorageConfigurationRootPartition**](StorageConfigurationRootPartition.md) | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'pnap_bmc_api'
|
13
|
+
|
14
|
+
instance = BmcApi::StorageConfiguration.new(
|
15
|
+
root_partition: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# BmcApi::StorageConfigurationRootPartition
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **raid** | **String** | Software RAID configuration. The following RAID options are available: NO_RAID, RAID_0, RAID_1. | [optional][default to 'NO_RAID'] |
|
8
|
+
| **size** | **Integer** | The size of the root partition in GB. -1 to use all available space. | [optional][default to -1] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'pnap_bmc_api'
|
14
|
+
|
15
|
+
instance = BmcApi::StorageConfigurationRootPartition.new(
|
16
|
+
raid: NO_RAID,
|
17
|
+
size: -1
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -14,12 +14,12 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module BmcApi
|
17
|
-
# Netris Controller configuration properties.
|
17
|
+
# Netris Controller configuration properties. Knowledge base article to help you can be found <a href='https://phoenixnap.com/kb/netris-bare-metal-cloud#deploy-netris-controller' target='_blank'>here</a>.
|
18
18
|
class OsConfigurationNetrisController
|
19
19
|
# (Read-only) Host OS on which the Netris Controller is installed.
|
20
20
|
attr_accessor :host_os
|
21
21
|
|
22
|
-
# (Read-only) The URL for the Netris Controller web console.
|
22
|
+
# (Read-only) The URL for the Netris Controller web console. It will only be returned in response to provisioning a server.
|
23
23
|
attr_accessor :netris_web_console_url
|
24
24
|
|
25
25
|
# (Read-only) Auto-generated password set for user 'netris' in the web console.<br> The password is not stored and therefore will only be returned in response to provisioning a server. Copy and save it for future reference.
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module BmcApi
|
17
|
-
# Netris Softgate configuration properties.
|
17
|
+
# Netris Softgate configuration properties. Follow <a href='https://phoenixnap.com/kb/netris-bare-metal-cloud#deploy-netris-softgate' target='_blank'>instructions</a> for retrieving the required details.
|
18
18
|
class OsConfigurationNetrisSoftgate
|
19
19
|
# (Read-only) Host OS on which the Netris Softgate is installed.
|
20
20
|
attr_accessor :host_os
|
@@ -95,15 +95,58 @@ module BmcApi
|
|
95
95
|
# @return Array for valid properties with the reasons
|
96
96
|
def list_invalid_properties
|
97
97
|
invalid_properties = Array.new
|
98
|
+
if !@controller_address.nil? && @controller_address.to_s.length > 253
|
99
|
+
invalid_properties.push('invalid value for "controller_address", the character length must be smaller than or equal to 253.')
|
100
|
+
end
|
101
|
+
|
102
|
+
pattern = Regexp.new(/^(?!-)[\w\-]{1,63}(?<!-)(\.(?!-)[\w\-]{1,63}(?<!-))*$/)
|
103
|
+
if !@controller_address.nil? && @controller_address !~ pattern
|
104
|
+
invalid_properties.push("invalid value for \"controller_address\", must conform to the pattern #{pattern}.")
|
105
|
+
end
|
106
|
+
|
107
|
+
pattern = Regexp.new(/^\S+$/)
|
108
|
+
if !@controller_auth_key.nil? && @controller_auth_key !~ pattern
|
109
|
+
invalid_properties.push("invalid value for \"controller_auth_key\", must conform to the pattern #{pattern}.")
|
110
|
+
end
|
111
|
+
|
98
112
|
invalid_properties
|
99
113
|
end
|
100
114
|
|
101
115
|
# Check to see if the all the properties in the model are valid
|
102
116
|
# @return true if the model is valid
|
103
117
|
def valid?
|
118
|
+
return false if !@controller_address.nil? && @controller_address.to_s.length > 253
|
119
|
+
return false if !@controller_address.nil? && @controller_address !~ Regexp.new(/^(?!-)[\w\-]{1,63}(?<!-)(\.(?!-)[\w\-]{1,63}(?<!-))*$/)
|
120
|
+
return false if !@controller_auth_key.nil? && @controller_auth_key !~ Regexp.new(/^\S+$/)
|
104
121
|
true
|
105
122
|
end
|
106
123
|
|
124
|
+
# Custom attribute writer method with validation
|
125
|
+
# @param [Object] controller_address Value to be assigned
|
126
|
+
def controller_address=(controller_address)
|
127
|
+
if !controller_address.nil? && controller_address.to_s.length > 253
|
128
|
+
fail ArgumentError, 'invalid value for "controller_address", the character length must be smaller than or equal to 253.'
|
129
|
+
end
|
130
|
+
|
131
|
+
pattern = Regexp.new(/^(?!-)[\w\-]{1,63}(?<!-)(\.(?!-)[\w\-]{1,63}(?<!-))*$/)
|
132
|
+
if !controller_address.nil? && controller_address !~ pattern
|
133
|
+
fail ArgumentError, "invalid value for \"controller_address\", must conform to the pattern #{pattern}."
|
134
|
+
end
|
135
|
+
|
136
|
+
@controller_address = controller_address
|
137
|
+
end
|
138
|
+
|
139
|
+
# Custom attribute writer method with validation
|
140
|
+
# @param [Object] controller_auth_key Value to be assigned
|
141
|
+
def controller_auth_key=(controller_auth_key)
|
142
|
+
pattern = Regexp.new(/^\S+$/)
|
143
|
+
if !controller_auth_key.nil? && controller_auth_key !~ pattern
|
144
|
+
fail ArgumentError, "invalid value for \"controller_auth_key\", must conform to the pattern #{pattern}."
|
145
|
+
end
|
146
|
+
|
147
|
+
@controller_auth_key = controller_auth_key
|
148
|
+
end
|
149
|
+
|
107
150
|
# Checks equality by comparing each attribute.
|
108
151
|
# @param [Object] Object to be compared
|
109
152
|
def ==(o)
|
@@ -19,7 +19,7 @@ module BmcApi
|
|
19
19
|
# Deprecated in favour of a common gateway address across all networks available under NetworkConfiguration.<br> The address of the gateway assigned / to assign to the server.<br> When used as part of request body, IP address has to be part of private network assigned to this server.<br> Gateway address also has to be assigned on an already deployed resource unless the `force` query parameter is true.
|
20
20
|
attr_accessor :gateway_address
|
21
21
|
|
22
|
-
# (Write-only) Determines the approach for configuring private network(s) for the server being provisioned. Currently this field should be set to `USE_OR_CREATE_DEFAULT` or `
|
22
|
+
# (Write-only) Determines the approach for configuring private network(s) for the server being provisioned. Currently this field should be set to `USE_OR_CREATE_DEFAULT`, `USER_DEFINED` or `NONE`.
|
23
23
|
attr_accessor :configuration_type
|
24
24
|
|
25
25
|
# The list of private networks this server is member of. When this field is part of request body, it'll be used to specify the private networks to assign to this server upon provisioning. Used alongside the `USER_DEFINED` configurationType.
|
@@ -16,7 +16,7 @@ require 'time'
|
|
16
16
|
module BmcApi
|
17
17
|
# A request to change the limit on a quota.
|
18
18
|
class QuotaEditLimitRequest
|
19
|
-
# The new limit that is requested.
|
19
|
+
# The new limit that is requested. Minimum allowed limit values: - 0 (Server, IPs) - 1000 (Network Storage)
|
20
20
|
attr_accessor :limit
|
21
21
|
|
22
22
|
# The reason for changing the limit.
|
@@ -15,7 +15,7 @@ require 'time'
|
|
15
15
|
|
16
16
|
module BmcApi
|
17
17
|
class QuotaEditLimitRequestDetails
|
18
|
-
# The new limit that is requested.
|
18
|
+
# The new limit that is requested. Minimum allowed limit values: - 0 (Server, IPs) - 1000 (Network Storage)
|
19
19
|
attr_accessor :limit
|
20
20
|
|
21
21
|
# The reason for changing the limit.
|
@@ -28,10 +28,10 @@ module BmcApi
|
|
28
28
|
# Description of server.
|
29
29
|
attr_accessor :description
|
30
30
|
|
31
|
-
# The server’s OS ID used when the server was created. Currently this field should be set to either `ubuntu/bionic`, `ubuntu/focal`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70`, `debian/bullseye`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g` or `netris/softgate_10g`.
|
31
|
+
# The server’s OS ID used when the server was created. Currently this field should be set to either `ubuntu/bionic`, `ubuntu/focal`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70`, `esxi/esxi80`, `debian/bullseye`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g` or `netris/softgate_10g`.
|
32
32
|
attr_accessor :os
|
33
33
|
|
34
|
-
# Server type ID. Cannot be changed once a server is created. Currently this field should be set to either `s0.d1.small`, `s0.d1.medium`, `s1.c1.small`, `s1.c1.medium`, `s1.c2.medium`, `s1.c2.large`, `s1.e1.small`, `s1.e1.medium`, `s1.e1.large`, `s2.c1.small`, `s2.c1.medium`, `s2.c1.large`, `s2.c2.small`, `s2.c2.medium`, `s2.c2.large`, `d1.c1.small`, `d1.c2.small`, `d1.c3.small`, `d1.c4.small`, `d1.c1.medium`, `d1.c2.medium`, `d1.c3.medium`, `d1.c4.medium`, `d1.c1.large`, `d1.c2.large`, `d1.c3.large`, `d1.c4.large`, `d1.m1.medium`, `d1.m2.medium`, `d1.m3.medium`, `d1.m4.medium`, `d2.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.
|
34
|
+
# Server type ID. Cannot be changed once a server is created. Currently this field should be set to either `s0.d1.small`, `s0.d1.medium`, `s1.c1.small`, `s1.c1.medium`, `s1.c2.medium`, `s1.c2.large`, `s1.e1.small`, `s1.e1.medium`, `s1.e1.large`, `s2.c1.small`, `s2.c1.medium`, `s2.c1.large`, `s2.c2.small`, `s2.c2.medium`, `s2.c2.large`, `d1.c1.small`, `d1.c2.small`, `d1.c3.small`, `d1.c4.small`, `d1.c1.medium`, `d1.c2.medium`, `d1.c3.medium`, `d1.c4.medium`, `d1.c1.large`, `d1.c2.large`, `d1.c3.large`, `d1.c4.large`, `d1.m1.medium`, `d1.m2.medium`, `d1.m3.medium`, `d1.m4.medium`, `d2.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.db1.pliops1`, `d3.m4.xlarge`, `d3.m5.xlarge`, `d3.m6.xlarge` or `a1.c5.large`.
|
35
35
|
attr_accessor :type
|
36
36
|
|
37
37
|
# Server location ID. Cannot be changed once a server is created. Currently this field should be set to `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` or `AUS`.
|
@@ -70,7 +70,7 @@ module BmcApi
|
|
70
70
|
# Auto-generated password set for user `Admin` on Windows server, user `root` on ESXi servers, user `root` on Proxmox server and user `netris` on Netris servers.<br> The password is not stored and therefore will only be returned in response to provisioning a server. Copy and save it for future reference.
|
71
71
|
attr_accessor :password
|
72
72
|
|
73
|
-
# The type of network configuration for this server. Currently this field should be set to `PUBLIC_AND_PRIVATE` or `
|
73
|
+
# The type of network configuration for this server. Currently this field should be set to `PUBLIC_AND_PRIVATE`, `PRIVATE_ONLY`, `PUBLIC_ONLY` or `NONE`.
|
74
74
|
attr_accessor :network_type
|
75
75
|
|
76
76
|
# The cluster reference id if any.
|
@@ -86,6 +86,8 @@ module BmcApi
|
|
86
86
|
|
87
87
|
attr_accessor :network_configuration
|
88
88
|
|
89
|
+
attr_accessor :storage_configuration
|
90
|
+
|
89
91
|
# Attribute mapping from ruby-style variable name to JSON key.
|
90
92
|
def self.attribute_map
|
91
93
|
{
|
@@ -112,7 +114,8 @@ module BmcApi
|
|
112
114
|
:'tags' => :'tags',
|
113
115
|
:'provisioned_on' => :'provisionedOn',
|
114
116
|
:'os_configuration' => :'osConfiguration',
|
115
|
-
:'network_configuration' => :'networkConfiguration'
|
117
|
+
:'network_configuration' => :'networkConfiguration',
|
118
|
+
:'storage_configuration' => :'storageConfiguration'
|
116
119
|
}
|
117
120
|
end
|
118
121
|
|
@@ -147,7 +150,8 @@ module BmcApi
|
|
147
150
|
:'tags' => :'Array<TagAssignment>',
|
148
151
|
:'provisioned_on' => :'Time',
|
149
152
|
:'os_configuration' => :'OsConfiguration',
|
150
|
-
:'network_configuration' => :'NetworkConfiguration'
|
153
|
+
:'network_configuration' => :'NetworkConfiguration',
|
154
|
+
:'storage_configuration' => :'StorageConfiguration'
|
151
155
|
}
|
152
156
|
end
|
153
157
|
|
@@ -277,6 +281,10 @@ module BmcApi
|
|
277
281
|
if attributes.key?(:'network_configuration')
|
278
282
|
self.network_configuration = attributes[:'network_configuration']
|
279
283
|
end
|
284
|
+
|
285
|
+
if attributes.key?(:'storage_configuration')
|
286
|
+
self.storage_configuration = attributes[:'storage_configuration']
|
287
|
+
end
|
280
288
|
end
|
281
289
|
|
282
290
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -380,6 +388,10 @@ module BmcApi
|
|
380
388
|
invalid_properties.push('invalid value for "network_configuration", network_configuration cannot be nil.')
|
381
389
|
end
|
382
390
|
|
391
|
+
if @storage_configuration.nil?
|
392
|
+
invalid_properties.push('invalid value for "storage_configuration", storage_configuration cannot be nil.')
|
393
|
+
end
|
394
|
+
|
383
395
|
invalid_properties
|
384
396
|
end
|
385
397
|
|
@@ -410,6 +422,7 @@ module BmcApi
|
|
410
422
|
return false if !@public_ip_addresses.nil? && @public_ip_addresses.length < 0
|
411
423
|
return false if @pricing_model.nil?
|
412
424
|
return false if @network_configuration.nil?
|
425
|
+
return false if @storage_configuration.nil?
|
413
426
|
true
|
414
427
|
end
|
415
428
|
|
@@ -540,7 +553,8 @@ module BmcApi
|
|
540
553
|
tags == o.tags &&
|
541
554
|
provisioned_on == o.provisioned_on &&
|
542
555
|
os_configuration == o.os_configuration &&
|
543
|
-
network_configuration == o.network_configuration
|
556
|
+
network_configuration == o.network_configuration &&
|
557
|
+
storage_configuration == o.storage_configuration
|
544
558
|
end
|
545
559
|
|
546
560
|
# @see the `==` method
|
@@ -552,7 +566,7 @@ module BmcApi
|
|
552
566
|
# Calculates hash code according to all attributes.
|
553
567
|
# @return [Integer] Hash code
|
554
568
|
def hash
|
555
|
-
[id, status, hostname, description, os, type, location, cpu, cpu_count, cores_per_cpu, cpu_frequency, ram, storage, private_ip_addresses, public_ip_addresses, reservation_id, pricing_model, password, network_type, cluster_id, tags, provisioned_on, os_configuration, network_configuration].hash
|
569
|
+
[id, status, hostname, description, os, type, location, cpu, cpu_count, cores_per_cpu, cpu_frequency, ram, storage, private_ip_addresses, public_ip_addresses, reservation_id, pricing_model, password, network_type, cluster_id, tags, provisioned_on, os_configuration, network_configuration, storage_configuration].hash
|
556
570
|
end
|
557
571
|
|
558
572
|
# Builds the object from hash
|
@@ -22,10 +22,10 @@ module BmcApi
|
|
22
22
|
# Description of server.
|
23
23
|
attr_accessor :description
|
24
24
|
|
25
|
-
# The server’s OS ID used when the server was created. Currently this field should be set to either `ubuntu/bionic`, `ubuntu/focal`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70`, `debian/bullseye`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g` or `netris/softgate_10g`.
|
25
|
+
# The server’s OS ID used when the server was created. Currently this field should be set to either `ubuntu/bionic`, `ubuntu/focal`, `ubuntu/jammy`, `centos/centos7`, `centos/centos8`, `windows/srv2019std`, `windows/srv2019dc`, `esxi/esxi70`, `esxi/esxi80`, `debian/bullseye`, `proxmox/bullseye`, `netris/controller`, `netris/softgate_1g` or `netris/softgate_10g`.
|
26
26
|
attr_accessor :os
|
27
27
|
|
28
|
-
# Server type ID. Cannot be changed once a server is created. Currently this field should be set to either `s0.d1.small`, `s0.d1.medium`, `s1.c1.small`, `s1.c1.medium`, `s1.c2.medium`, `s1.c2.large`, `s1.e1.small`, `s1.e1.medium`, `s1.e1.large`, `s2.c1.small`, `s2.c1.medium`, `s2.c1.large`, `s2.c2.small`, `s2.c2.medium`, `s2.c2.large`, `d1.c1.small`, `d1.c2.small`, `d1.c3.small`, `d1.c4.small`, `d1.c1.medium`, `d1.c2.medium`, `d1.c3.medium`, `d1.c4.medium`, `d1.c1.large`, `d1.c2.large`, `d1.c3.large`, `d1.c4.large`, `d1.m1.medium`, `d1.m2.medium`, `d1.m3.medium`, `d1.m4.medium`, `d2.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.
|
28
|
+
# Server type ID. Cannot be changed once a server is created. Currently this field should be set to either `s0.d1.small`, `s0.d1.medium`, `s1.c1.small`, `s1.c1.medium`, `s1.c2.medium`, `s1.c2.large`, `s1.e1.small`, `s1.e1.medium`, `s1.e1.large`, `s2.c1.small`, `s2.c1.medium`, `s2.c1.large`, `s2.c2.small`, `s2.c2.medium`, `s2.c2.large`, `d1.c1.small`, `d1.c2.small`, `d1.c3.small`, `d1.c4.small`, `d1.c1.medium`, `d1.c2.medium`, `d1.c3.medium`, `d1.c4.medium`, `d1.c1.large`, `d1.c2.large`, `d1.c3.large`, `d1.c4.large`, `d1.m1.medium`, `d1.m2.medium`, `d1.m3.medium`, `d1.m4.medium`, `d2.c1.medium`, `d2.c2.medium`, `d2.c3.medium`, `d2.c4.medium`, `d2.c5.medium`, `d2.c1.large`, `d2.c2.large`, `d2.c3.large`, `d2.c4.large`, `d2.c5.large`, `d2.m1.medium`, `d2.m1.large`, `d2.m2.medium`, `d2.m2.large`, `d2.m2.xlarge`, `d2.c4.db1.pliops1`, `d3.m4.xlarge`, `d3.m5.xlarge`, `d3.m6.xlarge` or `a1.c5.large`.
|
29
29
|
attr_accessor :type
|
30
30
|
|
31
31
|
# Server location ID. Cannot be changed once a server is created. Currently this field should be set to `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` or `AUS`.
|
@@ -46,7 +46,7 @@ module BmcApi
|
|
46
46
|
# Server pricing model. Currently this field should be set to `HOURLY`, `ONE_MONTH_RESERVATION`, `TWELVE_MONTHS_RESERVATION`, `TWENTY_FOUR_MONTHS_RESERVATION` or `THIRTY_SIX_MONTHS_RESERVATION`.
|
47
47
|
attr_accessor :pricing_model
|
48
48
|
|
49
|
-
# The type of network configuration for this server
|
49
|
+
# The type of network configuration for this server.<br> Currently this field should be set to `PUBLIC_AND_PRIVATE`, `PRIVATE_ONLY`, `PUBLIC_ONLY` or `USER_DEFINED`.<br> Setting the `force` query parameter to `true` allows you to configure network configuration type as `NONE`.
|
50
50
|
attr_accessor :network_type
|
51
51
|
|
52
52
|
attr_accessor :os_configuration
|
@@ -56,6 +56,8 @@ module BmcApi
|
|
56
56
|
|
57
57
|
attr_accessor :network_configuration
|
58
58
|
|
59
|
+
attr_accessor :storage_configuration
|
60
|
+
|
59
61
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
62
|
def self.attribute_map
|
61
63
|
{
|
@@ -72,7 +74,8 @@ module BmcApi
|
|
72
74
|
:'network_type' => :'networkType',
|
73
75
|
:'os_configuration' => :'osConfiguration',
|
74
76
|
:'tags' => :'tags',
|
75
|
-
:'network_configuration' => :'networkConfiguration'
|
77
|
+
:'network_configuration' => :'networkConfiguration',
|
78
|
+
:'storage_configuration' => :'storageConfiguration'
|
76
79
|
}
|
77
80
|
end
|
78
81
|
|
@@ -97,7 +100,8 @@ module BmcApi
|
|
97
100
|
:'network_type' => :'String',
|
98
101
|
:'os_configuration' => :'OsConfiguration',
|
99
102
|
:'tags' => :'Array<TagAssignmentRequest>',
|
100
|
-
:'network_configuration' => :'NetworkConfiguration'
|
103
|
+
:'network_configuration' => :'NetworkConfiguration',
|
104
|
+
:'storage_configuration' => :'StorageConfiguration'
|
101
105
|
}
|
102
106
|
end
|
103
107
|
|
@@ -189,6 +193,10 @@ module BmcApi
|
|
189
193
|
if attributes.key?(:'network_configuration')
|
190
194
|
self.network_configuration = attributes[:'network_configuration']
|
191
195
|
end
|
196
|
+
|
197
|
+
if attributes.key?(:'storage_configuration')
|
198
|
+
self.storage_configuration = attributes[:'storage_configuration']
|
199
|
+
end
|
192
200
|
end
|
193
201
|
|
194
202
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -296,7 +304,8 @@ module BmcApi
|
|
296
304
|
network_type == o.network_type &&
|
297
305
|
os_configuration == o.os_configuration &&
|
298
306
|
tags == o.tags &&
|
299
|
-
network_configuration == o.network_configuration
|
307
|
+
network_configuration == o.network_configuration &&
|
308
|
+
storage_configuration == o.storage_configuration
|
300
309
|
end
|
301
310
|
|
302
311
|
# @see the `==` method
|
@@ -308,7 +317,7 @@ module BmcApi
|
|
308
317
|
# Calculates hash code according to all attributes.
|
309
318
|
# @return [Integer] Hash code
|
310
319
|
def hash
|
311
|
-
[hostname, description, os, type, location, install_default_ssh_keys, ssh_keys, ssh_key_ids, reservation_id, pricing_model, network_type, os_configuration, tags, network_configuration].hash
|
320
|
+
[hostname, description, os, type, location, install_default_ssh_keys, ssh_keys, ssh_key_ids, reservation_id, pricing_model, network_type, os_configuration, tags, network_configuration, storage_configuration].hash
|
312
321
|
end
|
313
322
|
|
314
323
|
# Builds the object from hash
|
@@ -103,8 +103,8 @@ module BmcApi
|
|
103
103
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
104
104
|
end
|
105
105
|
|
106
|
-
if !@ips.nil? && @ips.length >
|
107
|
-
invalid_properties.push('invalid value for "ips", number of items must be less than or equal to
|
106
|
+
if !@ips.nil? && @ips.length > 256
|
107
|
+
invalid_properties.push('invalid value for "ips", number of items must be less than or equal to 256.')
|
108
108
|
end
|
109
109
|
|
110
110
|
invalid_properties
|
@@ -114,15 +114,15 @@ module BmcApi
|
|
114
114
|
# @return true if the model is valid
|
115
115
|
def valid?
|
116
116
|
return false if @id.nil?
|
117
|
-
return false if !@ips.nil? && @ips.length >
|
117
|
+
return false if !@ips.nil? && @ips.length > 256
|
118
118
|
true
|
119
119
|
end
|
120
120
|
|
121
121
|
# Custom attribute writer method with validation
|
122
122
|
# @param [Object] ips Value to be assigned
|
123
123
|
def ips=(ips)
|
124
|
-
if !ips.nil? && ips.length >
|
125
|
-
fail ArgumentError, 'invalid value for "ips", number of items must be less than or equal to
|
124
|
+
if !ips.nil? && ips.length > 256
|
125
|
+
fail ArgumentError, 'invalid value for "ips", number of items must be less than or equal to 256.'
|
126
126
|
end
|
127
127
|
|
128
128
|
@ips = ips
|
@@ -0,0 +1,220 @@
|
|
1
|
+
=begin
|
2
|
+
#Bare Metal Cloud API
|
3
|
+
|
4
|
+
#Create, power off, power on, reset, reboot, or shut down your server with the Bare Metal Cloud API. Deprovision servers, get or edit SSH key details, assign public IPs, assign servers to networks and a lot more. Manage your infrastructure more efficiently using just a few simple API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/how-to-deploy-bare-metal-cloud-server' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/bmc/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module BmcApi
|
17
|
+
# Storage configuration.
|
18
|
+
class StorageConfiguration
|
19
|
+
attr_accessor :root_partition
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'root_partition' => :'rootPartition'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'root_partition' => :'StorageConfigurationRootPartition'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BmcApi::StorageConfiguration` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BmcApi::StorageConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'root_partition')
|
62
|
+
self.root_partition = attributes[:'root_partition']
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
+
# @return Array for valid properties with the reasons
|
68
|
+
def list_invalid_properties
|
69
|
+
invalid_properties = Array.new
|
70
|
+
invalid_properties
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
def valid?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
root_partition == o.root_partition
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Integer] Hash code
|
95
|
+
def hash
|
96
|
+
[root_partition].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def self.build_from_hash(attributes)
|
103
|
+
new.build_from_hash(attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
112
|
+
self.class.openapi_types.each_pair do |key, type|
|
113
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
114
|
+
self.send("#{key}=", nil)
|
115
|
+
elsif type =~ /\AArray<(.*)>/i
|
116
|
+
# check to ensure the input is an array given that the attribute
|
117
|
+
# is documented as an array but the input is not
|
118
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
119
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
120
|
+
end
|
121
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
self
|
127
|
+
end
|
128
|
+
|
129
|
+
# Deserializes the data based on type
|
130
|
+
# @param string type Data type
|
131
|
+
# @param string value Value to be deserialized
|
132
|
+
# @return [Object] Deserialized data
|
133
|
+
def _deserialize(type, value)
|
134
|
+
case type.to_sym
|
135
|
+
when :Time
|
136
|
+
Time.parse(value)
|
137
|
+
when :Date
|
138
|
+
Date.parse(value)
|
139
|
+
when :String
|
140
|
+
value.to_s
|
141
|
+
when :Integer
|
142
|
+
value.to_i
|
143
|
+
when :Float
|
144
|
+
value.to_f
|
145
|
+
when :Boolean
|
146
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
147
|
+
true
|
148
|
+
else
|
149
|
+
false
|
150
|
+
end
|
151
|
+
when :Object
|
152
|
+
# generic object (usually a Hash), return directly
|
153
|
+
value
|
154
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
155
|
+
inner_type = Regexp.last_match[:inner_type]
|
156
|
+
value.map { |v| _deserialize(inner_type, v) }
|
157
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
158
|
+
k_type = Regexp.last_match[:k_type]
|
159
|
+
v_type = Regexp.last_match[:v_type]
|
160
|
+
{}.tap do |hash|
|
161
|
+
value.each do |k, v|
|
162
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
else # model
|
166
|
+
# models (e.g. Pet) or oneOf
|
167
|
+
klass = BmcApi.const_get(type)
|
168
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
if value.nil?
|
191
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
192
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
193
|
+
end
|
194
|
+
|
195
|
+
hash[param] = _to_hash(value)
|
196
|
+
end
|
197
|
+
hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Outputs non-array value in the form of hash
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
202
|
+
# @param [Object] value Any valid value
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
204
|
+
def _to_hash(value)
|
205
|
+
if value.is_a?(Array)
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
207
|
+
elsif value.is_a?(Hash)
|
208
|
+
{}.tap do |hash|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
210
|
+
end
|
211
|
+
elsif value.respond_to? :to_hash
|
212
|
+
value.to_hash
|
213
|
+
else
|
214
|
+
value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
@@ -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, assign public IPs, assign servers to networks and a lot more. Manage your infrastructure more efficiently using just a few simple API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/how-to-deploy-bare-metal-cloud-server' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/bmc/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module BmcApi
|
17
|
+
# Root partition configuration.
|
18
|
+
class StorageConfigurationRootPartition
|
19
|
+
# Software RAID configuration. The following RAID options are available: NO_RAID, RAID_0, RAID_1.
|
20
|
+
attr_accessor :raid
|
21
|
+
|
22
|
+
# The size of the root partition in GB. -1 to use all available space.
|
23
|
+
attr_accessor :size
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'raid' => :'raid',
|
29
|
+
:'size' => :'size'
|
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
|
+
:'raid' => :'String',
|
42
|
+
:'size' => :'Integer'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# List of attributes with nullable: true
|
47
|
+
def self.openapi_nullable
|
48
|
+
Set.new([
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
if (!attributes.is_a?(Hash))
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BmcApi::StorageConfigurationRootPartition` 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::StorageConfigurationRootPartition`. 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?(:'raid')
|
68
|
+
self.raid = attributes[:'raid']
|
69
|
+
else
|
70
|
+
self.raid = 'NO_RAID'
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'size')
|
74
|
+
self.size = attributes[:'size']
|
75
|
+
else
|
76
|
+
self.size = -1
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
invalid_properties = Array.new
|
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
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
raid == o.raid &&
|
99
|
+
size == o.size
|
100
|
+
end
|
101
|
+
|
102
|
+
# @see the `==` method
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def eql?(o)
|
105
|
+
self == o
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
# @return [Integer] Hash code
|
110
|
+
def hash
|
111
|
+
[raid, size].hash
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def self.build_from_hash(attributes)
|
118
|
+
new.build_from_hash(attributes)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def build_from_hash(attributes)
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
126
|
+
attributes = attributes.transform_keys(&:to_sym)
|
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
|
data/lib/pnap_bmc_api.rb
CHANGED
@@ -51,6 +51,8 @@ require 'pnap_bmc_api/models/server_reset'
|
|
51
51
|
require 'pnap_bmc_api/models/ssh_key'
|
52
52
|
require 'pnap_bmc_api/models/ssh_key_create'
|
53
53
|
require 'pnap_bmc_api/models/ssh_key_update'
|
54
|
+
require 'pnap_bmc_api/models/storage_configuration'
|
55
|
+
require 'pnap_bmc_api/models/storage_configuration_root_partition'
|
54
56
|
require 'pnap_bmc_api/models/tag_assignment'
|
55
57
|
require 'pnap_bmc_api/models/tag_assignment_request'
|
56
58
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
=begin
|
2
|
+
#Bare Metal Cloud API
|
3
|
+
|
4
|
+
#Create, power off, power on, reset, reboot, or shut down your server with the Bare Metal Cloud API. Deprovision servers, get or edit SSH key details, assign public IPs, assign servers to networks and a lot more. Manage your infrastructure more efficiently using just a few simple API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/how-to-deploy-bare-metal-cloud-server' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/bmc/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for BmcApi::StorageConfigurationRootPartition
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe BmcApi::StorageConfigurationRootPartition do
|
21
|
+
let(:instance) { BmcApi::StorageConfigurationRootPartition.new }
|
22
|
+
|
23
|
+
describe 'test an instance of StorageConfigurationRootPartition' do
|
24
|
+
it 'should create an instance of StorageConfigurationRootPartition' do
|
25
|
+
expect(instance).to be_instance_of(BmcApi::StorageConfigurationRootPartition)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'test attribute "raid"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'test attribute "size"' do
|
35
|
+
it 'should work' do
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
=begin
|
2
|
+
#Bare Metal Cloud API
|
3
|
+
|
4
|
+
#Create, power off, power on, reset, reboot, or shut down your server with the Bare Metal Cloud API. Deprovision servers, get or edit SSH key details, assign public IPs, assign servers to networks and a lot more. Manage your infrastructure more efficiently using just a few simple API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/how-to-deploy-bare-metal-cloud-server' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/bmc/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for BmcApi::StorageConfiguration
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe BmcApi::StorageConfiguration do
|
21
|
+
let(:instance) { BmcApi::StorageConfiguration.new }
|
22
|
+
|
23
|
+
describe 'test an instance of StorageConfiguration' do
|
24
|
+
it 'should create an instance of StorageConfiguration' do
|
25
|
+
expect(instance).to be_instance_of(BmcApi::StorageConfiguration)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'test attribute "root_partition"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pnap_bmc_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PhoenixNAP
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -98,6 +98,8 @@ files:
|
|
98
98
|
- docs/SshKey.md
|
99
99
|
- docs/SshKeyCreate.md
|
100
100
|
- docs/SshKeyUpdate.md
|
101
|
+
- docs/StorageConfiguration.md
|
102
|
+
- docs/StorageConfigurationRootPartition.md
|
101
103
|
- docs/TagAssignment.md
|
102
104
|
- docs/TagAssignmentRequest.md
|
103
105
|
- lib/pnap_bmc_api.rb
|
@@ -141,6 +143,8 @@ files:
|
|
141
143
|
- lib/pnap_bmc_api/models/ssh_key.rb
|
142
144
|
- lib/pnap_bmc_api/models/ssh_key_create.rb
|
143
145
|
- lib/pnap_bmc_api/models/ssh_key_update.rb
|
146
|
+
- lib/pnap_bmc_api/models/storage_configuration.rb
|
147
|
+
- lib/pnap_bmc_api/models/storage_configuration_root_partition.rb
|
144
148
|
- lib/pnap_bmc_api/models/tag_assignment.rb
|
145
149
|
- lib/pnap_bmc_api/models/tag_assignment_request.rb
|
146
150
|
- lib/pnap_bmc_api/version.rb
|
@@ -184,6 +188,8 @@ files:
|
|
184
188
|
- spec/models/ssh_key_create_spec.rb
|
185
189
|
- spec/models/ssh_key_spec.rb
|
186
190
|
- spec/models/ssh_key_update_spec.rb
|
191
|
+
- spec/models/storage_configuration_root_partition_spec.rb
|
192
|
+
- spec/models/storage_configuration_spec.rb
|
187
193
|
- spec/models/tag_assignment_request_spec.rb
|
188
194
|
- spec/models/tag_assignment_spec.rb
|
189
195
|
- spec/spec_helper.rb
|
@@ -217,40 +223,42 @@ test_files:
|
|
217
223
|
- spec/api/ssh_keys_api_spec.rb
|
218
224
|
- spec/api_client_spec.rb
|
219
225
|
- spec/configuration_spec.rb
|
220
|
-
- spec/models/public_network_configuration_spec.rb
|
221
|
-
- spec/models/server_reserve_spec.rb
|
222
|
-
- spec/models/relinquish_ip_block_spec.rb
|
223
|
-
- spec/models/quota_edit_limit_request_details_spec.rb
|
224
|
-
- spec/models/delete_ssh_key_result_spec.rb
|
225
|
-
- spec/models/server_patch_spec.rb
|
226
|
-
- spec/models/server_spec.rb
|
227
|
-
- spec/models/error_spec.rb
|
228
|
-
- spec/models/server_private_network_spec.rb
|
229
|
-
- spec/models/network_configuration_spec.rb
|
230
|
-
- spec/models/reset_result_spec.rb
|
231
226
|
- spec/models/action_result_spec.rb
|
232
|
-
- spec/models/
|
233
|
-
- spec/models/
|
234
|
-
- spec/models/
|
235
|
-
- spec/models/server_reset_spec.rb
|
227
|
+
- spec/models/ssh_key_create_spec.rb
|
228
|
+
- spec/models/ssh_key_update_spec.rb
|
229
|
+
- spec/models/os_configuration_spec.rb
|
236
230
|
- spec/models/os_configuration_netris_softgate_spec.rb
|
237
231
|
- spec/models/server_network_update_spec.rb
|
238
|
-
- spec/models/
|
239
|
-
- spec/models/
|
240
|
-
- spec/models/quota_edit_limit_request_spec.rb
|
232
|
+
- spec/models/server_reset_spec.rb
|
233
|
+
- spec/models/ssh_key_spec.rb
|
241
234
|
- spec/models/os_configuration_cloud_init_spec.rb
|
235
|
+
- spec/models/reset_result_spec.rb
|
236
|
+
- spec/models/tag_assignment_request_spec.rb
|
237
|
+
- spec/models/server_reserve_spec.rb
|
242
238
|
- spec/models/os_configuration_netris_controller_spec.rb
|
243
|
-
- spec/models/
|
244
|
-
- spec/models/
|
245
|
-
- spec/models/
|
239
|
+
- spec/models/network_configuration_spec.rb
|
240
|
+
- spec/models/quota_edit_limit_request_spec.rb
|
241
|
+
- spec/models/relinquish_ip_block_spec.rb
|
242
|
+
- spec/models/server_create_spec.rb
|
243
|
+
- spec/models/delete_ssh_key_result_spec.rb
|
244
|
+
- spec/models/error_spec.rb
|
246
245
|
- spec/models/private_network_configuration_spec.rb
|
247
|
-
- spec/models/
|
248
|
-
- spec/models/
|
246
|
+
- spec/models/os_configuration_map_spec.rb
|
247
|
+
- spec/models/quota_spec.rb
|
248
|
+
- spec/models/server_private_network_spec.rb
|
249
|
+
- spec/models/storage_configuration_spec.rb
|
250
|
+
- spec/models/server_patch_spec.rb
|
251
|
+
- spec/models/quota_edit_limit_request_details_spec.rb
|
252
|
+
- spec/models/storage_configuration_root_partition_spec.rb
|
253
|
+
- spec/models/public_network_configuration_spec.rb
|
254
|
+
- spec/models/tag_assignment_spec.rb
|
255
|
+
- spec/models/server_spec.rb
|
249
256
|
- spec/models/os_configuration_windows_spec.rb
|
250
|
-
- spec/models/tag_assignment_request_spec.rb
|
251
|
-
- spec/models/ssh_key_update_spec.rb
|
252
|
-
- spec/models/os_configuration_spec.rb
|
253
|
-
- spec/models/delete_result_spec.rb
|
254
257
|
- spec/models/quota_edit_limit_request_details_all_of_spec.rb
|
258
|
+
- spec/models/os_configuration_map_esxi_spec.rb
|
259
|
+
- spec/models/delete_result_spec.rb
|
255
260
|
- spec/models/ip_blocks_configuration_spec.rb
|
261
|
+
- spec/models/server_ip_block_spec.rb
|
262
|
+
- spec/models/server_public_network_spec.rb
|
263
|
+
- spec/models/os_configuration_map_proxmox_spec.rb
|
256
264
|
- spec/spec_helper.rb
|