mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

andrug
11.52.2007 4b8f425bb8ea124dd4c1b5af8aef7b396e96a0e1
allow silent mode (default value) for runcmd() and addEntry()
2 files modified
33 ■■■■ changed files
opends/tests/shared/functions/ldap.xml 19 ●●●●● patch | view | raw | blame | history
opends/tests/shared/functions/utils.xml 14 ●●●● patch | view | raw | blame | history
opends/tests/shared/functions/ldap.xml
@@ -83,8 +83,14 @@
        <function-arg-description>
          Expected return code value. Default value is 0
        </function-arg-description>
        <function-arg-property name="type" value="integer"/>
        </function-arg-def>
        <function-arg-property name="type" value="integer"/>
        </function-arg-def>
      <function-arg-def name="verbose" type="optional" default="False">
        <function-arg-description>
          Display (or not) output. Default is True
        </function-arg-description>
        <function-arg-property name="type" value="integer"/>
        </function-arg-def>
    </function-map-args>
    <sequence>
      <!-- Local variables -->
@@ -117,10 +123,11 @@
        STAFCmdParams=' '.join(STAFCmdParamsList)
      </script>
      <call function="'runCommand'">
        { 'command'   : STAFCmd,
          'arguments' : STAFCmdParams,
          'location'  : mylocation,
          'name'      : 'Add Entry From LDIF'
        { 'command'     : STAFCmd,
          'arguments'   : STAFCmdParams,
          'location'    : mylocation,
          'name'        : 'Add Entry From LDIF',
          'verbose'     : verbose
        }
      </call>
      <script>
opends/tests/shared/functions/utils.xml
@@ -1430,6 +1430,12 @@
          The duration that the process is allowed to run
        </function-arg-description>
      </function-arg-def>      
      <function-arg-def name="verbose" default="False" type="optional">
        <function-arg-description>
          A boolean (use True or False here, case matters) to output the
          outputs of the command
        </function-arg-description>
      </function-arg-def>
    </function-map-args>
    <sequence>
      <script>
@@ -1461,9 +1467,11 @@
          </process>
      </block>
      
      <message level="'info'">
        '%s: Command returned:\n%s' % (_id,STAXResult[0][1])
      </message>
      <if expr="verbose == True">
        <message level="'info'">
          '%s: Command returned:\n%s' % (_id,STAXResult[0][1])
        </message>
      </if>
      <script>
        def dig(var):
          try: