def testInstNodesNoDisks(self):
    # construct instance
    cfg = self._get_object_mock()
    inst = self._create_instance(cfg)
    cfg.AddInstance(inst, "my-job")

    # No disks
    all_nodes = cfg.GetInstanceNodes(inst.uuid)
    secondary_nodes = cfg.GetInstanceSecondaryNodes(inst.uuid)
    self._GenericNodesCheck(inst, all_nodes, secondary_nodes)
    self.assertEqual(len(secondary_nodes), 0)
    self.assertEqual(set(all_nodes), set([inst.primary_node]))
    self.assertEqual(cfg.GetInstanceLVsByNode(inst.uuid), {
      inst.primary_node: [],
      })
Test all_nodes/secondary_nodes when there are no disks
dataset/ETHPy150Open ganeti/ganeti/test/py/ganeti.config_unittest.py/TestConfigRunner.testInstNodesNoDisks