Use call_and_ignore_notfound_exc directly

This patch makes service client use call_and_ignore_notfound_exc
directly because the client only uses it.

Co-Authored-By: Ken'ichi Ohmichi <ken-oomichi@wx.jp.nec.com>
Closes-Bug: #1589521
Change-Id: I8ee81502a090aa0581e0b46b96bfa6144b456cc4
This commit is contained in:
YAMAMOTO Takashi 2016-06-07 14:29:47 +09:00
parent fe2d77448d
commit 38f1ab3bd2
2 changed files with 4 additions and 3 deletions

View File

@ -19,4 +19,4 @@ from neutron_taas.tests.tempest_plugin.tests import taas_client
class BaseTaaSTest(taas_client.TaaSClientMixin, base.BaseNetworkTest):
_delete_wrapper = base.BaseNetworkTest._try_delete_resource
pass

View File

@ -15,6 +15,7 @@
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from neutron_taas.tests.tempest_plugin.services import client
@ -49,7 +50,7 @@ class TaaSClientMixin(object):
name=data_utils.rand_name("tap_service"),
**kwargs)
tap_service = body['tap_service']
self.addCleanup(self._delete_wrapper,
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
self.tap_services_client.delete_tap_service,
tap_service['id'])
return tap_service
@ -59,7 +60,7 @@ class TaaSClientMixin(object):
name=data_utils.rand_name("tap_service"),
**kwargs)
tap_flow = body['tap_flow']
self.addCleanup(self._delete_wrapper,
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
self.tap_flows_client.delete_tap_flow,
tap_flow['id'])
return tap_flow