def testDrbdHelper(self): opts = mock.Mock() self.enableDrbd() opts.drbd_helper = "/bin/true" helper = gnt_cluster._GetDrbdHelper(opts, self.enabled_disk_templates) self.assertEquals(opts.drbd_helper, helper)
def testNoDrbdHelper(self): opts = mock.Mock() self.disableDrbd() opts.drbd_helper = "/bin/true" helper = gnt_cluster._GetDrbdHelper(opts, None) self.assertEquals(opts.drbd_helper, helper)
def testDrbdNoHelper(self): opts = mock.Mock() self.enableDrbd() opts.drbd_helper = None helper = gnt_cluster._GetDrbdHelper(opts, self.enabled_disk_templates) self.assertEquals(None, helper)
def testNoTemplateInfoNoHelper(self): opts = mock.Mock() opts.drbd_helper = None helper = gnt_cluster._GetDrbdHelper(opts, None) self.assertEquals(None, helper)
def testNoTemplateInfoHelper(self): opts = mock.Mock() opts.drbd_helper = "/bin/true" helper = gnt_cluster._GetDrbdHelper(opts, None) self.assertEquals(opts.drbd_helper, helper)
def testDrbdHelper(self): opts = mock.Mock() self.enableDrbd() opts.drbd_helper = "/bin/true" helper = gnt_cluster._GetDrbdHelper(opts, self.enabled_disk_templates) self.assertEqual(opts.drbd_helper, helper)
def testDrbdNoHelper(self): opts = mock.Mock() self.enableDrbd() opts.drbd_helper = None helper = gnt_cluster._GetDrbdHelper(opts, self.enabled_disk_templates) self.assertEqual(None, helper)
def testNoDrbdHelper(self): opts = mock.Mock() self.disableDrbd() opts.drbd_helper = "/bin/true" helper = gnt_cluster._GetDrbdHelper(opts, None) self.assertEqual(opts.drbd_helper, helper)
def testNoTemplateInfoHelper(self): opts = mock.Mock() opts.drbd_helper = "/bin/true" helper = gnt_cluster._GetDrbdHelper(opts, None) self.assertEqual(opts.drbd_helper, helper)
def testNoTemplateInfoNoHelper(self): opts = mock.Mock() opts.drbd_helper = None helper = gnt_cluster._GetDrbdHelper(opts, None) self.assertEqual(None, helper)