diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:53:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:53:20 +0000 |
commit | e5a812082ae033afb1eed82c0f2df3d0f6bdc93f (patch) | |
tree | a6716c9275b4b413f6c9194798b34b91affb3cc7 /xml/api/crm_resource-2.6.rng | |
parent | Initial commit. (diff) | |
download | pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.tar.xz pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.zip |
Adding upstream version 2.1.6.upstream/2.1.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xml/api/crm_resource-2.6.rng')
-rw-r--r-- | xml/api/crm_resource-2.6.rng | 238 |
1 files changed, 238 insertions, 0 deletions
diff --git a/xml/api/crm_resource-2.6.rng b/xml/api/crm_resource-2.6.rng new file mode 100644 index 0000000..b49e24c --- /dev/null +++ b/xml/api/crm_resource-2.6.rng @@ -0,0 +1,238 @@ +<?xml version="1.0" encoding="UTF-8"?> +<grammar xmlns="http://relaxng.org/ns/structure/1.0" + datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> + + <start> + <ref name="element-crm-resource"/> + </start> + + <define name="element-crm-resource"> + <choice> + <ref name="agents-list" /> + <ref name="alternatives-list" /> + <ref name="constraints-list" /> + <externalRef href="generic-list-2.4.rng"/> + <element name="metadata"> <text/> </element> + <ref name="locate-list" /> + <ref name="operations-list" /> + <ref name="providers-list" /> + <ref name="reasons-list" /> + <ref name="resource-check" /> + <ref name="resource-config" /> + <ref name="resources-list" /> + </choice> + </define> + + <define name="agents-list"> + <element name="agents"> + <attribute name="standard"> <text/> </attribute> + <optional> + <attribute name="provider"> <text/> </attribute> + </optional> + <zeroOrMore> + <element name="agent"> <text/> </element> + </zeroOrMore> + </element> + </define> + + <define name="alternatives-list"> + <element name="providers"> + <attribute name="for"> <text/> </attribute> + <zeroOrMore> + <element name="provider"> <text/> </element> + </zeroOrMore> + </element> + </define> + + <define name="constraints-list"> + <element name="constraints"> + <interleave> + <zeroOrMore> + <ref name="rsc-location" /> + </zeroOrMore> + <zeroOrMore> + <ref name="rsc-colocation" /> + </zeroOrMore> + </interleave> + </element> + </define> + + <define name="locate-list"> + <element name="nodes"> + <attribute name="resource"> <text/> </attribute> + <zeroOrMore> + <element name="node"> + <optional> + <attribute name="state"><value>promoted</value></attribute> + </optional> + <text/> + </element> + </zeroOrMore> + </element> + </define> + + <define name="rsc-location"> + <element name="rsc_location"> + <attribute name="node"> <text/> </attribute> + <attribute name="rsc"> <text/> </attribute> + <attribute name="id"> <text/> </attribute> + <externalRef href="../score.rng"/> + </element> + </define> + + <define name="operations-list"> + <element name="operations"> + <oneOrMore> + <ref name="element-operation-list" /> + </oneOrMore> + </element> + </define> + + <define name="providers-list"> + <element name="providers"> + <attribute name="standard"> <value>ocf</value> </attribute> + <optional> + <attribute name="agent"> <text/> </attribute> + </optional> + <zeroOrMore> + <element name="provider"> <text/> </element> + </zeroOrMore> + </element> + </define> + + <define name="reasons-list"> + <choice> + <ref name="no-resource-or-uname"/> + <ref name="resource-and-uname"/> + <ref name="no-resource-but-uname"/> + <ref name="resource-but-no-uname"/> + </choice> + </define> + + <define name="no-resource-or-uname"> + <element name="reason"> + <element name="resources"> + <zeroOrMore> + <element name="resource"> + <attribute name="id"> <text/> </attribute> + <attribute name="running"> <data type="boolean"/> </attribute> + <ref name="resource-check"/> + </element> + </zeroOrMore> + </element> + </element> + </define> + + <define name="resource-and-uname"> + <element name="reason"> + <attribute name="running_on"> <text/> </attribute> + <ref name="resource-check"/> + </element> + </define> + + <define name="no-resource-but-uname"> + <element name="reason"> + <element name="resources"> + <zeroOrMore> + <element name="resource"> + <attribute name="id"> <text/> </attribute> + <attribute name="running"> <data type="boolean"/> </attribute> + <attribute name="host"> <text/> </attribute> + <ref name="resource-check"/> + </element> + </zeroOrMore> + </element> + </element> + </define> + + <define name="resource-but-no-uname"> + <element name="reason"> + <attribute name="running"> <data type="boolean"/> </attribute> + <ref name="resource-check"/> + </element> + </define> + + <define name="resource-config"> + <element name="resource_config"> + <externalRef href="resources-2.4.rng" /> + <element name="xml"> <text/> </element> + </element> + </define> + + <define name="resource-check"> + <element name="check"> + <attribute name="id"> <text/> </attribute> + <optional> + <choice> + <attribute name="remain_stopped"><value>true</value></attribute> + <attribute name="promotable"><value>false</value></attribute> + </choice> + </optional> + <optional> + <attribute name="unmanaged"><value>true</value></attribute> + </optional> + <optional> + <attribute name="locked-to"> <text/> </attribute> + </optional> + </element> + </define> + + <define name="resources-list"> + <element name="resources"> + <zeroOrMore> + <externalRef href="resources-2.4.rng" /> + </zeroOrMore> + </element> + </define> + + <define name="rsc-colocation"> + <element name="rsc_colocation"> + <attribute name="id"> <text/> </attribute> + <attribute name="rsc"> <text/> </attribute> + <attribute name="with-rsc"> <text/> </attribute> + <externalRef href="../score.rng"/> + <optional> + <attribute name="node-attribute"> <text/> </attribute> + </optional> + <optional> + <attribute name="rsc-role"> + <ref name="attribute-roles"/> + </attribute> + </optional> + <optional> + <attribute name="with-rsc-role"> + <ref name="attribute-roles"/> + </attribute> + </optional> + </element> + </define> + + <define name="element-operation-list"> + <element name="operation"> + <optional> + <group> + <attribute name="rsc"> <text/> </attribute> + <attribute name="agent"> <text/> </attribute> + </group> + </optional> + <attribute name="op"> <text/> </attribute> + <attribute name="node"> <text/> </attribute> + <attribute name="call"> <data type="nonNegativeInteger" /> </attribute> + <attribute name="rc"> <data type="nonNegativeInteger" /> </attribute> + <optional> + <attribute name="last-rc-change"> <text/> </attribute> + <attribute name="exec-time"> <data type="nonNegativeInteger" /> </attribute> + </optional> + <attribute name="status"> <text/> </attribute> + </element> + </define> + + <define name="attribute-roles"> + <choice> + <value>Stopped</value> + <value>Started</value> + <value>Master</value> + <value>Slave</value> + </choice> + </define> +</grammar> |