| | |
| | | ecl_deleteOldRDN = None |
| | | ecl_newSuperior = None |
| | | ecl_changes = None |
| | | ecl_includedttributes = None |
| | | |
| | | if 'replicationcsn' in changelogEntry.keys(): |
| | | ecl_replicationCSN = changelogEntry['replicationcsn'][0] |
| | |
| | | ecl_newSuperior = changelogEntry['newsuperior'][0] |
| | | if 'changes' in changelogEntry.keys(): |
| | | ecl_changes = changelogEntry['changes'][0] |
| | | if 'includedattributes' in changelogEntry.keys(): |
| | | ecl_includedAttributes = changelogEntry['includedattributes'][0] |
| | | </script> |
| | | |
| | | <message> |
| | |
| | | </if> |
| | | |
| | | <if expr="includeAttrs"> |
| | | <if expr="ecl_includedAttributes"> |
| | | <sequence> |
| | | <!-- Decode the changes that are encoded in base64 --> |
| | | <message> |
| | | 'checkChangelogEntry: Decode external changelog included attributes' |
| | | </message> |
| | | <call function="'Base64WithScript'"> |
| | | { 'location' : myLocation, |
| | | 'dsPath' : myPath, |
| | | 'subcommand' : 'decode', |
| | | 'encodedData' : ecl_includedAttributes |
| | | } |
| | | </call> |
| | | <!-- STAXResult is not always a list--> |
| | | <script> |
| | | try: |
| | | decodeRC, decodedChanges = STAXResult[0] |
| | | except AttributeError, details: |
| | | decodedChanges = 'AttributeError: can not parse STAXResult %s' \ |
| | | % details |
| | | decodeRC = '1' |
| | | </script> |
| | | <message> |
| | | 'checkChangelogEntry: Decoded changes:\n%s' % decodedChanges |
| | | </message> |
| | | <if expr="decodeRC == 0"> |
| | | <sequence> |
| | | <call function="'parseLdifEntry'"> |
| | | { 'ldifEntry' : decodedChanges } |
| | | </call> |
| | | <script> |
| | | ecl_includeAttrsMap = STAXResult |
| | | </script> |
| | | <message> |
| | | 'Parsed changelog entry changes: \n%s' % ecl_includeAttrsMap |
| | | </message> |
| | | </sequence> |
| | | </if> |
| | | <iterate var="attr" in="includeAttrs.keys()"> |
| | | <sequence> |
| | | <message> |
| | | 'checkChangelogEntry: Checking include-attribute: %s' % attr |
| | | </message> |
| | | <message>'Matching included attribute %s.' % attr</message> |
| | | <script> |
| | | # included-attributes are preceded by 'target' prefix in the |
| | | # changelog entry, e.g.: 'description' -> 'targetdescription' |
| | | targetAttr = 'target%s' % attr |
| | | targetAttr = attr |
| | | valueList = includeAttrs[attr] |
| | | ecl_valueList = None |
| | | |
| | | if targetAttr in changelogEntry.keys(): |
| | | ecl_valueList = changelogEntry[targetAttr] |
| | | if targetAttr in ecl_includeAttrsMap.keys(): |
| | | ecl_valueList = ecl_includeAttrsMap[targetAttr] |
| | | ecl_valueList.sort() |
| | | valueList.sort() |
| | | </script> |
| | |
| | | </if> |
| | | </sequence> |
| | | </iterate> |
| | | </sequence> |
| | | </if> |
| | | </if> |
| | | |
| | | </sequence> |