# Path: monasca_api/common/repositories/sqla/models.py
# def get_all_metadata():
# def create_a_model(metadata=None):
# def create_sadd_model(metadata=None):
# def create_aa_model(metadata=None):
# def create_md_model(metadata=None):
# def create_mde_model(metadata=None):
# def create_nm_model(metadata=None):
# def create_nmt_model(metadata=None):
# def create_mdd_model(metadata=None):
# def create_am_model(metadata=None):
# def create_ad_model(metadata=None):
# def create_sa_model(metadata=None):
# def create_sad_model(metadata=None):
#     def __init__(self, columns, separator=',', order_by=None):
# def _group_concat_oracle(element, compiler_, **kw):
# def _group_concat_postgresql(element, compiler_, **kw):
# def _group_concat_sybase(element, compiler_, **kw):
# def _group_concat_mysql(element, compiler_, **kw):
# def _group_concat_default(element, compiler_, **kw):
#     def __init__(self, column, fields):
# def _field_sort_mysql(element, compiler_, **kw):
# def _field_sort_general(element, compiler_, **kw):
# class group_concat(expression.ColumnElement):
# class field_sort(expression.ColumnElement):


import datetime
import time
import fixtures
from oslo_config import cfg
from oslo_db.sqlalchemy.engines import create_engine
from sqlalchemy import delete, MetaData, insert, bindparam
from monasca_api.common.repositories.sqla import models
from monasca_api.tests import base
        from monasca_api.common.repositories.sqla import alarms_repository as ar
        from monasca_api.common.repositories import exceptions
        from monasca_api.common.repositories import exceptions
        from monasca_api.common.repositories import exceptions
        from monasca_api.common.repositories import exceptions
                                  .values(
                                      sub_alarm_definition_id=bindparam('sub_alarm_definition_id'),
                                      dimension_name=bindparam('dimension_name'),
                                      value=bindparam('value')))

        cls.nm = models.create_nm_model(metadata)
        cls._delete_nm_query = delete(cls.nm)
        cls._insert_nm_query = (insert(cls.nm)
                                .values(
                                    id=bindparam('id'),
                                    tenant_id=bindparam('tenant_id'),
                                    name=bindparam('name'),
                                    type=bindparam('type'),
                                    address=bindparam('address'),
                                    created_at=bindparam('created_at'),
                                    updated_at=bindparam('updated_at')))

        cls.a = models.create_a_model(metadata)
        cls._delete_a_query = delete(cls.a)
        cls._insert_a_query = (insert(cls.a)
                               .values(
                                   id=bindparam('id'),
                                   alarm_definition_id=bindparam('alarm_definition_id'),
                                   state=bindparam('state'),
                                   lifecycle_state=bindparam('lifecycle_state'),
                                   link=bindparam('link'),
                                   created_at=bindparam('created_at'),
                                   updated_at=bindparam('updated_at'),
                                   state_updated_at=bindparam('state_updated_at')))


# Path: monasca_api/common/repositories/sqla/models.py
# def get_all_metadata():
# def create_a_model(metadata=None):
# def create_sadd_model(metadata=None):
# def create_aa_model(metadata=None):
# def create_md_model(metadata=None):
# def create_mde_model(metadata=None):
# def create_nm_model(metadata=None):
# def create_nmt_model(metadata=None):
# def create_mdd_model(metadata=None):
# def create_am_model(metadata=None):
# def create_ad_model(metadata=None):
# def create_sa_model(metadata=None):
# def create_sad_model(metadata=None):
#     def __init__(self, columns, separator=',', order_by=None):
# def _group_concat_oracle(element, compiler_, **kw):
# def _group_concat_postgresql(element, compiler_, **kw):
# def _group_concat_sybase(element, compiler_, **kw):
# def _group_concat_mysql(element, compiler_, **kw):
# def _group_concat_default(element, compiler_, **kw):
#     def __init__(self, column, fields):
# def _field_sort_mysql(element, compiler_, **kw):
# def _field_sort_general(element, compiler_, **kw):
# class group_concat(expression.ColumnElement):
# class field_sort(expression.ColumnElement):


# Path: monasca_api/tests/test_a_repository.py
import datetime
import time
import fixtures
from oslo_config import cfg
from oslo_db.sqlalchemy.engines import create_engine
from sqlalchemy import delete, MetaData, insert, bindparam
from monasca_api.common.repositories.sqla import models
from monasca_api.tests import base
        from monasca_api.common.repositories.sqla import alarms_repository as ar
        from monasca_api.common.repositories import exceptions
        from monasca_api.common.repositories import exceptions
        from monasca_api.common.repositories import exceptions
        from monasca_api.common.repositories import exceptions

                                  .values(
                                      sub_alarm_definition_id=bindparam('sub_alarm_definition_id'),
                                      dimension_name=bindparam('dimension_name'),
                                      value=bindparam('value')))

        cls.nm = models.create_nm_model(metadata)
        cls._delete_nm_query = delete(cls.nm)
        cls._insert_nm_query = (insert(cls.nm)
                                .values(
                                    id=bindparam('id'),
                                    tenant_id=bindparam('tenant_id'),
                                    name=bindparam('name'),
                                    type=bindparam('type'),
                                    address=bindparam('address'),
                                    created_at=bindparam('created_at'),
                                    updated_at=bindparam('updated_at')))

        cls.a = models.create_a_model(metadata)
        cls._delete_a_query = delete(cls.a)
        cls._insert_a_query = (insert(cls.a)
                               .values(
                                   id=bindparam('id'),
                                   alarm_definition_id=bindparam('alarm_definition_id'),
                                   state=bindparam('state'),
                                   lifecycle_state=bindparam('lifecycle_state'),
                                   link=bindparam('link'),
                                   created_at=bindparam('created_at'),
                                   updated_at=bindparam('updated_at'),
                                   state_updated_at=bindparam('state_updated_at')))


        cls.sa = models.create_sa_model(metadata)