Browse Source

Add image_source to containers

Previously when containers were added to the upstream kolla project or
added to our container list, the container build process might try and
build them when we execute kolla-build.  This change adds a image_source
parameter that is used to understand when we should and should not
attempt to build the container with kolla witht he 'overcloud container
image build' command.

Change-Id: I82d6e09c856f78c0b29d7324c59b5e00bf5ae04d
Closes-BUg: #1801969
(cherry picked from commit 8abbdeb423)
tags/9.6.0
Alex Schultz 9 months ago
parent
commit
74ec63dc35

+ 136
- 0
container-images/overcloud_containers.yaml View File

@@ -1,137 +1,273 @@
1 1
 container_images:
2 2
 - imagename: docker.io/tripleorocky/centos-binary-aodh-api:current-tripleo
3
+  image_source: kolla
3 4
 - imagename: docker.io/tripleorocky/centos-binary-aodh-evaluator:current-tripleo
5
+  image_source: kolla
4 6
 - imagename: docker.io/tripleorocky/centos-binary-aodh-listener:current-tripleo
7
+  image_source: kolla
5 8
 - imagename: docker.io/tripleorocky/centos-binary-aodh-notifier:current-tripleo
9
+  image_source: kolla
6 10
 - imagename: docker.io/tripleorocky/centos-binary-barbican-api:current-tripleo
11
+  image_source: kolla
7 12
 - imagename: docker.io/tripleorocky/centos-binary-barbican-keystone-listener:current-tripleo
13
+  image_source: kolla
8 14
 - imagename: docker.io/tripleorocky/centos-binary-barbican-worker:current-tripleo
15
+  image_source: kolla
9 16
 - imagename: docker.io/tripleorocky/centos-binary-ceilometer-central:current-tripleo
17
+  image_source: kolla
10 18
 - imagename: docker.io/tripleorocky/centos-binary-ceilometer-compute:current-tripleo
19
+  image_source: kolla
11 20
 - imagename: docker.io/tripleorocky/centos-binary-ceilometer-notification:current-tripleo
21
+  image_source: kolla
12 22
 - imagename: docker.io/tripleorocky/centos-binary-ceilometer-ipmi:current-tripleo
23
+  image_source: kolla
13 24
 - imagename: docker.io/tripleorocky/centos-binary-cinder-api:current-tripleo
25
+  image_source: kolla
14 26
 - imagename: docker.io/tripleorocky/centos-binary-cinder-backup:current-tripleo
27
+  image_source: kolla
15 28
 - imagename: docker.io/tripleorocky/centos-binary-cinder-scheduler:current-tripleo
29
+  image_source: kolla
16 30
 - imagename: docker.io/tripleorocky/centos-binary-cinder-volume:current-tripleo
31
+  image_source: kolla
17 32
 - imagename: docker.io/tripleorocky/centos-binary-collectd:current-tripleo
33
+  image_source: kolla
18 34
 - imagename: docker.io/tripleorocky/centos-binary-congress-api:current-tripleo
35
+  image_source: kolla
19 36
 - imagename: docker.io/tripleorocky/centos-binary-cron:current-tripleo
37
+  image_source: kolla
20 38
 - imagename: docker.io/tripleorocky/centos-binary-designate-api:current-tripleo
39
+  image_source: kolla
21 40
 - imagename: docker.io/tripleorocky/centos-binary-designate-backend-bind9:current-tripleo
41
+  image_source: kolla
22 42
 - imagename: docker.io/tripleorocky/centos-binary-designate-base:current-tripleo
43
+  image_source: kolla
23 44
 - imagename: docker.io/tripleorocky/centos-binary-designate-central:current-tripleo
45
+  image_source: kolla
24 46
 - imagename: docker.io/tripleorocky/centos-binary-designate-mdns:current-tripleo
47
+  image_source: kolla
25 48
 - imagename: docker.io/tripleorocky/centos-binary-designate-producer:current-tripleo
49
+  image_source: kolla
26 50
 - imagename: docker.io/tripleorocky/centos-binary-designate-sink:current-tripleo
