mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
guess_mac checks for existing dhcp_file
This commit is contained in:
parent
16510dee59
commit
510e0e6ee5
1 changed files with 10 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
import time
|
||||
import json
|
||||
import socket
|
||||
|
@ -676,6 +677,7 @@ def inst_graph(request, compute_id, vname):
|
|||
def guess_mac_address(request, vname):
|
||||
dhcp_file = '/srv/webvirtcloud/dhcpd.conf'
|
||||
data = { 'vname': vname, 'mac': '52:54:00:' }
|
||||
if os.path.isfile(dhcp_file):
|
||||
with open(dhcp_file, 'r') as f:
|
||||
name_found = False
|
||||
for line in f:
|
||||
|
|
Loading…
Reference in a new issue