proc allports {} {
  set result [list]
  set pattern {([0-9a-zA_Z.-]*:[0-9]+)$}
  foreach obj [obj_list items] {
    set port [silent none $obj hostport]
    if {[regexp $pattern $port -> port]} {
      lappend result $port
    } else {
      if {[regexp ".* $pattern" [silent 0 $obj creationCmd] -> port]} {
        lappend result $port
      }
    }
  }
  return $result
}

publishLazy allports spy
