def retrieveVals(self):
if self.hasGraph('<STR_LIT>') or self.hasGraph('<STR_LIT>'):<EOL><INDENT>stats = self._ami.getChannelStats(self._chanList)<EOL>if  self.hasGraph('<STR_LIT>')  and stats:<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if  self.hasGraph('<STR_LIT>')  and stats:<EOL><INDENT>for field in self._chanList:<EOL><INDENT>self.setGraphVal('<STR_LIT>', <EOL>field, stats.get(field))<EOL><DEDENT>if '<STR_LIT>' in self._chanList:<EOL><INDENT>self.setGraphVal('<STR_LIT>', <EOL>'<STR_LIT>', stats.get('<STR_LIT>'))<EOL><DEDENT><DEDENT><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>stats = self._ami.getPeerStats('<STR_LIT>')<EOL>if stats:<EOL><INDENT>for field in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', <EOL>field, stats.get(field))<EOL><DEDENT><DEDENT><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>stats = self._ami.getPeerStats('<STR_LIT>')<EOL>if stats:<EOL><INDENT>for field in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', <EOL>field, stats.get(field))<EOL><DEDENT><DEDENT><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>sipstats = self._ami.getVoIPchanStats('<STR_LIT>', self._codecList) or {}<EOL>iax2stats = self._ami.getVoIPchanStats('<STR_LIT>', self._codecList) or {}<EOL>if stats:<EOL><INDENT>for field in self._codecList:<EOL><INDENT>self.setGraphVal('<STR_LIT>', field,<EOL>sipstats.get(field,<NUM_LIT:0>) <EOL>+ iax2stats.get(field, <NUM_LIT:0>))<EOL><DEDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>',<EOL>sipstats.get('<STR_LIT>', <NUM_LIT:0>) <EOL>+ iax2stats.get('<STR_LIT>', <NUM_LIT:0>))<EOL><DEDENT><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>stats = self._ami.getConferenceStats()<EOL>if stats:<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>stats = self._ami.getVoicemailStats()<EOL>if stats:<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT><DEDENT>if self.hasGraph('<STR_LIT>') and len(self._trunkList) > <NUM_LIT:0>:<EOL><INDENT>stats = self._ami.getTrunkStats(self._trunkList)<EOL>for trunk in self._trunkList:<EOL><INDENT>self.setGraphVal('<STR_LIT>', trunk[<NUM_LIT:0>], <EOL>stats.get(trunk[<NUM_LIT:0>]))<EOL><DEDENT><DEDENT>if self._queues is not None:<EOL><INDENT>total_answer = <NUM_LIT:0><EOL>total_abandon = <NUM_LIT:0><EOL>for queue in self._queue_list:<EOL><INDENT>stats = self._queues[queue]<EOL>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', queue,<EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', queue,<EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', queue,<EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>total_abandon += stats.get('<STR_LIT>')<EOL>total_answer += stats.get('<STR_LIT>')<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>prev_stats = self._queues_prev.get(queue)<EOL>if prev_stats is not None:<EOL><INDENT>abandon = (stats.get('<STR_LIT>', <NUM_LIT:0>) -<EOL>prev_stats.get('<STR_LIT>', <NUM_LIT:0>))<EOL>answer = (stats.get('<STR_LIT>', <NUM_LIT:0>) -<EOL>prev_stats.get('<STR_LIT>', <NUM_LIT:0>))<EOL>total = abandon + answer    <EOL>if total > <NUM_LIT:0>:<EOL><INDENT>val = <NUM_LIT> * float(abandon) / float(total)<EOL><DEDENT>else:<EOL><INDENT>val = <NUM_LIT:0><EOL><DEDENT>self.setGraphVal('<STR_LIT>', <EOL>queue, val)<EOL><DEDENT><DEDENT><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>total_abandon)<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>total_answer)<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>fax_stats = self._ami.getFaxStatsCounters()<EOL>stats = fax_stats.get('<STR_LIT>')<EOL>if stats is not None:<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT><DEDENT><DEDENT>
Retrieve values for graphs.