'For backwards-compatibility with dict-based objects.
NOTE(sbauza): May be removed in the future.'

def _iteritems(self):

    for name in self._obj.obj_fields:
        if (self._obj.obj_attr_is_set(name) or (name in self._obj.obj_extra_fields)):
            if (name == 'id'):
                (yield (name, self.id))
            elif (name == 'host'):
                (yield (name, self.host))
            else:
                (yield (name, getattr(self._obj, name)))
