paul@1032 | 1 | = Resources = |
paul@1032 | 2 | |
paul@1032 | 3 | In imip-agent, resources are a special kind of user that act upon requests |
paul@1032 | 4 | to schedule events and that perform such scheduling autonomously, meaning |
paul@1032 | 5 | that no human intervention is necessary when such resources receive messages |
paul@1032 | 6 | containing invitations. |
paul@1032 | 7 | |
paul@1032 | 8 | By default, the [[../AgentPrograms|agent program]] responsible for resources |
paul@1032 | 9 | merely attempts to fit a received event into the resource's schedule. However, |
paul@1032 | 10 | in some organisations and environments, it is likely to be the case that other |
paul@1032 | 11 | policies are needed to ensure that a resource is not misused, overused or made |
paul@1032 | 12 | unnecessarily unavailable. |
paul@1032 | 13 | |
paul@1032 | 14 | The [[../Preferences|preferences]] provide a way of controlling the behaviour |
paul@1032 | 15 | of resources, just as with any other kind of user, but certain preferences |
paul@1032 | 16 | are central to the configuration of resources. |
paul@1032 | 17 | |
paul@1032 | 18 | <<TableOfContents(2,4)>> |
paul@1032 | 19 | |
paul@1032 | 20 | == Scheduling Functions == |
paul@1032 | 21 | |
paul@1032 | 22 | The [[../Preferences#scheduling_function|scheduling_function]] setting |
paul@1032 | 23 | indicates the behaviour of a resource when a valid request to schedule an |
paul@1032 | 24 | event has been received. By default, a value equivalent to the following is |
paul@1032 | 25 | employed: |
paul@1032 | 26 | |
paul@1037 | 27 | {{{{#!table |
paul@1037 | 28 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1037 | 29 | == |
paul@1037 | 30 | <style="vertical-align: top;"> |
paul@1037 | 31 | |
paul@1032 | 32 | {{{ |
paul@1032 | 33 | schedule_in_freebusy |
paul@1032 | 34 | }}} |
paul@1032 | 35 | |
paul@1037 | 36 | || |
paul@1037 | 37 | |
paul@1037 | 38 | {{{#!graphviz |
paul@1037 | 39 | //format=svg |
paul@1037 | 40 | //transform=notugly |
paul@1037 | 41 | digraph scheduling_decisions { |
paul@1037 | 42 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1037 | 43 | edge [tooltip="Scheduling decisions"]; |
paul@1037 | 44 | |
paul@1037 | 45 | mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; |
paul@1037 | 46 | |
paul@1037 | 47 | subgraph { |
paul@1037 | 48 | rank=same; |
paul@1037 | 49 | schedule_in_freebusy [label="Can schedule in free/busy?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 50 | freebusy [label="Free/busy",shape=folder]; |
paul@1037 | 51 | } |
paul@1037 | 52 | |
paul@1037 | 53 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 54 | |
paul@1039 | 55 | subgraph { |
paul@1039 | 56 | rank=same; |
paul@1039 | 57 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 58 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 59 | } |
paul@1037 | 60 | |
paul@1037 | 61 | mail -> schedule_in_freebusy -> schedule -> accept; |
paul@1037 | 62 | schedule_in_freebusy -> decline [style=dashed]; |
paul@1037 | 63 | freebusy -> schedule_in_freebusy; |
paul@1037 | 64 | } |
paul@1037 | 65 | }}} |
paul@1037 | 66 | |
paul@1037 | 67 | }}}} |
paul@1037 | 68 | |
paul@1032 | 69 | As described above, this merely attempts to schedule an event in the free |
paul@1032 | 70 | periods of the resource's schedule. However, no attempt is made to reject the |
paul@1032 | 71 | booking of the resource according to the identity of the organiser. |
paul@1032 | 72 | |
paul@1032 | 73 | === Identity Controls === |
paul@1032 | 74 | |
paul@1032 | 75 | Although identity controls may be implemented in the e-mail system, |
paul@1032 | 76 | effectively preventing the messages from addresses other than those within |
paul@1032 | 77 | an organisation (for example) from being delivered to the resource, it is |
paul@1032 | 78 | possible to use scheduling functions to implement such controls instead. |
paul@1032 | 79 | |
paul@1032 | 80 | ==== Same Domain Membership ==== |
paul@1032 | 81 | |
paul@1032 | 82 | For instance, the following combines the default free/busy check with a |
paul@1032 | 83 | test that the organiser belongs to the same Internet mail domain (by using |
paul@1032 | 84 | the organiser's address): |
paul@1032 | 85 | |
paul@1037 | 86 | {{{{#!table |
paul@1037 | 87 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1037 | 88 | == |
paul@1037 | 89 | <style="vertical-align: top;"> |
paul@1037 | 90 | |
paul@1032 | 91 | {{{ |
paul@1032 | 92 | schedule_in_freebusy |
paul@1032 | 93 | same_domain_only |
paul@1032 | 94 | }}} |
paul@1032 | 95 | |
paul@1037 | 96 | || |
paul@1037 | 97 | |
paul@1037 | 98 | {{{#!graphviz |
paul@1037 | 99 | //format=svg |
paul@1037 | 100 | //transform=notugly |
paul@1037 | 101 | digraph scheduling_decisions { |
paul@1037 | 102 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1037 | 103 | edge [tooltip="Scheduling decisions"]; |
paul@1037 | 104 | |
paul@1037 | 105 | mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; |
paul@1037 | 106 | |
paul@1037 | 107 | subgraph { |
paul@1037 | 108 | rank=same; |
paul@1037 | 109 | schedule_in_freebusy [label="Can schedule in free/busy?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 110 | freebusy [label="Free/busy",shape=folder]; |
paul@1037 | 111 | } |
paul@1037 | 112 | |
paul@1037 | 113 | same_domain_only [label="Organiser has resource domain?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 114 | |
paul@1037 | 115 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 116 | |
paul@1039 | 117 | subgraph { |
paul@1039 | 118 | rank=same; |
paul@1039 | 119 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 120 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 121 | } |
paul@1037 | 122 | |
paul@1037 | 123 | mail -> schedule_in_freebusy -> same_domain_only -> schedule -> accept; |
paul@1037 | 124 | schedule_in_freebusy -> decline [style=dashed]; |
paul@1037 | 125 | same_domain_only -> decline [style=dashed]; |
paul@1037 | 126 | freebusy -> schedule_in_freebusy; |
paul@1037 | 127 | } |
paul@1037 | 128 | }}} |
paul@1037 | 129 | |
paul@1037 | 130 | }}}} |
paul@1037 | 131 | |
paul@1032 | 132 | Note that if the first function is omitted, no check against the resource's |
paul@1032 | 133 | schedule will occur, so it is necessary to mention any such function in the |
paul@1032 | 134 | list. |
paul@1032 | 135 | |
paul@1032 | 136 | ==== Access Control Lists ==== |
paul@1032 | 137 | |
paul@1032 | 138 | A simple domain-related test may not be sufficient to control access to a |
paul@1032 | 139 | resource. Thus, another function is provided to exercise a finer degree of |
paul@1032 | 140 | control over event participants. For example: |
paul@1032 | 141 | |
paul@1037 | 142 | {{{{#!table |
paul@1037 | 143 | '''Scheduling Functions and Data''' || '''Decision Process''' |
paul@1037 | 144 | == |
paul@1037 | 145 | <style="vertical-align: top;"> |
paul@1037 | 146 | |
paul@1032 | 147 | {{{ |
paul@1032 | 148 | schedule_in_freebusy |
paul@1032 | 149 | access_control_list |
paul@1032 | 150 | }}} |
paul@1032 | 151 | |
paul@1037 | 152 | Access control list: |
paul@1037 | 153 | |
paul@1037 | 154 | {{{ |
paul@1037 | 155 | accept |
paul@1037 | 156 | }}} |
paul@1037 | 157 | |
paul@1037 | 158 | || |
paul@1037 | 159 | |
paul@1037 | 160 | {{{#!graphviz |
paul@1037 | 161 | //format=svg |
paul@1037 | 162 | //transform=notugly |
paul@1037 | 163 | digraph scheduling_decisions { |
paul@1037 | 164 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1037 | 165 | edge [tooltip="Scheduling decisions"]; |
paul@1037 | 166 | |
paul@1037 | 167 | mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; |
paul@1037 | 168 | |
paul@1037 | 169 | subgraph { |
paul@1037 | 170 | rank=same; |
paul@1037 | 171 | schedule_in_freebusy [label="Can schedule in free/busy?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 172 | freebusy [label="Free/busy",shape=folder]; |
paul@1037 | 173 | } |
paul@1037 | 174 | |
paul@1037 | 175 | subgraph { |
paul@1037 | 176 | rank=same; |
paul@1037 | 177 | access_control_list [label="Access control list permits booking?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 178 | acl [label="acl setting",shape=folder]; |
paul@1037 | 179 | } |
paul@1037 | 180 | |
paul@1037 | 181 | accept_default [label="Accept invitation by default",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 182 | end_acl [label="end",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 183 | |
paul@1037 | 184 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 185 | |
paul@1039 | 186 | subgraph { |
paul@1039 | 187 | rank=same; |
paul@1039 | 188 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 189 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 190 | } |
paul@1037 | 191 | |
paul@1037 | 192 | mail -> schedule_in_freebusy -> access_control_list -> accept_default -> end_acl -> schedule -> accept; |
paul@1037 | 193 | end_acl -> decline [style=dashed]; |
paul@1037 | 194 | schedule_in_freebusy -> decline [style=dashed]; |
paul@1037 | 195 | freebusy -> schedule_in_freebusy; |
paul@1037 | 196 | acl -> access_control_list; |
paul@1037 | 197 | } |
paul@1037 | 198 | }}} |
paul@1037 | 199 | |
paul@1037 | 200 | }}}} |
paul@1037 | 201 | |
paul@1037 | 202 | To accompany the scheduling functions, the [[../Preferences#acl|acl]] setting |
paul@1037 | 203 | in the resource's preferences must be set, or if a separate file is more |
paul@1037 | 204 | appropriate, its full path may be given as an argument to `access_control_list`: |
paul@1032 | 205 | |
paul@1032 | 206 | {{{ |
paul@1032 | 207 | schedule_in_freebusy |
paul@1032 | 208 | access_control_list /etc/imip-agent/resources.acl |
paul@1032 | 209 | }}} |
paul@1032 | 210 | |
paul@1032 | 211 | Within the file provided by the setting or separate file, a list of rules |
paul@1037 | 212 | must describe the handling procedure for an event. For example, the following |
paul@1037 | 213 | was given in the above example: |
paul@1032 | 214 | |
paul@1032 | 215 | {{{ |
paul@1032 | 216 | accept |
paul@1032 | 217 | }}} |
paul@1032 | 218 | |
paul@1032 | 219 | This will merely accept all invitations, anyway. However, it may be |
paul@1032 | 220 | appropriate to prevent certain users from using resources. For example: |
paul@1032 | 221 | |
paul@1037 | 222 | {{{{#!table |
paul@1037 | 223 | '''Scheduling Functions and Data''' || '''Decision Process''' |
paul@1037 | 224 | == |
paul@1037 | 225 | <style="vertical-align: top;"> |
paul@1037 | 226 | |
paul@1037 | 227 | {{{ |
paul@1037 | 228 | schedule_in_freebusy |
paul@1037 | 229 | access_control_list |
paul@1037 | 230 | }}} |
paul@1037 | 231 | |
paul@1037 | 232 | Access control list: |
paul@1037 | 233 | |
paul@1032 | 234 | {{{ |
paul@1032 | 235 | accept |
paul@1032 | 236 | decline attendee simon.skunk@example.com |
paul@1032 | 237 | }}} |
paul@1032 | 238 | |
paul@1037 | 239 | || |
paul@1037 | 240 | |
paul@1037 | 241 | {{{#!graphviz |
paul@1037 | 242 | //format=svg |
paul@1037 | 243 | //transform=notugly |
paul@1037 | 244 | digraph scheduling_decisions { |
paul@1037 | 245 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1037 | 246 | edge [tooltip="Scheduling decisions"]; |
paul@1037 | 247 | |
paul@1037 | 248 | mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; |
paul@1037 | 249 | |
paul@1037 | 250 | subgraph { |
paul@1037 | 251 | rank=same; |
paul@1037 | 252 | schedule_in_freebusy [label="Can schedule in free/busy?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 253 | freebusy [label="Free/busy",shape=folder]; |
paul@1037 | 254 | } |
paul@1037 | 255 | |
paul@1037 | 256 | subgraph { |
paul@1037 | 257 | rank=same; |
paul@1037 | 258 | access_control_list [label="Access control list permits booking?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 259 | acl [label="acl setting",shape=folder]; |
paul@1037 | 260 | } |
paul@1037 | 261 | |
paul@1037 | 262 | accept_default [label="Accept invitation by default",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 263 | decline_attendee [label="Is attendee simon.skunk@example.com?",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 264 | end_acl [label="end",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 265 | |
paul@1037 | 266 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 267 | |
paul@1039 | 268 | subgraph { |
paul@1039 | 269 | rank=same; |
paul@1039 | 270 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 271 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 272 | } |
paul@1037 | 273 | |
paul@1037 | 274 | mail -> schedule_in_freebusy -> access_control_list -> accept_default -> decline_attendee -> end_acl -> schedule -> accept; |
paul@1037 | 275 | end_acl -> decline [style=dashed]; |
paul@1037 | 276 | schedule_in_freebusy -> decline [style=dashed]; |
paul@1037 | 277 | freebusy -> schedule_in_freebusy; |
paul@1037 | 278 | acl -> access_control_list; |
paul@1037 | 279 | } |
paul@1037 | 280 | }}} |
paul@1037 | 281 | |
paul@1037 | 282 | }}}} |
paul@1037 | 283 | |
paul@1032 | 284 | This example indicates that by default, invitations will be accepted, but if |
paul@1032 | 285 | one of the attendees of an event is `simon.skunk@example.com`, the invitation |
paul@1032 | 286 | will be declined. However, it may be the case that this rule should be |
paul@1032 | 287 | overridden under certain circumstances. For example: |
paul@1032 | 288 | |
paul@1037 | 289 | {{{{#!table |
paul@1037 | 290 | '''Scheduling Functions and Data''' || '''Decision Process''' |
paul@1037 | 291 | == |
paul@1037 | 292 | <style="vertical-align: top;"> |
paul@1037 | 293 | |
paul@1037 | 294 | {{{ |
paul@1037 | 295 | schedule_in_freebusy |
paul@1037 | 296 | access_control_list |
paul@1037 | 297 | }}} |
paul@1037 | 298 | |
paul@1037 | 299 | Access control list: |
paul@1037 | 300 | |
paul@1032 | 301 | {{{ |
paul@1032 | 302 | accept |
paul@1032 | 303 | decline attendee simon.skunk@example.com |
paul@1032 | 304 | accept organiser paul.boddie@example.com |
paul@1032 | 305 | }}} |
paul@1032 | 306 | |
paul@1037 | 307 | || |
paul@1037 | 308 | |
paul@1037 | 309 | {{{#!graphviz |
paul@1037 | 310 | //format=svg |
paul@1037 | 311 | //transform=notugly |
paul@1037 | 312 | digraph scheduling_decisions { |
paul@1037 | 313 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1037 | 314 | edge [tooltip="Scheduling decisions"]; |
paul@1037 | 315 | |
paul@1037 | 316 | mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; |
paul@1037 | 317 | |
paul@1037 | 318 | subgraph { |
paul@1037 | 319 | rank=same; |
paul@1037 | 320 | schedule_in_freebusy [label="Can schedule in free/busy?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 321 | freebusy [label="Free/busy",shape=folder]; |
paul@1037 | 322 | } |
paul@1037 | 323 | |
paul@1037 | 324 | subgraph { |
paul@1037 | 325 | rank=same; |
paul@1037 | 326 | access_control_list [label="Access control list permits booking?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 327 | acl [label="acl setting",shape=folder]; |
paul@1037 | 328 | } |
paul@1037 | 329 | |
paul@1037 | 330 | accept_default [label="Accept invitation by default",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 331 | decline_attendee [label="Is attendee simon.skunk@example.com?",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 332 | accept_organiser [label="Is organiser paul.boddie@example.com?",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 333 | end_acl [label="end",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 334 | |
paul@1037 | 335 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 336 | |
paul@1039 | 337 | subgraph { |
paul@1039 | 338 | rank=same; |
paul@1039 | 339 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 340 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 341 | } |
paul@1037 | 342 | |
paul@1037 | 343 | mail -> schedule_in_freebusy -> access_control_list -> accept_default -> decline_attendee -> accept_organiser -> end_acl -> schedule -> accept; |
paul@1037 | 344 | end_acl -> decline [style=dashed]; |
paul@1037 | 345 | schedule_in_freebusy -> decline [style=dashed]; |
paul@1037 | 346 | freebusy -> schedule_in_freebusy; |
paul@1037 | 347 | acl -> access_control_list; |
paul@1037 | 348 | } |
paul@1037 | 349 | }}} |
paul@1037 | 350 | |
paul@1037 | 351 | }}}} |
paul@1037 | 352 | |
paul@1032 | 353 | Here, the stated organiser may still arrange a booking of the resource where |
paul@1032 | 354 | the previously-mentioned attendee is involved. |
paul@1039 | 355 | |
paul@1039 | 356 | === Quota Controls === |
paul@1039 | 357 | |
paul@1039 | 358 | In contrast to each user's stored information which consolidates information |
paul@1039 | 359 | related to that user's own schedule, the quota system consolidates information |
paul@1039 | 360 | related to the schedules of one or more resources, thus enabling observations |
paul@1039 | 361 | to be made about their collective usage. |
paul@1039 | 362 | |
paul@1039 | 363 | First, consider a resource such as a car where an organiser of an event may be |
paul@1039 | 364 | booking the car for travel purposes. A quota prevents the organiser from |
paul@1039 | 365 | booking the resource too much and denying other users access to it. |
paul@1039 | 366 | |
paul@1039 | 367 | Now consider a number of separate car resources. An organiser might attempt to |
paul@1039 | 368 | get around any individual resource quota by booking a number of different cars. |
paul@1167 | 369 | By grouping the resources together, the organiser will exhaust any quota set on |
paul@1167 | 370 | the group of resources as they try and make reservations for the different |
paul@1167 | 371 | members of the quota group. |
paul@1039 | 372 | |
paul@1039 | 373 | ==== Initialising Quotas ==== |
paul@1039 | 374 | |
paul@1165 | 375 | Within the journal storage area, a quota may be initialised with limits |
paul@1165 | 376 | indicating the amount of time that can be occupied by the cumulative total of |
paul@1165 | 377 | all events scheduled by an individual user or a group of which they are a |
paul@1165 | 378 | member. |
paul@1165 | 379 | |
paul@1165 | 380 | Such limits may be set directly using the `limits` file in a quota directory |
paul@1165 | 381 | (described in the [[../FilesystemUsage|filesystem guide]]) or in the |
paul@1165 | 382 | `quota_limits` table (described in the [[../DatabaseStore|database guide]]), |
paul@1165 | 383 | but a tool is also provided to set such limits. For example: |
paul@1039 | 384 | |
paul@1039 | 385 | {{{ |
paul@1165 | 386 | set_quota_limit.py 'mailto:resource-car-cadillac@example.com' \ |
paul@1165 | 387 | 'mailto:vincent.vole@example.com' PT10H |
paul@1039 | 388 | }}} |
paul@1039 | 389 | |
paul@1165 | 390 | This indicates that the given user may only reserve 10 hours of events or less |
paul@1165 | 391 | within the given quota (corresponding to a specific resource in the above |
paul@1165 | 392 | example). Attempts to schedule more time will be declined. |
paul@1039 | 393 | |
paul@1039 | 394 | To impose a general quota, the special `*` identity can be used: |
paul@1039 | 395 | |
paul@1039 | 396 | {{{ |
paul@1165 | 397 | set_quota_limit.py 'mailto:resource-car-cadillac@example.com' \ |
paul@1165 | 398 | '*' PT10H |
paul@1039 | 399 | }}} |
paul@1039 | 400 | |
paul@1039 | 401 | When a user identity is not listed and no general quota is defined, that |
paul@1039 | 402 | particular user will be unable to reserve the resource unless defined as a |
paul@1039 | 403 | member of a group listed in the `limits` file, as described below. |
paul@1039 | 404 | |
paul@1039 | 405 | ==== Sharing Quotas Across Users ==== |
paul@1039 | 406 | |
paul@1039 | 407 | When the use of resources is to be shared between users in such a way that |
paul@1039 | 408 | groups of users will be sharing a single quota, the `groups` file in the |
paul@1039 | 409 | quota directory must be defined, mapping each user identity to the group to |
paul@1039 | 410 | which they will belong. For example: |
paul@1039 | 411 | |
paul@1167 | 412 | {{{{#!table |
paul@1167 | 413 | '''Scheduling Data''' || '''Decision Process''' |
paul@1167 | 414 | == |
paul@1167 | 415 | <style="vertical-align: top;"> |
paul@1167 | 416 | The groups are defined as follows in the `groups` file: |
paul@1167 | 417 | |
paul@1039 | 418 | {{{ |
paul@1039 | 419 | mailto:vincent.vole@example.com developers |
paul@1039 | 420 | mailto:harvey.horse@example.com developers |
paul@1039 | 421 | mailto:paul.boddie@example.com developers |
paul@1039 | 422 | mailto:simon.skunk@example.com testers |
paul@1039 | 423 | }}} |
paul@1039 | 424 | |
paul@1039 | 425 | The group identity can then be employed in the `limits` file: |
paul@1039 | 426 | |
paul@1039 | 427 | {{{ |
paul@1039 | 428 | developers PT10H |
paul@1039 | 429 | testers PT20H |
paul@1039 | 430 | }}} |
paul@1039 | 431 | |
paul@1167 | 432 | || |
paul@1167 | 433 | |
paul@1167 | 434 | {{{#!graphviz |
paul@1167 | 435 | //format=svg |
paul@1167 | 436 | //transform=notugly |
paul@1167 | 437 | digraph quota_users { |
paul@1167 | 438 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Quota users"]; |
paul@1167 | 439 | edge [tooltip="Quota users"]; |
paul@1167 | 440 | |
paul@1167 | 441 | subgraph { |
paul@1167 | 442 | rank=same; |
paul@1167 | 443 | user1 [label="User is vincent.vole@example.com"]; |
paul@1167 | 444 | user2 [label="User is oliver.otter@example.com"]; |
paul@1167 | 445 | } |
paul@1167 | 446 | |
paul@1167 | 447 | havegroup [label="Have group for quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 448 | haveuser [label="Have group for user in quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 449 | |
paul@1167 | 450 | group1 [label="User is vincent.vole@example.com\nGroup is developers"]; |
paul@1167 | 451 | group2 [label="User is oliver.otter@example.com"]; |
paul@1167 | 452 | |
paul@1167 | 453 | checkuser1 [label="Have limit for group?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 454 | checkgeneral1 [label="Have general limit?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 455 | |
paul@1167 | 456 | checkuser2 [label="Have limit for user?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 457 | checkgeneral2 [label="Have general limit?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 458 | |
paul@1167 | 459 | accept [label="Quota",shape=folder,style=filled,fillcolor=cyan]; |
paul@1167 | 460 | decline [label="No quota",shape=folder,style=filled,fillcolor=cyan]; |
paul@1167 | 461 | |
paul@1167 | 462 | user1 -> havegroup -> haveuser -> group1 -> checkuser1 -> checkgeneral1 -> accept; |
paul@1167 | 463 | user2 -> havegroup -> haveuser -> group2 -> checkuser2 -> checkgeneral2 -> decline [style=dashed]; |
paul@1167 | 464 | } |
paul@1167 | 465 | }}} |
paul@1167 | 466 | }}}} |
paul@1167 | 467 | |
paul@1167 | 468 | Where individuals are not assigned to groups, any individual limit will apply |
paul@1167 | 469 | to them; otherwise, the general quota applies. Where individuals are assigned |
paul@1167 | 470 | to groups, any group limit will apply; otherwise, the general quota applies. |
paul@1039 | 471 | |
paul@1039 | 472 | ==== Individual Resource Quotas ==== |
paul@1039 | 473 | |
paul@1039 | 474 | The trivial case of applying quotas is to give a resource its own quota. This |
paul@1039 | 475 | is achieved by not specifying any arguments to the `check_quota` scheduling |
paul@1058 | 476 | function or to the `add_to_quota` and `remove_from_quota` functions. |
paul@1058 | 477 | |
paul@1058 | 478 | {{{{#!table |
paul@1058 | 479 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1058 | 480 | == |
paul@1058 | 481 | <style="vertical-align: top;"> |
paul@1058 | 482 | |
paul@1058 | 483 | {{{ |
paul@1058 | 484 | check_quota |
paul@1058 | 485 | }}} |
paul@1058 | 486 | |
paul@1058 | 487 | || |
paul@1058 | 488 | |
paul@1058 | 489 | {{{#!graphviz |
paul@1058 | 490 | //format=svg |
paul@1058 | 491 | //transform=notugly |
paul@1058 | 492 | digraph scheduling_decisions { |
paul@1058 | 493 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1058 | 494 | edge [tooltip="Scheduling decisions"]; |
paul@1058 | 495 | |
paul@1058 | 496 | subgraph { |
paul@1058 | 497 | rank=same; |
paul@1058 | 498 | mail [label="Incoming mail\nfrom vincent.vole@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1058 | 499 | cancel [label="Incoming cancellation",shape=folder,style=filled,fillcolor=cyan]; |
paul@1058 | 500 | } |
paul@1058 | 501 | |
paul@1058 | 502 | subgraph { |
paul@1058 | 503 | rank=same; |
paul@1058 | 504 | check_quota [label="Is allowed by quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1058 | 505 | quota [label="Quota for resource",shape=folder]; |
paul@1058 | 506 | quota_for_vole [label="...applying to\nvincent.vole@example.com",shape=folder]; |
paul@1058 | 507 | } |
paul@1058 | 508 | |
paul@1058 | 509 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1058 | 510 | |
paul@1058 | 511 | subgraph { |
paul@1058 | 512 | rank=same; |
paul@1058 | 513 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1058 | 514 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1058 | 515 | } |
paul@1058 | 516 | |
paul@1058 | 517 | add_to_quota [label="Add to quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1058 | 518 | remove_from_quota [label="Remove from quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1058 | 519 | |
paul@1058 | 520 | mail -> check_quota -> schedule -> accept; |
paul@1058 | 521 | check_quota -> decline [style=dashed]; |
paul@1058 | 522 | schedule -> add_to_quota -> quota; |
paul@1058 | 523 | quota -> quota_for_vole -> check_quota; |
paul@1058 | 524 | |
paul@1058 | 525 | cancel -> remove_from_quota -> quota; |
paul@1058 | 526 | } |
paul@1058 | 527 | }}} |
paul@1058 | 528 | |
paul@1058 | 529 | }}}} |
paul@1039 | 530 | |
paul@1039 | 531 | ==== Common Resource Quotas ==== |
paul@1039 | 532 | |
paul@1039 | 533 | By indicating an argument to the different functions, a common quota can be |
paul@1039 | 534 | employed. In the following example, both resources would employ the given |
paul@1039 | 535 | function invocations to pool their knowledge about their schedules. |
paul@1039 | 536 | |
paul@1039 | 537 | {{{{#!table |
paul@1058 | 538 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1039 | 539 | == |
paul@1039 | 540 | <style="vertical-align: top;"> |
paul@1039 | 541 | |
paul@1039 | 542 | {{{ |
paul@1039 | 543 | check_quota cars |
paul@1039 | 544 | }}} |
paul@1039 | 545 | |
paul@1039 | 546 | || |
paul@1039 | 547 | |
paul@1039 | 548 | {{{#!graphviz |
paul@1039 | 549 | //format=svg |
paul@1039 | 550 | //transform=notugly |
paul@1039 | 551 | digraph scheduling_decisions { |
paul@1039 | 552 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1039 | 553 | edge [tooltip="Scheduling decisions"]; |
paul@1039 | 554 | |
paul@1039 | 555 | subgraph { |
paul@1039 | 556 | rank=same; |
paul@1039 | 557 | mail_cadillac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-cadillac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 558 | mail_pontiac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-pontiac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 559 | cancel [label="Incoming cancellation",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 560 | } |
paul@1039 | 561 | |
paul@1039 | 562 | subgraph { |
paul@1039 | 563 | rank=same; |
paul@1039 | 564 | check_quota [label="Is allowed by quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 565 | quota_cars [label="Quota for cars",shape=folder]; |
paul@1039 | 566 | quota_cars_vole [label="...applying to\nvincent.vole@example.com",shape=folder]; |
paul@1039 | 567 | } |
paul@1039 | 568 | |
paul@1039 | 569 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 570 | |
paul@1039 | 571 | subgraph { |
paul@1039 | 572 | rank=same; |
paul@1039 | 573 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 574 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 575 | } |
paul@1039 | 576 | |
paul@1039 | 577 | add_to_quota [label="Add to quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1039 | 578 | remove_from_quota [label="Remove from quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1039 | 579 | |
paul@1039 | 580 | mail_cadillac -> check_quota; |
paul@1039 | 581 | mail_pontiac -> check_quota -> schedule -> accept; |
paul@1039 | 582 | check_quota -> decline [style=dashed]; |
paul@1039 | 583 | schedule -> add_to_quota -> quota_cars; |
paul@1039 | 584 | quota_cars -> quota_cars_vole -> check_quota; |
paul@1039 | 585 | |
paul@1039 | 586 | cancel -> remove_from_quota -> quota_cars; |
paul@1039 | 587 | } |
paul@1039 | 588 | }}} |
paul@1039 | 589 | |
paul@1039 | 590 | }}}} |
paul@1039 | 591 | |
paul@1039 | 592 | ==== Collective Scheduling ==== |
paul@1039 | 593 | |
paul@1039 | 594 | Consider two separate resources: both may be reserved at the same time by the |
paul@1039 | 595 | same organiser; neither resource would normally decline the reservation on the |
paul@1039 | 596 | basis of schedule availability, should the period concerned be free. However, |
paul@1039 | 597 | it may be undesirable for one organiser to occupy both resources at the same |
paul@1039 | 598 | time. |
paul@1039 | 599 | |
paul@1039 | 600 | Consequently, a mechanism is required to pool the resource schedules in such a |
paul@1039 | 601 | way that any reservation performed for one resource at a given point in time |
paul@1039 | 602 | prohibits another reservation performed for a related resource at the same |
paul@1039 | 603 | point in time by the same user. |
paul@1039 | 604 | |
paul@1039 | 605 | The free/busy records held for a given quota group permit such collective |
paul@1039 | 606 | scheduling decisions and are employed as follows: |
paul@1039 | 607 | |
paul@1039 | 608 | {{{{#!table |
paul@1058 | 609 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1039 | 610 | == |
paul@1039 | 611 | <style="vertical-align: top;"> |
paul@1039 | 612 | |
paul@1039 | 613 | {{{ |
paul@1164 | 614 | schedule_across_quota cars |
paul@1039 | 615 | }}} |
paul@1039 | 616 | |
paul@1039 | 617 | || |
paul@1039 | 618 | |
paul@1039 | 619 | {{{#!graphviz |
paul@1039 | 620 | //format=svg |
paul@1039 | 621 | //transform=notugly |
paul@1039 | 622 | digraph scheduling_decisions { |
paul@1039 | 623 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1039 | 624 | edge [tooltip="Scheduling decisions"]; |
paul@1039 | 625 | |
paul@1039 | 626 | subgraph { |
paul@1039 | 627 | rank=same; |
paul@1039 | 628 | mail_cadillac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-cadillac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 629 | mail_pontiac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-pontiac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 630 | cancel [label="Incoming cancellation",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 631 | } |
paul@1039 | 632 | |
paul@1039 | 633 | subgraph { |
paul@1039 | 634 | rank=same; |
paul@1039 | 635 | schedule_across_quota [label="Can be scheduled within the quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 636 | quota_cars [label="Quota for cars",shape=folder]; |
paul@1039 | 637 | freebusy_cars_vole [label="...recording schedule for\nvincent.vole@example.com",shape=folder]; |
paul@1039 | 638 | } |
paul@1039 | 639 | |
paul@1039 | 640 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 641 | |
paul@1039 | 642 | subgraph { |
paul@1039 | 643 | rank=same; |
paul@1039 | 644 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 645 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 646 | } |
paul@1039 | 647 | |
paul@1039 | 648 | add_to_quota_freebusy [label="Add to quota free/busy",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1039 | 649 | remove_from_quota_freebusy [label="Remove from quota free/busy",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1039 | 650 | |
paul@1039 | 651 | mail_cadillac -> schedule_across_quota; |
paul@1039 | 652 | mail_pontiac -> schedule_across_quota -> schedule -> accept; |
paul@1039 | 653 | schedule_across_quota -> decline [style=dashed]; |
paul@1039 | 654 | schedule -> add_to_quota_freebusy -> quota_cars -> freebusy_cars_vole; |
paul@1039 | 655 | freebusy_cars_vole -> schedule_across_quota; |
paul@1039 | 656 | |
paul@1039 | 657 | cancel -> remove_from_quota_freebusy -> freebusy_cars_vole; |
paul@1039 | 658 | } |
paul@1039 | 659 | }}} |
paul@1039 | 660 | |
paul@1039 | 661 | }}}} |