openstack-image-manager 0.20240812.0__py3-none-any.whl → 0.20240829.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. openstack_image_manager/etc/__init__.py +0 -0
  2. openstack_image_manager/etc/images/almalinux.yml +70 -0
  3. openstack_image_manager/etc/images/centos.yml +104 -0
  4. openstack_image_manager/etc/images/cirros.yml +38 -0
  5. openstack_image_manager/etc/images/clearlinux.yml +31 -0
  6. openstack_image_manager/etc/images/debian.yml +107 -0
  7. openstack_image_manager/etc/images/fedora.yml +32 -0
  8. openstack_image_manager/etc/images/flatcar.yml +41 -0
  9. openstack_image_manager/etc/images/gardenlinux.yml +45 -0
  10. openstack_image_manager/etc/images/kubernetes.yml +41 -0
  11. openstack_image_manager/etc/images/opensuse.yml +32 -0
  12. openstack_image_manager/etc/images/opnsense.yml +32 -0
  13. openstack_image_manager/etc/images/osism.yml +31 -0
  14. openstack_image_manager/etc/images/rockylinux.yml +72 -0
  15. openstack_image_manager/etc/images/talos.yml +41 -0
  16. openstack_image_manager/etc/images/ubuntu.yml +334 -0
  17. openstack_image_manager/etc/schema.yaml +56 -0
  18. openstack_image_manager/main.py +46 -19
  19. {openstack_image_manager-0.20240812.0.dist-info → openstack_image_manager-0.20240829.0.dist-info}/METADATA +4 -4
  20. openstack_image_manager-0.20240829.0.dist-info/RECORD +25 -0
  21. {openstack_image_manager-0.20240812.0.dist-info → openstack_image_manager-0.20240829.0.dist-info}/WHEEL +1 -1
  22. openstack_image_manager-0.20240812.0.dist-info/RECORD +0 -8
  23. {openstack_image_manager-0.20240812.0.dist-info → openstack_image_manager-0.20240829.0.dist-info}/LICENSE +0 -0
  24. {openstack_image_manager-0.20240812.0.dist-info → openstack_image_manager-0.20240829.0.dist-info}/entry_points.txt +0 -0
  25. {openstack_image_manager-0.20240812.0.dist-info → openstack_image_manager-0.20240829.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,72 @@
1
+ ---
2
+ images:
3
+ - name: Rocky 8
4
+ enable: false
5
+ shortname: rocky-8
6
+ format: qcow2
7
+ login: rocky
8
+ min_disk: 10
9
+ min_ram: 512
10
+ status: active
11
+ visibility: public
12
+ multi: true
13
+ meta:
14
+ architecture: x86_64
15
+ hw_disk_bus: scsi
16
+ hw_rng_model: virtio
17
+ hw_scsi_model: virtio-scsi
18
+ hw_watchdog_action: reset
19
+ hypervisor_type: qemu
20
+ os_distro: centos
21
+ os_version: '8'
22
+ replace_frequency: quarterly
23
+ uuid_validity: last-3
24
+ provided_until: none
25
+ tags: []
26
+ latest_checksum_url:
27
+ https://download.rockylinux.org/pub/rocky/8/images/x86_64/Rocky-8-GenericCloud.latest.x86_64.qcow2.CHECKSUM
28
+ latest_url:
29
+ https://download.rockylinux.org/pub/rocky/8/images/x86_64/Rocky-8-GenericCloud.latest.x86_64.qcow2
30
+ versions:
31
+ - version: '20240529'
32
+ url:
33
+ https://download.rockylinux.org/pub/rocky/8/images/x86_64/Rocky-8-GenericCloud.latest.x86_64.qcow2
34
+ mirror_url:
35
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/rocky-8/20240529-rocky-8.qcow2
36
+ checksum: sha256:e56066c58606191e96184de9a9183a3af33c59bcbd8740d8b10ca054a7a89c14
37
+ build_date: 2024-05-29
38
+ - name: Rocky 9
39
+ enable: true
40
+ shortname: rocky-9
41
+ format: qcow2
42
+ login: rocky
43
+ min_disk: 10
44
+ min_ram: 512
45
+ status: active
46
+ visibility: public
47
+ multi: true
48
+ meta:
49
+ architecture: x86_64
50
+ hw_disk_bus: scsi
51
+ hw_rng_model: virtio
52
+ hw_scsi_model: virtio-scsi
53
+ hw_watchdog_action: reset
54
+ hypervisor_type: qemu
55
+ os_distro: centos
56
+ os_version: '9'
57
+ replace_frequency: quarterly
58
+ uuid_validity: last-3
59
+ provided_until: none
60
+ tags: []
61
+ latest_checksum_url:
62
+ https://download.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2.CHECKSUM
63
+ latest_url:
64
+ https://download.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
65
+ versions:
66
+ - version: '20240612'
67
+ url:
68
+ https://download.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
69
+ mirror_url:
70
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/rocky-9/20240612-rocky-9.qcow2
71
+ checksum: sha256:7a4ae4fbbdafaff3f0ba6166ef5b64da23e55ac71eff7489b937db11c9ba5dd7
72
+ build_date: 2024-06-12
@@ -0,0 +1,41 @@
1
+ ---
2
+ images:
3
+
4
+ - name: Talos Linux
5
+ enable: false
6
+ shortname: talos
7
+ format: raw
8
+ login: none
9
+ min_disk: 2
10
+ min_ram: 1024
11
+ status: active
12
+ visibility: public
13
+ multi: false
14
+ meta:
15
+ architecture: x86_64
16
+ hw_disk_bus: scsi
17
+ hw_rng_model: virtio
18
+ hw_scsi_model: virtio-scsi
19
+ hw_watchdog_action: reset
20
+ hypervisor_type: qemu
21
+ os_distro: talos
22
+ replace_frequency: never
23
+ uuid_validity: none
24
+ provided_until: none
25
+ tags: []
26
+ versions:
27
+ - version: '1.3.6'
28
+ url: https://github.com/siderolabs/talos/releases/download/v1.3.6/openstack-amd64.tar.gz
29
+ mirror_url: https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/talos/1.3.6/disk.raw
30
+ checksum: "sha256:1db0cfd9bd9c3d3165911ab89ef05dad1d590cc442fb0702564cfe737b3f3dbd"
31
+ build_date: 2023-03-14
32
+ - version: '1.4.5'
33
+ url: https://github.com/siderolabs/talos/releases/download/v1.4.5/openstack-amd64.tar.gz
34
+ mirror_url: https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/talos/1.4.5/disk.raw
35
+ checksum: "sha256:fc7dc71a6acece93196c8bace15139469b7bfbe4fa7d001336da0fdda9b437c9"
36
+ build_date: 2023-05-30
37
+ - version: '1.6.0'
38
+ url: https://github.com/siderolabs/talos/releases/download/v1.6.0/openstack-amd64.raw.xz
39
+ mirror_url: https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/talos/1.6.0/openstack-amd64.raw
40
+ checksum: "sha256:e3754c2338b4ce831db5442cf62deab260d56b64227a07cfc26e4b73eef5abaf"
41
+ build_date: 2023-12-15
@@ -0,0 +1,334 @@
1
+ ---
2
+ images:
3
+ - name: Ubuntu 14.04
4
+ enable: false
5
+ shortname: ubuntu-14.04
6
+ format: qcow2
7
+ login: ubuntu
8
+ min_disk: 8
9
+ min_ram: 512
10
+ status: active
11
+ visibility: public
12
+ multi: true
13
+ meta:
14
+ architecture: x86_64
15
+ hw_disk_bus: scsi
16
+ hw_rng_model: virtio
17
+ hw_scsi_model: virtio-scsi
18
+ hw_watchdog_action: reset
19
+ hypervisor_type: qemu
20
+ os_distro: ubuntu
21
+ os_version: '14.04'
22
+ replace_frequency: never
23
+ uuid_validity: none
24
+ provided_until: none
25
+ tags: []
26
+ latest_checksum_url: https://cloud-images.ubuntu.com/trusty/current/SHA256SUMS
27
+ latest_url:
28
+ https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img
29
+ versions:
30
+ - version: '20191107'
31
+ url:
32
+ https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img
33
+ mirror_url:
34
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-14.04/20191107-ubuntu-14.04.qcow2
35
+ checksum: sha256:3c4ad0defbe729dd3c16d2851d775575d1c5351c85734418d3b89bfdfd28ebd1
36
+ build_date: 2019-11-07
37
+ - name: Ubuntu 16.04
38
+ enable: false
39
+ shortname: ubuntu-16.04
40
+ format: qcow2
41
+ login: ubuntu
42
+ min_disk: 8
43
+ min_ram: 512
44
+ status: active
45
+ visibility: public
46
+ multi: true
47
+ meta:
48
+ architecture: x86_64
49
+ hw_disk_bus: scsi
50
+ hw_rng_model: virtio
51
+ hw_scsi_model: virtio-scsi
52
+ hw_watchdog_action: reset
53
+ hypervisor_type: qemu
54
+ os_distro: ubuntu
55
+ os_version: '16.04'
56
+ replace_frequency: never
57
+ uuid_validity: none
58
+ provided_until: none
59
+ tags: []
60
+ latest_checksum_url: https://cloud-images.ubuntu.com/xenial/current/SHA256SUMS
61
+ latest_url:
62
+ https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
63
+ versions:
64
+ - version: '20211001'
65
+ url:
66
+ https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
67
+ mirror_url:
68
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-16.04/20211001-ubuntu-16.04.qcow2
69
+ checksum: sha256:fff2494a70bcaffb59f26f71ec49e137dd87d319341c35832dbe0ea65ff15140
70
+ build_date: 2021-10-01
71
+ - name: Ubuntu 16.04 Minimal
72
+ enable: false
73
+ shortname: ubuntu-16.04-minimal
74
+ format: qcow2
75
+ login: ubuntu
76
+ min_disk: 8
77
+ min_ram: 512
78
+ status: active
79
+ visibility: public
80
+ multi: true
81
+ meta:
82
+ architecture: x86_64
83
+ hw_disk_bus: scsi
84
+ hw_rng_model: virtio
85
+ hw_scsi_model: virtio-scsi
86
+ hw_watchdog_action: reset
87
+ hypervisor_type: qemu
88
+ os_distro: ubuntu
89
+ os_version: '16.04'
90
+ replace_frequency: never
91
+ uuid_validity: none
92
+ provided_until: none
93
+ tags: []
94
+ latest_checksum_url: https://cloud-images.ubuntu.com/minimal/releases/xenial/release/SHA256SUMS
95
+ latest_url:
96
+ https://cloud-images.ubuntu.com/minimal/releases/xenial/release/ubuntu-16.04-minimal-cloudimg-amd64-disk1.img
97
+ versions:
98
+ - version: '20210929'
99
+ url:
100
+ https://cloud-images.ubuntu.com/minimal/releases/xenial/release/ubuntu-16.04-minimal-cloudimg-amd64-disk1.img
101
+ mirror_url:
102
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-16.04-minimal/20210929-ubuntu-16.04-minimal.qcow2
103
+ checksum: sha256:7658ec30373e7ad1a1858744f395a89713d333721d7d1986ee8b71680b81a0a9
104
+ build_date: 2021-09-20
105
+ - name: Ubuntu 18.04
106
+ enable: false
107
+ shortname: ubuntu-18.04
108
+ format: qcow2
109
+ login: ubuntu
110
+ min_disk: 8
111
+ min_ram: 512
112
+ status: active
113
+ visibility: public
114
+ multi: true
115
+ meta:
116
+ architecture: x86_64
117
+ hw_disk_bus: scsi
118
+ hw_rng_model: virtio
119
+ hw_scsi_model: virtio-scsi
120
+ hw_watchdog_action: reset
121
+ hypervisor_type: qemu
122
+ os_distro: ubuntu
123
+ os_version: '18.04'
124
+ replace_frequency: quarterly
125
+ uuid_validity: last-3
126
+ provided_until: none
127
+ tags: []
128
+ latest_checksum_url: https://cloud-images.ubuntu.com/bionic/current/SHA256SUMS
129
+ latest_url: https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
130
+ versions:
131
+ - version: '20230607'
132
+ url: https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
133
+ mirror_url:
134
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-18.04/20230607-ubuntu-18.04.qcow2
135
+ checksum: sha256:8dd2e6b5e5aad20c3f836123b300cba9861249408cbb07c359145a65d6bab6b6
136
+ build_date: 2023-06-07
137
+ - name: Ubuntu 18.04 Minimal
138
+ enable: false
139
+ shortname: ubuntu-18.04-minimal
140
+ format: qcow2
141
+ login: ubuntu
142
+ min_disk: 8
143
+ min_ram: 512
144
+ status: active
145
+ visibility: public
146
+ multi: true
147
+ meta:
148
+ architecture: x86_64
149
+ hw_disk_bus: scsi
150
+ hw_rng_model: virtio
151
+ hw_scsi_model: virtio-scsi
152
+ hw_watchdog_action: reset
153
+ hypervisor_type: qemu
154
+ os_distro: ubuntu
155
+ os_version: '18.04'
156
+ replace_frequency: quarterly
157
+ uuid_validity: last-3
158
+ provided_until: none
159
+ tags: []
160
+ latest_checksum_url: https://cloud-images.ubuntu.com/minimal/releases/bionic/release/SHA256SUMS
161
+ latest_url:
162
+ https://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img
163
+ versions:
164
+ - version: '20230602'
165
+ url:
166
+ https://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img
167
+ mirror_url:
168
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-18.04-minimal/20230602-ubuntu-18.04-minimal.qcow2
169
+ checksum: sha256:2d9755669c499e88d51da0638cd20e0983a248828e2153906c013bea0ee2f45a
170
+ build_date: 2023-06-02
171
+ - name: Ubuntu 20.04
172
+ enable: false
173
+ shortname: ubuntu-20.04
174
+ format: qcow2
175
+ login: ubuntu
176
+ min_disk: 8
177
+ min_ram: 512
178
+ status: active
179
+ visibility: public
180
+ multi: true
181
+ meta:
182
+ architecture: x86_64
183
+ hw_disk_bus: scsi
184
+ hw_rng_model: virtio
185
+ hw_scsi_model: virtio-scsi
186
+ hw_watchdog_action: reset
187
+ hypervisor_type: qemu
188
+ os_distro: ubuntu
189
+ os_version: '20.04'
190
+ replace_frequency: quarterly
191
+ uuid_validity: last-3
192
+ provided_until: none
193
+ tags: []
194
+ latest_checksum_url: https://cloud-images.ubuntu.com/focal/current/SHA256SUMS
195
+ latest_url: https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
196
+ versions:
197
+ - version: '20240704'
198
+ url: https://cloud-images.ubuntu.com/focal/20240704/focal-server-cloudimg-amd64.img
199
+ mirror_url:
200
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-20.04/20240704-ubuntu-20.04.qcow2
201
+ checksum: sha256:70f0345ca9a1b3b0bbc4719a9c5992c456cf766d0d84ce3d7716ecc21a421778
202
+ build_date: 2024-07-04
203
+ - name: Ubuntu 20.04 Minimal
204
+ enable: false
205
+ shortname: ubuntu-20.04-minimal
206
+ format: qcow2
207
+ login: ubuntu
208
+ min_disk: 8
209
+ min_ram: 512
210
+ status: active
211
+ visibility: public
212
+ multi: true
213
+ meta:
214
+ architecture: x86_64
215
+ hw_disk_bus: scsi
216
+ hw_rng_model: virtio
217
+ hw_scsi_model: virtio-scsi
218
+ hw_watchdog_action: reset
219
+ hypervisor_type: qemu
220
+ os_distro: ubuntu
221
+ os_version: '20.04'
222
+ replace_frequency: quarterly
223
+ uuid_validity: last-3
224
+ provided_until: none
225
+ tags: []
226
+ latest_checksum_url: https://cloud-images.ubuntu.com/minimal/releases/focal/release/SHA256SUMS
227
+ latest_url:
228
+ https://cloud-images.ubuntu.com/minimal/releases/focal/release/ubuntu-20.04-minimal-cloudimg-amd64.img
229
+ versions:
230
+ - version: '20240626'
231
+ url:
232
+ https://cloud-images.ubuntu.com/minimal/releases/focal/release-20240626/ubuntu-20.04-minimal-cloudimg-amd64.img
233
+ mirror_url:
234
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-20.04-minimal/20240626-ubuntu-20.04-minimal.qcow2
235
+ checksum: sha256:daa835c3786acea38047fd1c2f23ff3b4e8b7b337753e1ddb3ba1ad56282b325
236
+ build_date: 2024-06-26
237
+ - name: Ubuntu 22.04
238
+ enable: true
239
+ shortname: ubuntu-22.04
240
+ format: qcow2
241
+ login: ubuntu
242
+ min_disk: 8
243
+ min_ram: 512
244
+ status: active
245
+ visibility: public
246
+ multi: true
247
+ meta:
248
+ architecture: x86_64
249
+ hw_disk_bus: scsi
250
+ hw_rng_model: virtio
251
+ hw_scsi_model: virtio-scsi
252
+ hw_watchdog_action: reset
253
+ hypervisor_type: qemu
254
+ os_distro: ubuntu
255
+ os_version: '22.04'
256
+ replace_frequency: quarterly
257
+ uuid_validity: last-3
258
+ provided_until: none
259
+ tags: []
260
+ latest_checksum_url: https://cloud-images.ubuntu.com/jammy/current/SHA256SUMS
261
+ latest_url: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
262
+ versions:
263
+ - version: '20240705'
264
+ url: https://cloud-images.ubuntu.com/jammy/20240705/jammy-server-cloudimg-amd64.img
265
+ mirror_url:
266
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-22.04/20240705-ubuntu-22.04.qcow2
267
+ checksum: sha256:eab12734a1743c79f8816419a72319903fcfa92baab561e47029aafc33a79869
268
+ build_date: 2024-07-05
269
+ - name: Ubuntu 22.04 Minimal
270
+ enable: true
271
+ shortname: ubuntu-22.04-minimal
272
+ format: qcow2
273
+ login: ubuntu
274
+ min_disk: 8
275
+ min_ram: 512
276
+ status: active
277
+ visibility: public
278
+ multi: true
279
+ meta:
280
+ architecture: x86_64
281
+ hw_disk_bus: scsi
282
+ hw_rng_model: virtio
283
+ hw_scsi_model: virtio-scsi
284
+ hw_watchdog_action: reset
285
+ hypervisor_type: qemu
286
+ os_distro: ubuntu
287
+ os_version: '22.04'
288
+ replace_frequency: quarterly
289
+ uuid_validity: last-3
290
+ provided_until: none
291
+ tags: []
292
+ latest_checksum_url: https://cloud-images.ubuntu.com/minimal/releases/jammy/release/SHA256SUMS
293
+ latest_url:
294
+ https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ubuntu-22.04-minimal-cloudimg-amd64.img
295
+ versions:
296
+ - version: '20240701'
297
+ url:
298
+ https://cloud-images.ubuntu.com/minimal/releases/jammy/release-20240701/ubuntu-22.04-minimal-cloudimg-amd64.img
299
+ mirror_url:
300
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-22.04-minimal/20240701-ubuntu-22.04-minimal.qcow2
301
+ checksum: sha256:3ff079f2792611454e2034ad8bd23a145b2ab6f314769a85457d1f6f5c1bc9c9
302
+ build_date: 2024-07-01
303
+ - name: Ubuntu 24.04
304
+ enable: true
305
+ shortname: ubuntu-24.04
306
+ format: qcow2
307
+ login: ubuntu
308
+ min_disk: 8
309
+ min_ram: 512
310
+ status: active
311
+ visibility: public
312
+ multi: true
313
+ meta:
314
+ architecture: x86_64
315
+ hw_disk_bus: scsi
316
+ hw_rng_model: virtio
317
+ hw_scsi_model: virtio-scsi
318
+ hw_watchdog_action: reset
319
+ hypervisor_type: qemu
320
+ os_distro: ubuntu
321
+ os_version: '24.04'
322
+ replace_frequency: quarterly
323
+ uuid_validity: last-3
324
+ provided_until: none
325
+ tags: []
326
+ latest_checksum_url: https://cloud-images.ubuntu.com/noble/current/SHA256SUMS
327
+ latest_url: https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
328
+ versions:
329
+ - version: '20240702'
330
+ url: https://cloud-images.ubuntu.com/noble/20240702/noble-server-cloudimg-amd64.img
331
+ mirror_url:
332
+ https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-images/ubuntu-24.04/20240702-ubuntu-24.04.qcow2
333
+ checksum: sha256:182dc760bfca26c45fb4e4668049ecd4d0ecdd6171b3bae81d0135e8f1e9d93e
334
+ build_date: 2024-07-02
@@ -0,0 +1,56 @@
1
+ ---
2
+ images: list(include('image'), min=1)
3
+
4
+ ---
5
+ image:
6
+ enable: bool()
7
+ format: enum('aki', 'ari', 'ami', 'raw', 'iso', 'vhd', 'vdi', 'qcow2', 'vmdk')
8
+ latest_checksum_url: regex('^(http|ftp)s?:\/\/\w+.*', name='valid URL', required=False)
9
+ latest_url: regex('^(http|ftp)s?:\/\/\w+.*', name='valid URL', required=False)
10
+ login: str()
11
+ meta: include('meta', required=True)
12
+ min_disk: int(min=0)
13
+ min_ram: int(min=0)
14
+ multi: bool()
15
+ keep: bool(required=False)
16
+ name: str()
17
+ password: str(required=False)
18
+ shortname: str(required=False)
19
+ status: enum('active', 'deactivated')
20
+ separator: str(required=False)
21
+ tags: list(str())
22
+ versions: list(include('versions'))
23
+ visibility: enum('public', 'private', 'community', 'shared')
24
+
25
+ ---
26
+ meta:
27
+ architecture: enum('x86_64', 'aarch64', 'risc-v')
28
+ hypervisor_type: enum('hyperv', 'ironic', 'lxc', 'qemu', 'uml', 'vmware', 'xen')
29
+ hotfix_hours: int(min=0, required=False)
30
+ hw_disk_bus: enum('virtio', 'scsi', None)
31
+ hw_rng_model: enum('virtio', None, required=False)
32
+ hw_scsi_model: enum('virtio-scsi', required=False)
33
+ hw_watchdog_action: enum('disabled', 'reset', 'poweroff', 'pause', 'none', required=False)
34
+ image_description: str(required=False)
35
+ os_distro: enum('arch', 'centos', 'cirros', 'clearlinux', 'debian', 'fedora', 'freebsd', 'opensuse', 'rhel', 'talos', 'ubuntu', 'windows')
36
+ os_version: str(required=False)
37
+ patchlevel: str(required=False)
38
+ provided_until: any(enum('none'), day())
39
+ replace_frequency: enum('yearly', 'quarterly', 'monthly', 'weekly', 'daily', 'critical_bug', 'never')
40
+ uuid_validity: any(enum('none', 'forever', 'notice'), str(starts_with='last-'), day())
41
+
42
+ ---
43
+ versions:
44
+ build_date: any(day(), timestamp())
45
+ checksum: regex('\w+:([a-f0-9]{32}|[a-f0-9]{40}|[a-f0-9]{64}|[a-f0-9]{128})$', name='valid checksum', required=False)
46
+ checksums_url: regex('^(http|ftp)s?:\/\/\w+.*', name='valid URL', required=False)
47
+ hidden: bool(required=False)
48
+ image_description: str(required=False)
49
+ meta: include('meta', required=False)
50
+ os_version: str(required=False)
51
+ source: regex('^(http|ftp)s?:\/\/\w+.*|^private$', name='valid URL or private', required=False)
52
+ url: regex('^(http|ftp)s?:\/\/\w+.*|^(file:|file:///)\w+.*', name='valid URL')
53
+ mirror_url: regex('^(http|ftp)s?:\/\/\w+.*|^(file:|file:///)\w+.*', name='valid URL', required=False)
54
+ version: str()
55
+ visibility: enum('public', 'private', 'community', 'shared', required=False)
56
+ id: regex('^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$', required=False)
@@ -12,6 +12,7 @@ import typing
12
12
  from typing import Dict, Set
13
13
  import yamale
14
14
  import urllib.parse
15
+ import pkgutil
15
16
 
16
17
  from datetime import datetime, date
17
18
  from decimal import Decimal, ROUND_UP
@@ -92,9 +93,14 @@ class ImageManager:
92
93
  "project", "--share-type", help="Share - Type: 'project' or 'domain'"
93
94
  ),
