VOM: bridge-domain learning mode and route help commands

Change-Id: I2fa219d6530f1e7a3b8ae32d35a0c60ba57c5129
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
diff --git a/src/vpp-api/vom/bridge_domain.cpp b/src/vpp-api/vom/bridge_domain.cpp
index 8e012b5..81d8362 100644
--- a/src/vpp-api/vom/bridge_domain.cpp
+++ b/src/vpp-api/vom/bridge_domain.cpp
@@ -19,6 +19,17 @@
 #include "vom/l2_binding.hpp"
 
 namespace VOM {
+
+const bridge_domain::learning_mode_t bridge_domain::learning_mode_t::ON(1,
+                                                                        "on");
+const bridge_domain::learning_mode_t bridge_domain::learning_mode_t::OFF(0,
+                                                                         "off");
+
+bridge_domain::learning_mode_t::learning_mode_t(int v, const std::string& s)
+  : enum_base<bridge_domain::learning_mode_t>(v, s)
+{
+}
+
 /**
  * A DB of al the interfaces, key on the name
  */
@@ -29,13 +40,15 @@
 /**
  * Construct a new object matching the desried state
  */
-bridge_domain::bridge_domain(uint32_t id)
+bridge_domain::bridge_domain(uint32_t id, const learning_mode_t& lmode)
   : m_id(id)
+  , m_learning_mode(lmode)
 {
 }
 
 bridge_domain::bridge_domain(const bridge_domain& o)
   : m_id(o.m_id)
+  , m_learning_mode(o.m_learning_mode)
 {
 }
 
@@ -58,7 +71,7 @@
 bridge_domain::replay()
 {
   if (rc_t::OK == m_id.rc()) {
-    HW::enqueue(new bridge_domain_cmds::create_cmd(m_id));
+    HW::enqueue(new bridge_domain_cmds::create_cmd(m_id, m_learning_mode));
   }
 }
 
@@ -116,7 +129,7 @@
  * the desired state is always that the interface should be created
  */
   if (rc_t::OK != m_id.rc()) {
-    HW::enqueue(new bridge_domain_cmds::create_cmd(m_id));
+    HW::enqueue(new bridge_domain_cmds::create_cmd(m_id, m_learning_mode));
   }
 }