def return_all_binding_details(self):

        results             = build_dict("FAILED", "Not Found", { "Bindings" : [] })

        try:

            if self.m_channel == None:
                results     = build_dict("FAILED", "Not Connected", { "Bindings" : [] })
            else:
                    
                try:

                    proc        = subprocess.Popen("/usr/bin/rabbitmqadmin list bindings source destination routing_key", shell=True, stdout=subprocess.PIPE)
                    std_rows    = proc.communicate()[0].split("\n")
                    results     = build_dict("SUCCESS", "Found Bindings", {
                                                        "Bindings"  : [],
                                                })

                    # build all the bindings

                    self.lg("Building Bindings Rows(" + str(len(std_rows)) + ")", 6)
                    use_row     = False
                    cur_row     = 0
                    for row in std_rows:

                        if use_row:
                            row_arr           = row.split("|")

                            if len(row_arr) > 1:
                                self.dlg("Binding Row(" + str(row_arr) + ")", 6)
                                source_name       = str(row_arr[1]).strip().lstrip()
                                destination_name  = str(row_arr[2]).strip().lstrip()
                                routing_key       = str(row_arr[3]).strip().lstrip()

                                if source_name == "":
                                    source_name   = "Default"
                                
                                new_binding       = {
                                                      "Source"      : str(source_name),
                                                      "Destination" : str(destination_name),
                                                      "RoutingKey"  : str(routing_key)
                                                  }
                        
                                results["Record"]["Bindings"].append(new_binding)
                        else:
                            if cur_row > 1:
                                use_row = True
                        # end of skip first headers
                        cur_row         += 1

                    # build all the bindings

                except Exception,h:
                    self.lg("Get All Bindings Failed with Ex(" + str(h) + ")", 6)
                    results     = build_dict("SUCCESS", "No Bindings", { "Bindings" : [] })
                # end of try/ex for getting the queue

        except Exception,k:
            err_msg             = "Failed to run return_all_binding_details with Ex(" + str(k) + ")"
            self.lg("ERROR: " + str(err_msg), 0)
            self.m_status       = "Failed"
            results             = build_dict("FAILED", str(err_msg), { "Bindings" : [] })
        # end of try/ex

        return results
    # end of return_all_binding_details
Getting all Bindings details requires running as root to access rabbitmqctl
dataset/ETHPy150Open GetLevvel/message-simulator/src/rabbit_message_publisher.py/RabbitMessagePublisher.return_all_binding_details