Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for updated Reserved IP behavior to existing resources (instance, network_ips) #610

Merged
merged 55 commits into from
Nov 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
1b87e78
added reserved field to InstanceIP struct for IP Reservation response
AniJ98 Aug 22, 2024
311ecfc
Reserved IP resource for handling IP reservation API's
AniJ98 Aug 22, 2024
7fb337e
Added integration test covering multiple scenarios of reserving IP ad…
AniJ98 Aug 22, 2024
1c6a8ab
The fixture files for different scenarios of IP Reservation - EndToEn…
AniJ98 Aug 22, 2024
fd426cc
Updated the fixture files with responses after the user has permissio…
AniJ98 Aug 26, 2024
bed7ce0
Changed the error message to relay invalid token for insufficient per…
AniJ98 Aug 26, 2024
4cc42a6
Updated the error message for Insufficient Permission tests to displa…
AniJ98 Aug 26, 2024
11fd3cb
Made changes to Delete, List, Get, Reserve, EndtoEnd fixtures to rec…
AniJ98 Aug 26, 2024
4d24fd1
changed variable name from id to address to keep it consistent with o…
AniJ98 Aug 29, 2024
a265fd4
Made changes to variable names, achanged logf statements to errorf an…
AniJ98 Aug 29, 2024
49d14a6
changed fixture file names to improve consistency, re-recorded fixtur…
AniJ98 Aug 29, 2024
bd106fa
removed debugging fmt statement
AniJ98 Aug 29, 2024
cd7fa48
Made changes to reserve IP addresses before listing them using fitler…
AniJ98 Sep 3, 2024
d52a33f
uncommenting unaffected tests
AniJ98 Sep 3, 2024
cb81bc2
Made changes to error messages, added mandatory checks and re-recorde…
AniJ98 Sep 5, 2024
456d0f2
Added new middleware system (#571)
ezilber-akamai Sep 3, 2024
1867029
build(deps): bump golang.org/x/oauth2 from 0.22.0 to 0.23.0 (#574)
dependabot[bot] Sep 5, 2024
af6a7bd
build(deps): bump golang.org/x/text from 0.17.0 to 0.18.0 (#575)
dependabot[bot] Sep 5, 2024
b25e83d
new: Add support LKE, Volume, NodeBalancer, and network transfer pric…
lgarber-akamai Sep 6, 2024
3bb8dc0
Add test case for ip limit exceed
AniJ98 Sep 16, 2024
ce34304
add cleanup for TestReservedIPAddresses_ExceedLimit
ykim-akamai Sep 16, 2024
8627e4f
added interactions to fixture and changed the ecpected error message
AniJ98 Sep 16, 2024
663e798
Added note indicating feature is currently not available to all users
AniJ98 Sep 16, 2024
5bb2bc1
Merge branch 'main' into main
AniJ98 Sep 17, 2024
138c163
added support for creating a linode with reserved IP address along wi…
AniJ98 Sep 3, 2024
4b44bd8
Added support for adding additional reserved IP to linodes along with…
AniJ98 Sep 5, 2024
35610a0
added ipv4 field in the InstanceCreateOptions struct
AniJ98 Sep 10, 2024
809b407
moved InstanceReservedIPOptions and the method to AddReservedIPToInsa…
AniJ98 Sep 12, 2024
b559ee8
Split the variants tests of createInstanceWithReservedIP into individ…
AniJ98 Sep 12, 2024
402c77a
Re-recorded fixtures after splitting variants test into individual te…
AniJ98 Sep 12, 2024
30eeda7
added teardown funcitnality to handle accidental instance creations
AniJ98 Sep 13, 2024
8909bd6
removed unnecessary defer keyword from test functions
AniJ98 Sep 13, 2024
9b15909
moved tests related to creating a linode with reserved IP and adding …
AniJ98 Sep 17, 2024
97ccd6b
Removing the sensitive token from the previous commit
AniJ98 Sep 17, 2024
be7b869
Merge pull request #5 from AniJ98/ipreservation-existingendpoints-clean
AniJ98 Sep 17, 2024
ff906e3
Merge branch 'linode:main' into main
AniJ98 Sep 17, 2024
2907529
made changes to maintain consistency and improve readability
AniJ98 Sep 24, 2024
6f8ad3c
Merge branch 'main' into main
zliang-akamai Sep 25, 2024
39323ef
added tests for deletion of linode created with reserved IP address
AniJ98 Sep 30, 2024
c9a70b8
added test for verifying the status of the reserved field when listin…
AniJ98 Sep 30, 2024
2752177
Added support for existing resources to support reserved IP feature a…
AniJ98 Oct 7, 2024
30435e2
Updated fixtures with required interactions for reserved IP feature a…
AniJ98 Oct 7, 2024
25bcf81
changed the name of the test function to keeop it more succinct
AniJ98 Oct 7, 2024
2157efd
Merge branch 'linode:main' into main
AniJ98 Oct 8, 2024
62d2550
setting reserved as an optional field
AniJ98 Oct 29, 2024
4789287
Made change to make reserved a part of the update IP address function…
AniJ98 Nov 8, 2024
968f780
Merge pull request #6 from AniJ98/ipreservation-remainingendpoints
AniJ98 Nov 8, 2024
8a19216
Merge branch 'linode:main' into main
AniJ98 Nov 8, 2024
2181fb1
Merge branch 'main' into main
AniJ98 Nov 8, 2024
b716ca2
Removed test for exceeding IP MAX and changed the type of the reserve…
AniJ98 Nov 14, 2024
e809bf8
Merge branch 'main' into main
AniJ98 Nov 14, 2024
0fbe6ff
Merge pull request #7 from AniJ98/ipreservation-remainingendpoints
AniJ98 Nov 14, 2024
73a1b3b
Merge branch 'main' into main
AniJ98 Nov 18, 2024
4af2cc7
Changed struct name from LinodeReserveIPOptions to AllocateReserveIPO…
AniJ98 Nov 18, 2024
0a45fcd
Merge pull request #8 from AniJ98/ipreservation-remainingendpoints
AniJ98 Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changed the error message to relay invalid token for insufficient per…
…mission tests
AniJ98 committed Sep 16, 2024

Verified

This commit was signed with the committer’s verified signature.
commit bed7ce0a16c484da22b2cbc2ecade3dde156b488
Original file line number Diff line number Diff line change
@@ -14,57 +14,36 @@ interactions:
url: https://api.linode.com/v4beta/networking/reserved/ips?page=1
method: GET
response:
body: '{"data": [{"address": "66.228.35.140", "gateway": "66.228.35.1", "subnet_mask":
"255.255.255.0", "prefix": 24, "type": "ipv4", "public": true, "rdns": "66-228-35-140.ip.linodeusercontent.com",
"linode_id": null, "region": "us-east", "vpc_nat_1_1": null, "reserved": true}],
"page": 1, "pages": 1, "results": 1}'
body: '{"errors": [{"reason": "Invalid Token"}]}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Length:
- "310"
Content-Security-Policy:
- default-src 'none'
- "41"
Content-Type:
- application/json
Expires:
- Mon, 26 Aug 2024 18:31:02 GMT
- Mon, 26 Aug 2024 18:41:47 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- ips:read_only
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "10"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
- unknown
status: 401 Unauthorized
code: 401
duration: ""
- request:
body: '{"region":"us-east"}'
@@ -79,55 +58,32 @@ interactions:
url: https://api.linode.com/v4beta/networking/reserved/ips
method: POST
response:
body: '{"address": "45.33.69.212", "gateway": "45.33.69.1", "subnet_mask": "255.255.255.0",
"prefix": 24, "type": "ipv4", "public": true, "rdns": "45-33-69-212.ip.linodeusercontent.com",
"linode_id": null, "region": "us-east", "vpc_nat_1_1": null, "reserved": true}'
body: '{"errors": [{"reason": "Invalid Token"}]}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Length:
- "258"
Content-Security-Policy:
- default-src 'none'
- "41"
Content-Type:
- application/json
Expires:
- Mon, 26 Aug 2024 18:31:08 GMT
- Mon, 26 Aug 2024 18:41:48 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- ips:read_write
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "400"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
- unknown
status: 401 Unauthorized
code: 401
duration: ""
- request:
body: ""
@@ -142,26 +98,24 @@ interactions:
url: https://api.linode.com/v4beta/networking/reserved/ips/172.28.3.4
method: GET
response:
body: '{"errors": [{"reason": "Not found"}]}'
body: '{"errors": [{"reason": "Invalid Token"}]}'
headers:
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Length:
- "37"
- "41"
Content-Type:
- application/json
Expires:
- Mon, 26 Aug 2024 18:31:09 GMT
- Mon, 26 Aug 2024 18:41:48 GMT
Pragma:
- no-cache
Vary:
@@ -171,11 +125,9 @@ interactions:
X-Frame-Options:
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "10"
status: 404 Not Found
code: 404
- unknown
status: 401 Unauthorized
code: 401
duration: ""
- request:
body: ""
@@ -190,36 +142,32 @@ interactions:
url: https://api.linode.com/v4beta/networking/reserved/ips/172.28.3.4
method: DELETE
response:
body: '{"errors": [{"reason": "Not found"}]}'
body: '{"errors": [{"reason": "Invalid Token"}]}'
headers:
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Length:
- "37"
- "41"
Content-Type:
- application/json
Expires:
- Mon, 26 Aug 2024 18:31:09 GMT
- Mon, 26 Aug 2024 18:41:48 GMT
Pragma:
- no-cache
X-Accepted-Oauth-Scopes:
- ips:read_write
X-Frame-Options:
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "10"
status: 404 Not Found
code: 404
- unknown
status: 401 Unauthorized
code: 401
duration: ""