The most recent version of the DC design doc specifies
user defined checkpoints as follows:

<execution stop_on_error="false">
        <checkpoint name="custom-script" mod_path="custom_script"
                checkpoint_class="CustomScript">
                        <args>/usr/bin/myscript.sh arg1 arg2</args>
        </checkpoint>
</execution>

As was pointed out in this morning's meeting, this has
the downside of not allowing for a way to specify arguments
to myscript.sh that get reside in the DOC.

So, I'm enhancing my proposal based on some conversations
with Darren and Keith.

For arguments that need to be referenced from the DOC, allow
XPATH style argument specification. So, if the 'distro_name'
element needs to be referenced from the DOC, the args to
myscript.sh would be specified as -

%{/doc/volatile/dc_spec/distro_name}

Or, simply,

%{/*/distro_name}

Anytime, the CustomScript checkpoint sees a %{ .. }, it will perform a substitution based on a call to the DOC.
So, the above two specifications will respectively map to:

doc.volatile.get_children(name=distro_name)

and

doc.get_descendents(name=distro_name)

If a user wants to reference a more specific attribute, it
can be specified as follows -

%{/doc/volatile/n...@attribute}

and this will get substituted to the appropriate DOC call
and object.__dict__['attribute'] referenced.

If multiple objects match a given path, a subscript reference
can be specified to reference a specific entry.

Does this seem workable?

Alok
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to