Exemplo n.º 1
0
 def test_get_by_host_and_binary_raises(self):
     self._test_query('service_get_by_host_and_binary',
                      'get_by_host_and_binary',
                      'fake-host',
                      'fake-binary',
                      db_exception=exception.HostBinaryNotFound(
                          host='fake-host', binary='fake-binary'))
Exemplo n.º 2
0
 def service_get_by_host_binary(context, host, binary):
     for service in services:
         if service['host'] == host and service['binary'] == binary:
             return service
     raise exception.HostBinaryNotFound(host=host, binary=binary)