[openstack-dev] [neutron][ovo] Need help to understand the exception of NeutronSyntheticFieldMultipleForeignKeys

taget qiaoliyong at gmail.com
Thu Aug 18 03:08:12 UTC 2016


hi neutron ovo hacker:

Recently I am working on neutron OVO blue print, and found there are 
some blocking (slow progress) issues when tring
to add new object to Neutron.

When I try to add Flavor related object on [1], I need to add 2 
foreign_keys to FlavorServiceProfileBinding :

flavor_id: Flavor.id
service_profile_id: ServiceProfile.id

For ServiceProfile and Flavor object, FlavorServiceProfileBinding is a 
synthetic_fields, we refer FlavorServiceProfileBinding in [2],
but in currently object base implementation, we only allow 
synthetic_fields to only have 1 foreignkeys[3].

can anyone help to clarify this? or give some guide on how to overcome 
[1]? If there's anyone who working on to fix it too?


P. S There are other use case for multiple foreign keys [4]
[1]https://review.openstack.org/#/c/306685/6/neutron/db/flavor/models.py@45
[2]https://github.com/openstack/neutron/blob/9.0.0.0b2/neutron/db/flavors_db.py#L86
[3]https://github.com/openstack/neutron/blob/9.0.0.0b2/neutron/objects/base.py#L429-L430
[4]https://review.openstack.org/#/c/307964/20/neutron/objects/router.py@33

-- 
Best Regards,
Eli Qiao (乔立勇), Intel OTC.




More information about the OpenStack-dev mailing list