def _refresh_from_db(self, context):
        """Make our zone state map match the db."""
        # Add/update existing zones ...
        zones = db.zone_get_all(context)
        existing = self.zone_states.keys()
        db_keys = []
        for zone in zones:
            db_keys.append(zone.id)
            if zone.id not in existing:
                self.zone_states[zone.id] = ZoneState()
            self.zone_states[zone.id].update_credentials(zone)

        # Cleanup zones removed from db ...
        keys = self.zone_states.keys()  # since we're deleting
        for zone_id in keys:
            if db_keys not in zone_id:
                del self.zone_states[zone_id]
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/scheduler/zone_manager.py/ZoneManager._refresh_from_db/swapped operands of `not in`