pnap_bmc_api 1.5.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -1
  3. data/VERSION +1 -1
  4. data/docs/DeleteResult.md +1 -1
  5. data/docs/EsxiDatastoreConfiguration.md +18 -0
  6. data/docs/EsxiOsConfiguration.md +18 -0
  7. data/docs/OsConfiguration.md +2 -0
  8. data/docs/OsConfigurationCloudInit.md +1 -1
  9. data/docs/QuotasApi.md +6 -8
  10. data/docs/SSHKeysApi.md +12 -16
  11. data/docs/Server.md +11 -7
  12. data/docs/ServerCreate.md +3 -3
  13. data/docs/ServerNetworkUpdate.md +2 -2
  14. data/docs/ServerPrivateNetwork.md +3 -3
  15. data/docs/ServerProvision.md +38 -0
  16. data/docs/ServerPublicNetwork.md +2 -2
  17. data/docs/ServersApi.md +173 -111
  18. data/docs/StorageConfigurationRootPartition.md +2 -2
  19. data/lib/pnap_bmc_api/api/quotas_api.rb +11 -7
  20. data/lib/pnap_bmc_api/api/servers_api.rb +200 -75
  21. data/lib/pnap_bmc_api/api/ssh_keys_api.rb +21 -13
  22. data/lib/pnap_bmc_api/api_client.rb +26 -23
  23. data/lib/pnap_bmc_api/api_error.rb +2 -1
  24. data/lib/pnap_bmc_api/configuration.rb +28 -9
  25. data/lib/pnap_bmc_api/models/action_result.rb +16 -19
  26. data/lib/pnap_bmc_api/models/delete_result.rb +18 -19
  27. data/lib/pnap_bmc_api/models/delete_ssh_key_result.rb +18 -19
  28. data/lib/pnap_bmc_api/models/error.rb +16 -19
  29. data/lib/pnap_bmc_api/models/esxi_datastore_configuration.rb +262 -0
  30. data/lib/pnap_bmc_api/models/{quota_edit_limit_request_details_all_of.rb → esxi_os_configuration.rb} +25 -36
  31. data/lib/pnap_bmc_api/models/ip_blocks_configuration.rb +19 -20
  32. data/lib/pnap_bmc_api/models/network_configuration.rb +14 -19
  33. data/lib/pnap_bmc_api/models/os_configuration.rb +29 -21
  34. data/lib/pnap_bmc_api/models/os_configuration_cloud_init.rb +15 -20
  35. data/lib/pnap_bmc_api/models/os_configuration_map.rb +14 -19
  36. data/lib/pnap_bmc_api/models/os_configuration_map_esxi.rb +19 -20
  37. data/lib/pnap_bmc_api/models/os_configuration_map_proxmox.rb +19 -20
  38. data/lib/pnap_bmc_api/models/os_configuration_netris_controller.rb +14 -19
  39. data/lib/pnap_bmc_api/models/os_configuration_netris_softgate.rb +25 -22
  40. data/lib/pnap_bmc_api/models/os_configuration_windows.rb +19 -20
  41. data/lib/pnap_bmc_api/models/private_network_configuration.rb +14 -19
  42. data/lib/pnap_bmc_api/models/public_network_configuration.rb +14 -19
  43. data/lib/pnap_bmc_api/models/quota.rb +30 -19
  44. data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +39 -19
  45. data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +42 -21
  46. data/lib/pnap_bmc_api/models/relinquish_ip_block.rb +14 -19
  47. data/lib/pnap_bmc_api/models/reset_result.rb +16 -19
  48. data/lib/pnap_bmc_api/models/server.rb +79 -33
  49. data/lib/pnap_bmc_api/models/server_create.rb +29 -22
  50. data/lib/pnap_bmc_api/models/server_ip_block.rb +16 -19
  51. data/lib/pnap_bmc_api/models/server_network_update.rb +15 -20
  52. data/lib/pnap_bmc_api/models/server_patch.rb +27 -24
  53. data/lib/pnap_bmc_api/models/server_private_network.rb +23 -22
  54. data/lib/pnap_bmc_api/models/server_provision.rb +395 -0
  55. data/lib/pnap_bmc_api/models/server_public_network.rb +17 -20
  56. data/lib/pnap_bmc_api/models/server_reserve.rb +16 -19
  57. data/lib/pnap_bmc_api/models/server_reset.rb +14 -19
  58. data/lib/pnap_bmc_api/models/ssh_key.rb +28 -19
  59. data/lib/pnap_bmc_api/models/ssh_key_create.rb +52 -19
  60. data/lib/pnap_bmc_api/models/ssh_key_update.rb +29 -19
  61. data/lib/pnap_bmc_api/models/storage_configuration.rb +14 -19
  62. data/lib/pnap_bmc_api/models/storage_configuration_root_partition.rb +14 -19
  63. data/lib/pnap_bmc_api/models/tag_assignment.rb +20 -19
  64. data/lib/pnap_bmc_api/models/tag_assignment_request.rb +16 -19
  65. data/lib/pnap_bmc_api/version.rb +1 -1
  66. data/lib/pnap_bmc_api.rb +4 -2
  67. data/pnap_bmc_api.gemspec +2 -2
  68. data/spec/api/quotas_api_spec.rb +6 -6
  69. data/spec/api/servers_api_spec.rb +109 -36
  70. data/spec/api/ssh_keys_api_spec.rb +9 -9
  71. data/spec/models/action_result_spec.rb +6 -4
  72. data/spec/models/delete_result_spec.rb +7 -5
  73. data/spec/models/delete_ssh_key_result_spec.rb +7 -5
  74. data/spec/models/error_spec.rb +7 -5
  75. data/spec/models/esxi_datastore_configuration_spec.rb +36 -0
  76. data/spec/models/esxi_os_configuration_spec.rb +36 -0
  77. data/spec/models/ip_blocks_configuration_spec.rb +7 -5
  78. data/spec/models/network_configuration_spec.rb +19 -5
  79. data/spec/models/os_configuration_cloud_init_spec.rb +5 -3
  80. data/spec/models/os_configuration_map_esxi_spec.rb +8 -6
  81. data/spec/models/os_configuration_map_proxmox_spec.rb +8 -6
  82. data/spec/models/os_configuration_map_spec.rb +8 -6
  83. data/spec/models/os_configuration_netris_controller_spec.rb +7 -5
  84. data/spec/models/os_configuration_netris_softgate_spec.rb +8 -6
  85. data/spec/models/os_configuration_spec.rb +39 -7
  86. data/spec/models/os_configuration_windows_spec.rb +6 -4
  87. data/spec/models/private_network_configuration_spec.rb +8 -6
  88. data/spec/models/public_network_configuration_spec.rb +6 -4
  89. data/spec/models/quota_edit_limit_request_details_spec.rb +8 -6
  90. data/spec/models/quota_edit_limit_request_spec.rb +7 -5
  91. data/spec/models/quota_spec.rb +13 -15
  92. data/spec/models/relinquish_ip_block_spec.rb +6 -4
  93. data/spec/models/reset_result_spec.rb +8 -6
  94. data/spec/models/server_create_spec.rb +25 -17
  95. data/spec/models/server_ip_block_spec.rb +7 -5
  96. data/spec/models/server_network_update_spec.rb +5 -3
  97. data/spec/models/server_patch_spec.rb +7 -5
  98. data/spec/models/server_private_network_spec.rb +9 -7
  99. data/spec/models/server_provision_spec.rb +96 -0
  100. data/spec/models/server_public_network_spec.rb +8 -6
  101. data/spec/models/server_reserve_spec.rb +6 -4
  102. data/spec/models/server_reset_spec.rb +9 -7
  103. data/spec/models/server_spec.rb +47 -27
  104. data/spec/models/ssh_key_create_spec.rb +8 -6
  105. data/spec/models/ssh_key_spec.rb +12 -10
  106. data/spec/models/ssh_key_update_spec.rb +7 -5
  107. data/spec/models/storage_configuration_root_partition_spec.rb +6 -4
  108. data/spec/models/storage_configuration_spec.rb +5 -3
  109. data/spec/models/tag_assignment_request_spec.rb +7 -5
  110. data/spec/models/tag_assignment_spec.rb +10 -8
  111. data/spec/spec_helper.rb +1 -1
  112. metadata +43 -39
  113. data/docs/QuotaEditLimitRequestDetailsAllOf.md +0 -18
  114. data/spec/api_client_spec.rb +0 -226
  115. data/spec/configuration_spec.rb +0 -42
  116. data/spec/models/quota_edit_limit_request_details_all_of_spec.rb +0 -34
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Bare Metal Cloud API
3
3
 
