From e8e6b68539bebf93ad6ec8e86386705cb8f4cc15 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 17 Feb 2025 15:41:06 +0100 Subject: [PATCH] pidl: Update documentation for DCERPC interface connections https://realpython.com/documenting-python-code/ BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher (cherry picked from commit 73ce15e7d5b7ea867849f1aa4fa5390830660f11) (cherry picked from commit 1f84f56c6df0813e488701704daf2174bd0f7eb3) --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 29 +++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 63f0f72605d..9bcdea3b15b 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -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}); -- 2.47.2