Freeze break request: Change Atomic image name for fedmsg in autocloud

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

For F24 onwards the Atomic image names have been changed, we need a
hotfix for the same in autocloud. Can I please get enough +1 for the
following patch?

diff --git a/autocloud/consumer.py b/autocloud/consumer.py
index c70cde9..15e9bed 100644
--- a/autocloud/consumer.py
+++ b/autocloud/consumer.py
@@ -37,11 +37,8 @@ class AutoCloudConsumer(fedmsg.consumers.FedmsgConsumer):
 
         if autocloud.VIRTUALBOX:
             _supported_images = ('Fedora-Cloud-Base-Vagrant',
-                                 'Fedora-Cloud-Atomic-Vagrant',)
-        else:
-            _supported_images = ('Fedora-Cloud-Base-Vagrant',
                                  'Fedora-Cloud-Atomic-Vagrant',
-                                 'Fedora-Cloud-Atomic', 'Fedora-Cloud-Base',)
+                                 'Fedora-Atomic-Vagrant',)
 
         for build in builds:
             log.info('Got Koji build {0}'.format(build))
@@ -57,7 +54,20 @@ class AutoCloudConsumer(fedmsg.consumers.FedmsgConsumer):
             #TODO: Change to get the release information from PDC instead
             # of koji once it is set up
             release = task_result.get('version')
-            if name in _supported_images:
+            if autocloud.VIRTUALBOX:
+                if name in _supported_images:
+                    task_relpath = koji.pathinfo.taskrelpath(int(builds[0]))
+                    url = get_image_url(task_result.get('files'), task_relpath)
+                    if url:
+                        name = get_image_name(image_name=name)
+                        data = {
+                            'buildid': builds[0],
+                            'image_url': url,
+                            'name': name,
+                            'release': release,
+                        }
+                        image_files.append(data)
+            else:
                 task_relpath = koji.pathinfo.taskrelpath(int(builds[0]))
                 url = get_image_url(task_result.get('files'), task_relpath)
                 if url:
@@ -80,8 +90,9 @@ class AutoCloudConsumer(fedmsg.consumers.FedmsgConsumer):
                     continue
 
                 name = result[0].get('name')
-                if name not in _supported_images:
-                    continue
+                if autocloud.VIRTUALBOX:
+                    if name not in _supported_images:
+                        continue
 
                 #TODO: Change to get the release information from PDC instead
                 # of koji once it is set up

Kushal
-- 
Fedora Cloud Engineer
CPython Core Developer
https://kushaldas.in
https://dgplug.org
_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux