Skip to content

Conversation

@bctiemann
Copy link
Contributor

@bctiemann bctiemann commented Nov 26, 2025

Closes: #282

Enables configuration of a max_custom_object_types setting:

PLUGINS_CONFIG = {
    'netbox_custom_objects': {
        'max_custom_object_types': 1000,
    }
}

Attempting to create more than this number of Custom Object Types will raise a ValidationError (this is done via clean at the model level, so this will work the same via the UI or API).

@bctiemann bctiemann requested a review from arthanson November 26, 2025 11:28
@bctiemann bctiemann changed the title Closes: #282 - Add handling for max_cots config option (and configuration.md) Closes: #282 - Add handling for max_custom_object_types config option (and configuration.md) Nov 26, 2025
Copy link
Contributor

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add max_custom_object_types to default_settings in the AppConfig as well, as a supplementary means of documentation.

We might also want to set a default limit (e.g. 100) for sanity.

Copy link
Contributor

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to lower the default maximum to 50.

Copy link
Contributor

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to lower the default maximum to 50.

@jeremystretch jeremystretch merged commit 1dc6949 into main Dec 3, 2025
7 checks passed
@jeremystretch jeremystretch deleted the 282-max_cots branch December 3, 2025 17:46
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.

Introduce MAX_COTS configuration paramater to limit number of Custom Object Types

4 participants