checking in - xsd doesn't seem to properly detect duplicate pv/lv elems
This commit is contained in:
parent
1ea84cbac0
commit
799ef58667
163
aif.xsd
163
aif.xsd
@ -324,7 +324,7 @@
|
||||
maxOccurs="unbounded"
|
||||
type="aif:t_part_flags"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" type="aif:t_nonempty"
|
||||
<xs:attribute name="id" type="xs:ID"
|
||||
use="required"/>
|
||||
<xs:attribute name="name" type="aif:t_nonempty"
|
||||
use="optional"/>
|
||||
@ -361,7 +361,7 @@
|
||||
<xs:element name="opt" minOccurs="0" maxOccurs="unbounded"
|
||||
type="aif:t_cmdopts"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="source" type="aif:t_nonempty" use="required"/>
|
||||
<xs:attribute name="source" type="xs:IDREF" use="required"/>
|
||||
<!-- We validate this in-code because there's way too many and
|
||||
it's way too variable per-host. -->
|
||||
<xs:attribute name="type" type="aif:t_nonempty" use="required"/>
|
||||
@ -401,9 +401,9 @@
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" type="aif:t_nonempty" use="required"/>
|
||||
<xs:attribute name="id" type="xs:ID" use="required"/>
|
||||
<xs:attribute name="name" type="aif:t_nonempty" use="required"/>
|
||||
<xs:attribute name="source" type="aif:t_nonempty" use="required"/>
|
||||
<xs:attribute name="source" type="xs:IDREF" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
@ -417,94 +417,74 @@
|
||||
<!-- BEGIN LVM -->
|
||||
<xs:element name="lvm" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:all minOccurs="1" maxOccurs="1">
|
||||
<xs:element name="physicals" minOccurs="1" maxOccurs="1">
|
||||
<xs:sequence>
|
||||
<xs:element name="volumeGroup" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:element name="pv">
|
||||
<xs:all>
|
||||
<xs:element name="physicalVolumes" minOccurs="1" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="aif:t_nonempty"
|
||||
use="required"/>
|
||||
<xs:attribute name="source" type="aif:t_nonempty"
|
||||
use="required"/>
|
||||
<xs:attribute name="vg" type="aif:t_nonempty"
|
||||
use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:unique name="uniq_pv_id">
|
||||
<xs:selector xpath="aif:pv"/>
|
||||
<xs:field xpath="@id"/>
|
||||
</xs:unique>
|
||||
<xs:unique name="uniq_pv_src">
|
||||
<xs:selector xpath="aif:pv"/>
|
||||
<xs:field xpath="@source"/>
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
<xs:element name="volumes" minOccurs="1" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:element name="vg">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="tags" minOccurs="0" maxOccurs="1">
|
||||
<xs:sequence>
|
||||
<xs:element name="pv" minOccurs="1"
|
||||
maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1"
|
||||
maxOccurs="unbounded">
|
||||
<xs:element name="tag"
|
||||
minOccurs="1"
|
||||
maxOccurs="unbounded"
|
||||
type="aif:t_nonempty"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" type="xs:ID"
|
||||
use="required"/>
|
||||
<xs:attribute name="source" type="xs:IDREF"
|
||||
use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="logicals" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="logicalVolumes" minOccurs="1" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lv" minOccurs="1"
|
||||
maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1"
|
||||
maxOccurs="unbounded">
|
||||
<xs:element name="lv" minOccurs="1"
|
||||
maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id"
|
||||
type="aif:t_nonempty"
|
||||
use="required"/>
|
||||
<xs:attribute name="name"
|
||||
type="aif:t_nonempty"
|
||||
use="required"/>
|
||||
<xs:attribute name="size"
|
||||
type="aif:t_disksize"
|
||||
use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" type="xs:ID"
|
||||
use="required"/>
|
||||
<xs:attribute name="name" type="aif:t_nonempty"
|
||||
use="required"/>
|
||||
<xs:attribute name="size" type="aif:t_disksize"
|
||||
use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="id" type="aif:t_nonempty"
|
||||
use="required"/>
|
||||
<xs:attribute name="name" type="aif:t_nonempty"
|
||||
use="required"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:unique name="uniq_vg_tag">
|
||||
<xs:selector xpath="aif:tags"/>
|
||||
<xs:field xpath="tag"/>
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:element name="tags" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="tag" type="aif:t_nonempty"
|
||||
minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="id" type="xs:ID" use="required"/>
|
||||
<xs:attribute name="name" type="aif:t_nonempty" use="required"/>
|
||||
</xs:complexType>
|
||||
<xs:unique name="uniq_vg_id">
|
||||
<xs:selector xpath="aif:vg"/>
|
||||
<xs:field xpath="@id"/>
|
||||
</xs:unique>
|
||||
<xs:unique name="uniq_vg_name">
|
||||
<xs:selector xpath="aif:vg"/>
|
||||
<xs:field xpath="@name"/>
|
||||
<xs:unique name="uniq_vg_tags">
|
||||
<xs:selector xpath="tags"/>
|
||||
<xs:field xpath="tag"/>
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:unique name="uniq_vg_names">
|
||||
<xs:selector xpath="volumeGroup"/>
|
||||
<xs:field xpath="@name"/>
|
||||
</xs:unique>
|
||||
<!-- ??? doesn't seem to work. -->
|
||||
<xs:unique name="uniq_vg_lv">
|
||||
<xs:selector xpath="volumeGroup/logicalVolumes/lv"/>
|
||||
<xs:field xpath="@name"/>
|
||||
</xs:unique>
|
||||
<xs:unique name="uniq_vg_pv">
|
||||
<xs:selector xpath="pv"/>
|
||||
<xs:field xpath="@source"/>
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
<!-- END LVM -->
|
||||
<!-- BEGIN MDADM -->
|
||||
@ -516,12 +496,12 @@
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:element name="member" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="source" type="aif:t_nonempty"
|
||||
<xs:attribute name="source" type="xs:IDREF"
|
||||
use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" use="required" type="aif:t_nonempty"/>
|
||||
<xs:attribute name="id" use="required" type="xs:ID"/>
|
||||
<xs:attribute name="name" use="required" type="aif:t_nonempty"/>
|
||||
<xs:attribute name="meta" use="optional" default="1.2"
|
||||
type="aif:t_raid_meta"/>
|
||||
@ -537,10 +517,6 @@
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:unique name="uniq_array_id">
|
||||
<xs:selector xpath="array"/>
|
||||
<xs:field xpath="@id"/>
|
||||
</xs:unique>
|
||||
<xs:unique name="uniq_array_name">
|
||||
<xs:selector xpath="array"/>
|
||||
<xs:field xpath="@name"/>
|
||||
@ -557,12 +533,15 @@
|
||||
<xs:element name="opt" minOccurs="1" maxOccurs="unbounded"
|
||||
type="aif:t_cmdopts"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="source" type="aif:t_nonempty" use="required"/>
|
||||
<xs:attribute name="source" type="xs:IDREF" use="required"/>
|
||||
<xs:attribute name="target" type="aif:t_filepath" use="required"/>
|
||||
</xs:complexType>
|
||||
<xs:unique name="uniq_mnts">
|
||||
<xs:unique name="uniq_mnts_src">
|
||||
<xs:selector xpath="aif:mount"/>
|
||||
<xs:field xpath="@source"/>
|
||||
</xs:unique>
|
||||
<xs:unique name="uniq_mnts_tgt">
|
||||
<xs:selector xpath="aif:mount"/>
|
||||
<xs:field xpath="@target"/>
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
@ -748,6 +727,10 @@
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:unique name="uniq_repo">
|
||||
<xs:selector xpath="aif:repo"/>
|
||||
<xs:field xpath="@name"/>
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
<xs:element name="mirrorList" maxOccurs="1" minOccurs="0">
|
||||
<xs:complexType>
|
||||
@ -771,10 +754,6 @@
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:unique name="uniq_repos">
|
||||
<xs:selector xpath="aif:repos"/>
|
||||
<xs:field xpath="repo"/>
|
||||
</xs:unique>
|
||||
<xs:unique name="uniq_mirror">
|
||||
<xs:selector xpath="aif:mirrorList"/>
|
||||
<xs:field xpath="mirror"/>
|
||||
@ -828,10 +807,6 @@
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:unique name="uniq_script">
|
||||
<xs:selector xpath="aif:script"/>
|
||||
<xs:field xpath="@order"/>
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
<!-- END SCRIPTS -->
|
||||
</xs:all>
|
||||
|
5
docs/urls
Normal file
5
docs/urls
Normal file
@ -0,0 +1,5 @@
|
||||
libblockdev/python gobject-introspection ("gi") API reference:
|
||||
https://lazka.github.io/pgi-docs/
|
||||
|
||||
example of using above for LVM:
|
||||
https://github.com/storaged-project/libblockdev/blob/master/tests/lvm_test.py
|
@ -55,20 +55,26 @@
|
||||
</luksDev>
|
||||
</luks>
|
||||
<lvm>
|
||||
<physicals>
|
||||
<!-- "size" refers to the size used of the LV for this VG. -->
|
||||
<pv id="pv1" source="lvm_member1" vg="vg1"/>
|
||||
</physicals>
|
||||
<volumes>
|
||||
<vg id="vg1" name="group1">
|
||||
<tags>
|
||||
<tag>data</tag>
|
||||
</tags>
|
||||
<logicals>
|
||||
<lv id="lv1" name="logical1" size="100%"/>
|
||||
</logicals>
|
||||
</vg>
|
||||
</volumes>
|
||||
<volumeGroup id="vg1" name="group1">
|
||||
<tags>
|
||||
<tag>data</tag>
|
||||
<tag>misc</tag>
|
||||
</tags>
|
||||
<physicalVolumes>
|
||||
<pv id="pv1" source="lvm_member1"/>
|
||||
</physicalVolumes>
|
||||
<logicalVolumes>
|
||||
<lv id="lv1" name="logical1" size="100%"/>
|
||||
</logicalVolumes>
|
||||
</volumeGroup>
|
||||
<volumeGroup id="vg2" name="group2">
|
||||
<physicalVolumes>
|
||||
<pv id="pv2" source="lvm_member1"/>
|
||||
</physicalVolumes>
|
||||
<logicalVolumes>
|
||||
<lv id="lv2" name="logical1" size="100%"/>
|
||||
</logicalVolumes>
|
||||
</volumeGroup>
|
||||
</lvm>
|
||||
<mdadm>
|
||||
<!-- level can be 0, 1, 4, 5, 6, or 10. RAID 1+0 (which is different from mdadm RAID10) would be done by
|
||||
|
Loading…
Reference in New Issue
Block a user