summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2004-10-29 19:17:41 +0000
committerNarayan Desai <desai@mcs.anl.gov>2004-10-29 19:17:41 +0000
commitf1d240191be590b63e9383f29e55b20ca698a502 (patch)
treee019c39331e105df86d138be14edd2c89a535228 /tools
parent9e48307b56509b903646e582f9c8445c50ab921c (diff)
downloadbcfg2-f1d240191be590b63e9383f29e55b20ca698a502.tar.gz
bcfg2-f1d240191be590b63e9383f29e55b20ca698a502.tar.bz2
bcfg2-f1d240191be590b63e9383f29e55b20ca698a502.zip
add default schema location
}(Logical change 1.124) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@564 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'tools')
-rw-r--r--tools/validate_repo31
1 files changed, 0 insertions, 31 deletions
diff --git a/tools/validate_repo b/tools/validate_repo
deleted file mode 100644
index 4db20d214..000000000
--- a/tools/validate_repo
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python
-
-from glob import glob
-from sys import argv, exit
-from validate import validate, ValidationException
-
-if __name__ == '__main__':
- try:
- repo = argv[1]
- schemadir = argv[2]
- except:
- print "Usage: validate_repo <repo directory> <schema directory>"
- exit(1)
-
- # add more validation as more schemas get written
- filesets = {'metadata':("%s/etc/metadata.xml", "%s/metadata.xsd"),
- 'bundle':("%s/bundler/*.xml", "%s/bundle.xsd"),
- 'pkglist':("%s/pkgmgr/*.xml", "%s/pkglist.xsd"),
- 'base':("%s/etc/base.xml", "%s/base.xsd"),
- 'imageinfo':("%s/etc/imageinfo.xml", "%s/translation.xsd"),
- 'services':("%s/etc/services.xml", "%s/services.xsd")}
-
- for k, (spec, schema) in filesets.iteritems():
- for filename in glob(spec%(repo)):
- try:
- validate(open(filename).read(), schema%(schemadir))
- print "%s checks out"%(filename)
- except ValidationException, v:
- print "file %s fails to verify:\n%s"%(filename, v)
- except IOError:
- print "failed to open file %s"%(filename)