diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-10-24 15:54:47 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-11-14 22:07:58 +0100 |
commit | 4b8371eeac7227969081ae471a88ee431f785931 (patch) | |
tree | 0f88d0a7a5b24639e4a41d90e58e19d037ed3124 | |
parent | 08319188592341020c74f7a98f9e1cda705c6afa (diff) | |
download | clufter-4b8371eeac7227969081ae471a88ee431f785931.tar.gz clufter-4b8371eeac7227969081ae471a88ee431f785931.tar.xz clufter-4b8371eeac7227969081ae471a88ee431f785931.zip |
filters/ccsflat2pcsprelude[postgres-8]: fix lost functionality
(ex-post sanitize "new command/cluster.conf analysis" commit, vol. 2)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r-- | filters/cluster/rm/postgres-8/__init__.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/filters/cluster/rm/postgres-8/__init__.py b/filters/cluster/rm/postgres-8/__init__.py index fa41109..fb61202 100644 --- a/filters/cluster/rm/postgres-8/__init__.py +++ b/filters/cluster/rm/postgres-8/__init__.py @@ -10,3 +10,46 @@ ccs_artefacts = ''.join(( artefact_cond_ra('@config_file', kind='A', desc='configuration file'), )) + +### + +from ...utils_cib import ResourceSpec + +ccsflat2pcsprelude = '''\ + <!-- + pgsql ~ postgres-8 + --> + <xsl:when test="name() = 'postgres-8'"> +''' + \ + ResourceSpec('ocf:heartbeat:pgsql').xsl_attrs \ ++ ''' + <!-- INSTANCE_ATTRIBUTES --> + <instance_attributes id="{concat($Prefix, '-ATTRS')}"> + <!-- config ~ config_file --> + <nvpair id="{concat($Prefix, '-ATTRS-config')}" + name="config" + value="{@config_file}"/> + <!-- start_opt ~ postmaster_options --> + <xsl:if test="postmaster_options"> + <nvpair id="{concat($Prefix, '-ATTRS-config')}" + name="start_opt" + value="{@postmaster_options}"/> + </xsl:if> + <!-- pgdba ~ postmaster_user --> + <xsl:if test="postmaster_user"> + <nvpair id="{concat($Prefix, '-ATTRS-config')}" + name="pgdba" + value="{@postmaster_user}"/> + </xsl:if> + <!-- pgdba ~ postmaster_user --> + <xsl:if test="postmaster_user"> + <nvpair id="{concat($Prefix, '-ATTRS-config')}" + name="pgdba" + value="{@postmaster_user}"/> + </xsl:if> + <!-- XXX some items from postmaster_options could be + re-parsed into respective RA params + (-h $OCF_RESKEY_pghost) --> + </instance_attributes> + </xsl:when> +''' |