Skip to content

Commit 1bacb4c

Browse files
authored
Merge pull request #65 from ajmyyra/ubuntu-2020-template-update
Templates: added Ubuntu 20.04
2 parents 311760a + c07ee07 commit 1bacb4c

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

test/test_server_creation.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
class TestCreateServer(object):
1515

1616
def test_storage_prepare_post_body(self, manager):
17-
s1 = Storage(os='Ubuntu 14.04', size=10)
17+
s1 = Storage(os='Ubuntu 20.04', size=10)
1818
body1 = s1.to_dict()
1919
assert body1['tier'] == 'maxiops'
2020
assert body1['size'] == 10
@@ -39,7 +39,7 @@ def test_server_init(self, manager):
3939
hostname='my.example.com',
4040
zone=ZONE.Chicago,
4141
storage_devices=[
42-
Storage(os='Ubuntu 14.04', size=10),
42+
Storage(os='Ubuntu 20.04', size=10),
4343
Storage(size=100, title='storage disk 1')
4444
])
4545

@@ -57,7 +57,7 @@ def test_server_prepare_post_body(self):
5757
hostname='my.example.com',
5858
zone=ZONE.Chicago,
5959
storage_devices=[
60-
Storage(os='Ubuntu 14.04', size=10),
60+
Storage(os='Ubuntu 20.04', size=10),
6161
Storage()
6262
]
6363
)
@@ -67,7 +67,7 @@ def test_server_prepare_post_body(self):
6767
assert s1['title'] == 'my.example.com OS disk'
6868
assert s1['tier'] == 'maxiops'
6969
assert s1['size'] == 10
70-
assert s1['storage'] == '01000000-0000-4000-8000-000030040200'
70+
assert s1['storage'] == '01000000-0000-4000-8000-000030200200'
7171
assert s1['action'] == 'clone'
7272
s2 = body['server']['storage_devices']['storage_device'][1]
7373
assert s2['title'] == 'my.example.com storage disk 1'
@@ -89,7 +89,7 @@ def test_server_prepare_post_body_optional_attributes(self):
8989
zone=ZONE.Chicago,
9090
storage_devices=[
9191
Storage(
92-
os='Ubuntu 14.04',
92+
os='Ubuntu 20.04',
9393
size=10
9494
)
9595
],
@@ -111,7 +111,7 @@ def test_server_prepare_post_body_optional_attributes(self):
111111
'hostname':'my.example.com',
112112
'zone': ZONE.Chicago,
113113
'storage_devices':[
114-
{'os': 'Ubuntu 14.04', 'size': 10}
114+
{'os': 'Ubuntu 20.04', 'size': 10}
115115
],
116116
'vnc_password': 'my-passwd',
117117
'password_delivery': 'email',
@@ -171,7 +171,7 @@ def test_create_server(self, manager):
171171
hostname='my.example.com',
172172
zone=ZONE.Chicago,
173173
storage_devices=[
174-
Storage(os='Ubuntu 14.04', size=10),
174+
Storage(os='Ubuntu 20.04', size=10),
175175
Storage(size=100, title='storage disk 1')
176176
]
177177
)
@@ -208,7 +208,7 @@ def test_create_server_with_dict(self, manager):
208208
'hostname': 'my.example.com',
209209
'zone': ZONE.Chicago,
210210
'storage_devices': [
211-
{'os': 'Ubuntu 14.04', 'size': 10},
211+
{'os': 'Ubuntu 20.04', 'size': 10},
212212
{'size': 100, 'title': 'storage disk 1'},
213213
]
214214
}

upcloud_api/constants.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ class OperatingSystems(object):
3131
'Debian 8.11': '01000000-0000-4000-8000-000020030100',
3232
'Debian 9.9': '01000000-0000-4000-8000-000020040100',
3333
'Debian 10.0': '01000000-0000-4000-8000-000020050100',
34-
'Ubuntu 14.04': '01000000-0000-4000-8000-000030040200',
3534
'Ubuntu 16.04': '01000000-0000-4000-8000-000030060200',
3635
'Ubuntu 18.04': '01000000-0000-4000-8000-000030080200',
36+
'Ubuntu 20.04': '01000000-0000-4000-8000-000030200200',
3737
'CoreOS Stable 1068.8.0': '01000000-0000-4000-8000-000080010200',
38-
'Windows 2012': '01000000-0000-4000-8000-000010050200',
3938
'Windows 2016': '01000000-0000-4000-8000-000010060200',
4039
'Windows 2019': '01000000-0000-4000-8000-000010070200',
4140
}
@@ -55,7 +54,9 @@ def get_OS_UUID(cls, os):
5554
return os
5655

5756
raise Exception((
58-
"Invalid OS -- valid options are: 'CentOS 6.5', 'CentOS 7.0', "
59-
"'Debian 7.8', 'Debian 8.0' ,'Ubuntu 12.04', 'Ubuntu 14.04', 'Ubuntu 16.04', "
60-
"'Windows 2008', 'Windows 2012'"
57+
"Invalid OS -- valid options are: "
58+
"'CentOS 6.10', 'CentOS 7', 'Centos 8', "
59+
"'Debian 8.11', 'Debian 9.9', 'Debian 10.10', "
60+
"'Ubuntu 12.04', 'Ubuntu 16.04', 'Ubuntu 18.04', 'Ubuntu 20.04', "
61+
"'Windows 2016', 'Windows 2019'"
6162
))

0 commit comments

Comments
 (0)