diff options
| author | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-21 04:23:48 +0000 |
|---|---|---|
| committer | Tarmac <> | 2010-09-21 04:23:48 +0000 |
| commit | 8a841dd6d5ea21e28c2396b1f7a0a24923a56202 (patch) | |
| tree | 1364b2c56233f157e86b33d612a28b01b4b41865 | |
| parent | bc09d0e99c6acae3a0f627a26f302391eea797a5 (diff) | |
| parent | 06a799d2668723bbaead7ca2afbfb4b0cbf28abb (diff) | |
Fixes server error on get metadata when instances are started without keypairs.
| -rw-r--r-- | nova/endpoint/cloud.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py index 4e5e2d7f2..206a88c72 100644 --- a/nova/endpoint/cloud.py +++ b/nova/endpoint/cloud.py @@ -95,10 +95,11 @@ class CloudController(object): if instance['fixed_ip']: line = '%s slots=%d' % (instance['fixed_ip']['str_id'], INSTANCE_TYPES[instance['instance_type']]['vcpus']) - if instance['key_name'] in result: - result[instance['key_name']].append(line) + key = str(instance['key_name']) + if key in result: + result[key].append(line) else: - result[instance['key_name']] = [line] + result[key] = [line] return result def get_metadata(self, address): |
