Exemple #1
0
def send(host, message):
    """
        Simply send the message
    """
    config['BROKER_HOST'] = host
    message_tx = BlockingMessageTx(config=config)
    message_tx.send(message=message)
Exemple #2
0
def send(host, message):
    """
        Simply send the message
    """
    config['BROKER_HOST'] = host
    message_tx = BlockingMessageTx(config=config)
    message_tx.send(message=message)
Exemple #3
0
    def send_confirmation(self):
        """
            Send confirmation message
        """
        undeploy_confirmation_message = UndeployConfirmationMessage(
            api_id=self.api_id, status=self.last_execution_status)

        # Report this deployment back to Event Reporter
        event_reporter = EventReporter()
        event_reporter.send(undeploy_confirmation_message)

        message_tx = BlockingMessageTx(config=self.config)
        return message_tx.send(message=undeploy_confirmation_message)
Exemple #4
0
    def send_confirmation(self):
        """
            Send confirmation message
        """
        undeploy_confirmation_message = UndeployConfirmationMessage(
            api_id=self.api_id,
            status=self.last_execution_status
        )

        # Report this deployment back to Event Reporter
        event_reporter = EventReporter()
        event_reporter.send(undeploy_confirmation_message)

        message_tx = BlockingMessageTx(config=self.config)
        return message_tx.send(message=undeploy_confirmation_message)
    def send_confirmation(self):
        """
            Send confirmation message
        """
        loadbalance_update_confirmation_message = LoadbalanceUpdateConfirmationMessage(
            api_id=self.api_id,
            # TODO: Incorrect for staging environment! Update this host!
            lb_host="api.apitrary.com",
            lb_api_port=80,
            api_domainname="{}.api.apitrary.com".format(self.api_id),
        )

        # Report this deployment back to Event Reporter
        event_reporter = EventReporter()
        event_reporter.send(loadbalance_update_confirmation_message)

        message_tx = BlockingMessageTx(self.config)
        return message_tx.send(message=loadbalance_update_confirmation_message)
    def send_confirmation(self):
        """
            Send confirmation message
        """
        loadbalance_update_confirmation_message = LoadbalanceUpdateConfirmationMessage(
            api_id=self.api_id,
            # TODO: Incorrect for staging environment! Update this host!
            lb_host='api.apitrary.com',
            lb_api_port=80,
            api_domainname='{}.api.apitrary.com'.format(self.api_id)
        )

        # Report this deployment back to Event Reporter
        event_reporter = EventReporter()
        event_reporter.send(loadbalance_update_confirmation_message)

        message_tx = BlockingMessageTx(self.config)
        return message_tx.send(message=loadbalance_update_confirmation_message)
Exemple #7
0
    def send_confirmation(self):
        """
            Send confirmation message
        """
        if self.last_execution_status == OS_ERROR:
            logger.error('Cannot send confirmation. Last run had an error.')
            return OS_ERROR

        deploy_confirmation_message = DeployConfirmationMessage(
            api_id=self.api_id,
            genapi_version=self.genapi_version,
            host=self.application_host,
            port=self.assigned_port,
            status=self.last_execution_status)

        # Report this deployment back to Event Reporter
        event_reporter = EventReporter()
        event_reporter.send(deploy_confirmation_message)

        # Now, send the message to rmq
        message_tx = BlockingMessageTx(config=self.config)
        return message_tx.send(message=deploy_confirmation_message)
Exemple #8
0
    def send_confirmation(self):
        """
            Send confirmation message
        """
        if self.last_execution_status == OS_ERROR:
            logger.error('Cannot send confirmation. Last run had an error.')
            return OS_ERROR

        deploy_confirmation_message = DeployConfirmationMessage(
            api_id=self.api_id,
            genapi_version=self.genapi_version,
            host=self.application_host,
            port=self.assigned_port,
            status=self.last_execution_status
        )

        # Report this deployment back to Event Reporter
        event_reporter = EventReporter()
        event_reporter.send(deploy_confirmation_message)

        # Now, send the message to rmq
        message_tx = BlockingMessageTx(config=self.config)
        return message_tx.send(message=deploy_confirmation_message)