Commit 560c03ed authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Fix the mocked ConfigWriter to pass DRBD minors methods

.. since for unit tests, we don't have access to WConfd, which now
implements the functionality.
Signed-off-by: default avatarPetr Pudlak <>
Reviewed-by: default avatarKlaus Aehlig <>
parent 9271c98e
......@@ -547,6 +547,15 @@ class ConfigMock(config.ConfigWriter):
cluster.enabled_disk_templates = list(enabled_disk_templates)
cluster.ipolicy[constants.IPOLICY_DTS] = list(enabled_disk_templates)
def ComputeDRBDMap(self):
return dict((node_uuid, {}) for node_uuid in self._ConfigData().nodes)
def AllocateDRBDMinor(self, node_uuids, inst_uuid):
return map(lambda _: 0, node_uuids)
def _UnlockedReleaseDRBDMinors(self, inst_uuid):
def _CreateConfig(self):
self._config_data = objects.ConfigData(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment