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-377

Cisco.IOS.get_interfaces need more than 1 value to unpack

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

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: SA
  • Labels:
    None
  • Difficulty:
    Medium

Description

Task failed: <type 'exceptions.ValueError'>
need more than 1 value to unpack
START OF TRACEBACK
------------------------------------------------------------------------
File: /opt/noc/sa/profiles/Cisco/IOS/get_portchannel.py (Line: 31)
Function: execute
24 return []
25 for l in s.splitlines():
26 pc, rest = l.split(" ", 1)
27 pc = pc[2:]
28 v = self.cli("show interfaces port-channel %s | i Members in this channel" % pc).strip()
29 if not v:
30 continue
31 ==> x, y = v.split(":", 1)
32 r += [{ 33 "interface": "Po %s" % pc, 34 "members": y.strip().split(), 35 "type": "L", # <!> TODO: port-channel type detection 36 }]
37 return r
Variables:
self = <Script(script-xx.xx.xx.xx-Cisco.IOS.get_portchannel, initial)>
l = 'Po1 Aggr-proletarka notconnect 850 auto auto '
rest = ' Aggr-proletarka notconnect 850 auto auto '
pc = '1'
s = 'Po1 Aggr-proletarka notconnect 850 auto auto \n'
r = []
v = '$aces port-channel 1 | i Members in this channel'
------------------------------------------------------------------------
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.igetportchannel.IGetPortchannel object at 0x804b26950>
self = <Script(script-xx.xx.xx.xx-Cisco.IOS.get_portchannel, initial)>
------------------------------------------------------------------------
File: /opt/noc/sa/script/script.py (Line: 81)
Function: _call_
74 self.script = script
75
76 def _call_(self, **kwargs):
77 """Call script"""
78 s = self.script(self.parent.profile, self.parent.activator,
79 self.parent.access_profile, parent=self.parent,
80 **kwargs)
81 ==> return s.guarded_run()
82
83
84 class ScriptRegistry(Registry):
85 """Script registry"""
86 name = "ScriptRegistry"
87 subdir = "profiles"
Variables:
s = <Script(script-xx.xx.xx.xx-Cisco.IOS.get_portchannel, initial)>
self = <noc.sa.script.script.ScriptCallProxy object at 0x805027d10>
kwargs = {}
------------------------------------------------------------------------
File: /opt/noc/sa/profiles/Cisco/IOS/get_interfaces.py (Line: 133)
Function: execute
126 vlans = self.cli(cmd)
127 except self.CLISyntaxError:
128 continue
129 if vlans:
130 pvm = self.map_vlans_to_ports(vlans)
131 # Get portchannels
132 portchannel_members = {}
133 ==> for pc in self.scripts.get_portchannel():
134 i = pc["interface"]
135 t = pc["type"] == "L"
136 for m in pc["members"]:
137 portchannel_members[m] = (i, t)
138 interfaces = []
139 subinterfaces = []
Variables:
vlans = '\nVLAN Name Status Ports\n---- -------------------------------- --------- -------------------------------\n1 default active Gi1/1, Gi1/2, Gi1/3, Gi1/4\n Gi1/5, Gi1/6, Gi1/7, Gi1/8\n Gi1/9, Gi1/10, Gi1/11, Gi1/12\n Gi1/13, Gi1/14, Gi1/15, Gi1/16\n Gi1/17, Gi1/18, Gi1/19, Gi1/20\n Gi1/21, Gi1/22, Gi1/25, Gi1/28\n46 Office active \n94 IP-input active \n121 ip_routing#2 active \n453 active \n500 IP-DSLAM-Control active \n703 Proletarka-IP active \n711 Karla-Marksa-7302 active \n726 7-Nebo-IP active \n730 PPPoE-B2B-bb active \n795 active \n821 Meschera-IP-7302 active \n850 Aggr-proletarka active Gi1/23, Gi1/24\n851 Aggr-proletarka-dlink active Te1/30\n1002 fddi-default act/unsup \n1003 token-ring-default act/unsup \n1004 fddinet-default act/unsup \n1005 trnet-default act/unsup \n2000 Voice-SS-bb active \n2023 Beeline-3g active \n2098 SladkayaZhizn-Esenina30 active \n2151 active \n2333 3G-bb active \n'
cmd = 'show vlan-switch brief'
pvm = {' ': ['46', '9', '4', '1', '2', '1', '4', '5', '3', '5', '0', '0', '7', '0', '3', '7', '1', '1', '7', '2', '6', '7', '3', '0', '7', '9', '5', '8', '2', '1', '2', '0', '0', '0', '2', '0', '2', '3', '2', '0', '9', '8', '2', '1', '5', '1', '2', '2', '2', '1', '2', '3', '3', '3'], 'Gi1/23': ['850'], 'Gi1/24': ['850'], 'Te1/30': ['851'], 'Gi1/4': ['1'], 'Gi1/1': ['1'], 'Gi1/3': ['1'], 'Gi1/2': ['1']}
portchannel_members = {}
self = <Script(script-xx.xx.xx.xx-Cisco.IOS.get_interfaces, started 34444466688)>
------------------------------------------------------------------------
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-92.242.92.39-Cisco.IOS.get_interfaces, started 34444466688)>
------------------------------------------------------------------------
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-xx.xx.xx.xx-Cisco.IOS.get_interfaces, started 34444466688)>
r = ["<type 'exceptions.ValueError'>", 'need more than 1 value to unpack']
result = None
v = ValueError('need more than 1 value to unpack',)
tb = <traceback object at 0x8050339e0>
t = <type 'exceptions.ValueError'>
------------------------------------------------------------------------
END OF TRACEBACK

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Dmitry Luhtionov added a comment - 21.02.2012 14:12 - edited

Покажи вывод команды "show interfaces port-channel 1"

P.S. лучше traceback форматировать как код. Чуть глаза не сломал.

Show
Dmitry Luhtionov added a comment - 21.02.2012 14:12 - edited Покажи вывод команды "show interfaces port-channel 1" P.S. лучше traceback форматировать как код. Чуть глаза не сломал.
Hide
Permalink
Ilya Z added a comment - 21.02.2012 15:03

Port-channel1 is down, line protocol is down (notconnect)
Hardware is EtherChannel, address is 0000.0000.0000 (bia 0000.0000.0000)
Description: Aggr-proletarka
MTU 9198 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Auto-duplex, Auto-speed, media type is N/A
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 2w0d, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
30 second input rate 0 bits/sec, 0 packets/sec
30 second output rate 0 bits/sec, 0 packets/sec
150098636213 packets input, 103502099966992 bytes, 0 no buffer
Received 216917167 broadcasts (216760198 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
1128424628731 packets output, 1467600073000500 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out

crажите мне как тут код оформляется, а то я уже и в фигурных и в прямых, и со слешом и без пробовал

Show
Ilya Z added a comment - 21.02.2012 15:03 Port-channel1 is down, line protocol is down (notconnect) Hardware is EtherChannel, address is 0000.0000.0000 (bia 0000.0000.0000) Description: Aggr-proletarka MTU 9198 bytes, BW 100000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Auto-duplex, Auto-speed, media type is N/A input flow-control is off, output flow-control is unsupported ARP type: ARPA, ARP Timeout 04:00:00 Last input 2w0d, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue: 0/40 (size/max) 30 second input rate 0 bits/sec, 0 packets/sec 30 second output rate 0 bits/sec, 0 packets/sec 150098636213 packets input, 103502099966992 bytes, 0 no buffer Received 216917167 broadcasts (216760198 multicasts) 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 input packets with dribble condition detected 1128424628731 packets output, 1467600073000500 bytes, 0 underruns 0 output errors, 0 collisions, 0 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out crажите мне как тут код оформляется, а то я уже и в фигурных и в прямых, и со слешом и без пробовал

People

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

Dates

  • Created:
    21.02.2012 13:45
    Updated:
    24.02.2012 09:42
    Resolved:
    24.02.2012 09:42
  • 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.