aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/connection.cpp
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-11-23 12:15:00 -0800
committerNeale Ranns <nranns@cisco.com>2017-11-24 14:04:48 +0000
commitfd920609819a5b10d3d7c8d34fe4fa4214c7da22 (patch)
treefb0b5c3b5a9ba56308ef704ef922e959aafad17f /src/vpp-api/vom/connection.cpp
parent227bf211ab65e7aed6862fc881cc949c342200fd (diff)
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>
Diffstat (limited to 'src/vpp-api/vom/connection.cpp')
-rw-r--r--src/vpp-api/vom/connection.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/vpp-api/vom/connection.cpp b/src/vpp-api/vom/connection.cpp
index 3d965ea863f..90c02f943c4 100644
--- a/src/vpp-api/vom/connection.cpp
+++ b/src/vpp-api/vom/connection.cpp
@@ -13,11 +13,14 @@
* limitations under the License.
*/
+#include <vapi/vapi.hpp>
+
#include "vom/connection.hpp"
namespace VOM {
connection::connection()
- : m_app_name("vpp-OM")
+ : m_vapi_conn(new vapi::Connection())
+ , m_app_name("VOM")
{
}
@@ -29,7 +32,7 @@ connection::~connection()
void
connection::disconnect()
{
- m_vapi_conn.disconnect();
+ m_vapi_conn->disconnect();
}
void
@@ -38,16 +41,16 @@ connection::connect()
vapi_error_e rv;
do {
- rv = m_vapi_conn.connect(m_app_name.c_str(),
- NULL, // m_api_prefix.c_str(),
- 128, 128);
+ rv = m_vapi_conn->connect(m_app_name.c_str(),
+ NULL, // m_api_prefix.c_str(),
+ 128, 128);
} while (VAPI_OK != rv);
}
vapi::Connection&
connection::ctx()
{
- return (m_vapi_conn);
+ return (*m_vapi_conn);
}
}