Merge "EventService exception handling to not log errors"

This commit is contained in:
Jenkins 2014-01-03 13:36:18 +00:00 committed by Gerrit Code Review
commit 51657807ae
2 changed files with 6 additions and 2 deletions

View File

@ -47,6 +47,7 @@ from heat.openstack.common import log as logging
from heat.openstack.common import threadgroup
from heat.openstack.common.gettextutils import _
from heat.openstack.common.rpc import service
from heat.openstack.common.rpc import common as rpc_common
from heat.openstack.common import excutils
from heat.openstack.common import uuidutils
@ -190,6 +191,7 @@ class EngineService(service.Service):
for s in stacks:
self._start_watch_task(s.id, admin_context)
@rpc_common.client_exceptions(exception.StackNotFound)
@request_context
def identify_stack(self, cnxt, stack_name):
"""

View File

@ -44,6 +44,7 @@ from heat.engine.resources import nova_utils
from heat.engine import resource as rsrs
from heat.engine import watchrule
from heat.openstack.common import threadgroup
from heat.openstack.common.rpc import common as rpc_common
from heat.tests.common import HeatTestCase
from heat.tests import generic_resource as generic_rsrc
from heat.tests import utils
@ -970,8 +971,9 @@ class StackServiceTest(HeatTestCase):
self.m.VerifyAll()
def test_stack_identify_nonexist(self):
self.assertRaises(exception.StackNotFound, self.eng.identify_stack,
self.ctx, 'wibble')
e = self.assertRaises(rpc_common.ClientException,
self.eng.identify_stack, self.ctx, 'wibble')
self.assertIs(e._exc_info[0], exception.StackNotFound)
@stack_context('service_create_existing_test_stack', False)
def test_stack_create_existing(self):