diff options
| author | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-12-01 14:55:42 -0600 |
|---|---|---|
| committer | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-12-01 14:55:42 -0600 |
| commit | fdf0aa30a1127eb8311a599dfdad9653ac699154 (patch) | |
| tree | 96a5a0da8365e6067b4523f1c7bc2da0dad0eb9c | |
| parent | 93c7bbf98f0396718724cbf1d4d2f3953078776c (diff) | |
| download | nova-fdf0aa30a1127eb8311a599dfdad9653ac699154.tar.gz nova-fdf0aa30a1127eb8311a599dfdad9653ac699154.tar.xz nova-fdf0aa30a1127eb8311a599dfdad9653ac699154.zip | |
Todd points out that the API doesn't require a display_name, so let's make a default. That way the OpenStack API can rest assured that its server responses will always have a name key.
| -rw-r--r-- | nova/compute/manager.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 50a9d316b..0893db9fc 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -99,6 +99,8 @@ class ComputeManager(manager.Manager): that has just been created """ + # Set sane defaults if not specified + kwargs.setdefault('display_name', "Server %s" % kwargs['internal_id']) instance_ref = self.db.instance_create(context, kwargs) inst_id = instance_ref['id'] |
