forked from lxc/cgmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org.linuxcontainers.cgmanager.xml
249 lines (240 loc) · 10.5 KB
/
org.linuxcontainers.cgmanager.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<?xml version="1.0" encoding="UTF-8" ?>
<!-- cgmanager
org.linuxcontainers.cgmanager.xml - interface definition for manager
Copyright © 2013 Stéphane Graber
Author: Stéphane Graber <[email protected]>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/org/linuxcontainers/cgmanager">
<interface name="org.linuxcontainers.cgmanager0_0">
<!-- Every Scm call sends requestor's creds as a first
scm credential over the passed-in fd -->
<!-- The following methods accept comma-separated lists
of multiple controllers as well as 'all':
Create*, Chown*, Chmod*, MovePid*, Remove, RemoveOnEmpty -->
<method name="Ping">
<arg name="junk" type="i" direction="in" />
</method>
<method name="GetPidCgroupScm">
<arg name="controller" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- Pid is passed as a scm_cred over sockfd -->
<!-- Result is printed over same sockfd -->
</method>
<method name="GetPidCgroup">
<arg name="controller" type="s" direction="in" />
<arg name="pid" type="i" direction="in" />
<arg name="output" type="s" direction="out" />
<!-- client must be in manager's pidns -->
</method>
<method name="GetPidCgroupAbsScm">
<arg name="controller" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- Pid is passed as a scm_cred over sockfd -->
<!-- Result is printed over same sockfd -->
</method>
<method name="GetPidCgroupAbs">
<arg name="controller" type="s" direction="in" />
<arg name="pid" type="i" direction="in" />
<arg name="output" type="s" direction="out" />
<!-- client must be in manager's pidns -->
</method>
<method name="CreateScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- 2/1/0 (existed/pass/fail) return value comes over sockfd -->
</method>
<method name="Create">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="existed" type="i" direction="out" />
</method>
<method name="ChownScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- uid+gid are passed as scm_cred over sockfd-->
<!-- 1/0 (pass/fail) return value comes over sockfd -->
</method>
<method name="Chown">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="uid" type="i" direction="in" />
<arg name="gid" type="i" direction="in" />
<!-- caller must be in manager's pid and user namespaces -->
</method>
<method name="ChmodScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="file" type="s" direction="in" />
<arg name="mode" type="i" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- 1/0 (pass/fail) return value comes over sockfd -->
</method>
<method name="Chmod">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="file" type="s" direction="in" />
<arg name="mode" type="i" direction="in" />
</method>
<method name="MovePidScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- Pid is passed as a scm_cred over sockfd -->
<!-- 1/0 (pass/fail) return value comes over sockfd -->
</method>
<method name="MovePid">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="pid" type="i" direction="in" />
<!-- task must be in manager's pidns -->
</method>
<method name="MovePidAbsScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- Pid is passed as a scm_cred over sockfd -->
<!-- 1/0 (pass/fail) return value comes over sockfd -->
</method>
<method name="MovePidAbs">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="pid" type="i" direction="in" />
<!-- task must be in manager's pidns -->
</method>
<method name="GetValueScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="key" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- Result is printed over sockfd -->
</method>
<method name="GetValue">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="key" type="s" direction="in" />
<arg name="value" type="s" direction="out" />
</method>
<method name="SetValueScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="key" type="s" direction="in" />
<arg name="value" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- 1/0 (pass/fail) return value comes over sockfd -->
</method>
<method name="SetValue">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="key" type="s" direction="in" />
<arg name="value" type="s" direction="in" />
</method>
<method name="RemoveScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="recursive" type="i" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- 2/1/0 (didntexist/pass/fail) return value comes over sockfd -->
</method>
<method name="Remove">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="recursive" type="i" direction="in" />
<arg name="existed" type="i" direction="out" />
</method>
<method name="GetTasksScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- nrtasks + pids as scm creds return value comes over sockfd -->
</method>
<method name="GetTasks">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="output" type="ai" direction="out" />
</method>
<method name="GetTasksRecursiveScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- nrtasks + pids as scm creds return value comes over sockfd -->
</method>
<method name="GetTasksRecursive">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="output" type="ai" direction="out" />
</method>
<method name="ListChildrenScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- names will be returned over sockfd -->
</method>
<method name="ListChildren">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="output" type="as" direction="out" />
</method>
<method name="RemoveOnEmptyScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
</method>
<method name="RemoveOnEmpty">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
</method>
<!-- Prune sets removeonempty recursively and the removes,
ignoring failures due to EBUSY -->
<method name="PruneScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- 2/1/0 (didntexist/pass/fail) return value comes over sockfd -->
</method>
<!-- Prune calls removeonempty, then calls itself on any child cgroups,
Then calls remove. This will not kill any running tasks, but will
ensure that when all running tasks are gone, the cgroups will be
removed.
Note that a 'KillAndRemove' is not provided because there is no
mechanism for cgmanager to know whether LSMs etc would allow
the caller to kill a task. -->
<method name="Prune">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
</method>
<method name="ListControllers">
<arg name="output" type="as" direction="out" />
</method>
<method name="ListKeysScm">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<arg name="sockfd" type="h" direction="in" />
<!-- names will be returned over sockfd -->
</method>
<method name="ListKeys">
<arg name="controller" type="s" direction="in" />
<arg name="cgroup" type="s" direction="in" />
<!-- name, ownerid, groupid, perms -->
<arg name="output" type="a(suuu)" direction="out" />
</method>
<!-- still to add: low priority (kernel not ready),
getEventfd
-->
<property name="api_version" type="i" access="read" />
</interface>
</node>