94
95
  check: bool = typer.Option(
96
+ True,
97
+ "--check/--no-check",
98
+ help="Check the local image definitions against the SCS Image Metadata Standard (and process the images)",
99
+ ),
100
+ check_only: bool = typer.Option(
95
101
  False,
96
- "--check",
97
- help="Check the local image definitions against the SCS Image Metadata Standard",
102
+ "--check-only",
103
+ help="Quit after checking the image definitions against the SCS Image Metadata Standard",
98
104
  ),
99
105
  ):
100
106
  self.CONF = Munch.fromDict(locals())
@@ -209,11 +215,14 @@ class ImageManager:
209
215
  )
210
216
 
211
217
  # check local image definitions with yamale
212
- if self.CONF.check:
218
+ if self.CONF.check or self.CONF.check_only:
213
219
  self.validate_yaml_schema()
214
220
 
221
+ if self.CONF.check_only:
222
+ return
223
+
215
224
  # share image (previously share.py)
216
- elif self.CONF.share_image:
225
+ if self.CONF.share_image:
217
226
  self.create_connection()
218
227
  image = self.conn.get_image(self.CONF.share_image)
219
228
 
@@ -355,6 +364,9 @@ class ImageManager:
355
364
  if "image_description" not in image["meta"]:
356
365
  image["meta"]["image_description"] = image["name"]
