Revision 9b94cf0f docs/design/resource-pool-projects.rst
b/docs/design/resource-pool-projects.rst | ||
---|---|---|
126 | 126 |
Each resource registered in the system is assigned a default quota limit. |
127 | 127 |
A newly-activated user is given these limits as their base quota. Up to now, |
128 | 128 |
a change in a default quota limit propagates to all users' base quota |
129 |
(except if they have been customized). Since all users will now have, in a |
|
130 |
way, `customized' base quota (through their base projects), this effect is |
|
131 |
meaningless. Therefore, semantics of default quota limits will change to |
|
132 |
affect only future users (i.e. construction of new base projects). |
|
129 |
(except if they have been customized). Since all users' base quota will be |
|
130 |
controlled through their base projects, the default behavior of |
|
131 |
``resource-modify`` will change to affect only future users (i.e. |
|
132 |
construction of new base projects). However, new option |
|
133 |
``--update-existing-base-projects`` will allow setting the limits to |
|
134 |
existing base projects, too. This is useful, for example, when setting a |
|
135 |
newly registered resource. |
|
133 | 136 |
|
134 | 137 |
Private projects |
135 | 138 |
---------------- |
... | ... | |
182 | 185 |
away the need to write both the user-level and the project-level provisions. |
183 | 186 |
The previous commission will be issued with:: |
184 | 187 |
|
185 |
issue_one_commission(token, holder="user-uuid", source="project-uuid",
|
|
188 |
issue_one_commission(holder="user-uuid", source="project-uuid", |
|
186 | 189 |
provisions={"cyclades.vm": 1, "cyclades.cpu": 2}) |
187 | 190 |
|
188 | 191 |
The service is responsible to record this resource-to-project association. |
... | ... | |
200 | 203 |
|
201 | 204 |
The system will support reassigning a resource to a new project. One needs |
202 | 205 |
to specify all related resource values. Astakosclient will provide a |
203 |
convenience function ``reassign_resources`` to construct all needed
|
|
206 |
convenience function ``issue_resource_reassignment`` to construct all needed
|
|
204 | 207 |
provisions. For instance, reassigning a VM with two CPUs can be done with:: |
205 | 208 |
|
206 |
reassign_resources(token, holder="user-uuid", from="from-uuid", to="to-uuid", |
|
207 |
provisions={"cyclades.vm": 1, "cyclades.cpu": 2}) |
|
209 |
issue_resource_reassignment(holder="user-uuid", |
|
210 |
from_source="from-uuid", to_source="to-uuid", |
|
211 |
provisions={"cyclades.vm": 1, "cyclades.cpu": 2}) |
|
208 | 212 |
|
209 | 213 |
This will issue the following provisions to the Quotaholder:: |
210 | 214 |
|
... | ... | |
304 | 308 |
} |
305 | 309 |
|
306 | 310 |
All service API calls that create resources can specify the project where |
307 |
they will be attributed. For example ``POST /servers`` will receive an extra |
|
308 |
argument ``project``. If it is missing, the user's base project will be |
|
309 |
assumed. Moreover, extra calls will be needed for resource reassignment, |
|
311 |
they will be attributed. |
|
312 |
|
|
313 |
In cyclades, ``POST /servers`` (likewise for networks and floating IPs) will |
|
314 |
receive an extra argument ``project``. If it is missing, the user's base |
|
315 |
project will be assumed. In calls detailing a resource (e.g., ``GET |
|
316 |
/servers/<server_id>``), the field ``tenant_id`` will contain the |
|
317 |
project id. |
|
318 |
|
|
319 |
Moreover, extra calls will be needed for resource reassignment, |
|
310 | 320 |
e.g:: |
311 | 321 |
|
312 | 322 |
POST /servers/<server-id>/action |
313 | 323 |
|
314 | 324 |
{ |
315 |
"reassign": <project-id>
|
|
325 |
"reassign": {"project": <project-id>}
|
|
316 | 326 |
} |
317 | 327 |
|
328 |
In pithos, ``PUT`` and ``POST`` calls at the container level will accept an |
|
329 |
extra optional policy ``project``. The former call assigns a newly created |
|
330 |
container to a given project, the latter reassigns an existing container. |
|
331 |
Field ``x-container-policy-project`` will be retrieved by a ``HEAD`` call at |
|
332 |
the container level. |
|
333 |
|
|
318 | 334 |
User interface |
319 | 335 |
-------------- |
320 | 336 |
|
... | ... | |
376 | 392 |
------------------------ |
377 | 393 |
cyclades.vm 100 50 |
378 | 394 |
|
379 |
``snf-manage quota`` will no more be used to list quota; it may be preserved
|
|
380 |
for checking the integrity of the Quotaholder.
|
|
395 |
``snf-manage quota`` will be removed; checking the integrity of the
|
|
396 |
Quotaholder will be provided by a new command ``reconcile-quota``.
|
|
381 | 397 |
|
382 | 398 |
A new command ``snf-manage project-modify`` will automate the process of |
383 | 399 |
applying/approving applications in order to modify some project settings, |
Also available in: Unified diff