Beispiel #1
0
 def is_vim_still_in_use(self, context, vim_id):
     with context.session.begin(subtransactions=True):
         devices_db = context.session.query(
             vm_db.Device).filter_by(vim_id=vim_id).first()
         if devices_db is not None:
             raise nfvo.VimInUseException(vim_id=vim_id)
     return devices_db
Beispiel #2
0
 def is_vim_still_in_use(self, context, vim_id):
     with context.session.begin(subtransactions=True):
         vnfs_db = self._model_query(context, vnfm_db.VNF).filter_by(
             vim_id=vim_id).first()
         if vnfs_db is not None:
             raise nfvo.VimInUseException(vim_id=vim_id)
     return vnfs_db