# Path: monasca_notification/conf/types.py
# LOG = log.getLogger(__name__)
# class Plugin(types.String):
# class PluginOpt(cfg.Opt):
# class HostAddressPortType(types.HostAddress):
#     def __init__(self, ignore_missing=False, choices=None, plugin_map=None):
#     def __call__(self, value):
#     def _get_actual_target(self, value):
#     def __init__(self, name, choices=None, plugin_map=None, **kwargs):
#     def __init__(self, version=None):
#     def __call__(self, value):
#     def _validate_port(port=80):
#     def _validate_addr(self, addr):


from oslo_config import cfg
from monasca_notification.conf import types
#
# 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.



_DEFAULT_URL = '127.0.0.1:9092'
_DEFAULT_GROUP = 'monasca-notification'
_DEFAULT_ALARM_TOPIC = 'alarm-state-transitions'
_DEFAULT_NOTIFICATION_TOPIC = 'alarm-notifications'
_DEFAULT_RETRY_TOPIC = 'retry-notifications'
_DEFAULT_PERIODIC_TOPICS = {
    '60': '60-seconds-notifications'
}
_DEFAULT_MAX_OFFSET_LAG = 600

kafka_group = cfg.OptGroup('kafka',
                           title='Kafka Options',
                           help='Options under this group allow to configure '
                                'valid connection or Kafka queue.')

kafka_opts = [
    cfg.ListOpt(name='url', item_type=types.HostAddressPortType(),
                bounds=False,
                default=_DEFAULT_URL, required=True,
                help='List of addresses (with ports) pointing '
                     'at Kafka cluster.'),

# Path: monasca_notification/conf/types.py
# LOG = log.getLogger(__name__)
# class Plugin(types.String):
# class PluginOpt(cfg.Opt):
# class HostAddressPortType(types.HostAddress):
#     def __init__(self, ignore_missing=False, choices=None, plugin_map=None):
#     def __call__(self, value):
#     def _get_actual_target(self, value):
#     def __init__(self, name, choices=None, plugin_map=None, **kwargs):
#     def __init__(self, version=None):
#     def __call__(self, value):
#     def _validate_port(port=80):
#     def _validate_addr(self, addr):


# Path: monasca_notification/conf/kafka.py
from oslo_config import cfg
from monasca_notification.conf import types

#
# 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.



_DEFAULT_URL = '127.0.0.1:9092'
_DEFAULT_GROUP = 'monasca-notification'
_DEFAULT_ALARM_TOPIC = 'alarm-state-transitions'
_DEFAULT_NOTIFICATION_TOPIC = 'alarm-notifications'
_DEFAULT_RETRY_TOPIC = 'retry-notifications'
_DEFAULT_PERIODIC_TOPICS = {
    '60': '60-seconds-notifications'
}
_DEFAULT_MAX_OFFSET_LAG = 600

kafka_group = cfg.OptGroup('kafka',
                           title='Kafka Options',
                           help='Options under this group allow to configure '
                                'valid connection or Kafka queue.')

kafka_opts = [
    cfg.ListOpt(name='url', item_type=types.HostAddressPortType(),
                bounds=False,
                default=_DEFAULT_URL, required=True,
                help='List of addresses (with ports) pointing '
                     'at Kafka cluster.'),

    cfg.StrOpt(name='group', default=_DEFAULT_GROUP,