Source
xxxxxxxxxx
$this->link = 'host_discovery.php?filter_set=1&&context=template&filter_hostids%5B0%5D='.self::INHERITANCE_TEMPLATEID;
<?php
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
require_once dirname(__FILE__).'/../common/testFormPreprocessing.php';
require_once dirname(__FILE__).'/../../include/helpers/CDataHelper.php';
/**
* @backup items
*/
class testFormPreprocessingLowLevelDiscovery extends testFormPreprocessing {
public $link = 'host_discovery.php?context=host&filter_set=1&filter_hostids%5B0%5D='.self::HOSTID;
public $ready_link = 'host_discovery.php?form=update&context=host&itemid=';
public $button = 'Create discovery rule';
public $success_message = 'Discovery rule created';
public $fail_message = 'Cannot add discovery rule';
const IS_LLD = true;
const HOSTID = 40001;
const INHERITANCE_TEMPLATEID = 15000; // 'Inheritance test template'
const INHERITANCE_HOSTID = 15001; // 'Template inheritance test host'
const INHERITANCE_LLDID = 15016; // 'Template inheritance test host' -> 'testInheritanceDiscoveryRule'
const CLONE_LLDID = 133800; // 'Simple form test host' -> 'testFormDiscoveryRule1'
const CLONE_PREPROCESSING = [
[
'type' => '5',
'params' => "regular expression pattern \noutput template",
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '11',
'params' => '/document/item/value/text()',
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '12',
'params' => '$.document.item.value parameter.',
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '15',
'params' => 'regular expression pattern for not matching',
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '16',
'params' => '/json/path',
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '17',
'params' => '/xml/path',
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '20',
'params' => '7',
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '24',
'params' => ".\n/\n1",
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '25',