51
+  image_source: kolla
27 52
 - imagename: docker.io/tripleorocky/centos-binary-designate-worker:current-tripleo
53
+  image_source: kolla
28 54
 - imagename: docker.io/tripleorocky/centos-binary-ec2-api:current-tripleo
55
+  image_source: kolla
29 56
 - imagename: docker.io/tripleorocky/centos-binary-etcd:current-tripleo
57
+  image_source: kolla
30 58
 - imagename: docker.io/tripleorocky/centos-binary-fluentd:current-tripleo
59
+  image_source: kolla
31 60
 - imagename: docker.io/tripleorocky/centos-binary-glance-api:current-tripleo
61
+  image_source: kolla
32 62
 - imagename: docker.io/tripleorocky/centos-binary-gnocchi-api:current-tripleo
63
+  image_source: kolla
33 64
 - imagename: docker.io/tripleorocky/centos-binary-gnocchi-metricd:current-tripleo
65
+  image_source: kolla
34 66
 - imagename: docker.io/tripleorocky/centos-binary-gnocchi-statsd:current-tripleo
67
+  image_source: kolla
35 68
 - imagename: docker.io/tripleorocky/centos-binary-haproxy:current-tripleo
69
+  image_source: kolla
36 70
 - imagename: docker.io/tripleorocky/centos-binary-heat-all:current-tripleo
71
+  image_source: kolla
37 72
 - imagename: docker.io/tripleorocky/centos-binary-heat-api-cfn:current-tripleo
73
+  image_source: kolla
38 74
 - imagename: docker.io/tripleorocky/centos-binary-heat-api:current-tripleo
75
+  image_source: kolla
39 76
 - imagename: docker.io/tripleorocky/centos-binary-heat-engine:current-tripleo
77
+  image_source: kolla
40 78
 - imagename: docker.io/tripleorocky/centos-binary-horizon:current-tripleo
79
+  image_source: kolla
41 80
 - imagename: docker.io/tripleorocky/centos-binary-ironic-api:current-tripleo
81
+  image_source: kolla
42 82
 - imagename: docker.io/tripleorocky/centos-binary-ironic-conductor:current-tripleo
83
+  image_source: kolla
43 84
 - imagename: docker.io/tripleorocky/centos-binary-ironic-inspector:current-tripleo
85
+  image_source: kolla
44 86
 - imagename: docker.io/tripleorocky/centos-binary-ironic-pxe:current-tripleo
87
+  image_source: kolla
45 88
 - imagename: docker.io/tripleorocky/centos-binary-ironic-neutron-agent:current-tripleo
89
+  image_source: kolla
46 90
 - imagename: docker.io/tripleorocky/centos-binary-iscsid:current-tripleo
91
+  image_source: kolla
47 92
 - imagename: docker.io/tripleorocky/centos-binary-keepalived:current-tripleo
93
+  image_source: kolla
48 94
 - imagename: docker.io/tripleorocky/centos-binary-keystone:current-tripleo
95
+  image_source: kolla
49 96
 - imagename: docker.io/tripleorocky/centos-binary-manila-api:current-tripleo
97
+  image_source: kolla
50 98
 - imagename: docker.io/tripleorocky/centos-binary-manila-base:current-tripleo
99
+  image_source: kolla
51 100
 - imagename: docker.io/tripleorocky/centos-binary-manila-scheduler:current-tripleo
101
+  image_source: kolla
52 102
 - imagename: docker.io/tripleorocky/centos-binary-manila-share:current-tripleo
103
+  image_source: kolla
53 104
 - imagename: docker.io/tripleorocky/centos-binary-mariadb:current-tripleo
105
+  image_source: kolla
54 106
 - imagename: docker.io/tripleorocky/centos-binary-memcached:current-tripleo
107
+  image_source: kolla
55 108
 - imagename: docker.io/tripleorocky/centos-binary-mistral-api:current-tripleo
109
+  image_source: kolla
56 110
 - imagename: docker.io/tripleorocky/centos-binary-mistral-engine:current-tripleo
111
+  image_source: kolla
57 112
 - imagename: docker.io/tripleorocky/centos-binary-mistral-executor:current-tripleo
