pnap_network_api 1.0.0 → 1.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -5
  3. data/VERSION +1 -1
  4. data/docs/NetworkMembership.md +22 -0
  5. data/docs/PrivateNetwork.md +7 -1
  6. data/docs/PublicNetwork.md +34 -0
  7. data/docs/PublicNetworkCreate.md +24 -0
  8. data/docs/PublicNetworkIpBlock.md +18 -0
  9. data/docs/PublicNetworkMembership.md +22 -0
  10. data/docs/PublicNetworkModify.md +20 -0
  11. data/docs/PublicNetworksApi.md +510 -0
  12. data/lib/pnap_network_api/api/private_networks_api.rb +1 -1
  13. data/lib/pnap_network_api/api/public_networks_api.rb +481 -0
  14. data/lib/pnap_network_api/api_client.rb +1 -1
  15. data/lib/pnap_network_api/api_error.rb +1 -1
  16. data/lib/pnap_network_api/configuration.rb +1 -1
  17. data/lib/pnap_network_api/models/error.rb +1 -1
  18. data/lib/pnap_network_api/models/network_membership.rb +257 -0
  19. data/lib/pnap_network_api/models/private_network.rb +95 -5
  20. data/lib/pnap_network_api/models/private_network_create.rb +44 -1
  21. data/lib/pnap_network_api/models/private_network_modify.rb +44 -1
  22. data/lib/pnap_network_api/models/private_network_server.rb +1 -1
  23. data/lib/pnap_network_api/models/public_network.rb +387 -0
  24. data/lib/pnap_network_api/models/public_network_create.rb +320 -0
  25. data/lib/pnap_network_api/models/public_network_ip_block.rb +225 -0
  26. data/lib/pnap_network_api/models/public_network_membership.rb +257 -0
  27. data/lib/pnap_network_api/models/public_network_modify.rb +269 -0
  28. data/lib/pnap_network_api/version.rb +1 -1
  29. data/lib/pnap_network_api.rb +7 -1
  30. data/pnap_network_api.gemspec +2 -2
  31. data/spec/api/public_networks_api_spec.rb +122 -0
  32. data/spec/api_client_spec.rb +1 -1
  33. data/spec/configuration_spec.rb +1 -1
  34. data/spec/models/network_membership_spec.rb +46 -0
  35. data/spec/models/public_network_create_spec.rb +52 -0
  36. data/spec/models/public_network_ip_block_spec.rb +34 -0
  37. data/spec/models/public_network_membership_spec.rb +46 -0
  38. data/spec/models/public_network_modify_spec.rb +40 -0
  39. data/spec/models/public_network_spec.rb +76 -0
  40. data/spec/spec_helper.rb +1 -1
  41. metadata +34 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c32455cd457e2d564fd3df4eaf12df1d5ec05dfcd27c8529a83561fc43f1f7ea
4
- data.tar.gz: e85981c47c3c0956c62e21ba9635f37e53963601464dd8a698dc4f21915986d3
3
+ metadata.gz: fed5342265483dbe49bda94d48dda2c5cba9409082b8f68404667c15dbcef88d
4
+ data.tar.gz: 110ec3b7beeea62c621943c3019886757ecdb22c1fdfe22fc799c26d44eec604
5
5
  SHA512:
6
- metadata.gz: 199f1064336c7b4a9da8659797e6abdc12c97851159bf0cb5d0d951558526c8daba21180cdd35dcb812580ef081eff3c68b533289133ae47c76ea2a2c097767f
7
- data.tar.gz: f8597618363bbd2743f032ee80bd1a55afbfc118418004a5e083e14c328d1d5f8e73b1af92962c4e215e8ea27eeb15089cc36041b2b2ce7142c80f0564791c1e
6
+ metadata.gz: 70d9dfcb1c734266da2fbdd981781228c2729a04eeac7d4604451c19a6c2e3d007804867944cfa614fb2c406f62fd3c75dbb7ad0fbdc11e2cef3b4ffa27684c4
7
+ data.tar.gz: 40257eb3c0b9294c92f3d162db4600d3f6953a11001b8e56eb118df70137eb0e8a7032ac45d7c8a2f19b4be4aa9432ad247a028323018a219806fdf7a0f46cb4
data/README.md CHANGED
@@ -2,13 +2,14 @@
2
2
 
3
3
  NetworkApi - the Ruby gem for the Networks API
4
4
 
5
- Use the Networks API to create, list, edit, and delete private networks to best fit your business needs.
6
- Private networks allow your servers to communicate without connecting to the public internet, avoiding unnecessary
7
- egress data charges.<br>
5
+ Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple
6
+ servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private
7
+ networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br>
8
8
  <br>
9
9
  <span class='pnap-api-knowledge-base-link'>
