Ejemplo n.º 1
0
def init_domain_exchanges(host, domain, regions):
    """set up the exchanges for the policy domain"""
    logger.info("initing domain exchanges for domain: %s" % domain)
    pdm = pd_message.PdMessage(host)
    pdm.connect()
    logger.info("connected to: %s" % host)
    for region in regions:
        logger.info("setting up exchange %s and queue/route for %s" %
                    (domain, region))
        pdm.setup(domain, region)
    def test_send_acPostProcForPut(self):
        """test sending acpostprocforput"""
        rei = {
            "doi": {
                "filePath": "/a/path.txt"
            },
            "uoic": {
                "userName": "******",
                "rodsZone": "zone"
            }
        }

        pdm = pd_message.PdMessage(host)
        pdm.setup("testdomain", "testexchange")
        pdm.send("testdomain", "landing_zone", "acPostProcForPut", rei)
 def test_setup(self):
     """test call setup with localhost"""
     pdm = pd_message.PdMessage(host)
     pdm.setup("testdomain", "testexchange")
     self.assertTrue(pdm.connection, "connection not created")
 def test_connect(self):
     """testconnect"""
     logger.info("testConnect()")
     pdm = pd_message.PdMessage(host)
     pdm.connect()
     self.assertTrue(pdm.connection, "connection not created")
Ejemplo n.º 5
0
def acPostProcForPut(rule_args, callback, rei):
    logging.info("acPostProcForPut %s" % rule_args)
    pythonRuleEnginePluginTest(rule_args, callback, rei)
    pdMessage = pd_message.PdMessage(host)
    pdMessage.connect()
    pdMessage.send(domain, "landing_zone", "acPostProcForPut", rei)