Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
| 13 | namespace velia::system { |
| 14 | |
Tomáš Pecka | f976c5b | 2021-01-23 21:19:52 +0100 | [diff] [blame] | 15 | class IETFSystem { |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 16 | public: |
Tomáš Pecka | 879a603 | 2021-02-03 17:21:48 +0100 | [diff] [blame] | 17 | IETFSystem(std::shared_ptr<::sysrepo::Session> srSession, const std::filesystem::path& osRelease); |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 18 | |
| 19 | private: |
Václav Kubernát | d2927cc | 2021-02-18 04:36:26 +0100 | [diff] [blame] | 20 | void initStaticProperties(const std::filesystem::path& osRelease); |
| 21 | void initSystemRestart(); |
Václav Kubernát | 566c940 | 2021-02-10 08:33:54 +0100 | [diff] [blame] | 22 | void initHostname(); |
Jan Kundrát | dcd50f0 | 2021-02-18 23:28:26 +0100 | [diff] [blame] | 23 | void initDummies(); |
Jan Kundrát | 51f1d6d | 2021-02-19 00:41:28 +0100 | [diff] [blame^] | 24 | void initClock(); |
Václav Kubernát | d2927cc | 2021-02-18 04:36:26 +0100 | [diff] [blame] | 25 | |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 26 | std::shared_ptr<::sysrepo::Session> m_srSession; |
Tomáš Pecka | 879a603 | 2021-02-03 17:21:48 +0100 | [diff] [blame] | 27 | std::shared_ptr<::sysrepo::Subscribe> m_srSubscribe; |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 28 | velia::Log m_log; |
| 29 | }; |
| 30 | } |