Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
meklis committed Jun 11, 2024
1 parent c34e5e4 commit 05fb11a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions src/Modules/CData/FD16xxV3/OntRebootTelnetGpon.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,8 @@ public function run($filter = [])
if(!$interface['id']) {
throw new \Exception("Incorrect ONU number");
}
if (!preg_match('/^(pon|xge|ge)([0-9])\/([0-9])\/([0-9]){1,}\:?([0-9]{1,3})?\/?([0-9]{1,3})?$/', $interface['name'], $m)) {
throw new \Exception("Interface {$filter['interface']} not supported!");
}
if(count($m) < 5) {
throw new \Exception("Allow to reboot only ONTs");
}
$this->_exe("interface gpon 0/0");
$this->_exe("ont reboot {$m[4]} {$m[5]}");
$this->_exe("ont reboot {$interface['_port']} {$interface['_onu']}");
$this->response = true;
return $this;
}
Expand Down
8 changes: 1 addition & 7 deletions src/Modules/CData/FD16xxV3/OntResetTelnetGpon.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,8 @@ public function run($filter = [])
if(!$interface['id']) {
throw new \Exception("Incorrect ONU number");
}
if (!preg_match('/^(pon|xge|ge)([0-9])\/([0-9])\/([0-9]){1,}\:?([0-9]{1,3})?\/?([0-9]{1,3})?$/', $interface['name'], $m)) {
throw new \Exception("Interface {$filter['interface']} not supported!");
}
if(count($m) < 5) {
throw new \Exception("Allow to reboot only ONTs");
}
$this->_exe("interface gpon 0/0");
$this->_exe("ont restore factory {$m[4]} {$m[5]}");
$this->_exe("ont restore factory {$interface['_port']} {$interface['_onu']}");
$this->response = true;
return $this;
}
Expand Down

0 comments on commit 05fb11a

Please sign in to comment.