boot instance with server name case insensitive

boot instance with server name case insensitive, it should use
display_name which is case sensitive rather than hostname.

Change-Id: I742d83236ea3268fc64629e48c08f02562c7b11a
Closes-Bug: #1628404
This commit is contained in:
Jerry Cai 2016-09-28 16:18:41 +08:00
parent 90586b97e2
commit 444dfcca9a
1 changed files with 4 additions and 1 deletions

View File

@ -261,12 +261,15 @@ class PowerVCDriver(driver.ComputeDriver):
LOG.debug("Instance to spawn: %s" % instance)
createdServer = None
# get boot server name, get the display_name, if none use hostname
boot_sever_name = instance['display_name'] or instance['hostname']
try:
createdServer = \
self._service.spawn(context=context,
instance=instance,
injected_files=injected_files,
name=instance['hostname'],
name=boot_sever_name,
imageUUID=pvcimage,
flavorDict=pvcflavor,
nics=pvc_nics,