def session_add_resources(self, scannable_id, resources):
"""NB this is plural because new resources may be interdependent
and if so they must be added in a blob so that we can hook up the
parent relationships"""
# Must be run in a transaction to avoid leaving invalid things in the DB on failure.
assert transaction.is_managed()
with self._instance_lock:
session = self._sessions[scannable_id]
self._persist_new_resources(session, resources)
self._persist_lun_updates(scannable_id)
self._persist_nid_updates(scannable_id, None, None)
self._persist_created_hosts(session, scannable_id, resources)
resource_manager.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录