113
+  image_source: kolla
58 114
 - imagename: docker.io/tripleorocky/centos-binary-mistral-event-engine:current-tripleo
115
+  image_source: kolla
59 116
 - imagename: docker.io/tripleorocky/centos-binary-multipathd:current-tripleo
117
+  image_source: kolla
60 118
 - imagename: docker.io/tripleorocky/centos-binary-neutron-dhcp-agent:current-tripleo
119
+  image_source: kolla
61 120
 - imagename: docker.io/tripleorocky/centos-binary-neutron-l3-agent:current-tripleo
121
+  image_source: kolla
62 122
 - imagename: docker.io/tripleorocky/centos-binary-neutron-metadata-agent:current-tripleo
123
+  image_source: kolla
63 124
 - imagename: docker.io/tripleorocky/centos-binary-neutron-openvswitch-agent:current-tripleo
125
+  image_source: kolla
64 126
 - imagename: docker.io/tripleorocky/centos-binary-neutron-sriov-agent:current-tripleo
127
+  image_source: kolla
65 128
 - imagename: docker.io/tripleorocky/centos-binary-neutron-server:current-tripleo
129
+  image_source: kolla
66 130
 - imagename: docker.io/tripleorocky/centos-binary-neutron-server-opendaylight:current-tripleo
131
+  image_source: kolla
67 132
 - imagename: docker.io/tripleorocky/centos-binary-neutron-server-ovn:current-tripleo
133
+  image_source: kolla
68 134
 - imagename: docker.io/tripleorocky/centos-binary-neutron-metadata-agent-ovn:current-tripleo
135
+  image_source: kolla
69 136
 - imagename: docker.io/tripleorocky/centos-binary-nova-api:current-tripleo
137
+  image_source: kolla
70 138
 - imagename: docker.io/tripleorocky/centos-binary-nova-compute-ironic:current-tripleo
139
+  image_source: kolla
71 140
 - imagename: docker.io/tripleorocky/centos-binary-nova-compute:current-tripleo
141
+  image_source: kolla
72 142
 - imagename: docker.io/tripleorocky/centos-binary-nova-conductor:current-tripleo
143
+  image_source: kolla
73 144
 - imagename: docker.io/tripleorocky/centos-binary-nova-consoleauth:current-tripleo
145
+  image_source: kolla
74 146
 - imagename: docker.io/tripleorocky/centos-binary-nova-libvirt:current-tripleo
147
+  image_source: kolla
75 148
 - imagename: docker.io/tripleorocky/centos-binary-nova-novncproxy:current-tripleo
149
+  image_source: kolla
76 150
 - imagename: docker.io/tripleorocky/centos-binary-nova-placement-api:current-tripleo
151
+  image_source: kolla
77 152
 - imagename: docker.io/tripleorocky/centos-binary-nova-scheduler:current-tripleo
153
+  image_source: kolla
78 154
 - imagename: docker.io/tripleorocky/centos-binary-novajoin-notifier:current-tripleo
155
+  image_source: kolla
79 156
 - imagename: docker.io/tripleorocky/centos-binary-novajoin-server:current-tripleo
157
+  image_source: kolla
80 158
 - imagename: docker.io/tripleorocky/centos-binary-octavia-base:current-tripleo
159
+  image_source: kolla
81 160
 - imagename: docker.io/tripleorocky/centos-binary-octavia-api:current-tripleo
161
+  image_source: kolla
82 162
 - imagename: docker.io/tripleorocky/centos-binary-octavia-health-manager:current-tripleo
163
+  image_source: kolla
83 164
 - imagename: docker.io/tripleorocky/centos-binary-octavia-housekeeping:current-tripleo
165
+  image_source: kolla
84 166
 - imagename: docker.io/tripleorocky/centos-binary-octavia-worker:current-tripleo
167
+  image_source: kolla
85 168
 - imagename: docker.io/tripleorocky/centos-binary-opendaylight:current-tripleo
169
+  image_source: kolla
86 170
 - imagename: docker.io/tripleorocky/centos-binary-ovn-base:current-tripleo
171
+  image_source: kolla
87 172
 - imagename: docker.io/tripleorocky/centos-binary-ovn-controller:current-tripleo
