RackTables: master 90d512eb

Author Committer Branch Timestamp Parent
infrastation infrastation master 2017-05-08 16:38:48 master 6f949688
Changeset improve the L2 address constraint check

Add a new function assertUniqueL2Addresses(), which accepts a list of
L2 addresses and tests them all with at most one SQL query. It also
incorporates the existing convention of an empty L2 address being OK,
such that the calling functions now have less checks to make.

Make alreadyUsedL2Address() just a wrapper for the above. Switch
commitAddPort(), commitUpdatePort() and syncObjectPorts() to the new
function. Since syncObjectPorts() does not throw IRAE anymore, add
missing try/catch blocks to doSwitchSNMPmining() and doPDUSNMPmining().
mod - wwwroot/inc/functions.php Diff File
mod - wwwroot/inc/snmp.php Diff File
mod - wwwroot/inc/database.php Diff File