Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
container-config.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Contact: Dariusz Michaluk <d.michaluk@samsung.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License
17  */
18 
25 #ifndef CONTAINER_CONFIG_HPP
26 #define CONTAINER_CONFIG_HPP
27 
28 #include "config.hpp"
29 #include "cargo/fields.hpp"
30 
31 #include "devices-config.hpp"
32 #include "hooks-config.hpp"
33 #include "mounts-config.hpp"
34 #include "namespaces-config.hpp"
35 #include "process-config.hpp"
36 #include "resources-config.hpp"
37 
38 namespace vasum {
39 
41 
45  std::string os;
46 
50  std::string arch;
51 
53  (
54  os,
55  arch
56  )
57 };
58 
59 struct RootConfig {
60 
65  std::string path;
66 
70  bool readonly;
71 
73  (
74  path,
75  readonly
76  )
77 };
78 
79 struct LinuxConfig {
80 
81  std::vector<std::string> capabilities;
82 
84  (
86  )
87 };
88 
90 
91  std::string version;
95  std::string hostname;
98 
100  (
101  version,
102  platform,
103  process,
104  root,
105  hostname,
106  mounts,
107  linux
108  )
109 };
110 
112 
116  std::map<std::string, std::string> sysctl;
118  std::string cgroupsPath;
121 
123  (
124  uidMappings,
125  gidMappings,
126  rlimits,
127  sysctl,
128  resources,
129  cgroupsPath,
130  namespaces,
131  devices
132  )
133 };
134 
136 
140 
142  (
143  mounts,
144  hooks,
145  linux
146  )
147 };
148 
149 } // namespace vasum
150 
151 
152 #endif // CONTAINER_CONFIG_HPP
NamespacesConfig namespaces
Definition: container-config.hpp:119
RootConfig root
Definition: container-config.hpp:94
std::vector< MountConfig > MountsConfig
Definition: mounts-config.hpp:55
DevicesConfig devices
Definition: container-config.hpp:120
std::vector< Rlimit > RlimitsConfig
Definition: resources-config.hpp:57
Devices configuration.
std::string hostname
Definition: container-config.hpp:95
std::map< std::string, std::string > sysctl
Definition: container-config.hpp:116
Definition: process-config.hpp:57
IDMapConfig uidMappings
Definition: container-config.hpp:113
MountsConfig mounts
Definition: container-config.hpp:96
Definition: container-config.hpp:89
RlimitsConfig rlimits
Definition: container-config.hpp:115
HooksConfig hooks
Definition: container-config.hpp:138
std::vector< NamespaceConfig > NamespacesConfig
Definition: namespaces-config.hpp:56
std::vector< std::string > capabilities
Definition: container-config.hpp:81
Resources configuration.
bool readonly
If true then the root filesystem MUST be read-only inside the container.
Definition: container-config.hpp:70
Configuration file for the code.
Definition: container-config.hpp:135
Namespaces configuration.
ResourcesConfig resources
Definition: container-config.hpp:117
ProcessConfig process
Definition: container-config.hpp:93
Hooks are a collection of actions to perform at various container lifecycle events.
Definition: hooks-config.hpp:64
Process configuration.
Definition: resources-config.hpp:59
Hooks configuration.
PlatformConfig platform
Definition: container-config.hpp:92
LinuxConfig linux
Definition: container-config.hpp:97
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
Mounts configuration.
LinuxRuntimeConfig linux
Definition: container-config.hpp:139
std::vector< DeviceConfig > DevicesConfig
Definition: devices-config.hpp:83
std::string os
Specifies the operating system family this image must run on.
Definition: container-config.hpp:45
Definition: container-config.hpp:79
Definition: container-config.hpp:40
MountsRuntimeConfig mounts
Definition: container-config.hpp:137
IDMapConfig gidMappings
Definition: container-config.hpp:114
std::string arch
Specifies the instruction set for which the binaries in the image have been compiled.
Definition: container-config.hpp:50
std::string version
Definition: container-config.hpp:91
Definition: container-config.hpp:111
std::string cgroupsPath
Definition: container-config.hpp:118
std::map< std::string, MountRuntimeConfig > MountsRuntimeConfig
Definition: mounts-config.hpp:82
Definition: container-config.hpp:59
std::string path
Specifies the path to the root filesystem for the container relative to the path where the manifest i...
Definition: container-config.hpp:65
std::vector< IDMap > IDMapConfig
Definition: namespaces-config.hpp:77