def create_workbook_v2(definition, scope="private"): wb_values = _get_workbook_values(spec_parser.get_workbook_spec_from_yaml(definition), definition, scope) with db_api_v2.transaction(): wb_db = db_api_v2.create_workbook(wb_values) _on_workbook_update(wb_db, wb_values) return wb_db
def create_workbook_v2(definition, scope='private'): wb_values = _get_workbook_values( spec_parser.get_workbook_spec_from_yaml(definition), definition, scope) with db_api_v2.transaction(): wb_db = db_api_v2.create_workbook(wb_values) _on_workbook_update(wb_db, wb_values) return wb_db
def create_workbook_v2(definition, namespace='', scope='private'): wb_spec = spec_parser.get_workbook_spec_from_yaml(definition, validate=True) wb_values = _get_workbook_values(wb_spec, definition, scope, namespace) with db_api_v2.transaction(): wb_db = db_api_v2.create_workbook(wb_values) _on_workbook_update(wb_db, wb_spec, namespace) return wb_db
def create_workbook_v2(definition, namespace='', scope='private'): wb_spec = spec_parser.get_workbook_spec_from_yaml( definition, validate=True ) wb_values = _get_workbook_values( wb_spec, definition, scope, namespace ) with db_api_v2.transaction(): wb_db = db_api_v2.create_workbook(wb_values) _on_workbook_update(wb_db, wb_spec, namespace) return wb_db