Commit Graph

8 Commits

Author SHA1 Message Date
Christian Mäder 493fc60401 Use black as formatter for python files 2021-02-08 18:24:29 +01:00
Christian Mäder e383fd42bd Fix custom fields initializer 2020-12-14 22:11:01 +01:00
Christian Mäder 234baa40a5 Remove redundant assignment in for loop 2020-12-14 20:58:50 +01:00
Christian Mäder 5c9bea8b50 Update Custom Field logic for Netbox v2.10.x 2020-12-14 20:58:43 +01:00
Tobias Genannt 50ade7bce1 Add function to load YAML files
This commit starts to remove some code redundancy from the startup
scripts for easier maintenance.
2020-02-10 07:47:17 +01:00
Christian Mäder c001626b85 Update Custom Fields Initializer for Netbox 2.7
The custom field database model has changed in Netbox 2.7.
Therefore the initializer code, that was used before, broke.
As a user, you will need to update your custom_fields.yml file as
follows:

- type must be lowercase
  - the `selection` type was changed to `select`
- the filter_logic must be lower case

This is to achieve compatibility with the naming schema that
Netbox uses internally. It allows us to become forward compatible
in case Netbox ever introduces a new type for custom fields.

See the diff of this commit for further information how this is meant.
2020-01-20 08:39:26 +01:00
Christian Mäder e46a7d2f7f
Ignore missing initializers
Previously, the startup_scripts would fail if an initializer file was
not present. Now they just ignore missing files.
2018-12-19 14:25:58 +01:00
Aleksandar Radunovic 97477556e0 Increase order prefix to 3 digits 2018-10-16 13:26:13 +02:00
Renamed from startup_scripts/20_custom_fields.py (Browse further)