357
366
 
367
+ if "image_name" not in image["meta"]:
368
+ image["meta"]["image_name"] = image["name"]
369
+
358
370
  existing_images, imported_image, previous_image = self.process_image(
359
371
  image, versions, sorted_versions, image["meta"].copy()
360
372
  )
@@ -362,7 +374,7 @@ class ImageManager:
362
374
 
363
375
  if imported_image and image["multi"]:
364
376
  self.rename_images(
365
- image["name"], sorted_versions, imported_image, previous_image
377
+ image, sorted_versions, imported_image, previous_image
366
378
  )
367
379
 
368
380
  return managed_images
@@ -511,11 +523,14 @@ class ImageManager:
511
523
  previous_image = None
512
524
  upstream_checksum = ""
513
525
 
526
+ separator = image.get("separator", " ")
527
+ image_name = image["name"]
528
+
514
529
  for version in sorted_versions:
515
530
  if image["multi"]:
516
- name = f"{image['name']} ({version})"
531
+ name = f"{image_name}{separator}({version})"
517
532
  else:
518
- name = f"{image['name']} {version}"
533
+ name = f"{image_name}{separator}{version}"
519
534
 
520
535
  logger.info(f"Processing image '{name}'")
521
536
  logger.debug(f"Checking existence of '{name}'")
