-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from Charliekenney23/feat/firewall-rules
add firewall rules methods
- Loading branch information
Showing
6 changed files
with
577 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: '{"label":"label","rules":{"inbound":[{"ports":"22","protocol":"TCP","addresses":{"ipv4":["10.20.30.40/0"],"ipv6":["1234::5678/0"]}}],"outbound":[{"ports":"22","protocol":"TCP","addresses":{"ipv4":["10.20.30.40/0"],"ipv6":["1234::5678/0"]}}]},"tags":["testing"],"devices":{}}' | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- linodego 0.12.0 https://github.com/linode/linodego | ||
url: https://api.linode.com/v4beta/networking/firewalls | ||
method: POST | ||
response: | ||
body: '{"id": 217, "label": "label", "created": "2018-01-02T03:04:05", "updated": | ||
"2018-01-02T03:04:05", "status": "enabled", "rules": {"inbound": [{"ports": | ||
"22", "protocol": "TCP", "addresses": {"ipv4": ["10.20.30.40/0"], "ipv6": ["1234::5678/0"]}}], | ||
"outbound": [{"ports": "22", "protocol": "TCP", "addresses": {"ipv4": ["10.20.30.40/0"], | ||
"ipv6": ["1234::5678/0"]}}]}, "tags": ["testing"]}' | ||
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 | ||
Cache-Control: | ||
- private, max-age=60, s-maxage=60 | ||
Content-Length: | ||
- "363" | ||
Content-Security-Policy: | ||
- default-src 'none' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Tue, 19 May 2020 16:26:33 GMT | ||
Retry-After: | ||
- "119" | ||
Server: | ||
- nginx | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Authorization, X-Filter | ||
X-Accepted-Oauth-Scopes: | ||
- firewall:read_write | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
- DENY | ||
X-Oauth-Scopes: | ||
- '*' | ||
X-Ratelimit-Limit: | ||
- "1600" | ||
X-Ratelimit-Remaining: | ||
- "1599" | ||
X-Ratelimit-Reset: | ||
- "1589905713" | ||
X-Spec-Version: | ||
- 4.65.1 | ||
X-Xss-Protection: | ||
- 1; mode=block | ||
status: 200 OK | ||
code: 200 | ||
duration: "" | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- linodego 0.12.0 https://github.com/linode/linodego | ||
url: https://api.linode.com/v4beta/networking/firewalls/217/rules | ||
method: GET | ||
response: | ||
body: '{"inbound": [{"ports": "22", "protocol": "TCP", "addresses": {"ipv4": ["10.20.30.40/0"], | ||
"ipv6": ["1234::5678/0"]}}], "outbound": [{"ports": "22", "protocol": "TCP", "addresses": | ||
{"ipv4": ["10.20.30.40/0"], "ipv6": ["1234::5678/0"]}}]}' | ||
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 | ||
Cache-Control: | ||
- private, max-age=0, s-maxage=0, no-cache, no-store | ||
- private, max-age=60, s-maxage=60 | ||
Content-Length: | ||
- "213" | ||
Content-Security-Policy: | ||
- default-src 'none' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Tue, 19 May 2020 16:26:33 GMT | ||
Retry-After: | ||
- "119" | ||
Server: | ||
- nginx | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Authorization, X-Filter | ||
- Authorization, X-Filter | ||
X-Accepted-Oauth-Scopes: | ||
- firewall:read_only | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
- DENY | ||
X-Oauth-Scopes: | ||
- '*' | ||
X-Ratelimit-Limit: | ||
- "1600" | ||
X-Ratelimit-Remaining: | ||
- "1598" | ||
X-Ratelimit-Reset: | ||
- "1589905713" | ||
X-Spec-Version: | ||
- 4.65.1 | ||
X-Xss-Protection: | ||
- 1; mode=block | ||
status: 200 OK | ||
code: 200 | ||
duration: "" | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- linodego 0.12.0 https://github.com/linode/linodego | ||
url: https://api.linode.com/v4beta/networking/firewalls/217 | ||
method: DELETE | ||
response: | ||
body: '{}' | ||
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 | ||
Cache-Control: | ||
- private, max-age=60, s-maxage=60 | ||
Content-Length: | ||
- "2" | ||
Content-Security-Policy: | ||
- default-src 'none' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Tue, 19 May 2020 16:26:33 GMT | ||
Retry-After: | ||
- "118" | ||
Server: | ||
- nginx | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Authorization, X-Filter | ||
X-Accepted-Oauth-Scopes: | ||
- firewall:read_write | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
- DENY | ||
X-Oauth-Scopes: | ||
- '*' | ||
X-Ratelimit-Limit: | ||
- "1600" | ||
X-Ratelimit-Remaining: | ||
- "1597" | ||
X-Ratelimit-Reset: | ||
- "1589905712" | ||
X-Spec-Version: | ||
- 4.65.1 | ||
X-Xss-Protection: | ||
- 1; mode=block | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
Oops, something went wrong.