@@ -563,7 +563,6 @@ def update(self, data=None, read_from_netbox=False, source=None):
563563
564564 # check data model to see how we have to parse the value
565565 defined_value_type = self .data_model .get (key )
566-
567566 # value must be a string witch a certain max length
568567 if isinstance (defined_value_type , int ):
569568 if not isinstance (value , str ):
@@ -587,7 +586,7 @@ def update(self, data=None, read_from_netbox=False, source=None):
587586
588587 # check if value is in defined list
589588 elif value not in defined_value_type :
590- log .error (f"Invalid data type for '{ key } ' (must be one of { defined_value_type } ), got: '{ value } '" )
589+ log .error (f"this one. Invalid data type for '{ key } ' (must be one of { defined_value_type } ), got: '{ value } '" )
591590 continue
592591
593592 # just check the type of the value
@@ -1890,7 +1889,7 @@ class NBCluster(NetBoxObject):
18901889 def __init__ (self , * args , ** kwargs ):
18911890 self .mapping = NetBoxMappings ()
18921891 self .scopes = [
1893- NBSite , NBSiteGroup
1892+ NBSite , NBSiteGroup , NBLocation , NBRegion
18941893 ]
18951894 self .data_model = {
18961895 "name" : 100 ,
@@ -1899,7 +1898,6 @@ def __init__(self, *args, **kwargs):
18991898 "tenant" : NBTenant ,
19001899 "group" : NBClusterGroup ,
19011900 "scope_type" : self .mapping .scopes_object_types (self .scopes ),
1902- # currently only site is supported as a scope
19031901 "scope_id" : NetBoxObject ,
19041902 "site" : NBSite ,
19051903 "tags" : NBTagList
0 commit comments