@@ -550,7 +565,7 @@ class ImageManager:
550
565
  and version == sorted_versions[-1]
551
566
  and not existence
552
567
  ):
553
- previous = f"{image['name']} ({sorted_versions[-2]})"
568
+ previous = f"{image['name']}{separator}({sorted_versions[-2]})"
554
569
  existence = previous in cloud_images and image["name"] in cloud_images
555
570
 
556
571
  elif (
@@ -825,7 +840,7 @@ class ImageManager:
825
840
 
826
841
  def rename_images(
827
842
  self,
828
- name: str,
843
+ image: dict,
829
844
  sorted_versions: list,
830
845
  imported_image: Image,
831
846
  previous_image: Image,
@@ -834,16 +849,18 @@ class ImageManager:
834
849
  Rename outdated images in Glance (only applies to images of type multi)
835
850
 
836
851
  Params:
837
- name: the name of the image from images.yml
852
+ image: image dict from images.yml
838
853
  sorted_versions: list with all sorted image versions
839
854
  imported_image: the newly imported image
840
855
  previous_image: the previous latest image
841
856
  """
857
+ name = image["name"]
858
+ separator = image.get("separator", " ")
842
859
  cloud_images = self.get_images()
843
860
 
844
861
  if len(sorted_versions) > 1:
845
- latest = f"{name} ({sorted_versions[-1]})"
846
- previous_latest = f"{name} ({sorted_versions[-2]})"
862
+ latest = f"{name}{separator}({sorted_versions[-1]})"
863
+ previous_latest = f"{name}{separator}({sorted_versions[-2]})"
847
864
 
848
865
  if name in cloud_images and previous_latest not in cloud_images:
849
866
  logger.info(f"Renaming {name} to {previous_latest}")
@@ -865,7 +882,7 @@ class ImageManager:
865
882
  )
866
883
  create_date = create_date.replace("-", "")
867
884
 
868
- previous_latest = f"{name} ({create_date})"
885
+ previous_latest = f"{name}{separator}({create_date})"
869
886
 
870
887
  logger.info(
871
888
  f"Setting internal_version: {create_date} for {previous_latest}"
@@ -874,9 +891,7 @@ class ImageManager:
874
891
  previous_image.id, **{"internal_version": create_date}
875
892
  )
876
893
  else:
877
- previous_latest = (
878
- f"{name} ({previous_image['properties']['internal_version']})"
879
- )
894
+ previous_latest = f"{name}{separator}({previous_image['properties']['internal_version']})"
880
895
 
881
896
  logger.info(f"Renaming old latest '{name}' to '{previous_latest}'")
882
897
  self.conn.image.update_image(previous_image.id, name=previous_latest)
@@ -885,7 +900,7 @@ class ImageManager:
885
900
  self.conn.image.update_image(imported_image.id, name=name)
886
901
 
887
902
  elif len(sorted_versions) == 1:
888
- latest = f"{name} ({sorted_versions[-1]})"
903
+ latest = f"{name}{separator}({sorted_versions[-1]})"
889
904
 
890
905
  if latest in cloud_images:
891
906
  logger.info(f"Renaming {latest} to {name}")
@@ -1100,25 +1115,37 @@ class ImageManager:
1100
1115
 
1101
1116
  def validate_yaml_schema(self):
1102
1117
  """Validate all image.yaml files against the SCS Metadata spec"""
1103
- schema = yamale.make_schema("etc/schema.yaml")
1104
1118
  try:
1119
+ # We are a pip package
1120
+ schema_data = pkgutil.get_data(__name__, "etc/schema.yaml").decode("utf-8")
1121
+ schema = yamale.make_schema(content=schema_data)
1122
+ except Exception:
1123
+ # We are a cloned repo
1124
+ schema = yamale.make_schema("etc/schema.yaml")
1125
+ try:
1126
+ validation_error_log = []
1105
1127
  for file in os.listdir(self.CONF.images):
1106
1128
  try:
1107
1129
  data = yamale.make_data(self.CONF.images + file)
1108
1130
  yamale.validate(schema, data)
1109
1131
  except YamaleError as e:
1110
- self.exit_with_error = True
1111
1132
  for result in e.results:
1112
1133
  logger.error(
1113
1134
  f"Error validating data '{result.data}' with '{result.schema}'"
1114
1135
  )
1115
1136
  for error in result.errors:
1116
1137
  logger.error(f"\t{error}")
1138
+ validation_error_log.append((file, error))
1117
1139
  else:
1118
1140
  logger.debug(f"Image file {file} is valid")
1119
1141
  except FileNotFoundError:
1120
1142
  logger.error(f"Invalid path '{self.CONF.images}'")
1121
1143
 
1144
+ if len(validation_error_log) > 0:
1145
+ sys.exit(
1146
+ f"Image definition validation failed with these error(s): {validation_error_log}"
1147
+ )
1148
+
1122
1149
  def share_image_with_project(self, image, project):
1123
1150
  member = self.conn.image.find_member(project.id, image.id)
1124
1151