173
+  image_source: kolla
88 174
 - imagename: docker.io/tripleorocky/centos-binary-ovn-nb-db-server:current-tripleo
175
+  image_source: kolla
89 176
 - imagename: docker.io/tripleorocky/centos-binary-ovn-northd:current-tripleo
177
+  image_source: kolla
90 178
 - imagename: docker.io/tripleorocky/centos-binary-ovn-sb-db-server:current-tripleo
179
+  image_source: kolla
91 180
 - imagename: docker.io/tripleorocky/centos-binary-panko-api:current-tripleo
181
+  image_source: kolla
92 182
 - imagename: docker.io/tripleorocky/centos-binary-qdrouterd:current-tripleo
183
+  image_source: kolla
93 184
 - imagename: docker.io/tripleorocky/centos-binary-rabbitmq:current-tripleo
185
+  image_source: kolla
94 186
 - imagename: docker.io/tripleorocky/centos-binary-redis:current-tripleo
187
+  image_source: kolla
95 188
 - imagename: docker.io/tripleorocky/centos-binary-sahara-api:current-tripleo
189
+  image_source: kolla
96 190
 - imagename: docker.io/tripleorocky/centos-binary-sahara-engine:current-tripleo
191
+  image_source: kolla
97 192
 - imagename: docker.io/tripleorocky/centos-binary-sensu-client:current-tripleo
193
+  image_source: kolla
98 194
 - imagename: docker.io/tripleorocky/centos-binary-skydive-agent:current-tripleo
195
+  image_source: kolla
99 196
 - imagename: docker.io/tripleorocky/centos-binary-skydive-analyzer:current-tripleo
197
+  image_source: kolla
100 198
 - imagename: docker.io/tripleorocky/centos-binary-swift-account:current-tripleo
199
+  image_source: kolla
101 200
 - imagename: docker.io/tripleorocky/centos-binary-swift-container:current-tripleo
201
+  image_source: kolla
102 202
 - imagename: docker.io/tripleorocky/centos-binary-swift-object:current-tripleo
203
+  image_source: kolla
103 204
 - imagename: docker.io/tripleorocky/centos-binary-swift-proxy-server:current-tripleo
205
+  image_source: kolla
104 206
 - imagename: docker.io/tripleorocky/centos-binary-tripleo-ui:current-tripleo
207
+  image_source: kolla
105 208
 - imagename: docker.io/tripleorocky/centos-binary-zaqar:current-tripleo
209
+  image_source: kolla
106 210
 - imagename: docker.io/ceph/daemon:v3.2.1-stable-3.2-luminous-centos-7-x86_64
211
+  image_source: ceph
107 212
 - imagename: docker.io/tripleorocky/centos-binary-tempest:current-tripleo
213
+  image_source: kolla
108 214
 - imagename: docker.io/tripleorocky/centos-binary-rsyslog-base:current-tripleo
215
+  image_source: kolla
109 216
 - imagename: docker.io/openshift/origin-ansible:v3.11.0
217
+  image_source: openshift
110 218
 - imagename: docker.io/openshift/origin-console:v3.11.0
219
+  image_source: openshift
111 220
 - imagename: docker.io/openshift/origin-control-plane:v3.11.0
221
+  image_source: openshift
112 222
 - imagename: docker.io/openshift/origin-deployer:v3.11.0
223
+  image_source: openshift
113 224
 - imagename: docker.io/openshift/origin-docker-builder:v3.11.0
225
+  image_source: openshift
114 226
 - imagename: docker.io/openshift/origin-docker-registry:v3.11.0
227
+  image_source: openshift
115 228
 - imagename: docker.io/openshift/origin-haproxy-router:v3.11.0
229
+  image_source: openshift
116 230
 - imagename: docker.io/openshift/origin-node:v3.11.0
231
+  image_source: openshift
117 232
 - imagename: docker.io/openshift/origin-pod:v3.11.0
233
+  image_source: openshift
118 234
 - imagename: docker.io/openshift/origin-service-catalog:v3.11.0