4
- #Create, power off, power on, reset, reboot, or shut down your server with the Bare Metal Cloud API. Deprovision servers, get or edit SSH key details, and a lot more. Manage your infrastructure more efficiently using just a few simple api calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/how-to-deploy-bare-metal-cloud-server' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/bmc/v1/)</b>
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
5
 
6
6
  The version of the OpenAPI document: 0.1
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ OpenAPI Generator version: 7.2.0
10
10
 
11
11
  =end
12
12
 
@@ -22,18 +22,20 @@ describe BmcApi::SshKeyUpdate do
22
22
 
23
23
  describe 'test an instance of SshKeyUpdate' do
24
24
  it 'should create an instance of SshKeyUpdate' do
25
- expect(instance).to be_instance_of(BmcApi::SshKeyUpdate)
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BmcApi::SshKeyUpdate)
26
27
  end
27
28
  end
29
+
28
30
  describe 'test attribute "default"' do
29
31
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
33
  end
32
34
  end
33
35
 
34
36
  describe 'test attribute "name"' do
35
37
  it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
39
  end
38
40
  end
39
41
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.1
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.1.0
9
+ OpenAPI Generator version: 7.2.0
10
10
 
11
11
  =end
12
12
 
@@ -22,18 +22,20 @@ describe BmcApi::StorageConfigurationRootPartition do
22
22
 
