Opened 18 years ago
Closed 18 years ago
#4278 closed enhancement (fixed)
Return the storage group data using a more sensible XML approach.
| Reported by: | Owned by: | paulh | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.22 |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
Currently the XML returns information about the storage groups as a long list of attributes of one element which looks like this:
<Storage drive_total_free="1479558" drive_total_used="1358490"
drive_1_used="662884" drive_2_used="93351" drive_1_dirs="slave:/mnt/ tvrecordings,slave:/tvrecordings" fsids="1,2,4,total" drive_2_dirs="slave:/nas,Myth-Livingroom:/nas" drive_total_total="2838049" drive_4_free="101920" drive_2_total="1429698" drive_1_total="704175" drive_total_dirs="TotalDiskSpace" drive_4_used="602254" drive_4_dirs="Myth-Livingroom:/hdrecordings" drive_1_free="41291" drive_4_total="704175" drive_2_free="1336346" />
<Load avg1="0" avg2="0" avg3="0" /> <Guide guideDays="14" status="Successful."
next="2007-11-27T22:41:46" end="2007-11-27 02:31" guideThru="2007-12-11T03:00:00" start="2007-11-27 02:31" >Your subscription expires on 06/19/2008 10:23:34 PM</Guide>
This requires a bit more work to parse. The attached parse returns the same information in a more XML kind of way which looks like (different storage groups):
<Storage>
<Group dir="cyclops:/home/andrew/myth6" free="18825" id="1" total="50396" used="31570" /> <Group dir="cyclops:/scratch/myth2,cyclops:/tmp/myth1,cyclops:/tmp/myth3,cyclops:/tmp/myth4" free="10644" id="2" total="20746" used="10101" /> <Group dir="TotalDiskSpace" free="29470" id="total" total="71143" used="41672" />
</Storage> <Load avg1="0.79" avg2="0.4" avg3="0.28" /> <Guide status="" next="1970-01-01T00:00:00" end="" start="" ></Guide>
The HTML generation code in httpstatus.cpp handles this new layout as well.
Attachments (2)
Change History (7)
by , 18 years ago
| Attachment: | 0001-Return-the-storage-group-data-using-a-more-sensible-.patch added |
|---|
comment:1 by , 18 years ago
by , 18 years ago
| Attachment: | 0001-Return-the-storage-group-data-using-a-sensible-XML-a.patch added |
|---|
Updated to r15948.
comment:2 by , 18 years ago
I've just updated the patch to almost the head of release-0-21-fixes. If this could make it into 0.21, that would be awesome.
comment:4 by , 18 years ago
| Milestone: | unknown → 0.22 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |

Actually the Type should be "patch" but I don't seem to be able to change that now.