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@1183 | 73 | === Concurrent Reservations === |
paul@1183 | 74 | |
paul@1183 | 75 | The `schedule_in_freebusy` function causes a resource to attempt to schedule |
paul@1183 | 76 | an event, and by default it rejects requests that involve periods for which |
paul@1183 | 77 | the resource is otherwise committed. However, a resource can be allowed to |
paul@1183 | 78 | attend (or commit to) multiple concurrent events. |
paul@1183 | 79 | |
paul@1183 | 80 | By indicating a value as an argument to the function, a kind of capacity or |
paul@1183 | 81 | commitment level can be assigned to a resource. For example: |
paul@1183 | 82 | |
paul@1183 | 83 | {{{ |
paul@1183 | 84 | schedule_in_freebusy 5 |
paul@1183 | 85 | }}} |
paul@1183 | 86 | |
paul@1183 | 87 | This example indicates that a resource can support five different events |
paul@1183 | 88 | occupying the same point in time. Applications of such concurrent reservations |
paul@1183 | 89 | include things like rooms or resources that can be shared and which have a |
paul@1183 | 90 | notion of a capacity that is not immediately exhausted as soon as one event |
paul@1183 | 91 | seeks to reserve such a room or resource. |
paul@1183 | 92 | |
paul@1032 | 93 | === Identity Controls === |
paul@1032 | 94 | |
paul@1032 | 95 | Although identity controls may be implemented in the e-mail system, |
paul@1032 | 96 | effectively preventing the messages from addresses other than those within |
paul@1032 | 97 | an organisation (for example) from being delivered to the resource, it is |
paul@1032 | 98 | possible to use scheduling functions to implement such controls instead. |
paul@1032 | 99 | |
paul@1032 | 100 | ==== Same Domain Membership ==== |
paul@1032 | 101 | |
paul@1032 | 102 | For instance, the following combines the default free/busy check with a |
paul@1032 | 103 | test that the organiser belongs to the same Internet mail domain (by using |
paul@1032 | 104 | the organiser's address): |
paul@1032 | 105 | |
paul@1037 | 106 | {{{{#!table |
paul@1037 | 107 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1037 | 108 | == |
paul@1037 | 109 | <style="vertical-align: top;"> |
paul@1037 | 110 | |
paul@1032 | 111 | {{{ |
paul@1032 | 112 | schedule_in_freebusy |
paul@1032 | 113 | same_domain_only |
paul@1032 | 114 | }}} |
paul@1032 | 115 | |
paul@1037 | 116 | || |
paul@1037 | 117 | |
paul@1037 | 118 | {{{#!graphviz |
paul@1037 | 119 | //format=svg |
paul@1037 | 120 | //transform=notugly |
paul@1037 | 121 | digraph scheduling_decisions { |
paul@1037 | 122 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1037 | 123 | edge [tooltip="Scheduling decisions"]; |
paul@1037 | 124 | |
paul@1037 | 125 | mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; |
paul@1037 | 126 | |
paul@1037 | 127 | subgraph { |
paul@1037 | 128 | rank=same; |
paul@1037 | 129 | schedule_in_freebusy [label="Can schedule in free/busy?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 130 | freebusy [label="Free/busy",shape=folder]; |
paul@1037 | 131 | } |
paul@1037 | 132 | |
paul@1037 | 133 | same_domain_only [label="Organiser has resource domain?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 134 | |
paul@1037 | 135 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 136 | |
paul@1039 | 137 | subgraph { |
paul@1039 | 138 | rank=same; |
paul@1039 | 139 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 140 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 141 | } |
paul@1037 | 142 | |
paul@1037 | 143 | mail -> schedule_in_freebusy -> same_domain_only -> schedule -> accept; |
paul@1037 | 144 | schedule_in_freebusy -> decline [style=dashed]; |
paul@1037 | 145 | same_domain_only -> decline [style=dashed]; |
paul@1037 | 146 | freebusy -> schedule_in_freebusy; |
paul@1037 | 147 | } |
paul@1037 | 148 | }}} |
paul@1037 | 149 | |
paul@1037 | 150 | }}}} |
paul@1037 | 151 | |
paul@1032 | 152 | Note that if the first function is omitted, no check against the resource's |
paul@1032 | 153 | schedule will occur, so it is necessary to mention any such function in the |
paul@1032 | 154 | list. |
paul@1032 | 155 | |
paul@1032 | 156 | ==== Access Control Lists ==== |
paul@1032 | 157 | |
paul@1032 | 158 | A simple domain-related test may not be sufficient to control access to a |
paul@1032 | 159 | resource. Thus, another function is provided to exercise a finer degree of |
paul@1032 | 160 | control over event participants. For example: |
paul@1032 | 161 | |
paul@1037 | 162 | {{{{#!table |
paul@1037 | 163 | '''Scheduling Functions and Data''' || '''Decision Process''' |
paul@1037 | 164 | == |
paul@1037 | 165 | <style="vertical-align: top;"> |
paul@1037 | 166 | |
paul@1032 | 167 | {{{ |
paul@1032 | 168 | schedule_in_freebusy |
paul@1032 | 169 | access_control_list |
paul@1032 | 170 | }}} |
paul@1032 | 171 | |
paul@1037 | 172 | Access control list: |
paul@1037 | 173 | |
paul@1037 | 174 | {{{ |
paul@1037 | 175 | accept |
paul@1037 | 176 | }}} |
paul@1037 | 177 | |
paul@1037 | 178 | || |
paul@1037 | 179 | |
paul@1037 | 180 | {{{#!graphviz |
paul@1037 | 181 | //format=svg |
paul@1037 | 182 | //transform=notugly |
paul@1037 | 183 | digraph scheduling_decisions { |
paul@1037 | 184 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1037 | 185 | edge [tooltip="Scheduling decisions"]; |
paul@1037 | 186 | |
paul@1037 | 187 | mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; |
paul@1037 | 188 | |
paul@1037 | 189 | subgraph { |
paul@1037 | 190 | rank=same; |
paul@1037 | 191 | schedule_in_freebusy [label="Can schedule in free/busy?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 192 | freebusy [label="Free/busy",shape=folder]; |
paul@1037 | 193 | } |
paul@1037 | 194 | |
paul@1037 | 195 | subgraph { |
paul@1037 | 196 | rank=same; |
paul@1037 | 197 | access_control_list [label="Access control list permits booking?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 198 | acl [label="acl setting",shape=folder]; |
paul@1037 | 199 | } |
paul@1037 | 200 | |
paul@1037 | 201 | accept_default [label="Accept invitation by default",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 202 | end_acl [label="end",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 203 | |
paul@1037 | 204 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 205 | |
paul@1039 | 206 | subgraph { |
paul@1039 | 207 | rank=same; |
paul@1039 | 208 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 209 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 210 | } |
paul@1037 | 211 | |
paul@1037 | 212 | mail -> schedule_in_freebusy -> access_control_list -> accept_default -> end_acl -> schedule -> accept; |
paul@1037 | 213 | end_acl -> decline [style=dashed]; |
paul@1037 | 214 | schedule_in_freebusy -> decline [style=dashed]; |
paul@1037 | 215 | freebusy -> schedule_in_freebusy; |
paul@1037 | 216 | acl -> access_control_list; |
paul@1037 | 217 | } |
paul@1037 | 218 | }}} |
paul@1037 | 219 | |
paul@1037 | 220 | }}}} |
paul@1037 | 221 | |
paul@1037 | 222 | To accompany the scheduling functions, the [[../Preferences#acl|acl]] setting |
paul@1037 | 223 | in the resource's preferences must be set, or if a separate file is more |
paul@1037 | 224 | appropriate, its full path may be given as an argument to `access_control_list`: |
paul@1032 | 225 | |
paul@1032 | 226 | {{{ |
paul@1032 | 227 | schedule_in_freebusy |
paul@1032 | 228 | access_control_list /etc/imip-agent/resources.acl |
paul@1032 | 229 | }}} |
paul@1032 | 230 | |
paul@1032 | 231 | Within the file provided by the setting or separate file, a list of rules |
paul@1037 | 232 | must describe the handling procedure for an event. For example, the following |
paul@1037 | 233 | was given in the above example: |
paul@1032 | 234 | |
paul@1032 | 235 | {{{ |
paul@1032 | 236 | accept |
paul@1032 | 237 | }}} |
paul@1032 | 238 | |
paul@1032 | 239 | This will merely accept all invitations, anyway. However, it may be |
paul@1032 | 240 | appropriate to prevent certain users from using resources. For example: |
paul@1032 | 241 | |
paul@1037 | 242 | {{{{#!table |
paul@1037 | 243 | '''Scheduling Functions and Data''' || '''Decision Process''' |
paul@1037 | 244 | == |
paul@1037 | 245 | <style="vertical-align: top;"> |
paul@1037 | 246 | |
paul@1037 | 247 | {{{ |
paul@1037 | 248 | schedule_in_freebusy |
paul@1037 | 249 | access_control_list |
paul@1037 | 250 | }}} |
paul@1037 | 251 | |
paul@1037 | 252 | Access control list: |
paul@1037 | 253 | |
paul@1032 | 254 | {{{ |
paul@1032 | 255 | accept |
paul@1032 | 256 | decline attendee simon.skunk@example.com |
paul@1032 | 257 | }}} |
paul@1032 | 258 | |
paul@1037 | 259 | || |
paul@1037 | 260 | |
paul@1037 | 261 | {{{#!graphviz |
paul@1037 | 262 | //format=svg |
paul@1037 | 263 | //transform=notugly |
paul@1037 | 264 | digraph scheduling_decisions { |
paul@1037 | 265 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1037 | 266 | edge [tooltip="Scheduling decisions"]; |
paul@1037 | 267 | |
paul@1037 | 268 | mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; |
paul@1037 | 269 | |
paul@1037 | 270 | subgraph { |
paul@1037 | 271 | rank=same; |
paul@1037 | 272 | schedule_in_freebusy [label="Can schedule in free/busy?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 273 | freebusy [label="Free/busy",shape=folder]; |
paul@1037 | 274 | } |
paul@1037 | 275 | |
paul@1037 | 276 | subgraph { |
paul@1037 | 277 | rank=same; |
paul@1037 | 278 | access_control_list [label="Access control list permits booking?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 279 | acl [label="acl setting",shape=folder]; |
paul@1037 | 280 | } |
paul@1037 | 281 | |
paul@1037 | 282 | accept_default [label="Accept invitation by default",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 283 | decline_attendee [label="Is attendee simon.skunk@example.com?",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 284 | end_acl [label="end",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 285 | |
paul@1037 | 286 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 287 | |
paul@1039 | 288 | subgraph { |
paul@1039 | 289 | rank=same; |
paul@1039 | 290 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 291 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 292 | } |
paul@1037 | 293 | |
paul@1037 | 294 | mail -> schedule_in_freebusy -> access_control_list -> accept_default -> decline_attendee -> end_acl -> schedule -> accept; |
paul@1037 | 295 | end_acl -> decline [style=dashed]; |
paul@1037 | 296 | schedule_in_freebusy -> decline [style=dashed]; |
paul@1037 | 297 | freebusy -> schedule_in_freebusy; |
paul@1037 | 298 | acl -> access_control_list; |
paul@1037 | 299 | } |
paul@1037 | 300 | }}} |
paul@1037 | 301 | |
paul@1037 | 302 | }}}} |
paul@1037 | 303 | |
paul@1032 | 304 | This example indicates that by default, invitations will be accepted, but if |
paul@1032 | 305 | one of the attendees of an event is `simon.skunk@example.com`, the invitation |
paul@1032 | 306 | will be declined. However, it may be the case that this rule should be |
paul@1032 | 307 | overridden under certain circumstances. For example: |
paul@1032 | 308 | |
paul@1037 | 309 | {{{{#!table |
paul@1037 | 310 | '''Scheduling Functions and Data''' || '''Decision Process''' |
paul@1037 | 311 | == |
paul@1037 | 312 | <style="vertical-align: top;"> |
paul@1037 | 313 | |
paul@1037 | 314 | {{{ |
paul@1037 | 315 | schedule_in_freebusy |
paul@1037 | 316 | access_control_list |
paul@1037 | 317 | }}} |
paul@1037 | 318 | |
paul@1037 | 319 | Access control list: |
paul@1037 | 320 | |
paul@1032 | 321 | {{{ |
paul@1032 | 322 | accept |
paul@1032 | 323 | decline attendee simon.skunk@example.com |
paul@1032 | 324 | accept organiser paul.boddie@example.com |
paul@1032 | 325 | }}} |
paul@1032 | 326 | |
paul@1037 | 327 | || |
paul@1037 | 328 | |
paul@1037 | 329 | {{{#!graphviz |
paul@1037 | 330 | //format=svg |
paul@1037 | 331 | //transform=notugly |
paul@1037 | 332 | digraph scheduling_decisions { |
paul@1037 | 333 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1037 | 334 | edge [tooltip="Scheduling decisions"]; |
paul@1037 | 335 | |
paul@1037 | 336 | mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; |
paul@1037 | 337 | |
paul@1037 | 338 | subgraph { |
paul@1037 | 339 | rank=same; |
paul@1037 | 340 | schedule_in_freebusy [label="Can schedule in free/busy?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 341 | freebusy [label="Free/busy",shape=folder]; |
paul@1037 | 342 | } |
paul@1037 | 343 | |
paul@1037 | 344 | subgraph { |
paul@1037 | 345 | rank=same; |
paul@1037 | 346 | access_control_list [label="Access control list permits booking?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1037 | 347 | acl [label="acl setting",shape=folder]; |
paul@1037 | 348 | } |
paul@1037 | 349 | |
paul@1037 | 350 | accept_default [label="Accept invitation by default",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 351 | decline_attendee [label="Is attendee simon.skunk@example.com?",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 352 | accept_organiser [label="Is organiser paul.boddie@example.com?",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 353 | end_acl [label="end",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1037 | 354 | |
paul@1037 | 355 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 356 | |
paul@1039 | 357 | subgraph { |
paul@1039 | 358 | rank=same; |
paul@1039 | 359 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 360 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 361 | } |
paul@1037 | 362 | |
paul@1037 | 363 | mail -> schedule_in_freebusy -> access_control_list -> accept_default -> decline_attendee -> accept_organiser -> end_acl -> schedule -> accept; |
paul@1037 | 364 | end_acl -> decline [style=dashed]; |
paul@1037 | 365 | schedule_in_freebusy -> decline [style=dashed]; |
paul@1037 | 366 | freebusy -> schedule_in_freebusy; |
paul@1037 | 367 | acl -> access_control_list; |
paul@1037 | 368 | } |
paul@1037 | 369 | }}} |
paul@1037 | 370 | |
paul@1037 | 371 | }}}} |
paul@1037 | 372 | |
paul@1032 | 373 | Here, the stated organiser may still arrange a booking of the resource where |
paul@1032 | 374 | the previously-mentioned attendee is involved. |
paul@1039 | 375 | |
paul@1039 | 376 | === Quota Controls === |
paul@1039 | 377 | |
paul@1039 | 378 | In contrast to each user's stored information which consolidates information |
paul@1039 | 379 | related to that user's own schedule, the quota system consolidates information |
paul@1039 | 380 | related to the schedules of one or more resources, thus enabling observations |
paul@1039 | 381 | to be made about their collective usage. |
paul@1039 | 382 | |
paul@1039 | 383 | First, consider a resource such as a car where an organiser of an event may be |
paul@1039 | 384 | booking the car for travel purposes. A quota prevents the organiser from |
paul@1039 | 385 | booking the resource too much and denying other users access to it. |
paul@1039 | 386 | |
paul@1039 | 387 | Now consider a number of separate car resources. An organiser might attempt to |
paul@1039 | 388 | get around any individual resource quota by booking a number of different cars. |
paul@1167 | 389 | By grouping the resources together, the organiser will exhaust any quota set on |
paul@1167 | 390 | the group of resources as they try and make reservations for the different |
paul@1167 | 391 | members of the quota group. |
paul@1039 | 392 | |
paul@1039 | 393 | ==== Initialising Quotas ==== |
paul@1039 | 394 | |
paul@1165 | 395 | Within the journal storage area, a quota may be initialised with limits |
paul@1165 | 396 | indicating the amount of time that can be occupied by the cumulative total of |
paul@1165 | 397 | all events scheduled by an individual user or a group of which they are a |
paul@1165 | 398 | member. |
paul@1165 | 399 | |
paul@1165 | 400 | Such limits may be set directly using the `limits` file in a quota directory |
paul@1165 | 401 | (described in the [[../FilesystemUsage|filesystem guide]]) or in the |
paul@1165 | 402 | `quota_limits` table (described in the [[../DatabaseStore|database guide]]), |
paul@1165 | 403 | but a tool is also provided to set such limits. For example: |
paul@1039 | 404 | |
paul@1039 | 405 | {{{ |
paul@1178 | 406 | cat <<EOF | set_quota_limits.py 'mailto:resource-car-cadillac@example.com' |
paul@1178 | 407 | mailto:vincent.vole@example.com PT10H |
paul@1178 | 408 | EOF |
paul@1039 | 409 | }}} |
paul@1039 | 410 | |
paul@1178 | 411 | {{{#!wiki tip |
paul@1178 | 412 | In the above example, shell syntax is used to indicate a |
paul@1178 | 413 | [[http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04|here document]] |
paul@1178 | 414 | providing a kind of "inline" file that is terminated by the final `EOF`. |
paul@1178 | 415 | The contents of this file are piped to the tool with a single argument given |
paul@1178 | 416 | indicating the quota involved. |
paul@1178 | 417 | |
paul@1178 | 418 | You could also just invoke the tool and then enter the limit descriptions, |
paul@1178 | 419 | ending the input with Ctrl-D or equivalent end-of-file keystroke, or save |
paul@1178 | 420 | the descriptions in a file and then use input redirection with the filename. |
paul@1178 | 421 | }}} |
paul@1178 | 422 | |
paul@1178 | 423 | The above example indicates that the given user may only reserve 10 hours |
paul@1178 | 424 | of events or less time within the given quota (corresponding to a specific |
paul@1178 | 425 | resource in the above example). Attempts to schedule more time will be |
paul@1178 | 426 | declined. |
paul@1039 | 427 | |
paul@1039 | 428 | To impose a general quota, the special `*` identity can be used: |
paul@1039 | 429 | |
paul@1039 | 430 | {{{ |
paul@1178 | 431 | cat <<EOF | set_quota_limits.py 'mailto:resource-car-cadillac@example.com' |
paul@1178 | 432 | * PT10H |
paul@1178 | 433 | EOF |
paul@1039 | 434 | }}} |
paul@1039 | 435 | |
paul@1180 | 436 | Note that this general quota applies to each individual identity and not |
paul@1180 | 437 | collectively to all unspecified identities. To impose such a collective |
paul@1180 | 438 | quota, a group may be defined for this purpose as described below. |
paul@1180 | 439 | |
paul@1039 | 440 | When a user identity is not listed and no general quota is defined, that |
paul@1039 | 441 | particular user will be unable to reserve the resource unless defined as a |
paul@1039 | 442 | member of a group listed in the `limits` file, as described below. |
paul@1039 | 443 | |
paul@1190 | 444 | It may be useful to define unlimited quotas for certain identities or |
paul@1190 | 445 | groups in order to effectively exclude them from limits. For example: |
paul@1190 | 446 | |
paul@1190 | 447 | {{{ |
paul@1190 | 448 | cat <<EOF | set_quota_limits.py 'mailto:resource-car-cadillac@example.com' |
paul@1190 | 449 | mailto:vincent.vole@example.com * |
paul@1190 | 450 | EOF |
paul@1190 | 451 | }}} |
paul@1190 | 452 | |
paul@1039 | 453 | ==== Sharing Quotas Across Users ==== |
paul@1039 | 454 | |
paul@1039 | 455 | When the use of resources is to be shared between users in such a way that |
paul@1180 | 456 | groups of users will be sharing a single quota, a `groups` file in a quota |
paul@1180 | 457 | directory (or records in the `quota_groups` table) must be defined, mapping |
paul@1180 | 458 | each user identity to the group to which they will belong. |
paul@1180 | 459 | |
paul@1180 | 460 | A tool is provided to define groups and is used as follows: |
paul@1180 | 461 | |
paul@1180 | 462 | {{{ |
paul@1180 | 463 | cat <<EOF | tools/set_quota_groups.py 'mailto:resource-car-cadillac@example.com' |
paul@1180 | 464 | mailto:vincent.vole@example.com developers |
paul@1180 | 465 | * others |
paul@1180 | 466 | EOF |
paul@1180 | 467 | }}} |
paul@1180 | 468 | |
paul@1180 | 469 | Here, otherwise unrecognised organisers are mapped to the `others` group. |
paul@1180 | 470 | Thus, all scheduling performed by such organisers will be done in a common |
paul@1180 | 471 | journal with this label. |
paul@1180 | 472 | |
paul@1180 | 473 | The process of determining where an organiser's usage of resources is |
paul@1180 | 474 | recorded is illustrated by the following example: |
paul@1039 | 475 | |
paul@1167 | 476 | {{{{#!table |
paul@1167 | 477 | '''Scheduling Data''' || '''Decision Process''' |
paul@1167 | 478 | == |
paul@1167 | 479 | <style="vertical-align: top;"> |
paul@1167 | 480 | The groups are defined as follows in the `groups` file: |
paul@1167 | 481 | |
paul@1039 | 482 | {{{ |
paul@1039 | 483 | mailto:vincent.vole@example.com developers |
paul@1039 | 484 | mailto:harvey.horse@example.com developers |
paul@1039 | 485 | mailto:paul.boddie@example.com developers |
paul@1039 | 486 | mailto:simon.skunk@example.com testers |
paul@1039 | 487 | }}} |
paul@1039 | 488 | |
paul@1039 | 489 | The group identity can then be employed in the `limits` file: |
paul@1039 | 490 | |
paul@1039 | 491 | {{{ |
paul@1039 | 492 | developers PT10H |
paul@1039 | 493 | testers PT20H |
paul@1039 | 494 | }}} |
paul@1039 | 495 | |
paul@1167 | 496 | || |
paul@1167 | 497 | |
paul@1167 | 498 | {{{#!graphviz |
paul@1167 | 499 | //format=svg |
paul@1167 | 500 | //transform=notugly |
paul@1167 | 501 | digraph quota_users { |
paul@1167 | 502 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Quota users"]; |
paul@1167 | 503 | edge [tooltip="Quota users"]; |
paul@1167 | 504 | |
paul@1167 | 505 | subgraph { |
paul@1167 | 506 | rank=same; |
paul@1167 | 507 | user1 [label="User is vincent.vole@example.com"]; |
paul@1167 | 508 | user2 [label="User is oliver.otter@example.com"]; |
paul@1167 | 509 | } |
paul@1167 | 510 | |
paul@1167 | 511 | havegroup [label="Have group for quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 512 | haveuser [label="Have group for user in quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 513 | |
paul@1167 | 514 | group1 [label="User is vincent.vole@example.com\nGroup is developers"]; |
paul@1167 | 515 | group2 [label="User is oliver.otter@example.com"]; |
paul@1167 | 516 | |
paul@1167 | 517 | checkuser1 [label="Have limit for group?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 518 | checkgeneral1 [label="Have general limit?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 519 | |
paul@1167 | 520 | checkuser2 [label="Have limit for user?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 521 | checkgeneral2 [label="Have general limit?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1167 | 522 | |
paul@1167 | 523 | accept [label="Quota",shape=folder,style=filled,fillcolor=cyan]; |
paul@1167 | 524 | decline [label="No quota",shape=folder,style=filled,fillcolor=cyan]; |
paul@1167 | 525 | |
paul@1167 | 526 | user1 -> havegroup -> haveuser -> group1 -> checkuser1 -> checkgeneral1 -> accept; |
paul@1167 | 527 | user2 -> havegroup -> haveuser -> group2 -> checkuser2 -> checkgeneral2 -> decline [style=dashed]; |
paul@1167 | 528 | } |
paul@1167 | 529 | }}} |
paul@1167 | 530 | }}}} |
paul@1167 | 531 | |
paul@1167 | 532 | Where individuals are not assigned to groups, any individual limit will apply |
paul@1167 | 533 | to them; otherwise, the general quota applies. Where individuals are assigned |
paul@1167 | 534 | to groups, any group limit will apply; otherwise, the general quota applies. |
paul@1039 | 535 | |
paul@1039 | 536 | ==== Individual Resource Quotas ==== |
paul@1039 | 537 | |
paul@1039 | 538 | The trivial case of applying quotas is to give a resource its own quota. This |
paul@1039 | 539 | is achieved by not specifying any arguments to the `check_quota` scheduling |
paul@1058 | 540 | function or to the `add_to_quota` and `remove_from_quota` functions. |
paul@1058 | 541 | |
paul@1058 | 542 | {{{{#!table |
paul@1058 | 543 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1058 | 544 | == |
paul@1058 | 545 | <style="vertical-align: top;"> |
paul@1058 | 546 | |
paul@1058 | 547 | {{{ |
paul@1058 | 548 | check_quota |
paul@1058 | 549 | }}} |
paul@1058 | 550 | |
paul@1058 | 551 | || |
paul@1058 | 552 | |
paul@1058 | 553 | {{{#!graphviz |
paul@1058 | 554 | //format=svg |
paul@1058 | 555 | //transform=notugly |
paul@1058 | 556 | digraph scheduling_decisions { |
paul@1058 | 557 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1058 | 558 | edge [tooltip="Scheduling decisions"]; |
paul@1058 | 559 | |
paul@1058 | 560 | subgraph { |
paul@1058 | 561 | rank=same; |
paul@1058 | 562 | mail [label="Incoming mail\nfrom vincent.vole@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1058 | 563 | cancel [label="Incoming cancellation",shape=folder,style=filled,fillcolor=cyan]; |
paul@1058 | 564 | } |
paul@1058 | 565 | |
paul@1058 | 566 | subgraph { |
paul@1058 | 567 | rank=same; |
paul@1058 | 568 | check_quota [label="Is allowed by quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1058 | 569 | quota [label="Quota for resource",shape=folder]; |
paul@1058 | 570 | quota_for_vole [label="...applying to\nvincent.vole@example.com",shape=folder]; |
paul@1058 | 571 | } |
paul@1058 | 572 | |
paul@1058 | 573 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1058 | 574 | |
paul@1058 | 575 | subgraph { |
paul@1058 | 576 | rank=same; |
paul@1058 | 577 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1058 | 578 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1058 | 579 | } |
paul@1058 | 580 | |
paul@1058 | 581 | add_to_quota [label="Add to quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1058 | 582 | remove_from_quota [label="Remove from quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1058 | 583 | |
paul@1058 | 584 | mail -> check_quota -> schedule -> accept; |
paul@1058 | 585 | check_quota -> decline [style=dashed]; |
paul@1058 | 586 | schedule -> add_to_quota -> quota; |
paul@1058 | 587 | quota -> quota_for_vole -> check_quota; |
paul@1058 | 588 | |
paul@1058 | 589 | cancel -> remove_from_quota -> quota; |
paul@1058 | 590 | } |
paul@1058 | 591 | }}} |
paul@1058 | 592 | |
paul@1058 | 593 | }}}} |
paul@1039 | 594 | |
paul@1039 | 595 | ==== Common Resource Quotas ==== |
paul@1039 | 596 | |
paul@1039 | 597 | By indicating an argument to the different functions, a common quota can be |
paul@1039 | 598 | employed. In the following example, both resources would employ the given |
paul@1039 | 599 | function invocations to pool their knowledge about their schedules. |
paul@1039 | 600 | |
paul@1039 | 601 | {{{{#!table |
paul@1058 | 602 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1039 | 603 | == |
paul@1039 | 604 | <style="vertical-align: top;"> |
paul@1039 | 605 | |
paul@1039 | 606 | {{{ |
paul@1039 | 607 | check_quota cars |
paul@1039 | 608 | }}} |
paul@1039 | 609 | |
paul@1039 | 610 | || |
paul@1039 | 611 | |
paul@1039 | 612 | {{{#!graphviz |
paul@1039 | 613 | //format=svg |
paul@1039 | 614 | //transform=notugly |
paul@1039 | 615 | digraph scheduling_decisions { |
paul@1039 | 616 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1039 | 617 | edge [tooltip="Scheduling decisions"]; |
paul@1039 | 618 | |
paul@1039 | 619 | subgraph { |
paul@1039 | 620 | rank=same; |
paul@1039 | 621 | mail_cadillac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-cadillac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 622 | mail_pontiac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-pontiac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 623 | cancel [label="Incoming cancellation",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 624 | } |
paul@1039 | 625 | |
paul@1039 | 626 | subgraph { |
paul@1039 | 627 | rank=same; |
paul@1039 | 628 | check_quota [label="Is allowed by quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 629 | quota_cars [label="Quota for cars",shape=folder]; |
paul@1039 | 630 | quota_cars_vole [label="...applying to\nvincent.vole@example.com",shape=folder]; |
paul@1039 | 631 | } |
paul@1039 | 632 | |
paul@1039 | 633 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 634 | |
paul@1039 | 635 | subgraph { |
paul@1039 | 636 | rank=same; |
paul@1039 | 637 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 638 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 639 | } |
paul@1039 | 640 | |
paul@1039 | 641 | add_to_quota [label="Add to quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1039 | 642 | remove_from_quota [label="Remove from quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1039 | 643 | |
paul@1039 | 644 | mail_cadillac -> check_quota; |
paul@1039 | 645 | mail_pontiac -> check_quota -> schedule -> accept; |
paul@1039 | 646 | check_quota -> decline [style=dashed]; |
paul@1039 | 647 | schedule -> add_to_quota -> quota_cars; |
paul@1039 | 648 | quota_cars -> quota_cars_vole -> check_quota; |
paul@1039 | 649 | |
paul@1039 | 650 | cancel -> remove_from_quota -> quota_cars; |
paul@1039 | 651 | } |
paul@1039 | 652 | }}} |
paul@1039 | 653 | |
paul@1039 | 654 | }}}} |
paul@1039 | 655 | |
paul@1039 | 656 | ==== Collective Scheduling ==== |
paul@1039 | 657 | |
paul@1039 | 658 | Consider two separate resources: both may be reserved at the same time by the |
paul@1039 | 659 | same organiser; neither resource would normally decline the reservation on the |
paul@1039 | 660 | basis of schedule availability, should the period concerned be free. However, |
paul@1039 | 661 | it may be undesirable for one organiser to occupy both resources at the same |
paul@1039 | 662 | time. |
paul@1039 | 663 | |
paul@1039 | 664 | Consequently, a mechanism is required to pool the resource schedules in such a |
paul@1039 | 665 | way that any reservation performed for one resource at a given point in time |
paul@1039 | 666 | prohibits another reservation performed for a related resource at the same |
paul@1039 | 667 | point in time by the same user. |
paul@1039 | 668 | |
paul@1039 | 669 | The free/busy records held for a given quota group permit such collective |
paul@1039 | 670 | scheduling decisions and are employed as follows: |
paul@1039 | 671 | |
paul@1039 | 672 | {{{{#!table |
paul@1058 | 673 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1039 | 674 | == |
paul@1039 | 675 | <style="vertical-align: top;"> |
paul@1039 | 676 | |
paul@1039 | 677 | {{{ |
paul@1164 | 678 | schedule_across_quota cars |
paul@1039 | 679 | }}} |
paul@1039 | 680 | |
paul@1039 | 681 | || |
paul@1039 | 682 | |
paul@1039 | 683 | {{{#!graphviz |
paul@1039 | 684 | //format=svg |
paul@1039 | 685 | //transform=notugly |
paul@1039 | 686 | digraph scheduling_decisions { |
paul@1039 | 687 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1039 | 688 | edge [tooltip="Scheduling decisions"]; |
paul@1039 | 689 | |
paul@1039 | 690 | subgraph { |
paul@1039 | 691 | rank=same; |
paul@1039 | 692 | mail_cadillac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-cadillac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 693 | mail_pontiac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-pontiac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 694 | cancel [label="Incoming cancellation",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 695 | } |
paul@1039 | 696 | |
paul@1039 | 697 | subgraph { |
paul@1039 | 698 | rank=same; |
paul@1039 | 699 | schedule_across_quota [label="Can be scheduled within the quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 700 | quota_cars [label="Quota for cars",shape=folder]; |
paul@1039 | 701 | freebusy_cars_vole [label="...recording schedule for\nvincent.vole@example.com",shape=folder]; |
paul@1039 | 702 | } |
paul@1039 | 703 | |
paul@1039 | 704 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1039 | 705 | |
paul@1039 | 706 | subgraph { |
paul@1039 | 707 | rank=same; |
paul@1039 | 708 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 709 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1039 | 710 | } |
paul@1039 | 711 | |
paul@1039 | 712 | add_to_quota_freebusy [label="Add to quota free/busy",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1039 | 713 | remove_from_quota_freebusy [label="Remove from quota free/busy",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1039 | 714 | |
paul@1039 | 715 | mail_cadillac -> schedule_across_quota; |
paul@1039 | 716 | mail_pontiac -> schedule_across_quota -> schedule -> accept; |
paul@1039 | 717 | schedule_across_quota -> decline [style=dashed]; |
paul@1039 | 718 | schedule -> add_to_quota_freebusy -> quota_cars -> freebusy_cars_vole; |
paul@1039 | 719 | freebusy_cars_vole -> schedule_across_quota; |
paul@1039 | 720 | |
paul@1190 | 721 | cancel -> remove_from_quota_freebusy -> quota_cars; |
paul@1039 | 722 | } |
paul@1039 | 723 | }}} |
paul@1039 | 724 | |
paul@1039 | 725 | }}}} |
paul@1180 | 726 | |
paul@1180 | 727 | ==== Delegating Attendance ==== |
paul@1180 | 728 | |
paul@1180 | 729 | A number of resources may be regarded as interchangeable and can therefore |
paul@1180 | 730 | stand in for each other when they are unavailable. The iCalendar specification |
paul@1180 | 731 | supports the notion of delegation: the recipient of an event invitation may |
paul@1180 | 732 | delegate their attendance to other calendar user, informing that user and the |
paul@1180 | 733 | event organiser of this decision. |
paul@1180 | 734 | |
paul@1180 | 735 | To define such delegation relationships, a quota is first selected as the |
paul@1180 | 736 | repository of common scheduling information for a group of resources. Then, |
paul@1180 | 737 | the members of the group are defined as delegates. This can be done using a |
paul@1180 | 738 | tool provided for this purpose. For example: |
paul@1180 | 739 | |
paul@1180 | 740 | {{{ |
paul@1180 | 741 | cat <<EOF | tools/set_delegates.py 'cars' |
paul@1180 | 742 | mailto:resource-car-cadillac@example.com |
paul@1180 | 743 | mailto:resource-car-pontiac@example.com |
paul@1180 | 744 | EOF |
paul@1180 | 745 | }}} |
paul@1180 | 746 | |
paul@1180 | 747 | Here, two resources are defined that will delegate to each other if they |
paul@1180 | 748 | cannot attend an event according to their own schedule. |
paul@1180 | 749 | |
paul@1180 | 750 | {{{{#!table |
paul@1180 | 751 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1180 | 752 | == |
paul@1180 | 753 | <style="vertical-align: top;"> |
paul@1180 | 754 | |
paul@1180 | 755 | {{{ |
paul@1180 | 756 | schedule_for_delegate cars |
paul@1180 | 757 | }}} |
paul@1180 | 758 | |
paul@1180 | 759 | || |
paul@1180 | 760 | |
paul@1180 | 761 | {{{#!graphviz |
paul@1180 | 762 | //format=svg |
paul@1180 | 763 | //transform=notugly |
paul@1180 | 764 | digraph scheduling_decisions { |
paul@1180 | 765 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1180 | 766 | edge [tooltip="Scheduling decisions"]; |
paul@1180 | 767 | |
paul@1180 | 768 | subgraph { |
paul@1180 | 769 | rank=same; |
paul@1180 | 770 | mail_cadillac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-cadillac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1180 | 771 | mail_pontiac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-pontiac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1180 | 772 | cancel [label="Incoming cancellation",shape=folder,style=filled,fillcolor=cyan]; |
paul@1180 | 773 | } |
paul@1180 | 774 | |
paul@1180 | 775 | subgraph { |
paul@1180 | 776 | rank=same; |
paul@1180 | 777 | schedule_for_delegate [label="Can be scheduled or delegated?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1180 | 778 | quota_cars [label="Quota for cars",shape=folder]; |
paul@1180 | 779 | freebusy_cars_vole [label="...recording schedule for\nvincent.vole@example.com",shape=folder]; |
paul@1180 | 780 | } |
paul@1180 | 781 | |
paul@1180 | 782 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1180 | 783 | |
paul@1180 | 784 | subgraph { |
paul@1180 | 785 | rank=same; |
paul@1180 | 786 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1180 | 787 | delegate [label="Delegate",shape=folder,style=filled,fillcolor=cyan]; |
paul@1180 | 788 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1180 | 789 | } |
paul@1180 | 790 | |
paul@1180 | 791 | add_to_quota [label="Add to quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1180 | 792 | remove_from_quota [label="Remove from quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1180 | 793 | |
paul@1180 | 794 | mail_cadillac -> schedule_for_delegate; |
paul@1180 | 795 | mail_pontiac -> schedule_for_delegate -> schedule -> accept; |
paul@1180 | 796 | schedule_for_delegate -> delegate [style=dashed]; |
paul@1180 | 797 | schedule_for_delegate -> decline [style=dashed]; |
paul@1180 | 798 | schedule -> add_to_quota -> quota_cars -> freebusy_cars_vole; |
paul@1180 | 799 | freebusy_cars_vole -> schedule_for_delegate; |
paul@1180 | 800 | |
paul@1190 | 801 | cancel -> remove_from_quota -> quota_cars; |
paul@1180 | 802 | } |
paul@1180 | 803 | }}} |
paul@1180 | 804 | |
paul@1180 | 805 | }}}} |
paul@1180 | 806 | |
paul@1180 | 807 | Note that it is generally more useful to have delegation decisions made on the |
paul@1180 | 808 | basis of many resources, which is what the journal entries for each quota |
paul@1190 | 809 | provides, but also considering organisers attempting to reserve those resources |
paul@1190 | 810 | as a single group whose reservations are consolidated and assessed collectively. |
paul@1190 | 811 | Thus, a single group of users would be defined: |
paul@1190 | 812 | |
paul@1190 | 813 | {{{ |
paul@1190 | 814 | cat <<EOF | tools/set_quota_groups.py 'cars' |
paul@1190 | 815 | * all |
paul@1190 | 816 | EOF |
paul@1190 | 817 | }}} |
paul@1190 | 818 | |
paul@1180 | 819 | Although the journal for each quota may be divided up to administer quotas for |
paul@1180 | 820 | multiple groups of organisers, for the purposes of delegation - deciding |
paul@1180 | 821 | whether a resource is generally available, and deciding which other resource |
paul@1180 | 822 | would be available instead - a single group of all organisers is more desirable. |
paul@1190 | 823 | |
paul@1190 | 824 | If limits need to be imposed alongside delegation, separate quotas may be used |
paul@1190 | 825 | to achieve this. |
paul@1190 | 826 | |
paul@1190 | 827 | {{{{#!table |
paul@1190 | 828 | '''Scheduling Functions''' || '''Decision Process''' |
paul@1190 | 829 | == |
paul@1190 | 830 | <style="vertical-align: top;"> |
paul@1190 | 831 | |
paul@1190 | 832 | {{{ |
paul@1190 | 833 | check_quota cars |
paul@1190 | 834 | schedule_for_delegate car_delegation |
paul@1190 | 835 | }}} |
paul@1190 | 836 | |
paul@1190 | 837 | || |
paul@1190 | 838 | |
paul@1190 | 839 | {{{#!graphviz |
paul@1190 | 840 | //format=svg |
paul@1190 | 841 | //transform=notugly |
paul@1190 | 842 | digraph scheduling_decisions { |
paul@1190 | 843 | node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Scheduling decisions"]; |
paul@1190 | 844 | edge [tooltip="Scheduling decisions"]; |
paul@1190 | 845 | |
paul@1190 | 846 | subgraph { |
paul@1190 | 847 | rank=same; |
paul@1190 | 848 | mail_cadillac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-cadillac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1190 | 849 | mail_pontiac [label="Incoming mail\nfrom vincent.vole@example.com\nto resource-car-pontiac@example.com",shape=folder,style=filled,fillcolor=cyan]; |
paul@1190 | 850 | cancel [label="Incoming cancellation",shape=folder,style=filled,fillcolor=cyan]; |
paul@1190 | 851 | } |
paul@1190 | 852 | |
paul@1190 | 853 | subgraph { |
paul@1190 | 854 | rank=same; |
paul@1190 | 855 | check_quota [label="Is allowed by quota?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1190 | 856 | quota_cars [label="Quota for cars",shape=folder]; |
paul@1190 | 857 | quota_cars_vole [label="...applying to\nvincent.vole@example.com",shape=folder]; |
paul@1190 | 858 | } |
paul@1190 | 859 | |
paul@1190 | 860 | subgraph { |
paul@1190 | 861 | rank=same; |
paul@1190 | 862 | schedule_for_delegate [label="Can be scheduled or delegated?",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1190 | 863 | quota_cars_delegation [label="Quota for cars_delegation",shape=folder]; |
paul@1190 | 864 | freebusy_cars_delegation_vole [label="...recording schedule for\nvincent.vole@example.com",shape=folder]; |
paul@1190 | 865 | } |
paul@1190 | 866 | |
paul@1190 | 867 | schedule [label="Schedule event for resource",shape=ellipse,style=filled,fillcolor=gold]; |
paul@1190 | 868 | |
paul@1190 | 869 | subgraph { |
paul@1190 | 870 | rank=same; |
paul@1190 | 871 | accept [label="Accept",shape=folder,style=filled,fillcolor=cyan]; |
paul@1190 | 872 | delegate [label="Delegate",shape=folder,style=filled,fillcolor=cyan]; |
paul@1190 | 873 | decline [label="Decline",shape=folder,style=filled,fillcolor=cyan]; |
paul@1190 | 874 | } |
paul@1190 | 875 | |
paul@1190 | 876 | add_to_quota [label="Add to quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1190 | 877 | remove_from_quota [label="Remove from quota",shape=ellipse,style=filled,fillcolor=darkorange]; |
paul@1190 | 878 | |
paul@1190 | 879 | mail_cadillac -> check_quota; |
paul@1190 | 880 | mail_pontiac -> check_quota; |
paul@1190 | 881 | check_quota -> schedule_for_delegate; |
paul@1190 | 882 | check_quota -> decline [style=dashed]; |
paul@1190 | 883 | schedule_for_delegate -> schedule -> accept; |
paul@1190 | 884 | schedule_for_delegate -> delegate [style=dashed]; |
paul@1190 | 885 | schedule_for_delegate -> decline [style=dashed]; |
paul@1190 | 886 | schedule -> add_to_quota; |
paul@1190 | 887 | add_to_quota -> quota_cars -> quota_cars_vole; |
paul@1190 | 888 | add_to_quota -> quota_cars_delegation -> freebusy_cars_delegation_vole; |
paul@1190 | 889 | quota_cars_vole -> check_quota; |
paul@1190 | 890 | freebusy_cars_delegation_vole -> schedule_for_delegate; |
paul@1190 | 891 | |
paul@1190 | 892 | cancel -> remove_from_quota; |
paul@1190 | 893 | remove_from_quota -> quota_cars; |
paul@1190 | 894 | remove_from_quota -> quota_cars_delegation; |
paul@1190 | 895 | } |
paul@1190 | 896 | }}} |
paul@1190 | 897 | |
paul@1190 | 898 | }}}} |