aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-02-27 14:05:15 +0100
committerNeale Ranns <nranns@cisco.com>2018-02-27 19:41:41 +0000
commit3a758b0af83e1f8c791d899ee6dfcea813a09c5b (patch)
tree245924c32426718f6b6408d5281009dcd03bb6ba
parent42996c0fcd73f6eeaa0723c1172f668d81a5ef41 (diff)
VOM: interface: Fix the vhost user interface
Change-Id: I38904dafb4110322ec0138f7a5b3a65c96426b2b Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
-rw-r--r--src/vpp-api/vom/interface.hpp2
-rw-r--r--src/vpp-api/vom/interface_cmds.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/vpp-api/vom/interface.hpp b/src/vpp-api/vom/interface.hpp
index 5d2951007a2..b0aeb739fdb 100644
--- a/src/vpp-api/vom/interface.hpp
+++ b/src/vpp-api/vom/interface.hpp
@@ -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()); }
diff --git a/src/vpp-api/vom/interface_cmds.cpp b/src/vpp-api/vom/interface_cmds.cpp
index df3415408d9..b04798aba83 100644
--- a/src/vpp-api/vom/interface_cmds.cpp
+++ b/src/vpp-api/vom/interface_cmds.cpp
@@ -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;
}