Esempio n. 1
0
 def cups_quota_user_reset(self, object):
     ud.debug(ud.ADMIN, ud.INFO,
              "cups_quota_user_reset: %s" % str(object.options))
     pykota._pykota_set_quota(notifier.Callback(
         self._cups_quota_user_reset_return, object),
                              printers=[object.options['printer']],
                              userlist=object.options['user'],
                              reset=True)
Esempio n. 2
0
 def cups_quota_user_reset(self, object):
     ud.debug(ud.ADMIN, ud.INFO, "cups_quota_user_reset: %s" % str(object.options))
     pykota._pykota_set_quota(
         notifier.Callback(self._cups_quota_user_reset_return, object),
         printers=[object.options["printer"]],
         userlist=object.options["user"],
         reset=True,
     )
Esempio n. 3
0
 def cups_quota_user_set(self, object):
     ud.debug(ud.ADMIN, ud.INFO, "cups_quota_user_set: %s" % str(object.options))
     if "," in object.options["user"]:
         userlist = object.options["user"].split(",")
     else:
         userlist = [object.options["user"]]
     ud.debug(ud.ADMIN, ud.INFO, "cups_quota_user_set: userlist=%s" % str(userlist))
     pykota._pykota_set_quota(
         notifier.Callback(self._cups_quota_user_set_return, object),
         printers=[object.options["printer"]],
         userlist=userlist,
         softlimit=object.options["softlimit"],
         hardlimit=object.options["hardlimit"],
         add=True,
     )
Esempio n. 4
0
 def cups_quota_user_set(self, object):
     ud.debug(ud.ADMIN, ud.INFO,
              "cups_quota_user_set: %s" % str(object.options))
     if ',' in object.options['user']:
         userlist = object.options['user'].split(',')
     else:
         userlist = [object.options['user']]
     ud.debug(ud.ADMIN, ud.INFO,
              "cups_quota_user_set: userlist=%s" % str(userlist))
     pykota._pykota_set_quota(notifier.Callback(
         self._cups_quota_user_set_return, object),
                              printers=[object.options['printer']],
                              userlist=userlist,
                              softlimit=object.options['softlimit'],
                              hardlimit=object.options['hardlimit'],
                              add=True)