OK, so the following syntax *should* work :
remote.modify_distro(distro_id, 'ks_meta', {'onekey' : 'thevalue',
'other':'value'}, token).
It does not on my box. As soon I get the real error message, I tell you.
Thanks again.
2008/10/7 Michael DeHaan <[EMAIL PROTECTED]>
> Alain Barthe wrote:
> > Hi Michael, thanks for your reply.
> >
> > I realize that my original mail has been a bit garbagged, so you
> > didn't understand my question.
> > The question was : what is the syntax to set up a dictionary value
> > through XMLRPC ?
> >
> > For scalar value, it is (as described in the wiki):
> > remote.modify_distro(distro_id, 'name', 'example-distro',token)
> > For a list, the following syntax works:
> > remote.modify_distro(distro_id, 'users', ['admin'],token)
> > But for a dictionary, I tried many syntaxes, none works.
>
> Do what I suggested first and then it will tell you what the actual
> error message is. Then come back here with that error
> if neccessary and we can tell you more.
>
> Dictionaries should work fine, the error may not be what it appears to
> be. Do change the file first, restart cobblerd, and see what
> message you get.
>
>
> >
> > Thanks for your reply.
> >
> > Alain.
> >
> > Others remarks are in the text below:
> >
> > 2008/10/7 Michael DeHaan <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]
> >>
> >
> > The error below is not a direct error from the above per se, but an
> > error in the code that produces the actual exception text -- it's an
> > error while telling you what the error is :). This is fixed on the
> > latest development branch and I also applied this change just now to
> > master.
> >
> > You can also fix this by adding the following line to remote.py
> >
> > "from utils import _"
> >
> >
> > I tried it, but it does not work (maybe a too old version ? Mine is 1.2.4
> >
> >
> >
> > Once you do that and restart cobblerd, you'll get the actual error
> > which
> > will help you more. Both forms of input are accepted and correct.
> >
> > (As a sidenote, Generally you want to avoid uppercase in Python -- it
> > implies a constant value, while COBSERVER is really a xmlrpc server
> > proxy object and TOKEN is a string variable).
> >
> >
> > In my context, they are constant values as I define them at the global
> > scope of my module.
> >
> >
> >
> > This will be included in the 1.2.6 stable update, which will probably
> > come out Friday.
> >
> > _______________________________________________
> > cobbler mailing list
> > [email protected] <mailto:
> [email protected]>
> > https://fedorahosted.org/mailman/listinfo/cobbler
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > cobbler mailing list
> > [email protected]
> > https://fedorahosted.org/mailman/listinfo/cobbler
> >
>
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler
>
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler