This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/723/

Thanks everyone for the comments.

openlmi-mof-register.py (Diff revision 1)
54
def usage():
It depends on the "depth" of the dependency: This is an utility script and I would like to avoid it to drag in too many dependencies of its own. ([Disclaimer] I have no idea what docopt is: I tend to write a C code no matter what language I use...)

openlmi-mof-register.py (Diff revision 1)
84
    devnull = open("/dev/null", "w")
There is a commented-out subprocess-call that makes use of the devnull. It's mimicking the behaviour of the original openlmi-mof-register script bu I found it useful to see the stderr of the called program as well. You're right that this part will need some ipmrovements: Michal has suggested a way to fix all the /dev/null redirected subprocess invocations.

openlmi-mof-register.py (Diff revision 1)
91
    devnull.close()
dtto

openlmi-mof-register.py (Diff revision 1)
155
        # fallback solution: most likely things will break
156
        log_msg("WARNING: Could not find the Pegasus interop namespace, using root/interop")
157
        ret = "root/interop"
Right. I will fix this.

openlmi-mof-register.py (Diff revision 1)
207
def unregister(mofs, reg, version, namespace, cimom):
I don't disagree. However for now I would prefer to have the script easily comparable to the original one before I'm reasonably sure I didn't introduce any new bugs.

openlmi-mof-register.py (Diff revision 1)
218
        devnull = open("/dev/null", "w")
Looks nice. Thanks. Will fix that.

openlmi-mof-register.py (Diff revision 1)
225
            regfile = open(reg, "r")
Will do.

openlmi-mof-register.py (Diff revision 1)
284
    if (not just_mofs) and (version == None):
Fixed. Will post a new version later.

- Tomas Smetana


On August 15th, 2013, 3:50 p.m. CEST, Tomas Smetana wrote:

Review request for OpenLMI Developers.
By Tomas Smetana.

Updated Aug. 15, 2013, 3:50 p.m.

Repository: openlmi-providers

Description

Here's a new registration script. It's a merge of the existing openlmi-mof-register and openlmi-register pegasus and should work as drop-in replacement for the openlmi-mof-register. The only slight difference is that the Pegasus interop namespace is not hard coded into the Pegasus registration calls but now there's an attempt to detect the right one.  And the whole thing is now written in (sort of) Python.

This is only the first step in the registration rewrite: Python should make it easier for manipulating a "side database" that would keep the registration data independently of the CIMOMs and eventually allow for re-registration when a new CIMOM is installed or upgraded.  This will also make possible for the providers package not to depend on a CIMOM.  I will prepare some design sketches of the registration process I envision to gather feedback and ideas: doing this correctly and robustly enough is going to be rather difficult.

Diffs

  • openlmi-mof-register.py (PRE-CREATION)

View Diff