def do_save(args, env):

    with env.let(quiet=True):
        login.default_login()
        keypair.default_keypair()
        manif = manifest.default_manifest(required=False)

    app = application.default_application(args.application)
    appname = app['name']
    project, defname, instance = appname.split(':')

    state = application.get_application_state(app)
    if state not in ('STOPPED', 'STARTED'):
        error.raise_error('Application `{0}:{1}` is currently in state {2}.\n'
                          'Can only create blueprint when STOPPED or STARTED.',
                          defname, instance, state)

    if state == 'STARTED' and not env.always_confirm:
        console.info('Application `{0}:{1}` is currently running.',
                     defname, instance)
        result = console.confirm('Do you want to continue with a live snapshot')
        if not result:
            console.info('Not confirmed.')
            return error.EX_OK

    template = '{0}:{1}'.format(project, defname)
    bpname = util.get_unused_name(template, cache.get_blueprints())
    parts = bpname.split(':')

    console.info('Saving blueprint as `{0}:{1}`.', parts[1], parts[2])

    blueprint = env.api.create_blueprint(bpname, app)
    env.blueprint = blueprint  # for tests

    console.info('Blueprint creation process started.')
    console.info("Use 'ravtest ps -b' to monitor progress.")

    return error.EX_OK
The "ravello save" command.
dataset/ETHPy150Open ravello/testmill/lib/testmill/command_save.py/do_save