[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rrd-developers
Subject:    Re: [rrd-developers] Python Bindings in rc4, return dict of info cmd
From:       Tobias Oetiker <tobi () oetiker ! ch>
Date:       2009-08-24 11:56:19
Message-ID: alpine.DEB.2.00.0908241355110.18500 () sebohet ! brgvxre ! pu
[Download RAW message or body]

Today Hermann Lauer wrote:

> Hello,
>
> rc4 did compile and install fine on debian lenny,
> but I noticed that the return of the info cmd is now a
> flat dict instead of a structured one (see below).
> So simple getting of the datasources is not possible anymore.

this is to keep the interface in line with what is actually being
returned by the info call ... what was taken as a tree structure is
just a fanciful nameing scheme ...

cheers
tobi


> Any ideas about that ?
>
> Thanks,
>  greetings
>   Hermann
>
> >>> import rrdtool
> >>> i=rrdtool.info("warmwasser.rrd")
> >>> i['ds']
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> KeyError: 'ds'
> >>> i.keys()
> [...
> 'ds[ds0].minimal_heartbeat', 'rra[9].cdp_prep[2].value', 'rra[9].cur_row',
> 'rra[0].xff', 'rra[9].cdp_prep[0].unknown_datapoints', 'rra[4].pdp_per_row',
> 'rra[6].cf', 'ds[ds1].last_ds', 'rra[10].cf',
> 'rra[5].cdp_prep[2].unknown_datapoints', 'rra[10].rows',
> 'rra[0].cdp_prep[2].unknown_datapoints']
>
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi@oetiker.ch ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-developers mailing list
rrd-developers@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic