When I try this with the most recent calendar server code it works. Auto-schedule flags get stored in the augments.xml file. Your error makes it appear that your XML-based augments service is disabled, and therefore it is trying to write to the LDAP service. I don't know if that's because the code you're running is older, but I guess you'll just have to edit the augments.xml by hand to change auto-schedule flags. On Sep 11, 2012, at 6:05 AM, tobiasbp <tobiasbp@gmail.com> wrote:
Can you provide an example of how you are trying to use calendarserver_manage_principals to change the auto-schedule setting for a location/resource?
List locations:
root@wheezy32:~# su caldavd -p -c "calendarserver_manage_principals --list-principals location" Full name Record name UUID --------- ----------- ---- Møde: Biblioteket loc_biblioteket 49c633e4-87b0-1031-800b-738d39f6458d Møde: Hjørnet loc_hjornet 68846530-87b0-1031-800d-738d39f6458d Møde: Kantinen loc_kantinen 82b24c74-87b0-1031-800e-738d39f6458d Møde: Kantinen arbejdsborde loc_kantinen_arbejdsborde a39ee172-87b0-1031-800f-738d39f6458d Møde: Ved Illum loc_ved_illum d096c190-87b0-1031-8010-738d39f6458d Møde: Ved kirken loc_ved_kirken ec66ef9e-87b0-1031-8011-738d39f6458d
See the current setting of auto schedule for a location.
By name: OK
root@wheezy32:~# su caldavd -p -c "calendarserver_manage_principals --get-auto-schedule locations:loc_hjornet" Autoschedule for "Møde: Hjørnet" (locations:loc_hjornet) is true
By UUID: OK
root@wheezy32:~# su caldavd -p -c "calendarserver_manage_principals --get-auto-schedule 68846530-87b0-1031-800d-738d39f6458d" Autoschedule for "Møde: Hjørnet" (locations:loc_hjornet) is true
Attempt to change auto-schedule to false:
root@wheezy32:~# su caldavd -p -c "calendarserver_manage_principals --set-auto-schedule=false 68846530-87b0-1031-800d-738d39f6458d" Setting auto-schedule to false for "Møde: Hjørnet" (locations:loc_hjornet) Unhandled error in Deferred: Unhandled error in Deferred: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1187, in unwindGenerator return _inlineCallbacks(None, gen, Deferred()) File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks result = g.send(result) File "/usr/lib/python2.7/dist-packages/calendarserver/tools/principals.py", line 695, in action_setAutoSchedule **principal.record.extras File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1187, in unwindGenerator return _inlineCallbacks(None, gen, Deferred()) --- <exception caught here> --- File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks result = g.send(result) File "/usr/lib/python2.7/dist-packages/calendarserver/tools/principals.py", line 810, in updateRecord record = directory.updateRecord(recordType, **kwargs) File "/usr/lib/python2.7/dist-packages/twistedcaldav/directory/aggregate.py", line 251, in updateRecord password=password, **kwargs) File "/usr/lib/python2.7/dist-packages/twistedcaldav/directory/directory.py", line 406, in updateRecord raise NotImplementedError("Subclass must implement updateRecord") exceptions.NotImplementedError: Subclass must implement updateRecord Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1187, in unwindGenerator return _inlineCallbacks(None, gen, Deferred()) File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks result = g.send(result) File "/usr/lib/python2.7/dist-packages/calendarserver/tools/principals.py", line 695, in action_setAutoSchedule **principal.record.extras File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1187, in unwindGenerator return _inlineCallbacks(None, gen, Deferred()) --- <exception caught here> --- File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks result = g.send(result) File "/usr/lib/python2.7/dist-packages/calendarserver/tools/principals.py", line 810, in updateRecord record = directory.updateRecord(recordType, **kwargs) File "/usr/lib/python2.7/dist-packages/twistedcaldav/directory/aggregate.py", line 251, in updateRecord password=password, **kwargs) File "/usr/lib/python2.7/dist-packages/twistedcaldav/directory/directory.py", line 406, in updateRecord raise NotImplementedError("Subclass must implement updateRecord") exceptions.NotImplementedError: Subclass must implement updateRecord Main loop terminated.