[openstack-dev] [Neutron] Exceptions in neutron.extension
Eugene Nikanorov
enikanorov at mirantis.com
Sun Aug 18 20:26:25 UTC 2013
Exceptions, defined in neutron.extensions are very specific for the code
that implements extension.
Exceptions defined in neutron.common.exceptions represent common exception
classes which are mapped to HTTP error codes.
Also, neutron.common.exceptions contain definitions of exceptions specific
to core API
Thanks,
Eugene.
On Sun, Aug 18, 2013 at 7:31 PM, ZhiQiang Fan <aji.zqfan at gmail.com> wrote:
> thanks, Matt Riedemann
>
>
> On Sun, Aug 18, 2013 at 9:19 PM, Matt Riedemann <mriedem at us.ibm.com>wrote:
>
>> I don't know what's right but for what it's worth I had cleaned up at
>> least one case like this where the exception was in both common and an
>> extension:
>>
>> *https://bugs.launchpad.net/neutron/+bug/1210276*<https://bugs.launchpad.net/neutron/+bug/1210276>
>>
>> Seems to me like if more than one extension need the same type of
>> exception and the error message can be written such that it can be re-used
>> across extensions and common code, it should live in common to avoid
>> duplication.
>>
>>
>>
>> Thanks,
>>
>> *MATT RIEDEMANN*
>> Advisory Software Engineer
>> Cloud Solutions and OpenStack Development
>> ------------------------------
>> *Phone:* 1-507-253-7622 | *Mobile:* 1-507-990-1889*
>> E-mail:* *mriedem at us.ibm.com* <mriedem at us.ibm.com>
>> [image: IBM]
>>
>> 3605 Hwy 52 N
>> Rochester, MN 55901-1407
>> United States
>>
>>
>>
>>
>>
>> From: ZhiQiang Fan <aji.zqfan at gmail.com>
>> To: OpenStack Development Mailing List <
>> openstack-dev at lists.openstack.org>,
>> Date: 08/17/2013 09:55 PM
>> Subject: [openstack-dev] [Neutron] Exceptions in neutron.extension
>> ------------------------------
>>
>>
>>
>> Hi stackers,
>>
>> I notice that there are some exceptions defined in neutron.extension, and
>> many exceptions are defined in neutron.common.exception. Why they are
>> defined seperately?
>>
>> In my opinion:
>>
>> 1) extension will define exception which is only releated to this
>> extension and is intended to exposed to the client
>> 2) exception defined in common.exception will be processed inside
>> neutron, (It may define some exception releated to specific extension but
>> the exception will be handled inside neutron.)
>>
>> I think my understanding is not right, so anyone please help me.
>>
>> --
>> blog: *zqfan.github.com* <http://zqfan.github.com/>
>> git: *github.com/zqfan* <http://github.com/zqfan>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
>
> --
> blog: zqfan.github.com
> git: github.com/zqfan
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130819/4bd46a96/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1851 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130819/4bd46a96/attachment.gif>
More information about the OpenStack-dev
mailing list