"Fossies" - the Fresh Open Source Software Archive

Member "gvmd-9.0.0/src/wizards/get_tasks_deep.xml" (11 Oct 2019, 5327 Bytes) of package /linux/misc/openvas/gvmd-9.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!--
    2 Copyright (C) 2013-2018 Greenbone Networks GmbH
    3 
    4 SPDX-License-Identifier: GPL-2.0-or-later
    5 
    6 This program is free software; you can redistribute it and/or
    7 modify it under the terms of the GNU General Public License
    8 as published by the Free Software Foundation; either version 2
    9 of the License, or (at your option) any later version.
   10 
   11 This program is distributed in the hope that it will be useful,
   12 but WITHOUT ANY WARRANTY; without even the implied warranty of
   13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   14 GNU General Public License for more details.
   15 
   16 You should have received a copy of the GNU General Public License
   17 along with this program; if not, write to the Free Software
   18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   19 -->
   20 
   21 <!--
   22   This wizard gets the details of tasks and all associated resources.
   23 
   24   Optional parameters:
   25   task_id : The ID of the task to get.
   26   name :    The name of the task to get, used if no task_id is given.
   27   filter :  A filter term to select the tasks with, used if no task_id or name
   28              is given.
   29   include_report_formats : Whether to also get a list of all report formats.
   30   include_configs : Whether to also get a list of all scan configs.
   31 
   32   To run this wizard, use the GMP command RUN_WIZARD.
   33   Please see the GMP documentation for details.
   34  -->
   35 
   36 <wizard>
   37   <read_only/>
   38   <step>
   39     <command>
   40       <xsl:stylesheet
   41           version="1.0"
   42           xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   43         <xsl:output
   44           method="xml"
   45           encoding="UTF-8"/>
   46         <xsl:template match="/">
   47           <xsl:choose>
   48             <xsl:when test="/wizard/params/param[name='task_id']/id != ''">
   49               <get_tasks task_id="{/wizard/params/param[name='task_id']/value}"/>
   50             </xsl:when>
   51             <xsl:when test="/wizard/params/param[name='name']/value != ''">
   52               <get_tasks filter="name={/wizard/params/param[name='name']/value}"/>
   53             </xsl:when>
   54             <xsl:when test="/wizard/params/param[name='filter']/value != ''">
   55               <get_tasks filter="{/wizard/params/param[name='filter']/value}"/>
   56             </xsl:when>
   57             <xsl:otherwise>
   58               <get_tasks />
   59             </xsl:otherwise>
   60           </xsl:choose>
   61         </xsl:template>
   62       </xsl:stylesheet>
   63     </command>
   64   </step>
   65   <step>
   66     <command>
   67       <xsl:stylesheet
   68           version="1.0"
   69           xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   70         <xsl:output
   71           method="xml"
   72           encoding="UTF-8"/>
   73         <xsl:template match="/">
   74           <commands>
   75             <xsl:for-each select="/wizard/previous/response/get_tasks_response/task">
   76               <commands>
   77                 <get_tasks task_id="{@id}" details="1"/>
   78                 <get_targets target_id="{target/@id}"/>
   79               </commands>
   80             </xsl:for-each>
   81           </commands>
   82         </xsl:template>
   83       </xsl:stylesheet>
   84     </command>
   85   </step>
   86   <step>
   87     <command>
   88       <xsl:stylesheet
   89           version="1.0"
   90           xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   91         <xsl:output
   92           method="xml"
   93           encoding="UTF-8"/>
   94         <xsl:template match="/">
   95           <xsl:variable name="response" select="/wizard/previous/response/commands_response"/>
   96           <commands>
   97             <xsl:if test="/wizard/params/param[name='include_report_formats']/value">
   98               <get_report_formats/>
   99             </xsl:if>
  100             <xsl:if test="/wizard/params/param[name='include_configs']/value">
  101               <get_configs/>
  102             </xsl:if>
  103             <xsl:if test="/wizard/params/param[name='include_scanners']/value">
  104               <get_scanners/>
  105             </xsl:if>
  106             <xsl:for-each select="$response/commands_response">
  107               <commands>
  108                 <get_tasks task_id="{get_tasks_response/task/@id}" details="1"/>
  109 
  110                 <get_targets target_id="{get_targets_response/target/@id}" details="1"/>
  111                 <xsl:if test="get_targets_response/target/ssh_lsc_credential/@id != ''">
  112                   <get_credentials credential_id="{get_targets_response/target/ssh_lsc_credential/@id}"/>
  113                 </xsl:if>
  114                 <xsl:if test="get_targets_response/target/smb_lsc_credential/@id != ''">
  115                   <get_credentials credential_id="{get_targets_response/target/smb_lsc_credential/@id}"/>
  116                 </xsl:if>
  117 
  118                 <xsl:if test="get_tasks_response/slave/@id != ''">
  119                   <get_slaves slave_id="{get_tasks_response/slave/@id}"/>
  120                 </xsl:if>
  121 
  122                 <xsl:if test="get_tasks_response/schedule/@id != ''">
  123                   <get_schedule lsc_credential_id="{get_tasks_response/schedule/@id}"/>
  124                 </xsl:if>
  125 
  126                 <xsl:if test="get_tasks_response/schedule/@id != ''">
  127                   <get_schedule lsc_credential_id="{get_tasks_response/schedule/@id}"/>
  128                 </xsl:if>
  129 
  130                 <xsl:for-each select="get_tasks_response/task/reports/report">
  131                   <get_reports report_id="{@id}" details="1" levels="hmlgf" />
  132                 </xsl:for-each>
  133               </commands>
  134             </xsl:for-each>
  135           </commands>
  136         </xsl:template>
  137       </xsl:stylesheet>
  138     </command>
  139   </step>
  140 
  141 </wizard>