Example #1
0
def test_running():
    r"""Test checking for server w/ URL."""
    # url = "amqp://*****:*****@localhost:5672/%2F"
    vhost = ygg_cfg.get('rmq', 'vhost', '')
    if not vhost:
        vhost = '%2F'
    url = "amqp://%s:%s@%s:%s/%s" % (ygg_cfg.get(
        'rmq', 'user', 'guest'), ygg_cfg.get('rmq', 'password', 'guest'),
                                     ygg_cfg.get('rmq', 'host', 'localhost'),
                                     ygg_cfg.get('rmq', 'port', '5672'), vhost)
    assert (check_rmq_server(url=url))
Example #2
0
    def is_comm_installed(cls, **kwargs):
        r"""Determine if a comm is installed for the associated programming
        language.

        Args:
            **kwargs: Additional keyword arguments are passed to the parent
                class's method.

        Returns:
            bool: True if a comm is installed for this language.

        """
        # Call __func__ to avoid direct invoking of class which dosn't exist
        # in after_registration where this is called
        out = InterpretedModelDriver.is_comm_installed.__func__(cls, **kwargs)
        if not kwargs.get('skip_config'):
            return out
        if out and (kwargs.get('commtype', None) in ['rmq', 'rmq_async']):
            from yggdrasil.communication.RMQComm import check_rmq_server
            out = check_rmq_server()
        return out
Example #3
0
 def is_installed(cls):
     r"""bool: True if the class is fully installed, False otherwise."""
     from yggdrasil.communication.RMQComm import check_rmq_server
     return check_rmq_server()