mirror of
https://github.com/samba-team/samba.git
synced 2025-07-19 04:59:10 +03:00
Add docstrings to a couple more python modules.
(This used to be commit b4560c90e5
)
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
%module(package="samba.misc") misc
|
||||
%module(docstring="Python bindings for miscellaneous Samba functions.",package="samba.misc") misc
|
||||
|
||||
%{
|
||||
#include "includes.h"
|
||||
@ -37,6 +37,9 @@
|
||||
%import "../../libcli/security/security.i"
|
||||
%import "../../libcli/util/errors.i"
|
||||
|
||||
%feature("docstring") generate_random_str "S.random_password(len) -> string\n" \
|
||||
"Generate random password with specified length.";
|
||||
|
||||
%rename(random_password) generate_random_str;
|
||||
char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len);
|
||||
|
||||
|
@ -3,6 +3,10 @@
|
||||
#
|
||||
# Don't modify this file, modify the SWIG interface instead.
|
||||
|
||||
"""
|
||||
Python bindings for miscellaneous Samba functions.
|
||||
"""
|
||||
|
||||
import _misc
|
||||
import new
|
||||
new_instancemethod = new.instancemethod
|
||||
@ -61,7 +65,13 @@ import ldb
|
||||
import credentials
|
||||
import param
|
||||
import security
|
||||
random_password = _misc.random_password
|
||||
|
||||
def random_password(*args, **kwargs):
|
||||
"""
|
||||
S.random_password(len) -> string
|
||||
Generate random password with specified length.
|
||||
"""
|
||||
return _misc.random_password(*args, **kwargs)
|
||||
|
||||
def ldb_set_credentials(*args, **kwargs):
|
||||
"""
|
||||
|
@ -3216,7 +3216,10 @@ fail:
|
||||
|
||||
|
||||
static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"random_password", (PyCFunction) _wrap_random_password, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"random_password", (PyCFunction) _wrap_random_password, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
|
||||
"S.random_password(len) -> string\n"
|
||||
"Generate random password with specified length.\n"
|
||||
""},
|
||||
{ (char *)"ldb_set_credentials", (PyCFunction) _wrap_ldb_set_credentials, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
|
||||
"S.set_credentials(credentials)\n"
|
||||
"Set credentials to use when connecting.\n"
|
||||
|
@ -20,6 +20,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
"""Samba 4."""
|
||||
|
||||
__docformat__ = "restructuredText"
|
||||
|
||||
import os
|
||||
|
@ -22,6 +22,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
"""Functions for setting up a Samba configuration."""
|
||||
|
||||
from base64 import b64encode
|
||||
import os
|
||||
import pwd
|
||||
@ -41,8 +43,6 @@ import urllib
|
||||
from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError, \
|
||||
LDB_ERR_NO_SUCH_OBJECT, timestring, CHANGETYPE_MODIFY, CHANGETYPE_NONE
|
||||
|
||||
"""Functions for setting up a Samba configuration."""
|
||||
|
||||
__docformat__ = "restructuredText"
|
||||
|
||||
DEFAULTSITE = "Default-First-Site-Name"
|
||||
|
Reference in New Issue
Block a user