Пример #1
0
def install_termserver():
    hookenv.status_set('maintenance', 'fetching termserver')
    try:
        # TODO for now, we save both termserver resources. In the future, this
        # may be streamlined to only save one at a time as needed.
        jujushell.save_resource('termserver', jujushell.termserver_path())
        jujushell.save_resource('limited-termserver',
                                jujushell.termserver_path(limited=True))
    except OSError as err:
        hookenv.status_set('blocked',
                           'termserver resource not available: {}'.format(err))
Пример #2
0
def import_image():
    hookenv.status_set('maintenance', 'importing termserver images')
    limited = hookenv.config()['limit-termserver']
    jujushell.import_lxd_image('termserver',
                               jujushell.termserver_path(limited=limited))