default host to service name instead of uuid
The host associated with a service looks like it really should be a hostname and not a uuid in the current code. This changes it to default to the name of the service started if nothing else is specified in the test fixture. It then updates all samples to expect a thing that looks like a name, and not a uuid. This also allows us to drop the special casing of this function for aggregate testing. Change-Id: I37415b89b733c021daa38040fee447cf3934b821
This commit is contained in:
parent
5f343ea96c
commit
998bd8d513
@ -19,7 +19,6 @@ from __future__ import absolute_import
|
||||
|
||||
import logging as std_logging
|
||||
import os
|
||||
import uuid
|
||||
import warnings
|
||||
|
||||
import fixtures
|
||||
@ -47,7 +46,10 @@ class ServiceFixture(fixtures.Fixture):
|
||||
|
||||
def __init__(self, name, host=None, **kwargs):
|
||||
name = name
|
||||
host = host or uuid.uuid4().hex
|
||||
# If not otherwise specified, the host will default to the
|
||||
# name of the service. Some things like aggregates care that
|
||||
# this is stable.
|
||||
host = host or name
|
||||
kwargs.setdefault('host', host)
|
||||
kwargs.setdefault('binary', 'nova-%s' % name)
|
||||
self.kwargs = kwargs
|
||||
|
Loading…
Reference in New Issue
Block a user