virthttp  0.0
libvirt http interface
network_actions_table.hpp
Go to the documentation of this file.
1 //
2 // Created by hugo on 4/5/20.
3 //
4 
5 #pragma once
6 
7 #include <array>
8 #include <functional>
9 #include <string_view>
10 #include <gsl/gsl>
11 #include "virt_wrap/Network.hpp"
13 #include "cexpr_algs.hpp"
14 #include "depends.hpp"
15 #include "json2virt.hpp"
16 #include "json_utils.hpp"
17 #include "utils.hpp"
18 
19 using NetworkActionsHdl = DependsOutcome (*)(const rapidjson::Value& val, JsonRes& json_res, virt::Network& nw);
20 class NetworkActionsTable : public NamedCallTable<NetworkActionsTable, NetworkActionsHdl> {
21  private:
23 
24  using Hdl = NetworkActionsHdl;
25 
26  constexpr static std::array<std::string_view, 1> keys = {"autostart"};
27  constexpr static std::array<Hdl, 1> fcns = {};
28  static_assert(keys.size() == fcns.size());
29 } constexpr static const network_actions_table{};
DependsOutcome
Definition: depends.hpp:11
NetworkActionsTable network_actions_table
DependsOutcome(*)(const rapidjson::Value &val, JsonRes &json_res, virt::Network &nw) NetworkActionsHdl
Definition: network_actions_table.hpp:19
Definition: json_utils.hpp:21
Definition: Network.hpp:14
Definition: network_actions_table.hpp:20
Definition: actions_table.hpp:60