From fd920609819a5b10d3d7c8d34fe4fa4214c7da22 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 23 Nov 2017 12:15:00 -0800 Subject: VOM: Additions to allow uses to UT applications that use VOM - find object by key - compare objects Change-Id: I36ec8612be9482bcef7ceced2a59f7403f77b3e8 Signed-off-by: Neale Ranns --- src/vpp-api/vom/bridge_domain_entry.hpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/vpp-api/vom/bridge_domain_entry.hpp') diff --git a/src/vpp-api/vom/bridge_domain_entry.hpp b/src/vpp-api/vom/bridge_domain_entry.hpp index 35ea8b68f50..2aef697ebca 100644 --- a/src/vpp-api/vom/bridge_domain_entry.hpp +++ b/src/vpp-api/vom/bridge_domain_entry.hpp @@ -30,7 +30,7 @@ public: /** * The key for a bridge_domain */ - typedef std::pair key_t; + typedef std::pair key_t; /** * Construct a bridge_domain in the given bridge domain @@ -54,6 +54,16 @@ public: */ ~bridge_domain_entry(); + /** + * Return the object's key + */ + const key_t key() const; + + /** + * comparison operator + */ + bool operator==(const bridge_domain_entry& be) const; + /** * Return the matching 'singular instance' */ @@ -62,8 +72,7 @@ public: /** * Find the instnace of the bridge_domain domain in the OM */ - static std::shared_ptr find( - const bridge_domain_entry& temp); + static std::shared_ptr find(const key_t& k); /** * Dump all bridge_domain-doamin into the stream provided -- cgit 1.2.3-korg