* Ospf metrics fix If the device gave an invalid IP for metrics, it would fail. Fix this issue, and optimize the sql queries so less are needed. * Apply fixes from StyleCI --------- Co-authored-by: StyleCI Bot <bot@styleci.io>