Guest User

Untitled

a guest
Dec 29th, 2015
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.19 KB | None | 0 0
  1. 2015-12-29 18:16:21.669000 KRD-SCH-PSE54-R-MX80 85.174.230.24 Juniper.JUNOS.get_interface_status_ex 13 Invalid script 'Juniper.JUNOS.get_interface_status_ex'
  2. 2015-12-29 18:16:12.024000 KRD-SCH-PSE54-R-MX80 85.174.230.24 Juniper.JUNOS.get_lldp_neighbors 14 <class 'noc.sa.interfaces.base.InterfaceTypeError'> DictParameter: {'neighbors': [{'remote_chassis_id_subtype': 4}], 'local_interface': 'xe-0/0/2'}. Invalid value for 'neighbors': DictParameter: {'remote_chassis_id_subtype': 4}. Attribute 'remote_port' is required in {'remote_chassis_id_subtype': 4} START OF TRACEBACK ------------------------------------------------------------------------ File: sa/interfaces/base.py (Line: 48) Function: raise_error 41 :param value: Value where error detected 42 :type value: Arbitrary python type 43 :param msg: Optional message 44 :type msg: String 45 :raises InterfaceTypeError 46 """ 47 raise InterfaceTypeError("%s: %s. %s" % (self.__class__.__name__, 48 ==> repr(value), msg)) 49 50 def clean(self, value): 51 """ 52 Input parameter normalization 53 54 :param value: Input parameter Variables: msg = "Invalid value for 'neighbors': DictParameter: {'remote_chassis_id_subtype': 4}. Attribute 'remote_port' is required in {'remote_chassis_id_subtype': 4}" self = <noc.sa.interfaces.base.DictParameter object at 0x165fd50> value = {'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]} ------------------------------------------------------------------------ File: sa/interfaces/base.py (Line: 684) Function: clean 677 if attr.default: 678 out_value[a_name] = attr.default 679 else: 680 pass 681 else: 682 self.raise_error( 683 value, 684 ==> "Invalid value for '%s': %s" % (a_name, why)) 685 del in_value[a_name] 686 for k, v in in_value.items(): 687 out_value[k] = v 688 return out_value 689 690 def script_clean_input(self, profile, value): Variables: a_name = 'neighbors' attr = <noc.sa.interfaces.base.ListOfParameter object at 0x165fd10> self = <noc.sa.interfaces.base.DictParameter object at 0x165fd50> in_value = {'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]} value = {'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]} out_value = {} why = InterfaceTypeError("DictParameter: {'remote_chassis_id_subtype': 4}. Attribute 'remote_port' is required in {'remote_chassis_id_subtype': 4}",) ------------------------------------------------------------------------ File: sa/interfaces/base.py (Line: 609) Function: clean 602 return self.default 603 if self.convert and not isinstance(value, (list, tuple)): 604 value = [value] 605 v = super(ListOfParameter, self).clean(value) 606 if self.is_list: 607 return [[e.clean(vv) for e, vv in zip(self.element, v)] for v in value] 608 else: 609 ==> return [self.element.clean(x) for x in v] 610 611 def script_clean_input(self, profile, value): 612 if value is None and self.default is not None: 613 return self.default 614 v = super(ListOfParameter, self).script_clean_input(profile, value) 615 if self.is_list: Variables: x = {'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]} self = <noc.sa.interfaces.base.ListOfParameter object at 0x165fd90> value = [{'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-1/3/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:59:c6:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 49, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW30-Q8300'}]}, {'local_interface': 'xe-0/0/3', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:72:c5:b5', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW50-Q8200'}]}, {'local_interface': 'xe-1/2/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:86:46:48', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW20-Q8200'}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:af:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/3/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-AMTS-P2-MX480'}]}, {'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:bf:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/1/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-OPTS53-P-MX480'}]}] v = [{'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-1/3/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:59:c6:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 49, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW30-Q8300'}]}, {'local_interface': 'xe-0/0/3', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:72:c5:b5', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW50-Q8200'}]}, {'local_interface': 'xe-1/2/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:86:46:48', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW20-Q8200'}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:af:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/3/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-AMTS-P2-MX480'}]}, {'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:bf:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/1/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-OPTS53-P-MX480'}]}] ------------------------------------------------------------------------ File: sa/interfaces/base.py (Line: 84) Function: script_clean_result 77 78 :param profile: Profile 79 :type profile: Profile instance 80 :param value: Input parameter 81 :type value: Arbitrary python type 82 :return: Normalized value 83 """ 84 ==> return self.clean(value) 85 86 def form_clean(self, value): 87 """ 88 Clean up form field 89 90 :param value: Input parameter Variables: profile = <noc.sa.profiles.Juniper.JUNOS.Profile object at 0x2615690> self = <noc.sa.interfaces.base.ListOfParameter object at 0x165fd90> value = [{'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-1/3/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:59:c6:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 49, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW30-Q8300'}]}, {'local_interface': 'xe-0/0/3', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:72:c5:b5', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW50-Q8200'}]}, {'local_interface': 'xe-1/2/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:86:46:48', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW20-Q8200'}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:af:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/3/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-AMTS-P2-MX480'}]}, {'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:bf:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/1/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-OPTS53-P-MX480'}]}] ------------------------------------------------------------------------ File: sa/interfaces/base.py (Line: 623) Function: script_clean_result 616 return [[e.script_clean_input(profile, vv) for e, vv in zip(self.element, v)] for v in value] 617 else: 618 return [self.element.script_clean_input(profile, x) for x in v] 619 620 def script_clean_result(self, profile, value): 621 if value is None and self.default is not None: 622 return self.default 623 ==> v = super(ListOfParameter, self).script_clean_result(profile, value) 624 if self.is_list: 625 return [[e.script_clean_result(profile, vv) for e, vv in zip(self.element, v)] for v in value] 626 else: 627 return [self.element.script_clean_result(profile, x) for x in v] 628 629 Variables: profile = <noc.sa.profiles.Juniper.JUNOS.Profile object at 0x2615690> self = <noc.sa.interfaces.base.ListOfParameter object at 0x165fd90> value = [{'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-1/3/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:59:c6:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 49, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW30-Q8300'}]}, {'local_interface': 'xe-0/0/3', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:72:c5:b5', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW50-Q8200'}]}, {'local_interface': 'xe-1/2/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:86:46:48', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW20-Q8200'}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:af:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/3/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-AMTS-P2-MX480'}]}, {'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:bf:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/1/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-OPTS53-P-MX480'}]}] ------------------------------------------------------------------------ File: sa/interfaces/base.py (Line: 1405) Function: script_clean_result 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 1405 ==> return rp.script_clean_result(__profile, result) 1406 1407 def template_clean_result(self, __profile, result): 1408 return result 1409 1410 def requires_input(self): 1411 for n, p in self.gen_parameters(): Variables: _Interface__profile = <noc.sa.profiles.Juniper.JUNOS.Profile object at 0x2615690> rp = <noc.sa.interfaces.base.ListOfParameter object at 0x165fd90> result = [{'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-1/3/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:59:c6:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 49, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW30-Q8300'}]}, {'local_interface': 'xe-0/0/3', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:72:c5:b5', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW50-Q8200'}]}, {'local_interface': 'xe-1/2/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:86:46:48', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW20-Q8200'}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:af:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/3/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-AMTS-P2-MX480'}]}, {'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:bf:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/1/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-OPTS53-P-MX480'}]}] self = <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x1d3ef10> ------------------------------------------------------------------------ File: sa/script/script.py (Line: 466) Function: guarded_run 459 self.name, self.kwargs) 460 pass 461 # Calling script body 462 self._thread_id = thread.get_ident() 463 result = self.execute(**self.kwargs) 464 # Enforce interface result checking 465 for i in self.implements: 466 ==> result = i.script_clean_result(self.profile, result) 467 # Cache result when required 468 if self.cache and self.parent is not None: 469 self.logger.debug( 470 "Write to call cache: %s, %s, %r", 471 self.name, self.kwargs, result 472 ) Variables: i = <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x1d3ef10> self = <Script(Thread-7716, started 140640324200192)> result = [{'local_interface': 'xe-0/0/2', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-1/3/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:59:c6:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 49, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW30-Q8300'}]}, {'local_interface': 'xe-0/0/3', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:72:c5:b5', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW50-Q8200'}]}, {'local_interface': 'xe-1/2/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '00:1f:ce:86:46:48', 'remote_chassis_id_subtype': 4, 'remote_port': 25, 'remote_port_subtype': 7, 'remote_system_name': 'KRD-SCH-PSE54-SW20-Q8200'}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:af:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/3/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-AMTS-P2-MX480'}]}, {'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '28:8a:1c:ee:bf:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 'xe-0/1/0', 'remote_port_subtype': 5, 'remote_system_name': 'KRD-SCH-OPTS53-P-MX480'}]}] t0 = 1451402168.405875 ------------------------------------------------------------------------ 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-7716, started 140640324200192)> r = ["<class 'noc.sa.interfaces.base.InterfaceTypeError'>", "DictParameter: {'neighbors': [{'remote_chassis_id_subtype': 4}], 'local_interface': 'xe-0/0/2'}. Invalid value for 'neighbors': DictParameter: {'remote_chassis_id_subtype': 4}. Attribute 'remote_port' is required in {'remote_chassis_id_subtype': 4}"] result = None v = InterfaceTypeError("DictParameter: {'neighbors': [{'remote_chassis_id_subtype': 4}], 'local_interface': 'xe-0/0/2'}. Invalid value for 'neighbors': DictParameter: {'remote_chassis_id_subtype': 4}. Attribute 'remote_port' is required in {'remote_chassis_id_subtype': 4}",) tb = <traceback object at 0x24e72d8> t = <class 'noc.sa.interfaces.base.InterfaceTypeError'> ------------------------------------------------------------------------ END OF TRACEBACK
Add Comment
Please, Sign In to add comment