no more upper() and use slug for dc search

This commit is contained in:
Solvik Blum 2019-08-04 19:33:09 +02:00
parent f2195cf9e6
commit d90eac3fe6
No known key found for this signature in database
GPG key ID: CC12B3DC262B6C47

View file

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