23
23
  describe 'test an instance of StorageConfigurationRootPartition' do
24
24
  it 'should create an instance of StorageConfigurationRootPartition' do
25
- expect(instance).to be_instance_of(BmcApi::StorageConfigurationRootPartition)
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BmcApi::StorageConfigurationRootPartition)
26
27
  end
27
28
  end
29
+
28
30
  describe 'test attribute "raid"' do
29
31
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
33
  end
32
34
  end
33
35
 
34
36
  describe 'test attribute "size"' do
35
37
  it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
39
  end
38
40
  end
39
41
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.1
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.1.0
9
+ OpenAPI Generator version: 7.2.0
10
10
 
11
11
  =end
12
12
 
@@ -22,12 +22,14 @@ describe BmcApi::StorageConfiguration do
22
22
 
23
23
  describe 'test an instance of StorageConfiguration' do
24
24
  it 'should create an instance of StorageConfiguration' do
25
- expect(instance).to be_instance_of(BmcApi::StorageConfiguration)
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BmcApi::StorageConfiguration)
26
27
  end
27
28
  end
29
+
28
30
  describe 'test attribute "root_partition"' do
29
31
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
33
  end
32
34
  end
33
35
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Bare Metal Cloud API
3
3
 
4
- #Create, power off, power on, reset, reboot, or shut down your server with the Bare Metal Cloud API. Deprovision servers, get or edit SSH key details, and a lot more. Manage your infrastructure more efficiently using just a few simple api calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/how-to-deploy-bare-metal-cloud-server' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/bmc/v1/)</b>
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
5
 
6
6
  The version of the OpenAPI document: 0.1
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ OpenAPI Generator version: 7.2.0
10
10
 
11
11
  =end
