Files
librenms-librenms/LibreNMS/Exceptions/HostSysnameExistsException.php
Tony Murray 1bfd411995 New device:add code (#13842)
* New device:add code
pre-requisite for updating other code paths
includes option to set display name
separate validation code from device creation

* remove duplicate community and v3 creds

* style fixes

* some lint fixes

* fix phpstan

* Exception cleanup
improved messages and translations

* port association mode to enum
well, pseudo enum

* defaults and cleanups

* fixed/improved validation messages

* fix tests

* fix stupid ide refactor mistake

* lint fixes
2022-03-12 16:14:32 -06:00

29 lines
562 B
PHP

<?php
namespace LibreNMS\Exceptions;
class HostSysnameExistsException extends HostExistsException
{
/**
* @var string
*/
public $hostname;
/**
* @var string
*/
public $sysname;
public function __construct(string $hostname, string $sysname)
{
$this->hostname = $hostname;
$this->sysname = $sysname;
$message = trans('exceptions.host_exists.sysname_exists', [
'hostname' => $hostname,
'sysname' => $sysname,
]);
parent::__construct($message);
}
}