Allow to report autostart
This commit is contained in:
parent
da13337a18
commit
405e8d8772
1 changed files with 5 additions and 1 deletions
|
@ -123,7 +123,10 @@ def _process_pve_virtual_machine(
|
|||
vcpus=pve_virtual_machine_config['cores'],
|
||||
memory=int(pve_virtual_machine_config['memory']),
|
||||
status='active' if _pve_virtual_machine['status'] == 'running' else 'offline',
|
||||
tags=list(map(lambda _pve_tag_name: _nb_objects['tags'][_pve_tag_name], _pve_tags))
|
||||
tags=list(map(lambda _pve_tag_name: _nb_objects['tags'][_pve_tag_name], _pve_tags)),
|
||||
custom_fields={
|
||||
'autostart': pve_virtual_machine_config.get('onboot') == 1,
|
||||
}
|
||||
)
|
||||
else:
|
||||
nb_virtual_machine.name = _pve_virtual_machine['name']
|
||||
|
@ -134,6 +137,7 @@ def _process_pve_virtual_machine(
|
|||
nb_virtual_machine.memory = int(pve_virtual_machine_config['memory'])
|
||||
nb_virtual_machine.status = 'active' if _pve_virtual_machine['status'] == 'running' else 'offline'
|
||||
nb_virtual_machine.tags = list(map(lambda _pve_tag_name: _nb_objects['tags'][_pve_tag_name], _pve_tags))
|
||||
nb_virtual_machine.custom_fields['autostart'] = pve_virtual_machine_config.get('onboot') == 1
|
||||
nb_virtual_machine.save()
|
||||
|
||||
# Handle the VM network interfaces
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue