]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pidl: Update documentation for DCERPC interface connections
authorAndreas Schneider <asn@samba.org>
Mon, 17 Feb 2025 14:41:06 +0000 (15:41 +0100)
committerJule Anger <janger@samba.org>
Thu, 12 Jun 2025 11:27:15 +0000 (11:27 +0000)
https://realpython.com/documenting-python-code/

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 73ce15e7d5b7ea867849f1aa4fa5390830660f11)
(cherry picked from commit 1f84f56c6df0813e488701704daf2174bd0f7eb3)

pidl/lib/Parse/Pidl/Samba4/Python.pm

index 63f0f72605d04a706d39692833e47e89f9f760d3..9bcdea3b15b517f07d107ef0b38a31bf1f3a8f9d 100644 (file)
@@ -1547,11 +1547,30 @@ sub Interface($$$)
                $self->pidl("");
 
                my $signature =
-"\"$interface->{NAME}(binding, lp_ctx=None, credentials=None) -> connection\\n\"
-\"\\n\"
-\"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\\n\"
-\"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\\n\"
-\"credentials should be a credentials.Credentials object.\\n\\n\"";
+"\"$interface->{NAME}(binding, lp_ctx=None, credentials=None, basis_connection=None) -> connection\\n\"
+\"\\n\\n\"
+\"Parameters\\n\"
+\"----------\\n\"
+\"binding : str\\n\"
+\"    A DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\\n\"
+\"lp_ctx : param.LoadParm\\n\"
+\"    Should be a path to a smb.conf file or a param.LoadParm object\\n\"
+\"credentials : credentials.Credentials, optional\\n\"
+\"    A credentials.Credentials object (default is None).\\n\"
+\"basis_connection : samba.dcerpc.ClientConnection, optional\\n\"
+\"    A $interface->{NAME} client connection object (default is None).\\n\"
+\"\\n\\n\"
+\"Returns\\n\"
+\"-------\\n\"
+\"samba.dcerpc.ClientConnection\\n\"
+\"    A ClientConnection object\\n\"
+\"\\n\\n\"
+\"Raises\\n\"
+\"------\\n\"
+\"samba.NTSTATUSError\\n\"
+\"    An NTSTATUS error\\n\"
+\"\\n\"";
+
 
                my $docstring = $self->DocString($interface, $interface->{NAME});