From d04b90ef23bd2e02e762ed22bce8729a2c619cf6 Mon Sep 17 00:00:00 2001 From: Jason Koelker Date: Thu, 21 Jul 2011 12:46:18 -0500 Subject: allow 2 dns servers to be specified on network create --- .../migrate_repo/versions/034_secondary_dns.py | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 nova/db/sqlalchemy/migrate_repo/versions/034_secondary_dns.py diff --git a/nova/db/sqlalchemy/migrate_repo/versions/034_secondary_dns.py b/nova/db/sqlalchemy/migrate_repo/versions/034_secondary_dns.py new file mode 100644 index 000000000..d9f82d796 --- /dev/null +++ b/nova/db/sqlalchemy/migrate_repo/versions/034_secondary_dns.py @@ -0,0 +1,36 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright (c) 2011 OpenStack, LLC. +# 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 +# +# 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. + +from sqlalchemy import Column, Table, MetaData, Boolean, String + +meta = MetaData() + +dns2 = Column('dns2', String(255)) + + +def upgrade(migrate_engine): + meta.bind = migrate_engine + + networks = Table('networks', meta, autoload=True) + networks.create_column(dns2) + + +def downgrade(migrate_engine): + meta.bind = migrate_engine + + networks = Table('networks', meta, autoload=True) + networks.drop_column(dns2) -- cgit