[SAMBA4] Python Status
Andrew Bartlett
abartlet at samba.org
Fri Dec 28 07:47:45 GMT 2007
On Fri, 2007-12-28 at 01:06 +0100, Jelmer Vernooij wrote:
> The support for Python I have been working on for some time now
> is now getting close to completion. Provisioning using the
> Python code works now and is being tested. "make test" still uses
> the EJS provision to set up the dc and domain member.
>
> To try out the Python provision code with make test, export
> "PROVISION_PYTHON=yes". Note that this won't show anything different as the
> EJS and Python provisioning scripts do exactly the same thing.
I get:
PROVISIONING MEMBER...schema_fsmo_init: no schema dn present: (skip
schema loading)
naming_fsmo_init: no partitions dn present: (skip loading of naming
contexts details)
pdc_fsmo_init: no domain dn present: (skip loading of domain details)
schema_fsmo_init: no schema head present: (skip schema loading)
naming_fsmo_init: no partitions dn present: (skip loading of naming
contexts details)
pdc_fsmo_init: no domain object present: (skip loading of domain
details)
I think you should also test the LDAP mode:
PROVISION_PYTHON=yes TEST_LDAP=yes OPENLDAP_ROOT=/data/openldap/prefix
make testenv
Traceback (most recent call last):
File "./setup/provision.py", line 137, in <module>
if not opts.ldap_module:
AttributeError: Values instance has no attribute 'ldap_module'
> All of the Python bindings and functions, except for the ones in
> samba.samba3.upgrade, have matching tests.
Is there anything particular getting in the way of upgrade tests, aside
from time?
> There are a couple of hosts on the build farm that do not
> have Python installed yet (3 if I remember correctly). I will follow
> up on this later.
>
> The following things also still need to be finished before Python can
> provide everything that EJS provides right now:
>
> * DCE/RPC bindings: There are no Python bindings generated by pidl
> yet. This is probably the biggest thing at the moment.
Should we have DCE/RPC bindings, or libnet bindings? While it's more
work to provide sane APIs, perhaps that is more at the level python
programmers want?
(I actually suspect they want both).
> * dsdb/samdb/ldb_modules/tests/samba3sam.py doesn't pass yet (port of
> ../testprogs/samba3sam.js)
> * lib/ldb/tests/python/ldap.py doesn't pass yet (port of
> ../testprogs/ejs/ldap.js)
> * Install python modules into system. At the moment only the smbpython
> binary is installed, but it would be nice if "ordinary" Python users
> could also use the Samba python modules.
> * SWAT: The web server code still uses EJS. We could probably postpone
> this until after the switch to Python.
I would at least like to see a command-line way to vampire a server
before we killed SWAT (as there isn't another way to do it in one
spot).
> However, I'm interested in feedback on the Python code at this point. I
> will continue working on finishing the support for Python (hopefully done by
> the first week of the new year..). And I will of course send a
> merge request once I'm actually done...
I don't like the way we no longer use a global dictionary for the
substitutions. I would prefer to have all subs available in all files,
if possible.
This pattern:
setup_add_ldif(samdb, setup_path("provision_rootdse_add.ldif"), {
"SCHEMADN": schemadn,
"NETBIOSNAME": netbiosname,
"DNSDOMAIN": dnsdomain,
"DEFAULTSITE": DEFAULTSITE,
"REALM": realm,
Seems to defeat the purpose of having these consistent subs in the first
place...
Thanks,
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Red Hat Inc. http://redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20071228/c5add5de/attachment.bin
More information about the samba-technical
mailing list