Skip to content

Commit 2d3290b

Browse files
committed
use cloudstack cdn for genric templates
1 parent ea6d142 commit 2d3290b

File tree

1 file changed

+77
-30
lines changed

1 file changed

+77
-30
lines changed

ui/src/views/infra/zone/ZoneWizardRegisterTemplate.vue

Lines changed: 77 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -111,108 +111,149 @@ export default {
111111
id: 1,
112112
name: 'Ubuntu 24.04',
113113
version: '24.04',
114-
osCategoryName: 'Ubuntu',
114+
distroName: 'Ubuntu',
115115
arch: 'x86_64',
116-
url: 'https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img'
116+
filename: 'ubuntu-24.04-server-cloudimg-amd64.img'
117117
},
118118
{
119119
id: 2,
120120
name: 'Ubuntu 22.04',
121121
version: '22.04',
122-
osCategoryName: 'Ubuntu',
122+
distroName: 'Ubuntu',
123123
arch: 'x86_64',
124-
url: 'https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64.img'
124+
filename: 'ubuntu-22.04-server-cloudimg-amd64.img'
125125
},
126126
{
127127
id: 3,
128128
name: 'Ubuntu 20.04',
129129
version: '20.04',
130-
osCategoryName: 'Ubuntu',
130+
distroName: 'Ubuntu',
131131
arch: 'x86_64',
132-
url: 'https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img'
132+
filename: 'ubuntu-20.04-server-cloudimg-amd64.img'
133133
},
134134
{
135135
id: 4,
136136
name: 'Debian GNU/Linux 12 (64-bit)',
137137
version: '12',
138-
osCategoryName: 'Debian',
138+
distroName: 'Debian',
139139
arch: 'x86_64',
140-
url: 'https://laotzu.ftp.acc.umu.se/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2'
140+
filename: 'debian-12-genericcloud-amd64.qcow2'
141141
},
142142
{
143143
id: 5,
144-
name: 'AlmaLinux 8',
144+
name: 'Rocky Linux 8',
145145
version: '8',
146-
osCategoryName: 'CentOS',
146+
distroName: 'Rockylinux',
147147
arch: 'x86_64',
148-
url: 'https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/AlmaLinux-8-GenericCloud-latest.x86_64.qcow2'
148+
filename: 'Rocky-8-GenericCloud.latest.x86_64.qcow2'
149149
},
150150
{
151151
id: 6,
152-
name: 'AlmaLinux 9',
152+
name: 'Rocky Linux 9',
153153
version: '9',
154-
osCategoryName: 'CentOS',
154+
distroName: 'Rockylinux',
155155
arch: 'x86_64',
156-
url: 'https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2'
156+
filename: 'Rocky-9-GenericCloud.latest.x86_64.qcow2'
157157
},
158158
{
159159
id: 7,
160160
name: 'OpenSUSE 15.5',
161161
version: '15.5',
162-
osCategoryName: 'OpenSUSE',
162+
distroName: 'OpenSUSE',
163163
arch: 'x86_64',
164-
url: 'https://mirror.squ.edu.om/opensuse/opensuse/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2'
164+
filename: 'openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2'
165165
},
166166
{
167167
id: 8,
168168
name: 'Ubuntu 24.04',
169169
version: '24.04',
170-
osCategoryName: 'Ubuntu',
170+
distroName: 'Ubuntu',
171171
arch: 'aarch64',
172-
url: 'https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-arm64.img'
172+
filename: 'ubuntu-24.04-server-cloudimg-arm64.img'
173173
},
174174
{
175175
id: 9,
176176
name: 'Ubuntu 22.04',
177177
version: '22.04',
178-
osCategoryName: 'Ubuntu',
178+
distroName: 'Ubuntu',
179179
arch: 'aarch64',
180-
url: 'https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-arm64.img'
180+
filename: 'ubuntu-22.04-server-cloudimg-arm64.img'
181181
},
182182
{
183183
id: 10,
184184
name: 'Ubuntu 20.04',
185185
version: '20.04',
186-
osCategoryName: 'Ubuntu',
186+
distroName: 'Ubuntu',
187187
arch: 'aarch64',
188-
url: 'https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-arm64.img'
188+
filename: 'ubuntu-20.04-server-cloudimg-arm64.img'
189189
},
190190
{
191191
id: 11,
192192
name: 'Debian GNU/Linux 12 (64-bit)',
193193
version: '12',
194-
osCategoryName: 'Debian',
194+
distroName: 'Debian',
195195
arch: 'aarch64',
196-
url: 'https://saimei.ftp.acc.umu.se/images/cloud/bookworm/latest/debian-12-genericcloud-arm64.qcow2'
196+
filename: 'debian-12-genericcloud-arm64.qcow2'
197197
},
198198
{
199199
id: 12,
200-
name: 'AlmaLinux 9',
201-
version: '9',
202-
osCategoryName: 'CentOS',
200+
name: 'Rocky Linux 8',
201+
version: '8',
202+
distroName: 'Rockylinux',
203203
arch: 'aarch64',
204-
url: 'https://repo.almalinux.org/almalinux/9/cloud/aarch64/images/AlmaLinux-9-GenericCloud-latest.aarch64.qcow2'
204+
filename: 'Rocky-8-GenericCloud.latest.aarch64.qcow2'
205205
},
206206
{
207207
id: 13,
208+
name: 'Rocky Linux 9',
209+
version: '9',
210+
distroName: 'Rockylinux',
211+
arch: 'aarch64',
212+
filename: 'Rocky-9-GenericCloud.latest.aarch64.qcow2'
213+
},
214+
{
215+
id: 14,
208216
name: 'OpenSUSE 15.5',
209217
version: '15.5',
210-
osCategoryName: 'OpenSUSE',
218+
distroName: 'OpenSUSE',
219+
arch: 'aarch64',
220+
filename: 'openSUSE-Leap-15.5-Minimal-VM.aarch64-Cloud.qcow2'
221+
},
222+
{
223+
id: 15,
224+
name: 'Oracle Linux 8',
225+
version: '8.10',
226+
distroName: 'OracleLinux',
227+
arch: 'aarch64',
228+
filename: 'OL8U10_aarch64-kvm-b122.qcow2'
229+
},
230+
{
231+
id: 16,
232+
name: 'Oracle Linux 8',
233+
version: '8.10',
234+
distroName: 'OracleLinux',
235+
arch: 'x86_64',
236+
filename: 'OL8U10_x86_64-kvm-b258.qcow2'
237+
},
238+
{
239+
id: 17,
240+
name: 'Oracle Linux 9',
241+
version: '9.5',
242+
distroName: 'OracleLinux',
211243
arch: 'aarch64',
212-
url: 'https://download.opensuse.org/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.aarch64-Cloud.qcow2'
244+
filename: 'OL9U5_aarch64-kvm-b126.qcow2'
245+
},
246+
{
247+
id: 18,
248+
name: 'Oracle Linux 9',
249+
version: '9.5',
250+
distroName: 'OracleLinux',
251+
arch: 'x86_64',
252+
filename: 'OL9U5_x86_64-kvm-b259.qcow2'
213253
}
214254
]
215255
this.defaultOsTypeId = await this.fetchOsTypeId('Other Linux (64-bit)')
256+
this.prepareDownloadUrls()
216257
},
217258
handleDone () {
218259
this.$emit('refresh-data')
@@ -317,6 +358,12 @@ export default {
317358
format = 'RAW'
318359
}
319360
return format
361+
},
362+
prepareDownloadUrls () {
363+
const templatesBaseUrl = 'https://download.cloudstack.org/templates/cloud-images/'
364+
for (const template of this.predefinedTemplates) {
365+
template.url = templatesBaseUrl + template.distroName.toLowerCase() + '/' + template.filename
366+
}
320367
}
321368
}
322369
}

0 commit comments

Comments
 (0)