|
@@ -11,12 +11,12 @@ class BaseKea implements KeaConfigInterface
|
|
/**
|
|
/**
|
|
* @var array
|
|
* @var array
|
|
*/
|
|
*/
|
|
- public $subnet4 = [];
|
|
|
|
|
|
+ private $subnet4 = [];
|
|
|
|
|
|
/**
|
|
/**
|
|
* @var array
|
|
* @var array
|
|
*/
|
|
*/
|
|
- public $hooks_libraries = [];
|
|
|
|
|
|
+ private $hooks_libraries = [];
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -31,7 +31,7 @@ class BaseKea implements KeaConfigInterface
|
|
$this->subnetConfig($data['subnets']);
|
|
$this->subnetConfig($data['subnets']);
|
|
}
|
|
}
|
|
|
|
|
|
- if (isset($data['dhcp']) && isset($data['library'])) {
|
|
|
|
|
|
+ if (isset($data['library'])) {
|
|
$this->hooksLibrariesConfig($data);
|
|
$this->hooksLibrariesConfig($data);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -41,7 +41,7 @@ class BaseKea implements KeaConfigInterface
|
|
'hooks-libraries' => $this->hooks_libraries,
|
|
'hooks-libraries' => $this->hooks_libraries,
|
|
],
|
|
],
|
|
'Logging' => $this->loggingConfig(),
|
|
'Logging' => $this->loggingConfig(),
|
|
- ]);
|
|
|
|
|
|
+ ], JSON_PRETTY_PRINT);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -75,7 +75,7 @@ class BaseKea implements KeaConfigInterface
|
|
'library' => $data['library'],
|
|
'library' => $data['library'],
|
|
];
|
|
];
|
|
|
|
|
|
- $dhcpModelParams = $dhcp->getDhcpModel()->getData('parameters');
|
|
|
|
|
|
+ $dhcpModelParams = $dhcp ? $dhcp->getDhcpModel()->getData('parameters') : null;
|
|
|
|
|
|
$option122 = isset($dhcpModelParams['option122']) ? $dhcpModelParams['option122'] : null;
|
|
$option122 = isset($dhcpModelParams['option122']) ? $dhcpModelParams['option122'] : null;
|
|
$ip = isset($dhcpModelParams['ip']) ? $dhcpModelParams['ip'] : null;
|
|
$ip = isset($dhcpModelParams['ip']) ? $dhcpModelParams['ip'] : null;
|