dsconfig.xml revision d25372dc8e65a9ed019a88fdf659ca61313f1b31
843e19887f64dde75055cf8842fc4db2171eff45johnlev<?xml version="1.0" encoding="UTF-8" standalone="no"?>
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! CDDL HEADER START
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! The contents of this file are subject to the terms of the
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! Common Development and Distribution License, Version 1.0 only
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! (the "License"). You may not use this file except in compliance
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! with the License.
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! You can obtain a copy of the license at
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! See the License for the specific language governing permissions
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! and limitations under the License.
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! When distributing Covered Code, include this CDDL HEADER in each
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! file and include the License file at
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! add the following below this CDDL HEADER, with the fields enclosed
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! by brackets "[]" replaced with your own identifying information:
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab ! Portions Copyright [yyyy] [name of copyright owner]
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! CDDL HEADER END
843e19887f64dde75055cf8842fc4db2171eff45johnlev ! Copyright 2007-2008 Sun Microsystems, Inc.
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab This function resolves common dsconfig arguments
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab if dsInstanceHost:
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParamsList.append('-h %s' % dsInstanceHost)
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab if dsInstanceAdminPort:
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParamsList.append('-p %s' % dsInstanceAdminPort)
843e19887f64dde75055cf8842fc4db2171eff45johnlev if dsInstanceDn:
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList.append('-D "%s"' % dsInstanceDn)
843e19887f64dde75055cf8842fc4db2171eff45johnlev if dsInstancePswd:
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList.append('-w "%s"' % dsInstancePswd)
843e19887f64dde75055cf8842fc4db2171eff45johnlev </function>
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Set property value using dsconfig -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev This function modifies a property value using dsconfig
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Pathname to installation root
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="filepath" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="DIRECTORY_INSTANCE_ADMIN_PORT">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Directory server admin port number
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="Port number" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstanceDn" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstancePswd" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="objectName" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Object to modify, e.g. password validator
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="propertyType" type="optional" default="''">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Property type to modify, e.g. validator
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="propertyName" type="optional" default="''">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Property to modify, e.g. enabled
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Attribute to modify, e.g. min-password-length
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="attributeValue" type="optional" default="'none'">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab New attribute value
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="modifyType" type="optional" default="'set'">
843e19887f64dde75055cf8842fc4db2171eff45johnlev The modify type. Default value is set.
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="expectedRC" type="optional" default="0">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Expected return code value. Default value is 0.
843e19887f64dde75055cf8842fc4db2171eff45johnlev Wildcard 'noCheck' to not check the RC
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <sequence>
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <!-- Local variables -->
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab mylocation=location
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParams=''
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmd=''
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab if dsPath:
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsBinPath='%s/%s' % (dsPath,fileFolder)
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
5d2eda970e48f8985448151c73e699614ce9f357John Levon STAFCmdParamsList=[]
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParamsList.append('set-%s-prop ' % (objectName))
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab if propertyType:
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParamsList.append('--%s-name "%s" ' % (propertyType,propertyName))
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab if modifyType == 'reset':
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParamsList.append('--%s %s' % (modifyType,attributeName))
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParamsList.append('--%s "%s:%s"' % (modifyType,attributeName,attributeValue))
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParams=' '.join(STAFCmdParamsList)
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab '%s %s' % (STAFCmd, STAFCmdParams)
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab </message>
843e19887f64dde75055cf8842fc4db2171eff45johnlev { 'name' : 'Modify dsconfig object',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'location' : location,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'command' : STAFCmd,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'arguments' : STAFCmdParams,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'expectedRC': expectedRC
843e19887f64dde75055cf8842fc4db2171eff45johnlev </sequence>
843e19887f64dde75055cf8842fc4db2171eff45johnlev </function>
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Get property value using dsconfig -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev This function get a property value using dsconfig
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Pathname to installation root
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_ADMIN_PORT">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server admin port number
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property name="type" value="Port number" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="dsInstancePswd" type="required">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Bind password
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Object to get, e.g. password validator. it's used to make the subcommand name get-...-prop
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Property type to get, e.g. backend. it's used to make the property type: --backend-name
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Property to get, e.g. userroot
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Attribute to get, e.g. min-password-length
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Optional extra parameters for specific test cases. ie -m
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="expectedAttributeValue" type="optional" default="'none'">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab expected attribute value
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="expectedRC" type="optional" default="0">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Expected return code value. Default value is 0.
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Wildcard 'noCheck' to not check the RC
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <sequence>
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <!-- Local variables -->
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab mylocation=location
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParams=''
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmd=''
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab if dsPath:
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab dsBinPath='%s/%s' % (dsPath,fileFolder)
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList=[]
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList.append('get-%s-prop ' % (objectName))
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList.append('--%s-name "%s" -s' % (propertyType,propertyName))
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList.append('--property "%s"' % (attributeName))
843e19887f64dde75055cf8842fc4db2171eff45johnlev if extraParams:
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParams=' '.join(STAFCmdParamsList)
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab '%s %s' % (STAFCmd, STAFCmdParams)
843e19887f64dde75055cf8842fc4db2171eff45johnlev { 'name' : 'Get dsconfig object',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'location' : location,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'command' : STAFCmd,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'arguments' : STAFCmdParams,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'expectedRC': expectedRC
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAXCode=RC
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAXReason=STAXResult[0][1]
843e19887f64dde75055cf8842fc4db2171eff45johnlev { 'expectedString' : expectedAttributeValue,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'returnString' : STAXReason
843e19887f64dde75055cf8842fc4db2171eff45johnlev </sequence>
843e19887f64dde75055cf8842fc4db2171eff45johnlev </function>
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- generic wrapper on dsconfig -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- can be used to list, get or set a list of attribues -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev This function lists, get or set a list of attributes using dsconfig
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="STAF_REMOTE_HOSTNAME">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Pathname to installation root
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="filepath" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstanceHost" type="optional" default="STAF_REMOTE_HOSTNAME">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="DIRECTORY_INSTANCE_ADMIN_PORT">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Directory server admin port number
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property name="type" value="Port number" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="dsInstancePswd" type="required">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Bind password
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab dsconfig subcommand to execute
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Object type to modify, e.g. backend-name
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab object name to modify, e.g. userroot
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab String containing the dsconfig options. e.g. --set enabled:true --set key-store-pin:servercert
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="expectedRC" type="optional" default="0">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Expected return code value. Default value is 0.
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Wildcard 'noCheck' to not check the RC
5d2eda970e48f8985448151c73e699614ce9f357John Levon <function-arg-property name="type" value="string" />
5d2eda970e48f8985448151c73e699614ce9f357John Levon <!-- Local variables -->
5d2eda970e48f8985448151c73e699614ce9f357John Levon mylocation=location
5d2eda970e48f8985448151c73e699614ce9f357John Levon STAFCmdParams=''
5d2eda970e48f8985448151c73e699614ce9f357John Levon dsBinPath='%s/%s' % (dsPath,fileFolder)
5d2eda970e48f8985448151c73e699614ce9f357John Levon STAFCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
5d2eda970e48f8985448151c73e699614ce9f357John Levon STAFCmdParamsList=[]
5d2eda970e48f8985448151c73e699614ce9f357John Levon if objectType:
5d2eda970e48f8985448151c73e699614ce9f357John Levon STAFCmdParamsList.append('--%s "%s" ' % (objectType,objectName))
5d2eda970e48f8985448151c73e699614ce9f357John Levon if optionsString:
5d2eda970e48f8985448151c73e699614ce9f357John Levon STAFCmdParamsList.append(' %s' % optionsString)
5d2eda970e48f8985448151c73e699614ce9f357John Levon STAFCmdParams=' '.join(STAFCmdParamsList)
5d2eda970e48f8985448151c73e699614ce9f357John Levon { 'name' : 'execute dsconfig subcommand',
5d2eda970e48f8985448151c73e699614ce9f357John Levon 'location' : location,
5d2eda970e48f8985448151c73e699614ce9f357John Levon 'command' : STAFCmd,
5d2eda970e48f8985448151c73e699614ce9f357John Levon 'arguments' : STAFCmdParams,
5d2eda970e48f8985448151c73e699614ce9f357John Levon 'expectedRC': expectedRC
5d2eda970e48f8985448151c73e699614ce9f357John Levon <!-- Modify password policy using dsconfig -->
5d2eda970e48f8985448151c73e699614ce9f357John Levon This function modifies a password policy using dsconfig
5d2eda970e48f8985448151c73e699614ce9f357John Levon type="optional"
5d2eda970e48f8985448151c73e699614ce9f357John Levon default="STAF_REMOTE_HOSTNAME">
5d2eda970e48f8985448151c73e699614ce9f357John Levon Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Pathname to installation root
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="filepath" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_ADMIN_PORT">
5d2eda970e48f8985448151c73e699614ce9f357John Levon Directory server admin port number
5d2eda970e48f8985448151c73e699614ce9f357John Levon <function-arg-property name="type" value="Port number" />
5d2eda970e48f8985448151c73e699614ce9f357John Levon <function-arg-def name="dsInstanceDn" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstancePswd" type="required">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="propertyName" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Property to modify, e.g. enabled
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="attributeName" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Attribute to modify, e.g. min-password-length
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="attributeValue" type="optional" default="'none'">
843e19887f64dde75055cf8842fc4db2171eff45johnlev New attribute value
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="modifyType" type="optional" default="'set'">
843e19887f64dde75055cf8842fc4db2171eff45johnlev The modify type. Default value is set.
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="expectedRC" type="optional" default="0">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Expected return code value. Default value is 0
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev { 'location' : location,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsPath' : dsPath,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstanceHost' : dsInstanceHost,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstanceAdminPort' : dsInstanceAdminPort,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstanceDn' : dsInstanceDn,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstancePswd' : dsInstancePswd,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'objectName' : 'password-policy',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'propertyType' : 'policy',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'propertyName' : propertyName,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'attributeName' : attributeName,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'attributeValue' : attributeValue,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'modifyType' : modifyType,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'expectedRC' : expectedRC
843e19887f64dde75055cf8842fc4db2171eff45johnlev </sequence>
843e19887f64dde75055cf8842fc4db2171eff45johnlev </function>
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Modify password validator using dsconfig -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev This function modifies a password validator using dsconfig
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Pathname to installation root
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="filepath" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_ADMIN_PORT">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server admin port number
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="Port number" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstanceDn" type="required">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="dsInstancePswd" type="required">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev Property to modify, e.g. enabled
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="attributeName" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Attribute to modify, e.g. match-attribute
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="attributeValue" type="optional" default="'none'">
843e19887f64dde75055cf8842fc4db2171eff45johnlev New attribute value
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="modifyType" type="optional" default="'set'">
843e19887f64dde75055cf8842fc4db2171eff45johnlev The modify type. Default value is set.
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="expectedRC" type="optional" default="0">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Expected return code value. Default value is 0
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev { 'location' : location,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsPath' : dsPath,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstanceHost' : dsInstanceHost,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstanceAdminPort' : dsInstanceAdminPort,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstanceDn' : dsInstanceDn,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstancePswd' : dsInstancePswd,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'objectName' : 'password-validator',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'propertyType' : 'validator',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'propertyName' : propertyName,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'attributeName' : attributeName,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'attributeValue' : attributeValue,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'modifyType' : modifyType,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'expectedRC' : expectedRC
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab </sequence>
843e19887f64dde75055cf8842fc4db2171eff45johnlev </function>
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Modify password policy using dsconfig -->
5d2eda970e48f8985448151c73e699614ce9f357John Levon This function modifies a global attribute value using dsconfig
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="STAF_REMOTE_HOSTNAME">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
5d2eda970e48f8985448151c73e699614ce9f357John Levon type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
5d2eda970e48f8985448151c73e699614ce9f357John Levon Pathname to installation root
5d2eda970e48f8985448151c73e699614ce9f357John Levon <function-arg-property name="type" value="filepath" />
5d2eda970e48f8985448151c73e699614ce9f357John Levon type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_ADMIN_PORT">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server admin port number
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="Port number" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstanceDn" type="required">
5d2eda970e48f8985448151c73e699614ce9f357John Levon <function-arg-def name="dsInstancePswd" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="attributeName" type="required">
5d2eda970e48f8985448151c73e699614ce9f357John Levon Attribute to modify, e.g. bind-with-dn-requires-password
5d2eda970e48f8985448151c73e699614ce9f357John Levon <function-arg-property name="type" value="string" />
5d2eda970e48f8985448151c73e699614ce9f357John Levon <function-arg-def name="attributeValue" type="required">
5d2eda970e48f8985448151c73e699614ce9f357John Levon New attribute value
5d2eda970e48f8985448151c73e699614ce9f357John Levon <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="expectedRC" type="optional" default="0">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Expected return code value. Default value is 0.
843e19887f64dde75055cf8842fc4db2171eff45johnlev Wildcard 'noCheck' to not check the RC
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Local variables -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev mylocation=location
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParams=''
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsBinPath='%s/%s' % (dsPath,fileFolder)
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
843e19887f64dde75055cf8842fc4db2171eff45johnlev if attributeValue:
843e19887f64dde75055cf8842fc4db2171eff45johnlev attributeValue=attributeValue.replace('"','QUOT')
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList=[]
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList.append('set-global-configuration-prop ')
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList.append('--set "%s:%s"' % (attributeName,attributeValue))
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParams=' '.join(STAFCmdParamsList)
843e19887f64dde75055cf8842fc4db2171eff45johnlev { 'name' : 'Modify dsconfig object',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'location' : location,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'command' : STAFCmd,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'arguments' : STAFCmdParams,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'expectedRC': expectedRC
843e19887f64dde75055cf8842fc4db2171eff45johnlev </sequence>
843e19887f64dde75055cf8842fc4db2171eff45johnlev </function>
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Modify identity mapper using dsconfig -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev This function modifies an identity mapper using dsconfig
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Pathname to installation root
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="filepath" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_ADMIN_PORT">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server admin port number
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="Port number" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstanceDn" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstancePswd" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="mapperName" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Mapper to modify, e.g. Exact Match
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="attributeName" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Attribute to modify, e.g. match-attribute
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="attributeValue" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev New attribute value
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="modifyType" type="optional" default="'set'">
843e19887f64dde75055cf8842fc4db2171eff45johnlev The modify type. Default value is set.
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="expectedRC" type="optional" default="0">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Expected return code value. Default value is 0
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev { 'location' : location,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsPath' : dsPath,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstanceHost' : dsInstanceHost,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstanceAdminPort' : dsInstanceAdminPort,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstanceDn' : dsInstanceDn,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'dsInstancePswd' : dsInstancePswd,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'objectName' : 'identity-mapper',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'propertyType' : 'mapper',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'propertyName' : mapperName,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'attributeName' : attributeName,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'attributeValue' : attributeValue,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'modifyType' : modifyType,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'expectedRC' : expectedRC
843e19887f64dde75055cf8842fc4db2171eff45johnlev </sequence>
843e19887f64dde75055cf8842fc4db2171eff45johnlev </function>
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Modify password policy using dsconfig -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev This function modifies a global aci using dsconfig
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Pathname to installation root
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="filepath" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_ADMIN_PORT">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server admin port number
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="Port number" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstanceDn" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="dsInstancePswd" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev New property value
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="opType" type="optional" default="set">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Operation type, one of set, add, and remove
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="expectedRC" type="optional" default="0">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Expected return code value. Default value is 0.
843e19887f64dde75055cf8842fc4db2171eff45johnlev Wildcard 'noCheck' to not check the RC
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev mylocation=location
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParams=''
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsBinPath='%s/%s' % (dsPath,fileFolder)
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab if aciValue:
843e19887f64dde75055cf8842fc4db2171eff45johnlev aciValue=aciValue.replace('"','\\"')
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab if is_windows_platform(mylocation):
843e19887f64dde75055cf8842fc4db2171eff45johnlev aciValue=aciValue.replace(r'||',r'"||"')
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParamsList=[]
843e19887f64dde75055cf8842fc4db2171eff45johnlev STAFCmdParamsList.append('set-access-control-handler-prop ')
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParamsList.append('--%s "global-aci:%s"' % (opType,aciValue))
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAFCmdParams=' '.join(STAFCmdParamsList)
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab { 'name' : 'Modify dsconfig object',
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'location' : location,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'command' : STAFCmd,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'arguments' : STAFCmdParams,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'expectedRC': expectedRC
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAXResult
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab </sequence>
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab </function>
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <!-- Modify password policy using dsconfig -->
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab This function modifies a sasl mechanism using dsconfig
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Location of target host
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Pathname to installation root
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="STAF_REMOTE_HOSTNAME">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Directory server hostname or IP address
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="DIRECTORY_INSTANCE_ADMIN_PORT">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Directory server admin port number
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property name="type" value="Port number" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="dsInstancePswd" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="handlerName" type="required">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Handle to modify, e.g. DIGEST-MD5
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Property to modify, e.g. realm
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab New property value
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="modifyType" type="optional" default="'set'">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab The modify type. Default value is set.
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="expectedRC" type="optional" default="0">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Expected return code value. Default value is 0
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <sequence>
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab { 'location' : location,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'dsPath' : dsPath,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'dsInstanceHost' : dsInstanceHost,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'dsInstanceAdminPort' : dsInstanceAdminPort,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'dsInstanceDn' : dsInstanceDn,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'dsInstancePswd' : dsInstancePswd,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'objectName' : 'sasl-mechanism-handler',
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'propertyType' : 'handler',
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'propertyName' : handlerName,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'attributeName' : propertyName,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'attributeValue' : propertyValue,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'modifyType' : modifyType,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'expectedRC' : expectedRC
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAXResult
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab </sequence>
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab </function>
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab This function eases adding JEB DB indexes
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="STAF_REMOTE_HOSTNAME">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Location of target host
5d2eda970e48f8985448151c73e699614ce9f357John Levon type="optional"
5d2eda970e48f8985448151c73e699614ce9f357John Levon default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Pathname to installation root
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="STAF_REMOTE_HOSTNAME">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Directory server hostname or IP address
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="DIRECTORY_INSTANCE_ADMIN_PORT">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Directory server admin port number
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property name="type" value="Port number" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="DIRECTORY_INSTANCE_DN">
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_PSWD">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_BE"
5d2eda970e48f8985448151c73e699614ce9f357John Levon type="optional">
5d2eda970e48f8985448151c73e699614ce9f357John Levon The Back-end ID on to which to add an index
5d2eda970e48f8985448151c73e699614ce9f357John Levon <function-arg-def name="indexAttribute" type="required">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab ldap attribute on to which to add indexing
843e19887f64dde75055cf8842fc4db2171eff45johnlev type of index to add
843e19887f64dde75055cf8842fc4db2171eff45johnlev This has to be provided as a python array like
843e19887f64dde75055cf8842fc4db2171eff45johnlev [ 'presence', 'substring' ]
843e19887f64dde75055cf8842fc4db2171eff45johnlev This argument can only have one of those values
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property-data type="choice" value="'equality'" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property-data type="choice" value="'ordering'" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property-data type="choice" value="'presence'" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property-data type="choice" value="'substring'" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="expectedRC" type="optional" default="0">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Expected return code value. Default value is 0.
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Wildcard 'noCheck' to not check the RC
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <!-- Local variables -->
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab dsconfigParams=''
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab dsconfigCmd=''
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab dsBinPath='%s/%s' % (dsPath,fileFolder)
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab dsconfigCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab dsconfigParams = 'create-local-db-index -n -X -h %s -p %s -D "%s" -w %s --backend-name %s --index-name %s --set index-type:%s' % (host,adminPort,rootDN,rootPwd,backendID, indexAttribute, ' --set index-type:'.join(indexTypes))
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab { 'name' : 'dsconfig addIndex',
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'location' : location,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'command' : dsconfigCmd,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'arguments' : dsconfigParams,
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab 'expectedRC': expectedRC
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab STAXResult
5d2eda970e48f8985448151c73e699614ce9f357John Levon This function eases modifying JEB DB indexes
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="STAF_REMOTE_HOSTNAME">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Pathname to installation root
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="filepath" />
5d2eda970e48f8985448151c73e699614ce9f357John Levon type="optional"
5d2eda970e48f8985448151c73e699614ce9f357John Levon default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_ADMIN_PORT">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server admin port number
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="Port number" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_DN">
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_PSWD">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab default="DIRECTORY_INSTANCE_BE"
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional">
843e19887f64dde75055cf8842fc4db2171eff45johnlev The Back-end ID on to which to add an index
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="indexAttribute" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev ldap attribute on to which add indexing
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab This parameters defines the operation to be performed.
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab This argument can only have one of the following values
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property-data type="choice" value="'add'" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property-data type="choice" value="'remove'" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property-data type="choice" value="'reset'" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-property-data type="choice" value="'set'" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab the property to manipulate if the operation is add or set
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="indexPropertyValue" type="optional">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab the value for the provided property
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <function-arg-def name="expectedRC" type="optional" default="0">
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Expected return code value. Default value is 0.
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab Wildcard 'noCheck' to not check the RC
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab <sequence>
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Local variables -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsconfigParams=''
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsconfigCmd=''
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsBinPath='%s/%s' % (dsPath,fileFolder)
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsconfigCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
843e19887f64dde75055cf8842fc4db2171eff45johnlev operationArguments = indexProperty
843e19887f64dde75055cf8842fc4db2171eff45johnlev if indexPropertyValue:
843e19887f64dde75055cf8842fc4db2171eff45johnlev operationArguments = '%s:%s' % (indexProperty, indexPropertyValue)
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsconfigParams = 'set-local-db-index-prop -n -X -h %s -p %s -D "%s" -w %s --backend-name %s --index-name %s --%s %s' % ( host, adminPort, rootDN, rootPwd, backendID, indexAttribute, operation, operationArguments)
843e19887f64dde75055cf8842fc4db2171eff45johnlev { 'name' : 'dsconfig modifyIndex',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'location' : location,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'command' : dsconfigCmd,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'arguments' : dsconfigParams,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'expectedRC': expectedRC
843e19887f64dde75055cf8842fc4db2171eff45johnlev </sequence>
843e19887f64dde75055cf8842fc4db2171eff45johnlev </function>
843e19887f64dde75055cf8842fc4db2171eff45johnlev This function eases removing JEB DB indexes from STAX
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Location of target host
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Pathname to installation root
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="filepath" />
a576ab5b6e08c47732b3dedca9eaa8a8cbb85720rab type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server hostname or IP address
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="hostname" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_ADMIN_PORT">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Directory server port number
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="Port number" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_DN">
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_PSWD">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Bind password
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="DIRECTORY_INSTANCE_BE"
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional">
843e19887f64dde75055cf8842fc4db2171eff45johnlev The Back-end ID on to which to remove an index from
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="indexAttribute" type="required">
843e19887f64dde75055cf8842fc4db2171eff45johnlev ldap attribute on to which to remove indexing
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-property name="type" value="string" />
843e19887f64dde75055cf8842fc4db2171eff45johnlev <function-arg-def name="expectedRC" type="optional" default="0">
843e19887f64dde75055cf8842fc4db2171eff45johnlev Expected return code value. Default value is 0.
843e19887f64dde75055cf8842fc4db2171eff45johnlev Wildcard 'noCheck' to not check the RC
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Local variables -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsconfigParams=''
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsconfigCmd=''
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsBinPath='%s/%s' % (dsPath,fileFolder)
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsconfigCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
843e19887f64dde75055cf8842fc4db2171eff45johnlev dsconfigParams = 'delete-local-db-index -n -X -h %s -p %s -D "%s" -w %s --backend-name %s --index-name %s' % (host,adminPort,rootDN,rootPwd,backendID, indexAttribute)
843e19887f64dde75055cf8842fc4db2171eff45johnlev { 'name' : 'dsconfig removeIndex',
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'location' : location,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'command' : dsconfigCmd,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'arguments' : dsconfigParams,
843e19887f64dde75055cf8842fc4db2171eff45johnlev 'expectedRC': expectedRC
843e19887f64dde75055cf8842fc4db2171eff45johnlev </sequence>
843e19887f64dde75055cf8842fc4db2171eff45johnlev </function>
843e19887f64dde75055cf8842fc4db2171eff45johnlev <!-- Create synchronization provider using dsconfig -->
843e19887f64dde75055cf8842fc4db2171eff45johnlev This function creates a synchronization provider using dsconfig
843e19887f64dde75055cf8842fc4db2171eff45johnlev type="optional"
843e19887f64dde75055cf8842fc4db2171eff45johnlev default="STAF_REMOTE_HOSTNAME">
STAFCmdParamsList.append('create-synchronization-provider')
STAFCmdParamsList.append('--provider-name "%s"' % providerName)
STAFCmdParamsList.append('-t %s' % providerType)
STAFCmdParamsList.append('--set "enabled:true"')
STAFCmdParamsList.append('list-synchronization-providers')
STAFCmdParamsList.append('create-replication-server')
STAFCmdParamsList.append('--provider-name "%s"' % providerName)
STAFCmdParamsList.append('--set "replication-port:%s"' % replicationPort)
STAFCmdParamsList.append('--set "replication-server-id:%s"' % replicationServerId)
STAFCmdParamsList.append('--set "replication-server:%s"' % replServer)
STAFCmdParamsList.append('create-backend')
#STAFCmdParamsList.append('-n')
#STAFCmdParamsList.append('-h %s' % dsInstanceHost)
#STAFCmdParamsList.append('-D %s' % dsInstanceDn)
#STAFCmdParamsList.append('-w %s' % dsInstancePswd)
#STAFCmdParamsList.append('-p %s' % dsInstanceAdminPort)
STAFCmdParamsList.append('--backend-name %s' % dsBackendID)
STAFCmdParamsList.append('--type local-db')
STAFCmdParamsList.append(baseDNOption)
STAFCmdParamsList.append('--set enabled:true')
STAFCmdParamsList.append('--set writability-mode:enabled')
STAFCmdParamsList.append('--set import-temp-directory:%s' % dsImportTempDir)
STAFCmdParamsList.append('--set db-directory:%s' % dsLdapDB)
STAFCmdParamsList.append('create-multimaster-domain')
STAFCmdParamsList.append('--provider-name "%s"' % providerName)
STAFCmdParamsList.append('--domain-name "%s"' % domainName)
STAFCmdParamsList.append('--set "base-dn:%s"' % replicationDn)
STAFCmdParamsList.append('--set "server-id:%s"' % serverId)
STAFCmdParamsList.append('--set "replication-server:%s"' % replServer)
e.g. get-backend-prop
e.g. --backend-name userRoot --property base-dn
ldapServer = '%s:%s' % (server.getHostname(),
replicationServer = server.getChangelogServer()
replServer = '%s:%s' % (server.getHostname(),
{ 'location' : server.getHostname(),
'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME),
'dsInstanceHost' : server.getHostname(),
'dsInstanceAdminPort' : server.getAdminPort(),
'dsInstanceDn' : server.getRootDn(),
'dsInstancePswd' : server.getRootPwd(),
ldapServer = '%s:%s' % (server.getHostname(),
replicationServer = server.getChangelogServer()
replServer = '%s:%s' % (server.getHostname(),
optionList.append('--set replication-server:%s' % replServer)
replServerList.append(replServer)
% (replServers, mainServer.getHostname(),
{ 'location' : mainServer.getHostname(),
% (mainServer.getDir(),OPENDSNAME),
'dsInstanceHost' : mainServer.getHostname(),
'dsInstanceAdminPort' : mainServer.getAdminPort(),
'dsInstanceDn' : mainServer.getRootDn(),
'dsInstancePswd' : mainServer.getRootPwd(),