How to use the jumbo.utils.session.svars.get function in jumbo

To help you get started, we’ve selected a few jumbo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adaltas / jumbo / jumbo / cli / View on Github external
def exit(ctx):
    """Reset current context.

    :param ctx: Click context

    if ss.svars.get('cluster'):
        ss.svars['cluster'] = None
        ctx.meta['jumbo_shell'].prompt ='jumbo > ', fg='green')
        click.echo('Use "quit" to quit the shell. Exit only removes context.')
github adaltas / jumbo / jumbo / core / View on Github external
def list_bundles():
    """List bundles of the current cluster and available bundles"""

    path_list = [f.path.split('/')[-1]
                 for f in os.scandir(JUMBODIR+'bundles') if f.is_dir()]
    return (ss.svars.get('bundles', []), path_list)