Refactor the datastore manager classes
There is a large amount of boiler-plate code in each datastore manager. As more managers are added, the time involved in maintaining all this code wil continue to grow. To alleviate this, a base manager class has been added where all common code can reside. The initial refactoring just moved some of the obvious code (such as rpc_ping and update_status) into the base class, along with defining properties that can be used to further abstract functionality going forward. The issue of having instances move in-and-out of ACTIVE state has also been fixed by adding a flag file that is written by the base class once prepare has finished successfully. Closes-Bug: #1482795 Closes-Bug: #1487233 Partially Implements: blueprint datastore-manager-refactor Change-Id: I603cf2ddebab1d7a5c874cd66431f803aaee2d42
This commit is contained in:
1096
trove/guestagent/datastore/mysql_common/service.py
Normal file
1096
trove/guestagent/datastore/mysql_common/service.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user