Skip to content

Commit 7e40e2b

Browse files
authored
use cloudscale-sdk 0.4.0 (#29)
1 parent c4dad46 commit 7e40e2b

11 files changed

Lines changed: 125 additions & 125 deletions

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cloudscale-sdk>=0.3.0
1+
cloudscale-sdk>=0.4.0
22
click>=7.0.0
33
tabulate
44
pygments

tests/test_flavor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cloudscale import CLOUDSCALE_API_ENDPOINT
1+
from cloudscale import CLOUDSCALE_API_URL
22
from cloudscale_cli.cli import cli
33
import responses
44
import click
@@ -23,12 +23,12 @@
2323
def test_flavor_get_all():
2424
responses.add(
2525
responses.GET,
26-
CLOUDSCALE_API_ENDPOINT + '/flavors',
26+
CLOUDSCALE_API_URL + '/flavors',
2727
json=[FLAVOR_RESP],
2828
status=200)
2929
responses.add(
3030
responses.GET,
31-
CLOUDSCALE_API_ENDPOINT + '/flavors',
31+
CLOUDSCALE_API_URL + '/flavors',
3232
json={},
3333
status=500)
3434

tests/test_floating_ip.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cloudscale import CLOUDSCALE_API_ENDPOINT
1+
from cloudscale import CLOUDSCALE_API_URL
22
from cloudscale_cli.cli import cli
33
import responses
44
import click
@@ -27,12 +27,12 @@ def test_floating_ip_get_all():
2727
network_id = "192.0.2.123"
2828
responses.add(
2929
responses.GET,
30-
CLOUDSCALE_API_ENDPOINT + '/floating-ips',
30+
CLOUDSCALE_API_URL + '/floating-ips',
3131
json=[FLOATING_IP_RESP],
3232
status=200)
3333
responses.add(
3434
responses.GET,
35-
CLOUDSCALE_API_ENDPOINT + '/floating-ips',
35+
CLOUDSCALE_API_URL + '/floating-ips',
3636
json={},
3737
status=500)
3838

@@ -57,12 +57,12 @@ def test_floating_ip_get_by_uuid():
5757
network_id = "192.0.2.123"
5858
responses.add(
5959
responses.GET,
60-
CLOUDSCALE_API_ENDPOINT + '/floating-ips/' + network_id,
60+
CLOUDSCALE_API_URL + '/floating-ips/' + network_id,
6161
json=FLOATING_IP_RESP,
6262
status=200)
6363
responses.add(
6464
responses.GET,
65-
CLOUDSCALE_API_ENDPOINT + '/floating-ips/' + network_id,
65+
CLOUDSCALE_API_URL + '/floating-ips/' + network_id,
6666
json={},
6767
status=500)
6868

@@ -87,21 +87,21 @@ def test_floating_ip_delete():
8787
network_id = "192.0.2.123"
8888
responses.add(
8989
responses.GET,
90-
CLOUDSCALE_API_ENDPOINT + '/floating-ips/' + network_id,
90+
CLOUDSCALE_API_URL + '/floating-ips/' + network_id,
9191
json=FLOATING_IP_RESP,
9292
status=200)
9393
responses.add(
9494
responses.GET,
95-
CLOUDSCALE_API_ENDPOINT + '/floating-ips/unknown',
95+
CLOUDSCALE_API_URL + '/floating-ips/unknown',
9696
json=FLOATING_IP_RESP,
9797
status=200)
9898
responses.add(
9999
responses.DELETE,
100-
CLOUDSCALE_API_ENDPOINT + '/floating-ips/' + network_id,
100+
CLOUDSCALE_API_URL + '/floating-ips/' + network_id,
101101
status=204)
102102
responses.add(
103103
responses.DELETE,
104-
CLOUDSCALE_API_ENDPOINT + '/floating-ips/unknown',
104+
CLOUDSCALE_API_URL + '/floating-ips/unknown',
105105
json={
106106
"detail": "Not found."
107107
},
@@ -139,12 +139,12 @@ def test_floating_ip_create():
139139
server_uuid = "47cec963-fcd2-482f-bdb6-24461b2d47b1"
140140
responses.add(
141141
responses.POST,
142-
CLOUDSCALE_API_ENDPOINT + '/floating-ips',
142+
CLOUDSCALE_API_URL + '/floating-ips',
143143
json=FLOATING_IP_RESP,
144144
status=201)
145145
responses.add(
146146
responses.POST,
147-
CLOUDSCALE_API_ENDPOINT + '/floating-ips',
147+
CLOUDSCALE_API_URL + '/floating-ips',
148148
json=FLOATING_IP_RESP,
149149
status=500)
150150

@@ -187,17 +187,17 @@ def test_floating_ip_update():
187187
reverse_ptr = "192.0.2.123.cust.cloudscale.ch"
188188
responses.add(
189189
responses.PATCH,
190-
CLOUDSCALE_API_ENDPOINT + '/floating-ips/' + network_id,
190+
CLOUDSCALE_API_URL + '/floating-ips/' + network_id,
191191
json=FLOATING_IP_RESP,
192192
status=204)
193193
responses.add(
194194
responses.GET,
195-
CLOUDSCALE_API_ENDPOINT + '/floating-ips/' + network_id,
195+
CLOUDSCALE_API_URL + '/floating-ips/' + network_id,
196196
json=FLOATING_IP_RESP,
197197
status=200)
198198
responses.add(
199199
responses.PATCH,
200-
CLOUDSCALE_API_ENDPOINT + '/floating-ips/' + network_id,
200+
CLOUDSCALE_API_URL + '/floating-ips/' + network_id,
201201
json={},
202202
status=500)
203203

tests/test_image.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cloudscale import CLOUDSCALE_API_ENDPOINT
1+
from cloudscale import CLOUDSCALE_API_URL
22
from cloudscale_cli.cli import cli
33
import responses
44
import click
@@ -23,12 +23,12 @@
2323
def test_image_get_all():
2424
responses.add(
2525
responses.GET,
26-
CLOUDSCALE_API_ENDPOINT + '/images',
26+
CLOUDSCALE_API_URL + '/images',
2727
json=[IMAGE_RESP],
2828
status=200)
2929
responses.add(
3030
responses.GET,
31-
CLOUDSCALE_API_ENDPOINT + '/images',
31+
CLOUDSCALE_API_URL + '/images',
3232
json={},
3333
status=500)
3434

tests/test_network.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cloudscale import CLOUDSCALE_API_ENDPOINT
1+
from cloudscale import CLOUDSCALE_API_URL
22
from cloudscale_cli.cli import cli
33
import responses
44
import click
@@ -27,12 +27,12 @@
2727
def test_network_get_all():
2828
responses.add(
2929
responses.GET,
30-
CLOUDSCALE_API_ENDPOINT + '/networks',
30+
CLOUDSCALE_API_URL + '/networks',
3131
json=[NETWORK_RESP],
3232
status=200)
3333
responses.add(
3434
responses.GET,
35-
CLOUDSCALE_API_ENDPOINT + '/networks',
35+
CLOUDSCALE_API_URL + '/networks',
3636
json={},
3737
status=500)
3838

@@ -57,12 +57,12 @@ def test_network_get_by_uuid():
5757
uuid = "2db69ba3-1864-4608-853a-0771b6885a3a"
5858
responses.add(
5959
responses.GET,
60-
CLOUDSCALE_API_ENDPOINT + '/networks/' + uuid,
60+
CLOUDSCALE_API_URL + '/networks/' + uuid,
6161
json=NETWORK_RESP,
6262
status=200)
6363
responses.add(
6464
responses.GET,
65-
CLOUDSCALE_API_ENDPOINT + '/networks/' + uuid,
65+
CLOUDSCALE_API_URL + '/networks/' + uuid,
6666
json={},
6767
status=500)
6868

@@ -87,21 +87,21 @@ def test_network_delete():
8787
uuid = "2db69ba3-1864-4608-853a-0771b6885a3a"
8888
responses.add(
8989
responses.GET,
90-
CLOUDSCALE_API_ENDPOINT + '/networks/' + uuid,
90+
CLOUDSCALE_API_URL + '/networks/' + uuid,
9191
json=NETWORK_RESP,
9292
status=200)
9393
responses.add(
9494
responses.GET,
95-
CLOUDSCALE_API_ENDPOINT + '/networks/unknown',
95+
CLOUDSCALE_API_URL + '/networks/unknown',
9696
json=NETWORK_RESP,
9797
status=200)
9898
responses.add(
9999
responses.DELETE,
100-
CLOUDSCALE_API_ENDPOINT + '/networks/' + uuid,
100+
CLOUDSCALE_API_URL + '/networks/' + uuid,
101101
status=204)
102102
responses.add(
103103
responses.DELETE,
104-
CLOUDSCALE_API_ENDPOINT + '/networks/unknown',
104+
CLOUDSCALE_API_URL + '/networks/unknown',
105105
json={
106106
"detail": "Not found."
107107
},
@@ -139,12 +139,12 @@ def test_network_create():
139139

140140
responses.add(
141141
responses.POST,
142-
CLOUDSCALE_API_ENDPOINT + '/networks',
142+
CLOUDSCALE_API_URL + '/networks',
143143
json=NETWORK_RESP,
144144
status=201)
145145
responses.add(
146146
responses.POST,
147-
CLOUDSCALE_API_ENDPOINT + '/networks',
147+
CLOUDSCALE_API_URL + '/networks',
148148
json={},
149149
status=500)
150150

@@ -173,17 +173,17 @@ def test_network_update():
173173
name = "my-network-name"
174174
responses.add(
175175
responses.PATCH,
176-
CLOUDSCALE_API_ENDPOINT + '/networks/' + uuid,
176+
CLOUDSCALE_API_URL + '/networks/' + uuid,
177177
json=NETWORK_RESP,
178178
status=204)
179179
responses.add(
180180
responses.GET,
181-
CLOUDSCALE_API_ENDPOINT + '/networks/' + uuid,
181+
CLOUDSCALE_API_URL + '/networks/' + uuid,
182182
json=NETWORK_RESP,
183183
status=200)
184184
responses.add(
185185
responses.PATCH,
186-
CLOUDSCALE_API_ENDPOINT + '/networks/' + uuid,
186+
CLOUDSCALE_API_URL + '/networks/' + uuid,
187187
json={},
188188
status=500)
189189

tests/test_objects_user.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cloudscale import CLOUDSCALE_API_ENDPOINT
1+
from cloudscale import CLOUDSCALE_API_URL
22
from cloudscale_cli.cli import cli
33
import responses
44
import click
@@ -23,17 +23,17 @@
2323
def test_objects_user_get_all():
2424
responses.add(
2525
responses.GET,
26-
CLOUDSCALE_API_ENDPOINT + '/objects-users',
26+
CLOUDSCALE_API_URL + '/objects-users',
2727
json=[OBJECTS_USER_RESP],
2828
status=200)
2929
responses.add(
3030
responses.GET,
31-
CLOUDSCALE_API_ENDPOINT + '/objects-users?tag:project=apollo',
31+
CLOUDSCALE_API_URL + '/objects-users?tag:project=apollo',
3232
json=[OBJECTS_USER_RESP],
3333
status=200)
3434
responses.add(
3535
responses.GET,
36-
CLOUDSCALE_API_ENDPOINT + '/objects-users',
36+
CLOUDSCALE_API_URL + '/objects-users',
3737
json={},
3838
status=500)
3939

@@ -67,12 +67,12 @@ def test_objects_user_get_by_uuid():
6767
uuid = "6fe39134bf4178747eebc429f82cfafdd08891d4279d0d899bc4012db1db6a15"
6868
responses.add(
6969
responses.GET,
70-
CLOUDSCALE_API_ENDPOINT + '/objects-users/' + uuid,
70+
CLOUDSCALE_API_URL + '/objects-users/' + uuid,
7171
json=OBJECTS_USER_RESP,
7272
status=200)
7373
responses.add(
7474
responses.GET,
75-
CLOUDSCALE_API_ENDPOINT + '/objects-users/unknown',
75+
CLOUDSCALE_API_URL + '/objects-users/unknown',
7676
json={},
7777
status=404)
7878

@@ -98,21 +98,21 @@ def test_objects_user_delete():
9898
uuid = "6fe39134bf4178747eebc429f82cfafdd08891d4279d0d899bc4012db1db6a15"
9999
responses.add(
100100
responses.GET,
101-
CLOUDSCALE_API_ENDPOINT + '/objects-users/' + uuid,
101+
CLOUDSCALE_API_URL + '/objects-users/' + uuid,
102102
json=OBJECTS_USER_RESP,
103103
status=200)
104104
responses.add(
105105
responses.GET,
106-
CLOUDSCALE_API_ENDPOINT + '/objects-users/unknown',
106+
CLOUDSCALE_API_URL + '/objects-users/unknown',
107107
json=OBJECTS_USER_RESP,
108108
status=200)
109109
responses.add(
110110
responses.DELETE,
111-
CLOUDSCALE_API_ENDPOINT + '/objects-users/' + uuid,
111+
CLOUDSCALE_API_URL + '/objects-users/' + uuid,
112112
status=204)
113113
responses.add(
114114
responses.DELETE,
115-
CLOUDSCALE_API_ENDPOINT + '/objects-users/unknown',
115+
CLOUDSCALE_API_URL + '/objects-users/unknown',
116116
json={},
117117
status=404)
118118

@@ -147,22 +147,22 @@ def test_objects_user_create():
147147

148148
responses.add(
149149
responses.POST,
150-
CLOUDSCALE_API_ENDPOINT + '/objects-users',
150+
CLOUDSCALE_API_URL + '/objects-users',
151151
json=OBJECTS_USER_RESP,
152152
status=201)
153153
responses.add(
154154
responses.POST,
155-
CLOUDSCALE_API_ENDPOINT + '/objects-users',
155+
CLOUDSCALE_API_URL + '/objects-users',
156156
json={},
157157
status=500)
158158
responses.add(
159159
responses.POST,
160-
CLOUDSCALE_API_ENDPOINT + '/objects-users',
160+
CLOUDSCALE_API_URL + '/objects-users',
161161
json=OBJECTS_USER_RESP,
162162
status=201)
163163
responses.add(
164164
responses.POST,
165-
CLOUDSCALE_API_ENDPOINT + '/objects-users',
165+
CLOUDSCALE_API_URL + '/objects-users',
166166
json={},
167167
status=500)
168168

@@ -190,17 +190,17 @@ def test_objects_user_update():
190190
display_name = "alan"
191191
responses.add(
192192
responses.PATCH,
193-
CLOUDSCALE_API_ENDPOINT + '/objects-users/' + uuid,
193+
CLOUDSCALE_API_URL + '/objects-users/' + uuid,
194194
json=OBJECTS_USER_RESP,
195195
status=204)
196196
responses.add(
197197
responses.GET,
198-
CLOUDSCALE_API_ENDPOINT + '/objects-users/' + uuid,
198+
CLOUDSCALE_API_URL + '/objects-users/' + uuid,
199199
json=OBJECTS_USER_RESP,
200200
status=200)
201201
responses.add(
202202
responses.PATCH,
203-
CLOUDSCALE_API_ENDPOINT + '/objects-users/unknown',
203+
CLOUDSCALE_API_URL + '/objects-users/unknown',
204204
json={},
205205
status=404)
206206

tests/test_region.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cloudscale import CLOUDSCALE_API_ENDPOINT
1+
from cloudscale import CLOUDSCALE_API_URL
22
from cloudscale_cli.cli import cli
33
import responses
44
import click
@@ -18,12 +18,12 @@
1818
def test_region_get_all():
1919
responses.add(
2020
responses.GET,
21-
CLOUDSCALE_API_ENDPOINT + '/regions',
21+
CLOUDSCALE_API_URL + '/regions',
2222
json=[REGION_RESP],
2323
status=200)
2424
responses.add(
2525
responses.GET,
26-
CLOUDSCALE_API_ENDPOINT + '/regions',
26+
CLOUDSCALE_API_URL + '/regions',
2727
json={},
2828
status=500)
2929

0 commit comments

Comments
 (0)