~openstack-charmers-next/charms/trusty/heat/trunk

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/fetch/__init__.py

  • Committer: James Page
  • Date: 2016-06-17 10:45:40 UTC
  • Revision ID: james.page@ubuntu.com-20160617104540-7au9f6zjse9ge9ud
Switch to using charm-store for amulet tests

All OpenStack charms are now directly published to the charm store
on landing; switch Amulet helper to resolve charms using the
charm store rather than bzr branches, removing the lag between
charm changes landing and being available for other charms to
use for testing.

This is also important for new layered charms where the charm must
be build and published prior to being consumable.

Change-Id: Ic06866dcd9c008726e0062efec3e936c7e4c396b

Show diffs side-by-side

added added

removed removed

Lines of Context:
398
398
    # We ONLY check for True here because can_handle may return a string
399
399
    # explaining why it can't handle a given source.
400
400
    handlers = [h for h in plugins() if h.can_handle(source) is True]
401
 
    installed_to = None
402
401
    for handler in handlers:
403
402
        try:
404
 
            installed_to = handler.install(source, *args, **kwargs)
 
403
            return handler.install(source, *args, **kwargs)
405
404
        except UnhandledSource as e:
406
405
            log('Install source attempt unsuccessful: {}'.format(e),
407
406
                level='WARNING')
408
 
    if not installed_to:
409
 
        raise UnhandledSource("No handler found for source {}".format(source))
410
 
    return installed_to
 
407
    raise UnhandledSource("No handler found for source {}".format(source))
411
408
 
412
409
 
413
410
def install_from_config(config_var_name):