pnap_network_api 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eae6809841069e2beff1e534d99b0a74c6375237339d11d1d5d21b4284c087f4
4
- data.tar.gz: 065743c6e7ec7544155d09e743eb7753ddc1542ec5f1616f2322b0165b86b3ad
3
+ metadata.gz: cf9a797a07f6f245ed99ec1c1a482905d245b2ffed74838c70ef87d99c0e632f
4
+ data.tar.gz: b284838b33280acb5c66fd541cb81e9aa5b542889da8744b60106a6fe2c78a96
5
5
  SHA512:
6
- metadata.gz: a64b7560d21108cd44fb469e68d9bdef3897113db9ae02886bd499d7f3b293f8282ed579656184676c38352fd432ef8ae2b6ef3736980ec43628d29f22f88c83
7
- data.tar.gz: 71cf3d4411e7f4d71d1e3a7cfb6bf33a9245d9ded3a46f14c860f900ebe61f0fc2ffe5cf0d24fb50084c7f4711d2d6eb2127cb84a82620deaf6cac7c6102a3be
6
+ metadata.gz: a0c5019d81b10ec07d674c4ae612139fac5ea94b049a367be641abda8f59454d10394fac2be81fc1d28585756c1703d3b8747d1eab63e992d3829b0e50472f5c
7
+ data.tar.gz: a8256f45c8a6ecfc1f08f5bdae596d85f881c06b7c4d9d80c9e5c275a4cb97e55b48b82d1e041fb03943335eb6c69b8db06cdfc4e5121534d9d97a46183003d1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.3.0
@@ -11,7 +11,7 @@
11
11
  | **type** | **String** | The type of the private network. | |
12
12
  | **location** | **String** | The location of this private network. | |
13
13
  | **location_default** | **Boolean** | Identifies network as the default private network for the specified location. | |
14
- | **cidr** | **String** | IP range associated with this private network in CIDR notation. | |
14
+ | **cidr** | **String** | IP range associated with this private network in CIDR notation. | [optional] |
15
15
  | **servers** | [**Array<PrivateNetworkServer>**](PrivateNetworkServer.md) | | |
16
16
  | **memberships** | [**Array<NetworkMembership>**](NetworkMembership.md) | A list of resources that are members of this private network. | |
17
17
  | **status** | **String** | The status of the private network. Can have one of the following values: `BUSY` or `READY`. | |
@@ -9,7 +9,7 @@
9
9
  | **location** | **String** | The location of this private network. Supported values are `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` and `AUS`. | |
10
10
  | **location_default** | **Boolean** | Identifies network as the default private network for the specified location. | [optional][default to false] |
11
11
  | **vlan_id** | **Integer** | The VLAN that will be assigned to this network. | [optional] |
12
- | **cidr** | **String** | IP range associated with this private network in CIDR notation. | |
12
+ | **cidr** | **String** | IP range associated with this private network in CIDR notation.<br> Setting the `force` query parameter to `true` allows you to skip assigning a specific IP range to network. | [optional] |
13
13
 
14
14
  ## Example
15
15
 
@@ -313,7 +313,8 @@ end
313
313
 
314
314
  api_instance = NetworkApi::PrivateNetworksApi.new
315
315
  opts = {
316
- private_network_create: NetworkApi::PrivateNetworkCreate.new({name: 'Sample Network', location: 'PHX', cidr: '10.0.0.0/24'}) # PrivateNetworkCreate |
316
+ force: true, # Boolean | Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups.
317
+ private_network_create: NetworkApi::PrivateNetworkCreate.new({name: 'Sample Network', location: 'PHX'}) # PrivateNetworkCreate |
317
318
  }
318
319
 
319
320
  begin
@@ -347,6 +348,7 @@ end
347
348
 
348
349
  | Name | Type | Description | Notes |
349
350
  | ---- | ---- | ----------- | ----- |
351
+ | **force** | **Boolean** | Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. | [optional][default to false] |
350
352
  | **private_network_create** | [**PrivateNetworkCreate**](PrivateNetworkCreate.md) | | [optional] |
351
353
 
352
354
  ### Return type
@@ -223,11 +223,11 @@ end
223
223
 
224
224
  ## public_networks_network_id_ip_blocks_ip_block_id_delete
225
225
 
226
- > String public_networks_network_id_ip_blocks_ip_block_id_delete(public_network_id, ip_block_id)
226
+ > String public_networks_network_id_ip_blocks_ip_block_id_delete(public_network_id, ip_block_id, opts)
227
227
 
228
228
  Removes the IP Block from the Public Network.
229
229
 
230
- Removes the IP Block from the Public Network. The result of this is that any traffic addressed to any IP within the block will not be routed to this network anymore. Please ensure that no resource members within this network have any IPs assigned from the IP Block being removed.
230
+ Removes the IP Block from the Public Network.<br> Please ensure that no resource members within this network have any IPs assigned from the IP Block being removed.<br> Defining `force` query parameter allows resource assigned IP block to be removed anyway. As a result, traffic addressed to any IP within the block will not be routed to this network anymore.
231
231
 
