#505 device renumber should update device port properties and device skips

This commit is contained in:
Oliver Gorwits
2019-03-02 15:00:18 +00:00
parent 1265bc8470
commit ca3fd8f466

View File

@@ -262,20 +262,25 @@ sub renumber {
foreach my $set (qw/ foreach my $set (qw/
DeviceIp DeviceIp
DeviceModule DeviceModule
DevicePower
DeviceVlan
DevicePort DevicePort
DevicePortLog DevicePortLog
DevicePortPower DevicePortPower
DevicePortProperties
DevicePortSsid DevicePortSsid
DevicePortVlan DevicePortVlan
DevicePortWireless DevicePortWireless
DevicePower
DeviceVlan
/) { /) {
$schema->resultset($set) $schema->resultset($set)
->search({ip => $old_ip}) ->search({ip => $old_ip})
->update({ip => $new_ip}); ->update({ip => $new_ip});
} }
$schema->resultset('DeviceSkip')
->search({device => $old_ip})
->update({device => $new_ip});
$schema->resultset('DevicePort') $schema->resultset('DevicePort')
->search({remote_ip => $old_ip}) ->search({remote_ip => $old_ip})
->update({remote_ip => $new_ip}); ->update({remote_ip => $new_ip});