Ejemplo n.º 1
0
import sys
import types
import uuid

import eventlet
import greenlet
from oslo.config import cfg

from staccato.openstack.common import excutils
from staccato.openstack.common.gettextutils import _
from staccato.openstack.common import importutils
from staccato.openstack.common import jsonutils
from staccato.openstack.common import processutils as utils
from staccato.openstack.common.rpc import common as rpc_common

zmq = importutils.try_import("eventlet.green.zmq")

# for convenience, are not modified.
pformat = pprint.pformat
Timeout = eventlet.timeout.Timeout
LOG = rpc_common.LOG
RemoteError = rpc_common.RemoteError
RPCException = rpc_common.RPCException

zmq_opts = [
    cfg.StrOpt(
        "rpc_zmq_bind_address",
        default="*",
        help="ZeroMQ bind address. Should be a wildcard (*), "
        "an ethernet interface, or IP. "
        'The "host" option should point or resolve to this '
Ejemplo n.º 2
0
import itertools
import time
import uuid

import eventlet
import greenlet
from oslo.config import cfg

from staccato.openstack.common.gettextutils import _
from staccato.openstack.common import importutils
from staccato.openstack.common import jsonutils
from staccato.openstack.common import log as logging
from staccato.openstack.common.rpc import amqp as rpc_amqp
from staccato.openstack.common.rpc import common as rpc_common

qpid_messaging = importutils.try_import("qpid.messaging")
qpid_exceptions = importutils.try_import("qpid.messaging.exceptions")

LOG = logging.getLogger(__name__)

qpid_opts = [
    cfg.StrOpt('qpid_hostname',
               default='localhost',
               help='Qpid broker hostname'),
    cfg.IntOpt('qpid_port',
               default=5672,
               help='Qpid broker port'),
    cfg.ListOpt('qpid_hosts',
                default=['$qpid_hostname:$qpid_port'],
                help='Qpid HA cluster host:port pairs'),
    cfg.StrOpt('qpid_username',
Ejemplo n.º 3
0
import signal
import sys
import time

import eventlet
import logging as std_logging
from oslo.config import cfg

from staccato.openstack.common import eventlet_backdoor
from staccato.openstack.common.gettextutils import _
from staccato.openstack.common import importutils
from staccato.openstack.common import log as logging
from staccato.openstack.common import threadgroup


rpc = importutils.try_import('staccato.openstack.common.rpc')
CONF = cfg.CONF
LOG = logging.getLogger(__name__)


class Launcher(object):
    """Launch one or more services and wait for them to complete."""

    def __init__(self):
        """Initialize the service launcher.

        :returns: None

        """
        self._services = threadgroup.ThreadGroup()
        self.backdoor_port = eventlet_backdoor.initialize_if_enabled()