Add SLUG option to specify a space-separated list of device_type slugs to import

This commit is contained in:
Ryan Malloy
2021-10-05 09:02:21 -06:00
parent 3aaf98bfe4
commit 8160b6c4aa
3 changed files with 19 additions and 4 deletions

View File

@ -10,6 +10,10 @@ IGNORE_SSL_ERRORS = (os.getenv("IGNORE_SSL_ERRORS", "False") == "True")
# optionnally load vendors through a space separated list as env var
VENDORS = os.getenv("VENDORS", "").split()
# optionally load device types through a space separated list as env var
SLUGS = os.getenv("SLUGS", "").split()
MANDATORY_ENV_VARS = ["REPO_URL", "NETBOX_URL", "NETBOX_TOKEN"]
for var in MANDATORY_ENV_VARS: