diff options
Diffstat (limited to 'schemas')
-rw-r--r-- | schemas/base.xsd | 3 | ||||
-rw-r--r-- | schemas/bundle.xsd | 129 | ||||
-rw-r--r-- | schemas/clients.xsd | 4 | ||||
-rw-r--r-- | schemas/defaults.xsd | 27 | ||||
-rw-r--r-- | schemas/info.xsd | 7 | ||||
-rw-r--r-- | schemas/metadata.xsd | 51 | ||||
-rw-r--r-- | schemas/packages.xsd | 7 | ||||
-rw-r--r-- | schemas/pathentry.xsd | 21 | ||||
-rw-r--r-- | schemas/pkgtype.xsd | 2 | ||||
-rw-r--r-- | schemas/rules.xsd | 113 | ||||
-rw-r--r-- | schemas/services.xsd | 33 | ||||
-rw-r--r-- | schemas/servicetype.xsd | 14 | ||||
-rw-r--r-- | schemas/types.xsd | 138 |
13 files changed, 299 insertions, 250 deletions
diff --git a/schemas/base.xsd b/schemas/base.xsd index cca665b38..98682fdb5 100644 --- a/schemas/base.xsd +++ b/schemas/base.xsd @@ -10,6 +10,7 @@ <xsd:include schemaLocation="atom.xsd"/> <xsd:include schemaLocation="pathentry.xsd"/> <xsd:include schemaLocation="rules.xsd"/> + <xsd:include schemaLocation="types.xsd"/> <xsd:group name='BaseEntries'> <xsd:choice> @@ -19,7 +20,7 @@ <xsd:element name='Path' type='PathEntry'/> <xsd:element name='Service' type='StructureEntry'/> <xsd:element name='BoundPackage' type='PackageType'/> - <xsd:element name='BoundPath' type='BoundPathEntry'/> + <xsd:element name='BoundPath' type='PathType'/> <xsd:element name='BoundService' type='ServiceType'/> </xsd:choice> </xsd:group> diff --git a/schemas/bundle.xsd b/schemas/bundle.xsd index 4e034ee3c..6306b6da4 100644 --- a/schemas/bundle.xsd +++ b/schemas/bundle.xsd @@ -16,10 +16,12 @@ <xsd:include schemaLocation="atom.xsd"/> <xsd:include schemaLocation="pathentry.xsd"/> <xsd:include schemaLocation="rules.xsd"/> - <xsd:include schemaLocation="services.xsd"/> + <xsd:include schemaLocation="types.xsd"/> + <xsd:include schemaLocation="servicetype.xsd"/> - <xsd:complexType name='GroupType'> - <xsd:choice minOccurs='0' maxOccurs='unbounded'> + <xsd:group name="bundleElements"> + <xsd:choice> + <xsd:group ref="py:genshiElements"/> <xsd:element name='Package' type='PackageStructure'> <xsd:annotation> <xsd:documentation> @@ -56,12 +58,20 @@ </xsd:documentation> </xsd:annotation> </xsd:element> + <xsd:element name='SELinux' type='SELinuxStructure'> + <xsd:annotation> + <xsd:documentation> + Abstract implementation of an SELinux entry. The + full specification will be included in Rules. + </xsd:documentation> + </xsd:annotation> + </xsd:element> <xsd:element name='PostInstall' type='StructureEntry'> <xsd:annotation> <xsd:documentation> PostInstall entries are deprecated in favor of Action - entries. Actions can do everything PostInstall entries can - do and more. + entries. Actions can do everything PostInstall entries can + do and more. </xsd:documentation> </xsd:annotation> </xsd:element> @@ -72,7 +82,7 @@ </xsd:documentation> </xsd:annotation> </xsd:element> - <xsd:element name='BoundPath' type='BoundPathEntry'> + <xsd:element name='BoundPath' type='PathType'> <xsd:annotation> <xsd:documentation> Fully bound description of a filesystem path to be handled @@ -94,6 +104,13 @@ </xsd:documentation> </xsd:annotation> </xsd:element> + <xsd:element name='BoundSELinux' type='SELinuxType'> + <xsd:annotation> + <xsd:documentation> + Fully bound description of an SELinux entry. + </xsd:documentation> + </xsd:annotation> + </xsd:element> <xsd:element name='Group' type='GroupType'> <xsd:annotation> <xsd:documentation> @@ -107,7 +124,7 @@ <xsd:annotation> <xsd:documentation> Elements within Client tags only apply to the named client - (or vice-versa; see #element_negate below) + (or vice-versa; see #element_negate below) </xsd:documentation> </xsd:annotation> </xsd:element> @@ -119,7 +136,12 @@ </xsd:documentation> </xsd:annotation> </xsd:element> - <xsd:group ref="py:genshiElements"/> + </xsd:choice> + </xsd:group> + + <xsd:complexType name='GroupType'> + <xsd:choice minOccurs='0' maxOccurs='unbounded'> + <xsd:group ref="bundleElements"/> </xsd:choice> <xsd:attribute type='xsd:string' name='name' use='required'> <xsd:annotation> @@ -140,96 +162,7 @@ <xsd:complexType name='BundleType'> <xsd:choice minOccurs='0' maxOccurs='unbounded'> - <xsd:element name='Package' type='PackageStructure'> - <xsd:annotation> - <xsd:documentation> - Abstract implementation of a Package entry. The full - specification will be generated by a plugin such as - Packages. - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='Path' type='PathEntry'> - <xsd:annotation> - <xsd:documentation> - Abstract implementation of a Path entry. The entry will - either be handled by Cfg, TGenshi, or another - DirectoryBacked plugin; or handled by Rules, in which case - the full specification of this entry will be included in - Rules. - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='Service' type='StructureEntry'> - <xsd:annotation> - <xsd:documentation> - Abstract implementation of a Service entry. The full - specification will be included in Rules. - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='Action' type='StructureEntry'> - <xsd:annotation> - <xsd:documentation> - Abstract implementation of an Action entry. The full - specification will be included in Rules. - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='BoundPackage' type='PackageType'> - <xsd:annotation> - <xsd:documentation> - Fully bound description of a software package to be managed. - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='BoundPath' type='BoundPathEntry'> - <xsd:annotation> - <xsd:documentation> - Fully bound description of a filesystem path to be handled - by the POSIX driver. - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='BoundService' type='ServiceType'> - <xsd:annotation> - <xsd:documentation> - Fully bound description of a system service to be managed. - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='BoundAction' type='ActionType'> - <xsd:annotation> - <xsd:documentation> - Fully bound description of a command to be run. - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='Group' type='GroupType'> - <xsd:annotation> - <xsd:documentation> - Elements within Group tags only apply to clients that are - members of that group - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='Client' type='GroupType'> - <xsd:annotation> - <xsd:documentation> - Elements within Client tags only apply to the named client - (or vice-versa; see #element_negate below) - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name='Bundle' type='BundleType'> - <xsd:annotation> - <xsd:documentation> - Nesting Bundle tags is allowed in order to support - XInclude within Bundles. - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:group ref="py:genshiElements"/> + <xsd:group ref="bundleElements"/> </xsd:choice> <xsd:attribute type='xsd:string' name='description' /> <xsd:attribute type='xsd:string' name='name'/> diff --git a/schemas/clients.xsd b/schemas/clients.xsd index 56f458a45..3b98c5fc3 100644 --- a/schemas/clients.xsd +++ b/schemas/clients.xsd @@ -26,9 +26,11 @@ <xsd:attribute type='xsd:string' name='uuid'/> <xsd:attribute type='xsd:string' name='password'/> <xsd:attribute type='xsd:string' name='location'/> - <xsd:attribute type='xsd:string' name='secure'/> + <xsd:attribute type='xsd:boolean' name='floating'/> + <xsd:attribute type='xsd:boolean' name='secure'/> <xsd:attribute type='xsd:string' name='pingtime' use='optional'/> <xsd:attribute type='xsd:string' name='address'/> + <xsd:attribute type='xsd:string' name='version'/> </xsd:complexType> <xsd:complexType name='ClientsType'> diff --git a/schemas/defaults.xsd b/schemas/defaults.xsd index c7e2edc7e..17ae84366 100644 --- a/schemas/defaults.xsd +++ b/schemas/defaults.xsd @@ -11,33 +11,6 @@ <xsd:include schemaLocation="types.xsd"/> <xsd:include schemaLocation="pkgtype.xsd"/> - <xsd:complexType name="ActionType"> - <xsd:attribute type="ActionTimingEnum" name="timing"/> - <xsd:attribute type="ActionWhenEnum" name="when"/> - <xsd:attribute type="ActionStatusEnum" name="status"/> - <xsd:attribute type="xsd:boolean" name="build"/> - <xsd:attribute type="xsd:string" name="name" use="required"/> - <xsd:attribute type="xsd:string" name="command"/> - </xsd:complexType> - - <xsd:complexType name="PathType"> - <xsd:attribute type="PathTypeEnum" name="type"/> - <xsd:attribute type="xsd:string" name="name" use="required"/> - <xsd:attribute type="xsd:string" name="dev_type"/> - <xsd:attribute type="xsd:string" name="major"/> - <xsd:attribute type="xsd:string" name="minor"/> - <xsd:attribute type="xsd:string" name="mode"/> - <xsd:attribute type="xsd:string" name="perms"/> - <xsd:attribute type="xsd:string" name="owner"/> - <xsd:attribute type="xsd:string" name="group"/> - <xsd:attribute type="xsd:string" name="recursive"/> - <xsd:attribute type="xsd:string" name="prune"/> - <xsd:attribute type="xsd:string" name="to"/> - <xsd:attribute type="xsd:string" name="vcstype"/> - <xsd:attribute type="xsd:string" name="revision"/> - <xsd:attribute type="xsd:string" name="sourceurl"/> - </xsd:complexType> - <xsd:complexType name="DContainerType"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="Service" type="ServiceType"/> diff --git a/schemas/info.xsd b/schemas/info.xsd index 37232ab23..862b758b2 100644 --- a/schemas/info.xsd +++ b/schemas/info.xsd @@ -1,5 +1,5 @@ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en"> - + <xsd:annotation> <xsd:documentation> info.xml schema for bcfg2 @@ -7,13 +7,18 @@ </xsd:annotation> <xsd:include schemaLocation="atom.xsd"/> + <xsd:include schemaLocation="types.xsd"/> <xsd:complexType name='InfoType'> + <xsd:choice minOccurs='0' maxOccurs='unbounded'> + <xsd:element name='ACL' type='ACLType'/> + </xsd:choice> <xsd:attribute name='encoding' type='xsd:string'/> <xsd:attribute name='group' type='xsd:string'/> <xsd:attribute name='important' type='xsd:string'/> <xsd:attribute name='owner' type='xsd:string'/> <xsd:attribute name='perms' type='xsd:string'/> + <xsd:attribute name='secontext' type='xsd:string'/> <xsd:attribute name='paranoid' type='xsd:boolean'/> <xsd:attribute name='sensitive' type='xsd:boolean'/> </xsd:complexType> diff --git a/schemas/metadata.xsd b/schemas/metadata.xsd index f79039d25..84d7436c9 100644 --- a/schemas/metadata.xsd +++ b/schemas/metadata.xsd @@ -1,6 +1,6 @@ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xi="http://www.w3.org/2001/XInclude" xml:lang="en"> - + <xsd:annotation> <xsd:documentation> metadata schema for bcfg2 @@ -13,38 +13,49 @@ <xsd:import namespace="http://www.w3.org/2001/XInclude" schemaLocation="xinclude.xsd"/> + <xsd:complexType name='bundleDeclaration'> + <xsd:attribute type='xsd:string' name='name' use='required'/> + </xsd:complexType> + <xsd:complexType name='groupType'> <xsd:choice minOccurs='0' maxOccurs='unbounded'> - <xsd:element name='Bundle'> - <xsd:complexType> - <xsd:attribute type='xsd:string' name='name' use='required'/> - </xsd:complexType> - </xsd:element> - <xsd:element name='Group' > - <xsd:complexType> - <xsd:attribute name='name' use='required'/> - </xsd:complexType> - </xsd:element> + <xsd:element name='Bundle' type='bundleDeclaration'/> + <xsd:element name='Group' type='groupType'/> + <xsd:element name='Client' type='clientType'/> + <xsd:element name='Groups' type='groupsType'/> + </xsd:choice> + <xsd:attribute type='xsd:string' name='name' use='required'/> + <xsd:attribute type='xsd:boolean' name='profile'/> + <xsd:attribute type='xsd:boolean' name='public'/> + <xsd:attribute type='xsd:boolean' name='default'/> + <xsd:attribute type='xsd:string' name='auth'/> + <xsd:attribute type='xsd:string' name='category'/> + <xsd:attribute type='xsd:string' name='comment'/> + <xsd:attribute type='xsd:string' name='negate'/> + </xsd:complexType> + + <xsd:complexType name='clientType'> + <xsd:choice minOccurs='0' maxOccurs='unbounded'> + <xsd:element name='Bundle' type='bundleDeclaration'/> + <xsd:element name='Group' type='groupType'/> + <xsd:element name='Client' type='clientType'/> + <xsd:element name='Groups' type='groupsType'/> </xsd:choice> - <xsd:attribute type='xsd:boolean' name='profile' use='optional'/> - <xsd:attribute type='xsd:boolean' name='public' use='optional'/> - <xsd:attribute type='xsd:boolean' name='default' use='optional'/> <xsd:attribute type='xsd:string' name='name' use='required'/> - <xsd:attribute type='xsd:string' name='auth' use='optional'/> - <xsd:attribute type='xsd:string' name='category' use='optional'/> - <xsd:attribute type='xsd:string' name='comment' use='optional'/> + <xsd:attribute type='xsd:string' name='negate'/> </xsd:complexType> <xsd:complexType name='groupsType'> <xsd:choice minOccurs='0' maxOccurs='unbounded'> <xsd:element name='Group' type='groupType'/> + <xsd:element name='Client' type='clientType'/> <xsd:element name='Groups' type='groupsType'/> <xsd:element ref="xi:include"/> </xsd:choice> <xsd:attribute name='version' type='xsd:string'/> - <xsd:attribute name='origin' type='xsd:string'/> - <xsd:attribute name='revision' type='xsd:string'/> - <xsd:attribute ref='xml:base'/> + <xsd:attribute name='origin' type='xsd:string'/> + <xsd:attribute name='revision' type='xsd:string'/> + <xsd:attribute ref='xml:base'/> </xsd:complexType> <xsd:element name='Groups' type='groupsType'/> diff --git a/schemas/packages.xsd b/schemas/packages.xsd index c29a85ecf..c4252194f 100644 --- a/schemas/packages.xsd +++ b/schemas/packages.xsd @@ -18,11 +18,18 @@ </xsd:restriction> </xsd:simpleType> + <xsd:complexType name="RepoOptionsType"> + <xsd:attribute type="xsd:boolean" name="serveronly"/> + <xsd:attribute type="xsd:boolean" name="clientonly"/> + <xsd:anyAttribute processContents="lax"/> + </xsd:complexType> + <xsd:complexType name="sourceType"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="Component" type="xsd:string"/> <xsd:element name="Arch" type="xsd:string"/> <xsd:element name="GPGKey" type="xsd:string"/> + <xsd:element name="Options" type="RepoOptionsType"/> <xsd:choice> <xsd:element name="Blacklist" type="xsd:string"/> <xsd:element name="Whitelist" type="xsd:string"/> diff --git a/schemas/pathentry.xsd b/schemas/pathentry.xsd index 080758d0b..e5d2ef6af 100644 --- a/schemas/pathentry.xsd +++ b/schemas/pathentry.xsd @@ -16,25 +16,4 @@ <xsd:attribute type='xsd:string' name='altsrc' use='optional'/> <xsd:attributeGroup ref="py:genshiAttrs"/> </xsd:complexType> - - <xsd:complexType name='BoundPathEntry'> - <xsd:attribute type='xsd:string' name='name' use='required'/> - <xsd:attribute type='xsd:string' name='group' use='optional'/> - <xsd:attribute type='xsd:string' name='important' use='optional'/> - <xsd:attribute type='xsd:string' name='owner' use='optional'/> - <xsd:attribute type='xsd:string' name='paranoid' use='optional'/> - <xsd:attribute type='xsd:string' name='perms' use='optional'/> - <xsd:attribute type='xsd:string' name='prune' use='optional'/> - <xsd:attribute type='xsd:string' name='recursive' use='optional'/> - <xsd:attribute type='xsd:string' name='sensitive' use='optional'/> - <xsd:attribute type='xsd:string' name='to' use='optional'/> - <xsd:attribute type='xsd:string' name='type' use='optional'/> - <!-- device attributes --> - <xsd:attribute type='xsd:string' name='dev_type' use='optional'/> - <xsd:attribute type='xsd:string' name='major' use='optional'/> - <xsd:attribute type='xsd:string' name='minor' use='optional'/> - <xsd:attribute type='xsd:string' name='mode' use='optional'/> - <!-- end device attributes --> - <xsd:attributeGroup ref="py:genshiAttrs"/> - </xsd:complexType> </xsd:schema> diff --git a/schemas/pkgtype.xsd b/schemas/pkgtype.xsd index 0aaea0c22..cbee6f317 100644 --- a/schemas/pkgtype.xsd +++ b/schemas/pkgtype.xsd @@ -42,7 +42,9 @@ </xsd:choice> <xsd:attribute type="xsd:string" name="name"/> <xsd:attribute type="xsd:string" name="group"/> + <xsd:attribute type="xsd:string" name="arch"/> <xsd:attribute type="xsd:string" name="version"/> + <xsd:attribute type="xsd:string" name="release"/> <xsd:attribute type="xsd:string" name="file"/> <xsd:attribute type="xsd:boolean" name="verify"/> <xsd:attribute type="xsd:string" name="simplefile"/> diff --git a/schemas/rules.xsd b/schemas/rules.xsd index 924792b18..2f4f805c0 100644 --- a/schemas/rules.xsd +++ b/schemas/rules.xsd @@ -14,66 +14,91 @@ <xsd:import namespace="http://genshi.edgewall.org/" schemaLocation="genshi.xsd"/> - <xsd:complexType name='ActionType'> - <xsd:attribute type='ActionTimingEnum' name='timing'/> - <xsd:attribute type='ActionWhenEnum' name='when'/> - <xsd:attribute type='ActionStatusEnum' name='status'/> - <xsd:attribute type="xsd:boolean" name="build"/> - <xsd:attribute type='xsd:string' name='name'/> - <xsd:attribute type='xsd:string' name='command'/> - <xsd:attributeGroup ref="py:genshiAttrs"/> - </xsd:complexType> - <xsd:complexType name='PostInstallType'> <xsd:attribute type='xsd:string' name='name' use='required'/> </xsd:complexType> - <xsd:complexType name='PathType'> - <xsd:attribute type='PathTypeEnum' name='type' use='required'/> - <xsd:attribute type='xsd:string' name='name' use='required'/> - <xsd:attribute type='xsd:string' name='dev_type'/> - <xsd:attribute type='xsd:string' name='major'/> - <xsd:attribute type='xsd:string' name='minor'/> - <xsd:attribute type='xsd:string' name='mode'/> - <xsd:attribute type='xsd:string' name='perms'/> - <xsd:attribute type='xsd:string' name='owner'/> - <xsd:attribute type='xsd:string' name='group'/> - <xsd:attribute type='xsd:string' name='recursive'/> - <xsd:attribute type='xsd:string' name='prune'/> - <xsd:attribute type='xsd:string' name='to'/> - <xsd:attribute type='xsd:string' name='vcstype'/> - <xsd:attribute type='xsd:string' name='revision'/> - <xsd:attribute type='xsd:string' name='sourceurl'/> - <xsd:attributeGroup ref="py:genshiAttrs"/> - </xsd:complexType> + <xsd:group name="rulesElements"> + <xsd:choice> + <xsd:group ref="py:genshiElements"/> + <xsd:element name='Package' type='PackageType'> + <xsd:annotation> + <xsd:documentation> + Fully bound description of a software package to be managed. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name='Path' type='PathType'> + <xsd:annotation> + <xsd:documentation> + Fully bound description of a filesystem path to be handled + by the POSIX driver. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name='Service' type='ServiceType'> + <xsd:annotation> + <xsd:documentation> + Fully bound description of a system service to be managed. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name='Action' type='ActionType'> + <xsd:annotation> + <xsd:documentation> + Fully bound description of a command to be run. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name='SELinux' type='SELinuxType'> + <xsd:annotation> + <xsd:documentation> + Fully bound description of an SELinux entry. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name='PostInstall' type='PostInstallType'> + <xsd:annotation> + <xsd:documentation> + PostInstall entries are deprecated in favor of Action + entries. Actions can do everything PostInstall entries can + do and more. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name='Group' type='RContainerType'> + <xsd:annotation> + <xsd:documentation> + Elements within Group tags only apply to clients that are + members of that group (or vice-versa; see #element_negate + below) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name='Client' type='RContainerType'> + <xsd:annotation> + <xsd:documentation> + Elements within Client tags only apply to the named client + (or vice-versa; see #element_negate below) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:choice> + </xsd:group> <xsd:complexType name='RContainerType'> <xsd:choice minOccurs='0' maxOccurs='unbounded'> - <xsd:element name='Service' type='ServiceType'/> - <xsd:element name='Package' type='PackageType'/> - <xsd:element name='Path' type='PathType'/> - <xsd:element name='Action' type='ActionType'/> - <xsd:element name='Group' type='RContainerType'/> - <xsd:element name='Client' type='RContainerType'/> - <xsd:group ref="py:genshiElements"/> + <xsd:group ref="rulesElements"/> </xsd:choice> <xsd:attribute name='name' type='xsd:string'/> <xsd:attribute name='negate' type='xsd:boolean'/> <xsd:attributeGroup ref="py:genshiAttrs"/> </xsd:complexType> - <xsd:element name='Rules'> <xsd:complexType> <xsd:choice minOccurs='0' maxOccurs='unbounded'> - <xsd:element name='Service' type='ServiceType'/> - <xsd:element name='Package' type='PackageType'/> - <xsd:element name='Path' type='PathType'/> - <xsd:element name='Action' type='ActionType'/> - <xsd:element name='PostInstall' type='PostInstallType'/> - <xsd:element name='Group' type='RContainerType'/> - <xsd:element name='Client' type='RContainerType'/> - <xsd:group ref="py:genshiElements"/> + <xsd:group ref="rulesElements"/> </xsd:choice> <xsd:attribute name='priority' type='xsd:integer' use='required'/> <xsd:attributeGroup ref="py:genshiAttrs"/> diff --git a/schemas/services.xsd b/schemas/services.xsd deleted file mode 100644 index b91e851d2..000000000 --- a/schemas/services.xsd +++ /dev/null @@ -1,33 +0,0 @@ -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en"> - - <xsd:annotation> - <xsd:documentation> - services schema for bcfg2 - Narayan Desai, Argonne National Laboratory - </xsd:documentation> - </xsd:annotation> - - <xsd:include schemaLocation="servicetype.xsd"/> - - <xsd:complexType name='ServiceContainerType'> - <xsd:choice minOccurs='0' maxOccurs='unbounded'> - <xsd:element name='Service' type='ServiceType'/> - <xsd:element name='Group' type='ServiceContainerType'/> - <xsd:element name='Client' type='ServiceContainerType'/> - </xsd:choice> - <xsd:attribute name='name' type='xsd:string'/> - <xsd:attribute name='negate' type='xsd:string'/> - </xsd:complexType> - - <xsd:element name='Services'> - <xsd:complexType> - <xsd:choice minOccurs='0' maxOccurs='unbounded'> - <xsd:element name='Service' type='ServiceType'/> - <xsd:element name='Group' type='ServiceContainerType'/> - <xsd:element name='Client' type='ServiceContainerType'/> - </xsd:choice> - <xsd:attribute name='priority' type='xsd:integer'/> - </xsd:complexType> - </xsd:element> - -</xsd:schema> diff --git a/schemas/servicetype.xsd b/schemas/servicetype.xsd index af5bc64a6..7de847c7f 100644 --- a/schemas/servicetype.xsd +++ b/schemas/servicetype.xsd @@ -12,6 +12,16 @@ <xsd:import namespace="http://genshi.edgewall.org/" schemaLocation="genshi.xsd"/> + <xsd:simpleType name='RestartEnum'> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='true'/> + <xsd:enumeration value='false'/> + <xsd:enumeration value='1'/> + <xsd:enumeration value='0'/> + <xsd:enumeration value='interactive'/> + </xsd:restriction> + </xsd:simpleType> + <xsd:complexType name="ServiceType"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="User"> @@ -24,13 +34,13 @@ </xsd:choice> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="status" type="StatusEnum"/> + <xsd:attribute name="restart" type="RestartEnum"/> + <xsd:attribute name="install" type="xsd:boolean"/> <xsd:attribute name="type" type="ServiceTypeEnum"/> <xsd:attribute name="port" type="xsd:string"/> <xsd:attribute name="protocol" type="xsd:string"/> - <xsd:attribute name="mode" type="xsd:string"/> <xsd:attribute name="custom" type="xsd:string"/> <xsd:attribute name="FMRI" type="xsd:string"/> - <xsd:attribute name="supervised" type="xsd:string"/> <xsd:attribute name="sequence" type="xsd:string"/> <xsd:attribute name="target" type="xsd:string"/> <xsd:attribute name="parameters" type="xsd:string"/> diff --git a/schemas/types.xsd b/schemas/types.xsd index ead377192..edbc8ad37 100644 --- a/schemas/types.xsd +++ b/schemas/types.xsd @@ -1,5 +1,6 @@ -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en"> - +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:py="http://genshi.edgewall.org/" xml:lang="en"> + <xsd:annotation> <xsd:documentation> string enumeration definitions for bcfg2 @@ -7,6 +8,9 @@ </xsd:documentation> </xsd:annotation> + <xsd:import namespace="http://genshi.edgewall.org/" + schemaLocation="genshi.xsd"/> + <xsd:simpleType name='PackageTypeEnum'> <xsd:restriction base='xsd:string'> <xsd:enumeration value='deb' /> @@ -86,4 +90,134 @@ </xsd:restriction> </xsd:simpleType> + <xsd:complexType name='ActionType'> + <xsd:attribute type='ActionTimingEnum' name='timing'/> + <xsd:attribute type='ActionWhenEnum' name='when'/> + <xsd:attribute type='ActionStatusEnum' name='status'/> + <xsd:attribute type="xsd:boolean" name="build"/> + <xsd:attribute type='xsd:string' name='name'/> + <xsd:attribute type='xsd:string' name='command'/> + <xsd:attributeGroup ref="py:genshiAttrs"/> + </xsd:complexType> + + <xsd:simpleType name="DeviceTypeEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="block"/> + <xsd:enumeration value="char"/> + <xsd:enumeration value="fifo"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="ACLTypeEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="default"/> + <xsd:enumeration value="access"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="ACLScopeEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="user"/> + <xsd:enumeration value="group"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="ACLType"> + <xsd:attribute type="ACLTypeEnum" name="type" use="required"/> + <xsd:attribute type="ACLScopeEnum" name="scope"/> + <xsd:attribute type="xsd:string" name="perms" use="required"/> + <xsd:attribute type="xsd:string" name="user"/> + <xsd:attribute type="xsd:string" name="group"/> + <xsd:attributeGroup ref="py:genshiAttrs"/> + </xsd:complexType> + + <xsd:complexType name="PathType"> + <xsd:choice minOccurs='0' maxOccurs='unbounded'> + <xsd:element name='ACL' type='ACLType'/> + </xsd:choice> + <xsd:attribute type="PathTypeEnum" name="type"/> + <xsd:attribute type="xsd:string" name="name" use="required"/> + <xsd:attribute type="DeviceTypeEnum" name="dev_type"/> + <xsd:attribute type="xsd:integer" name="major"/> + <xsd:attribute type="xsd:integer" name="minor"/> + <xsd:attribute type="xsd:string" name="perms"/> + <xsd:attribute type="xsd:string" name="owner"/> + <xsd:attribute type="xsd:string" name="group"/> + <xsd:attribute type="xsd:string" name="secontext"/> + <xsd:attribute type="xsd:string" name="recursive"/> + <xsd:attribute type="xsd:string" name="prune"/> + <xsd:attribute type="xsd:string" name="to"/> + <xsd:attribute type="xsd:string" name="vcstype"/> + <xsd:attribute type="xsd:string" name="revision"/> + <xsd:attribute type="xsd:string" name="sourceurl"/> + <xsd:attributeGroup ref="py:genshiAttrs"/> + </xsd:complexType> + + <xsd:simpleType name='SELinuxTypeEnum'> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='boolean'/> + <xsd:enumeration value='module'/> + <xsd:enumeration value='port'/> + <xsd:enumeration value='fcontext'/> + <xsd:enumeration value='node'/> + <xsd:enumeration value='login'/> + <xsd:enumeration value='user'/> + <xsd:enumeration value='interface'/> + <xsd:enumeration value='permissive'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name='SELinuxFileTypeEnum'> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='all'/> + <xsd:enumeration value='regular'/> + <xsd:enumeration value='directory'/> + <xsd:enumeration value='symlink'/> + <xsd:enumeration value='pipe'/> + <xsd:enumeration value='socket'/> + <xsd:enumeration value='block'/> + <xsd:enumeration value='char'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name='SELinuxBooleanValueEnum'> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='on'/> + <xsd:enumeration value='off'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name='SELinuxEntryTypeEnum'> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='boolean'/> + <xsd:enumeration value='module'/> + <xsd:enumeration value='port'/> + <xsd:enumeration value='fcontext'/> + <xsd:enumeration value='node'/> + <xsd:enumeration value='login'/> + <xsd:enumeration value='user'/> + <xsd:enumeration value='interface'/> + <xsd:enumeration value='permissive'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="SELinuxStructure"> + <xsd:attribute type='xsd:string' name='name' use='required'/> + <xsd:attribute type="xsd:boolean" name="disabled"/> + <xsd:attributeGroup ref="py:genshiAttrs"/> + </xsd:complexType> + + <xsd:complexType name="SELinuxType"> + <xsd:attribute type="xsd:string" name="name" use="required"/> + <xsd:attribute type="SELinuxEntryTypeEnum" name="type" use="required"/> + <xsd:attribute type="SELinuxBooleanValueEnum" name="value"/> + <xsd:attribute type="xsd:boolean" name="disabled"/> + <xsd:attribute type="xsd:string" name="selinuxtype"/> + <xsd:attribute type="SELinuxFileTypeEnum" name="filetype"/> + <xsd:attribute type="xsd:string" name="proto"/> + <xsd:attribute type="xsd:string" name="roles"/> + <xsd:attribute type="xsd:string" name="prefix"/> + <xsd:attribute type="xsd:string" name="selinuxuser"/> + <xsd:attributeGroup ref="py:genshiAttrs"/> + </xsd:complexType> </xsd:schema> |