mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-06-06 20:39:38 +00:00
guess_clone_name fix. should check hostname, not fqdn.
guess_clone_name calls guess_mac_address in instance view
This commit is contained in:
@@ -790,7 +790,8 @@ def guess_clone_name(request):
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if "host %s" % prefix in line:
|
||||
hostname = line.split(' ')[1]
|
||||
fqdn = line.split(' ')[1]
|
||||
hostname = fqdn.split('.')[0]
|
||||
if hostname.startswith(prefix) and hostname not in instance_names:
|
||||
return HttpResponse(json.dumps({'name': hostname}))
|
||||
return HttpResponse(json.dumps({}));
|
||||
|
||||
Reference in New Issue
Block a user