235
+  image_source: openshift
119 236
 - imagename: docker.io/openshift/origin-template-service-broker:v3.11.0
237
+  image_source: openshift
120 238
 - imagename: docker.io/ansibleplaybookbundle/origin-ansible-service-broker:latest
239
+  image_source: openshift
121 240
 - imagename: docker.io/openshift/origin-web-console:v3.11.0
241
+  image_source: openshift
122 242
 - imagename: docker.io/cockpit/kubernetes:latest
243
+  image_source: openshift
123 244
 - imagename: registry.fedoraproject.org/latest/etcd:latest
245
+  image_source: openshift
124 246
 - imagename: docker.io/gluster/gluster-centos:latest
247
+  image_source: openshift
125 248
 - imagename: docker.io/gluster/glusterblock-provisioner:latest
249
+  image_source: openshift
126 250
 - imagename: docker.io/heketi/heketi:latest
251
+  image_source: openshift
127 252
 - imagename: docker.io/tripleorocky/coreos-cluster-monitoring-operator:v0.1.1
253
+  image_source: openshift
128 254
 - imagename: docker.io/tripleorocky/coreos-configmap-reload:v0.0.1
255
+  image_source: openshift
129 256
 - imagename: docker.io/tripleorocky/coreos-prometheus-operator:v0.23.2
257
+  image_source: openshift
130 258
 - imagename: docker.io/tripleorocky/coreos-prometheus-config-reloader:v0.23.2
259
+  image_source: openshift
131 260
 - imagename: docker.io/openshift/prometheus:v2.3.2
261
+  image_source: openshift
132 262
 - imagename: docker.io/openshift/prometheus-alertmanager:v0.15.2
263
+  image_source: openshift
133 264
 - imagename: docker.io/openshift/prometheus-node-exporter:v0.16.0
265
+  image_source: openshift
134 266
 - imagename: docker.io/openshift/oauth-proxy:v1.1.0
267
+  image_source: openshift
135 268
 - imagename: docker.io/tripleorocky/coreos-kube-rbac-proxy:v0.3.1
269
+  image_source: openshift
136 270
 - imagename: docker.io/tripleorocky/coreos-kube-state-metrics:v1.3.1
271
+  image_source: openshift
137 272
 - imagename: docker.io/grafana/grafana:5.2.1
273
+  image_source: openshift

+ 136
- 0
container-images/overcloud_containers.yaml.j2
File diff suppressed because it is too large
View File


+ 3
- 0
tripleo_common/image/kolla_builder.py View File

@@ -434,6 +434,9 @@ class KollaImageBuilder(base.BaseImageManager):
434 434
         container_images = self.load_config_files(self.CONTAINER_IMAGES) or []
435 435
         container_images.sort(key=lambda i: i.get('imagename'))
436 436
         for i in container_images:
437
+            # Do not attempt to build containers that are not from kolla
438
+            if not i.get('image_source', '') == 'kolla':
439
+                continue
437 440
             image = self.imagename_to_regex(i.get('imagename'))
438 441
             if image:
439 442
                 cmd.append(image)

+ 80
- 28
tripleo_common/tests/image/test_kolla_builder.py View File

@@ -41,26 +41,40 @@ kb.init_prepare_defaults(DEFAULTS_PATH)
41 41
 
42 42
 filedata = six.u("""container_images:
43 43
 - imagename: docker.io/tripleorocky/heat-docker-agents-centos:latest
44
+  image_source: kolla
44 45
   push_destination: localhost:8787
45 46
 - imagename: docker.io/tripleorocky/centos-binary-nova-compute:liberty
47
+  image_source: kolla
46 48
   uploader: docker
47 49
   push_destination: localhost:8787
48 50
 - imagename: docker.io/tripleorocky/centos-binary-nova-libvirt:liberty
51
+  image_source: kolla
49 52
   uploader: docker
50 53
 - imagename: docker.io/tripleorocky/image-with-missing-tag
54
+  image_source: kolla
55
+  push_destination: localhost:8787
56
+- imagename: docker.io/tripleorocky/skip-build
57
+  image_source: foo
51 58
   push_destination: localhost:8787
52 59
 """)
