pnap_ip_api 2.0.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94d3df368915baec2bc6ed56cc6748a9d619690ceaeef8f823233f8ae7ee4a72
4
- data.tar.gz: bfd56ab61b54d239dec59df9bd21551c9bedba4d7161fb0b3c3f6697de050ed8
3
+ metadata.gz: b115debe0015e1be930cd089e3b78d675893e8b1ac9623c89e2db65512d9cbc2
4
+ data.tar.gz: 70d73451c7f0dd67c5371619b452a8235acc0be74a7598cc8a3380e281551115
5
5
  SHA512:
6
- metadata.gz: 8751f6a29f6ac65a48317e9a70f53381fdb18675abfe465a958cc1fd5b13d857affa9715a0522d311a52b936fc84ba194ea271067ab4ea8c180e3c07a2adb417
7
- data.tar.gz: 0e45aed227004e74284bbdfbf9c47a77a91b1b14ea300de4a269e2d4d2256a49345d4c6c07ddd170afbc1aeaba61078f02fef81fb1057deb9cfae9bc0599dfce
6
+ metadata.gz: 80021ad9771ced010c8f19cffb372ac79ac8559a71fcf4ea47a1234d1b7a490cda654c516bdb552b54eeb176d39c1e864e276194b5ab659acb4a2420bf077597
7
+ data.tar.gz: a9a96342df99f70b1b6a773a8549bac045eba77928d69e4c99dedadf3d5a009df08b96ef2c34b16d17cb7ee54c37f27bcc5ff96406ad593a3bb47205992dc1d3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 2.1.0
@@ -4,8 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **result** | **String** | IP Block has been deleted. | |
8
- | **ip_block_id** | **String** | The unique identifier of the IP Block. | |
7
+ | **result** | **String** | IP Block has been deleted. | [optional] |
8
+ | **ip_block_id** | **String** | The unique identifier of the IP Block. | [optional] |
9
9
 
10
10
  ## Example
11
11
 
data/docs/IpBlock.md CHANGED
@@ -4,17 +4,18 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | IP Block identifier. | |
8
- | **location** | **String** | IP Block location ID. Currently this field should be set to `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` or `AUS`. | |
9
- | **cidr_block_size** | **String** | CIDR IP Block Size. Currently this field should be set to either `/31`, `/30`, `/29`, `/28`, `/27`, `/26`, `/25`, `/24`, `/23` or `/22`. | |
10
- | **cidr** | **String** | The IP Block in CIDR notation. | |
11
- | **status** | **String** | The status of the IP Block. Can have one of the following values: `creating` , `assigning` , `error assigning` , `assigned` , `unassigning` , `error unassigning` or `unassigned`. | |
7
+ | **id** | **String** | IP Block identifier. | [optional] |
8
+ | **location** | **String** | IP Block location ID. Currently this field should be set to `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` or `AUS`. | [optional] |
9
+ | **cidr_block_size** | **String** | CIDR IP Block Size. Currently this field should be set to either `/31`, `/30`, `/29`, `/28`, `/27`, `/26`, `/25`, `/24`, `/23` or `/22`. | [optional] |
10
+ | **cidr** | **String** | The IP Block in CIDR notation. | [optional] |
11
+ | **ip_version** | **String** | The IP Version of the block. | [optional] |
12
+ | **status** | **String** | The status of the IP Block. Can have one of the following values: `creating` , `assigning` , `error assigning` , `assigned` , `unassigning` , `error unassigning` or `unassigned`. | [optional] |
12
13
  | **assigned_resource_id** | **String** | ID of the resource assigned to the IP Block. | [optional] |
13
14
  | **assigned_resource_type** | **String** | Type of the resource assigned to the IP Block. | [optional] |
14
15
  | **description** | **String** | The description of the IP Block. | [optional] |
15
16
  | **tags** | [**Array<TagAssignment>**](TagAssignment.md) | The tags assigned if any. | [optional] |
16
- | **is_bring_your_own** | **Boolean** | True if the IP block is a `bring your own` block. | |
17
- | **created_on** | **Time** | Date and time when the IP block was created. | |
17
+ | **is_bring_your_own** | **Boolean** | True if the IP block is a `bring your own` block. | [optional] |
18
+ | **created_on** | **Time** | Date and time when the IP block was created. | [optional] |
18
19
 
19
20
  ## Example
20
21
 
