ab at samba.org
Wed Jun 21 13:00:45 GMT 2006
Volker Lendecke пишет:
> On Wed, Jun 21, 2006 at 01:04:08PM +0530, Chetan S wrote:
>>> Some of the management features you outline don't have a direct
>>> mapping to existing RPC pipes so we need to think about what to
>>> do with those.
>> Following up the "thin wrapper api" idea a bit more - is msrpc the
>> ideal place for such abstraction or some other code-subtree common to
>> Samba3 and 4 ?
> Along all this discussion I always have the problem that I
> don't have a clear picture where we want to go, I'm a bit
> missing the initial "user" of this API.
> What do you think about going into swat (I've NEVER looked
> at that code to be honest)? To me this looks like a simple
> enough application that would be a user of this API, and
> it's very easily usable and thus testable.
I agree with you on this. I also had ideas to actually rewrite SWAT in
samba3 by backporting ejs and webserver code (as standalone app) from
samba4. This way the SWAT actual code will be in ejs and the same API
can be maintained (and used) between both samba3 and samba4 for most of
the interface code while actual low-level implementation will be different.
> My worry is that someone implements some API for some
> internal IBM management interface (I don't think I'm telling
> secrets here... :-)) that is then not general enough or not
> of enough use.
> Cutting swat into two pieces also has the advantage that the
> API can slowly morph into what is really needed. For example
> something like "give me the list of possible values for the
> 'security' parameter" is something every management app
That is actually a feature of any structured representation protocol or
format. Being able to query data structure and possible correct values
is of real importance here and IDLization of it will be really helpful
for other means of accessing that info (this is partially answer to your
thought right below).
> Having that management API in place it should be reasonably
> easy to write the IDL for to ship it via RPC. This is then
> where porting pidl output to Samba3 comes in. But from my
> point of view it's a lot easier to play with API-level
> designs in a real application that needs it. And with swat
> re-worked we have a good sample to test the API and a
> documentation of its use.
> The HTML does not necessarily need to be the most fancy
> stuff on earth, if I remember swat correctly it already does
> much of what
> http://wiki.samba.org/index.php/Management_Interface puts as
> requirements, so the HTML part (without having looked!) to
> me looks not too difficult to grasp.
Once having structures defined (and for most of smb.conf options we
already have that halfway defined in XML in the docs -- don't
underestimate the value of that work :-)) writing XML/HTML responses is
really easy. May be IDL definition files for that matter too.
/ Alexander Bokovoy
Samba Team http://www.samba.org/
ALT Linux Team http://www.altlinux.org/
Midgard Project Ry http://www.midgard-project.org/
More information about the samba-technical