datacenter awareness - a bit of a docstring

This commit is contained in:
Solvik Blum 2019-08-04 09:55:10 +02:00
parent 33a5306aa9
commit 0e0ceb7811
No known key found for this signature in database
GPG key ID: CC12B3DC262B6C47

View file

@ -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]