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
@@ -0,0 +1,269 @@
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> and <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</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: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module NetworkApi
17
+ # Public Network Modifiable Details.
18
+ class PublicNetworkModify
19
+ # A friendly name given to the network. This name should be unique.
20
+ attr_accessor :name
21
+
22
+ # The description of this public network
23
+ attr_accessor :description
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'name' => :'name',
29
+ :'description' => :'description'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'name' => :'String',
42
+ :'description' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NetworkApi::PublicNetworkModify` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NetworkApi::PublicNetworkModify`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'name')
68
+ self.name = attributes[:'name']
69
+ end
70
+
71
+ if attributes.key?(:'description')
72
+ self.description = attributes[:'description']
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ invalid_properties = Array.new
80
+ if !@name.nil? && @name.to_s.length > 100
81
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
82
+ end
83
+
84
+ if !@name.nil? && @name.to_s.length < 1
85
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
86
+ end
87
+
88
+ if !@description.nil? && @description.to_s.length > 250
89
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 250.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ return false if !@name.nil? && @name.to_s.length > 100
99
+ return false if !@name.nil? && @name.to_s.length < 1
100
+ return false if !@description.nil? && @description.to_s.length > 250
101
+ true
102
+ end
103
+
104
+ # Custom attribute writer method with validation
105
+ # @param [Object] name Value to be assigned
106
+ def name=(name)
107
+ if !name.nil? && name.to_s.length > 100
108
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
109
+ end
110
+
111
+ if !name.nil? && name.to_s.length < 1
112
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
113
+ end
114
+
115
+ @name = name
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param [Object] description Value to be assigned
120
+ def description=(description)
121
+ if !description.nil? && description.to_s.length > 250
122
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 250.'
123
+ end
124
+
125
+ @description = description
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ name == o.name &&
134
+ description == o.description
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [name, description].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ new.build_from_hash(attributes)
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def build_from_hash(attributes)
160
+ return nil unless attributes.is_a?(Hash)
161
+ self.class.openapi_types.each_pair do |key, type|
162
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
163
+ self.send("#{key}=", nil)
164
+ elsif type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the attribute
166
+ # is documented as an array but the input is not
167
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
168
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
169
+ end
170
+ elsif !attributes[self.class.attribute_map[key]].nil?
171
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
172
+ end
173
+ end
174
+
175
+ self
176
+ end
177
+
178
+ # Deserializes the data based on type
179
+ # @param string type Data type
180
+ # @param string value Value to be deserialized
181
+ # @return [Object] Deserialized data
182
+ def _deserialize(type, value)
183
+ case type.to_sym
184
+ when :Time
185
+ Time.parse(value)
186
+ when :Date
187
+ Date.parse(value)
188
+ when :String
189
+ value.to_s
190
+ when :Integer
191
+ value.to_i
192
+ when :Float
193
+ value.to_f
194
+ when :Boolean
195
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
196
+ true
197
+ else
198
+ false
199
+ end
200
+ when :Object
201
+ # generic object (usually a Hash), return directly
202
+ value
203
+ when /\AArray<(?<inner_type>.+)>\z/
204
+ inner_type = Regexp.last_match[:inner_type]
205
+ value.map { |v| _deserialize(inner_type, v) }
206
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
207
+ k_type = Regexp.last_match[:k_type]
208
+ v_type = Regexp.last_match[:v_type]
209
+ {}.tap do |hash|
210
+ value.each do |k, v|
211
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
212
+ end
213
+ end
214
+ else # model
215
+ # models (e.g. Pet) or oneOf
216
+ klass = NetworkApi.const_get(type)
217
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
218
+ end
219
+ end
220
+
221
+ # Returns the string representation of the object
222
+ # @return [String] String presentation of the object
223
+ def to_s
224
+ to_hash.to_s
225
+ end
226
+
227
+ # to_body is an alias to to_hash (backward compatibility)
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_body
230
+ to_hash
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ if value.nil?
240
+ is_nullable = self.class.openapi_nullable.include?(attr)
241
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
+ end
243
+
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ # Outputs non-array value in the form of hash
250
+ # For object, use to_hash. Otherwise, just return the value
251
+ # @param [Object] value Any valid value
252
+ # @return [Hash] Returns the value in the form of hash
253
+ def _to_hash(value)
254
+ if value.is_a?(Array)
255
+ value.compact.map { |v| _to_hash(v) }
256
+ elsif value.is_a?(Hash)
257
+ {}.tap do |hash|
258
+ value.each { |k, v| hash[k] = _to_hash(v) }
259
+ end
260
+ elsif value.respond_to? :to_hash
261
+ value.to_hash
262
+ else
263
+ value
264
+ end
265
+ end
266
+
267
+ end
268
+
269
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Networks API
3
3
 
