Comment 0 for bug 1708988

Revision history for this message
jiangxing (jiangxing) wrote :

When delete ns in horizon, get "Request Failed: internal server error while processing your request." refresh web, the ns is deleted.

Both Nfvoplugin's parent classes nfvo_db.NfvoPluginDb and ns_db.NSPluginDb have the _get_resource. In ns_db.NsPluginDb.get_ns:

    def get_ns(self, context, ns_id, fields=None):
        ns_db = self._get_resource(context, NS, ns_id)
        return self._make_ns_dict(ns_db)

when self is from Nfvoplugin, it will call Nfvo_db._get_resource, because the class NfvoPlugin inherits in this order:

class NfvoPlugin(nfvo_db.NfvoPluginDb, vnffg_db.VnffgPluginDbMixin,
        ns_db.NSPluginDb)

but in nfvo_db.NfvoPluginDb._get_resource doesn't process the exception issubclass(model, NS).

    def _get_resource(self, context, model, id):
        try:
            return self._get_by_id(context, model, id)
        except orm_exc.NoResultFound:
            if issubclass(model, Vim):
                raise nfvo.VimNotFoundException(vim_id=id)
            else:
                raise

We think should indicate which parent class's _get_resource will be called in nfvoplugin's get_ns.

Our version is ocata.