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



_POSTGRESQL = 'postgresql'
_MYSQL = 'mysql'
_ORM = 'orm'
_REPO_DRIVERS_MAP = {
    _POSTGRESQL: 'monasca_notification.common.repositories.'
                 'postgres.pgsql_repo:PostgresqlRepo',
    _MYSQL: 'monasca_notification.common.repositories.'
            'mysql.mysql_repo:MysqlRepo',
    _ORM: 'monasca_notification.common.repositories.'
          'orm.orm_repo:OrmRepo'
}
_ACCEPTABLE_DRIVER_KEYS = set(list(_REPO_DRIVERS_MAP.keys()) +
                              list(_REPO_DRIVERS_MAP.values()))

_DEFAULT_DB_HOST = '127.0.0.1'
_DEFAULT_DB_USER = 'notification'
_DEFAULT_DB_PASSWORD = 'password'  # nosec bandit B105
_DEFAULT_DB_NAME = 'mon'

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

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



_POSTGRESQL = 'postgresql'
_MYSQL = 'mysql'
_ORM = 'orm'
_REPO_DRIVERS_MAP = {
    _POSTGRESQL: 'monasca_notification.common.repositories.'
                 'postgres.pgsql_repo:PostgresqlRepo',
    _MYSQL: 'monasca_notification.common.repositories.'
            'mysql.mysql_repo:MysqlRepo',
    _ORM: 'monasca_notification.common.repositories.'
          'orm.orm_repo:OrmRepo'
}
_ACCEPTABLE_DRIVER_KEYS = set(list(_REPO_DRIVERS_MAP.keys()) +
                              list(_REPO_DRIVERS_MAP.values()))

_DEFAULT_DB_HOST = '127.0.0.1'
_DEFAULT_DB_USER = 'notification'
_DEFAULT_DB_PASSWORD = 'password'  # nosec bandit B105
_DEFAULT_DB_NAME = 'mon'

_DEFAULT_POSTGRESQL_PORT = 5432