def on_channel_open(self, channel):
        self.lg("Channel opened", 6)
        self.m_channel = channel
        self.add_on_channel_close_callback()

        delete_existing_queues  = self.m_teardown_old
        only_if_queue_is_empty  = True
        delete_existing_exch    = self.m_teardown_old
        only_if_exchange_unused = True

        # build up the entities:
                    
        # If this is a specialized Publisher that only needs to publish
        if self.m_only_publishing:
            self.lg("Worker Starting Publish", 6)
            self.start_publishing()

        else:

            # If the Simulation JSON Model defines: ["Simulation"]["ResetAll"] == true
            # then this will tear down any previous existing Simulation Entities
            if self.m_teardown_old:
                reset_results       = self.____reset_cluster_entities({})

            self.lg("Creating Exchanges(" + str(len(self.m_exchanges)) + ")", 6)
            for exchange_node in self.m_exchanges:

                # clean up existing exchanges
                test_for_exchange   = self.get_exchange_details(exchange_node, delete_existing_exch, only_if_exchange_unused)
                if self.m_teardown_old:
                    if test_for_exchange["Status"] == "SUCCESS":
                        if test_for_exchange["Error"] == "Found Exchange":
                            self.delete_exchange(exchange_node)
                    else:
                        self.lg("ERROR: Failed to Cleanup Exchange(" + str(json.dumps(exchange_node)) + ") Results(" + str(test_for_exchange) + ")", 0)
                    
                    self.setup_exchange(exchange_node)
                else:
                    if test_for_exchange["Status"] == "SUCCESS":
                        if test_for_exchange["Error"] != "Found Exchange":
                            self.setup_exchange(exchange_node)
            # end of for all exchanges

            self.lg("Creating Queues(" + str(len(self.m_queues)) + ")", 6)
            for queue_node in self.m_queues:
        
                # clean up existing queues
                test_for_queue      = self.get_queue_details(queue_node, delete_existing_queues, only_if_queue_is_empty)
                if self.m_teardown_old:
                    if test_for_queue["Status"] == "SUCCESS":
                        if test_for_queue["Error"] == "Found Queue":
                            self.delete_queue(queue_node)
                    else:
                        self.lg("ERROR: Failed to Cleanup Queue(" + str(json.dumps(queue_node)) + ") Results(" + str(test_for_queue) + ")", 0)

                    self.setup_queue(queue_node)
                else:
                    if test_for_queue["Status"] == "SUCCESS":
                        if test_for_queue["Error"] != "Found Queue":
                            self.setup_queue(queue_node)
            # end of for all queues

            self.lg("Creating Bindings(" + str(len(self.m_bindings)) + ")", 6)
            for binding_node in self.m_bindings:
                self.lg("Binding Ex(" + str(binding_node["Exchange"]) + ") => Queue(" + str(binding_node["Queue"]) + ") RoutingKey(" + str(binding_node["RoutingKey"]) + ")", 6)
                self.m_channel.queue_bind(self.on_bindok, str(binding_node["Queue"]), str(binding_node["Exchange"]), str(binding_node["RoutingKey"]))
            # end of for all bindings
            
            # Allow Simulations to only create Consumers without creating Queues
            if len(self.m_queues) == 0:
                self.start_consumers()
            # end of starting consumers without any queues

        # end of if we are publishing 

    # end of on_channel_open
Returns a cookielib.Cookie based on a set-cookie header line
dataset/ETHPy150Open GetLevvel/message-simulator/src/rabbit_message_publisher.py/RabbitMessagePublisher.on_channel_open--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/httpbase.py/HTTPBase.set_cookie