12
12
 
@@ -22,18 +22,20 @@ describe BmcApi::TagAssignmentRequest do
22
22
 
23
23
  describe 'test an instance of TagAssignmentRequest' do
24
24
  it 'should create an instance of TagAssignmentRequest' do
25
- expect(instance).to be_instance_of(BmcApi::TagAssignmentRequest)
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BmcApi::TagAssignmentRequest)
26
27
  end
27
28
  end
29
+
28
30
  describe 'test attribute "name"' do
29
31
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
33
  end
32
34
  end
33
35
 
34
36
  describe 'test attribute "value"' do
35
37
  it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
39
  end
38
40
  end
39
41
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Bare Metal Cloud API
3
3
 
4
- #Create, power off, power on, reset, reboot, or shut down your server with the Bare Metal Cloud API. Deprovision servers, get or edit SSH key details, and a lot more. Manage your infrastructure more efficiently using just a few simple api calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/how-to-deploy-bare-metal-cloud-server' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/bmc/v1/)</b>
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
5
 
6
6
  The version of the OpenAPI document: 0.1
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ OpenAPI Generator version: 7.2.0
10
10
 
11
11
  =end
12
12
 
@@ -22,36 +22,38 @@ describe BmcApi::TagAssignment do
22
22
 
23
23
  describe 'test an instance of TagAssignment' do
24
24
  it 'should create an instance of TagAssignment' do
25
- expect(instance).to be_instance_of(BmcApi::TagAssignment)
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BmcApi::TagAssignment)
26
27
  end
27
28
  end
29
+
28
30
  describe 'test attribute "id"' do
29
31
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
33
  end
32
34
  end
33
35
 
34
36
  describe 'test attribute "name"' do
35
37
  it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
39
  end
38
40
  end
39
41
 
40
42
  describe 'test attribute "value"' do
41
43
  it 'should work' do
42
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
45
  end
44
46
  end
45
47
 
46
48
  describe 'test attribute "is_billing_tag"' do
47
49
  it 'should work' do
48
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
51
  end
50
52
  end
51
53
 
52
54
  describe 'test attribute "created_by"' do
53
55
  it 'should work' do
54
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
57
  # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["USER", "SYSTEM"])
56
58
  # validator.allowable_values.each do |value|
57
59
  # expect { instance.created_by = value }.not_to raise_error
data/spec/spec_helper.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.1
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.1.0
9
+ OpenAPI Generator version: 7.2.0
10
10
 
11
11
  =end
12
12
 
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.5.0
4
+ version: 2.1.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-07-20 00:00:00.000000000 Z
11
+ date: 2024-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -65,6 +65,8 @@ files:
65
65
  - docs/DeleteResult.md
66
66
  - docs/DeleteSshKeyResult.md
67
67
  - docs/Error.md
68
+ - docs/EsxiDatastoreConfiguration.md
69
+ - docs/EsxiOsConfiguration.md
68
70
  - docs/IpBlocksConfiguration.md
69
71
  - docs/NetworkConfiguration.md
70
72
  - docs/OsConfiguration.md
@@ -80,7 +82,6 @@ files:
80
82
  - docs/Quota.md
81
83
  - docs/QuotaEditLimitRequest.md
82
84
  - docs/QuotaEditLimitRequestDetails.md
83
- - docs/QuotaEditLimitRequestDetailsAllOf.md
84
85
  - docs/QuotasApi.md
85
86
  - docs/RelinquishIpBlock.md
86
87
  - docs/ResetResult.md
@@ -91,6 +92,7 @@ files:
91
92
  - docs/ServerNetworkUpdate.md
92
93
  - docs/ServerPatch.md
93
94
  - docs/ServerPrivateNetwork.md
95
+ - docs/ServerProvision.md
94
96
  - docs/ServerPublicNetwork.md
95
97
  - docs/ServerReserve.md
96
98
  - docs/ServerReset.md
@@ -113,6 +115,8 @@ files:
113
115
  - lib/pnap_bmc_api/models/delete_result.rb
