VOM: interface: Fix the vhost user interface 38/10838/2
authorMohsin Kazmi <sykazmi@cisco.com>
Tue, 27 Feb 2018 13:05:15 +0000 (14:05 +0100)
committerNeale Ranns <nranns@cisco.com>
Tue, 27 Feb 2018 19:41:41 +0000 (19:41 +0000)
Change-Id: I38904dafb4110322ec0138f7a5b3a65c96426b2b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
src/vpp-api/vom/interface.hpp
src/vpp-api/vom/interface_cmds.cpp

index 5d29510..b0aeb73 100644 (file)
@@ -354,7 +354,7 @@ public:
     void succeeded() {}
 
     /**
-     * add the created interface to the DB
+     * remove the deleted interface from the DB
      */
     void remove_interface() { interface::remove(this->item()); }
 
index df34154..b04798a 100644 (file)
@@ -161,6 +161,10 @@ vhost_create_cmd::issue(connection& con)
 
   m_hw_item = wait();
 
+  if (m_hw_item.rc() == rc_t::OK) {
+    insert_interface();
+  }
+
   return rc_t::OK;
 }