def fill_template(template_id, plan_id, **params):
app = PredefinedApp.get(template_id)
filled = app.get_filled_template_for_plan(plan_id, params, as_yaml=True)
return Response(filled, content_type='application/x-yaml')
# TODO Apps API instead of "/create/", "/switch/", and "/update/":
# GET /apps/<app-id>/ - return list of pods (with only one pod, for now),
# template id, plan id, version id, app variables, is update available,
# is switching allowed, postDescriotion,..
# POST /apps/ - {templateID, planID, [appVariables,] [start,] [owner,]} ->
# instead of "/create/"
# PUT /apps/<app-id>/ - {versionID or planID} for update or switching plan
# DELETE /apps/<app-id>/ - delete all pods (only one pod, for now)
# for now, app_id may be equal to pod_id.
# apps = Blueprint('apps_api', __name__, url_prefix='/apps')
评论列表
文章目录