pnap_network_api 1.3.1 → 2.0.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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/VERSION +1 -1
  4. data/docs/PrivateNetwork.md +1 -1
  5. data/docs/PrivateNetworksApi.md +13 -15
  6. data/docs/PublicNetwork.md +1 -1
  7. data/docs/PublicNetworksApi.md +18 -24
  8. data/lib/pnap_network_api/api/private_networks_api.rb +21 -13
  9. data/lib/pnap_network_api/api/public_networks_api.rb +31 -19
  10. data/lib/pnap_network_api/api_client.rb +24 -21
  11. data/lib/pnap_network_api/api_error.rb +2 -1
  12. data/lib/pnap_network_api/configuration.rb +28 -9
  13. data/lib/pnap_network_api/models/error.rb +16 -19
  14. data/lib/pnap_network_api/models/network_membership.rb +20 -19
  15. data/lib/pnap_network_api/models/private_network.rb +40 -21
  16. data/lib/pnap_network_api/models/private_network_create.rb +40 -22
  17. data/lib/pnap_network_api/models/private_network_modify.rb +34 -20
  18. data/lib/pnap_network_api/models/private_network_server.rb +18 -19
  19. data/lib/pnap_network_api/models/public_network.rb +36 -21
  20. data/lib/pnap_network_api/models/public_network_create.rb +45 -23
  21. data/lib/pnap_network_api/models/public_network_ip_block.rb +16 -19
  22. data/lib/pnap_network_api/models/public_network_modify.rb +36 -22
  23. data/lib/pnap_network_api/version.rb +1 -1
  24. data/lib/pnap_network_api.rb +1 -1
  25. data/pnap_network_api.gemspec +2 -2
  26. data/spec/api/private_networks_api_spec.rb +10 -9
  27. data/spec/api/public_networks_api_spec.rb +14 -13
  28. data/spec/models/error_spec.rb +7 -5
  29. data/spec/models/network_membership_spec.rb +7 -5
  30. data/spec/models/private_network_create_spec.rb +16 -8
  31. data/spec/models/private_network_modify_spec.rb +8 -6
  32. data/spec/models/private_network_server_spec.rb +7 -5
  33. data/spec/models/private_network_spec.rb +32 -12
  34. data/spec/models/public_network_create_spec.rb +15 -7
  35. data/spec/models/public_network_ip_block_spec.rb +6 -4
  36. data/spec/models/public_network_modify_spec.rb +7 -5
  37. data/spec/models/public_network_spec.rb +19 -11
  38. data/spec/spec_helper.rb +1 -1
  39. metadata +8 -16
  40. data/docs/PublicNetworkMembership.md +0 -22
  41. data/lib/pnap_network_api/models/public_network_membership.rb +0 -257
  42. data/spec/api_client_spec.rb +0 -226
  43. data/spec/configuration_spec.rb +0 -42
  44. data/spec/models/public_network_membership_spec.rb +0 -46
