Re: Idea: ORM for systems (kind of)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg Swift wrote:
On Mon, Jan 5, 2009 at 10:37, Michael DeHaan <mdehaan@xxxxxxxxxx <mailto:mdehaan@xxxxxxxxxx>> wrote:

    Michael DeHaan wrote:

        Casey Dahlin posted an idea on my blog that I thought was a
        good one...

        What if we had an ORM for systems?    When he first posted it,
        my initial thought was "Func already does this", though there
        are some subtle changes:

        His example was more complicated, but what if we could do
        something like:

        Client("*.example.org
        <http://example.org>").filter_by(arch==i386).services.start("httpd")
        ?

        (I'll admit the critera syntax could be much better)

        The only new thing here is the concept of filtering.  The goal
        here would be that instead of getting back the inventory for
        each system, we instead find a way to send the conditional
        "run this if" critera down to each node.  This may be better
        served as a library a level up from Func, so we could also
        work on having more "objecty" returns for it if we wanted to
        do this -- ultimately this might mean it's our higher level
        Func API after all.

        It does seem to want or require something like a facter, but I
        need to evaluate whether that would meet the needs for what I
        want to do -- I suspect it's not sufficiently Pythonic and we
        may want to do something different.

        Anyway, doing something higher level and primarily using Func
        for (secure, audited) transport may not be such a bad idea.

        Here was the post:  http://www.michaeldehaan.net/?p=821

        Either way, I think the above could be done by outsourcing the
        decision making to the nodes, so we don't have to keep an
        updated database of all the nodes properties.

        --Michael

        _______________________________________________
        Func-list mailing list
        Func-list@xxxxxxxxxx <mailto:Func-list@xxxxxxxxxx>
        https://www.redhat.com/mailman/listinfo/func-list


    To be clear, I don't want something as complicated as an ORM or
    Casey's example, per se, I was pondering whether the "run this if"
    example is interesting.


i think its a good idea. not everyone's dns alone provides enough of a delimiter to base selection on, and it is probably something many people that write scripts on top of func will end up writing some sort of work around for, so it would be good to have as part of the base.

-greg/xaeth

yeah, basically it's "Smart Func Groups", similar to smart albums or smart folders, though they might not be defined in the groups file (maybe they could be).

I still think we need to get some better (English) use cases around this though.

"Desktop systems still running Fedora 7, run koan to update yourselves to Fedora 8?"

"Systems that take Dell firmware, use koan to run this Dell firmware update profile"

"Systems with this package installed, do this?"

Etc.

Command line could look like

func "*.partof.example.com" --filter "release == fc8" call command run "/usr/bin/koan --profile=f8desktop && reboot"

???

--Michael



_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux