paul@955 | 1 | = Testing = |
paul@955 | 2 | |
paul@955 | 3 | To see how the software operates, you can run one of the agent programs |
paul@955 | 4 | provided in the distribution. For example: |
paul@955 | 5 | |
paul@955 | 6 | {{{ |
paul@955 | 7 | ./imip_resource.py -S xxx/store -P xxx/static -p xxx/prefs -d \ |
paul@955 | 8 | < tests/templates/event-request.txt |
paul@955 | 9 | }}} |
paul@955 | 10 | |
paul@955 | 11 | This uses one of the test files, sending it to the agent program for |
paul@955 | 12 | resource entities, producing output resembling the following: |
paul@955 | 13 | |
paul@955 | 14 | {{{ |
paul@955 | 15 | Outgoing parts for paul.boddie@example.com... |
paul@955 | 16 | From nobody Wed Oct 28 00:24:41 2015 |
paul@955 | 17 | MIME-Version: 1.0 |
paul@955 | 18 | Content-Transfer-Encoding: base64 |
paul@955 | 19 | Content-Type: text/calendar; charset="utf-8"; method="REPLY" |
paul@955 | 20 | From: calendar@example.com |
paul@955 | 21 | To: paul.boddie@example.com |
paul@955 | 22 | Subject: Calendar system message |
paul@955 | 23 | |
paul@955 | 24 | QkVHSU46VkNBTEVOREFSDQpNRVRIT0Q6UkVQTFkNClZFUlNJT046Mi4wDQpCRUdJTjpWRlJFRUJV |
paul@955 | 25 | U1kNCk9SR0FOSVpFUjptYWlsdG86cGF1bC5ib2RkaWVAZXhhbXBsZS5jb20NCkFUVEVOREVFO1NF |
paul@955 | 26 | TlQtQlk9Im1haWx0bzpjYWxlbmRhckBleGFtcGxlLmNvbSI6bWFpbHRvOnJlc291cmNlLXJvb20t |
paul@955 | 27 | Y29uZnJvb20NCiBAZXhhbXBsZS5jb20NClVJRDpmYjFAZXhhbXBsZS5jb20NCkVORDpWRlJFRUJV |
paul@955 | 28 | U1kNCkVORDpWQ0FMRU5EQVINCg== |
paul@955 | 29 | }}} |
paul@955 | 30 | |
paul@955 | 31 | The rather opaque encoding can be inspected using the `tools/showmail.py` |
paul@955 | 32 | program, and thus the result of the script can be seen by piping the output |
paul@955 | 33 | through that program as follows: |
paul@955 | 34 | |
paul@955 | 35 | {{{ |
paul@955 | 36 | ./imip_resource.py -S xxx/store/ -P xxx/static/ -p xxx/prefs/ -d \ |
paul@955 | 37 | < tests/templates/event-request.txt \ |
paul@955 | 38 | | tools/showmail.py |
paul@955 | 39 | }}} |
paul@955 | 40 | |
paul@955 | 41 | The result should resemble the following: |
paul@955 | 42 | |
paul@955 | 43 | {{{ |
paul@955 | 44 | Outgoing parts for paul.boddie@example.com... |
paul@955 | 45 | MIME-Version: 1.0 |
paul@955 | 46 | Content-Type: text/calendar; charset="utf-8"; method="REPLY" |
paul@955 | 47 | From: calendar@example.com |
paul@955 | 48 | To: paul.boddie@example.com |
paul@955 | 49 | Subject: Calendar system message |
paul@955 | 50 | |
paul@955 | 51 | BEGIN:VCALENDAR |
paul@955 | 52 | METHOD:REPLY |
paul@955 | 53 | VERSION:2.0 |
paul@955 | 54 | BEGIN:VEVENT |
paul@955 | 55 | DTSTAMP:20151027T232738Z |
paul@955 | 56 | UID:event1@example.com |
paul@955 | 57 | ATTENDEE;PARTSTAT=ACCEPTED;SENT-BY="mailto:calendar@example.com":mailto:reso |
paul@955 | 58 | urce-room-confroom@example.com |
paul@955 | 59 | SUMMARY:Meeting at 4pm |
paul@955 | 60 | ORGANIZER:mailto:paul.boddie@example.com |
paul@955 | 61 | DTSTART;TZID=Europe/Oslo:20141126T160000 |
paul@955 | 62 | DTEND;TZID=Europe/Oslo:20141126T170000 |
paul@955 | 63 | END:VEVENT |
paul@955 | 64 | END:VCALENDAR |
paul@955 | 65 | }}} |
paul@955 | 66 | |
paul@955 | 67 | What has happened here is the presentation of a request to the resource |
paul@955 | 68 | program in the form of an e-mail message containing an iCalendar event |
paul@955 | 69 | employing a scheduling method. The program interprets the request, |
paul@955 | 70 | consults its own records, makes a decision about scheduling the event, |
paul@955 | 71 | and indicates the kind of response it would like to send back to the |
paul@955 | 72 | requester. |