stupid charlie, stupid
This commit is contained in:
parent
e167047f23
commit
979accb43f
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -14,7 +14,7 @@ api_username = config.get('Re2o', 'username')
|
||||||
def regen_dhcp(api_client):
|
def regen_dhcp(api_client):
|
||||||
host_mac_ip = {}
|
host_mac_ip = {}
|
||||||
|
|
||||||
for hmi in api_client.view("dhcp/hostmacip/")['results']:
|
for hmi in api_client.list("dhcp/hostmacip/"):
|
||||||
if hmi['extension'] not in host_mac_ip.keys():
|
if hmi['extension'] not in host_mac_ip.keys():
|
||||||
host_mac_ip[hmi['extension']] = []
|
host_mac_ip[hmi['extension']] = []
|
||||||
host_mac_ip[hmi['extension']].append((hmi['hostname'],
|
host_mac_ip[hmi['extension']].append((hmi['hostname'],
|
||||||
|
@ -42,7 +42,7 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
|
||||||
|
|
||||||
client_hostname = socket.gethostname().split('.', 1)[0]
|
client_hostname = socket.gethostname().split('.', 1)[0]
|
||||||
|
|
||||||
for service in api_client.view("services/regen")['results']:
|
for service in api_client.list("services/regen"):
|
||||||
#if service['hostname'] == client_hostname and \
|
#if service['hostname'] == client_hostname and \
|
||||||
# service['service_name'] == 'dhcp' and \
|
# service['service_name'] == 'dhcp' and \
|
||||||
# service['need_regen']:
|
# service['need_regen']:
|
||||||
|
|
Loading…
Reference in a new issue