backend, bridge, frontends: actionNew has now a security_limit argument + added some docstring to explain data argument
This commit is contained in:
parent
2c8b91ee6c
commit
fbbb081425
2 changed files with 30 additions and 14 deletions
|
|
@ -211,6 +211,11 @@ class Const(object):
|
|||
LOG_LEVELS = (LOG_LVL_DEBUG, LOG_LVL_INFO, LOG_LVL_WARNING, LOG_LVL_ERROR, LOG_LVL_CRITICAL)
|
||||
|
||||
|
||||
## action constants ##
|
||||
META_TYPE_FILE = "file"
|
||||
META_TYPE_OVERWRITE = "overwrite"
|
||||
|
||||
|
||||
## HARD-CODED ACTIONS IDS (generated with uuid.uuid4) ##
|
||||
AUTHENTICATE_PROFILE_ID = u'b03bbfa8-a4ae-4734-a248-06ce6c7cf562'
|
||||
CHANGE_XMPP_PASSWD_ID = u'878b9387-de2b-413b-950f-e424a147bcd0'
|
||||
|
|
|
|||
|
|
@ -785,14 +785,15 @@ class SAT(service.Service):
|
|||
del client._waiting_conf[conf_id]
|
||||
cb(conf_id, accepted, data, profile)
|
||||
|
||||
def actionNew(self, action_data, profile):
|
||||
def actionNew(self, action_data, security_limit=C.NO_SECURITY_LIMIT, profile=C.PROF_KEY_NONE):
|
||||
"""Shortcut to bridge.actionNew which generate and id
|
||||
|
||||
@param action_data(dict): action data (see bridge documentation)
|
||||
@param security_limit: %(doc_security_limit)s
|
||||
@param profile: %(doc_profile)s
|
||||
"""
|
||||
id_ = unicode(uuid.uuid4())
|
||||
self.bridge.actionNew(action_data, id_, profile)
|
||||
self.bridge.actionNew(action_data, id_, security_limit, profile)
|
||||
|
||||
def registerProgressCb(self, progress_id, callback, profile):
|
||||
"""Register a callback called when progress is requested for id"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue