@@ -351,23 +351,23 @@ def refresh_platforms_lookup(self):
351
351
url = self .api_endpoint + "/api/dcim/platforms/?limit=0"
352
352
platforms = self .get_resource_list (api_url = url )
353
353
self .platforms_lookup = dict (
354
- (platform ["id" ], platform ["name " ]) for platform in platforms
354
+ (platform ["id" ], platform ["slug " ]) for platform in platforms
355
355
)
356
356
357
357
def refresh_sites_lookup (self ):
358
358
url = self .api_endpoint + "/api/dcim/sites/?limit=0"
359
359
sites = self .get_resource_list (api_url = url )
360
- self .sites_lookup = dict ((site ["id" ], site ["name " ]) for site in sites )
360
+ self .sites_lookup = dict ((site ["id" ], site ["slug " ]) for site in sites )
361
361
362
362
def refresh_regions_lookup (self ):
363
363
url = self .api_endpoint + "/api/dcim/regions/?limit=0"
364
364
regions = self .get_resource_list (api_url = url )
365
- self .regions_lookup = dict ((region ["id" ], region ["name " ]) for region in regions )
365
+ self .regions_lookup = dict ((region ["id" ], region ["slug " ]) for region in regions )
366
366
367
367
def refresh_tenants_lookup (self ):
368
368
url = self .api_endpoint + "/api/tenancy/tenants/?limit=0"
369
369
tenants = self .get_resource_list (api_url = url )
370
- self .tenants_lookup = dict ((tenant ["id" ], tenant ["name " ]) for tenant in tenants )
370
+ self .tenants_lookup = dict ((tenant ["id" ], tenant ["slug " ]) for tenant in tenants )
371
371
372
372
def refresh_racks_lookup (self ):
373
373
url = self .api_endpoint + "/api/dcim/racks/?limit=0"
@@ -378,21 +378,21 @@ def refresh_device_roles_lookup(self):
378
378
url = self .api_endpoint + "/api/dcim/device-roles/?limit=0"
379
379
device_roles = self .get_resource_list (api_url = url )
380
380
self .device_roles_lookup = dict (
381
- (device_role ["id" ], device_role ["name " ]) for device_role in device_roles
381
+ (device_role ["id" ], device_role ["slug " ]) for device_role in device_roles
382
382
)
383
383
384
384
def refresh_device_types_lookup (self ):
385
385
url = self .api_endpoint + "/api/dcim/device-types/?limit=0"
386
386
device_types = self .get_resource_list (api_url = url )
387
387
self .device_types_lookup = dict (
388
- (device_type ["id" ], device_type ["model " ]) for device_type in device_types
388
+ (device_type ["id" ], device_type ["slug " ]) for device_type in device_types
389
389
)
390
390
391
391
def refresh_manufacturers_lookup (self ):
392
392
url = self .api_endpoint + "/api/dcim/manufacturers/?limit=0"
393
393
manufacturers = self .get_resource_list (api_url = url )
394
394
self .manufacturers_lookup = dict (
395
- (manufacturer ["id" ], manufacturer ["name " ]) for manufacturer in manufacturers
395
+ (manufacturer ["id" ], manufacturer ["slug " ]) for manufacturer in manufacturers
396
396
)
397
397
398
398
def refresh_lookups (self ):
0 commit comments