[openstack-dev] [Nova] Thoughts about how to enforce DB and object models mapping
Sylvain Bauza
sbauza at redhat.com
Fri Jun 6 07:52:08 UTC 2014
Hi,
By working on providing a new scheduler client for compute nodes, I
began to use the ComputeNode object instead of placing a call to
conductor directly.
Unfortunately, I recently discovered that some changes have been done in
the DB model for ComputeNode that haven't been populated on the
corresponding Object model.
As there is no current code in Nova using ComputeNode objects, I can
understand that, as the first user of the object, I have to find the
lacks and fix them, so I'm OK with that.
That said, I'm thinking about how we could make sure that any change in
a DB model would have to be also done on the corresponding Object model.
A possible approach would be to create a test class for each object and
provide a check against the DB model to make sure that at least the
fields are all there.
Does that sound reasonable to you ? Should we provide another way for
gating this ?
Thanks,
-Sylvain
More information about the OpenStack-dev
mailing list