53 60
 
54 61
 template_filedata = six.u("""
55 62
 container_images_template:
56 63
 - imagename: "{{namespace}}/heat-docker-agents-centos:latest"
64
+  image_source: kolla
57 65
   push_destination: "{{push_destination}}"
58 66
 - imagename: "{{namespace}}/{{name_prefix}}nova-compute{{name_suffix}}:{{tag}}"
67
+  image_source: kolla
59 68
   uploader: "docker"
60 69
   push_destination: "{{push_destination}}"
61 70
 - imagename: "{{namespace}}/{{name_prefix}}nova-libvirt{{name_suffix}}:{{tag}}"
71
+  image_source: kolla
62 72
   uploader: "docker"
63 73
 - imagename: "{{namespace}}/image-with-missing-tag"
74
+  image_source: kolla
75
+  push_destination: "{{push_destination}}"
76
+- imagename: "{{namespace}}/skip-build"
77
+  image_source: foo
64 78
   push_destination: "{{push_destination}}"
65 79
 """)
66 80
 
@@ -385,18 +399,25 @@ class TestKollaImageBuilderTemplate(base.TestCase):
385 399
             tag='liberty'
386 400
         )
387 401
         container_images = [{
402
+            'image_source': 'kolla',
388 403
             'imagename': 'docker.io/tripleorocky/'
389 404
                          'centos-binary-nova-compute:liberty',
390 405
             'push_destination': 'localhost:8787',
391 406
             'uploader': 'docker'
392 407
         }, {
408
+            'image_source': 'kolla',
393 409
             'imagename': 'docker.io/tripleorocky/'
394 410
                          'centos-binary-nova-libvirt:liberty',
395 411
             'push_destination': 'localhost:8787',
396 412
             'uploader': 'docker'
397 413
         }, {
414
+            'image_source': 'kolla',
398 415
             'imagename': 'docker.io/tripleorocky/image-with-missing-tag',
399 416
             'push_destination': 'localhost:8787'
417
+        }, {
418
+            'image_source': 'foo',
419
+            'imagename': 'docker.io/tripleorocky/skip-build',
420
+            'push_destination': 'localhost:8787'
400 421
         }]
401 422
         self.assertEqual(container_images, result)
402 423
 
@@ -437,23 +458,32 @@ class TestKollaImageBuilderTemplate(base.TestCase):
437 458
 
438 459
     def test_container_images_yaml_in_sync(self):
