mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2024-11-22 07:33:26 +01:00
10 lines
289 B
Python
10 lines
289 B
Python
import os
|
|
|
|
NETBOX_URL = str(os.getenv("NETBOX_URL"))
|
|
NETBOX_TOKEN = str(os.getenv("NETBOX_TOKEN"))
|
|
|
|
MANDATORY_ENV_VARS = ["NETBOX_URL", "NETBOX_TOKEN"]
|
|
|
|
for var in MANDATORY_ENV_VARS:
|
|
if var not in os.environ:
|
|
raise EnvironmentError("Failed because {} is not set.".format(var)) |