本文整理汇总了Python中aquilon.worker.processes.DSDBRunner.del_building方法的典型用法代码示例。如果您正苦于以下问题:Python DSDBRunner.del_building方法的具体用法?Python DSDBRunner.del_building怎么用?Python DSDBRunner.del_building使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aquilon.worker.processes.DSDBRunner
的用法示例。
在下文中一共展示了DSDBRunner.del_building方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: render
# 需要导入模块: from aquilon.worker.processes import DSDBRunner [as 别名]
# 或者: from aquilon.worker.processes.DSDBRunner import del_building [as 别名]
def render(self, session, logger, building, **arguments):
dbbuilding = get_location(session, building=building)
city = dbbuilding.city
address = dbbuilding.address
campus = dbbuilding.campus
result = CommandDelLocation.render(self, session=session, name=building,
type='building', **arguments)
session.flush()
dsdb_runner = DSDBRunner(logger=logger)
if campus:
dsdb_runner.del_campus_building(campus.name, building)
dsdb_runner.del_building(building, city.name, address)
dsdb_runner.commit_or_rollback()
return result