pnap_network_api 2.0.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.
- checksums.yaml +4 -4
- data/README.md +19 -7
- data/VERSION +1 -1
- data/docs/AsnDetails.md +24 -0
- data/docs/BGPPeerGroupsApi.md +361 -0
- data/docs/BgpIPv4Prefix.md +26 -0
- data/docs/BgpPeerGroup.md +46 -0
- data/docs/BgpPeerGroupCreate.md +24 -0
- data/docs/BgpPeerGroupPatch.md +22 -0
- data/docs/PublicNetwork.md +3 -1
- data/docs/PublicNetworkCreate.md +4 -2
- data/docs/PublicNetworkIpBlock.md +5 -1
- data/docs/PublicNetworkIpBlockCreate.md +18 -0
- data/docs/PublicNetworkModify.md +3 -1
- data/docs/PublicNetworksApi.md +6 -6
- data/lib/pnap_network_api/api/bgp_peer_groups_api.rb +350 -0
- data/lib/pnap_network_api/api/private_networks_api.rb +1 -1
- data/lib/pnap_network_api/api/public_networks_api.rb +10 -10
- data/lib/pnap_network_api/api_client.rb +3 -3
- data/lib/pnap_network_api/api_error.rb +1 -1
- data/lib/pnap_network_api/configuration.rb +1 -1
- data/lib/pnap_network_api/models/asn_details.rb +267 -0
- data/lib/pnap_network_api/models/bgp_ipv4_prefix.rb +312 -0
- data/lib/pnap_network_api/models/bgp_peer_group.rb +481 -0
- data/lib/pnap_network_api/models/bgp_peer_group_create.rb +306 -0
- data/lib/pnap_network_api/models/bgp_peer_group_patch.rb +275 -0
- data/lib/pnap_network_api/models/error.rb +1 -1
- data/lib/pnap_network_api/models/network_membership.rb +1 -1
- data/lib/pnap_network_api/models/private_network.rb +1 -1
- data/lib/pnap_network_api/models/private_network_create.rb +1 -1
- data/lib/pnap_network_api/models/private_network_modify.rb +1 -1
- data/lib/pnap_network_api/models/private_network_server.rb +1 -1
- data/lib/pnap_network_api/models/public_network.rb +15 -5
- data/lib/pnap_network_api/models/public_network_create.rb +21 -11
- data/lib/pnap_network_api/models/public_network_ip_block.rb +39 -5
- data/lib/pnap_network_api/models/public_network_ip_block_create.rb +223 -0
- data/lib/pnap_network_api/models/public_network_modify.rb +15 -5
- data/lib/pnap_network_api/version.rb +1 -1
- data/lib/pnap_network_api.rb +8 -1
- data/pnap_network_api.gemspec +1 -1
- data/spec/api/bgp_peer_groups_api_spec.rb +96 -0
- data/spec/api/private_networks_api_spec.rb +1 -1
- data/spec/api/public_networks_api_spec.rb +2 -2
- data/spec/models/asn_details_spec.rb +54 -0
- data/spec/models/bgp_ipv4_prefix_spec.rb +60 -0
- data/spec/models/bgp_peer_group_create_spec.rb +54 -0
- data/spec/models/bgp_peer_group_patch_spec.rb +48 -0
- data/spec/models/bgp_peer_group_spec.rb +120 -0
- data/spec/models/error_spec.rb +1 -1
- data/spec/models/network_membership_spec.rb +1 -1
- data/spec/models/private_network_create_spec.rb +1 -1
- data/spec/models/private_network_modify_spec.rb +1 -1
- data/spec/models/private_network_server_spec.rb +1 -1
- data/spec/models/private_network_spec.rb +1 -1
- data/spec/models/public_network_create_spec.rb +7 -1
- data/spec/models/public_network_ip_block_create_spec.rb +36 -0
- data/spec/models/public_network_ip_block_spec.rb +13 -1
- data/spec/models/public_network_modify_spec.rb +7 -1
- data/spec/models/public_network_spec.rb +7 -1
- data/spec/spec_helper.rb +1 -1
- metadata +40 -12
data/docs/PublicNetworkModify.md
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **name** | **String** | A friendly name given to the network. This name should be unique. | [optional] |
|
8
8
|
| **description** | **String** | The description of this public network | [optional] |
|
9
|
+
| **ra_enabled** | **Boolean** | Boolean indicating whether Router Advertisement is enabled. Only applicable for Network with IPv6 Blocks. | [optional] |
|
9
10
|
|
10
11
|
## Example
|
11
12
|
|
@@ -14,7 +15,8 @@ require 'pnap_network_api'
|
|
14
15
|
|
15
16
|
instance = NetworkApi::PublicNetworkModify.new(
|
16
17
|
name: Sample Network,
|
17
|
-
description: Further details on the network
|
18
|
+
description: Further details on the network.,
|
19
|
+
ra_enabled: true
|
18
20
|
)
|
19
21
|
```
|
20
22
|
|
data/docs/PublicNetworksApi.md
CHANGED
@@ -298,7 +298,7 @@ end
|
|
298
298
|
|
299
299
|
## public_networks_network_id_ip_blocks_post
|
300
300
|
|
301
|
-
> <PublicNetworkIpBlock> public_networks_network_id_ip_blocks_post(public_network_id,
|
301
|
+
> <PublicNetworkIpBlock> public_networks_network_id_ip_blocks_post(public_network_id, public_network_ip_block_create)
|
302
302
|
|
303
303
|
Adds an IP block to this public network.
|
304
304
|
|
@@ -317,11 +317,11 @@ end
|
|
317
317
|
|
318
318
|
api_instance = NetworkApi::PublicNetworksApi.new
|
319
319
|
public_network_id = '603f3b2cfcaf050643b89a4b' # String | The Public Network identifier.
|
320
|
-
|
320
|
+
public_network_ip_block_create = NetworkApi::PublicNetworkIpBlockCreate.new({id: '60473a6115e34466c9f8f083'}) # PublicNetworkIpBlockCreate |
|
321
321
|
|
322
322
|
begin
|
323
323
|
# Adds an IP block to this public network.
|
324
|
-
result = api_instance.public_networks_network_id_ip_blocks_post(public_network_id,
|
324
|
+
result = api_instance.public_networks_network_id_ip_blocks_post(public_network_id, public_network_ip_block_create)
|
325
325
|
p result
|
326
326
|
rescue NetworkApi::ApiError => e
|
327
327
|
puts "Error when calling PublicNetworksApi->public_networks_network_id_ip_blocks_post: #{e}"
|
@@ -332,12 +332,12 @@ end
|
|
332
332
|
|
333
333
|
This returns an Array which contains the response data, status code and headers.
|
334
334
|
|
335
|
-
> <Array(<PublicNetworkIpBlock>, Integer, Hash)> public_networks_network_id_ip_blocks_post_with_http_info(public_network_id,
|
335
|
+
> <Array(<PublicNetworkIpBlock>, Integer, Hash)> public_networks_network_id_ip_blocks_post_with_http_info(public_network_id, public_network_ip_block_create)
|
336
336
|
|
337
337
|
```ruby
|
338
338
|
begin
|
339
339
|
# Adds an IP block to this public network.
|
340
|
-
data, status_code, headers = api_instance.public_networks_network_id_ip_blocks_post_with_http_info(public_network_id,
|
340
|
+
data, status_code, headers = api_instance.public_networks_network_id_ip_blocks_post_with_http_info(public_network_id, public_network_ip_block_create)
|
341
341
|
p status_code # => 2xx
|
342
342
|
p headers # => { ... }
|
343
343
|
p data # => <PublicNetworkIpBlock>
|
@@ -351,7 +351,7 @@ end
|
|
351
351
|
| Name | Type | Description | Notes |
|
352
352
|
| ---- | ---- | ----------- | ----- |
|
353
353
|
| **public_network_id** | **String** | The Public Network identifier. | |
|
354
|
-
| **
|
354
|
+
| **public_network_ip_block_create** | [**PublicNetworkIpBlockCreate**](PublicNetworkIpBlockCreate.md) | | |
|
355
355
|
|
356
356
|
### Return type
|
357
357
|
|
@@ -0,0 +1,350 @@
|
|
1
|
+
=begin
|
2
|
+
#Networks API
|
3
|
+
|
4
|
+
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a>, <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</a> and <a href='https://phoenixnap.com/kb/border-gateway-protocol-bmc' target='_blank'>border gateway protocol peer groups</a>. </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module NetworkApi
|
16
|
+
class BGPPeerGroupsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# List BGP Peer Groups.
|
23
|
+
# List all BGP Peer Groups owned by account.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :location If present will filter the result by the given location of the BGP Peer Group.
|
26
|
+
# @return [Array<BgpPeerGroup>]
|
27
|
+
def bgp_peer_groups_get(opts = {})
|
28
|
+
data, _status_code, _headers = bgp_peer_groups_get_with_http_info(opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# List BGP Peer Groups.
|
33
|
+
# List all BGP Peer Groups owned by account.
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @option opts [String] :location If present will filter the result by the given location of the BGP Peer Group.
|
36
|
+
# @return [Array<(Array<BgpPeerGroup>, Integer, Hash)>] Array<BgpPeerGroup> data, response status code and response headers
|
37
|
+
def bgp_peer_groups_get_with_http_info(opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: BGPPeerGroupsApi.bgp_peer_groups_get ...'
|
40
|
+
end
|
41
|
+
# resource path
|
42
|
+
local_var_path = '/bgp-peer-groups'
|
43
|
+
|
44
|
+
# query parameters
|
45
|
+
query_params = opts[:query_params] || {}
|
46
|
+
query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
|
47
|
+
|
48
|
+
# header parameters
|
49
|
+
header_params = opts[:header_params] || {}
|
50
|
+
# HTTP header 'Accept' (if needed)
|
51
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
52
|
+
|
53
|
+
# form parameters
|
54
|
+
form_params = opts[:form_params] || {}
|
55
|
+
|
56
|
+
# http body (model)
|
57
|
+
post_body = opts[:debug_body]
|
58
|
+
|
59
|
+
# return_type
|
60
|
+
return_type = opts[:debug_return_type] || 'Array<BgpPeerGroup>'
|
61
|
+
|
62
|
+
# auth_names
|
63
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
64
|
+
|
65
|
+
new_options = opts.merge(
|
66
|
+
:operation => :"BGPPeerGroupsApi.bgp_peer_groups_get",
|
67
|
+
:header_params => header_params,
|
68
|
+
:query_params => query_params,
|
69
|
+
:form_params => form_params,
|
70
|
+
:body => post_body,
|
71
|
+
:auth_names => auth_names,
|
72
|
+
:return_type => return_type
|
73
|
+
)
|
74
|
+
|
75
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
76
|
+
if @api_client.config.debugging
|
77
|
+
@api_client.config.logger.debug "API called: BGPPeerGroupsApi#bgp_peer_groups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
78
|
+
end
|
79
|
+
return data, status_code, headers
|
80
|
+
end
|
81
|
+
|
82
|
+
# Delete a BGP Peer Group.
|
83
|
+
# Deletes BGP Peer Group by ID.
|
84
|
+
# @param bgp_peer_group_id [String] The BGP peer group ID.
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @return [BgpPeerGroup]
|
87
|
+
def bgp_peer_groups_peer_group_id_delete(bgp_peer_group_id, opts = {})
|
88
|
+
data, _status_code, _headers = bgp_peer_groups_peer_group_id_delete_with_http_info(bgp_peer_group_id, opts)
|
89
|
+
data
|
90
|
+
end
|
91
|
+
|
92
|
+
# Delete a BGP Peer Group.
|
93
|
+
# Deletes BGP Peer Group by ID.
|
94
|
+
# @param bgp_peer_group_id [String] The BGP peer group ID.
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [Array<(BgpPeerGroup, Integer, Hash)>] BgpPeerGroup data, response status code and response headers
|
97
|
+
def bgp_peer_groups_peer_group_id_delete_with_http_info(bgp_peer_group_id, opts = {})
|
98
|
+
if @api_client.config.debugging
|
99
|
+
@api_client.config.logger.debug 'Calling API: BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_delete ...'
|
100
|
+
end
|
101
|
+
# verify the required parameter 'bgp_peer_group_id' is set
|
102
|
+
if @api_client.config.client_side_validation && bgp_peer_group_id.nil?
|
103
|
+
fail ArgumentError, "Missing the required parameter 'bgp_peer_group_id' when calling BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_delete"
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/bgp-peer-groups/{bgpPeerGroupId}'.sub('{' + 'bgpPeerGroupId' + '}', CGI.escape(bgp_peer_group_id.to_s))
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = opts[:query_params] || {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = opts[:header_params] || {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = opts[:form_params] || {}
|
118
|
+
|
119
|
+
# http body (model)
|
120
|
+
post_body = opts[:debug_body]
|
121
|
+
|
122
|
+
# return_type
|
123
|
+
return_type = opts[:debug_return_type] || 'BgpPeerGroup'
|
124
|
+
|
125
|
+
# auth_names
|
126
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
127
|
+
|
128
|
+
new_options = opts.merge(
|
129
|
+
:operation => :"BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_delete",
|
130
|
+
:header_params => header_params,
|
131
|
+
:query_params => query_params,
|
132
|
+
:form_params => form_params,
|
133
|
+
:body => post_body,
|
134
|
+
:auth_names => auth_names,
|
135
|
+
:return_type => return_type
|
136
|
+
)
|
137
|
+
|
138
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
139
|
+
if @api_client.config.debugging
|
140
|
+
@api_client.config.logger.debug "API called: BGPPeerGroupsApi#bgp_peer_groups_peer_group_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
|
+
end
|
142
|
+
return data, status_code, headers
|
143
|
+
end
|
144
|
+
|
145
|
+
# Get a BGP Peer Group.
|
146
|
+
# Retrieves BGP Peer Group by ID.
|
147
|
+
# @param bgp_peer_group_id [String] The BGP peer group ID.
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @return [BgpPeerGroup]
|
150
|
+
def bgp_peer_groups_peer_group_id_get(bgp_peer_group_id, opts = {})
|
151
|
+
data, _status_code, _headers = bgp_peer_groups_peer_group_id_get_with_http_info(bgp_peer_group_id, opts)
|
152
|
+
data
|
153
|
+
end
|
154
|
+
|
155
|
+
# Get a BGP Peer Group.
|
156
|
+
# Retrieves BGP Peer Group by ID.
|
157
|
+
# @param bgp_peer_group_id [String] The BGP peer group ID.
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @return [Array<(BgpPeerGroup, Integer, Hash)>] BgpPeerGroup data, response status code and response headers
|
160
|
+
def bgp_peer_groups_peer_group_id_get_with_http_info(bgp_peer_group_id, opts = {})
|
161
|
+
if @api_client.config.debugging
|
162
|
+
@api_client.config.logger.debug 'Calling API: BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_get ...'
|
163
|
+
end
|
164
|
+
# verify the required parameter 'bgp_peer_group_id' is set
|
165
|
+
if @api_client.config.client_side_validation && bgp_peer_group_id.nil?
|
166
|
+
fail ArgumentError, "Missing the required parameter 'bgp_peer_group_id' when calling BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_get"
|
167
|
+
end
|
168
|
+
# resource path
|
169
|
+
local_var_path = '/bgp-peer-groups/{bgpPeerGroupId}'.sub('{' + 'bgpPeerGroupId' + '}', CGI.escape(bgp_peer_group_id.to_s))
|
170
|
+
|
171
|
+
# query parameters
|
172
|
+
query_params = opts[:query_params] || {}
|
173
|
+
|
174
|
+
# header parameters
|
175
|
+
header_params = opts[:header_params] || {}
|
176
|
+
# HTTP header 'Accept' (if needed)
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = opts[:form_params] || {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = opts[:debug_body]
|
184
|
+
|
185
|
+
# return_type
|
186
|
+
return_type = opts[:debug_return_type] || 'BgpPeerGroup'
|
187
|
+
|
188
|
+
# auth_names
|
189
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
190
|
+
|
191
|
+
new_options = opts.merge(
|
192
|
+
:operation => :"BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_get",
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => return_type
|
199
|
+
)
|
200
|
+
|
201
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug "API called: BGPPeerGroupsApi#bgp_peer_groups_peer_group_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
|
+
end
|
205
|
+
return data, status_code, headers
|
206
|
+
end
|
207
|
+
|
208
|
+
# Modify a BGP Peer Group.
|
209
|
+
# Modifies BGP Peer Group by ID.
|
210
|
+
# @param bgp_peer_group_id [String] The BGP peer group ID.
|
211
|
+
# @param bgp_peer_group_patch [BgpPeerGroupPatch]
|
212
|
+
# @param [Hash] opts the optional parameters
|
213
|
+
# @return [BgpPeerGroup]
|
214
|
+
def bgp_peer_groups_peer_group_id_patch(bgp_peer_group_id, bgp_peer_group_patch, opts = {})
|
215
|
+
data, _status_code, _headers = bgp_peer_groups_peer_group_id_patch_with_http_info(bgp_peer_group_id, bgp_peer_group_patch, opts)
|
216
|
+
data
|
217
|
+
end
|
218
|
+
|
219
|
+
# Modify a BGP Peer Group.
|
220
|
+
# Modifies BGP Peer Group by ID.
|
221
|
+
# @param bgp_peer_group_id [String] The BGP peer group ID.
|
222
|
+
# @param bgp_peer_group_patch [BgpPeerGroupPatch]
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @return [Array<(BgpPeerGroup, Integer, Hash)>] BgpPeerGroup data, response status code and response headers
|
225
|
+
def bgp_peer_groups_peer_group_id_patch_with_http_info(bgp_peer_group_id, bgp_peer_group_patch, opts = {})
|
226
|
+
if @api_client.config.debugging
|
227
|
+
@api_client.config.logger.debug 'Calling API: BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_patch ...'
|
228
|
+
end
|
229
|
+
# verify the required parameter 'bgp_peer_group_id' is set
|
230
|
+
if @api_client.config.client_side_validation && bgp_peer_group_id.nil?
|
231
|
+
fail ArgumentError, "Missing the required parameter 'bgp_peer_group_id' when calling BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_patch"
|
232
|
+
end
|
233
|
+
# verify the required parameter 'bgp_peer_group_patch' is set
|
234
|
+
if @api_client.config.client_side_validation && bgp_peer_group_patch.nil?
|
235
|
+
fail ArgumentError, "Missing the required parameter 'bgp_peer_group_patch' when calling BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_patch"
|
236
|
+
end
|
237
|
+
# resource path
|
238
|
+
local_var_path = '/bgp-peer-groups/{bgpPeerGroupId}'.sub('{' + 'bgpPeerGroupId' + '}', CGI.escape(bgp_peer_group_id.to_s))
|
239
|
+
|
240
|
+
# query parameters
|
241
|
+
query_params = opts[:query_params] || {}
|
242
|
+
|
243
|
+
# header parameters
|
244
|
+
header_params = opts[:header_params] || {}
|
245
|
+
# HTTP header 'Accept' (if needed)
|
246
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
247
|
+
# HTTP header 'Content-Type'
|
248
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
249
|
+
if !content_type.nil?
|
250
|
+
header_params['Content-Type'] = content_type
|
251
|
+
end
|
252
|
+
|
253
|
+
# form parameters
|
254
|
+
form_params = opts[:form_params] || {}
|
255
|
+
|
256
|
+
# http body (model)
|
257
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(bgp_peer_group_patch)
|
258
|
+
|
259
|
+
# return_type
|
260
|
+
return_type = opts[:debug_return_type] || 'BgpPeerGroup'
|
261
|
+
|
262
|
+
# auth_names
|
263
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
264
|
+
|
265
|
+
new_options = opts.merge(
|
266
|
+
:operation => :"BGPPeerGroupsApi.bgp_peer_groups_peer_group_id_patch",
|
267
|
+
:header_params => header_params,
|
268
|
+
:query_params => query_params,
|
269
|
+
:form_params => form_params,
|
270
|
+
:body => post_body,
|
271
|
+
:auth_names => auth_names,
|
272
|
+
:return_type => return_type
|
273
|
+
)
|
274
|
+
|
275
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug "API called: BGPPeerGroupsApi#bgp_peer_groups_peer_group_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
278
|
+
end
|
279
|
+
return data, status_code, headers
|
280
|
+
end
|
281
|
+
|
282
|
+
# Create a BGP Peer Group.
|
283
|
+
# Create a BGP Peer Group.
|
284
|
+
# @param bgp_peer_group_create [BgpPeerGroupCreate]
|
285
|
+
# @param [Hash] opts the optional parameters
|
286
|
+
# @return [BgpPeerGroup]
|
287
|
+
def bgp_peer_groups_post(bgp_peer_group_create, opts = {})
|
288
|
+
data, _status_code, _headers = bgp_peer_groups_post_with_http_info(bgp_peer_group_create, opts)
|
289
|
+
data
|
290
|
+
end
|
291
|
+
|
292
|
+
# Create a BGP Peer Group.
|
293
|
+
# Create a BGP Peer Group.
|
294
|
+
# @param bgp_peer_group_create [BgpPeerGroupCreate]
|
295
|
+
# @param [Hash] opts the optional parameters
|
296
|
+
# @return [Array<(BgpPeerGroup, Integer, Hash)>] BgpPeerGroup data, response status code and response headers
|
297
|
+
def bgp_peer_groups_post_with_http_info(bgp_peer_group_create, opts = {})
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug 'Calling API: BGPPeerGroupsApi.bgp_peer_groups_post ...'
|
300
|
+
end
|
301
|
+
# verify the required parameter 'bgp_peer_group_create' is set
|
302
|
+
if @api_client.config.client_side_validation && bgp_peer_group_create.nil?
|
303
|
+
fail ArgumentError, "Missing the required parameter 'bgp_peer_group_create' when calling BGPPeerGroupsApi.bgp_peer_groups_post"
|
304
|
+
end
|
305
|
+
# resource path
|
306
|
+
local_var_path = '/bgp-peer-groups'
|
307
|
+
|
308
|
+
# query parameters
|
309
|
+
query_params = opts[:query_params] || {}
|
310
|
+
|
311
|
+
# header parameters
|
312
|
+
header_params = opts[:header_params] || {}
|
313
|
+
# HTTP header 'Accept' (if needed)
|
314
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
315
|
+
# HTTP header 'Content-Type'
|
316
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
317
|
+
if !content_type.nil?
|
318
|
+
header_params['Content-Type'] = content_type
|
319
|
+
end
|
320
|
+
|
321
|
+
# form parameters
|
322
|
+
form_params = opts[:form_params] || {}
|
323
|
+
|
324
|
+
# http body (model)
|
325
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(bgp_peer_group_create)
|
326
|
+
|
327
|
+
# return_type
|
328
|
+
return_type = opts[:debug_return_type] || 'BgpPeerGroup'
|
329
|
+
|
330
|
+
# auth_names
|
331
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
332
|
+
|
333
|
+
new_options = opts.merge(
|
334
|
+
:operation => :"BGPPeerGroupsApi.bgp_peer_groups_post",
|
335
|
+
:header_params => header_params,
|
336
|
+
:query_params => query_params,
|
337
|
+
:form_params => form_params,
|
338
|
+
:body => post_body,
|
339
|
+
:auth_names => auth_names,
|
340
|
+
:return_type => return_type
|
341
|
+
)
|
342
|
+
|
343
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
344
|
+
if @api_client.config.debugging
|
345
|
+
@api_client.config.logger.debug "API called: BGPPeerGroupsApi#bgp_peer_groups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
346
|
+
end
|
347
|
+
return data, status_code, headers
|
348
|
+
end
|
349
|
+
end
|
350
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Networks API
|
3
3
|
|
4
|
-
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a
|
4
|
+
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a>, <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</a> and <a href='https://phoenixnap.com/kb/border-gateway-protocol-bmc' target='_blank'>border gateway protocol peer groups</a>. </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Networks API
|
3
3
|
|
4
|
-
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a
|
4
|
+
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a>, <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</a> and <a href='https://phoenixnap.com/kb/border-gateway-protocol-bmc' target='_blank'>border gateway protocol peer groups</a>. </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
@@ -280,21 +280,21 @@ module NetworkApi
|
|
280
280
|
# Adds an IP block to this public network.
|
281
281
|
# Adds an IP block to this public network.
|
282
282
|
# @param public_network_id [String] The Public Network identifier.
|
283
|
-
# @param
|
283
|
+
# @param public_network_ip_block_create [PublicNetworkIpBlockCreate]
|
284
284
|
# @param [Hash] opts the optional parameters
|
285
285
|
# @return [PublicNetworkIpBlock]
|
286
|
-
def public_networks_network_id_ip_blocks_post(public_network_id,
|
287
|
-
data, _status_code, _headers = public_networks_network_id_ip_blocks_post_with_http_info(public_network_id,
|
286
|
+
def public_networks_network_id_ip_blocks_post(public_network_id, public_network_ip_block_create, opts = {})
|
287
|
+
data, _status_code, _headers = public_networks_network_id_ip_blocks_post_with_http_info(public_network_id, public_network_ip_block_create, opts)
|
288
288
|
data
|
289
289
|
end
|
290
290
|
|
291
291
|
# Adds an IP block to this public network.
|
292
292
|
# Adds an IP block to this public network.
|
293
293
|
# @param public_network_id [String] The Public Network identifier.
|
294
|
-
# @param
|
294
|
+
# @param public_network_ip_block_create [PublicNetworkIpBlockCreate]
|
295
295
|
# @param [Hash] opts the optional parameters
|
296
296
|
# @return [Array<(PublicNetworkIpBlock, Integer, Hash)>] PublicNetworkIpBlock data, response status code and response headers
|
297
|
-
def public_networks_network_id_ip_blocks_post_with_http_info(public_network_id,
|
297
|
+
def public_networks_network_id_ip_blocks_post_with_http_info(public_network_id, public_network_ip_block_create, opts = {})
|
298
298
|
if @api_client.config.debugging
|
299
299
|
@api_client.config.logger.debug 'Calling API: PublicNetworksApi.public_networks_network_id_ip_blocks_post ...'
|
300
300
|
end
|
@@ -302,9 +302,9 @@ module NetworkApi
|
|
302
302
|
if @api_client.config.client_side_validation && public_network_id.nil?
|
303
303
|
fail ArgumentError, "Missing the required parameter 'public_network_id' when calling PublicNetworksApi.public_networks_network_id_ip_blocks_post"
|
304
304
|
end
|
305
|
-
# verify the required parameter '
|
306
|
-
if @api_client.config.client_side_validation &&
|
307
|
-
fail ArgumentError, "Missing the required parameter '
|
305
|
+
# verify the required parameter 'public_network_ip_block_create' is set
|
306
|
+
if @api_client.config.client_side_validation && public_network_ip_block_create.nil?
|
307
|
+
fail ArgumentError, "Missing the required parameter 'public_network_ip_block_create' when calling PublicNetworksApi.public_networks_network_id_ip_blocks_post"
|
308
308
|
end
|
309
309
|
# resource path
|
310
310
|
local_var_path = '/public-networks/{publicNetworkId}/ip-blocks'.sub('{' + 'publicNetworkId' + '}', CGI.escape(public_network_id.to_s))
|
@@ -326,7 +326,7 @@ module NetworkApi
|
|
326
326
|
form_params = opts[:form_params] || {}
|
327
327
|
|
328
328
|
# http body (model)
|
329
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
329
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(public_network_ip_block_create)
|
330
330
|
|
331
331
|
# return_type
|
332
332
|
return_type = opts[:debug_return_type] || 'PublicNetworkIpBlock'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Networks API
|
3
3
|
|
4
|
-
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a
|
4
|
+
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a>, <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</a> and <a href='https://phoenixnap.com/kb/border-gateway-protocol-bmc' target='_blank'>border gateway protocol peer groups</a>. </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
@@ -33,8 +33,8 @@ module NetworkApi
|
|
33
33
|
def initialize(config = Configuration.default)
|
34
34
|
@config = config
|
35
35
|
@config.params_encoding = :multi
|
36
|
-
@user_agent = "PNAP-ruby-sdk-bmc/#{ NetworkApi::VERSION }"
|
37
|
-
@powered_by = "PNAP-ruby-sdk-bmc/#{ NetworkApi::VERSION }"
|
36
|
+
@user_agent = "PNAP-ruby-sdk-bmc/NetworkApi/#{ NetworkApi::VERSION }"
|
37
|
+
@powered_by = "PNAP-ruby-sdk-bmc/NetworkApi/#{ NetworkApi::VERSION }"
|
38
38
|
@default_headers = {
|
39
39
|
'Content-Type' => 'application/json',
|
40
40
|
'User-Agent' => @user_agent,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Networks API
|
3
3
|
|
4
|
-
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a
|
4
|
+
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a>, <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</a> and <a href='https://phoenixnap.com/kb/border-gateway-protocol-bmc' target='_blank'>border gateway protocol peer groups</a>. </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Networks API
|
3
3
|
|
4
|
-
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a
|
4
|
+
#Create, list, edit and delete public/private networks with the Network API. Use public networks to place multiple servers on the same network or VLAN. Assign new servers with IP addresses from the same CIDR range. Use private networks to avoid unnecessary egress data charges. Model your networks according to your business needs.<br> <br> <span class='pnap-api-knowledge-base-link'> Helpful knowledge base articles are available for <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>multi-private backend networks</a>, <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</a> and <a href='https://phoenixnap.com/kb/border-gateway-protocol-bmc' target='_blank'>border gateway protocol peer groups</a>. </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|