def test_list_hosts(self): """Verify that the volume hosts are returned.""" hosts = os_hosts._list_hosts(self.req) self.assertEqual(hosts, LIST_RESPONSE) cinder_hosts = os_hosts._list_hosts(self.req, "cinder-volume") expected = [host for host in LIST_RESPONSE if host["service"] == "cinder-volume"] self.assertEqual(cinder_hosts, expected)
def test_list_hosts(self): """Verify that the volume hosts are returned.""" hosts = os_hosts._list_hosts(self.req) self.assertEqual(hosts, LIST_RESPONSE) cinder_hosts = os_hosts._list_hosts(self.req, 'cinder-volume') expected = [host for host in LIST_RESPONSE if host['service'] == 'cinder-volume'] self.assertEqual(cinder_hosts, expected)
def test_list_hosts(self): """Verify that the volume hosts are returned.""" hosts = os_hosts._list_hosts(self.req) self.assertEqual(LIST_RESPONSE, hosts) cinder_hosts = os_hosts._list_hosts(self.req, constants.VOLUME_BINARY) expected = [host for host in LIST_RESPONSE if host['service'] == constants.VOLUME_BINARY] self.assertEqual(expected, cinder_hosts)
def test_list_hosts(self): """Verify that the volume hosts are returned.""" hosts = os_hosts._list_hosts(self.req) self.assertEqual(LIST_RESPONSE, hosts) cinder_hosts = os_hosts._list_hosts(self.req, 'cinder-volume') expected = [host for host in LIST_RESPONSE if host['service'] == 'cinder-volume'] self.assertEqual(expected, cinder_hosts)
def test_list_hosts_with_zone(self): req = FakeRequestWithcinderZone() hosts = os_hosts._list_hosts(req) self.assertEqual(hosts, LIST_RESPONSE)