Mailinglist Archive: yast-devel (246 mails)

< Previous Next >
[yast-devel] status modul - xml
  • From: Bjoern Geuken <bgeuken@xxxxxxx>
  • Date: Thu, 13 Aug 2009 18:40:53 +0200
  • Message-id: <200908131840.54143.bgeuken@xxxxxxx>
Hi,

I'm trying to gave the status rest-service a nicer xml format, but I faced
some problems by sending the times of the values. Inside a browser the xml-
tree looks like that:

<status>
<metricgroup group_name="memory">
<metric name="memory-used">
<label type="value">
<value dateTime="1250178710">1.4260408320e+09</value>
<value dateTime="1250178600">1.4165012480e+09</value>
<value dateTime="1250178590">1.4164602880e+09</value>
....

But when the webclient fetches the data with @client.find(...), it misses the
dateTime attributes:

#<YaST::ServiceResource::Proxies::Status:0x7f5c68fd0c98 @prefix_options={},
@attributes={"metricgroup"=>[#<YaST::ServiceResource::Proxies::Status::Metricgroup:0x7f5c68f22288

@prefix_options={}, @attributes={"group_name"=>"memory",
"metric"=>[#<YaST::ServiceResource::Proxies::Status::Metricgroup::Metric:0x7f5c68f1fb28

@prefix_options={},
@attributes={"label"=>#<YaST::ServiceResource::Proxies::Status::Metricgroup::Metric::Label:0x7f5c68f1f038

@prefix_options={}, @attributes={"values"=>
["1.4095081472e+09",
"1.4097989632e+09",
.....
"1.4097973248e+09"], "type"=>"value"}>, "name"=>"memory-used"}>,
...

It seems that the last branch of an xml-tree (or elements with content?)
can't have any attributes. Is this the expected behaviour or maybe a bug?

Björn
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups