import itertools
import time
import uuid

import eventlet
import greenlet
from oslo.config import cfg

from monitor.openstack.common.gettextutils import _
from monitor.openstack.common import importutils
from monitor.openstack.common import jsonutils
from monitor.openstack.common import log as logging
from monitor.openstack.common.rpc import amqp as rpc_amqp
from monitor.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.StrOpt("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", default="", help="Username for qpid connection"),
    cfg.StrOpt("qpid_password", default="", help="Password for qpid connection", secret=True),
    cfg.StrOpt("qpid_sasl_mechanisms", default="", help="Space separated list of SASL mechanisms to use for auth"),
    cfg.IntOpt("qpid_heartbeat", default=60, help="Seconds between connection keepalive heartbeats"),
    cfg.StrOpt("qpid_protocol", default="tcp", help="Transport to use, either 'tcp' or 'ssl'"),
    cfg.BoolOpt("qpid_tcp_nodelay", default=True, help="Disable Nagle algorithm"),
]
Esempio n. 2
0
import sys
import types
import uuid

import eventlet
import greenlet
from oslo.config import cfg

from monitor.openstack.common import excutils
from monitor.openstack.common.gettextutils import _
from monitor.openstack.common import importutils
from monitor.openstack.common import jsonutils
from monitor.openstack.common import processutils as utils
from monitor.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 '
                    'address.'),
Esempio n. 3
0
import sys
import types
import uuid

import eventlet
import greenlet
from oslo.config import cfg

from monitor.openstack.common import excutils
from monitor.openstack.common.gettextutils import _
from monitor.openstack.common import importutils
from monitor.openstack.common import jsonutils
from monitor.openstack.common import processutils as utils
from monitor.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 '
               'address.'),
Esempio n. 4
0
import itertools
import time
import uuid

import eventlet
import greenlet
from oslo.config import cfg

from monitor.openstack.common.gettextutils import _
from monitor.openstack.common import importutils
from monitor.openstack.common import jsonutils
from monitor.openstack.common import log as logging
from monitor.openstack.common.rpc import amqp as rpc_amqp
from monitor.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.StrOpt('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',
               default='',
               help='Username for qpid connection'),
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.
"""
The MatchMaker classes should accept a Topic or Fanout exchange key and
return keys for direct exchanges, per (approximate) AMQP parlance.
"""

from oslo.config import cfg

from monitor.openstack.common import importutils
from monitor.openstack.common import log as logging
from monitor.openstack.common.rpc import matchmaker as mm_common

redis = importutils.try_import('redis')


matchmaker_redis_opts = [
    cfg.StrOpt('host',
               default='127.0.0.1',
               help='Host to locate redis'),
    cfg.IntOpt('port',
               default=6379,
               help='Use this port to connect to redis host.'),
    cfg.StrOpt('password',
               default=None,
               help='Password for Redis server. (optional)'),
]

CONF = cfg.CONF
Esempio n. 6
0
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.
"""
The MatchMaker classes should accept a Topic or Fanout exchange key and
return keys for direct exchanges, per (approximate) AMQP parlance.
"""

from oslo.config import cfg

from monitor.openstack.common import importutils
from monitor.openstack.common import log as logging
from monitor.openstack.common.rpc import matchmaker as mm_common

redis = importutils.try_import("redis")


matchmaker_redis_opts = [
    cfg.StrOpt("host", default="127.0.0.1", help="Host to locate redis"),
    cfg.IntOpt("port", default=6379, help="Use this port to connect to redis host."),
    cfg.StrOpt("password", default=None, help="Password for Redis server. (optional)"),
]

CONF = cfg.CONF
opt_group = cfg.OptGroup(name="matchmaker_redis", title="Options for Redis-based MatchMaker")
CONF.register_group(opt_group)
CONF.register_opts(matchmaker_redis_opts, opt_group)
LOG = logging.getLogger(__name__)