Skip to content

Commit 48c68fe

Browse files
author
Elias Nygren
committed
update template shortcuts
1 parent 3832163 commit 48c68fe

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

upcloud_api/tools.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,22 @@ class ZONE(object):
2121
"""
2222
Enums for UpCloud's Zones.
2323
"""
24-
Helsinki = "fi-hel1"
25-
London = "uk-lon1"
26-
Chicago = "us-chi1"
24+
Helsinki = 'fi-hel1'
25+
London = 'uk-lon1'
26+
Chicago = 'us-chi1'
27+
Frankfurt = 'de-fra1'
2728

2829
class OperatingSystems(object):
2930
templates = {
30-
"CentOS 6.5": "01000000-0000-4000-8000-000050010200",
31-
"CentOS 7.0": "01000000-0000-4000-8000-000050010300",
32-
"Debian 7.8": "01000000-0000-4000-8000-000020020100",
33-
"Ubuntu 12.04": "01000000-0000-4000-8000-000030030200",
34-
"Ubuntu 14.04": "01000000-0000-4000-8000-000030040200",
35-
"Windows 2003": "01000000-0000-4000-8000-000010040400",
36-
"Windows 2008": "01000000-0000-4000-8000-000010030200",
37-
"Windows 2012": "01000000-0000-4000-8000-000010050200"
31+
'CentOS 6.5': '01000000-0000-4000-8000-000050010200',
32+
'CentOS 7.0': '01000000-0000-4000-8000-000050010300',
33+
'Debian 7.8': '01000000-0000-4000-8000-000020020100',
34+
'Debian 8.0': '01000000-0000-4000-8000-000020030100',
35+
'Ubuntu 12.04': '01000000-0000-4000-8000-000030030200',
36+
'Ubuntu 14.04': '01000000-0000-4000-8000-000030040200',
37+
'Ubuntu 16.04': '01000000-0000-4000-8000-000030060200',
38+
'Windows 2008': '01000000-0000-4000-8000-000010030200',
39+
'Windows 2012': '01000000-0000-4000-8000-000010050200'
3840
}
3941

4042
@classmethod
@@ -51,6 +53,8 @@ def get_OS_UUID(cls, os):
5153
if re.search(uuid_regexp, os):
5254
return os
5355

54-
raise Exception('Invalid OS -- valid options are: "CentOS 6.5", "CentOS 7.0"',
55-
'"Debian 7.8", "Ubuntu 12.04", "Ubuntu 14.04", "Windows 2003"',
56-
'"Windows 2008", "Windows 2012"')
56+
raise Exception((
57+
"Invalid OS -- valid options are: 'CentOS 6.5', 'CentOS 7.0', "
58+
"'Debian 7.8', 'Debian 8.0' ,'Ubuntu 12.04', 'Ubuntu 14.04', 'Ubuntu 16.04', "
59+
"'Windows 2008', 'Windows 2012'"
60+
))

0 commit comments

Comments
 (0)