[PATCH v8] add JSON output to net ads

Andrew Bartlett abartlet at samba.org
Wed Sep 19 02:37:27 UTC 2018


On Mon, 2018-09-17 at 17:04 +0200, Philipp Gesang wrote:
> Hi Gary, others,
> 
> thanks for the review.
> 
> > 
> > Looks good, apart from one minor quibble some of the line lengths
> > are over 80
> > characters.  Once that's fixed I'm happy to give my reviewed by.
> Done, see v8 attached.
> 
> CI: https://gitlab.com/samba-team/devel/samba/pipelines/30359226

G'Day Philipp,

I see you have your company copyright on some files.  That's fine, but
you need to send in your DCO to us per the contributing page at the
wiki.

If you have already done that it's OK, but I can't find the record.

Sorry,

Andrew Bartlett
> 
> -8<----------------------------------------------------------->8-
> 
> Changes in v8:
> * Enforce line width of 80 columns.
> * Rebase onto catalyst/master.
> 
> 
> Changes in v7:
> * Cause test failure on samba.tests.BlackboxProcessError.
> * Drop `-j' flag, retain long form `--json' only.
> 
> 
> Changes in v6:
> * Rebase on catalyst/master.
> * Don’t catch samba.tests.BlackboxProcessError in tests.
> * Move test to the “chgdcpass” set.
> * Wrap the test base class so unittest doesn’t attempt to run it.
> 
> 
> Changes in v5:
> 
> * Rebase on catalyst/master; cleanup branch; resolve conflicts.
> * Add rudimentary blackbox tests.
> * Include another patch to make the non-JSON output more regular.
> 
> 
> Changes in v4:
> 
> * Incorporate feedback by Gary Lockyer.
> * Change signature of json_to_string() too to take const*
>   (necessitated by above item).
> * Submit as patch bundle.
> 
> 
> Changes in v3:
> 
> * Remove an unused variable.
> * Rebase onto:
>   https://gitlab.com/catalyst-samba/samba/pipelines/25428061
> * Full branch available on gitlab:
>   https://gitlab.com/phgsng/samba/commits/i2n-net-ads-json
> * Add one tiny patch that drops an unnecessary json_free().
> 
> 
> Changes in v2:
> 
> * Rebase onto the error handling branch:
>   https://lists.samba.org/archive/samba-technical/2018-July/128973.ht
> ml
> * Change signature of json_is_invalid() to accept const*.
> * Use json_add_guid() instead of dumping uuid manually.
> 
> 
> V1 blurb:
> 
> The informational commands of the ``net ads'' family format their
> output in an ad-hoc manner that is not specified. For automated
> processing it would be useful to optionally encode the output as
> JSON.
> 
> These two patches against master add such a JSON output to ``net
> ads info'' and ``net ads lookup''. They have been forward-ported
> from the 4.7-ish Samba that we run. Compilation succeeds with
> master but I'm still in the process of getting working test
> environment, so they're virtually untested.
> 
> -8<----------------------------------------------------------->8-
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba






More information about the samba-technical mailing list