[rrd-developers] Python Bindings in rc4, return dict of info cmd

Tobias Oetiker tobi at oetiker.ch
Mon Aug 24 13:56:19 CEST 2009


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 at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list