diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2013-02-19 20:03:04 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2013-02-19 20:03:04 +0100 |
commit | 3f0c58a053b8a0d4542a2826726f5fd5737f9644 (patch) | |
tree | 844cf71a5d61d1a63c17a8c90a18a0b20dcdaaf2 | |
parent | 8de8ddf662b66434d8b575f380ea6e4b598fb11c (diff) | |
download | rnc2rng-3f0c58a053b8a0d4542a2826726f5fd5737f9644.tar.gz rnc2rng-3f0c58a053b8a0d4542a2826726f5fd5737f9644.tar.xz rnc2rng-3f0c58a053b8a0d4542a2826726f5fd5737f9644.zip |
Adjust corosync testcase respectively.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r-- | corosync.rnc | 14 | ||||
-rw-r--r-- | corosync.rng.expected | 72 | ||||
-rw-r--r-- | rnc_tokenize.py | 5 |
3 files changed, 46 insertions, 45 deletions
diff --git a/corosync.rnc b/corosync.rnc index 96baaff..73ebff2 100644 --- a/corosync.rnc +++ b/corosync.rnc @@ -10,7 +10,7 @@ namespace a4doc = "http://people.redhat.com/jpokorny/ns/a4doc" start = corosync corosync = -element corosync { + element corosync { (logging? & nodelist? & resources? @@ -19,7 +19,7 @@ element corosync { & uidgid?) } -# LOGGING ##################################################################### +# LOGGING ############################################################# # only named set of attributes common_logging = @@ -154,7 +154,7 @@ logger_subsys = common_logging } -# NODELIST #################################################################### +# NODELIST ############################################################ nodelist = ## In this configuration section, one can @@ -196,7 +196,7 @@ node = # NOTE: Augeas lens for corosync.conf counts on X = 0..9 only } -# QUORUM ###################################################################### +# QUORUM ############################################################## quorum = ## In this configuration section, one can @@ -253,7 +253,7 @@ quorum = attribute wait_for_all {"0"|"1"}? } -# RESOURCES ################################################################### +# RESOURCES ########################################################### # only named set of attributes common_resource = @@ -287,7 +287,7 @@ resources = system? } -# TOTEM ####################################################################### +# TOTEM ############################################################### totem = ## In this configuration section, one can @@ -719,7 +719,7 @@ interface = attribute ttl {xsd:unsignedByte}? } -# UIDGID ###################################################################### +# UIDGID ############################################################## uidgid = element uidgid { diff --git a/corosync.rng.expected b/corosync.rng.expected index 9aac379..b786e16 100644 --- a/corosync.rng.expected +++ b/corosync.rng.expected @@ -35,7 +35,7 @@ </interleave> </element> </define> - <!-- LOGGING ##################################################################### --> + <!-- LOGGING ############################################################# --> <!-- only named set of attributes --> <define name="common_logging"> <optional> @@ -61,7 +61,7 @@ which is highest level of debug messages.</a:documentation> </optional> <optional> <attribute name="logfile_priority" a:defaultValue="info" - a4doc:hint=" + a4doc:hint="
 Value 'debug' is the same as if *debug* is 'on'."> <a:documentation>This specifies the logfile level for this particular subsystem. Ignored if *debug* is 'on'.</a:documentation> @@ -98,7 +98,7 @@ that will be used for any messages sent to syslog.</a:documentation> </optional> <optional> <attribute name="syslog_priority" a:defaultValue="info" - a4doc:hint=" + a4doc:hint="
 Value 'debug' is the same as if *debug* is 'on'."> <a:documentation>This specifies the syslog level for this particular subsystem. Ignored if *debug* is 'on'.</a:documentation> @@ -228,7 +228,7 @@ a service in the `log_init` call, e.g., 'CPG'.</a:documentation> </group> </element> </define> - <!-- NODELIST #################################################################### --> + <!-- NODELIST ############################################################ --> <define name="nodelist"> <element name="nodelist"> <a:documentation>In this configuration section, one can @@ -303,7 +303,7 @@ as denoted by its number (instead 0, there can be higher numbers).</a:documentat <!-- NOTE: Augeas lens for corosync.conf counts on X = 0..9 only --> </element> </define> - <!-- QUORUM ###################################################################### --> + <!-- QUORUM ############################################################## --> <define name="quorum"> <element name="quorum"> <a:documentation>In this configuration section, one can @@ -398,7 +398,7 @@ As of now, only 'corosync_votequorum' is supported.</a:documentation> </group> </element> </define> - <!-- RESOURCES ################################################################### --> + <!-- RESOURCES ########################################################### --> <!-- only named set of attributes --> <define name="common_resource"> <optional> @@ -458,7 +458,7 @@ As of now, only 'corosync_votequorum' is supported.</a:documentation> </optional> </element> </define> - <!-- TOTEM ####################################################################### --> + <!-- TOTEM ############################################################### --> <define name="totem"> <element name="totem"> <a:documentation>In this configuration section, one can @@ -466,8 +466,8 @@ adjust totem protocol.</a:documentation> <group> <optional> <attribute name="clear_node_high_bit" a:defaultValue="no" - a4doc:discretion-hint=" - The clusters behavior is undefined if this option is enabled on only + a4doc:discretion-hint="
 + The clusters behavior is undefined if this option is enabled on only
 a subset of the cluster (for example during a rolling upgrade)."> <a:documentation>This configuration option is only relevant when no *nodeid* option within *nodelist* section is specified. Some @@ -608,8 +608,8 @@ detection. Zero disables the mechanism.</a:documentation> </optional> <optional> <attribute name="hold" a:defaultValue="180" - a4doc:danger-hint=" - It is not recommended to override this value without guidance from + a4doc:danger-hint="
 + It is not recommended to override this value without guidance from
 the corosync community."> <a:documentation>This timeout specifies in milliseconds how long the token should be held by the representative when @@ -670,21 +670,21 @@ The default setting works well for nearly all modern switches.</a:documentation> </optional> <optional> <attribute name="netmtu" a:defaultValue="1500" - a4doc:discretion-hint=" - While some NICs or switches claim large frame support, they support - 9000 MTU as the maximum frame size including the IP header. Setting - the *netmtu* and host MTUs to '9000' will cause totem to use the full - 9000 bytes of the frame. Then Linux will add an 18byte header moving - the full frame size to 9018. As a result some hardware will not - operate properly with this size of data. A *netmtu* of '8982' seems - to work for the few large frame devices that have been tested. - Some manufacturers claim large frame support when in fact they - support frame sizes of 4500 bytes. - - When sending multicast traffic, if the network frequently - reconfigures, chances are that some device in the network doesn't - support large frames. - + a4doc:discretion-hint="
 + While some NICs or switches claim large frame support, they support
 + 9000 MTU as the maximum frame size including the IP header. Setting
 + the *netmtu* and host MTUs to '9000' will cause totem to use the full
 + 9000 bytes of the frame. Then Linux will add an 18byte header moving
 + the full frame size to 9018. As a result some hardware will not
 + operate properly with this size of data. A *netmtu* of '8982' seems
 + to work for the few large frame devices that have been tested.
 + Some manufacturers claim large frame support when in fact they
 + support frame sizes of 4500 bytes.
 +
 + When sending multicast traffic, if the network frequently
 + reconfigures, chances are that some device in the network doesn't
 + support large frames.
 +
 Choose hardware carefully if intending to use large frame support."> <a:documentation>This specifies the network maximum transmit unit. Setting this value beyond '1500', the regular frame MTU, requires @@ -779,8 +779,8 @@ to ensure a link is not marked faulty for transient network failures.</a:documen </optional> <optional> <attribute name="rrp_token_expired_timeout" a:defaultValue="47" - a4doc:danger-hint=" - It is not recommended to override this value without guidance from + a4doc:danger-hint="
 + It is not recommended to override this value without guidance from
 the corosync community."> <a:documentation>This specifies the time in milliseconds to increment the problem counter for the redundant ring protocol after @@ -794,8 +794,8 @@ and *problem_count_threshold* but may be overridden.</a:documentation> </optional> <optional> <attribute name="secauth" a:defaultValue="on" - a4doc:deprecation-hint=" - It's recomended to use combination of *crypto_cipher* and *crypto_hash* + a4doc:deprecation-hint="
 + It's recomended to use combination of *crypto_cipher* and *crypto_hash*
 instead."> <a:documentation>This specifies that HMAC/SHA1 authentication should be used to authenticate all messages. It further @@ -817,8 +817,8 @@ authentication consume extra CPU cycles in corosync.</a:documentation> </optional> <optional> <attribute name="send_join" a:defaultValue="0" - a4doc:danger-hint=" - Seek advice from the corosync mailing list if trying to run larger + a4doc:danger-hint="
 + Seek advice from the corosync mailing list if trying to run larger
 configurations."> <a:documentation>This timeout specifies in milliseconds an upper range between 0 and *send_join* to wait before sending a join @@ -860,8 +860,8 @@ about 50 milliseconds in addition to this timeout.</a:documentation> </optional> <optional> <attribute name="token_retransmit" a:defaultValue="238" - a4doc:danger-hint=" - It is not recommended to override this value without guidance from + a4doc:danger-hint="
 + It is not recommended to override this value without guidance from
 the corosync community."> <a:documentation>This timeout specifies a period in milliseconds without receiving a token after which the token is @@ -1028,7 +1028,7 @@ The *ringnumber* must start at '0'.</a:documentation> </optional> <optional> <attribute name="ttl" a:defaultValue="1" - a4doc:dicretion-hint=" + a4doc:dicretion-hint="
 This is only valid on multicast transport types."> <a:documentation>This specifies the Time To Live (TTL). If you run your cluster on a routed network, the default of '1' will @@ -1044,7 +1044,7 @@ The valid range is '0..255'.</a:documentation> </group> </element> </define> - <!-- UIDGID ###################################################################### --> + <!-- UIDGID ############################################################## --> <define name="uidgid"> <element name="uidgid"> <group> diff --git a/rnc_tokenize.py b/rnc_tokenize.py index 0c614fc..677741d 100644 --- a/rnc_tokenize.py +++ b/rnc_tokenize.py @@ -198,9 +198,10 @@ t_INCLUDE.__doc__ = r'include\s*"' + NCName + '"' def t_LITERAL(t): r'''(?msx)(?P<start>(?P<start1>["'])(?:(?P=start1){2})?).*?(?P=start) (?:\s*[~]\s*(?:['"]{1,3}).*?(?:['"]{1,3}))*''' - #r'".+?"(?:\s*[~]\s*".+?")*' - #r'''(["'])(\1{2})?.*?\1\2(?:\s*[~]\s*\1\2.?*\1\2)*''' t.value = ' '.join(i.rstrip("\n").strip(' "') for i in t.value.split('~')) + # this is a little hack to enforce new-lines in XML attributes, + # not present at trang + t.value = t.value.replace("\n", "
\n") return t |