21542088 VM's display_name is used instead of hostname to set the hostname for VM
authorDrew Fisher <drew.fisher@oracle.com>
Tue, 04 Aug 2015 11:47:02 -0700
changeset 4736 455a1830e5e8
parent 4733 87d0de8972c0
child 4737 844cca6e99f3
21542088 VM's display_name is used instead of hostname to set the hostname for VM
components/openstack/nova/files/solariszones/driver.py
--- a/components/openstack/nova/files/solariszones/driver.py	Mon Aug 03 14:39:10 2015 -0700
+++ b/components/openstack/nova/files/solariszones/driver.py	Tue Aug 04 11:47:02 2015 -0700
@@ -854,7 +854,7 @@
             vol = self._volume_api.create(
                 context,
                 instance['root_gb'],
-                instance['display_name'] + "-rootzpool",
+                instance['hostname'] + "-rootzpool",
                 "Boot volume for instance '%s' (%s)"
                 % (instance['name'], instance['uuid']))
             # TODO(npower): Polling is what nova/compute/manager also does when
@@ -1061,7 +1061,7 @@
         root_account_needed = True
         hostname_needed = True
         sshkey = instance.get('key_data')
-        name = instance.get('display_name')
+        name = instance.get('hostname')
         encrypted_password = None
 
         # encrypt admin password, using SHA-256 as default