diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-05-06 08:13:20 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-05-06 08:13:20 -0400 |
commit | a4de0e44bd10761f5ec7d948fd0a3824720a90f2 (patch) | |
tree | df582678a12f77a29fede1965727fb27c94ecbe1 /schemas | |
parent | e38ea05100ddf670898f1d11ffc09b9d44435f27 (diff) | |
download | bcfg2-a4de0e44bd10761f5ec7d948fd0a3824720a90f2.tar.gz bcfg2-a4de0e44bd10761f5ec7d948fd0a3824720a90f2.tar.bz2 bcfg2-a4de0e44bd10761f5ec7d948fd0a3824720a90f2.zip |
Rewrote NagiosGen config to use NagiosGen/config.xml, which
understands <Group> and <Client> tags, rather than the client-specific
Properties/NagiosGen.xml and the group-specific but limited
NagiosGen/parents.xml. Includes schema and bcfg2-lint updates
necessary. Wrote conversion tool, nagiosgen-convert.py, which
converts everything but the <default/> tag in the old NagiosGen.xml,
which cannot be reasonably converted to StructFile format.
Also removed a _lot_ of string modification in NagiosGen.py, which
should make it a fair bit faster.
Diffstat (limited to 'schemas')
-rw-r--r-- | schemas/nagiosgen.xsd | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/schemas/nagiosgen.xsd b/schemas/nagiosgen.xsd new file mode 100644 index 000000000..080994cd1 --- /dev/null +++ b/schemas/nagiosgen.xsd @@ -0,0 +1,31 @@ +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en"> + <xsd:annotation> + <xsd:documentation> + NagiosGen config schema for bcfg2 + Chris St. Pierre + </xsd:documentation> + </xsd:annotation> + + <xsd:complexType name="GroupType"> + <xsd:choice minOccurs="1" maxOccurs="unbounded"> + <xsd:element name="Option" type="OptionType"/> + <xsd:element name="Group" type="GroupType"/> + <xsd:element name="Client" type="GroupType"/> + </xsd:choice> + <xsd:attribute type="xsd:string" name="name" use="required"/> + <xsd:attribute type="xsd:string" name="negate"/> + </xsd:complexType> + + <xsd:complexType name="OptionType" mixed="true"> + <xsd:attribute type="xsd:string" name="name" use="required"/> + </xsd:complexType> + + <xsd:element name="NagiosGen"> + <xsd:complexType> + <xsd:choice minOccurs="1" maxOccurs="unbounded"> + <xsd:element name="Group" type="GroupType"/> + <xsd:element name="Client" type="GroupType"/> + </xsd:choice> + </xsd:complexType> + </xsd:element> +</xsd:schema> |