[Pkg-debile-commits] [debile-master] 13/26: Added some documentation for new XML-RPC commands
Sylvestre Ledru
sylvestre at alioth.debian.org
Tue Aug 20 16:22:37 UTC 2013
This is an automated email from the git hooks/post-receive script.
sylvestre pushed a commit to branch master
in repository debile-master.
commit dbcdd1f58f7bae39b1d078daf0b1a45ad74698be
Author: Léo Cavaillé <leo at cavaille.net>
Date: Sat Aug 10 17:09:47 2013 +0200
Added some documentation for new XML-RPC commands
---
lucy/server.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/lucy/server.py b/lucy/server.py
index ea55cef..cc08aae 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -88,6 +88,10 @@ def admin_method(fn):
class LucyInterface(object):
@user_method
def get_server_info(self):
+ """
+ This method is just for clients wishing to call something to see if
+ their connection really succeeded.
+ """
if get_user().admin:
admin = "(admin)"
else:
@@ -97,6 +101,10 @@ class LucyInterface(object):
@admin_method
def create_user(self, login, password, name, email, ascii_armored_key):
+ """
+ Only for administrators.
+ This method adds a new user in the DB and imports the GPG key in the keyring.
+ """
session = Session()
# Validate first by creating an entity that login/name/email are valid
try:
@@ -128,6 +136,9 @@ class LucyInterface(object):
@user_method
def list_user(self):
+ """
+ Return a list of python dictionnaries with the users.
+ """
session = Session()
users = [ u.serialize() for u in session.query(User).all()]
for u in users:
@@ -136,6 +147,10 @@ class LucyInterface(object):
@admin_method
def create_machine(self, name, password, ascii_armored_key):
+ """
+ Only for administrators.
+ Create a machine in lucy system and import its GPG key in the local keyring.
+ """
session = Session()
# Validate first by creating an entity that login/name/email are valid
try:
@@ -165,6 +180,9 @@ class LucyInterface(object):
@user_method
def list_machine(self):
+ """
+ List the machines registered in the database.
+ """
session = Session()
machines = [ m.serialize() for m in session.query(Machine).all()]
for m in machines:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git
More information about the Pkg-debile-commits
mailing list