add datacenter location awareness with pseudo-driver (cmd and file) #4

Merged
Solvik merged 10 commits from feature/datacenter into master 2019-08-04 20:09:29 +02:00
Showing only changes of commit d90eac3fe6 - Show all commits

View file

@ -24,11 +24,11 @@ class ServerBase():
def get_datacenter(self):
dc = Datacenter()
return dc.get().upper()
return dc.get()
def get_netbox_datacenter(self):
datacenter = nb.dcim.sites.get(
name=self.get_datacenter()
slug=self.get_datacenter()
)
return datacenter