@@ -1,257 +0,0 @@
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
- # Resource details linked to the Public Network.
18
- class PublicNetworkMembership
19
- # The resource identifier.
20
- attr_accessor :resource_id
21
-
22
- # The resource's type.
23
- attr_accessor :resource_type
24
-
25
- # List of public IPs associated to the resource.
26
- attr_accessor :ips
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'resource_id' => :'resourceId',
32
- :'resource_type' => :'resourceType',
33
- :'ips' => :'ips'
34
- }
35
- end
36
-
37
- # Returns all the JSON keys this model knows about
38
- def self.acceptable_attributes
39
- attribute_map.values
40
- end
41
-
42
- # Attribute type mapping.
43
- def self.openapi_types
44
- {
45
- :'resource_id' => :'String',
46
- :'resource_type' => :'String',
47
- :'ips' => :'Array<String>'
48
- }
49
- end
50
-
51
- # List of attributes with nullable: true
52
- def self.openapi_nullable
53
- Set.new([
54
- ])
55
- end
56
-
57
- # Initializes the object
58
- # @param [Hash] attributes Model attributes in the form of hash
59
- def initialize(attributes = {})
60
- if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `NetworkApi::PublicNetworkMembership` initialize method"
62
- end
63
-
64
- # check to see if the attribute exists and convert string to symbol for hash key
65
- attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!self.class.attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `NetworkApi::PublicNetworkMembership`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
- end
69
- h[k.to_sym] = v
70
- }
71
-
72
- if attributes.key?(:'resource_id')
73
- self.resource_id = attributes[:'resource_id']
74
- end
75
-
76
- if attributes.key?(:'resource_type')
77
- self.resource_type = attributes[:'resource_type']
78
- end
79
-
80
- if attributes.key?(:'ips')
81
- if (value = attributes[:'ips']).is_a?(Array)
82
- self.ips = value
83
- end
84
- end
85
- end
86
-
87
- # Show invalid properties with the reasons. Usually used together with valid?
88
- # @return Array for valid properties with the reasons
89
- def list_invalid_properties
90
- invalid_properties = Array.new
91
- if @resource_id.nil?
92
- invalid_properties.push('invalid value for "resource_id", resource_id cannot be nil.')
93
- end
94
-
95
- if @resource_type.nil?
96
- invalid_properties.push('invalid value for "resource_type", resource_type cannot be nil.')
97
- end
98
-
99
- if @ips.nil?
100
- invalid_properties.push('invalid value for "ips", ips cannot be nil.')
101
- end
102
-
103
- invalid_properties
104
- end
105
-
106
- # Check to see if the all the properties in the model are valid
107
- # @return true if the model is valid
108
- def valid?
109
- return false if @resource_id.nil?
110
- return false if @resource_type.nil?
111
- return false if @ips.nil?
112
- true
113
- end
114
-
115
- # Checks equality by comparing each attribute.
116
- # @param [Object] Object to be compared
117
- def ==(o)
118
- return true if self.equal?(o)
119
- self.class == o.class &&
120
- resource_id == o.resource_id &&
121
- resource_type == o.resource_type &&
122
- ips == o.ips
123
- end
124
-
125
- # @see the `==` method
126
- # @param [Object] Object to be compared
127
- def eql?(o)
128
- self == o
129
- end
130
-
131
- # Calculates hash code according to all attributes.
132
- # @return [Integer] Hash code
133
- def hash
134
- [resource_id, resource_type, ips].hash
135
- end
136
-
137
- # Builds the object from hash
138
- # @param [Hash] attributes Model attributes in the form of hash
139
- # @return [Object] Returns the model itself
140
- def self.build_from_hash(attributes)
141
- new.build_from_hash(attributes)
142
- end
143
-
144
- # Builds the object from hash
145
- # @param [Hash] attributes Model attributes in the form of hash
146
- # @return [Object] Returns the model itself
147
- def build_from_hash(attributes)
148
- return nil unless attributes.is_a?(Hash)
149
- self.class.openapi_types.each_pair do |key, type|
150
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
151
- self.send("#{key}=", nil)
152
- elsif type =~ /\AArray<(.*)>/i
153
- # check to ensure the input is an array given that the attribute
154
- # is documented as an array but the input is not
155
- if attributes[self.class.attribute_map[key]].is_a?(Array)
156
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
157
- end
158
- elsif !attributes[self.class.attribute_map[key]].nil?
159
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
- end
161
- end
162
-
163
- self
164
- end
165
-
166
- # Deserializes the data based on type
167
- # @param string type Data type
168
- # @param string value Value to be deserialized
169
- # @return [Object] Deserialized data
170
- def _deserialize(type, value)
171
- case type.to_sym
172
- when :Time
173
- Time.parse(value)
174
- when :Date
175
- Date.parse(value)
176
- when :String
177
- value.to_s
178
- when :Integer
179
- value.to_i
180
- when :Float
181
- value.to_f
182
- when :Boolean
183
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
- true
185
- else
186
- false
187
- end
188
- when :Object
189
- # generic object (usually a Hash), return directly
190
- value
191
- when /\AArray<(?<inner_type>.+)>\z/
192
- inner_type = Regexp.last_match[:inner_type]
193
- value.map { |v| _deserialize(inner_type, v) }
194
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
- k_type = Regexp.last_match[:k_type]
196
- v_type = Regexp.last_match[:v_type]
197
- {}.tap do |hash|
198
- value.each do |k, v|
199
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
- end
201
- end
202
- else # model
203
- # models (e.g. Pet) or oneOf
204
- klass = NetworkApi.const_get(type)
205
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
- end
207
- end
208
-
209
- # Returns the string representation of the object
210
- # @return [String] String presentation of the object
211
- def to_s
212
- to_hash.to_s
213
- end
214
-
215
- # to_body is an alias to to_hash (backward compatibility)
216
- # @return [Hash] Returns the object in the form of hash
217
- def to_body
218
- to_hash
219
- end
220
-
221
- # Returns the object in the form of hash
222
- # @return [Hash] Returns the object in the form of hash
223
- def to_hash
224
- hash = {}
225
- self.class.attribute_map.each_pair do |attr, param|
226
- value = self.send(attr)
227
- if value.nil?
228
- is_nullable = self.class.openapi_nullable.include?(attr)
229
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
- end
231
-
232
- hash[param] = _to_hash(value)
233
- end
234
- hash
235
- end
236
-
237
- # Outputs non-array value in the form of hash
238
- # For object, use to_hash. Otherwise, just return the value
239
- # @param [Object] value Any valid value
240
- # @return [Hash] Returns the value in the form of hash
241
- def _to_hash(value)
242
- if value.is_a?(Array)
243
- value.compact.map { |v| _to_hash(v) }
244
- elsif value.is_a?(Hash)
245
- {}.tap do |hash|
246
- value.each { |k, v| hash[k] = _to_hash(v) }
247
- end
248
- elsif value.respond_to? :to_hash
249
- value.to_hash
250
- else
251
- value
252
- end
253
- end
254
-
255
- end
256
-
257
- end
@@ -1,226 +0,0 @@
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: 6.1.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
-
15
- describe NetworkApi::ApiClient do
16
- context 'initialization' do
17
- context 'URL stuff' do
18
- context 'host' do
19
- it 'removes http from host' do
20
- NetworkApi.configure { |c| c.host = 'http://example.com' }
21
- expect(NetworkApi::Configuration.default.host).to eq('example.com')
22
- end
23
-
24
- it 'removes https from host' do
25
- NetworkApi.configure { |c| c.host = 'https://wookiee.com' }
26
- expect(NetworkApi::ApiClient.default.config.host).to eq('wookiee.com')
27
- end
28
-
29
- it 'removes trailing path from host' do
30
- NetworkApi.configure { |c| c.host = 'hobo.com/v4' }
31
- expect(NetworkApi::Configuration.default.host).to eq('hobo.com')
32
- end
33
- end
34
-
35
- context 'base_path' do
36
- it "prepends a slash to base_path" do
37
- NetworkApi.configure { |c| c.base_path = 'v4/dog' }
38
- expect(NetworkApi::Configuration.default.base_path).to eq('/v4/dog')
39
- end
40
-
41
- it "doesn't prepend a slash if one is already there" do
42
- NetworkApi.configure { |c| c.base_path = '/v4/dog' }
43
- expect(NetworkApi::Configuration.default.base_path).to eq('/v4/dog')
44
- end
45
-
46
- it "ends up as a blank string if nil" do
47
- NetworkApi.configure { |c| c.base_path = nil }
48
- expect(NetworkApi::Configuration.default.base_path).to eq('')
49
- end
50
- end
51
- end
52
- end
53
-
54
- describe 'params_encoding in #build_request' do
55
- let(:config) { NetworkApi::Configuration.new }
56
- let(:api_client) { NetworkApi::ApiClient.new(config) }
57
-
58
- it 'defaults to nil' do
59
- expect(NetworkApi::Configuration.default.params_encoding).to eq(nil)
60
- expect(config.params_encoding).to eq(nil)
61
-
62
- request = api_client.build_request(:get, '/test')
63
- expect(request.options[:params_encoding]).to eq(nil)
64
- end
65
-
66
- it 'can be customized' do
67
- config.params_encoding = :multi
68
- request = api_client.build_request(:get, '/test')
69
- expect(request.options[:params_encoding]).to eq(:multi)
70
- end
71
- end
72
-
73
- describe 'timeout in #build_request' do
74
- let(:config) { NetworkApi::Configuration.new }
75
- let(:api_client) { NetworkApi::ApiClient.new(config) }
76
-
77
- it 'defaults to 0' do
78
- expect(NetworkApi::Configuration.default.timeout).to eq(0)
79
- expect(config.timeout).to eq(0)
80
-
81
- request = api_client.build_request(:get, '/test')
82
- expect(request.options[:timeout]).to eq(0)
83
- end
84
-
85
- it 'can be customized' do
86
- config.timeout = 100
87
- request = api_client.build_request(:get, '/test')
88
- expect(request.options[:timeout]).to eq(100)
89
- end
90
- end
91
-
92
- describe '#deserialize' do
93
- it "handles Array<Integer>" do
94
- api_client = NetworkApi::ApiClient.new
95
- headers = { 'Content-Type' => 'application/json' }
96
- response = double('response', headers: headers, body: '[12, 34]')
97
- data = api_client.deserialize(response, 'Array<Integer>')
98
- expect(data).to be_instance_of(Array)
99
- expect(data).to eq([12, 34])
100
- end
101
-
102
- it 'handles Array<Array<Integer>>' do
103
- api_client = NetworkApi::ApiClient.new
104
- headers = { 'Content-Type' => 'application/json' }
105
- response = double('response', headers: headers, body: '[[12, 34], [56]]')
106
- data = api_client.deserialize(response, 'Array<Array<Integer>>')
107
- expect(data).to be_instance_of(Array)
108
- expect(data).to eq([[12, 34], [56]])
109
- end
110
-
111
- it 'handles Hash<String, String>' do
112
- api_client = NetworkApi::ApiClient.new
113
- headers = { 'Content-Type' => 'application/json' }
114
- response = double('response', headers: headers, body: '{"message": "Hello"}')
115
- data = api_client.deserialize(response, 'Hash<String, String>')
116
- expect(data).to be_instance_of(Hash)
117
- expect(data).to eq(:message => 'Hello')
118
- end
119
- end
120
-
121
- describe "#object_to_hash" do
122
- it 'ignores nils and includes empty arrays' do
123
- # uncomment below to test object_to_hash for model
124
- # api_client = NetworkApi::ApiClient.new
125
- # _model = NetworkApi::ModelName.new
126
- # update the model attribute below
127
- # _model.id = 1
128
- # update the expected value (hash) below
129
- # expected = {id: 1, name: '', tags: []}
130
- # expect(api_client.object_to_hash(_model)).to eq(expected)
131
- end
132
- end
133
-
134
- describe '#build_collection_param' do
135
- let(:param) { ['aa', 'bb', 'cc'] }
136
- let(:api_client) { NetworkApi::ApiClient.new }
137
-
138
- it 'works for csv' do
139
- expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
140
- end
141
-
142
- it 'works for ssv' do
143
- expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
144
- end
145
-
146
- it 'works for tsv' do
147
- expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
148
- end
149
-
150
- it 'works for pipes' do
151
- expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
152
- end
153
-
154
- it 'works for multi' do
155
- expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
156
- end
157
-
158
- it 'fails for invalid collection format' do
159
- expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
160
- end
161
- end
162
-
163
- describe '#json_mime?' do
164
- let(:api_client) { NetworkApi::ApiClient.new }
165
-
166
- it 'works' do
167
- expect(api_client.json_mime?(nil)).to eq false
168
- expect(api_client.json_mime?('')).to eq false
169
-
170
- expect(api_client.json_mime?('application/json')).to eq true
171
- expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
172
- expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
173
-
174
- expect(api_client.json_mime?('application/xml')).to eq false
175
- expect(api_client.json_mime?('text/plain')).to eq false
176
- expect(api_client.json_mime?('application/jsonp')).to eq false
177
- end
178
- end
179
-
180
- describe '#select_header_accept' do
181
- let(:api_client) { NetworkApi::ApiClient.new }
182
-
183
- it 'works' do
184
- expect(api_client.select_header_accept(nil)).to be_nil
185
- expect(api_client.select_header_accept([])).to be_nil
186
-
187
- expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
188
- expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
189
- expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
190
-
191
- expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
192
- expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
193
- end
194
- end
195
-
196
- describe '#select_header_content_type' do
197
- let(:api_client) { NetworkApi::ApiClient.new }
198
-
199
- it 'works' do
200
- expect(api_client.select_header_content_type(nil)).to be_nil
201
- expect(api_client.select_header_content_type([])).to be_nil
202
-
203
- expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
204
- expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
205
- expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
206
- expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
207
- expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
208
- end
209
- end
210
-
211
- describe '#sanitize_filename' do
212
- let(:api_client) { NetworkApi::ApiClient.new }
213
-
214
- it 'works' do
215
- expect(api_client.sanitize_filename('sun')).to eq('sun')
216
- expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
217
- expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
218
- expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
219
- expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
220
- expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
221
- expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
222
- expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
223
- expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
224
- end
225
- end
226
- end
@@ -1,42 +0,0 @@
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: 6.1.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
-
15
- describe NetworkApi::Configuration do
16
- let(:config) { NetworkApi::Configuration.default }
17
-
18
- before(:each) do
19
- # uncomment below to setup host and base_path
20
- # require 'URI'
21
- # uri = URI.parse("https://api.phoenixnap.com/networks/v1")
22
- # NetworkApi.configure do |c|
23
- # c.host = uri.host
24
- # c.base_path = uri.path
25
- # end
26
- end
27
-
28
- describe '#base_url' do
29
- it 'should have the default value' do
30
- # uncomment below to test default value of the base path
31
- # expect(config.base_url).to eq("https://api.phoenixnap.com/networks/v1")
32
- end
33
-
34
- it 'should remove trailing slashes' do
35
- [nil, '', '/', '//'].each do |base_path|
36
- config.base_path = base_path
37
- # uncomment below to test trailing slashes
38
- # expect(config.base_url).to eq("https://api.phoenixnap.com/networks/v1")
39
- end
40
- end
41
- end
42
- end
@@ -1,46 +0,0 @@
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