.. since for unit tests, we don't have access to WConfd, which now
implements the functionality.

Signed-off-by: Petr Pudlak <[email protected]>
---
 test/py/cmdlib/testsupport/config_mock.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/py/cmdlib/testsupport/config_mock.py 
b/test/py/cmdlib/testsupport/config_mock.py
index 932b0ba..2e1e1de 100644
--- a/test/py/cmdlib/testsupport/config_mock.py
+++ b/test/py/cmdlib/testsupport/config_mock.py
@@ -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):
+    pass
+
   def _CreateConfig(self):
     self._config_data = objects.ConfigData(
       version=constants.CONFIG_VERSION,
-- 
1.9.1.423.g4596e3a

Reply via email to