|
@@ -71,7 +71,7 @@ class BaseKea implements KeaConfigInterface
|
|
public function getConfig($data = array(), $logging = false)
|
|
public function getConfig($data = array(), $logging = false)
|
|
{
|
|
{
|
|
if (isset($data['subnets'])) {
|
|
if (isset($data['subnets'])) {
|
|
- $this->subnetConfig($data['subnets']);
|
|
|
|
|
|
+ $this->subnetConfig($data['subnets'], $data['reservations']);
|
|
}
|
|
}
|
|
|
|
|
|
if (isset($data['library'])) {
|
|
if (isset($data['library'])) {
|
|
@@ -98,7 +98,7 @@ class BaseKea implements KeaConfigInterface
|
|
/**
|
|
/**
|
|
* @param array $subnets
|
|
* @param array $subnets
|
|
*/
|
|
*/
|
|
- private function subnetConfig($subnets)
|
|
|
|
|
|
+ private function subnetConfig($subnets, $reservations)
|
|
{
|
|
{
|
|
foreach ($subnets as $subnet) {
|
|
foreach ($subnets as $subnet) {
|
|
$pools = [];
|
|
$pools = [];
|
|
@@ -110,9 +110,9 @@ class BaseKea implements KeaConfigInterface
|
|
|
|
|
|
$hostType = $subnet->getAllowedHostType();
|
|
$hostType = $subnet->getAllowedHostType();
|
|
$client_class = '';
|
|
$client_class = '';
|
|
- if ($hostType) {
|
|
|
|
|
|
+ /* if ($hostType) {
|
|
$client_class = $hostType->getShortname();
|
|
$client_class = $hostType->getShortname();
|
|
- }
|
|
|
|
|
|
+ } */
|
|
if ($subnet->getStatus() != HostStatus::STATE_NONE && $subnet->getStatus() != '') {
|
|
if ($subnet->getStatus() != HostStatus::STATE_NONE && $subnet->getStatus() != '') {
|
|
if ($client_class != '') {
|
|
if ($client_class != '') {
|
|
$client_class .= '-';
|
|
$client_class .= '-';
|
|
@@ -125,6 +125,10 @@ class BaseKea implements KeaConfigInterface
|
|
'pools' => $pools,
|
|
'pools' => $pools,
|
|
];
|
|
];
|
|
|
|
|
|
|
|
+ if(isset($reservations[$subnet->getId()])) {
|
|
|
|
+ $subnetConf['reservations'] = $reservations[$subnet->getId()];
|
|
|
|
+ }
|
|
|
|
+
|
|
$nextServer = $subnet->getNextServer();
|
|
$nextServer = $subnet->getNextServer();
|
|
if ($nextServer != '') {
|
|
if ($nextServer != '') {
|
|
$subnetConf['next-server'] = $nextServer;
|
|
$subnetConf['next-server'] = $nextServer;
|
|
@@ -162,7 +166,7 @@ class BaseKea implements KeaConfigInterface
|
|
private function hooksLibrariesConfig($data)
|
|
private function hooksLibrariesConfig($data)
|
|
{
|
|
{
|
|
$this->hooks_libraries = [
|
|
$this->hooks_libraries = [
|
|
- [
|
|
|
|
|
|
+ /* [
|
|
'library' => '/opt/hooks/mysql/kea-hook-flowdat3-mysql.so',
|
|
'library' => '/opt/hooks/mysql/kea-hook-flowdat3-mysql.so',
|
|
'parameters' => [
|
|
'parameters' => [
|
|
"host" => $data['db']['host'],
|
|
"host" => $data['db']['host'],
|
|
@@ -170,7 +174,7 @@ class BaseKea implements KeaConfigInterface
|
|
"user" => $data['db']['user'],
|
|
"user" => $data['db']['user'],
|
|
"password" => $data['db']['password'],
|
|
"password" => $data['db']['password'],
|
|
]
|
|
]
|
|
- ],
|
|
|
|
|
|
+ ], */
|
|
[
|
|
[
|
|
"library" => "/opt/hooks/amqp/kea-hook-flowdat3.so",
|
|
"library" => "/opt/hooks/amqp/kea-hook-flowdat3.so",
|
|
"parameters" => [
|
|
"parameters" => [
|