# # 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. # from oslo_db.sqlalchemy import models import sqlalchemy from sqlalchemy.ext import declarative from sqlalchemy import orm from sqlalchemy import schema from cloudkitty.common.db import models as ck_models Base = ck_models.get_base() class HashMapBase(models.ModelBase): __table_args__ = {'mysql_charset': "utf8", 'mysql_engine': "InnoDB"} fk_to_resolve = {} def save(self, session=None): from cloudkitty import db if session is None: session = db.get_session() super(HashMapBase, self).save(session=session) def as_dict(self):
# 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. # # @author: Stéphane Albert # from oslo_db.sqlalchemy import models import sqlalchemy from sqlalchemy.ext import declarative from sqlalchemy import orm from sqlalchemy import schema from cloudkitty.common.db import models as ck_models Base = ck_models.get_base() class HashMapBase(models.ModelBase): __table_args__ = {'mysql_charset': "utf8", 'mysql_engine': "InnoDB"} fk_to_resolve = {} def save(self, session=None): from cloudkitty import db if session is None: session = db.get_session() super(HashMapBase, self).save(session=session)