@@ -26,6 +27,7 @@ instance = IpApi::IpBlock.new(
26
27
  location: PHX,
27
28
  cidr_block_size: /30,
28
29
  cidr: 1.1.1.0/31,
30
+ ip_version: V4,
29
31
  status: unassigned,
30
32
  assigned_resource_id: 6047127fed34ecc3ba8402d2,
31
33
  assigned_resource_type: server,
@@ -5,7 +5,8 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **location** | **String** | IP Block location ID. Currently this field should be set to `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` or `AUS`. | |
8
- | **cidr_block_size** | **String** | CIDR IP Block Size. Currently this field should be set to either `/31`, `/30`, `/29` or `/28`. For a larger Block Size contact support. | |
8
+ | **cidr_block_size** | **String** | CIDR IP Block Size. V4 supported sizes: [`/31`, `/30`, `/29` or `/28`]. V6 supported sizes: [`/64`]. For a larger Block Size contact support. | |
9
+ | **ip_version** | **String** | IP Version. This field should be set to `V4` or `V6` | [optional][default to 'V4'] |
9
10
  | **description** | **String** | The description of the IP Block. | [optional] |
10
11
  | **tags** | [**Array<TagAssignmentRequest>**](TagAssignmentRequest.md) | Tags to set to the ip-block. To create a new tag or list all the existing tags that you can use, refer to [Tags API](https://developers.phoenixnap.com/docs/tags/1/overview). | [optional] |
11
12
 
@@ -17,6 +18,7 @@ require 'pnap_ip_api'
17
18
  instance = IpApi::IpBlockCreate.new(
18
19
  location: PHX,
19
20
  cidr_block_size: /30,
21
+ ip_version: V4,
20
22
  description: IP Block #1 used for publicly accessing server #1.,
21
23
  tags: [{"name":"stage","value":"beta"},{"name":"group","value":"discounted"}]
22
24
  )
@@ -66,14 +66,10 @@ module IpApi
66
66
 
67
67
  if attributes.key?(:'result')
68
68
  self.result = attributes[:'result']
69
- else
70
- self.result = nil
71
69
  end
72
70
 
73
71
  if attributes.key?(:'ip_block_id')
74
72
  self.ip_block_id = attributes[:'ip_block_id']
75
- else
76
- self.ip_block_id = nil
77
73
  end
78
74
  end
79
75
 
@@ -82,14 +78,6 @@ module IpApi
82
78
  def list_invalid_properties
83
79
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
80
  invalid_properties = Array.new
85
- if @result.nil?
86
- invalid_properties.push('invalid value for "result", result cannot be nil.')
87
- end
88
-
89
- if @ip_block_id.nil?
90
- invalid_properties.push('invalid value for "ip_block_id", ip_block_id cannot be nil.')
91
- end
92
-
93
81
  invalid_properties
94
82
  end
95
83
 
@@ -97,8 +85,6 @@ module IpApi
97
85
  # @return true if the model is valid
98
86
  def valid?
99
87
  warn '[DEPRECATED] the `valid?` method is obsolete'
100
- return false if @result.nil?
101
- return false if @ip_block_id.nil?
102
88
  true
103
89
  end
104
90
 
@@ -28,6 +28,9 @@ module IpApi
28
28
  # The IP Block in CIDR notation.
29
29
  attr_accessor :cidr
30
30
 
31
+ # The IP Version of the block.
32
+ attr_accessor :ip_version
33
+
31
34
  # The status of the IP Block. Can have one of the following values: `creating` , `assigning` , `error assigning` , `assigned` , `unassigning` , `error unassigning` or `unassigned`.
32
35
  attr_accessor :status
33
36
 
@@ -56,6 +59,7 @@ module IpApi
56
59
  :'location' => :'location',
57
60
  :'cidr_block_size' => :'cidrBlockSize',
58
61
  :'cidr' => :'cidr',
62
+ :'ip_version' => :'ipVersion',
59
63
  :'status' => :'status',
60
64
  :'assigned_resource_id' => :'assignedResourceId',
61
65
  :'assigned_resource_type' => :'assignedResourceType',
@@ -78,6 +82,7 @@ module IpApi
78
82
  :'location' => :'String',
79
83
  :'cidr_block_size' => :'String',
80
84
  :'cidr' => :'String',
85
+ :'ip_version' => :'String',
81
86
  :'status' => :'String',
82
87
  :'assigned_resource_id' => :'String',
83
88
  :'assigned_resource_type' => :'String',
@@ -111,32 +116,26 @@ module IpApi
111
116
 
112
117
  if attributes.key?(:'id')
113
118
  self.id = attributes[:'id']
114
- else
115
- self.id = nil
116
119
  end
117
120
 
118
121
  if attributes.key?(:'location')
119
122
  self.location = attributes[:'location']
120
- else
121
- self.location = nil
122
123
  end
123
124
 
124
125
  if attributes.key?(:'cidr_block_size')
125
126
  self.cidr_block_size = attributes[:'cidr_block_size']
126
- else
127
- self.cidr_block_size = nil
128
127
  end
129
128
 
130
129
  if attributes.key?(:'cidr')
131
130
  self.cidr = attributes[:'cidr']
132
- else
133
- self.cidr = nil
131
+ end
132
+
133
+ if attributes.key?(:'ip_version')
134
+ self.ip_version = attributes[:'ip_version']
134
135
  end
135
136
 
136
137
  if attributes.key?(:'status')
137
138
  self.status = attributes[:'status']
138
- else
139
- self.status = nil
140
139
  end
141
140
 
142
141
  if attributes.key?(:'assigned_resource_id')
@@ -159,14 +158,10 @@ module IpApi
159
158
 
160
159
  if attributes.key?(:'is_bring_your_own')
161
160
  self.is_bring_your_own = attributes[:'is_bring_your_own']
162
- else
163
- self.is_bring_your_own = nil
164
161
  end
165
162
 
166
163
  if attributes.key?(:'created_on')
167
164
  self.created_on = attributes[:'created_on']
168
- else
169
- self.created_on = nil
170
165
  end
171
166
  end
172
167
 
@@ -175,38 +170,10 @@ module IpApi
175
170
  def list_invalid_properties
176
171
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
177
172
  invalid_properties = Array.new
178
- if @id.nil?
179
- invalid_properties.push('invalid value for "id", id cannot be nil.')
180
- end
181
-
182
- if @location.nil?
183
- invalid_properties.push('invalid value for "location", location cannot be nil.')
184
- end
185
-
186
- if @cidr_block_size.nil?
187
- invalid_properties.push('invalid value for "cidr_block_size", cidr_block_size cannot be nil.')
188
- end
189
-
190
- if @cidr.nil?
191
- invalid_properties.push('invalid value for "cidr", cidr cannot be nil.')
192
- end
193
-
194
- if @status.nil?
195
- invalid_properties.push('invalid value for "status", status cannot be nil.')
196
- end
197
-
198
173
  if !@description.nil? && @description.to_s.length > 250
199
174
  invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 250.')
200
175
  end
201
176
 
202
- if @is_bring_your_own.nil?
203
- invalid_properties.push('invalid value for "is_bring_your_own", is_bring_your_own cannot be nil.')
204
- end
205
-
206
- if @created_on.nil?
207
- invalid_properties.push('invalid value for "created_on", created_on cannot be nil.')
208
- end
209
-
210
177
  invalid_properties
211
178
  end
212
179
 
@@ -214,14 +181,7 @@ module IpApi
214
181
  # @return true if the model is valid
215
182
  def valid?
216
183
  warn '[DEPRECATED] the `valid?` method is obsolete'
217
- return false if @id.nil?
218
- return false if @location.nil?
219
- return false if @cidr_block_size.nil?
220
- return false if @cidr.nil?
221
- return false if @status.nil?
222
184
  return false if !@description.nil? && @description.to_s.length > 250
223
- return false if @is_bring_your_own.nil?
224
- return false if @created_on.nil?
225
185
  true
226
186
  end
227
187
 
@@ -248,6 +208,7 @@ module IpApi
248
208
  location == o.location &&
249
209
  cidr_block_size == o.cidr_block_size &&
250
210
  cidr == o.cidr &&
211
+ ip_version == o.ip_version &&
251
212
  status == o.status &&
252
213
  assigned_resource_id == o.assigned_resource_id &&
253
214
  assigned_resource_type == o.assigned_resource_type &&
@@ -266,7 +227,7 @@ module IpApi
266
227
  # Calculates hash code according to all attributes.
267
228
  # @return [Integer] Hash code
268
229
  def hash
269
- [id, location, cidr_block_size, cidr, status, assigned_resource_id, assigned_resource_type, description, tags, is_bring_your_own, created_on].hash
230
+ [id, location, cidr_block_size, cidr, ip_version, status, assigned_resource_id, assigned_resource_type, description, tags, is_bring_your_own, created_on].hash
270
231
  end
271
232
 
272
233
  # Builds the object from hash
@@ -19,9 +19,12 @@ module IpApi
19
19
  # IP Block location ID. Currently this field should be set to `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` or `AUS`.
20
20
  attr_accessor :location
21
21
 
22
- # CIDR IP Block Size. Currently this field should be set to either `/31`, `/30`, `/29` or `/28`. For a larger Block Size contact support.
22
+ # CIDR IP Block Size. V4 supported sizes: [`/31`, `/30`, `/29` or `/28`]. V6 supported sizes: [`/64`]. For a larger Block Size contact support.
23
23
  attr_accessor :cidr_block_size
24
24
 
25
+ # IP Version. This field should be set to `V4` or `V6`
26
+ attr_accessor :ip_version
27
+
25
28
  # The description of the IP Block.
26
29
  attr_accessor :description
27
30
 
@@ -33,6 +36,7 @@ module IpApi
33
36
  {
34
37
  :'location' => :'location',
35
38
  :'cidr_block_size' => :'cidrBlockSize',
39
+ :'ip_version' => :'ipVersion',
36
40
  :'description' => :'description',
37
41
  :'tags' => :'tags'
38
42
  }
@@ -48,6 +52,7 @@ module IpApi
48
52
  {
49
53
  :'location' => :'String',
50
54
  :'cidr_block_size' => :'String',
55
+ :'ip_version' => :'String',
51
56
  :'description' => :'String',
52
57
  :'tags' => :'Array<TagAssignmentRequest>'
53
58
  }
@@ -86,6 +91,12 @@ module IpApi
86
91
  self.cidr_block_size = nil
87
92
  end
88
93
 
94
+ if attributes.key?(:'ip_version')
95
+ self.ip_version = attributes[:'ip_version']
96
+ else
97
+ self.ip_version = 'V4'
98
+ end
99
+
89
100
  if attributes.key?(:'description')
90
101
  self.description = attributes[:'description']
91
102
  end
@@ -148,6 +159,7 @@ module IpApi
148
159
  self.class == o.class &&
149
160
  location == o.location &&
150
161
  cidr_block_size == o.cidr_block_size &&
162
+ ip_version == o.ip_version &&
151
163
  description == o.description &&
152
164
  tags == o.tags
153
165
  end
@@ -161,7 +173,7 @@ module IpApi
161
173
  # Calculates hash code according to all attributes.
162
174
  # @return [Integer] Hash code
163
175
  def hash
164
- [location, cidr_block_size, description, tags].hash
176
+ [location, cidr_block_size, ip_version, description, tags].hash
165
177
  end
166
178
 
167
179
  # Builds the object from hash
@@ -39,6 +39,12 @@ describe IpApi::IpBlockCreate do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "ip_version"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
42
48
  describe 'test attribute "description"' do
43
49
  it 'should work' do
44
50
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -51,6 +51,12 @@ describe IpApi::IpBlock do
51
51
  end
52
52
  end
53
53
 
54
+ describe 'test attribute "ip_version"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
54
60
  describe 'test attribute "status"' do
55
61
  it 'should work' do
56
62
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pnap_ip_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PhoenixNAP
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-13 00:00:00.000000000 Z
11
+ date: 2025-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -97,7 +97,7 @@ licenses:
97
97
  - MPL-2.0
98
98
  metadata:
99
99
  source_code_uri: https://github.com/phoenixnap/ruby-sdk-bmc
100
- post_install_message:
100
+ post_install_message:
101
101
  rdoc_options: []
102
102
  require_paths:
103
103
  - lib
@@ -112,17 +112,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.3.5
116
- signing_key:
115
+ rubygems_version: 3.4.20
116
+ signing_key:
117
117
  specification_version: 4
118
118
  summary: IP Addresses API Ruby Gem
119
119
  test_files:
120
120
  - spec/api/ip_blocks_api_spec.rb
121
- - spec/models/delete_ip_block_result_spec.rb
122
- - spec/models/ip_block_create_spec.rb
123
121
  - spec/models/error_spec.rb
124
- - spec/models/ip_block_spec.rb
125
122
  - spec/models/tag_assignment_request_spec.rb
126
- - spec/models/ip_block_patch_spec.rb
123
+ - spec/models/ip_block_create_spec.rb
124
+ - spec/models/ip_block_spec.rb
127
125
  - spec/models/tag_assignment_spec.rb
126
+ - spec/models/delete_ip_block_result_spec.rb
127
+ - spec/models/ip_block_patch_spec.rb
128
128
  - spec/spec_helper.rb