4
- #Use the Networks API to create, list, edit, and delete private networks to best fit your business needs. Private networks allow your servers to communicate without connecting to the public internet, avoiding unnecessary egress data charges.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
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> and <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</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
- #Use the Networks API to create, list, edit, and delete private networks to best fit your business needs. Private networks allow your servers to communicate without connecting to the public internet, avoiding unnecessary egress data charges.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
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> and <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</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
@@ -18,13 +18,19 @@ require 'pnap_network_api/configuration'
18
18
 
19
19
  # Models
20
20
  require 'pnap_network_api/models/error'
21
+ require 'pnap_network_api/models/network_membership'
21
22
  require 'pnap_network_api/models/private_network'
22
23
  require 'pnap_network_api/models/private_network_create'
23
24
  require 'pnap_network_api/models/private_network_modify'
24
25
  require 'pnap_network_api/models/private_network_server'
26
+ require 'pnap_network_api/models/public_network'
27
+ require 'pnap_network_api/models/public_network_create'
28
+ require 'pnap_network_api/models/public_network_ip_block'
29
+ require 'pnap_network_api/models/public_network_modify'
25
30
 
26
31
  # APIs
27
32
  require 'pnap_network_api/api/private_networks_api'
33
+ require 'pnap_network_api/api/public_networks_api'
28
34
 
29
35
  module NetworkApi
30
36
  class << self
@@ -3,7 +3,7 @@
3
3
  =begin
4
4
  #Networks API
5
5
 
6
- #Use the Networks API to create, list, edit, and delete private networks to best fit your business needs. Private networks allow your servers to communicate without connecting to the public internet, avoiding unnecessary egress data charges.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
6
+ #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> and <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</a>. </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
7
7
 
8
8
  The version of the OpenAPI document: 1.0
9
9
  Contact: support@phoenixnap.com
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.description = "Networks API Ruby Gem"
27
27
  s.license = "MPL-2.0"
28
28
  s.required_ruby_version = ">= 2.4"
29
- s.metadata = { "source_code_uri" => "https://github.com/phoenixnap/ruby-sdk-bmc-poc" }
29
+ s.metadata = { "source_code_uri" => "https://github.com/phoenixnap/ruby-sdk-bmc" }
30
30
 
31
31
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
32
32
 
