File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ def group_extractors(self):
248
248
"device_roles" : self .extract_device_role ,
249
249
"platforms" : self .extract_platform ,
250
250
"device_types" : self .extract_device_type ,
251
+ "services" : self .extract_services ,
251
252
"config_context" : self .extract_config_context ,
252
253
"manufacturers" : self .extract_manufacturer ,
253
254
}
@@ -267,6 +268,14 @@ def extract_platform(self, host):
267
268
except Exception :
268
269
return
269
270
271
+ def extract_services (self , host ):
272
+ try :
273
+ url = self .api_endpoint + "/api/ipam/services/?device=" + str (host ["name" ])
274
+ device_lookup = self ._fetch_information (url )
275
+ return device_lookup ["results" ]
276
+ except Exception :
277
+ return
278
+
270
279
def extract_device_type (self , host ):
271
280
try :
272
281
return [self .device_types_lookup [host ["device_type" ]["id" ]]]
You can’t perform that action at this time.
0 commit comments