def testRightHypervisor(self): dictMaker = lambda hyName: { "instance":{"hypervisor":hyName}, "node":{}, "group":{}, "hvParams":{}, "beParams":{}, } call = { 'i1':dictMaker("a"), 'i2':dictMaker("b"), } res = backend.GetInstanceConsoleInfo(call, get_hv_fn=self._GetHypervisor) self.assertTrue(res["i1"]["kind"] == "aHy") self.assertTrue(res["i2"]["kind"] == "bHy")
def perspective_instance_console_info(params): """Query information on how to get console access to instances """ return backend.GetInstanceConsoleInfo(params)