[openstack-dev] [vitrage] entity_type in make_pickleable

Yujun Zhang zhangyujun+zte at gmail.com
Wed Nov 30 06:32:21 UTC 2016


Several properties are added to entity in `DriverBase.make_pickleable`[1]
but the existence check is only applied in `_add_entity_type`.

I think it may not be necessary after we prepended vitrage namespace[2]. I
could not think of a scenario to let user shadow the built-in `entity_type`.

Is there any particular reason for keeping it? Or should we remove it?

@staticmethod
def _add_entity_type(entity, entity_type):
    if DSProps.ENTITY_TYPE not in entity:
        entity[DSProps.ENTITY_TYPE] = entity_type


[1]:
https://github.com/openstack/vitrage/blob/master/vitrage/datasources/driver_base.py#L54

[2]: https://review.openstack.org/#/c/399417/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20161130/f49f8760/attachment.html>


More information about the OpenStack-dev mailing list