114
116
  - lib/pnap_bmc_api/models/delete_ssh_key_result.rb
115
117
  - lib/pnap_bmc_api/models/error.rb
118
+ - lib/pnap_bmc_api/models/esxi_datastore_configuration.rb
119
+ - lib/pnap_bmc_api/models/esxi_os_configuration.rb
116
120
  - lib/pnap_bmc_api/models/ip_blocks_configuration.rb
117
121
  - lib/pnap_bmc_api/models/network_configuration.rb
118
122
  - lib/pnap_bmc_api/models/os_configuration.rb
@@ -128,7 +132,6 @@ files:
128
132
  - lib/pnap_bmc_api/models/quota.rb
129
133
  - lib/pnap_bmc_api/models/quota_edit_limit_request.rb
130
134
  - lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb
131
- - lib/pnap_bmc_api/models/quota_edit_limit_request_details_all_of.rb
132
135
  - lib/pnap_bmc_api/models/relinquish_ip_block.rb
133
136
  - lib/pnap_bmc_api/models/reset_result.rb
134
137
  - lib/pnap_bmc_api/models/server.rb
@@ -137,6 +140,7 @@ files:
137
140
  - lib/pnap_bmc_api/models/server_network_update.rb
138
141
  - lib/pnap_bmc_api/models/server_patch.rb
139
142
  - lib/pnap_bmc_api/models/server_private_network.rb
143
+ - lib/pnap_bmc_api/models/server_provision.rb
140
144
  - lib/pnap_bmc_api/models/server_public_network.rb
141
145
  - lib/pnap_bmc_api/models/server_reserve.rb
142
146
  - lib/pnap_bmc_api/models/server_reset.rb
@@ -152,12 +156,12 @@ files:
152
156
  - spec/api/quotas_api_spec.rb
153
157
  - spec/api/servers_api_spec.rb
154
158
  - spec/api/ssh_keys_api_spec.rb
155
- - spec/api_client_spec.rb
156
- - spec/configuration_spec.rb
157
159
  - spec/models/action_result_spec.rb
158
160
  - spec/models/delete_result_spec.rb
159
161
  - spec/models/delete_ssh_key_result_spec.rb
160
162
  - spec/models/error_spec.rb
163
+ - spec/models/esxi_datastore_configuration_spec.rb
164
+ - spec/models/esxi_os_configuration_spec.rb
161
165
  - spec/models/ip_blocks_configuration_spec.rb
162
166
  - spec/models/network_configuration_spec.rb
163
167
  - spec/models/os_configuration_cloud_init_spec.rb
@@ -170,7 +174,6 @@ files:
170
174
  - spec/models/os_configuration_windows_spec.rb
171
175
  - spec/models/private_network_configuration_spec.rb
172
176
  - spec/models/public_network_configuration_spec.rb
173
- - spec/models/quota_edit_limit_request_details_all_of_spec.rb
174
177
  - spec/models/quota_edit_limit_request_details_spec.rb
175
178
  - spec/models/quota_edit_limit_request_spec.rb
176
179
  - spec/models/quota_spec.rb
@@ -181,6 +184,7 @@ files:
181
184
  - spec/models/server_network_update_spec.rb
182
185
  - spec/models/server_patch_spec.rb
183
186
  - spec/models/server_private_network_spec.rb
187
+ - spec/models/server_provision_spec.rb
184
188
  - spec/models/server_public_network_spec.rb
185
189
  - spec/models/server_reserve_spec.rb
186
190
  - spec/models/server_reset_spec.rb
@@ -206,7 +210,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
210
  requirements:
207
211
  - - ">="
208
212
  - !ruby/object:Gem::Version
209
- version: '2.4'
213
+ version: '2.7'
210
214
  required_rubygems_version: !ruby/object:Gem::Requirement
211
215
  requirements:
212
216
  - - ">="
@@ -218,47 +222,47 @@ signing_key:
218
222
  specification_version: 4
