Commit e3fb8460 authored by Jenny's avatar Jenny
Browse files

added autostart column

parent 7c9bf5b3
......@@ -9,7 +9,8 @@ import re
def print_dw_table(vmdata):
print('^ Name ^ MAC-Adressen + VLANs ^ CPU-Sockets ^ CPU-Cores ^ RAM in MB ^ PVE-Benutzer ^ Bemerkung ^')
print('^ Name ^ MAC-Adressen + VLANs ^ CPU-Sockets ^ CPU-Cores ^ RAM in MB ^ PVE-Benutzer '
'^ Autostart? ^ Bemerkung ^')
for vmid, data in vmdata.items():
line = '| '
if 'wikilink' in data:
......@@ -34,12 +35,17 @@ def print_dw_table(vmdata):
else:
line = line + user.replace('@pve', '')
line = line + ' | '
if data['autostart']:
line = line + 'Ja'
else:
line = line + 'Nein'
line = line + ' | '
if 'comment' in data:
line = line + data['comment']
line = line + ' |'
print(line)
print('^ Gesamt: ^ ^ ~~=sum(range(col(),1,col(),row()-1))~~ ^ ~~=sum(range(col(),1,col(),row()-1))~~ ^ '
'~~=sum(range(col(),1,col(),row()-1))~~ ^ ^ ^')
'~~=sum(range(col(),1,col(),row()-1))~~ ^ ^ ^ ^')
def generate_net_string(orgstring):
......@@ -131,6 +137,10 @@ def main():
data['sockets'] = config['sockets']
data['cores'] = config['cores']
data['name'] = config['name']
if 'onboot' in config and config['onboot'] == 1:
data['autostart'] = True
else:
data['autostart'] = False
data['net'] = list()
for key, val in config.items():
if not key.startswith('net'):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment