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 <neale.ranns@cisco.com>
diff --git a/src/vpp-api/vom/bridge_domain_entry.hpp b/src/vpp-api/vom/bridge_domain_entry.hpp
index 35ea8b6..2aef697 100644
--- a/src/vpp-api/vom/bridge_domain_entry.hpp
+++ b/src/vpp-api/vom/bridge_domain_entry.hpp
@@ -30,7 +30,7 @@
/**
* The key for a bridge_domain
*/
- typedef std::pair<uint32_t, mac_address_t> key_t;
+ typedef std::pair<bridge_domain::key_t, mac_address_t> key_t;
/**
* Construct a bridge_domain in the given bridge domain
@@ -55,6 +55,16 @@
~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'
*/
std::shared_ptr<bridge_domain_entry> singular() const;
@@ -62,8 +72,7 @@
/**
* Find the instnace of the bridge_domain domain in the OM
*/
- static std::shared_ptr<bridge_domain_entry> find(
- const bridge_domain_entry& temp);
+ static std::shared_ptr<bridge_domain_entry> find(const key_t& k);
/**
* Dump all bridge_domain-doamin into the stream provided