NOC

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
    • Get Bonfire Extension
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options
    • Planning Board
    • Task Board
    • Chart Board
    • Released Board
    • Rapid Board
    • Manage Rapid Boards
    • Getting Started
  • NOC
  • NOC-378

Cisco.IOS.get_interfaces. 'NoneType' object has no attribute 'group'

  • Rapid Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.7(2)
  • Fix Version/s: 0.7(3)
  • Component/s: SA
  • Labels:
    • Cisco.IOS
  • Difficulty:
    Medium

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Ilya Z added a comment - 22.02.2012 05:32 - edited
Task failed: <type 'exceptions.AttributeError'>
'NoneType' object has no attribute 'group'
START OF TRACEBACK
------------------------------------------------------------------------
File: /opt/noc/sa/profiles/Cisco/IOS/get_interfaces.py (Line: 200)
Function: execute
  193                         for i in sh_ip.split('\n'):
  194                             matchsec = self.rx_sec_ip.search(i)
  195                             if matchsec:
  196                                 ip = matchsec.group('ip')
  197                                 sub['ipv4_addresses'] += [base.IPv4PrefixParameter().clean(ip)]
  198     
  199                 matchifn = self.rx_cisco_interface_name.match(ifname)
  200 ==>             shotn = matchifn.group("type").capitalize() + matchifn.group("number")
  201                 if shotn in ospfs:
  202                         sub['is_ospf'] = True
  203                 phys = len(ifname.split('.')) + len(ifname.split(':'))
  204                 if phys == 2:
  205                     iface = {
  206                         "name": ifname,
Variables:
            matchsec = None
                 cmd = 'show vlan-switch brief'
                  ip = 'x.x.x.x/30'
               sh_ip = 'Serial0/1 is down, line protocol is down\n  Internet address is x.x.x.x/30\n  Broadcast address is 255.255.255.255\n  Address determined by non-volatile memory\n  MTU is 1500 bytes\n  Helper address is not set\n  Directed broadcast forwarding is disabled\n  Outgoing access list is not set\n  Inbound  access list is not set\n  Proxy ARP is enabled\n  Security level is default\n  Split horizon is enabled\n  ICMP redirects are always sent\n  ICMP unreachables are always sent\n  ICMP mask replies are never sent\n  IP fast switching is enabled\n  IP fast switching on the same interface is enabled\n  IP Flow switching is disabled\n  IP CEF switching is enabled\n  IP CEF Feature Fast switching turbo vector\n  IP multicast fast switching is enabled\n  IP multicast distributed fast switching is disabled\n  IP route-cache flags are Fast, CEF\n  Router Discovery is disabled\n  IP output packet accounting is disabled\n  IP access violation accounting is disabled\n  TCP/IP header compression is disabled\n  RTP/IP header compression is disabled\n  Probe proxy name replies are disabled\n  Policy routing is disabled\n  Network address translation is disabled\n  WCCP Redirect outbound is disabled\n  WCCP Redirect inbound is disabled\n  WCCP Redirect exclude is disabled\n  BGP Policy Mapping is disabled\n  IP multicast multilayer switching is disabled\n'
 portchannel_members = {}
                 pvm = {}
               ospfs = []
               iface = {'oper_status': False, 'admin_status': False, 'type': 'physical', 'name': 'ATM2/3', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'ATM2/3'}]}
                 sub = {'oper_status': True, 'admin_status': True, 'name': 'ATM2/IMA0', 'description': 'Alcatel DSLAM trunk'}
       subinterfaces = []
                self = <Script(script-x.x.x.x -Cisco.IOS.get_interfaces, started 34444146496)>
              encaps = 'ATM, loopback not set'
            matchmac = None
              ifname = 'ATM2/IMA0'
               match = <_sre.SRE_Match object at 0x804ea0cd8>
              o_stat = True
                phys = 2
          interfaces = [{'description': 'aux', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'Async129', 'description': 'aux'}], 'admin_status': False, 'oper_status': False, 'type': 'physical', 'name': 'Async129'}, {'description': 'cat-arz', 'subinterfaces': [{'mac': '0050.0f10.cd81', 'name': 'FastEthernet0/0', 'admin_status': True, 'ipv4_addresses': ['x.x.x.x/29'], 'vlan_ids': ['1'], 'oper_status': True, 'is_ipv4': True, 'description': 'cat-arz'}, {'mac': '0050.0f10.cd81', 'name': 'FastEthernet0/0.5', 'admin_status': True, 'ipv4_addresses': ['x.x.x.x/30'], 'vlan_ids': ['5'], 'oper_status': True, 'is_ipv4': True, 'description': 'link to arzamas'}, {'mac': '0050.0f10.cd81', 'name': 'FastEthernet0/0.6', 'admin_status': True, 'vlan_ids': ['6'], 'oper_status': True, 'description': ''}], 'admin_status': True, 'mac': '0050.0f10.cd81', 'oper_status': True, 'type': 'physical', 'name': 'FastEthernet0/0'}, {'description': '', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'Serial0/0', 'description': ''}], 'admin_status': False, 'oper_status': False, 'type': 'physical', 'name': 'Serial0/0'}, {'description': '', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'mac': '0050.0f10.cd82', 'name': 'FastEthernet0/1', 'description': ''}], 'admin_status': False, 'mac': '0050.0f10.cd82', 'oper_status': False, 'type': 'physical', 'name': 'FastEthernet0/1'}, {'description': '', 'subinterfaces': [{'name': 'Serial0/1', 'admin_status': False, 'ipv4_addresses': ['x.x.x.x/30'], 'oper_status': False, 'is_ipv4': True, 'description': ''}], 'admin_status': False, 'oper_status': False, 'type': 'physical', 'name': 'Serial0/1'}, {'description': 'FlexGain Control', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'Async33', 'description': 'FlexGain Control'}], 'admin_status': False, 'oper_status': False, 'type': 'physical', 'name': 'Async33'}, {'oper_status': True, 'admin_status': True, 'type': 'physical', 'name': 'ATM2/0', 'subinterfaces': [{'oper_status': True, 'admin_status': True, 'name': 'ATM2/0'}]}, {'oper_status': True, 'admin_status': True, 'type': 'physical', 'name': 'ATM2/1', 'subinterfaces': [{'oper_status': True, 'admin_status': True, 'name': 'ATM2/1'}]}, {'oper_status': False, 'admin_status': False, 'type': 'physical', 'name': 'ATM2/2', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'ATM2/2'}]}, {'oper_status': False, 'admin_status': False, 'type': 'physical', 'name': 'ATM2/3', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'ATM2/3'}]}]
                  hw = 'ATM IMA'
               vlans = None
                   i = ''
               shotn = 'At2/3'
            matchifn = None
              a_stat = True

