Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    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)
Exemplo n.º 4
0
    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)
Exemplo n.º 5
0
    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)
Exemplo n.º 6
0
 def test_list_hosts_with_zone(self):
     req = FakeRequestWithcinderZone()
     hosts = os_hosts._list_hosts(req)
     self.assertEqual(hosts, LIST_RESPONSE)
Exemplo n.º 7
0
 def test_list_hosts_with_zone(self):
     req = FakeRequestWithcinderZone()
     hosts = os_hosts._list_hosts(req)
     self.assertEqual(hosts, LIST_RESPONSE)