10
- Knowledge base articles to help you can be found
11
- <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</a>
10
+ Helpful knowledge base articles are available for
11
+ <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a>
12
+ and <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</a>.
12
13
  </span><br>
13
14
  <br>
14
15
  <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
@@ -128,15 +129,27 @@ Class | Method | HTTP request | Description
128
129
  *NetworkApi::PrivateNetworksApi* | [**private_networks_network_id_get**](docs/PrivateNetworksApi.md#private_networks_network_id_get) | **GET** /private-networks/{privateNetworkId} | Get a Private Network.
129
130
  *NetworkApi::PrivateNetworksApi* | [**private_networks_network_id_put**](docs/PrivateNetworksApi.md#private_networks_network_id_put) | **PUT** /private-networks/{privateNetworkId} | Update a Private Network.
130
131
  *NetworkApi::PrivateNetworksApi* | [**private_networks_post**](docs/PrivateNetworksApi.md#private_networks_post) | **POST** /private-networks | Create a Private Network.
132
+ *NetworkApi::PublicNetworksApi* | [**public_networks_get**](docs/PublicNetworksApi.md#public_networks_get) | **GET** /public-networks | List Public Networks.
133
+ *NetworkApi::PublicNetworksApi* | [**public_networks_network_id_delete**](docs/PublicNetworksApi.md#public_networks_network_id_delete) | **DELETE** /public-networks/{publicNetworkId} | Delete a Public Network.
134
+ *NetworkApi::PublicNetworksApi* | [**public_networks_network_id_get**](docs/PublicNetworksApi.md#public_networks_network_id_get) | **GET** /public-networks/{publicNetworkId} | Get a Public Network.
135
+ *NetworkApi::PublicNetworksApi* | [**public_networks_network_id_ip_blocks_ip_block_id_delete**](docs/PublicNetworksApi.md#public_networks_network_id_ip_blocks_ip_block_id_delete) | **DELETE** /public-networks/{publicNetworkId}/ip-blocks/{ipBlockId} | Removes the IP Block from the Public Network.
136
+ *NetworkApi::PublicNetworksApi* | [**public_networks_network_id_ip_blocks_post**](docs/PublicNetworksApi.md#public_networks_network_id_ip_blocks_post) | **POST** /public-networks/{publicNetworkId}/ip-blocks | Adds an IP block to this public network.
137
+ *NetworkApi::PublicNetworksApi* | [**public_networks_network_id_patch**](docs/PublicNetworksApi.md#public_networks_network_id_patch) | **PATCH** /public-networks/{publicNetworkId} | Update Public Network's Details.
138
+ *NetworkApi::PublicNetworksApi* | [**public_networks_post**](docs/PublicNetworksApi.md#public_networks_post) | **POST** /public-networks | Create a public network.
131
139
 
132
140
 
133
141
  ## Documentation for Models
134
142
 
135
143
  - [NetworkApi::Error](docs/Error.md)
144
+ - [NetworkApi::NetworkMembership](docs/NetworkMembership.md)
136
145
  - [NetworkApi::PrivateNetwork](docs/PrivateNetwork.md)
137
146
  - [NetworkApi::PrivateNetworkCreate](docs/PrivateNetworkCreate.md)
138
147
  - [NetworkApi::PrivateNetworkModify](docs/PrivateNetworkModify.md)
139
148
  - [NetworkApi::PrivateNetworkServer](docs/PrivateNetworkServer.md)
149
+ - [NetworkApi::PublicNetwork](docs/PublicNetwork.md)
150
+ - [NetworkApi::PublicNetworkCreate](docs/PublicNetworkCreate.md)
151
+ - [NetworkApi::PublicNetworkIpBlock](docs/PublicNetworkIpBlock.md)
152
+ - [NetworkApi::PublicNetworkModify](docs/PublicNetworkModify.md)
140
153
 
141
154
 
142
155
  ## Documentation for Authorization
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
@@ -0,0 +1,22 @@
1
+ # NetworkApi::NetworkMembership
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **resource_id** | **String** | The resource identifier. | |
8
+ | **resource_type** | **String** | The resource&#39;s type. | |
9
+ | **ips** | **Array&lt;String&gt;** | List of IPs associated to the resource. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'pnap_network_api'
15
+
16
+ instance = NetworkApi::NetworkMembership.new(
17
+ resource_id: 603f3e995c18d515cda9c4f8,
18
+ resource_type: server,
19
+ ips: [&quot;10.111.14.104&quot;,&quot;10.111.14.105&quot;,&quot;10.111.14.106&quot;]
20
+ )
21
+ ```
22
+
@@ -13,6 +13,9 @@
13
13
  | **location_default** | **Boolean** | Identifies network as the default private network for the specified location. | |
14
14
  | **cidr** | **String** | IP range associated with this private network in CIDR notation. | |
15
15
  | **servers** | [**Array&lt;PrivateNetworkServer&gt;**](PrivateNetworkServer.md) | | |
16
+ | **memberships** | [**Array&lt;NetworkMembership&gt;**](NetworkMembership.md) | A list of resources that are members of this private network. | |
17
+ | **status** | **String** | The status of the private network. Can have one of the following values: &#x60;BUSY&#x60; or &#x60;READY&#x60;. | |
18
+ | **created_on** | **Time** | Date and time when this private network was created. | |
16
19
 
17
20
  ## Example
18
21
 
@@ -28,7 +31,10 @@ instance = NetworkApi::PrivateNetwork.new(
28
31
  location: PHX,
29
32
  location_default: true,
30
33
  cidr: 10.0.0.0/24,
31
- servers: null
34
+ servers: null,
35
+ memberships: null,
36
+ status: READY,
37
+ created_on: 2022-04-07T13:30:30.491Z
32
38
  )
33
39
  ```
34
40
 
@@ -0,0 +1,34 @@
1
+ # NetworkApi::PublicNetwork
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The public network identifier. | |
8
+ | **vlan_id** | **Integer** | The VLAN of this public network. | |
9
+ | **memberships** | [**Array&lt;NetworkMembership&gt;**](NetworkMembership.md) | A list of resources that are members of this public network. | |
10
+ | **name** | **String** | The friendly name of this public network. | |
11
+ | **location** | **String** | The location of this public network. Supported values are &#x60;PHX&#x60;, &#x60;ASH&#x60;, &#x60;SGP&#x60;, &#x60;NLD&#x60;, &#x60;CHI&#x60;, &#x60;SEA&#x60; and &#x60;AUS&#x60;. | |
12
+ | **description** | **String** | The description of this public network. | [optional] |
13
+ | **status** | **String** | The status of the public network. Can have one of the following values: &#x60;BUSY&#x60; or &#x60;READY&#x60;. | |
14
+ | **created_on** | **Time** | Date and time when this public network was created. | |
15
+ | **ip_blocks** | [**Array&lt;PublicNetworkIpBlock&gt;**](PublicNetworkIpBlock.md) | A list of IP Blocks that are associated with this public network. | |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'pnap_network_api'
21
+
22
+ instance = NetworkApi::PublicNetwork.new(
23
+ id: 604721852cf65253d151528b,
24
+ vlan_id: 10,
25
+ memberships: null,
26
+ name: Sample Network,
27
+ location: PHX,
28
+ description: Further details on the network.,
29
+ status: READY,
30
+ created_on: 2022-04-05T13:50:30.491Z,
31
+ ip_blocks: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,24 @@
1
+ # NetworkApi::PublicNetworkCreate
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The friendly name of this public network. This name should be unique. | |
8
+ | **description** | **String** | The description of this public network. | [optional] |
9
+ | **location** | **String** | The location of this public network. Supported values are &#x60;PHX&#x60;, &#x60;ASH&#x60;, &#x60;SGP&#x60;, &#x60;NLD&#x60;, &#x60;CHI&#x60;, &#x60;SEA&#x60; and &#x60;AUS&#x60;. | |
10
+ | **ip_blocks** | [**Array&lt;PublicNetworkIpBlock&gt;**](PublicNetworkIpBlock.md) | A list of IP Blocks that will be associated with this public network. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'pnap_network_api'
16
+
17
+ instance = NetworkApi::PublicNetworkCreate.new(
18
+ name: Sample Network,
19
+ description: Further details on the network.,
20
+ location: PHX,
21
+ ip_blocks: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,18 @@
1
+ # NetworkApi::PublicNetworkIpBlock
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The IP Block identifier. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'pnap_network_api'
13
+
14
+ instance = NetworkApi::PublicNetworkIpBlock.new(
15
+ id: 60473a6115e34466c9f8f083
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # NetworkApi::PublicNetworkMembership
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **resource_id** | **String** | The resource identifier. | |
8
+ | **resource_type** | **String** | The resource&#39;s type. | |
9
+ | **ips** | **Array&lt;String&gt;** | List of public IPs associated to the resource. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'pnap_network_api'
15
+
16
+ instance = NetworkApi::PublicNetworkMembership.new(
17
+ resource_id: 603f3e995c18d515cda9c4f8,
18
+ resource_type: server,
19
+ ips: [&quot;10.111.14.104&quot;,&quot;10.111.14.105&quot;,&quot;10.111.14.106&quot;]
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # NetworkApi::PublicNetworkModify
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | A friendly name given to the network. This name should be unique. | [optional] |
8
+ | **description** | **String** | The description of this public network | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pnap_network_api'
14
+
15
+ instance = NetworkApi::PublicNetworkModify.new(
16
+ name: Sample Network,
17
+ description: Further details on the network.
18
+ )
19
+ ```
20
+