Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
zone-config.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Contact: Michal Witanowski <m.witanowski@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 
26 #ifndef SERVER_ZONE_CONFIG_HPP
27 #define SERVER_ZONE_CONFIG_HPP
28 
29 #include "cargo/fields.hpp"
30 
31 #include <string>
32 #include <vector>
33 
34 
35 namespace vasum {
36 
37 
38 struct ZoneConfig {
39 
43  std::string zoneTemplate;
44 
48  std::vector<std::string> initWithArgs;
49 
54  int privilege;
55 
61 
65  std::int64_t cpuQuotaForeground;
66 
70  std::int64_t cpuQuotaBackground;
71 
75  std::vector<std::string> validLinkPrefixes;
76 
84 
86  (
89  privilege, // TODO not needed?
90  switchToDefaultAfterTimeout, // TODO move to dynamic and add an API to change
95  )
96 };
97 
99 
103  std::string requestedState;
104 
108  std::string ipv4Gateway;
109 
113  std::string ipv4;
114 
118  int vt;
119 
123  std::string runMountPoint;
124 
126  (
128  ipv4Gateway,
129  ipv4,
130  vt,
132  )
133 };
134 
139  std::string zoneTemplatePath;
140 
142 };
143 
144 } // namespace vasum
145 
146 #endif // SERVER_ZONE_CONFIG_HPP
Definition: zone-config.hpp:38
std::string ipv4Gateway
IP v4 gateway address.
Definition: zone-config.hpp:108
int shutdownTimeout
Timeout in seconds for zone to gracefully shut down.
Definition: zone-config.hpp:83
Definition: zone-config.hpp:98
std::string runMountPoint
Path to zones dbus unix socket.
Definition: zone-config.hpp:123
std::vector< std::string > initWithArgs
Init program with args (empty means default /sbin/init)
Definition: zone-config.hpp:48
std::string requestedState
Requested zone state after restore.
Definition: zone-config.hpp:103
std::string zoneTemplatePath
A path to zone template config (containing default values)
Definition: zone-config.hpp:139
bool switchToDefaultAfterTimeout
Allow switching to default zone after timeout.
Definition: zone-config.hpp:60
std::int64_t cpuQuotaBackground
Zone's CFS quota in us when it's in the background.
Definition: zone-config.hpp:70
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
std::vector< std::string > validLinkPrefixes
Valid hard link prefixes.
Definition: zone-config.hpp:75
std::string zoneTemplate
Zone template name (relative to zoneTemplateDir)
Definition: zone-config.hpp:43
Definition: zone-config.hpp:135
int vt
Number of virtual terminal used by xserver inside zone.
Definition: zone-config.hpp:118
std::string ipv4
IP v4 address.
Definition: zone-config.hpp:113
std::int64_t cpuQuotaForeground
Zone's CFS quota in us when it's in the foreground.
Definition: zone-config.hpp:65
int privilege
Privilege of the zone.
Definition: zone-config.hpp:54