232
232
  ### Examples
233
233
 
@@ -243,10 +243,13 @@ end
243
243
  api_instance = NetworkApi::PublicNetworksApi.new
244
244
  public_network_id = '603f3b2cfcaf050643b89a4b' # String | The Public Network identifier.
245
245
  ip_block_id = '6047127fed34ecc3ba8402d2' # String | The IP Block identifier.
246
+ opts = {
247
+ force: true # Boolean | Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups.
248
+ }
246
249
 
247
250
  begin
248
251
  # Removes the IP Block from the Public Network.
249
- result = api_instance.public_networks_network_id_ip_blocks_ip_block_id_delete(public_network_id, ip_block_id)
252
+ result = api_instance.public_networks_network_id_ip_blocks_ip_block_id_delete(public_network_id, ip_block_id, opts)
250
253
  p result
251
254
  rescue NetworkApi::ApiError => e
252
255
  puts "Error when calling PublicNetworksApi->public_networks_network_id_ip_blocks_ip_block_id_delete: #{e}"
@@ -257,12 +260,12 @@ end
257
260
 
258
261
  This returns an Array which contains the response data, status code and headers.
259
262
 
260
- > <Array(String, Integer, Hash)> public_networks_network_id_ip_blocks_ip_block_id_delete_with_http_info(public_network_id, ip_block_id)
263
+ > <Array(String, Integer, Hash)> public_networks_network_id_ip_blocks_ip_block_id_delete_with_http_info(public_network_id, ip_block_id, opts)
261
264
 
