Split sync ironic and implement sync netbox with URL filtering#1827
Merged
Split sync ironic and implement sync netbox with URL filtering#1827
Conversation
Split the bidirectional sync ironic command into two separate commands: - sync ironic: NetBox → Ironic synchronization (unchanged direction) - sync netbox: Ironic → NetBox synchronization (new command) The sync ironic command now only synchronizes from NetBox to Ironic, creating/updating/deleting Ironic nodes based on NetBox devices. The previously embedded Ironic → NetBox state updates have been removed and moved to the new sync netbox command. Implement sync netbox command to synchronize Ironic node states to NetBox: - Updates provision_state, power_state, and maintenance custom fields - Syncs to primary NetBox and all configured secondary instances - Supports optional node_name parameter to sync specific nodes - Add --netbox-filter parameter for selective NetBox instance updates - Filter uses case-insensitive substring matching on base_url The URL filter enables targeted synchronization scenarios: - Sync only to primary NetBox: --netbox-filter primary - Sync only to specific secondary: --netbox-filter secondary-1 - Sync to environment-specific instances: --netbox-filter prod This separation allows independent execution of each sync direction and provides fine-grained control over which NetBox instances to update. AI-assisted: Claude Code Signed-off-by: Christian Berendt <berendt@osism.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split the bidirectional sync ironic command into two separate commands:
The sync ironic command now only synchronizes from NetBox to Ironic, creating/updating/deleting Ironic nodes based on NetBox devices. The previously embedded Ironic → NetBox state updates have been removed and moved to the new sync netbox command.
Implement sync netbox command to synchronize Ironic node states to NetBox:
The URL filter enables targeted synchronization scenarios:
This separation allows independent execution of each sync direction and provides fine-grained control over which NetBox instances to update.
AI-assisted: Claude Code