diff options
author | Joey Hagedorn <hagedorn@mcs.anl.gov> | 2006-01-09 20:47:44 +0000 |
---|---|---|
committer | Joey Hagedorn <hagedorn@mcs.anl.gov> | 2006-01-09 20:47:44 +0000 |
commit | bafc6ef50ec2f2969be73e645cc3cec588abc67f (patch) | |
tree | 38a5dcc9f5f1af23554ae3ea315c5b53c83fcb16 /src | |
parent | 2c7ee69113965f769b58eca159ae7e4aa5cabe4d (diff) | |
download | bcfg2-bafc6ef50ec2f2969be73e645cc3cec588abc67f.tar.gz bcfg2-bafc6ef50ec2f2969be73e645cc3cec588abc67f.tar.bz2 bcfg2-bafc6ef50ec2f2969be73e645cc3cec588abc67f.zip |
Modified StatReports to look in <repo>/Metadata/clients.xml for new metadata format
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1657 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/sbin/StatReports | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sbin/StatReports b/src/sbin/StatReports index ef6a8df66..439998718 100644 --- a/src/sbin/StatReports +++ b/src/sbin/StatReports @@ -152,7 +152,7 @@ if __name__ == '__main__': configpath = "%s/etc/report-configuration.xml" % c.get('server', 'repository') statpath = "%s/etc/statistics.xml" % c.get('server', 'repository') hostinfopath = "%s/etc/hostinfo.xml" % c.get('server', 'repository') - metadatapath = "%s/etc/metadata.xml" % c.get('server', 'repository') + clientsdatapath = "%s/Metadata/clients.xml" % c.get('server', 'repository') transformpath = "/usr/share/bcfg2/xsl-transforms/" #websrcspath = "/usr/share/bcfg2/web-rprt-srcs/" @@ -193,9 +193,9 @@ if __name__ == '__main__': print("StatReports: Failed to parse %s"%(configpath)) raise SystemExit, 1 try: - metadata = XML(open(metadatapath).read()) + clientsdata = XML(open(clientsdatapath).read()) except (IOError, XMLSyntaxError): - print("StatReports: Failed to parse %s"%(metadatapath)) + print("StatReports: Failed to parse %s"%(clientsdatapath)) raise SystemExit, 1 try: hostinfodata = XML(open(hostinfopath).read()) @@ -210,7 +210,7 @@ if __name__ == '__main__': #should all of the other info in Metadata be appended? #What about all of the package stuff for other types of reports? - for client in metadata.findall("Client"): + for client in clientsdata.findall("Client"): nodel = Element("Node", attrib={"name" : client.get("name")}) nodel.append(client) for hostinfo in hostinfodata.findall("HostInfo"): |