Exemple #1
0
 def __init__(self, host=None, binary=None, topic=None, manager=None):
     host = host or CONF.host
     binary = binary or os.path.basename(inspect.stack()[-1][1])
     topic = topic or binary.rpartition('reddwarf-')[2]
     self.manager_impl = importutils.import_object(manager)
     self.report_interval = CONF.report_interval
     super(RpcService, self).__init__(host, topic,
                                      manager=self.manager_impl)
Exemple #2
0
    def __init__(self, quota_driver_class=None):
        """Initialize a Quota object."""

        self._resources = {}

        if not quota_driver_class:
            quota_driver_class = CONF.quota_driver
        if isinstance(quota_driver_class, basestring):
            quota_driver_class = importutils.import_object(quota_driver_class, self._resources)
        self._driver = quota_driver_class
Exemple #3
0
 def __init__(self):
     super(Manager, self).__init__()
     self.admin_context = ReddwarfContext(
         user=CONF.nova_proxy_admin_user,
         auth_token=CONF.nova_proxy_admin_pass,
         tenant=CONF.nova_proxy_admin_tenant_name)
     if CONF.exists_notification_transformer:
         self.exists_transformer = importutils.import_object(
             CONF.exists_notification_transformer,
             context=self.admin_context)
Exemple #4
0
    def __init__(self, quota_driver_class=None):
        """Initialize a Quota object."""

        self._resources = {}

        if not quota_driver_class:
            quota_driver_class = CONF.quota_driver
        if isinstance(quota_driver_class, basestring):
            quota_driver_class = importutils.import_object(
                quota_driver_class, self._resources)
        self._driver = quota_driver_class
Exemple #5
0
def _get_matchmaker(*args, **kwargs):
    global matchmaker
    if not matchmaker:
        matchmaker = importutils.import_object(CONF.rpc_zmq_matchmaker, *args,
                                               **kwargs)
    return matchmaker
Exemple #6
0
def _get_matchmaker(*args, **kwargs):
    global matchmaker
    if not matchmaker:
        matchmaker = importutils.import_object(
            CONF.rpc_zmq_matchmaker, *args, **kwargs)
    return matchmaker