summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--schemas/packages.xsd32
-rwxr-xr-xsrc/sbin/bcfg2-repo-validate5
2 files changed, 36 insertions, 1 deletions
diff --git a/schemas/packages.xsd b/schemas/packages.xsd
new file mode 100644
index 000000000..843e5ee68
--- /dev/null
+++ b/schemas/packages.xsd
@@ -0,0 +1,32 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ bundle schema for bcfg2
+ Narayan Desai, Argonne National Laboratory
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:complexType name='SourceType'>
+ <xsd:sequence>
+ <xsd:element name="Group" type="xsd:string" minOccurs='1'
+ maxOccurs='unbounded'/>
+ <xsd:element name="URL" type="xsd:string" minOccurs='1'
+ maxOccurs='unbounded'/>
+ <xsd:element name="Version" type="xsd:string"/>
+ <xsd:element name="Component" type="xsd:string" minOccurs='1'
+ maxOccurs='unbounded'/>
+ <xsd:element name="Arch" type="xsd:string" minOccurs='1'
+ maxOccurs='unbounded'/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name='Sources'>
+ <xsd:complexType>
+ <xsd:choice minOccurs='1' maxOccurs='unbounded'>
+ <xsd:element name='APTSource' type='SourceType'/>
+ <xsd:element name='YUMSource' type='SourceType'/>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema> \ No newline at end of file
diff --git a/src/sbin/bcfg2-repo-validate b/src/sbin/bcfg2-repo-validate
index e65e7aa78..e04cf6c3c 100755
--- a/src/sbin/bcfg2-repo-validate
+++ b/src/sbin/bcfg2-repo-validate
@@ -78,6 +78,7 @@ if __name__ == '__main__':
services_list = glob.glob("%s/Svcmgr/*.xml" % repo)
deps_list = glob.glob("%s/Deps/*.xml" % repo)
dec_list = glob.glob("%s/Decisions/*" % repo)
+ pkgcfg_list = glob.glob("%s/Packages/config.xml" % repo)
filesets = {'metadata':(metadata_list, "%s/metadata.xsd"),
'clients':(clients_list, "%s/clients.xsd"),
@@ -89,7 +90,9 @@ if __name__ == '__main__':
'imageinfo':(imageinfo_list, "%s/report-configuration.xsd"),
'services':(services_list, "%s/services.xsd"),
'deps':(deps_list, "%s/deps.xsd"),
- 'decisions': (dec_list, "%s/decisions.xsd")}
+ 'decisions': (dec_list, "%s/decisions.xsd"),
+ 'packages': (pkgcfg_list, "%s/packages.xsd"),
+ }
failures = 0
for k, (filelist, schemaname) in filesets.iteritems():