# HG changeset patch # User Paul Boddie # Date 1462887953 -7200 # Node ID b9f3c2a2ca2bc79e043b89e4d9c2c7c7e308e993 # Parent 53901bdc8b97fbbdad6d0cfd584b2978267254c4 Replaced store-specific limits initialisation details with tool examples. diff -r 53901bdc8b97 -r b9f3c2a2ca2b docs/wiki/Resources --- a/docs/wiki/Resources Tue May 10 15:16:55 2016 +0200 +++ b/docs/wiki/Resources Tue May 10 15:45:53 2016 +0200 @@ -372,59 +372,36 @@ ==== Initialising Quotas ==== -Within the journal storage area (described in the -[[../FilesystemUsage|filesystem guide]] and [[../DatabaseStore|database guide]]), -a quota group directory must be initialised with a `limits` file indicating -the amount of time that can be occupied by the cumulative total of all events -scheduled by an individual user or a group of which they are a member. For -example: +Within the journal storage area, a quota may be initialised with limits +indicating the amount of time that can be occupied by the cumulative total of +all events scheduled by an individual user or a group of which they are a +member. + +Such limits may be set directly using the `limits` file in a quota directory +(described in the [[../FilesystemUsage|filesystem guide]]) or in the +`quota_limits` table (described in the [[../DatabaseStore|database guide]]), +but a tool is also provided to set such limits. For example: {{{ -mailto:vincent.vole@example.com PT10H +set_quota_limit.py 'mailto:resource-car-cadillac@example.com' \ + 'mailto:vincent.vole@example.com' PT10H }}} -This indicates that the given user may only reserve 10 hours of events or less. -Attempts to schedule more time will be declined. +This indicates that the given user may only reserve 10 hours of events or less +within the given quota (corresponding to a specific resource in the above +example). Attempts to schedule more time will be declined. To impose a general quota, the special `*` identity can be used: {{{ -* PT10H +set_quota_limit.py 'mailto:resource-car-cadillac@example.com' \ + '*' PT10H }}} When a user identity is not listed and no general quota is defined, that particular user will be unable to reserve the resource unless defined as a member of a group listed in the `limits` file, as described below. -{{{{#!wiki tip -In a deployment using the [[../FileStore|file store]], files as described -above and below hold mappings and definitions in the given format. In a -deployment using the [[../DatabaseStore|database store]], database tables -hold such mappings with each column dedicated to a particular kind of -information. - -The examples here can be transcribed by just taking each -element and putting it in the appropriate column within a table, making -sure to set the `quota` column to indicate which quota is involved. For -example, to set the above limits in PostgreSQL, the following operations -may be used: - -{{{ -insert into quota_limits (quota, user_group, quota_limit) values ( - 'mailto:resource-car-cadillac@example.com', - 'mailto:vincent.vole@example.com', - 'PT10H'); -insert into quota_limits (quota, user_group, quota_limit) values ( - 'mailto:resource-car-cadillac@example.com', - '*', - 'PT10H'); -}}} - -Here, the `quota` column is set to `mailto:resource-car-cadillac@example.com`. -In a file-based journal, the equivalent `limits` file would be placed within a -quota directory having the name `mailto:resource-car-cadillac@example.com`. -}}}} - ==== Sharing Quotas Across Users ==== When the use of resources is to be shared between users in such a way that