From 6b67b2f391830da52dea5cd84bd564bab692f365 Mon Sep 17 00:00:00 2001 From: Sandy Walsh Date: Wed, 31 Aug 2011 11:54:30 -0700 Subject: zone_add fixed to support zone name --- nova/db/sqlalchemy/models.py | 1 + 1 file changed, 1 insertion(+) (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py index f8feb0b4f..dd447457b 100644 --- a/nova/db/sqlalchemy/models.py +++ b/nova/db/sqlalchemy/models.py @@ -847,6 +847,7 @@ class Zone(BASE, NovaBase): """Represents a child zone of this zone.""" __tablename__ = 'zones' id = Column(Integer, primary_key=True) + name = Column(String(255)) api_url = Column(String(255)) username = Column(String(255)) password = Column(String(255)) -- cgit From 75c355b42f6c24723c57228d8acfad64fd4ec7d0 Mon Sep 17 00:00:00 2001 From: Sandy Walsh Date: Fri, 2 Sep 2011 07:38:22 -0700 Subject: missing migration --- .../migrate_repo/versions/044_add_zone_name.py | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 nova/db/sqlalchemy/migrate_repo/versions/044_add_zone_name.py (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/044_add_zone_name.py b/nova/db/sqlalchemy/migrate_repo/versions/044_add_zone_name.py new file mode 100644 index 000000000..3198e48a9 --- /dev/null +++ b/nova/db/sqlalchemy/migrate_repo/versions/044_add_zone_name.py @@ -0,0 +1,35 @@ +# Copyright 2011 OpenStack LLC. +# +# 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, Integer, MetaData, String, Table + +meta = MetaData() + +zones = Table('zones', meta, + Column('id', Integer(), primary_key=True, nullable=False), + ) + +name = Column('name', String(255)) + + +def upgrade(migrate_engine): + meta.bind = migrate_engine + + zones.create_column(name) + + +def downgrade(migrate_engine): + meta.bind = migrate_engine + + zones.drop_column(name) -- cgit From c0c046ef7d30787fe72b8de6c290a4b72cb207fb Mon Sep 17 00:00:00 2001 From: Sandy Walsh Date: Mon, 12 Sep 2011 15:22:30 -0700 Subject: working on getting tests back --- nova/db/sqlalchemy/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 40e2ca167..e5a661c7f 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -672,7 +672,7 @@ def floating_ip_update(context, address, values): def fixed_ip_associate(context, address, instance_id, network_id=None, reserved=False): """Keyword arguments: - reserved -- should be a boolean value(True or False), exact value will be + reserved -- should be a boolean value(True or False), exact value will be used to filter on the fixed ip address """ session = get_session() -- cgit From fba1d427a941f1eb6971611cf1b016274ed19baa Mon Sep 17 00:00:00 2001 From: Sandy Walsh Date: Wed, 14 Sep 2011 19:55:51 -0700 Subject: tests are back --- .../migrate_repo/versions/046_add_zone_name.py | 35 ---------------------- .../migrate_repo/versions/047_add_zone_name.py | 35 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/046_add_zone_name.py create mode 100644 nova/db/sqlalchemy/migrate_repo/versions/047_add_zone_name.py (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/046_add_zone_name.py b/nova/db/sqlalchemy/migrate_repo/versions/046_add_zone_name.py deleted file mode 100644 index 3198e48a9..000000000 --- a/nova/db/sqlalchemy/migrate_repo/versions/046_add_zone_name.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2011 OpenStack LLC. -# -# 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, Integer, MetaData, String, Table - -meta = MetaData() - -zones = Table('zones', meta, - Column('id', Integer(), primary_key=True, nullable=False), - ) - -name = Column('name', String(255)) - - -def upgrade(migrate_engine): - meta.bind = migrate_engine - - zones.create_column(name) - - -def downgrade(migrate_engine): - meta.bind = migrate_engine - - zones.drop_column(name) diff --git a/nova/db/sqlalchemy/migrate_repo/versions/047_add_zone_name.py b/nova/db/sqlalchemy/migrate_repo/versions/047_add_zone_name.py new file mode 100644 index 000000000..3198e48a9 --- /dev/null +++ b/nova/db/sqlalchemy/migrate_repo/versions/047_add_zone_name.py @@ -0,0 +1,35 @@ +# Copyright 2011 OpenStack LLC. +# +# 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, Integer, MetaData, String, Table + +meta = MetaData() + +zones = Table('zones', meta, + Column('id', Integer(), primary_key=True, nullable=False), + ) + +name = Column('name', String(255)) + + +def upgrade(migrate_engine): + meta.bind = migrate_engine + + zones.create_column(name) + + +def downgrade(migrate_engine): + meta.bind = migrate_engine + + zones.drop_column(name) -- cgit From 9dc59398a2278034be1c391f460406365a808bb7 Mon Sep 17 00:00:00 2001 From: Sandy Walsh Date: Wed, 21 Sep 2011 05:07:17 -0700 Subject: migration conflict fixed --- .../migrate_repo/versions/047_add_zone_name.py | 35 ---------------------- .../migrate_repo/versions/048_add_zone_name.py | 35 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/047_add_zone_name.py create mode 100644 nova/db/sqlalchemy/migrate_repo/versions/048_add_zone_name.py (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/047_add_zone_name.py b/nova/db/sqlalchemy/migrate_repo/versions/047_add_zone_name.py deleted file mode 100644 index 3198e48a9..000000000 --- a/nova/db/sqlalchemy/migrate_repo/versions/047_add_zone_name.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2011 OpenStack LLC. -# -# 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, Integer, MetaData, String, Table - -meta = MetaData() - -zones = Table('zones', meta, - Column('id', Integer(), primary_key=True, nullable=False), - ) - -name = Column('name', String(255)) - - -def upgrade(migrate_engine): - meta.bind = migrate_engine - - zones.create_column(name) - - -def downgrade(migrate_engine): - meta.bind = migrate_engine - - zones.drop_column(name) diff --git a/nova/db/sqlalchemy/migrate_repo/versions/048_add_zone_name.py b/nova/db/sqlalchemy/migrate_repo/versions/048_add_zone_name.py new file mode 100644 index 000000000..3198e48a9 --- /dev/null +++ b/nova/db/sqlalchemy/migrate_repo/versions/048_add_zone_name.py @@ -0,0 +1,35 @@ +# Copyright 2011 OpenStack LLC. +# +# 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, Integer, MetaData, String, Table + +meta = MetaData() + +zones = Table('zones', meta, + Column('id', Integer(), primary_key=True, nullable=False), + ) + +name = Column('name', String(255)) + + +def upgrade(migrate_engine): + meta.bind = migrate_engine + + zones.create_column(name) + + +def downgrade(migrate_engine): + meta.bind = migrate_engine + + zones.drop_column(name) -- cgit