da97433d5cd26e422a370d186f98659383c06721csovant<?xml version="1.0" encoding="UTF-8" standalone="no"?>
da97433d5cd26e422a370d186f98659383c06721csovant<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
da97433d5cd26e422a370d186f98659383c06721csovant<!--
da97433d5cd26e422a370d186f98659383c06721csovant ! CDDL HEADER START
da97433d5cd26e422a370d186f98659383c06721csovant !
da97433d5cd26e422a370d186f98659383c06721csovant ! The contents of this file are subject to the terms of the
da97433d5cd26e422a370d186f98659383c06721csovant ! Common Development and Distribution License, Version 1.0 only
da97433d5cd26e422a370d186f98659383c06721csovant ! (the "License"). You may not use this file except in compliance
da97433d5cd26e422a370d186f98659383c06721csovant ! with the License.
da97433d5cd26e422a370d186f98659383c06721csovant !
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! or http://forgerock.org/license/CDDLv1.0.html.
da97433d5cd26e422a370d186f98659383c06721csovant ! See the License for the specific language governing permissions
da97433d5cd26e422a370d186f98659383c06721csovant ! and limitations under the License.
da97433d5cd26e422a370d186f98659383c06721csovant !
da97433d5cd26e422a370d186f98659383c06721csovant ! When distributing Covered Code, include this CDDL HEADER in each
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! file and include the License file at legal-notices/CDDLv1_0.txt.
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! If applicable, add the following below this CDDL HEADER, with the
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! fields enclosed by brackets "[]" replaced with your own identifying
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! information:
da97433d5cd26e422a370d186f98659383c06721csovant ! Portions Copyright [yyyy] [name of copyright owner]
da97433d5cd26e422a370d186f98659383c06721csovant !
da97433d5cd26e422a370d186f98659383c06721csovant ! CDDL HEADER END
da97433d5cd26e422a370d186f98659383c06721csovant !
2b68af05b4308b32506f1d68f6357cdc458869d7ludovicp ! Copyright 2009-2010 Sun Microsystems, Inc.
004a0de820f70c99337ff8270d52950808da24f9gary.williams ! Portions Copyright 2012-2014 ForgeRock AS.
da97433d5cd26e422a370d186f98659383c06721csovant ! -->
da97433d5cd26e422a370d186f98659383c06721csovant<stax>
da97433d5cd26e422a370d186f98659383c06721csovant <function name="get-fractional-replication-attributes" scope="local">
da97433d5cd26e422a370d186f98659383c06721csovant <function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant get the fractional-replication properties
da97433d5cd26e422a370d186f98659383c06721csovant </function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant <function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="replicationDomain" type="required">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant replication Domain name
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="string"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="server" type="required">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant target server
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant </function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <message level="'debug'">
da97433d5cd26e422a370d186f98659383c06721csovant 'calling get-fractional-replication-attributes(%s,%s)' % (replicationDomain,server)
da97433d5cd26e422a370d186f98659383c06721csovant </message>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant domainOpt = ' -s --domain-name "%s"' % replicationDomain
da97433d5cd26e422a370d186f98659383c06721csovant includeOpt = ' --property fractional-include'
da97433d5cd26e422a370d186f98659383c06721csovant excludeOpt = ' --property fractional-exclude'
da97433d5cd26e422a370d186f98659383c06721csovant expRC = 0
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <call function="'dsconfig'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : '%s/%s' \
da97433d5cd26e422a370d186f98659383c06721csovant % (server.getDir(),OPENDSNAME),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceHost' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceAdminPort' : server.getAdminPort(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceDn' : server.getRootDn(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePswd' : server.getRootPwd(),
da97433d5cd26e422a370d186f98659383c06721csovant 'subcommand' : 'get-replication-domain-prop',
da97433d5cd26e422a370d186f98659383c06721csovant 'objectType' : 'provider-name',
da97433d5cd26e422a370d186f98659383c06721csovant 'objectName' : 'Multimaster Synchronization',
da97433d5cd26e422a370d186f98659383c06721csovant 'optionsString' : domainOpt + includeOpt + excludeOpt,
da97433d5cd26e422a370d186f98659383c06721csovant 'expectedRC' : expRC,
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant <message level="'debug'">
da97433d5cd26e422a370d186f98659383c06721csovant '%s fractional-replication attributes\n%s' % (replicationDomain,STAXResult)
da97433d5cd26e422a370d186f98659383c06721csovant </message>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant retDict = {}
da97433d5cd26e422a370d186f98659383c06721csovant retRC = 0
da97433d5cd26e422a370d186f98659383c06721csovant try:
da97433d5cd26e422a370d186f98659383c06721csovant for l in STAXResult[0][1].splitlines():
da97433d5cd26e422a370d186f98659383c06721csovant lc = l.split('\t')
da97433d5cd26e422a370d186f98659383c06721csovant if lc[0] in fractionalTypes:
da97433d5cd26e422a370d186f98659383c06721csovant if len(lc) > 1:
da97433d5cd26e422a370d186f98659383c06721csovant retDict.update({lc[0]:[i.strip() for i in lc[1:]]})
da97433d5cd26e422a370d186f98659383c06721csovant else:
da97433d5cd26e422a370d186f98659383c06721csovant retDict.update({lc[0]:''})
da97433d5cd26e422a370d186f98659383c06721csovant else:
da97433d5cd26e422a370d186f98659383c06721csovant continue
da97433d5cd26e422a370d186f98659383c06721csovant except :
da97433d5cd26e422a370d186f98659383c06721csovant retRC = 1
da97433d5cd26e422a370d186f98659383c06721csovant retDict = None
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <return>(retRC, retDict)</return>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </function>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant <function name="set-fractional-replication-attributes" scope="local">
da97433d5cd26e422a370d186f98659383c06721csovant <function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant set the fractional-replication properties
da97433d5cd26e422a370d186f98659383c06721csovant </function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant <function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="replicationDomain" type="required">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant replication Domain name
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="string"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="server" type="required">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant target server
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="include" type="optional" default="None">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant fractional-include String
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="string"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="exclude" type="optional" default="None">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant fractional-exclude String
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="string"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant </function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant domainOpt = ' --domain-name "%s"' % replicationDomain
da97433d5cd26e422a370d186f98659383c06721csovant includeOpt = (' --set fractional-include:%s' % include, '')[include != None]
da97433d5cd26e422a370d186f98659383c06721csovant excludeOpt = (' --set fractional-exclude:%s' % exclude, '')[exclude != None]
da97433d5cd26e422a370d186f98659383c06721csovant expRC = expectedRC
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <call function="'dsconfig'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : '%s/%s' \
da97433d5cd26e422a370d186f98659383c06721csovant % (server.getDir(),OPENDSNAME),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceHost' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceAdminPort' : server.getAdminPort(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceDn' : server.getRootDn(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePswd' : server.getRootPwd(),
da97433d5cd26e422a370d186f98659383c06721csovant 'subcommand' : 'set-replication-domain-prop',
da97433d5cd26e422a370d186f98659383c06721csovant 'objectType' : 'provider-name',
da97433d5cd26e422a370d186f98659383c06721csovant 'objectName' : 'Multimaster Synchronization',
da97433d5cd26e422a370d186f98659383c06721csovant 'optionsString' : domainOpt + includeOpt + excludeOpt,
da97433d5cd26e422a370d186f98659383c06721csovant 'expectedRC' : expRC,
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant <message level="'debug'">
da97433d5cd26e422a370d186f98659383c06721csovant 'reseting %s fractional-replication attributes' % replicationDomain
da97433d5cd26e422a370d186f98659383c06721csovant </message>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </function>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant <function name="set-ops-fractional-replication-attributes" scope="local">
da97433d5cd26e422a370d186f98659383c06721csovant <function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant set the fractional-replication properties
da97433d5cd26e422a370d186f98659383c06721csovant </function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant <function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="replicationDomain" type="required">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant replication Domain name
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="string"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="server" type="required">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant target server
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="include" type="optional" default="[]">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant fractional-include operations list [add/remove/set/reset]
da97433d5cd26e422a370d186f98659383c06721csovant expected List of tuples (op,string) such as :
da97433d5cd26e422a370d186f98659383c06721csovant [('add','*:jpegPhoto'),('remove','inetOrgPerson')]
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="list"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="exclude" type="optional" default="[]">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant fractional-exclude operations list [add/remove/set/reset]
da97433d5cd26e422a370d186f98659383c06721csovant expected List of tuples (op,string) such as :
da97433d5cd26e422a370d186f98659383c06721csovant [('add','*:jpegPhoto'),('remove','inetOrgPerson')]
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="list"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="expectedRC" type="optional" default="0">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant expected RC
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="int"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="knownIssue" type="optional">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant potential known issue
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="string"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant </function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant validOps = ['add','remove','reset','set']
da97433d5cd26e422a370d186f98659383c06721csovant domainOpt = ' --domain-name "%s"' % replicationDomain
da97433d5cd26e422a370d186f98659383c06721csovant includeOpt = ''
da97433d5cd26e422a370d186f98659383c06721csovant if include:
da97433d5cd26e422a370d186f98659383c06721csovant for i in include:
da97433d5cd26e422a370d186f98659383c06721csovant if validOps.index(i[0]) == -1:
da97433d5cd26e422a370d186f98659383c06721csovant raise Exception("invalid include argument [%s]" % include)
da97433d5cd26e422a370d186f98659383c06721csovant elif i[0] == "reset":
da97433d5cd26e422a370d186f98659383c06721csovant includeOpt += ' --%s fractional-include' % i[0]
da97433d5cd26e422a370d186f98659383c06721csovant else:
da97433d5cd26e422a370d186f98659383c06721csovant includeOpt += ' --%s fractional-include:%s' % (i[0],i[1])
da97433d5cd26e422a370d186f98659383c06721csovant excludeOpt = ''
da97433d5cd26e422a370d186f98659383c06721csovant if exclude:
da97433d5cd26e422a370d186f98659383c06721csovant for e in exclude:
da97433d5cd26e422a370d186f98659383c06721csovant if validOps.index(e[0]) == -1:
da97433d5cd26e422a370d186f98659383c06721csovant raise Exception("invalid exclude argument [%s]" % exclude)
da97433d5cd26e422a370d186f98659383c06721csovant elif e[0] == 'reset':
da97433d5cd26e422a370d186f98659383c06721csovant excludeOpt += ' --%s fractional-exclude' % e[0]
da97433d5cd26e422a370d186f98659383c06721csovant else:
da97433d5cd26e422a370d186f98659383c06721csovant excludeOpt += ' --%s fractional-exclude:%s' % (e[0],e[1])
da97433d5cd26e422a370d186f98659383c06721csovant expRC = expectedRC
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <call function="'dsconfig'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : '%s/%s' \
da97433d5cd26e422a370d186f98659383c06721csovant % (server.getDir(),OPENDSNAME),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceHost' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceAdminPort' : server.getAdminPort(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceDn' : server.getRootDn(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePswd' : server.getRootPwd(),
da97433d5cd26e422a370d186f98659383c06721csovant 'subcommand' : 'set-replication-domain-prop',
da97433d5cd26e422a370d186f98659383c06721csovant 'objectType' : 'provider-name',
da97433d5cd26e422a370d186f98659383c06721csovant 'objectName' : 'Multimaster Synchronization',
da97433d5cd26e422a370d186f98659383c06721csovant 'optionsString' : domainOpt + includeOpt + excludeOpt,
da97433d5cd26e422a370d186f98659383c06721csovant 'expectedRC' : expRC,
da97433d5cd26e422a370d186f98659383c06721csovant 'knownIssue' : knownIssue,
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant <message level="'debug'">
da97433d5cd26e422a370d186f98659383c06721csovant 'reseting %s fractional-replication attributes' % replicationDomain
da97433d5cd26e422a370d186f98659383c06721csovant </message>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </function>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant <function name="reset-fractional-replication-attributes" scope="local">
da97433d5cd26e422a370d186f98659383c06721csovant <function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant reset the fractional-replication properties
da97433d5cd26e422a370d186f98659383c06721csovant </function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant <function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="replicationDomain" type="required">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant replication Domain name
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-property name="type" value="string"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-def name="server" type="required">
da97433d5cd26e422a370d186f98659383c06721csovant <function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant target server
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-description>
da97433d5cd26e422a370d186f98659383c06721csovant </function-arg-def>
da97433d5cd26e422a370d186f98659383c06721csovant </function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant domainOpt = ' --domain-name "%s"' % replicationDomain
da97433d5cd26e422a370d186f98659383c06721csovant includeOpt = ' --reset fractional-include'
da97433d5cd26e422a370d186f98659383c06721csovant excludeOpt = ' --reset fractional-exclude'
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <call function="'dsconfig'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : '%s/%s' \
da97433d5cd26e422a370d186f98659383c06721csovant % (server.getDir(),OPENDSNAME),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceHost' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceAdminPort' : server.getAdminPort(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceDn' : server.getRootDn(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePswd' : server.getRootPwd(),
da97433d5cd26e422a370d186f98659383c06721csovant 'subcommand' : 'set-replication-domain-prop',
da97433d5cd26e422a370d186f98659383c06721csovant 'objectType' : 'provider-name',
da97433d5cd26e422a370d186f98659383c06721csovant 'objectName' : 'Multimaster Synchronization',
da97433d5cd26e422a370d186f98659383c06721csovant 'optionsString' : domainOpt + includeOpt + excludeOpt,
da97433d5cd26e422a370d186f98659383c06721csovant 'expectedRC' : 0
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant <message level="'debug'">
da97433d5cd26e422a370d186f98659383c06721csovant 'reseting %s fractional-replication attributes' % replicationDomain
da97433d5cd26e422a370d186f98659383c06721csovant </message>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </function>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant <function name="replicationStatus" scope="local">
da97433d5cd26e422a370d186f98659383c06721csovant <function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant gets the status and its change date for a given replication domain
da97433d5cd26e422a370d186f98659383c06721csovant </function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant <function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <function-required-arg name="server"/>
b168b33f591684db77dc1078f77947802d2fedf4gary.williams <function-required-arg name="replicationDomainSuffix"/>
da97433d5cd26e422a370d186f98659383c06721csovant <function-optional-arg name="expectedRC" default="0"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
b168b33f591684db77dc1078f77947802d2fedf4gary.williams
b168b33f591684db77dc1078f77947802d2fedf4gary.williams <!-- Search for the DN of the Replication Domain -->
b168b33f591684db77dc1078f77947802d2fedf4gary.williams <call function="'ldapSearchWithScript'">
b168b33f591684db77dc1078f77947802d2fedf4gary.williams { 'location' : server.getHostname(),
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsPath' : '%s/%s' \
b168b33f591684db77dc1078f77947802d2fedf4gary.williams % (server.getDir(),OPENDSNAME),
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsInstanceHost' : server.getHostname(),
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsInstancePort' : server.getPort(),
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsInstanceDn' : server.getRootDn(),
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsInstancePswd' : server.getRootPwd(),
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsBaseDN' : replicationDomainSuffix,
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsFilter' : 'objectclass=*',
77de268c94f467b242ca6bda58778f7057a9e6efgary.williams 'dsAttributes' : 'dn',
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsDontWrap' : 'true',
b168b33f591684db77dc1078f77947802d2fedf4gary.williams }
b168b33f591684db77dc1078f77947802d2fedf4gary.williams </call>
b168b33f591684db77dc1078f77947802d2fedf4gary.williams
b168b33f591684db77dc1078f77947802d2fedf4gary.williams <!-- Get the DN of the Replication Domain -->
b168b33f591684db77dc1078f77947802d2fedf4gary.williams <script>
b168b33f591684db77dc1078f77947802d2fedf4gary.williams replicationDomainDN = replicationDomainSuffix
b168b33f591684db77dc1078f77947802d2fedf4gary.williams for l in STAXResult[0][1].splitlines():
5df1eb20f7a43cc227510a1354685d0276de8fdccsovant if l.startswith('dn: cn=Directory server DS'):
b168b33f591684db77dc1078f77947802d2fedf4gary.williams replicationDomainDN = l.replace('dn: ','')
b168b33f591684db77dc1078f77947802d2fedf4gary.williams </script>
b168b33f591684db77dc1078f77947802d2fedf4gary.williams
b168b33f591684db77dc1078f77947802d2fedf4gary.williams <!-- Search the Replication Domain for status last-status-change-date -->
da97433d5cd26e422a370d186f98659383c06721csovant <call function="'ldapSearchWithScript'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : '%s/%s' \
da97433d5cd26e422a370d186f98659383c06721csovant % (server.getDir(),OPENDSNAME),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceHost' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePort' : server.getPort(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceDn' : server.getRootDn(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePswd' : server.getRootPwd(),
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsBaseDN' : replicationDomainDN,
da97433d5cd26e422a370d186f98659383c06721csovant 'dsFilter' : 'objectclass=*',
da97433d5cd26e422a370d186f98659383c06721csovant 'dsAttributes' : 'status last-status-change-date',
da97433d5cd26e422a370d186f98659383c06721csovant 'dsScope' : 'base',
b168b33f591684db77dc1078f77947802d2fedf4gary.williams 'dsDontWrap' : 'true',
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant <if expr='RC == 0'>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant status = None
da97433d5cd26e422a370d186f98659383c06721csovant lastChange = None
da97433d5cd26e422a370d186f98659383c06721csovant for l in STAXResult[0][1].splitlines():
da97433d5cd26e422a370d186f98659383c06721csovant if l.startswith('status'):
da97433d5cd26e422a370d186f98659383c06721csovant status = l.split(':',1)[1]
da97433d5cd26e422a370d186f98659383c06721csovant if l.startswith('last-status-change-date'):
da97433d5cd26e422a370d186f98659383c06721csovant lastChange = l.split(':',1)[1]
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <return>RC == expectedRC, status, lastChange</return>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <else>
da97433d5cd26e422a370d186f98659383c06721csovant <return>1 == expectedRC, None</return>
da97433d5cd26e422a370d186f98659383c06721csovant </else>
da97433d5cd26e422a370d186f98659383c06721csovant </if>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </function>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant <function name="getNumberOfEntries" scope="local">
da97433d5cd26e422a370d186f98659383c06721csovant <function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant gets the number of entries of a backend
da97433d5cd26e422a370d186f98659383c06721csovant </function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant <function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <function-required-arg name="server"/>
da97433d5cd26e422a370d186f98659383c06721csovant <function-required-arg name="backend"/>
da97433d5cd26e422a370d186f98659383c06721csovant <function-required-arg name="domain"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <call function="'ldapSearchWithScript'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : '%s/%s' \
da97433d5cd26e422a370d186f98659383c06721csovant % (server.getDir(),OPENDSNAME),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceHost' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePort' : server.getPort(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceDn' : server.getRootDn(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePswd' : server.getRootPwd(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsBaseDN' : 'cn=%s Backend,cn=monitor' % backend,
da97433d5cd26e422a370d186f98659383c06721csovant 'dsFilter' : 'objectclass=*',
da97433d5cd26e422a370d186f98659383c06721csovant 'dsAttributes' : 'ds-base-dn-entry-count',
da97433d5cd26e422a370d186f98659383c06721csovant 'dsScope' : 'base',
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant <if expr='RC == 0'>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant count = -1
da97433d5cd26e422a370d186f98659383c06721csovant for l in STAXResult[0][1].splitlines():
da97433d5cd26e422a370d186f98659383c06721csovant if l.startswith('ds-base-dn-entry-count') and \
da97433d5cd26e422a370d186f98659383c06721csovant l.endswith(domain):
da97433d5cd26e422a370d186f98659383c06721csovant count = l.split(': ',1)[1].split(' ')[0]
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <return>RC, count</return>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <else>
da97433d5cd26e422a370d186f98659383c06721csovant <return>1, None</return>
da97433d5cd26e422a370d186f98659383c06721csovant </else>
da97433d5cd26e422a370d186f98659383c06721csovant </if>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </function>
da97433d5cd26e422a370d186f98659383c06721csovant
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <function name="getSchemaDict" scope="local">
da97433d5cd26e422a370d186f98659383c06721csovant <function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant check the schema for the equivalent of a given argument
da97433d5cd26e422a370d186f98659383c06721csovant if argument is OID then returns literal
da97433d5cd26e422a370d186f98659383c06721csovant if argument is literal returns OID
da97433d5cd26e422a370d186f98659383c06721csovant if not found return RC=1
da97433d5cd26e422a370d186f98659383c06721csovant </function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant <function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <function-required-arg name="location"/>
da97433d5cd26e422a370d186f98659383c06721csovant <function-required-arg name="dsPath"/>
da97433d5cd26e422a370d186f98659383c06721csovant <function-required-arg name="server"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <call function="'ldapSearchWithScript'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : location,
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : dsPath,
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceHost' : server.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePort' : server.getPort(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceDn' : server.getRootDn(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePswd' : server.getRootPwd(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsBaseDN' : "cn=schema",
da97433d5cd26e422a370d186f98659383c06721csovant 'dsFilter' : "objectclass=*",
da97433d5cd26e422a370d186f98659383c06721csovant 'dsScope' : "base",
da97433d5cd26e422a370d186f98659383c06721csovant 'dsAttributes' : "objectClasses attributeTypes",
004a0de820f70c99337ff8270d52950808da24f9gary.williams 'expectedRC' : "noCheck"
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant schemaContent = STAXResult[0][1]
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant oidDict = OIDDict()
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant oidDict.parseSchema(schemaContent)
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <return>oidDict</return>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </function>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant <function name="ldapsearchVerifyFrac">
da97433d5cd26e422a370d186f98659383c06721csovant <function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant verify that master and fractional replica have equivalent
da97433d5cd26e422a370d186f98659383c06721csovant </function-prolog>
da97433d5cd26e422a370d186f98659383c06721csovant <function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <function-required-arg name="servers"/>
da97433d5cd26e422a370d186f98659383c06721csovant <function-required-arg name="keptAttributes"/>
da97433d5cd26e422a370d186f98659383c06721csovant <function-optional-arg name="baseDN" default="'o=example'"/>
da97433d5cd26e422a370d186f98659383c06721csovant <function-optional-arg name="expectedRC" default="0"/>
da97433d5cd26e422a370d186f98659383c06721csovant <function-optional-arg name="issue"/>
da97433d5cd26e422a370d186f98659383c06721csovant </function-map-args>
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant referenceTree = 'referenceTree.ldif'
da97433d5cd26e422a370d186f98659383c06721csovant filteredRefTree = 'filteredRefTree.ldif'
da97433d5cd26e422a370d186f98659383c06721csovant fractionalTree = 'fractionalTree.ldif'
da97433d5cd26e422a370d186f98659383c06721csovant treeDiffs = 'treeDiffs.ldif'
da97433d5cd26e422a370d186f98659383c06721csovant dsMaster = servers[0]
da97433d5cd26e422a370d186f98659383c06721csovant dsReplica = servers[1]
da97433d5cd26e422a370d186f98659383c06721csovant dsMasterPath = '%s/%s' % (dsMaster.getDir(),OPENDSNAME)
da97433d5cd26e422a370d186f98659383c06721csovant dsReplicaPath = '%s/%s' % (dsReplica.getDir(),OPENDSNAME)
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant </script>
02a7ab9c96e237fa4624641fe28432bc83c593fccsovant <call function="'ldapSearchWithScript'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : dsMaster.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : dsMasterPath,
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceHost' : dsMaster.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePort' : dsMaster.getPort(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceDn' : dsMaster.getRootDn(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePswd' : dsMaster.getRootPwd(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsBaseDN' : baseDN,
da97433d5cd26e422a370d186f98659383c06721csovant 'dsFilter' : 'objectclass=*',
02a7ab9c96e237fa4624641fe28432bc83c593fccsovant 'dsScope' : 'sub',
02a7ab9c96e237fa4624641fe28432bc83c593fccsovant 'dsDontWrap' : 'true',
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant <if expr="RC == 0">
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant refFiltered = []
da97433d5cd26e422a370d186f98659383c06721csovant currentAttr = None
da97433d5cd26e422a370d186f98659383c06721csovant skipLine = False
da97433d5cd26e422a370d186f98659383c06721csovant # filter out all content that is not in the list of attribues
da97433d5cd26e422a370d186f98659383c06721csovant for f in STAXResult[0][1].splitlines():
da97433d5cd26e422a370d186f98659383c06721csovant # if entry separator
da97433d5cd26e422a370d186f98659383c06721csovant if len(f.strip()) == 0:
da97433d5cd26e422a370d186f98659383c06721csovant # if current attrib is valid
da97433d5cd26e422a370d186f98659383c06721csovant refFiltered.append(f+"\n")
da97433d5cd26e422a370d186f98659383c06721csovant currentAttr = None
da97433d5cd26e422a370d186f98659383c06721csovant skipLine = False
da97433d5cd26e422a370d186f98659383c06721csovant # if new attribute line
da97433d5cd26e422a370d186f98659383c06721csovant elif not f[0].isspace():
da97433d5cd26e422a370d186f98659383c06721csovant currentAttr = f.split(':',1)[0]
02a7ab9c96e237fa4624641fe28432bc83c593fccsovant # for instance if description is a valid attribute,
02a7ab9c96e237fa4624641fe28432bc83c593fccsovant # so localized description (description;lang-fr) is also valid
02a7ab9c96e237fa4624641fe28432bc83c593fccsovant currentAttr = currentAttr.split(';',1)[0]
da97433d5cd26e422a370d186f98659383c06721csovant # if valid attribute
da97433d5cd26e422a370d186f98659383c06721csovant if currentAttr in keptAttributes:
da97433d5cd26e422a370d186f98659383c06721csovant refFiltered.append(f+"\n")
da97433d5cd26e422a370d186f98659383c06721csovant else:
da97433d5cd26e422a370d186f98659383c06721csovant skipLine = True
da97433d5cd26e422a370d186f98659383c06721csovant elif not skipLine:
da97433d5cd26e422a370d186f98659383c06721csovant refFiltered.append(f+"\n")
2b68af05b4308b32506f1d68f6357cdc458869d7ludovicp f=open('%s/%s' % (local.temp, filteredRefTree),'w')
da97433d5cd26e422a370d186f98659383c06721csovant f.writelines(refFiltered)
da97433d5cd26e422a370d186f98659383c06721csovant f.close()
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <call function="'copyFile'">
da97433d5cd26e422a370d186f98659383c06721csovant {
da97433d5cd26e422a370d186f98659383c06721csovant 'location' : STAXServiceMachine ,
2b68af05b4308b32506f1d68f6357cdc458869d7ludovicp 'srcfile' : '%s/%s' % (local.temp, filteredRefTree) ,
da97433d5cd26e422a370d186f98659383c06721csovant 'destfile' : '%s/%s' % (remote.temp, filteredRefTree) ,
da97433d5cd26e422a370d186f98659383c06721csovant 'remotehost' : dsMaster.getHostname()
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </if>
da97433d5cd26e422a370d186f98659383c06721csovant <if expr="RC == 0">
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
02a7ab9c96e237fa4624641fe28432bc83c593fccsovant <call function="'ldapSearchWithScript'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : dsReplica.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : dsReplicaPath,
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceHost' : dsReplica.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePort' : dsReplica.getPort(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstanceDn' : dsReplica.getRootDn(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsInstancePswd' : dsReplica.getRootPwd(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsBaseDN' : 'o=example',
da97433d5cd26e422a370d186f98659383c06721csovant 'dsFilter' : 'objectclass=*',
02a7ab9c96e237fa4624641fe28432bc83c593fccsovant 'dsScope' : 'sub',
02a7ab9c96e237fa4624641fe28432bc83c593fccsovant 'dsDontWrap' : 'true',
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </if>
da97433d5cd26e422a370d186f98659383c06721csovant <if expr="RC == 0">
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
da97433d5cd26e422a370d186f98659383c06721csovant <script>
da97433d5cd26e422a370d186f98659383c06721csovant filLdif = STAXResult[0][1]
2b68af05b4308b32506f1d68f6357cdc458869d7ludovicp f=open('%s/%s' % (local.temp, fractionalTree),'w')
da97433d5cd26e422a370d186f98659383c06721csovant f.writelines(filLdif)
da97433d5cd26e422a370d186f98659383c06721csovant f.close()
da97433d5cd26e422a370d186f98659383c06721csovant </script>
da97433d5cd26e422a370d186f98659383c06721csovant <call function="'copyFile'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : STAXServiceMachine ,
2b68af05b4308b32506f1d68f6357cdc458869d7ludovicp 'srcfile' : '%s/%s' % (local.temp, fractionalTree) ,
da97433d5cd26e422a370d186f98659383c06721csovant 'destfile' : '%s/%s' % (remote.temp, fractionalTree) ,
da97433d5cd26e422a370d186f98659383c06721csovant 'remotehost' : dsMaster.getHostname()
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </if>
da97433d5cd26e422a370d186f98659383c06721csovant <if expr="RC == 0">
da97433d5cd26e422a370d186f98659383c06721csovant <sequence>
aeea90de0b669f9f6fe3ae9aede72a212a7dfb12csovant <call function="'LdifDiffWithScript'">
da97433d5cd26e422a370d186f98659383c06721csovant { 'location' : dsMaster.getHostname(),
da97433d5cd26e422a370d186f98659383c06721csovant 'dsPath' : dsMasterPath,
da97433d5cd26e422a370d186f98659383c06721csovant 'sourceLdif' : '%s/%s' % (remote.temp, filteredRefTree),
da97433d5cd26e422a370d186f98659383c06721csovant 'targetLdif' : '%s/%s' % (remote.temp, fractionalTree),
da97433d5cd26e422a370d186f98659383c06721csovant 'outputLdif' : '%s/%s' % (remote.temp,treeDiffs)
da97433d5cd26e422a370d186f98659383c06721csovant }
da97433d5cd26e422a370d186f98659383c06721csovant </call>
aeea90de0b669f9f6fe3ae9aede72a212a7dfb12csovant <if expr="STAXResult == 6">
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <sequence>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <return>0, None</return>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant </sequence>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <else>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <sequence>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <script>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant import time
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant tmstamp = time.time()
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant </script>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <call function="'copyFile'">
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant { 'location' : dsMaster.getHostname(),
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant 'srcfile' : '%s/%s' % (remote.temp,treeDiffs),
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant 'destfile' : '%s/%s.%s' % (remote.temp,treeDiffs,tmstamp)
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant }
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant </call>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <call function="'getFile'">
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant { 'location' : dsMaster.getHostname(),
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant 'filename' : '%s/%s' % (remote.temp,treeDiffs)
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant }
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant </call>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <if expr="RC == 0">
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <return>1, STAXResult[1]</return>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <else>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant <return>1, None</return>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant </else>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant </if>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant </sequence>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant </else>
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant </if>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </if>
da97433d5cd26e422a370d186f98659383c06721csovant </sequence>
da97433d5cd26e422a370d186f98659383c06721csovant </function>
da97433d5cd26e422a370d186f98659383c06721csovant
da97433d5cd26e422a370d186f98659383c06721csovant</stax>