Fix SQL Error with fixed ips under devstack/postgresql

Postgresql does not allow sql that mix integer and booleans.
Switch to check if deleted flag is set to 0

Fixes LP# 1109889

Change-Id: Icf03aa9591d398ba7d12f0db91e43df140e0df50
Merge "Fix SQL Error with fixed ips under devstack/postgresql"