blob: d3a0e1f95147ba06a46881629b13057b15ddc0f3 [file] [log] [blame]
Andrew Geisslerfe270d32021-01-27 14:06:46 -06001#include "config.h"
2
3#include "hypervisor_state_manager.hpp"
4
5#include <sdbusplus/bus.hpp>
6
7#include <cstdlib>
8
Amithash Prasasd2eb60292024-08-13 19:19:07 -07009using HostState = sdbusplus::server::xyz::openbmc_project::state::Host;
10
Andrew Geisslerfe270d32021-01-27 14:06:46 -060011int main()
12{
13 auto bus = sdbusplus::bus::new_default();
14
15 // For now, we only have one instance of the hypervisor
16 auto objPathInst = std::string{HYPERVISOR_OBJPATH} + '0';
17
18 // Add sdbusplus ObjectManager.
Amithash Prasasd2eb60292024-08-13 19:19:07 -070019 sdbusplus::server::manager_t objManager(bus,
20 HostState::namespace_path::value);
Andrew Geisslerfe270d32021-01-27 14:06:46 -060021
22 phosphor::state::manager::Hypervisor manager(bus, objPathInst.c_str());
23
24 bus.request_name(HYPERVISOR_BUSNAME);
25
26 while (true)
27 {
28 bus.process_discard();
29 bus.wait();
30 }
31 return 0;
32}