Re: cobbler system add

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

 



drew einhorn wrote:
I hoping that Real Soon Now it will create a VM to order with lots of
custom vmware settings  via ks_meta variables.

Very cool.
It seems like you'd really benefit from using the XMLRPC API (see cobblerd.py for details) instead then. This way you could install VMware on any machine, not just the machine that ran the Cobbler server.

https://hosted.fedoraproject.org/projects/cobbler/wiki/CobblerXmlrpc

Particularly, you'd want to use functions like get_system_for_koan(system_name) -- which still returns a hash/dictionary like the local API does. Not only does the XMLRPC API work remotely, but it also makes sure that all of the cobbler objects are blended together just like they would be if used from koan or PXE. Calling the local API does not ensure this, which means you'd just get the metadata about the system, but not the profile or distro object.

koan is an example of an application using the Cobbler XMLRPC API and the source of that app could be useful.


At the moment I'm hung up on VMware API problems, so it doesn't do
anything useful yet.  The APIs either won't install or puke
after they are installed.  I can generate .vmx files to order, but
scp and ssh commands to install them on the VMware server,
either require permanently granting too much access to the server or
you have to authenticate yourself several times.

Pretty sure I understand most of the values you python script
prints out.

But what are:  parent, depth, virt_type, and virt_path?

parent/depth are related to the ability to inherit profiles. 'parent' can be set on a profile to mean that the profile should take any unspecified settings from another profile. For instance, "rhel5webserver" might inherit from "rhel5server". This is documented as "--parent" in the manpage. Depth is just an internal variable used for being able to make "cobbler list" formatting of the cobbler object graph look correct. It is not really useful in any context other than trying to render/sort the object graph -- something most apps don't need
to do.

Again, if you're writing a client of cobbler, usage of the XMLRPC API and using the *_for_koan functions is the best way to go. It's simpler -- and it's also usable remotely (and without the need for root access).




On 8/6/07, *Michael DeHaan* < mdehaan@xxxxxxxxxx <mailto:mdehaan@xxxxxxxxxx>> wrote:

    drew einhorn wrote:
    >
    >
    > On 7/30/07, *Michael DeHaan* <mdehaan@xxxxxxxxxx
    <mailto:mdehaan@xxxxxxxxxx>
    > <mailto: mdehaan@xxxxxxxxxx <mailto:mdehaan@xxxxxxxxxx>>> wrote:
    >
    >     drew einhorn wrote:
    >
    >     > I think it won't be too difficult to use VMperl to create
    >     scripts to
    >     > make an appropriate dhcp reservations, or create a VM to
    order.
    >     > Will let you know when I have something more concrete than
    plans.
    >     Excellent.
    >
    >
    > Been making progress.
    >
    > What I need now is a python incantation to retrieve ks metadata,
    > and virt info from a cobbler profile, so I can fill in line
    arguments
    > on shell commands my script is issuing.
    >
    >

    This might help get you started...  what does the script do?


    import cobbler.api as cobbler_api

    api = cobbler_api.BootAPI()

    for x in api.profiles():
        print x.to_datastruct()






    >
    > --
    > Drew Einhorn
    >
    ------------------------------------------------------------------------

    >
    > _______________________________________________
    > et-mgmt-tools mailing list
    > et-mgmt-tools@xxxxxxxxxx <mailto:et-mgmt-tools@xxxxxxxxxx>
    > https://www.redhat.com/mailman/listinfo/et-mgmt-tools

    _______________________________________________
    et-mgmt-tools mailing list
    et-mgmt-tools@xxxxxxxxxx <mailto:et-mgmt-tools@xxxxxxxxxx>
    https://www.redhat.com/mailman/listinfo/et-mgmt-tools




--
Drew Einhorn
------------------------------------------------------------------------

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

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

  Powered by Linux