439 460
         remove_images = [
440
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
461
+            {'image_source': 'kolla',
462
+             'imagename': 'docker.io/tripleorocky/centos-binary'
441 463
                           '-neutron-server-opendaylight:current-tripleo'},
442
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
464
+            {'image_source': 'kolla',
465
+             'imagename': 'docker.io/tripleorocky/centos-binary'
443 466
                           '-neutron-server-ovn:current-tripleo'},
444
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
467
+            {'image_source': 'kolla',
468
+             'imagename': 'docker.io/tripleorocky/centos-binary'
445 469
                           '-ovn-base:current-tripleo'},
446
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
470
+            {'image_source': 'kolla',
471
+             'imagename': 'docker.io/tripleorocky/centos-binary'
447 472
                           '-opendaylight:current-tripleo'},
448
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
473
+            {'image_source': 'kolla',
474
+             'imagename': 'docker.io/tripleorocky/centos-binary'
449 475
                           '-ovn-northd:current-tripleo'},
450
-            {'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
476
+            {'image_source': 'kolla',
477
+             'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
451 478
                           'controller:current-tripleo'},
452
-            {'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
479
+            {'image_source': 'kolla',
480
+             'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
453 481
                           'nb-db-server:current-tripleo'},
454
-            {'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
482
+            {'image_source': 'kolla',
483
+             'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
455 484
                           'sb-db-server:current-tripleo'},
456
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
485
+            {'image_source': 'kolla',
486
+             'imagename': 'docker.io/tripleorocky/centos-binary'
457 487
                           '-neutron-metadata-agent-ovn:current-tripleo'}]
458 488
         self._test_container_images_yaml_in_sync_helper(
459 489
             remove_images=remove_images)
@@ -461,21 +491,29 @@ class TestKollaImageBuilderTemplate(base.TestCase):
461 491
     def test_container_images_yaml_in_sync_for_odl(self):
462 492
         # remove neutron-server image reference from overcloud_containers.yaml
463 493
         remove_images = [
464
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
494
+            {'image_source': 'kolla',
495
+             'imagename': 'docker.io/tripleorocky/centos-binary'
465 496
                           '-neutron-server:current-tripleo'},
466
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
497
+            {'image_source': 'kolla',
498
+             'imagename': 'docker.io/tripleorocky/centos-binary'
467 499
                           '-neutron-server-ovn:current-tripleo'},
468
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
500
+            {'image_source': 'kolla',
501
+             'imagename': 'docker.io/tripleorocky/centos-binary'
469 502
                           '-ovn-base:current-tripleo'},
470
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
503
+            {'image_source': 'kolla',
504
+             'imagename': 'docker.io/tripleorocky/centos-binary'
471 505
                           '-ovn-northd:current-tripleo'},
472
-            {'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
506
+            {'image_source': 'kolla',
507
+             'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
473 508
                           'controller:current-tripleo'},
474
-            {'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
509
+            {'image_source': 'kolla',
510
+             'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
475 511
                           'nb-db-server:current-tripleo'},
476
-            {'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
512
+            {'image_source': 'kolla',
513
+             'imagename': 'docker.io/tripleorocky/centos-binary-ovn-'
477 514
                           'sb-db-server:current-tripleo'},
478
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
515
+            {'image_source': 'kolla',
516
+             'imagename': 'docker.io/tripleorocky/centos-binary'
479 517
                           '-neutron-metadata-agent-ovn:current-tripleo'}]
480 518
         self._test_container_images_yaml_in_sync_helper(
481 519
             neutron_driver='odl', remove_images=remove_images)
@@ -483,11 +521,14 @@ class TestKollaImageBuilderTemplate(base.TestCase):
483 521
     def test_container_images_yaml_in_sync_for_ovn(self):
484 522
         # remove neutron-server image reference from overcloud_containers.yaml
485 523
         remove_images = [
486
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
524
+            {'image_source': 'kolla',
525
+             'imagename': 'docker.io/tripleorocky/centos-binary'
487 526
                           '-neutron-server:current-tripleo'},
488
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
527
+            {'image_source': 'kolla',
528
+             'imagename': 'docker.io/tripleorocky/centos-binary'
489 529
                           '-neutron-server-opendaylight:current-tripleo'},
490
-            {'imagename': 'docker.io/tripleorocky/centos-binary'
530
+            {'image_source': 'kolla',
531
+             'imagename': 'docker.io/tripleorocky/centos-binary'
491 532
                           '-opendaylight:current-tripleo'}]
492 533
         self._test_container_images_yaml_in_sync_helper(
493 534
             neutron_driver='ovn', remove_images=remove_images)
@@ -547,7 +588,8 @@ class TestPrepare(base.TestCase):
547 588
     def test_prepare_simple(self, mock_get):
548 589
         self.assertEqual({
549 590
             'container_images.yaml': [
550
-                {'imagename': '192.0.2.0:8787/t/p-nova-compute:l'}
591
+                {'image_source': 'kolla',
592
+                 'imagename': '192.0.2.0:8787/t/p-nova-compute:l'}
551 593
             ],
552 594
             'environments/containers-default-parameters.yaml': {
553 595
                 'DockerNovaComputeImage': '192.0.2.0:8787/t/p-nova-compute:l',
@@ -573,7 +615,8 @@ class TestPrepare(base.TestCase):
573 615
     def test_prepare_includes(self, mock_get):
574 616
         self.assertEqual({
575 617
             'container_images.yaml': [
576
-                {'imagename': '192.0.2.0:8787/t/p-nova-libvirt:l'}
618
+                {'image_source': 'kolla',
619
+                 'imagename': '192.0.2.0:8787/t/p-nova-libvirt:l'}
577 620
             ],
578 621
             'environments/containers-default-parameters.yaml': {
579 622
                 'DockerNovaLibvirtImage': '192.0.2.0:8787/t/p-nova-libvirt:l'
@@ -597,7 +640,8 @@ class TestPrepare(base.TestCase):
597 640
         # assert same result as includes only. includes trumps excludes
598 641
         self.assertEqual({
599 642
             'container_images.yaml': [
600
-                {'imagename': '192.0.2.0:8787/t/p-nova-libvirt:l'}
643
+                {'image_source': 'kolla',
644
+                 'imagename': '192.0.2.0:8787/t/p-nova-libvirt:l'}
601 645
             ],
602 646
             'environments/containers-default-parameters.yaml': {
603 647
                 'DockerNovaLibvirtImage': '192.0.2.0:8787/t/p-nova-libvirt:l'
@@ -621,6 +665,7 @@ class TestPrepare(base.TestCase):
621 665
     def test_prepare_push_dest(self, mock_get):
622 666
         self.assertEqual({
623 667
             'container_images.yaml': [{
668
+                'image_source': 'kolla',
624 669
                 'imagename': 'docker.io/t/p-nova-api:l',
625 670
                 'push_destination': '192.0.2.0:8787',
626 671
             }],
@@ -655,6 +700,7 @@ class TestPrepare(base.TestCase):
655 700
         mock_gur.return_value = '192.0.2.0:8787'
656 701
         self.assertEqual({
657 702
             'container_images.yaml': [{
703
+                'image_source': 'kolla',
658 704
                 'imagename': 'docker.io/t/p-nova-api:l',
659 705
                 'push_destination': '192.0.2.0:8787',
660 706
             }],
@@ -687,6 +733,7 @@ class TestPrepare(base.TestCase):
687 733
     def test_prepare_ceph(self, mock_get):
688 734
         self.assertEqual({
689 735
             'container_images.yaml': [{
736
+                'image_source': 'ceph',
690 737
                 'imagename': '192.0.2.0:8787/t/ceph:l',
691 738
             }],
692 739
             'environments/containers-default-parameters.yaml': {
@@ -709,7 +756,8 @@ class TestPrepare(base.TestCase):
709 756
     def test_prepare_neutron_driver_default(self, mock_get):
710 757
         self.assertEqual({
711 758
             'container_images.yaml': [
712
-                {'imagename': 't/p-neutron-server:l'}
759
+                {'image_source': 'kolla',
760
+                 'imagename': 't/p-neutron-server:l'}
713 761
             ],
714 762
             'environments/containers-default-parameters.yaml': {
715 763
                 'DockerNeutronApiImage': 't/p-neutron-server:l',
@@ -736,8 +784,10 @@ class TestPrepare(base.TestCase):
736 784
     def test_prepare_neutron_driver_ovn(self, mock_get):
737 785
         self.assertEqual({
738 786
             'container_images.yaml': [
739
-                {'imagename': 't/p-neutron-server-ovn:l'},
740
-                {'imagename': 't/p-ovn-controller:l'}
787
+                {'image_source': 'kolla',
788
+                 'imagename': 't/p-neutron-server-ovn:l'},
789
+                {'image_source': 'kolla',
790
+                 'imagename': 't/p-ovn-controller:l'}
741 791
             ],
742 792
             'environments/containers-default-parameters.yaml': {
743 793
                 'DockerNeutronApiImage': 't/p-neutron-server-ovn:l',
@@ -767,8 +817,10 @@ class TestPrepare(base.TestCase):
767 817
     def test_prepare_neutron_driver_odl(self, mock_get):
768 818
         self.assertEqual({
769 819
             'container_images.yaml': [
770
-                {'imagename': 't/neutron-server-opendaylight:l'},
771
-                {'imagename': 't/opendaylight:l'}
820
+                {'image_source': 'kolla',
821
+                 'imagename': 't/neutron-server-opendaylight:l'},
822
+                {'image_source': 'kolla',
823
+                 'imagename': 't/opendaylight:l'}
772 824
             ],
773 825
             'environments/containers-default-parameters.yaml': {
774 826
                 'DockerNeutronApiImage': 't/neutron-server-opendaylight:l',

Loading…
Cancel
Save