219
223
  summary: Bare Metal Cloud API Ruby Gem
220
224
  test_files:
221
- - spec/api/quotas_api_spec.rb
222
225
  - spec/api/servers_api_spec.rb
223
226
  - spec/api/ssh_keys_api_spec.rb
224
- - spec/api_client_spec.rb
225
- - spec/configuration_spec.rb
226
- - spec/models/action_result_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
230
- - spec/models/os_configuration_netris_softgate_spec.rb
227
+ - spec/api/quotas_api_spec.rb
231
228
  - spec/models/server_network_update_spec.rb
232
- - spec/models/server_reset_spec.rb
233
- - spec/models/ssh_key_spec.rb
229
+ - spec/models/os_configuration_map_esxi_spec.rb
230
+ - spec/models/quota_edit_limit_request_details_spec.rb
231
+ - spec/models/quota_spec.rb
232
+ - spec/models/ssh_key_update_spec.rb
233
+ - spec/models/ssh_key_create_spec.rb
234
234
  - spec/models/os_configuration_cloud_init_spec.rb
235
- - spec/models/reset_result_spec.rb
235
+ - spec/models/ip_blocks_configuration_spec.rb
236
+ - spec/models/error_spec.rb
237
+ - spec/models/server_private_network_spec.rb
236
238
  - spec/models/tag_assignment_request_spec.rb
239
+ - spec/models/os_configuration_netris_softgate_spec.rb
240
+ - spec/models/action_result_spec.rb
241
+ - spec/models/storage_configuration_root_partition_spec.rb
242
+ - spec/models/os_configuration_map_proxmox_spec.rb
243
+ - spec/models/private_network_configuration_spec.rb
244
+ - spec/models/os_configuration_windows_spec.rb
245
+ - spec/models/esxi_os_configuration_spec.rb
246
+ - spec/models/os_configuration_map_spec.rb
247
+ - spec/models/server_patch_spec.rb
248
+ - spec/models/server_spec.rb
237
249
  - spec/models/server_reserve_spec.rb
238
- - spec/models/os_configuration_netris_controller_spec.rb
239
250
  - spec/models/network_configuration_spec.rb
240
- - spec/models/quota_edit_limit_request_spec.rb
251
+ - spec/models/reset_result_spec.rb
252
+ - spec/models/server_reset_spec.rb
253
+ - spec/models/server_provision_spec.rb
241
254
  - spec/models/relinquish_ip_block_spec.rb
255
+ - spec/models/server_public_network_spec.rb
242
256
  - spec/models/server_create_spec.rb
243
- - spec/models/delete_ssh_key_result_spec.rb
244
- - spec/models/error_spec.rb
245
- - spec/models/private_network_configuration_spec.rb
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
257
  - spec/models/tag_assignment_spec.rb
255
- - spec/models/server_spec.rb
256
- - spec/models/os_configuration_windows_spec.rb
257
- - spec/models/quota_edit_limit_request_details_all_of_spec.rb
258
- - spec/models/os_configuration_map_esxi_spec.rb
258
+ - spec/models/os_configuration_netris_controller_spec.rb
259
+ - spec/models/quota_edit_limit_request_spec.rb
259
260
  - spec/models/delete_result_spec.rb
260
- - spec/models/ip_blocks_configuration_spec.rb
261
+ - spec/models/os_configuration_spec.rb
262
+ - spec/models/esxi_datastore_configuration_spec.rb
261
263
  - spec/models/server_ip_block_spec.rb
262
- - spec/models/server_public_network_spec.rb
263
- - spec/models/os_configuration_map_proxmox_spec.rb
264
+ - spec/models/public_network_configuration_spec.rb
265
+ - spec/models/ssh_key_spec.rb
266
+ - spec/models/delete_ssh_key_result_spec.rb
267
+ - spec/models/storage_configuration_spec.rb
264
268
  - spec/spec_helper.rb
