Bug 10504 - Python bindings cannot print lsa.ForestTrustCollisionInfo objects.
Summary: Python bindings cannot print lsa.ForestTrustCollisionInfo objects.
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Python (show other bugs)
Version: 4.1.6
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-18 17:36 UTC by Sumit Bose
Modified: 2014-04-18 20:55 UTC (History)
3 users (show)

See Also:
ab: review? (jelmer)


Attachments
make ForestTrustCollisionInfo/Record structs public so that __ndr_print/pack/unpack functions generated in Python bindings (1.22 KB, patch)
2014-03-18 17:42 UTC, Alexander Bokovoy
ab: review? (jelmer)
Details
v4-0-test and v4-1-test patch (1.66 KB, patch)
2014-03-24 11:49 UTC, Alexander Bokovoy
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sumit Bose 2014-03-18 17:36:21 UTC
Calling ndr_print on an object returned by lsaRSetForestTrustInformation() just returns

AttributeError: 'lsa.ForestTrustCollisionInfo' object has no attribute '__ndr_print__'
Comment 1 Alexander Bokovoy 2014-03-18 17:38:50 UTC
We need to declare the struct with [public] to get Python bindings with __ndr_pack/unpack/print.
Comment 2 Alexander Bokovoy 2014-03-18 17:42:52 UTC
Created attachment 9788 [details]
make ForestTrustCollisionInfo/Record structs public so that __ndr_print/pack/unpack functions generated in Python bindings

Patch attached
Comment 3 Alexander Bokovoy 2014-03-18 17:43:47 UTC
Comment on attachment 9788 [details]
make ForestTrustCollisionInfo/Record structs public so that __ndr_print/pack/unpack functions generated in Python bindings

Jelmer, please comment/review the patch.
Comment 4 Alexander Bokovoy 2014-03-18 17:44:24 UTC
(Actually add jelmer for review ;)
Comment 5 Alexander Bokovoy 2014-03-24 08:54:44 UTC
Jelmer did give an ACK on the IRC:
<ab> jelmer: ping, https://bugzilla.samba.org/show_bug.cgi?id=10504
<ab> jelmer: not sure if I made some error in the requesting review from you
<ab> and you never received the request
<jelmer> ab: haven't actually had time to look at it yet
<jelmer> looking now, as it is small
<jelmer> ab: change looks good, Reviewed-By: me
<jelmer> ab: if you're after the +1 thing in bugzilla, it might be better to get somebody else to approve it. I don't have my credentials here.
Comment 6 Alexander Bokovoy 2014-03-24 11:49:12 UTC
Created attachment 9798 [details]
v4-0-test and v4-1-test patch

Patch against v4-1-test
Comment 7 Andreas Schneider 2014-03-24 14:17:51 UTC
Comment on attachment 9798 [details]
v4-0-test and v4-1-test patch

LGTM
Comment 8 Andreas Schneider 2014-03-24 14:18:36 UTC
Karolin, please add the patch to the relevant branches. Thanks!
Comment 9 Karolin Seeger 2014-03-25 10:05:52 UTC
Pushed to autobuild-v4-1-test and autobuild-v4-0-test.
Comment 10 Karolin Seeger 2014-04-04 18:57:34 UTC
Pushed to both branches.
Closing out bug report.

Thanks!