Revision 60ddcdc3

b/ci/new_config
19 19
# Configuration of git (on remote server)
20 20
git_config_name = Buildbot
21 21
git_config_mail = synnefo@builder.dev.grnet.gr
22
# Url to fetch ssh public keys
23
public_ssh_keys_url =
24 22
# Network address from which we allow access to server. If not set, access
25 23
# to server is not restricted.
26 24
filter_access_network =
......
38 36
flavor_id = 639
39 37
# Image to use (name must contain this)
40 38
image_name = OldStable
41
# UUID of owner of system images
42
# (25ecced9-bf53-4145-91ee-cf47377e9fb2 for production,
43
#  04cbe33f-29b7-4ef1-94fb-015929e5fc06 for okeanos.io)
44
system_uuid = 04cbe33f-29b7-4ef1-94fb-015929e5fc06
45 39

  
46 40

  
47 41
[Burnin]
b/ci/utils.py
19 19
from kamaki.clients.image import ImageClient
20 20

  
21 21
DEFAULT_CONFIG_FILE = "new_config"
22
# UUID of owner of system images
23
DEFAULT_SYSTEM_IMAGES_UUID = [
24
    "25ecced9-bf53-4145-91ee-cf47377e9fb2",  # production (okeanos.grnet.gr)
25
    "04cbe33f-29b7-4ef1-94fb-015929e5fc06",  # testing (okeanos.io)
26
    ]
22 27

  
23 28

  
24 29
def _run(cmd, verbose):
......
249 254
    def _find_image(self):
250 255
        """Find a suitable image to use
251 256

  
252
        It has to belong to the `system_uuid' user and
253
        contain the word `image_name'
257
        It has to belong to one of the `DEFAULT_SYSTEM_IMAGES_UUID'
258
        users and contain the word given by `image_name' option.
254 259
        """
255
        system_uuid = self.config.get('Deployment', 'system_uuid')
256 260
        image_name = self.config.get('Deployment', 'image_name').lower()
257 261
        images = self.image_client.list_public(detail=True)['images']
258 262
        # Select images by `system_uuid' user
259
        images = [x for x in images if x['user_id'] == system_uuid]
263
        images = [x for x in images
264
                  if x['user_id'] in DEFAULT_SYSTEM_IMAGES_UUID]
260 265
        # Select images with `image_name' in their names
261
        images = \
262
            [x for x in images if x['name'].lower().find(image_name) != -1]
266
        images = [x for x in images
267
                  if x['name'].lower().find(image_name) != -1]
263 268
        # Let's select the first one
264 269
        return images[0]
265 270

  

Also available in: Unified diff