Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.80 KB | None | 0 0
  1. ERROR: 14
  2. <class 'noc.sa.interfaces.base.InterfaceTypeError'> DictParameter: {'neighbors': [{'remote_chassis_id_subtype': 4}], 'local_interface': 'xe-0/0/1'}. 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: /opt/noc/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 0x7fbd4e8b5710> value = {'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_chassis_id_subtype': 4}]} ------------------------------------------------------------------------ File: /opt/noc/sa/interfaces/base.py (Line: 700) Function: clean 693 if attr.default: 694 out_value[a_name] = attr.default 695 else: 696 pass 697 else: 698 self.raise_error( 699 value, 700 ==> "Invalid value for '%s': %s" % (a_name, why)) 701 del in_value[a_name] 702 for k, v in in_value.items(): 703 out_value[k] = v 704 return out_value 705 706 def script_clean_input(self, profile, value): Variables: a_name = 'neighbors' attr = <noc.sa.interfaces.base.ListOfParameter object at 0x7fbd4e8b56d0> self = <noc.sa.interfaces.base.DictParameter object at 0x7fbd4e8b5710> in_value = {'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_chassis_id_subtype': 4}]} value = {'local_interface': 'xe-0/0/1', '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: /opt/noc/sa/interfaces/base.py (Line: 619) Function: clean 612 return self.default 613 if self.convert and not isinstance(value, (list, tuple)): 614 value = [value] 615 v = super(ListOfParameter, self).clean(value) 616 if self.is_list: 617 return [[e.clean(vv) for e, vv in zip(self.element, v)] for v in value] 618 else: 619 ==> return [self.element.clean(x) for x in v] 620 621 def script_clean_input(self, profile, value): 622 if value is None and self.default is not None: 623 return self.default 624 v = super(ListOfParameter, self).script_clean_input(profile, value) 625 if self.is_list: Variables: x = {'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_chassis_id_subtype': 4}]} self = <noc.sa.interfaces.base.ListOfParameter object at 0x7fbd4e8b5750> value = [{'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 4, 'remote_chassis_id': '00:25:9e:f4:35:4c', 'remote_chassis_id_subtype': 4, 'remote_port': 'XGigabitEthernet0/1/2', 'remote_port_subtype': 5, 'remote_system_name': 'S5300_ATS-KUG_SW1'}]}, {'local_interface': 'ge-1/1/6', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 564, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/7', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 565, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/8', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 526, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}, {'local_interface': 'ge-1/1/9', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 527, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}] v = [{'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 4, 'remote_chassis_id': '00:25:9e:f4:35:4c', 'remote_chassis_id_subtype': 4, 'remote_port': 'XGigabitEthernet0/1/2', 'remote_port_subtype': 5, 'remote_system_name': 'S5300_ATS-KUG_SW1'}]}, {'local_interface': 'ge-1/1/6', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 564, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/7', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 565, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/8', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 526, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}, {'local_interface': 'ge-1/1/9', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 527, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}] ------------------------------------------------------------------------ File: /opt/noc/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 0x7fbd4cc7b5d0> self = <noc.sa.interfaces.base.ListOfParameter object at 0x7fbd4e8b5750> value = [{'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 4, 'remote_chassis_id': '00:25:9e:f4:35:4c', 'remote_chassis_id_subtype': 4, 'remote_port': 'XGigabitEthernet0/1/2', 'remote_port_subtype': 5, 'remote_system_name': 'S5300_ATS-KUG_SW1'}]}, {'local_interface': 'ge-1/1/6', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 564, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/7', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 565, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/8', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 526, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}, {'local_interface': 'ge-1/1/9', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 527, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}] ------------------------------------------------------------------------ File: /opt/noc/sa/interfaces/base.py (Line: 633) Function: script_clean_result 626 return [[e.script_clean_input(profile, vv) for e, vv in zip(self.element, v)] for v in value] 627 else: 628 return [self.element.script_clean_input(profile, x) for x in v] 629 630 def script_clean_result(self, profile, value): 631 if value is None and self.default is not None: 632 return self.default 633 ==> v = super(ListOfParameter, self).script_clean_result(profile, value) 634 if self.is_list: 635 return [[e.script_clean_result(profile, vv) for e, vv in zip(self.element, v)] for v in value] 636 else: 637 return [self.element.script_clean_result(profile, x) for x in v] 638 639 Variables: profile = <noc.sa.profiles.Juniper.JUNOS.Profile object at 0x7fbd4cc7b5d0> self = <noc.sa.interfaces.base.ListOfParameter object at 0x7fbd4e8b5750> value = [{'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 4, 'remote_chassis_id': '00:25:9e:f4:35:4c', 'remote_chassis_id_subtype': 4, 'remote_port': 'XGigabitEthernet0/1/2', 'remote_port_subtype': 5, 'remote_system_name': 'S5300_ATS-KUG_SW1'}]}, {'local_interface': 'ge-1/1/6', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 564, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/7', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 565, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/8', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 526, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}, {'local_interface': 'ge-1/1/9', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 527, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}] ------------------------------------------------------------------------ File: /opt/noc/sa/interfaces/base.py (Line: 1410) Function: script_clean_result 1403 return self.clean(__profile, **kwargs) 1404 1405 def script_clean_result(self, __profile, result): 1406 try: 1407 rp = self.returns 1408 except AttributeError: 1409 return result 1410 ==> return rp.script_clean_result(__profile, result) 1411 1412 def template_clean_result(self, __profile, result): 1413 return result 1414 1415 def requires_input(self): 1416 for n, p in self.gen_parameters(): Variables: _Interface__profile = <noc.sa.profiles.Juniper.JUNOS.Profile object at 0x7fbd4cc7b5d0> rp = <noc.sa.interfaces.base.ListOfParameter object at 0x7fbd4e8b5750> result = [{'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 4, 'remote_chassis_id': '00:25:9e:f4:35:4c', 'remote_chassis_id_subtype': 4, 'remote_port': 'XGigabitEthernet0/1/2', 'remote_port_subtype': 5, 'remote_system_name': 'S5300_ATS-KUG_SW1'}]}, {'local_interface': 'ge-1/1/6', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 564, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/7', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 565, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/8', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 526, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}, {'local_interface': 'ge-1/1/9', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 527, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}] self = <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x7fbd4cdbaa90> ------------------------------------------------------------------------ File: /opt/noc/sa/script/script.py (Line: 425) Function: guarded_run 418 self.kwargs)) 419 pass 420 # Calling script body 421 self._thread_id = thread.get_ident() 422 result = self.execute(**self.kwargs) 423 # Enforce interface result checking 424 for i in self.implements: 425 ==> result = i.script_clean_result(self.profile, result) 426 # Cache result when required 427 if self.cache and self.parent is not None: 428 self.debug("Write to call cache: %s, %s, %r" % (self.name, 429 self.kwargs, 430 result)) 431 self.set_cache(self.name, self.kwargs, result) Variables: i = <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x7fbd4cdbaa90> self = <Script(Thread-8715, started 140449826191104)> result = [{'local_interface': 'xe-0/0/1', 'neighbors': [{'remote_chassis_id_subtype': 4}]}, {'local_interface': 'xe-0/0/0', 'neighbors': [{'remote_capabilities': 4, 'remote_chassis_id': '00:25:9e:f4:35:4c', 'remote_chassis_id_subtype': 4, 'remote_port': 'XGigabitEthernet0/1/2', 'remote_port_subtype': 5, 'remote_system_name': 'S5300_ATS-KUG_SW1'}]}, {'local_interface': 'ge-1/1/6', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 564, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/7', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:44:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 565, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats62'}]}, {'local_interface': 'ge-1/1/8', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 526, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}, {'local_interface': 'ge-1/1/9', 'neighbors': [{'remote_capabilities': 20, 'remote_chassis_id': '3c:61:04:45:7f:c0', 'remote_chassis_id_subtype': 4, 'remote_port': 527, 'remote_port_subtype': 7, 'remote_system_name': 'mx960-ats55'}]}] ------------------------------------------------------------------------ File: /opt/noc/sa/script/script.py (Line: 445) Function: run 438 439 def run(self): 440 """Script thread worker method""" 441 self.debug("Running") 442 result = None 443 try: 444 with self.cancelable(): 445 ==> result = self.guarded_run() 446 except self.TimeOutError: 447 self.error("Timed out") 448 self.e_timeout = True 449 except CancelledError: 450 self.error("Cancelled") 451 self.e_cancel = True Variables: self = <Script(Thread-8715, started 140449826191104)> r = ["<class 'noc.sa.interfaces.base.InterfaceTypeError'>", "DictParameter: {'neighbors': [{'remote_chassis_id_subtype': 4}], 'local_interface': 'xe-0/0/1'}. 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/1'}. 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 0x7fbd4cd3add0> t = <class 'noc.sa.interfaces.base.InterfaceTypeError'> ------------------------------------------------------------------------ END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement