Skip to content

Commit

Permalink
adding GetVLANIPAMAddress helper function (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
jriddle-linode authored Jul 6, 2022
1 parent bf1276f commit f88620e
Show file tree
Hide file tree
Showing 6 changed files with 401 additions and 29 deletions.
File renamed without changes.
File renamed without changes.
316 changes: 316 additions & 0 deletions test/integration/fixtures/TestVLANs_GetIPAMAddress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,316 @@
---
version: 1
interactions:
- request:
body: '{"region":"us-southeast","type":"g6-nanode-1","label":"linodego-testing-vlan-ipamaddress","root_pass":"R34lBAdP455","image":"linode/debian9","interfaces":[{"ipam_address":"10.0.0.1/24","label":"linodego-really-cool-vlan-ipamaddress","purpose":"vlan"}],"booted":true}'
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/linode/instances
method: POST
response:
body: '{"id": 37252898, "label": "linodego-testing-vlan-ipamaddress", "group":
"", "status": "provisioning", "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05",
"type": "g6-nanode-1", "ipv4": ["139.144.29.173"], "ipv6": "1234::5678/128",
"image": "linode/debian9", "region": "us-southeast", "specs": {"disk": 25600,
"memory": 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu":
90, "network_in": 10, "network_out": 10, "transfer_quota": 80, "io": 10000},
"backups": {"enabled": false, "schedule": {"day": null, "window": null}, "last_successful":
null}, "hypervisor": "kvm", "watchdog_enabled": true, "tags": []}'
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:
- "655"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Server:
- nginx
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- linodes:read_write
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
duration: ""
- request:
body: ""
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/linode/instances/37252898
method: GET
response:
body: '{"id": 37252898, "label": "linodego-testing-vlan-ipamaddress", "group":
"", "status": "booting", "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05",
"type": "g6-nanode-1", "ipv4": ["139.144.29.173"], "ipv6": "1234::5678/128",
"image": "linode/debian9", "region": "us-southeast", "specs": {"disk": 25600,
"memory": 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu":
90, "network_in": 10, "network_out": 10, "transfer_quota": 80, "io": 10000},
"backups": {"enabled": false, "schedule": {"day": null, "window": null}, "last_successful":
null}, "hypervisor": "kvm", "watchdog_enabled": true, "tags": []}'
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:
- "650"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Server:
- nginx
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- linodes:read_only
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "800"
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/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/linode/instances/37252898
method: GET
response:
body: '{"id": 37252898, "label": "linodego-testing-vlan-ipamaddress", "group":
"", "status": "running", "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05",
"type": "g6-nanode-1", "ipv4": ["139.144.29.173"], "ipv6": "1234::5678/128",
"image": "linode/debian9", "region": "us-southeast", "specs": {"disk": 25600,
"memory": 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu":
90, "network_in": 10, "network_out": 10, "transfer_quota": 80, "io": 10000},
"backups": {"enabled": false, "schedule": {"day": null, "window": null}, "last_successful":
null}, "hypervisor": "kvm", "watchdog_enabled": true, "tags": []}'
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:
- "650"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Server:
- nginx
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- linodes:read_only
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "800"
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/dev https://github.com/linode/linodego
X-Filter:
- '{"interfaces":"linodego-really-cool-vlan-ipamaddress"}'
url: https://api.linode.com/v4beta/linode/instances/37252898/configs
method: GET
response:
body: '{"data": [{"id": 39674671, "label": "My Debian 9 Disk Profile", "helpers":
{"updatedb_disabled": true, "distro": true, "modules_dep": true, "network":
true, "devtmpfs_automount": true}, "kernel": "linode/grub2", "comments": "",
"memory_limit": 0, "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05",
"root_device": "/dev/sda", "devices": {"sda": {"disk_id": 74805750, "volume_id":
null}, "sdb": {"disk_id": 74805751, "volume_id": null}, "sdc": null, "sdd":
null, "sde": null, "sdf": null, "sdg": null, "sdh": null}, "initrd": null, "run_level":
"default", "virt_mode": "paravirt", "interfaces": [{"purpose": "vlan", "ipam_address":
"10.0.0.1/24", "label": "linodego-really-cool-vlan-ipamaddress"}]}], "page":
1, "pages": 1, "results": 1}'
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:
- "752"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Server:
- nginx
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- linodes:read_only
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "800"
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/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/linode/instances/37252898
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
Server:
- nginx
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- linodes:read_write
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "800"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
duration: ""
Loading

0 comments on commit f88620e

Please sign in to comment.