Skip to content

Fix --update-hypervisor flag not triggering updates#399

Open
shbatm wants to merge 1 commit intoSolvik:masterfrom
shbatm:fix/update-hypervisor-flag
Open

Fix --update-hypervisor flag not triggering updates#399
shbatm wants to merge 1 commit intoSolvik:masterfrom
shbatm:fix/update-hypervisor-flag

Conversation

@shbatm
Copy link

@shbatm shbatm commented Jan 19, 2026

Problem

The --update-hypervisor flag was defined in config.py and its logic was implemented in server.py:442-443, but it was missing from the condition in cli.py:48-56 that triggers netbox_create_or_update().

This meant running netbox_agent --update-hypervisor would do nothing because the update method was never called.

Fixes: #400

Solution

Added config.update_hypervisor to the condition in cli.py so that the flag now properly triggers the hypervisor update logic.

Changes

  • Added or config.update_hypervisor to the condition at cli.py:48-56

Testing

With this fix, running netbox_agent --update-hypervisor will now correctly call server.netbox_create_or_update(config), which will trigger the hypervisor cluster and VM updates when config.virtual.hypervisor is true.

🤖 Generated with Claude Code

The --update-hypervisor flag was defined in config.py and checked in
server.py, but was missing from the condition in cli.py that triggers
netbox_create_or_update(). This meant running with --update-hypervisor
alone would do nothing.

Added config.update_hypervisor to the condition at cli.py line 48-56
so that the flag now properly triggers the hypervisor update logic in
server.py.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] --update-hypervisor flag not triggering updates

1 participant