DEPRECATED, Neutron integration with OVN
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.0 KiB

# Copyright 2017 Red Hat, Inc.
# 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
# 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 neutron_lib.db import model_base
import sqlalchemy as sa
from sqlalchemy.dialects import sqlite
class OVNRevisionNumbers(model_base.BASEV2):
__tablename__ = 'ovn_revision_numbers'
__table_args__ = (
standard_attr_id = sa.Column(
sa.BigInteger().with_variant(sa.Integer(), 'sqlite'),
sa.ForeignKey('', ondelete='SET NULL'),
resource_uuid = sa.Column(sa.String(36), nullable=False, primary_key=True)
resource_type = sa.Column(sa.String(36), nullable=False, primary_key=True)
revision_number = sa.Column(
sa.BigInteger().with_variant(sa.Integer(), 'sqlite'),
default=0, nullable=False)
created_at = sa.Column(
sqlite.DATETIME(truncate_microseconds=True), 'sqlite'),, nullable=False)
updated_at = sa.Column(sa.TIMESTAMP,,, nullable=True)
class OVNHashRing(model_base.BASEV2):
__tablename__ = 'ovn_hash_ring'
node_uuid = sa.Column(sa.String(36), nullable=False, primary_key=True)
hostname = sa.Column(sa.String(256), nullable=False)
created_at = sa.Column(sa.DateTime(),,
updated_at = sa.Column(sa.DateTime(),,