Skip to content

Commit 48e248d

Browse files
Merge pull request #296 from ezilber-akamai/TPT-1748
Added support for label property on regions
2 parents 6b34ff0 + b2ea19a commit 48e248d

File tree

2 files changed

+48
-38
lines changed

2 files changed

+48
-38
lines changed

regions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ type Region struct {
1919
Capabilities []string `json:"capabilities"`
2020
Status string `json:"status"`
2121
Resolvers RegionResolvers `json:"resolvers"`
22+
Label string `json:"label"`
2223
}
2324

2425
// RegionResolvers contains the DNS resolvers of a region

test/integration/fixtures/TestRegions_List.yaml

Lines changed: 47 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,56 +14,65 @@ interactions:
1414
url: https://api.linode.com/v4beta/regions
1515
method: GET
1616
response:
17-
body: '{"data": [{"id": "ap-west", "country": "in", "capabilities": ["Linodes",
18-
"NodeBalancers", "Block Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall",
17+
body: '{"data": [{"id": "ap-west", "label": "Mumbai, IN", "country": "in", "capabilities":
18+
["Linodes", "NodeBalancers", "Block Storage", "GPU Linodes", "Kubernetes", "Cloud
19+
Firewall", "Vlans", "Block Storage Migrations", "Managed Databases"], "status":
20+
"ok", "resolvers": {"ipv4": "172.105.34.5,172.105.35.5,172.105.36.5,172.105.37.5,172.105.38.5,172.105.39.5,172.105.40.5,172.105.41.5,172.105.42.5,172.105.43.5",
21+
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
22+
{"id": "ca-central", "label": "Toronto, CA", "country": "ca", "capabilities":
23+
["Linodes", "NodeBalancers", "Block Storage", "Kubernetes", "Cloud Firewall",
1924
"Vlans", "Block Storage Migrations", "Managed Databases"], "status": "ok", "resolvers":
20-
{"ipv4": "172.105.34.5,172.105.35.5,172.105.36.5,172.105.37.5,172.105.38.5,172.105.39.5,172.105.40.5,172.105.41.5,172.105.42.5,172.105.43.5",
25+
{"ipv4": "172.105.0.5,172.105.3.5,172.105.4.5,172.105.5.5,172.105.6.5,172.105.7.5,172.105.8.5,172.105.9.5,172.105.10.5,172.105.11.5",
2126
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
22-
{"id": "ca-central", "country": "ca", "capabilities": ["Linodes", "NodeBalancers",
23-
"Block Storage", "Kubernetes", "Cloud Firewall", "Vlans", "Block Storage Migrations",
24-
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.0.5,172.105.3.5,172.105.4.5,172.105.5.5,172.105.6.5,172.105.7.5,172.105.8.5,172.105.9.5,172.105.10.5,172.105.11.5",
27+
{"id": "ap-southeast", "label": "Sydney, AU", "country": "au", "capabilities":
28+
["Linodes", "NodeBalancers", "Block Storage", "Kubernetes", "Cloud Firewall",
29+
"Vlans", "Block Storage Migrations", "Managed Databases"], "status": "ok", "resolvers":
30+
{"ipv4": "172.105.166.5,172.105.169.5,172.105.168.5,172.105.172.5,172.105.162.5,172.105.170.5,172.105.167.5,172.105.171.5,172.105.181.5,172.105.161.5",
2531
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
26-
{"id": "ap-southeast", "country": "au", "capabilities": ["Linodes", "NodeBalancers",
27-
"Block Storage", "Kubernetes", "Cloud Firewall", "Vlans", "Block Storage Migrations",
28-
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.166.5,172.105.169.5,172.105.168.5,172.105.172.5,172.105.162.5,172.105.170.5,172.105.167.5,172.105.171.5,172.105.181.5,172.105.161.5",
32+
{"id": "us-iad", "label": "Washington, DC", "country": "us", "capabilities":
33+
["Linodes", "NodeBalancers", "Cloud Firewall", "Vlans", "Managed Databases"],
34+
"status": "ok", "resolvers": {"ipv4": "139.144.192.62,139.144.192.60,139.144.192.61,139.144.192.53,139.144.192.54,139.144.192.67,139.144.192.69,139.144.192.66,139.144.192.52,139.144.192.68",
2935
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
30-
{"id": "us-central", "country": "us", "capabilities": ["Linodes", "NodeBalancers",
31-
"Block Storage", "Kubernetes", "Cloud Firewall", "Block Storage Migrations",
32-
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "72.14.179.5,72.14.188.5,173.255.199.5,66.228.53.5,96.126.122.5,96.126.124.5,96.126.127.5,198.58.107.5,198.58.111.5,23.239.24.5",
36+
{"id": "us-central", "label": "Dallas, TX", "country": "us", "capabilities":
37+
["Linodes", "NodeBalancers", "Block Storage", "Kubernetes", "Cloud Firewall",
38+
"Block Storage Migrations", "Managed Databases"], "status": "ok", "resolvers":
39+
{"ipv4": "72.14.179.5,72.14.188.5,173.255.199.5,66.228.53.5,96.126.122.5,96.126.124.5,96.126.127.5,198.58.107.5,198.58.111.5,23.239.24.5",
3340
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
34-
{"id": "us-west", "country": "us", "capabilities": ["Linodes", "NodeBalancers",
35-
"Block Storage", "Kubernetes", "Cloud Firewall", "Block Storage Migrations",
36-
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "173.230.145.5,173.230.147.5,173.230.155.5,173.255.212.5,173.255.219.5,173.255.241.5,173.255.243.5,173.255.244.5,74.207.241.5,74.207.242.5",
41+
{"id": "us-west", "label": "Fremont, CA", "country": "us", "capabilities": ["Linodes",
42+
"NodeBalancers", "Block Storage", "Kubernetes", "Cloud Firewall", "Block Storage
43+
Migrations", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "173.230.145.5,173.230.147.5,173.230.155.5,173.255.212.5,173.255.219.5,173.255.241.5,173.255.243.5,173.255.244.5,74.207.241.5,74.207.242.5",
3744
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
38-
{"id": "us-southeast", "country": "us", "capabilities": ["Linodes", "NodeBalancers",
39-
"Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall",
40-
"Vlans", "Block Storage Migrations", "Managed Databases"], "status": "ok", "resolvers":
41-
{"ipv4": "74.207.231.5,173.230.128.5,173.230.129.5,173.230.136.5,173.230.140.5,66.228.59.5,66.228.62.5,50.116.35.5,50.116.41.5,23.239.18.5",
45+
{"id": "us-southeast", "label": "Atlanta, GA", "country": "us", "capabilities":
46+
["Linodes", "NodeBalancers", "Block Storage", "Object Storage", "GPU Linodes",
47+
"Kubernetes", "Cloud Firewall", "Vlans", "Block Storage Migrations", "Managed
48+
Databases"], "status": "ok", "resolvers": {"ipv4": "74.207.231.5,173.230.128.5,173.230.129.5,173.230.136.5,173.230.140.5,66.228.59.5,66.228.62.5,50.116.35.5,50.116.41.5,23.239.18.5",
4249
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
43-
{"id": "us-east", "country": "us", "capabilities": ["Linodes", "NodeBalancers",
44-
"Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall",
45-
"Bare Metal", "Block Storage Migrations", "Managed Databases"], "status": "ok",
46-
"resolvers": {"ipv4": "66.228.42.5,96.126.106.5,50.116.53.5,50.116.58.5,50.116.61.5,50.116.62.5,66.175.211.5,97.107.133.4,207.192.69.4,207.192.69.5",
50+
{"id": "us-east", "label": "Newark, NJ", "country": "us", "capabilities": ["Linodes",
51+
"NodeBalancers", "Block Storage", "Object Storage", "GPU Linodes", "Kubernetes",
52+
"Cloud Firewall", "Bare Metal", "Block Storage Migrations", "Managed Databases"],
53+
"status": "ok", "resolvers": {"ipv4": "66.228.42.5,96.126.106.5,50.116.53.5,50.116.58.5,50.116.61.5,50.116.62.5,66.175.211.5,97.107.133.4,207.192.69.4,207.192.69.5",
4754
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
48-
{"id": "eu-west", "country": "uk", "capabilities": ["Linodes", "NodeBalancers",
49-
"Block Storage", "Kubernetes", "Cloud Firewall", "Vlans", "Block Storage Migrations",
50-
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "178.79.182.5,176.58.107.5,176.58.116.5,176.58.121.5,151.236.220.5,212.71.252.5,212.71.253.5,109.74.192.20,109.74.193.20,109.74.194.20",
55+
{"id": "eu-west", "label": "London, UK", "country": "uk", "capabilities": ["Linodes",
56+
"NodeBalancers", "Block Storage", "Kubernetes", "Cloud Firewall", "Vlans", "Block
57+
Storage Migrations", "Managed Databases"], "status": "ok", "resolvers": {"ipv4":
58+
"178.79.182.5,176.58.107.5,176.58.116.5,176.58.121.5,151.236.220.5,212.71.252.5,212.71.253.5,109.74.192.20,109.74.193.20,109.74.194.20",
5159
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
52-
{"id": "ap-south", "country": "sg", "capabilities": ["Linodes", "NodeBalancers",
53-
"Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall",
54-
"Vlans", "Block Storage Migrations", "Managed Databases"], "status": "ok", "resolvers":
55-
{"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20",
60+
{"id": "ap-south", "label": "Singapore, SG", "country": "sg", "capabilities":
61+
["Linodes", "NodeBalancers", "Block Storage", "Object Storage", "GPU Linodes",
62+
"Kubernetes", "Cloud Firewall", "Vlans", "Block Storage Migrations", "Managed
63+
Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20",
5664
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
57-
{"id": "eu-central", "country": "de", "capabilities": ["Linodes", "NodeBalancers",
58-
"Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall",
59-
"Vlans", "Block Storage Migrations", "Managed Databases"], "status": "ok", "resolvers":
60-
{"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5",
65+
{"id": "eu-central", "label": "Frankfurt, DE", "country": "de", "capabilities":
66+
["Linodes", "NodeBalancers", "Block Storage", "Object Storage", "GPU Linodes",
67+
"Kubernetes", "Cloud Firewall", "Vlans", "Block Storage Migrations", "Managed
68+
Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5",
6169
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}},
62-
{"id": "ap-northeast", "country": "jp", "capabilities": ["Linodes", "NodeBalancers",
63-
"Block Storage", "Kubernetes", "Cloud Firewall", "Block Storage Migrations",
64-
"Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.66.5,139.162.67.5,139.162.68.5,139.162.69.5,139.162.70.5,139.162.71.5,139.162.72.5,139.162.73.5,139.162.74.5,139.162.75.5",
70+
{"id": "ap-northeast", "label": "Tokyo, JP", "country": "jp", "capabilities":
71+
["Linodes", "NodeBalancers", "Block Storage", "Kubernetes", "Cloud Firewall",
72+
"Block Storage Migrations", "Managed Databases"], "status": "ok", "resolvers":
73+
{"ipv4": "139.162.66.5,139.162.67.5,139.162.68.5,139.162.69.5,139.162.70.5,139.162.71.5,139.162.72.5,139.162.73.5,139.162.74.5,139.162.75.5",
6574
"ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}}],
66-
"page": 1, "pages": 1, "results": 11}'
75+
"page": 1, "pages": 1, "results": 12}'
6776
headers:
6877
Access-Control-Allow-Credentials:
6978
- "true"

0 commit comments

Comments
 (0)