262
265
  ```ruby
263
266
  begin
264
267
  # Removes the IP Block from the Public Network.
265
- data, status_code, headers = api_instance.public_networks_network_id_ip_blocks_ip_block_id_delete_with_http_info(public_network_id, ip_block_id)
268
+ data, status_code, headers = api_instance.public_networks_network_id_ip_blocks_ip_block_id_delete_with_http_info(public_network_id, ip_block_id, opts)
266
269
  p status_code # => 2xx
267
270
  p headers # => { ... }
268
271
  p data # => String
@@ -277,6 +280,7 @@ end
277
280
  | ---- | ---- | ----------- | ----- |
278
281
  | **public_network_id** | **String** | The Public Network identifier. | |
279
282
  | **ip_block_id** | **String** | The IP Block identifier. | |
283
+ | **force** | **Boolean** | Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. | [optional][default to false] |
280
284
 
281
285
  ### Return type
282
286
 
@@ -278,6 +278,7 @@ module NetworkApi
278
278
  # Create a Private Network.
279
279
  # Create a Private Network.
280
280
  # @param [Hash] opts the optional parameters
281
+ # @option opts [Boolean] :force Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)
281
282
  # @option opts [PrivateNetworkCreate] :private_network_create
282
283
  # @return [PrivateNetwork]
283
284
  def private_networks_post(opts = {})
@@ -288,6 +289,7 @@ module NetworkApi
288
289
  # Create a Private Network.
289
290
  # Create a Private Network.
290
291
  # @param [Hash] opts the optional parameters
292
+ # @option opts [Boolean] :force Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)
291
293
  # @option opts [PrivateNetworkCreate] :private_network_create
292
294
  # @return [Array<(PrivateNetwork, Integer, Hash)>] PrivateNetwork data, response status code and response headers
293
295
  def private_networks_post_with_http_info(opts = {})
@@ -299,6 +301,7 @@ module NetworkApi
299
301
 
300
302
  # query parameters
301
303
  query_params = opts[:query_params] || {}
304
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
302
305
 
303
306
  # header parameters
304
307
  header_params = opts[:header_params] || {}
@@ -206,10 +206,11 @@ module NetworkApi
206
206
  end
207
207
 
208
208
  # Removes the IP Block from the Public Network.
209
- # Removes the IP Block from the Public Network. The result of this is that any traffic addressed to any IP within the block will not be routed to this network anymore. Please ensure that no resource members within this network have any IPs assigned from the IP Block being removed.
209
+ # Removes the IP Block from the Public Network.<br> Please ensure that no resource members within this network have any IPs assigned from the IP Block being removed.<br> Defining `force` query parameter allows resource assigned IP block to be removed anyway. As a result, traffic addressed to any IP within the block will not be routed to this network anymore.
210
210
  # @param public_network_id [String] The Public Network identifier.
211
211
  # @param ip_block_id [String] The IP Block identifier.
212
212
  # @param [Hash] opts the optional parameters
213
+ # @option opts [Boolean] :force Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)
213
214
  # @return [String]
214
215
  def public_networks_network_id_ip_blocks_ip_block_id_delete(public_network_id, ip_block_id, opts = {})
215
216
  data, _status_code, _headers = public_networks_network_id_ip_blocks_ip_block_id_delete_with_http_info(public_network_id, ip_block_id, opts)
@@ -217,10 +218,11 @@ module NetworkApi
217
218
  end
218
219
 
219
220
  # Removes the IP Block from the Public Network.
220
- # Removes the IP Block from the Public Network. The result of this is that any traffic addressed to any IP within the block will not be routed to this network anymore. Please ensure that no resource members within this network have any IPs assigned from the IP Block being removed.
221
+ # Removes the IP Block from the Public Network.&lt;br&gt; Please ensure that no resource members within this network have any IPs assigned from the IP Block being removed.&lt;br&gt; Defining &#x60;force&#x60; query parameter allows resource assigned IP block to be removed anyway. As a result, traffic addressed to any IP within the block will not be routed to this network anymore.
221
222
  # @param public_network_id [String] The Public Network identifier.
222
223
  # @param ip_block_id [String] The IP Block identifier.
223
224
  # @param [Hash] opts the optional parameters
225
+ # @option opts [Boolean] :force Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)
224
226
  # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
225
227
  def public_networks_network_id_ip_blocks_ip_block_id_delete_with_http_info(public_network_id, ip_block_id, opts = {})
226
228
  if @api_client.config.debugging
@@ -239,6 +241,7 @@ module NetworkApi
239
241
 
240
242
  # query parameters
241
243
  query_params = opts[:query_params] || {}
244
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
242
245
 
243
246
  # header parameters
244
247
  header_params = opts[:header_params] || {}
@@ -206,10 +206,6 @@ module NetworkApi
206
206
  invalid_properties.push('invalid value for "location_default", location_default cannot be nil.')
207
207
  end
208
208
 
209
- if @cidr.nil?
210
- invalid_properties.push('invalid value for "cidr", cidr cannot be nil.')
211
- end
212
-
213
209
  if @servers.nil?
214
210
  invalid_properties.push('invalid value for "servers", servers cannot be nil.')
215
211
  end
@@ -241,7 +237,6 @@ module NetworkApi
241
237
  return false if @type.nil?
242
238
  return false if @location.nil?
243
239
  return false if @location_default.nil?
244
- return false if @cidr.nil?
245
240
  return false if @servers.nil?
246
241
  return false if @memberships.nil?
247
242
  return false if @status.nil?
@@ -31,7 +31,7 @@ module NetworkApi
31
31
  # The VLAN that will be assigned to this network.
32
32
  attr_accessor :vlan_id
33
33
 
34
- # IP range associated with this private network in CIDR notation.
34
+ # IP range associated with this private network in CIDR notation.<br> Setting the `force` query parameter to `true` allows you to skip assigning a specific IP range to network.
35
35
  attr_accessor :cidr
36
36
 
37
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -143,10 +143,6 @@ module NetworkApi
143
143
  invalid_properties.push('invalid value for "vlan_id", must be greater than or equal to 2.')
144
144
  end
145
145
 
146
- if @cidr.nil?
147
- invalid_properties.push('invalid value for "cidr", cidr cannot be nil.')
148
- end
149
-
150
146
  invalid_properties
151
147
  end
152
148
 
@@ -160,7 +156,6 @@ module NetworkApi
160
156
  return false if @location.nil?
161
157
  return false if !@vlan_id.nil? && @vlan_id > 4094
162
158
  return false if !@vlan_id.nil? && @vlan_id < 2
163
- return false if @cidr.nil?
164
159
  true
165
160
  end
166
161
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pnap_network_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PhoenixNAP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-07 00:00:00.000000000 Z
11
+ date: 2023-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -134,19 +134,19 @@ signing_key:
134
134
  specification_version: 4
135
135
  summary: Networks API Ruby Gem
136
136
  test_files:
137
- - spec/api/public_networks_api_spec.rb
138
137
  - spec/api/private_networks_api_spec.rb
138
+ - spec/api/public_networks_api_spec.rb
139
139
  - spec/api_client_spec.rb
140
140
  - spec/configuration_spec.rb
141
- - spec/models/network_membership_spec.rb
142
- - spec/models/private_network_spec.rb
141
+ - spec/models/public_network_spec.rb
142
+ - spec/models/error_spec.rb
143
+ - spec/models/private_network_server_spec.rb
143
144
  - spec/models/public_network_ip_block_spec.rb
145
+ - spec/models/public_network_membership_spec.rb
144
146
  - spec/models/private_network_create_spec.rb
145
- - spec/models/private_network_server_spec.rb
146
147
  - spec/models/private_network_modify_spec.rb
148
+ - spec/models/private_network_spec.rb
149
+ - spec/models/network_membership_spec.rb
147
150
  - spec/models/public_network_create_spec.rb
148
151
  - spec/models/public_network_modify_spec.rb
149
- - spec/models/public_network_membership_spec.rb
150
- - spec/models/error_spec.rb
151
- - spec/models/public_network_spec.rb
152
152
  - spec/spec_helper.rb