blob: 85f49326af9255acb419dfc13405f0c9f5ff8421 [file] [log] [blame]
Tomáš Pecka292bc9c2021-01-11 22:03:11 +01001/*
2 * Copyright (C) 2021 CESNET, https://photonics.cesnet.cz/
3 *
4 * Written by Tomáš Pecka <tomas.pecka@fit.cvut.cz>
5 *
6 */
7#pragma once
8
9#include <filesystem>
10#include <sysrepo-cpp/Session.hpp>
11#include "utils/log-fwd.h"
12
13namespace velia::system {
14
Tomáš Peckaf976c5b2021-01-23 21:19:52 +010015class IETFSystem {
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010016public:
Tomáš Pecka879a6032021-02-03 17:21:48 +010017 IETFSystem(std::shared_ptr<::sysrepo::Session> srSession, const std::filesystem::path& osRelease);
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010018
19private:
Václav Kubernátd2927cc2021-02-18 04:36:26 +010020 void initStaticProperties(const std::filesystem::path& osRelease);
21 void initSystemRestart();
Václav Kubernát566c9402021-02-10 08:33:54 +010022 void initHostname();
Jan Kundrátdcd50f02021-02-18 23:28:26 +010023 void initDummies();
Jan Kundrát51f1d6d2021-02-19 00:41:28 +010024 void initClock();
Václav Kubernátd2927cc2021-02-18 04:36:26 +010025
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010026 std::shared_ptr<::sysrepo::Session> m_srSession;
Tomáš Pecka879a6032021-02-03 17:21:48 +010027 std::shared_ptr<::sysrepo::Subscribe> m_srSubscribe;
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010028 velia::Log m_log;
29};
30}