本文整理汇总了Python中savanna.utils.api.render函数的典型用法代码示例。如果您正苦于以下问题:Python render函数的具体用法?Python render怎么用?Python render使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了render函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: templates_list
def templates_list():
try:
return api_u.render(
node_templates=[nt.dict for nt in api.get_node_templates()])
except Exception, e:
return api_u.internal_error(500,
"Exception while listing NodeTemplates", e)
开发者ID:Frostman,项目名称:savanna,代码行数:7,代码来源:v02.py
示例2: clusters_list
def clusters_list():
tenant_id = request.headers['X-Tenant-Id']
try:
return api_u.render(
clusters=[c.dict for c in api.get_clusters(tenant_id=tenant_id)])
except Exception, e:
return api_u.internal_error(500, 'Exception while listing Clusters', e)
开发者ID:Frostman,项目名称:savanna,代码行数:7,代码来源:v02.py
示例3: version_list
def version_list():
context.set_ctx(None)
return api_utils.render({
"versions": [
{"id": "v1.0", "status": "CURRENT"}
]
})
开发者ID:akshayms,项目名称:savanna,代码行数:7,代码来源:main.py
示例4: job_execute
def job_execute(job_id, data):
input = data['input_id']
output = data['output_id']
cluster = data['cluster_id']
configs = data.get('job_configs', {})
return u.render(job_execution=api.execute_job(job_id, input,
output, cluster,
configs).to_dict())
开发者ID:StokesB1,项目名称:savanna,代码行数:8,代码来源:v11.py
示例5: make_json_error
def make_json_error(ex):
status_code = (ex.code
if isinstance(ex, HTTPException)
else 500)
description = (ex.description
if isinstance(ex, HTTPException)
else str(ex))
return render({'error': status_code, 'error_message': description},
status=status_code)
开发者ID:Frostman,项目名称:savanna,代码行数:9,代码来源:main.py
示例6: job_binary_internal_list
def job_binary_internal_list():
return u.render(binaries=[j.to_dict() for j in
api.get_job_binary_internals()])
开发者ID:StokesB1,项目名称:savanna,代码行数:3,代码来源:v11.py
示例7: job_binary_internal_get
def job_binary_internal_get(job_binary_internal_id):
return u.render(api.get_job_binary_internal(job_binary_internal_id
).to_wrapped_dict())
开发者ID:StokesB1,项目名称:savanna,代码行数:3,代码来源:v11.py
示例8: job_executions_cancel
def job_executions_cancel(job_execution_id):
job_execution = api.cancel_job_execution(job_execution_id)
return u.render(job_execution.to_wrapped_dict())
开发者ID:StokesB1,项目名称:savanna,代码行数:3,代码来源:v11.py
示例9: cluster_templates_get
def cluster_templates_get(cluster_template_id):
return u.render(
api.get_cluster_template(cluster_template_id).to_wrapped_dict())
开发者ID:chiehwen,项目名称:savanna,代码行数:3,代码来源:v10.py
示例10: job_delete
def job_delete(job_id):
api.delete_job(job_id)
return u.render()
开发者ID:StokesB1,项目名称:savanna,代码行数:3,代码来源:v11.py
示例11: job_executions_list
def job_executions_list():
job_executions = [je.to_dict() for je in api.job_execution_list()]
return u.render(job_executions=job_executions)
开发者ID:StokesB1,项目名称:savanna,代码行数:3,代码来源:v11.py
示例12: data_source_delete
def data_source_delete(data_source_id):
api.delete_data_source(data_source_id)
return u.render()
开发者ID:StokesB1,项目名称:savanna,代码行数:3,代码来源:v11.py
示例13: job_create
def job_create(data):
return u.render(api.create_job(data).to_wrapped_dict())
开发者ID:StokesB1,项目名称:savanna,代码行数:2,代码来源:v11.py
示例14: data_source_register
def data_source_register(data):
return u.render(api.register_data_source(data).to_wrapped_dict())
开发者ID:StokesB1,项目名称:savanna,代码行数:2,代码来源:v11.py
示例15: data_source_get
def data_source_get(data_source_id):
return u.render(api.get_data_source(data_source_id).to_wrapped_dict())
开发者ID:StokesB1,项目名称:savanna,代码行数:2,代码来源:v11.py
示例16: data_sources_list
def data_sources_list():
return u.render(
data_sources=[ds.to_dict() for ds in api.get_data_sources()])
开发者ID:StokesB1,项目名称:savanna,代码行数:3,代码来源:v11.py
示例17: job_executions_delete
def job_executions_delete(job_execution_id):
api.delete_job_execution(job_execution_id)
return u.render()
开发者ID:StokesB1,项目名称:savanna,代码行数:3,代码来源:v11.py
示例18: cluster_templates_delete
def cluster_templates_delete(cluster_template_id):
api.terminate_cluster_template(cluster_template_id)
return u.render()
开发者ID:chiehwen,项目名称:savanna,代码行数:3,代码来源:v10.py
示例19: job_binary_internal_delete
def job_binary_internal_delete(job_binary_internal_id):
api.delete_job_binary_internal(job_binary_internal_id)
return u.render()
开发者ID:StokesB1,项目名称:savanna,代码行数:3,代码来源:v11.py
示例20: job_origin_list
def job_origin_list():
return u.render(job_origins=[j.to_dict() for j in api.get_job_origins()])
开发者ID:StokesB1,项目名称:savanna,代码行数:2,代码来源:v11.py
注:本文中的savanna.utils.api.render函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论