@@ -1,18 +0,0 @@
1
- # BmcApi::QuotaEditLimitRequestDetailsAllOf
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **requested_on** | **Time** | The point in time the request was submitted. | |
8
-
9
- ## Example
10
-
11
- ```ruby
12
- require 'pnap_bmc_api'
13
-
14
- instance = BmcApi::QuotaEditLimitRequestDetailsAllOf.new(
15
- requested_on: 2021-09-01T10:10:10Z
16
- )
17
- ```
18
-
@@ -1,226 +0,0 @@
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
-
15
- describe BmcApi::ApiClient do
16
- context 'initialization' do
17
- context 'URL stuff' do
18
- context 'host' do
19
- it 'removes http from host' do
20
- BmcApi.configure { |c| c.host = 'http://example.com' }
21
- expect(BmcApi::Configuration.default.host).to eq('example.com')
22
- end
23
-
24
- it 'removes https from host' do
25
- BmcApi.configure { |c| c.host = 'https://wookiee.com' }
26
- expect(BmcApi::ApiClient.default.config.host).to eq('wookiee.com')
27
- end
28
-
29
- it 'removes trailing path from host' do
30
- BmcApi.configure { |c| c.host = 'hobo.com/v4' }
31
- expect(BmcApi::Configuration.default.host).to eq('hobo.com')
32
- end
33
- end
34
-
35
- context 'base_path' do
36
- it "prepends a slash to base_path" do
37
- BmcApi.configure { |c| c.base_path = 'v4/dog' }
38
- expect(BmcApi::Configuration.default.base_path).to eq('/v4/dog')
39
- end
40
-
41
- it "doesn't prepend a slash if one is already there" do
42
- BmcApi.configure { |c| c.base_path = '/v4/dog' }
43
- expect(BmcApi::Configuration.default.base_path).to eq('/v4/dog')
44
- end
45
-
46
- it "ends up as a blank string if nil" do
47
- BmcApi.configure { |c| c.base_path = nil }
48
- expect(BmcApi::Configuration.default.base_path).to eq('')
49
- end
50
- end
51
- end
52
- end
53
-
54
- describe 'params_encoding in #build_request' do
55
- let(:config) { BmcApi::Configuration.new }
56
- let(:api_client) { BmcApi::ApiClient.new(config) }
57
-
58
- it 'defaults to nil' do
59
- expect(BmcApi::Configuration.default.params_encoding).to eq(nil)
60
- expect(config.params_encoding).to eq(nil)
61
-
62
- request = api_client.build_request(:get, '/test')
63
- expect(request.options[:params_encoding]).to eq(nil)
64
- end
65
-
66
- it 'can be customized' do
67
- config.params_encoding = :multi
68
- request = api_client.build_request(:get, '/test')
69
- expect(request.options[:params_encoding]).to eq(:multi)
70
- end
71
- end
72
-
73
- describe 'timeout in #build_request' do
74
- let(:config) { BmcApi::Configuration.new }
75
- let(:api_client) { BmcApi::ApiClient.new(config) }
76
-
77
- it 'defaults to 0' do
78
- expect(BmcApi::Configuration.default.timeout).to eq(0)
79
- expect(config.timeout).to eq(0)
80
-
81
- request = api_client.build_request(:get, '/test')
82
- expect(request.options[:timeout]).to eq(0)
83
- end
84
-
85
- it 'can be customized' do
86
- config.timeout = 100
87
- request = api_client.build_request(:get, '/test')
88
- expect(request.options[:timeout]).to eq(100)
89
- end
90
- end
91
-
92
- describe '#deserialize' do
93
- it "handles Array<Integer>" do
94
- api_client = BmcApi::ApiClient.new
95
- headers = { 'Content-Type' => 'application/json' }
96
- response = double('response', headers: headers, body: '[12, 34]')
97
- data = api_client.deserialize(response, 'Array<Integer>')
98
- expect(data).to be_instance_of(Array)
99
- expect(data).to eq([12, 34])
100
- end
101
-
102
- it 'handles Array<Array<Integer>>' do
103
- api_client = BmcApi::ApiClient.new
104
- headers = { 'Content-Type' => 'application/json' }
105
- response = double('response', headers: headers, body: '[[12, 34], [56]]')
106
- data = api_client.deserialize(response, 'Array<Array<Integer>>')
107
- expect(data).to be_instance_of(Array)
108
- expect(data).to eq([[12, 34], [56]])
109
- end
110
-
111
- it 'handles Hash<String, String>' do
112
- api_client = BmcApi::ApiClient.new
113
- headers = { 'Content-Type' => 'application/json' }
114
- response = double('response', headers: headers, body: '{"message": "Hello"}')
115
- data = api_client.deserialize(response, 'Hash<String, String>')
116
- expect(data).to be_instance_of(Hash)
117
- expect(data).to eq(:message => 'Hello')
118
- end
119
- end
120
-
121
- describe "#object_to_hash" do
122
- it 'ignores nils and includes empty arrays' do
123
- # uncomment below to test object_to_hash for model
124
- # api_client = BmcApi::ApiClient.new
125
- # _model = BmcApi::ModelName.new
126
- # update the model attribute below
127
- # _model.id = 1
128
- # update the expected value (hash) below
129
- # expected = {id: 1, name: '', tags: []}
130
- # expect(api_client.object_to_hash(_model)).to eq(expected)
131
- end
132
- end
133
-
134
- describe '#build_collection_param' do
135
- let(:param) { ['aa', 'bb', 'cc'] }
136
- let(:api_client) { BmcApi::ApiClient.new }
137
-
138
- it 'works for csv' do
139
- expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
140
- end
141
-
142
- it 'works for ssv' do
143
- expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
144
- end
145
-
146
- it 'works for tsv' do
147
- expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
148
- end
149
-
150
- it 'works for pipes' do
151
- expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
152
- end
153
-
154
- it 'works for multi' do
155
- expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
156
- end
157
-
158
- it 'fails for invalid collection format' do
159
- expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
160
- end
161
- end
162
-
163
- describe '#json_mime?' do
164
- let(:api_client) { BmcApi::ApiClient.new }
165
-
166
- it 'works' do
167
- expect(api_client.json_mime?(nil)).to eq false
168
- expect(api_client.json_mime?('')).to eq false
169
-
170
- expect(api_client.json_mime?('application/json')).to eq true
171
- expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
172
- expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
173
-
174
- expect(api_client.json_mime?('application/xml')).to eq false
175
- expect(api_client.json_mime?('text/plain')).to eq false
176
- expect(api_client.json_mime?('application/jsonp')).to eq false
177
- end
178
- end
179
-
180
- describe '#select_header_accept' do
181
- let(:api_client) { BmcApi::ApiClient.new }
182
-
183
- it 'works' do
184
- expect(api_client.select_header_accept(nil)).to be_nil
185
- expect(api_client.select_header_accept([])).to be_nil
186
-
187
- expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
188
- expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
189
- expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
190
-
191
- expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
192
- expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
193
- end
194
- end
195
-
196
- describe '#select_header_content_type' do
197
- let(:api_client) { BmcApi::ApiClient.new }
198
-
199
- it 'works' do
200
- expect(api_client.select_header_content_type(nil)).to be_nil
201
- expect(api_client.select_header_content_type([])).to be_nil
202
-
203
- expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
204
- expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
205
- expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
206
- expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
207
- expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
208
- end
209
- end
210
-
211
- describe '#sanitize_filename' do
212
- let(:api_client) { BmcApi::ApiClient.new }
213
-
214
- it 'works' do
215
- expect(api_client.sanitize_filename('sun')).to eq('sun')
216
- expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
217
- expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
218
- expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
219
- expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
220
- expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
221
- expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
222
- expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
223
- expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
224
- end
225
- end
226
- end