Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
vhost: interrupt mode enhancements
[vpp.git]
/
test
/
vpp_object.py
diff --git
a/test/vpp_object.py
b/test/vpp_object.py
index
0d74baa
..
a1cf42f
100644
(file)
--- a/
test/vpp_object.py
+++ b/
test/vpp_object.py
@@
-46,9
+46,16
@@
class VppObjectRegistry(object):
if obj.object_id() not in self._object_dict:
self._object_registry.append(obj)
self._object_dict[obj.object_id()] = obj
if obj.object_id() not in self._object_dict:
self._object_registry.append(obj)
self._object_dict[obj.object_id()] = obj
+ logger.debug("REG: registering %s" % obj)
else:
logger.debug("REG: duplicate add, ignoring (%s)" % obj)
else:
logger.debug("REG: duplicate add, ignoring (%s)" % obj)
+ def unregister_all(self, logger):
+ """ Remove all object registrations from registry. """
+ logger.debug("REG: removing all object registrations")
+ self._object_registry = []
+ self._object_dict = dict()
+
def remove_vpp_config(self, logger):
"""
Remove configuration (if present) from vpp and then remove all objects
def remove_vpp_config(self, logger):
"""
Remove configuration (if present) from vpp and then remove all objects
@@
-71,8
+78,7
@@
class VppObjectRegistry(object):
for obj in self._object_registry:
if obj.query_vpp_config():
failed.append(obj)
for obj in self._object_registry:
if obj.query_vpp_config():
failed.append(obj)
- self._object_registry = []
- self._object_dict = dict()
+ self.unregister_all(logger)
if failed:
logger.error("REG: Couldn't remove configuration for object(s):")
for obj in failed:
if failed:
logger.error("REG: Couldn't remove configuration for object(s):")
for obj in failed: