veliad-hardware: sysrepo daemon managing hardware
This patch factors out the Sysrepo implementation of ietf-hardware
model. We agreed to split velia into smaller parts and this is a logical
individual unit.
The original velia will implement only the health tracking.
In the future, veliad-hardware might start notifying the original veliad
daemon when something goes wrong in the hardware. This will probably be
done using some kind of IPC, like D-Bus.
Change-Id: Ib831b1fd97d8ec87a711321461a3d6a73b63bcf7
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a62e041..ba37190 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -160,18 +160,14 @@
# - daemons
add_executable(veliad
src/main.cpp
- src/ietf-hardware/Factory.cpp
- src/ietf-hardware/Factory.h
src/health/Factory.cpp
src/health/Factory.h
)
target_link_libraries(veliad
- PUBLIC
+ PUBLIC
velia-health
- velia-ietf-hardware
- velia-ietf-hardware-sysrepo
docopt
- )
+ )
add_dependencies(veliad target-VELIA_VERSION)
target_include_directories(veliad PUBLIC ${CMAKE_BINARY_DIR})
@@ -199,6 +195,20 @@
add_dependencies(veliad-firewall target-VELIA_VERSION)
target_include_directories(veliad-firewall PUBLIC ${CMAKE_BINARY_DIR})
+add_executable(veliad-hardware
+ src/main-hardware.cpp
+ src/ietf-hardware/Factory.cpp
+ src/ietf-hardware/Factory.h
+ )
+target_link_libraries(veliad-hardware
+ PUBLIC
+ velia-ietf-hardware
+ velia-ietf-hardware-sysrepo
+ docopt
+ )
+add_dependencies(veliad-hardware target-VELIA_VERSION)
+target_include_directories(veliad-hardware PUBLIC ${CMAKE_BINARY_DIR})
+
# Testing
include(CTest)
if(BUILD_TESTING)
@@ -390,3 +400,4 @@
install(FILES ${YANG_SRCS} DESTINATION ${YANG_DIR})
install(TARGETS veliad RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/)
install(TARGETS veliad-system RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/)
+install(TARGETS veliad-hardware RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/)