Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #6
0
 def test_list_hosts_with_zone(self):
     req = FakeRequestWithcinderZone()
     hosts = os_hosts._list_hosts(req)
     self.assertEqual(hosts, LIST_RESPONSE)
Example #7
0
 def test_list_hosts_with_zone(self):
     req = FakeRequestWithcinderZone()
     hosts = os_hosts._list_hosts(req)
     self.assertEqual(hosts, LIST_RESPONSE)