← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1247568] Re: NotFound neutron errors should have a unique base class

 

** Also affects: tempest
   Importance: Undecided
       Status: New

** Also affects: neutron
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1247568

Title:
  NotFound neutron errors should have a unique base class

Status in OpenStack Neutron (virtual network service):
  New
Status in Python client library for Neutron:
  New
Status in Tempest:
  New

Bug description:
  Most of the sever side exception are caught by the client and re-
  thrown as the general NeutronError. original message and type are
  still found in the message.

  404-{u'NeutronError': {u'message': u'Security group rule 6957532c-
  ae2c-4273-89c3-11a does not exist', u'type':
  u'SecurityGroupRuleNotFound', u'detail': u''}}

  this makes it impossible to catch unique error types such as NotFound.

  for instance: in tempest (tempest/scenario/manager:

               try:
                   # OpenStack resources are assumed to have a delete()
                   # method which destroys the resource...
                   thing.delete()
               except Exception as e:
                   # If the resource is already missing, mission accomplished.
                   if e.__class__.__name__ == 'NotFound':
                       continue
                   raise

  this code should catch and dismiss all not found resources, however,
  since neutronClient doesn't have a unique NotFound type, it fails to
  catch here.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1247568/+subscriptions