Thread Previous • Date Previous • Date Next • Thread Next |
On 04/03/2012 11:16 AM, Mark McLoughlin wrote:
4) nova.exception nova.rpc defines two exceptions based on NovaException. They could be based on OpenstackException from openstack-common, instead. There's also an RPC exception defined in nova.exception, but that can be moved into nova.rpc with the others.Is there any great value to having a base Exception class? e.g. a cfg exception and an rpc exception are completely unrelated, so I'd just have those modules define unrelated exceptionsThe code also uses wrap_exception. The one in openstack-common seems sufficient for how it's used. However, I'm not sure how people would feel about having both openstack.common.exception and nova.exception in the tree since they overlap quite a bit. I like being able to do work in pieces, but having them both in the tree leaves the code in an odd state, so we need some end goal in mind.I'm not a huge fan of openstack.common.exception
Yeah, I don't see too much value in having everything inherit from a common exception base class. I think the different projects will typically want to customize the error message text...
5) nova.context I haven't looked at this one in detail, yet. We'll have to sort out what to do with RequestContext. I see in the message from Swaminathan Venkataraman that both openstack-common and nova have RequestContext, but there's more code in the nova version. I suppose we should look at making the openstack-common version sufficient for nova and then switch nova to it.
Glance also has a different RequestContext: https://github.com/openstack/glance/blob/master/glance/common/context.pyI wouldn't mind if the Glance-specific RequestContext inherited from a base openstack-common one, though, and just added its stuff related to Glance's owner_is_tenant config option....
Best, -jay
Thread Previous • Date Previous • Date Next • Thread Next |