<commit_before>##############################################################################
#
# Copyright (C) Zenoss, Inc. 2014, all rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# 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.
#
##############################################################################

try:
    # should work up to Kilo
    from ceilometer.openstack.common import log
except ImportError:
    try:
        # should work starting from Liberty
        from oslo_log import log
    except ImportError:
        # should not reach here
        pass

LOG = log.getLogger(__name__)

try:
    # should work up to Kilo
    from oslo.config import cfg
except ImportError:
    LOG.error("Failed to import cfg from oslo.config." +
              " Try oslo_config...")
    try:
        # should work starting from Liberty
        from oslo_config import cfg
    except ImportError:
        LOG.error("Failed to import cfg from oslo_config")
        # should not reach here
        pass

from ceilometer import dispatcher

from kombu import Connection
from kombu.entity import Exchange
from kombu.messaging import Producer
import eventlet
from eventlet import pools
from eventlet import semaphore

import datetime
import os
import os.path
import socket
import sys
import time

zenoss_dispatcher_opts = [
    cfg.StrOpt('zenoss_device',
               default=None,
               help='Zenoss device name for this openstack environment.'),
    cfg.StrOpt('amqp_hostname',
               default=None,
               help='Zenoss AMQP Host'),
    cfg.IntOpt('amqp_port',<commit_msg>ZEN-22049: make importing log, cfg work for Juno, Kilo, and Liberty.<commit_after>##############################################################################
#
# Copyright (C) Zenoss, Inc. 2014, all rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# 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.
#
##############################################################################

try:
    # should work up to Kilo
    from ceilometer.openstack.common import log
except ImportError:
    try:
        # should work starting from Liberty
        from oslo_log import log
    except ImportError:
        # should not reach here
        pass

LOG = log.getLogger(__name__)

try:
    # should work up to Kilo
    from oslo.config import cfg
except ImportError:
    LOG.info("Could not import cfg from oslo.config." +
              " Try import cfg from oslo_config...")
    try:
        # should work starting from Liberty
        from oslo_config import cfg
    except ImportError:
        # should not reach here
        LOG.error("Failed to import cfg from oslo_config")
        pass

from ceilometer import dispatcher

from kombu import Connection
from kombu.entity import Exchange
from kombu.messaging import Producer
import eventlet
from eventlet import pools
from eventlet import semaphore

import datetime
import os
import os.path
import socket
import sys
import time

zenoss_dispatcher_opts = [
    cfg.StrOpt('zenoss_device',
               default=None,
               help='Zenoss device name for this openstack environment.'),
    cfg.StrOpt('amqp_hostname',
               default=None,
               help='Zenoss AMQP Host'),
    cfg.IntOpt('amqp_port',
{'fraction_non_alphanumeric': 0.1341288782816229, 'fraction_numerical': 0.005011933174224344, 'mean_word_length': 3.3117283950617282, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1995084', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1055, 'n_words': 442}