Skip to content

Commit 2377930

Browse files
authored
fix: use new instance api url (#32)
1 parent 540d495 commit 2377930

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

scaleway/apis/api_compute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
REGIONS = {
1414
'par1': {
15-
'url': 'https://cp-par1.scaleway.com/',
15+
'url': 'https://api-fr-par.scaleway.com/instance/v1/zones/fr-par-1/',
1616
},
1717
'ams1': {
18-
'url': 'https://cp-ams1.scaleway.com/',
18+
'url': 'https://api-nl-ams.scaleway.com/instance/v1/zones/nl-ams-1/',
1919
}
2020
}
2121

scaleway/tests/apis/test_api_compute.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ class TestComputeAPI(unittest.TestCase):
77

88
def test_set_region(self):
99
# Default region: par1.
10-
self.assertEqual(ComputeAPI().base_url,
11-
'https://cp-par1.scaleway.com/')
10+
self.assertEqual(
11+
ComputeAPI().base_url,
12+
'https://api-fr-par.scaleway.com/instance/v1/zones/fr-par-1/'
13+
)
1214

1315
# Explicit "region".
14-
self.assertEqual(ComputeAPI(region='par1').base_url,
15-
'https://cp-par1.scaleway.com/')
16+
self.assertEqual(
17+
ComputeAPI(region='par1').base_url,
18+
'https://api-fr-par.scaleway.com/instance/v1/zones/fr-par-1/'
19+
)
1620

17-
self.assertEqual(ComputeAPI(region='ams1').base_url,
18-
'https://cp-ams1.scaleway.com/')
21+
self.assertEqual(
22+
ComputeAPI(region='ams1').base_url,
23+
'https://api-nl-ams.scaleway.com/instance/v1/zones/nl-ams-1/'
24+
)
1925

2026
# Explicit "base_url"
2127
self.assertEqual(ComputeAPI(base_url='http://whatever').base_url,

0 commit comments

Comments
 (0)