autocloud, hotfix: Add the patch for the hotfix (F28 messages)
Signed-off-by: Sayan Chowdhury <sayan.chowdhury2012@gmail.com>
This commit is contained in:
parent
cbb62f1c37
commit
0b38aaa1ed
1 changed files with 10 additions and 2 deletions
|
@ -48,7 +48,6 @@ class AutoCloudConsumer(fedmsg.consumers.FedmsgConsumer):
|
|||
log.info('Received %r %r' % (msg['topic'], msg['body']['msg_id']))
|
||||
|
||||
STATUS_F = ('FINISHED_INCOMPLETE', 'FINISHED',)
|
||||
VARIANTS_F = ('CloudImages',)
|
||||
|
||||
images = []
|
||||
compose_db_update = False
|
||||
|
@ -56,6 +55,16 @@ class AutoCloudConsumer(fedmsg.consumers.FedmsgConsumer):
|
|||
status = msg_body['msg']['status']
|
||||
compose_images_json = None
|
||||
|
||||
# Till F27, both cloud-base and atomic images were available
|
||||
# under variant CloudImages. With F28 and onward releases,
|
||||
# cloud-base image compose moved to cloud variant and atomic images
|
||||
# moved under atomic variant.
|
||||
prev_rel = ['26', '27']
|
||||
if msg_body['msg']['release_version'] in prev_rel:
|
||||
VARIANTS_F = ('CloudImages',)
|
||||
else:
|
||||
VARIANTS_F = ('AtomicHost', 'Cloud')
|
||||
|
||||
if status in STATUS_F:
|
||||
location = msg_body['msg']['location']
|
||||
json_metadata = '{}/metadata/images.json'.format(location)
|
||||
|
@ -133,4 +142,3 @@ class AutoCloudConsumer(fedmsg.consumers.FedmsgConsumer):
|
|||
image.update({'pos': (pos+1, num_images)})
|
||||
|
||||
produce_jobs(images)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue