|
@@ -86,10 +86,10 @@ if ($row['should_re_ztp'] == 2) {
|
|
|
echo "! RE-ZTP\r\n";
|
|
|
$logger->info("Sending RE-ZTP message for switch {$sn}");
|
|
|
|
|
|
- $sql = 'UPDATE DEVICE_MAP SET should_re_ztp=? WHERE serial_number=?';
|
|
|
+ $sql = 'UPDATE DEVICE_MAP SET should_re_ztp=?, provisioned_status=?, device_status=? WHERE serial_number=?';
|
|
|
try {
|
|
|
$sth = $dbh->prepare($sql);
|
|
|
- $res = $sth->execute(array(0, $sn));
|
|
|
+ $res = $sth->execute(array(0, PROVISION_IN_PROGRESS, REACHABILITY_NEVER_REACHABLE, $sn));
|
|
|
} catch (PDOException $e) {
|
|
|
$logger->crit("Failed to reset re-ZTP bit for {$sn}: {$e->getMessage()}");
|
|
|
}
|