...
...
...

------------------------------------------------------------------------
File: /opt/noc/sa/script/script.py (Line: 411)
Function: guarded_run
  404                     return result
  405                 except KeyError:
  406                     self.debug("Not in call cache: %r, %r" % (self.name,
  407                                                               self.kwargs))
  408                     pass
  409                 # Calling script body
  410             self._thread_id = thread.get_ident()
  411 ==>         result = self.execute(**self.kwargs)
  412             # Enforce interface result checking
  413             for i in self.implements:
  414                 result = i.script_clean_result(self.profile, result)
  415             # Cache result when required
  416             if self.cache and self.parent is not None:
  417                 self.debug("Write to call cache: %s, %s, %r" % (self.name,
Variables:
                   i = <noc.sa.interfaces.igetinterfaces.IGetInterfaces object at 0x804b26590>
                self = <Script(script-195.98.32.75 -Cisco.IOS.get_interfaces, started 34444146496)>
------------------------------------------------------------------------
File: /opt/noc/sa/script/script.py (Line: 434)
Function: run
  427     
  428         def run(self):
  429             """Script thread worker method"""
  430             self.debug("Running")
  431             result = None
  432             try:
  433                 with self.cancelable():
  434 ==>                 result = self.guarded_run()
  435             except TimeOutError:
  436                 self.error("Timed out")
  437                 self.e_timeout = True
  438             except CancelledError:
  439                 self.error("Cancelled")
  440                 self.e_cancel = True
Variables:
                self = <Script(script-195.98.32.75 -Cisco.IOS.get_interfaces, started 34444146496)>
                   r = ["<type 'exceptions.AttributeError'>", "'NoneType' object has no attribute 'group'"]
              result = None
                   v = AttributeError("'NoneType' object has no attribute 'group'",)
                  tb = <traceback object at 0x80682eef0>
                   t = <type 'exceptions.AttributeError'>
------------------------------------------------------------------------
END OF TRACEBACK

там, где многоточие, еще много мусора с описанием интрефейсов

Show
Ilya Z added a comment - 22.02.2012 05:32 - edited
Task failed: <type 'exceptions.AttributeError'>
'NoneType' object has no attribute 'group'
START OF TRACEBACK
------------------------------------------------------------------------
File: /opt/noc/sa/profiles/Cisco/IOS/get_interfaces.py (Line: 200)
Function: execute
  193                         for i in sh_ip.split('\n'):
  194                             matchsec = self.rx_sec_ip.search(i)
  195                             if matchsec:
  196                                 ip = matchsec.group('ip')
  197                                 sub['ipv4_addresses'] += [base.IPv4PrefixParameter().clean(ip)]
  198     
  199                 matchifn = self.rx_cisco_interface_name.match(ifname)
  200 ==>             shotn = matchifn.group("type").capitalize() + matchifn.group("number")
  201                 if shotn in ospfs:
  202                         sub['is_ospf'] = True
  203                 phys = len(ifname.split('.')) + len(ifname.split(':'))
  204                 if phys == 2:
  205                     iface = {
  206                         "name": ifname,
Variables:
            matchsec = None
                 cmd = 'show vlan-switch brief'
                  ip = 'x.x.x.x/30'
               sh_ip = 'Serial0/1 is down, line protocol is down\n  Internet address is x.x.x.x/30\n  Broadcast address is 255.255.255.255\n  Address determined by non-volatile memory\n  MTU is 1500 bytes\n  Helper address is not set\n  Directed broadcast forwarding is disabled\n  Outgoing access list is not set\n  Inbound  access list is not set\n  Proxy ARP is enabled\n  Security level is default\n  Split horizon is enabled\n  ICMP redirects are always sent\n  ICMP unreachables are always sent\n  ICMP mask replies are never sent\n  IP fast switching is enabled\n  IP fast switching on the same interface is enabled\n  IP Flow switching is disabled\n  IP CEF switching is enabled\n  IP CEF Feature Fast switching turbo vector\n  IP multicast fast switching is enabled\n  IP multicast distributed fast switching is disabled\n  IP route-cache flags are Fast, CEF\n  Router Discovery is disabled\n  IP output packet accounting is disabled\n  IP access violation accounting is disabled\n  TCP/IP header compression is disabled\n  RTP/IP header compression is disabled\n  Probe proxy name replies are disabled\n  Policy routing is disabled\n  Network address translation is disabled\n  WCCP Redirect outbound is disabled\n  WCCP Redirect inbound is disabled\n  WCCP Redirect exclude is disabled\n  BGP Policy Mapping is disabled\n  IP multicast multilayer switching is disabled\n'
 portchannel_members = {}
                 pvm = {}
               ospfs = []
               iface = {'oper_status': False, 'admin_status': False, 'type': 'physical', 'name': 'ATM2/3', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'ATM2/3'}]}
                 sub = {'oper_status': True, 'admin_status': True, 'name': 'ATM2/IMA0', 'description': 'Alcatel DSLAM trunk'}
       subinterfaces = []
                self = <Script(script-x.x.x.x -Cisco.IOS.get_interfaces, started 34444146496)>
              encaps = 'ATM, loopback not set'
            matchmac = None
              ifname = 'ATM2/IMA0'
               match = <_sre.SRE_Match object at 0x804ea0cd8>
              o_stat = True
                phys = 2
          interfaces = [{'description': 'aux', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'Async129', 'description': 'aux'}], 'admin_status': False, 'oper_status': False, 'type': 'physical', 'name': 'Async129'}, {'description': 'cat-arz', 'subinterfaces': [{'mac': '0050.0f10.cd81', 'name': 'FastEthernet0/0', 'admin_status': True, 'ipv4_addresses': ['x.x.x.x/29'], 'vlan_ids': ['1'], 'oper_status': True, 'is_ipv4': True, 'description': 'cat-arz'}, {'mac': '0050.0f10.cd81', 'name': 'FastEthernet0/0.5', 'admin_status': True, 'ipv4_addresses': ['x.x.x.x/30'], 'vlan_ids': ['5'], 'oper_status': True, 'is_ipv4': True, 'description': 'link to arzamas'}, {'mac': '0050.0f10.cd81', 'name': 'FastEthernet0/0.6', 'admin_status': True, 'vlan_ids': ['6'], 'oper_status': True, 'description': ''}], 'admin_status': True, 'mac': '0050.0f10.cd81', 'oper_status': True, 'type': 'physical', 'name': 'FastEthernet0/0'}, {'description': '', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'Serial0/0', 'description': ''}], 'admin_status': False, 'oper_status': False, 'type': 'physical', 'name': 'Serial0/0'}, {'description': '', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'mac': '0050.0f10.cd82', 'name': 'FastEthernet0/1', 'description': ''}], 'admin_status': False, 'mac': '0050.0f10.cd82', 'oper_status': False, 'type': 'physical', 'name': 'FastEthernet0/1'}, {'description': '', 'subinterfaces': [{'name': 'Serial0/1', 'admin_status': False, 'ipv4_addresses': ['x.x.x.x/30'], 'oper_status': False, 'is_ipv4': True, 'description': ''}], 'admin_status': False, 'oper_status': False, 'type': 'physical', 'name': 'Serial0/1'}, {'description': 'FlexGain Control', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'Async33', 'description': 'FlexGain Control'}], 'admin_status': False, 'oper_status': False, 'type': 'physical', 'name': 'Async33'}, {'oper_status': True, 'admin_status': True, 'type': 'physical', 'name': 'ATM2/0', 'subinterfaces': [{'oper_status': True, 'admin_status': True, 'name': 'ATM2/0'}]}, {'oper_status': True, 'admin_status': True, 'type': 'physical', 'name': 'ATM2/1', 'subinterfaces': [{'oper_status': True, 'admin_status': True, 'name': 'ATM2/1'}]}, {'oper_status': False, 'admin_status': False, 'type': 'physical', 'name': 'ATM2/2', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'ATM2/2'}]}, {'oper_status': False, 'admin_status': False, 'type': 'physical', 'name': 'ATM2/3', 'subinterfaces': [{'oper_status': False, 'admin_status': False, 'name': 'ATM2/3'}]}]
                  hw = 'ATM IMA'
               vlans = None
                   i = ''
               shotn = 'At2/3'
            matchifn = None
              a_stat = True

