def get_cpg_list(ip, user, passwd):
 cmd = 'showcpg'
 showcpg_list = run_ssh_thread(ip, user, passwd, cmd)
 cpg_list = []
 line_num = 0
 for line in showcpg_list:
  line_num += 1
  if ('-------------------------' in line):
   break
  if (('-----' in line) or ('rcpy.' in line) or ('.srdata' in line) or ('0 admin' in line)):
   continue
  if (line_num >= 4):
   cpg_stats = line.split()
   cpg_list.append(cpg_stats[1])
 return cpg_list

def get_cpg_list ( ip , user , passwd ) : cmd = 'showcpg' showcpg_list = run_ssh_thread ( ip , user , passwd , cmd ) cpg_list = [ ] line_num = 0 for line in showcpg_list : line_num += 1 if ( '-------------------------' in line ) : break if ( ( '-----' in line ) or ( 'rcpy.' in line ) or ( '.srdata' in line ) or ( '0 admin' in line ) ) : continue if ( line_num >= 4 ) : cpg_stats = line . split ( ) cpg_list . append ( cpg_stats [ 1 ] ) return cpg_list
get a list of cpgs to build metric definitions with .