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