...
...
...

------------------------------------------------------------------------
File: /opt/noc/sa/script/script.py (Line: 411)
Function: guarded_run
  404                     return result
  405                 except KeyError:
  406                     self.debug("Not in call cache: %r, %r" % (self.name,
  407                                                               self.kwargs))
  408                     pass
  409                 # Calling script body
  410             self._thread_id = thread.get_ident()
  411 ==>         result = self.execute(**self.kwargs)
  412             # Enforce interface result checking
  413             for i in self.implements:
  414                 result = i.script_clean_result(self.profile, result)
  415             # Cache result when required
  416             if self.cache and self.parent is not None:
  417                 self.debug("Write to call cache: %s, %s, %r" % (self.name,
Variables:
                   i = <noc.sa.interfaces.igetinterfaces.IGetInterfaces object at 0x804b26590>
                self = <Script(script-195.98.32.75 -Cisco.IOS.get_interfaces, started 34444146496)>
------------------------------------------------------------------------
File: /opt/noc/sa/script/script.py (Line: 434)
Function: run
  427     
  428         def run(self):
  429             """Script thread worker method"""
  430             self.debug("Running")
  431             result = None
  432             try:
  433                 with self.cancelable():
  434 ==>                 result = self.guarded_run()
  435             except TimeOutError:
  436                 self.error("Timed out")
  437                 self.e_timeout = True
  438             except CancelledError:
  439                 self.error("Cancelled")
  440                 self.e_cancel = True
Variables:
                self = <Script(script-195.98.32.75 -Cisco.IOS.get_interfaces, started 34444146496)>
                   r = ["<type 'exceptions.AttributeError'>", "'NoneType' object has no attribute 'group'"]
              result = None
                   v = AttributeError("'NoneType' object has no attribute 'group'",)
                  tb = <traceback object at 0x80682eef0>
                   t = <type 'exceptions.AttributeError'>
------------------------------------------------------------------------
END OF TRACEBACK
там, где многоточие, еще много мусора с описанием интрефейсов

People

  • Assignee:
    Dmitry Luhtionov
    Reporter:
    Ilya Z
Vote (0)
Watch (0)

Dates

  • Created:
    22.02.2012 05:32
    Updated:
    07.03.2012 12:57
    Resolved:
    07.03.2012 12:57
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for NOC Project. Try JIRA - bug tracking software for your team.