diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-02-10 22:00:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-02-10 22:00:38 +0000 |
| commit | 4e31ecb49c743090f8dd988e3480ad2f6f4208cf (patch) | |
| tree | ec73f91fcbd7cc0c1fd32f8d1d6cbacfaf103d04 /nova/api | |
| parent | 246fbd403395efce01cdd53706921fb235080e42 (diff) | |
| parent | 6a823d0e1670507a6f4674d5f70e8d9ce0b4c3df (diff) | |
| download | nova-4e31ecb49c743090f8dd988e3480ad2f6f4208cf.tar.gz nova-4e31ecb49c743090f8dd988e3480ad2f6f4208cf.tar.xz nova-4e31ecb49c743090f8dd988e3480ad2f6f4208cf.zip | |
Merge "Ensures that hostId's are unique"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/views/servers.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/views/servers.py b/nova/api/openstack/compute/views/servers.py index 6a1622a66..e923c8286 100644 --- a/nova/api/openstack/compute/views/servers.py +++ b/nova/api/openstack/compute/views/servers.py @@ -146,8 +146,10 @@ class ViewBuilder(common.ViewBuilder): @staticmethod def _get_host_id(instance): host = instance.get("host") + project = str(instance.get("project_id")) if host: - return hashlib.sha224(host).hexdigest() # pylint: disable=E1101 + sha_hash = hashlib.sha224(project + host) # pylint: disable=E1101 + return sha_hash.hexdigest() def _get_addresses(self, request, instance): context = request.environ["nova.context"] |
