Details
Description
Managed Object -> Object -> Script ->Ping -> Address = 8.8.8.8
получаем ошибку:
class 'noc.sa.interfaces.base.InterfaceTypeError'> Parameter 'address' required START OF TRACEBACK ------------------------------------------------------------------------ File: sa/interfaces/base.py (Line: 1369) Function: clean 1362 in_kwargs = kwargs.copy() 1363 out_kwargs = {} 1364 for n, p in self.gen_parameters(): 1365 if n not in in_kwargs and p.required: 1366 if p.default is not None: 1367 out_kwargs[n] = p.default 1368 else: 1369 ==> raise InterfaceTypeError("Parameter '%s' required" % n) 1370 if n in in_kwargs: 1371 if not (in_kwargs[n] is None and not p.required): 1372 try: 1373 if __profile: 1374 out_kwargs[n] = p.script_clean_input(__profile, 1375 in_kwargs[n]) Variables: out_kwargs = {} _Interface__profile = <noc.sa.profiles.DLink.DxS.Profile object at 0x80928db10> self = <noc.sa.interfaces.iping.IPing object at 0x8089dd7d0> n = 'address' p = <noc.sa.interfaces.base.IPParameter object at 0x80761f290> kwargs = {} in_kwargs = {} ------------------------------------------------------------------------ File: sa/interfaces/base.py (Line: 1398) Function: script_clean_input 1391 try: 1392 rp = self.returns 1393 except AttributeError: 1394 return result # No return result restriction 1395 return rp.clean(result) 1396 1397 def script_clean_input(self, __profile, **kwargs): 1398 ==> return self.clean(__profile, **kwargs) 1399 1400 def script_clean_result(self, __profile, result): 1401 try: 1402 rp = self.returns 1403 except AttributeError: 1404 return result Variables: _Interface__profile = <noc.sa.profiles.DLink.DxS.Profile object at 0x80928db10> self = <noc.sa.interfaces.iping.IPing object at 0x8089dd7d0> kwargs = {} ------------------------------------------------------------------------ File: sa/script/script.py (Line: 444) Function: guarded_run 437 s.call_cache[key1] = {} 438 s.call_cache[key1][key2] = value 439 440 def guarded_run(self): 441 """Wrap around script call with all possible checkings""" 442 # Enforce interface type checking 443 for i in self.implements: 444 ==> self.kwargs = i.script_clean_input(self.profile, **self.kwargs) 445 t0 = time.time() 446 self.logger.debug("Running script: %s (%r), timeout %ss", 447 self.name, self.kwargs, self._timeout) 448 # Use cached result when available 449 if self.cache and self.parent is not None: 450 try: Variables: i = <noc.sa.interfaces.iping.IPing object at 0x8089dd7d0> self = <Script(Thread-816, started daemon 34510014464)> ------------------------------------------------------------------------ File: sa/script/script.py (Line: 490) Function: run 483 484 def run(self): 485 """Script thread worker method""" 486 self.logger.debug("Running") 487 result = None 488 try: 489 with self.cancelable(): 490 ==> result = self.guarded_run() 491 except self.TimeOutError: 492 self.logger.error("Timed out") 493 self.e_timeout = True 494 except CancelledError: 495 self.logger.error("Cancelled") 496 self.e_cancel = True Variables: self = <Script(Thread-816, started daemon 34510014464)> r = ["<class 'noc.sa.interfaces.base.InterfaceTypeError'>", "Parameter 'address' required"] result = None v = InterfaceTypeError("Parameter 'address' required",) tb = <traceback object at 0x809210128> t = <class 'noc.sa.interfaces.base.InterfaceTypeError'> ------------------------------------------------------------------------ END OF TRACEBACK