@@ -0,0 +1,122 @@
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'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</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: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for NetworkApi::PublicNetworksApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'PublicNetworksApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = NetworkApi::PublicNetworksApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of PublicNetworksApi' do
30
+ it 'should create an instance of PublicNetworksApi' do
31
+ expect(@api_instance).to be_instance_of(NetworkApi::PublicNetworksApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for public_networks_get
36
+ # List Public Networks.
37
+ # List all Public Networks owned by account.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :location If present will filter the result by the given location of the Public Networks.
40
+ # @return [Array<PublicNetwork>]
41
+ describe 'public_networks_get test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for public_networks_network_id_delete
48
+ # Delete a Public Network.
49
+ # Delete Public Network. The request is accepted only if no resources are members of this network. The IP Block(s) will be freed and can be re-used in the future.
50
+ # @param public_network_id The Public Network identifier.
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [nil]
53
+ describe 'public_networks_network_id_delete test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ # unit tests for public_networks_network_id_get
60
+ # Get a Public Network.
61
+ # Retrieve Public Network Details.
62
+ # @param public_network_id The Public Network identifier.
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [PublicNetwork]
65
+ describe 'public_networks_network_id_get test' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ # unit tests for public_networks_network_id_ip_blocks_ip_block_id_delete
72
+ # Removes the IP Block from the Public Network.
73
+ # 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.
74
+ # @param public_network_id The Public Network identifier.
75
+ # @param ip_block_id The IP Block identifier.
76
+ # @param [Hash] opts the optional parameters
77
+ # @return [String]
78
+ describe 'public_networks_network_id_ip_blocks_ip_block_id_delete test' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
81
+ end
82
+ end
83
+
84
+ # unit tests for public_networks_network_id_ip_blocks_post
85
+ # Adds an IP block to this public network.
86
+ # Adds an IP block to this public network.
87
+ # @param public_network_id The Public Network identifier.
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [PublicNetworkIpBlock] :public_network_ip_block
90
+ # @return [PublicNetworkIpBlock]
91
+ describe 'public_networks_network_id_ip_blocks_post test' do
92
+ it 'should work' do
93
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
94
+ end
95
+ end
96
+
97
+ # unit tests for public_networks_network_id_patch
98
+ # Update Public Network&#39;s Details.
99
+ # Update Public Network&#39;s Details.
100
+ # @param public_network_id The Public Network identifier.
101
+ # @param [Hash] opts the optional parameters
102
+ # @option opts [PublicNetworkModify] :public_network_modify
103
+ # @return [PublicNetwork]
104
+ describe 'public_networks_network_id_patch test' do
105
+ it 'should work' do
106
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
107
+ end
108
+ end
109
+
110
+ # unit tests for public_networks_post
111
+ # Create a public network.
112
+ # Create a public network.
113
+ # @param [Hash] opts the optional parameters
114
+ # @option opts [PublicNetworkCreate] :public_network_create
115
+ # @return [PublicNetwork]
116
+ describe 'public_networks_post test' do
117
+ it 'should work' do
118
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
119
+ end
120
+ end
121
+
122
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Networks API
3
3
 
4
- #Use the Networks API to create, list, edit, and delete private networks to best fit your business needs. Private networks allow your servers to communicate without connecting to the public internet, avoiding unnecessary egress data charges.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
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> and <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</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
- #Use the Networks API to create, list, edit, and delete private networks to best fit your business needs. Private networks allow your servers to communicate without connecting to the public internet, avoiding unnecessary egress data charges.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/networks/v1/)</b>
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> and <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</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
@@ -0,0 +1,46 @@
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> and <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-15' target='_blank'>public networks</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: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for NetworkApi::NetworkMembership
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe NetworkApi::NetworkMembership do
21
+ let(:instance) { NetworkApi::NetworkMembership.new }
22
+
23
+ describe 'test an instance of NetworkMembership' do
24
+ it 'should create an instance of NetworkMembership' do
25
+ expect(instance).to be_instance_of(NetworkApi::NetworkMembership)
26
+ end
27
+ end
28
+ describe 'test attribute "resource_id"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "resource_type"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "ips"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ end
@@ -0,0 +1,52 @@
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'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</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: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for NetworkApi::PublicNetworkCreate
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe NetworkApi::PublicNetworkCreate do
21
+ let(:instance) { NetworkApi::PublicNetworkCreate.new }
22
+
23
+ describe 'test an instance of PublicNetworkCreate' do
24
+ it 'should create an instance of PublicNetworkCreate' do
25
+ expect(instance).to be_instance_of(NetworkApi::PublicNetworkCreate)
26
+ end
27
+ end
28
+ describe 'test attribute "name"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "description"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "location"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "ip_blocks"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ end
@@ -0,0 +1,34 @@
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'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</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: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for NetworkApi::PublicNetworkIpBlock
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe NetworkApi::PublicNetworkIpBlock do
21
+ let(:instance) { NetworkApi::PublicNetworkIpBlock.new }
22
+
23
+ describe 'test an instance of PublicNetworkIpBlock' do
24
+ it 'should create an instance of PublicNetworkIpBlock' do
25
+ expect(instance).to be_instance_of(NetworkApi::PublicNetworkIpBlock)
26
+ end
27
+ end
28
+ describe 'test attribute "id"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end
@@ -0,0 +1,46 @@
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'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#multi-private-backend-network-api' target='_blank'>here</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: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for NetworkApi::PublicNetworkMembership
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe NetworkApi::PublicNetworkMembership do
21
+ let(:instance) { NetworkApi::PublicNetworkMembership.new }
22
+
23
+ describe 'test an instance of PublicNetworkMembership' do
24
+ it 'should create an instance of PublicNetworkMembership' do
25
+ expect(instance).to be_instance_of(NetworkApi::PublicNetworkMembership)
26
+ end
27
+ end
28
+ describe 'test attribute "resource_id"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "resource_type"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "ips"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ end