[node-patches] Change in ovirt-node[master]: Add a property expose mechanism

fabiand at fedoraproject.org fabiand at fedoraproject.org
Fri Feb 28 15:14:53 UTC 2014


Fabian Deutsch has submitted this change and it was merged.

Change subject: Add a property expose mechanism
......................................................................


Add a property expose mechanism

This new tool is inteded to make the discovery of relevant nodes easier.
The tool provides a framework for the registration of "features" and
"methods".
Features are used to state the presence of a specific high-level feature
e.g. presence of VDSM, or Gluster.
Methods are actually a simple RPC mechanism to trigger methods on the
Node.

This tool could also be used to e.g. trigger configurations using the
cmdline, e.g.:

    $ ovirt-node-features run config SSH.configure_local

Demo
----
This tech demo includes a tool which either dumps the feature-registry
in XML to stdout or acts as a daemon which offers this API via http.

The following cmd can be used to dump all know features to stdout:

    $ ovirt-node-features dumpxml

The following cmdline launches the http daemon on port 8082:

    $ ovirt-node-features -d

The daemon can then be accessed using any http tool, e.g. curl:

    $ curl http://127.0.0.1:8082

There is also a web-view, basically the XML data plus a stylesheet.

To trigger a method the daemon can also be used:

    $ curl 127.0.0.1:8082/methods/foo/bar?paramA=1&paramB=2

This will trigger the method bar in the namespace foo with the
params paramA and paramB, so something like:

    foo.bar(paramA=1, paramB=2)

Concepts
--------
A feature or method is always owned by someone and is always sitting in
some namespace.
The registration mechanism is intended to work well with Node's current
plugin mechanism.

The documentation is still sparse. Mabye the name feature should be
replaced by property. But those are details.

Change-Id: If081e5cd5fc9d038c9afaef0c97349f83e6f3a39
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=999325
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M ovirt-node.spec.in
M scripts/Makefile.am
A scripts/ovirt-node-features
M src/Makefile.am
A src/ovirt/node/tools/featured.xsl
A src/ovirt/node/tools/features.py
A src/ovirt/node/utils/expose.py
7 files changed, 481 insertions(+), 2 deletions(-)



-- 
To view, visit http://gerrit.ovirt.org/18577
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If081e5cd5fc9d038c9afaef0c97349f83e6f3a39
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Joey Boggs <jboggs at redhat.com>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the node-patches mailing list