I have been trying to find the right way to store a dictionary for ksmeta
variable in Cobbler.  I am not a Python guru, and I may be going about this
the wrong way, and thats why I am posting the question here. :-)

What I am trying to accomplish is a more dynamic partitioning method, using
input from ksmeta to create a dictionary, that I can cycle through to spit
out partition info. This is just a simple construct that I can't seem to get
to work. It will only take the data as a string or list.  Does it need some
sort of eval() method?

I would post to the Cheetah-Template list, but it seems to be the way in
which Cobbler processes the POST data.  Is there a way to create and save a
dictionary list for Cobbler processing?

For instance:

cobbler system add --name=bar --profile=foo --ksmeta="disk:{'boot': '100',
'root': '4096', 'var': '8192'}"


cat /var/lib/cobbler/snippets/dynamic_partition

#if $disk
# Dynamic disk allocation
    #set parts = $disk

    #for k, v in $parts
        part /$k --fstype ext3 --size=$v --ondisk=\$d1 --asprimary
    #end for

#end if

As always, any help is greatly appreciated.  I have been using Cobbler to
successfully deploy RedHat, CentOS, Debian, Ubuntu and even Windows. Cobbler
has been the greatest tool that has been teaching me Python and to be a
better system admin. Thanks Michael!

Eric
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to