From 0e0ceb78115e9dd37ba2be55acde62e1d24b18c4 Mon Sep 17 00:00:00 2001 From: Solvik Blum Date: Sun, 4 Aug 2019 09:55:10 +0200 Subject: [PATCH] datacenter awareness - a bit of a docstring --- netbox_agent/datacenter.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/netbox_agent/datacenter.py b/netbox_agent/datacenter.py index 76b269a..84b7ead 100644 --- a/netbox_agent/datacenter.py +++ b/netbox_agent/datacenter.py @@ -7,6 +7,16 @@ from netbox_agent.config import DATACENTER_LOCATION, DATACENTER_LOCATION_DRIVER_ class Datacenter(): """ + This class is used to guess the datacenter in order to push the information + in Netbox for a `Device` + + A driver takes a `value` and evaluates a regex with a `named group`: `datacenter`. + + There's embeded drivers such as `file` or `cmd` which read a file or return the + output of a file. + + There's also a support for an external driver file outside of this project in case + the logic isn't supported here. """ def __init__(self, *args, **kwargs): self.driver = DATACENTER_LOCATION.split(':')[0]