commit 1c819c3e37e6019464ed59d90bf3d8c83581202d
Author: Matt Van Dijk <email address hidden>
Date: Wed Oct 14 14:47:11 2015 -0400
Improve guestagent datastore models
All validation of requests is currently done against the MySQL datastore
models. In order to switch to using datastore extensions for validation
the models need to be refactored.
The current approach to guestagent/db/models.py is getting unruly and
is difficult to apply to other datastores.
This change moves the models from the guestagent package to the common
package, so that the extensions package can use it in the future.
That is: guestagent/db/models.py -> common/db/models.py
The generic models are separated from the datastore-specific models. For
datastores with custom models the classes have been moved to their own
sub-package.
Example: common/db/mysql/models.py
Using this new approach any datastores that want custom models just need
to create packages similar to the common/db/mysql/ package.
The code references to these models have all been updated. Non-MySQL
based datastores using these references have been switched to using the
generic models.
Reviewed: https:/ /review. openstack. org/236082 /git.openstack. org/cgit/ openstack/ trove/commit/ ?id=1c819c3e37e 6019464ed59d90b f3d8c83581202d
Committed: https:/
Submitter: Jenkins
Branch: master
commit 1c819c3e37e6019 464ed59d90bf3d8 c83581202d
Author: Matt Van Dijk <email address hidden>
Date: Wed Oct 14 14:47:11 2015 -0400
Improve guestagent datastore models
All validation of requests is currently done against the MySQL datastore
models. In order to switch to using datastore extensions for validation
the models need to be refactored.
The current approach to guestagent/ db/models. py is getting unruly and
is difficult to apply to other datastores.
This change moves the models from the guestagent package to the common db/models. py -> common/db/models.py
package, so that the extensions package can use it in the future.
That is: guestagent/
The generic models are separated from the datastore-specific models. For db/mysql/ models. py
datastores with custom models the classes have been moved to their own
sub-package.
Example: common/
Using this new approach any datastores that want custom models just need
to create packages similar to the common/db/mysql/ package.
The code references to these models have all been updated. Non-MySQL
based datastores using these references have been switched to using the
generic models.
The tests for these models have been improved.
Change-Id: If321202a3ec4ab 0f57ee8e516b885 a8307d464b7
Partial-Bug: 1498573