Add hacking test to block cross-virt driver code usage
The baremetal driver has been accessing some libvirt driver private classes and config variables. Any code that is intended to be shared across virt drivers should be in a common package instead. Add a hacking file to enforce this for imports and config options so that no further problems like this are made in the future. NB, this skips verification of the baremetal driver until bugs 1261826 and 1261827 are fixed, or the baremetal driver is removed, whichever comes first. Change-Id: Ifbfe597795795a847830f9bd937dc459cd37d118 Closes-Bug: #1261842
This commit is contained in:
@@ -13,6 +13,12 @@ Nova Specific Commandments
|
||||
This enforces a guideline defined in ``nova.openstack.common.db.sqlalchemy.session``
|
||||
- [N310] timeutils.utcnow() wrapper must be used instead of direct calls to
|
||||
datetime.datetime.utcnow() to make it easy to override its return value in tests
|
||||
- [N311] importing code from other virt drivers forbidden
|
||||
Code that needs to be shared between virt drivers should be moved
|
||||
into a common module
|
||||
- [N312] using config vars from other virt drivers forbidden
|
||||
Config parameters that need to be shared between virt drivers
|
||||
should be moved into a common module
|
||||
- [N123] vim configuration should not be kept in source files.
|
||||
|
||||
Creating Unit Tests
|
||||
|
||||
Reference in New Issue
Block a user