From 2b5652b4ec191d3f31ce35684f0dd86f033416c2 Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Mon, 16 May 2011 18:13:08 -0500 Subject: MySQL database tables are using the MyISAM engine. Created migration script to change all current tables to InnoDB. --- .../versions/017_set_engine_mysql_innodb.py | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 nova/db/sqlalchemy/migrate_repo/versions/017_set_engine_mysql_innodb.py (limited to 'nova') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/017_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/017_set_engine_mysql_innodb.py new file mode 100644 index 000000000..be7ff5abd --- /dev/null +++ b/nova/db/sqlalchemy/migrate_repo/versions/017_set_engine_mysql_innodb.py @@ -0,0 +1,57 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# 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 MetaData, Table + +meta = MetaData() + +def upgrade(migrate_engine): + # Upgrade operations go here. Don't create your own engine; + # bind migrate_engine to your metadata + meta.bind = migrate_engine + if migrate_engine.name == "mysql": + migrate_engine.execute("ALTER TABLE auth_tokens Engine=InnoDB") + migrate_engine.execute("ALTER TABLE certificates Engine=InnoDB") + migrate_engine.execute("ALTER TABLE compute_nodes Engine=InnoDB") + migrate_engine.execute("ALTER TABLE console_pools Engine=InnoDB") + migrate_engine.execute("ALTER TABLE consoles Engine=InnoDB") + migrate_engine.execute("ALTER TABLE export_devices Engine=InnoDB") + migrate_engine.execute("ALTER TABLE fixed_ips Engine=InnoDB") + migrate_engine.execute("ALTER TABLE floating_ips Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instance_actions Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instance_metadata Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instance_types Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instances Engine=InnoDB") + migrate_engine.execute("ALTER TABLE iscsi_targets Engine=InnoDB") + migrate_engine.execute("ALTER TABLE key_pairs Engine=InnoDB") + migrate_engine.execute("ALTER TABLE migrate_version Engine=InnoDB") + migrate_engine.execute("ALTER TABLE migrations Engine=InnoDB") + migrate_engine.execute("ALTER TABLE networks Engine=InnoDB") + migrate_engine.execute("ALTER TABLE projects Engine=InnoDB") + migrate_engine.execute("ALTER TABLE quotas Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_group_instance_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_group_rules Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_groups Engine=InnoDB") + migrate_engine.execute("ALTER TABLE services Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_project_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_project_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE users Engine=InnoDB") + migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") + migrate_engine.execute("ALTER TABLE zones Engine=InnoDB") + +def downgrade(migrate_engine): + meta.bind = migrate_engine -- cgit From 3ff9051c2ae60493d39d7e276c61689ffca2ac8d Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Tue, 17 May 2011 20:38:02 -0500 Subject: MySQL database tables are using the MyISAM engine. Created migration script to change all current tables to InnoDB, updated version to 019 --- .../versions/017_set_engine_mysql_innodb.py | 57 ---------------------- 1 file changed, 57 deletions(-) delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/017_set_engine_mysql_innodb.py (limited to 'nova') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/017_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/017_set_engine_mysql_innodb.py deleted file mode 100644 index be7ff5abd..000000000 --- a/nova/db/sqlalchemy/migrate_repo/versions/017_set_engine_mysql_innodb.py +++ /dev/null @@ -1,57 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# 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 MetaData, Table - -meta = MetaData() - -def upgrade(migrate_engine): - # Upgrade operations go here. Don't create your own engine; - # bind migrate_engine to your metadata - meta.bind = migrate_engine - if migrate_engine.name == "mysql": - migrate_engine.execute("ALTER TABLE auth_tokens Engine=InnoDB") - migrate_engine.execute("ALTER TABLE certificates Engine=InnoDB") - migrate_engine.execute("ALTER TABLE compute_nodes Engine=InnoDB") - migrate_engine.execute("ALTER TABLE console_pools Engine=InnoDB") - migrate_engine.execute("ALTER TABLE consoles Engine=InnoDB") - migrate_engine.execute("ALTER TABLE export_devices Engine=InnoDB") - migrate_engine.execute("ALTER TABLE fixed_ips Engine=InnoDB") - migrate_engine.execute("ALTER TABLE floating_ips Engine=InnoDB") - migrate_engine.execute("ALTER TABLE instance_actions Engine=InnoDB") - migrate_engine.execute("ALTER TABLE instance_metadata Engine=InnoDB") - migrate_engine.execute("ALTER TABLE instance_types Engine=InnoDB") - migrate_engine.execute("ALTER TABLE instances Engine=InnoDB") - migrate_engine.execute("ALTER TABLE iscsi_targets Engine=InnoDB") - migrate_engine.execute("ALTER TABLE key_pairs Engine=InnoDB") - migrate_engine.execute("ALTER TABLE migrate_version Engine=InnoDB") - migrate_engine.execute("ALTER TABLE migrations Engine=InnoDB") - migrate_engine.execute("ALTER TABLE networks Engine=InnoDB") - migrate_engine.execute("ALTER TABLE projects Engine=InnoDB") - migrate_engine.execute("ALTER TABLE quotas Engine=InnoDB") - migrate_engine.execute("ALTER TABLE security_group_instance_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE security_group_rules Engine=InnoDB") - migrate_engine.execute("ALTER TABLE security_groups Engine=InnoDB") - migrate_engine.execute("ALTER TABLE services Engine=InnoDB") - migrate_engine.execute("ALTER TABLE user_project_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE user_project_role_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE user_role_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE users Engine=InnoDB") - migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") - migrate_engine.execute("ALTER TABLE zones Engine=InnoDB") - -def downgrade(migrate_engine): - meta.bind = migrate_engine -- cgit From d43603e2702f41936a9a85915280b9d773d6c74c Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Tue, 17 May 2011 20:38:18 -0500 Subject: MySQL database tables are using the MyISAM engine. Created migration script to change all current tables to InnoDB, updated version to 019 --- .../versions/019_set_engine_mysql_innodb.py | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 nova/db/sqlalchemy/migrate_repo/versions/019_set_engine_mysql_innodb.py (limited to 'nova') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/019_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/019_set_engine_mysql_innodb.py new file mode 100644 index 000000000..be7ff5abd --- /dev/null +++ b/nova/db/sqlalchemy/migrate_repo/versions/019_set_engine_mysql_innodb.py @@ -0,0 +1,57 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# 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 MetaData, Table + +meta = MetaData() + +def upgrade(migrate_engine): + # Upgrade operations go here. Don't create your own engine; + # bind migrate_engine to your metadata + meta.bind = migrate_engine + if migrate_engine.name == "mysql": + migrate_engine.execute("ALTER TABLE auth_tokens Engine=InnoDB") + migrate_engine.execute("ALTER TABLE certificates Engine=InnoDB") + migrate_engine.execute("ALTER TABLE compute_nodes Engine=InnoDB") + migrate_engine.execute("ALTER TABLE console_pools Engine=InnoDB") + migrate_engine.execute("ALTER TABLE consoles Engine=InnoDB") + migrate_engine.execute("ALTER TABLE export_devices Engine=InnoDB") + migrate_engine.execute("ALTER TABLE fixed_ips Engine=InnoDB") + migrate_engine.execute("ALTER TABLE floating_ips Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instance_actions Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instance_metadata Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instance_types Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instances Engine=InnoDB") + migrate_engine.execute("ALTER TABLE iscsi_targets Engine=InnoDB") + migrate_engine.execute("ALTER TABLE key_pairs Engine=InnoDB") + migrate_engine.execute("ALTER TABLE migrate_version Engine=InnoDB") + migrate_engine.execute("ALTER TABLE migrations Engine=InnoDB") + migrate_engine.execute("ALTER TABLE networks Engine=InnoDB") + migrate_engine.execute("ALTER TABLE projects Engine=InnoDB") + migrate_engine.execute("ALTER TABLE quotas Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_group_instance_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_group_rules Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_groups Engine=InnoDB") + migrate_engine.execute("ALTER TABLE services Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_project_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_project_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE users Engine=InnoDB") + migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") + migrate_engine.execute("ALTER TABLE zones Engine=InnoDB") + +def downgrade(migrate_engine): + meta.bind = migrate_engine -- cgit From 0f7ac8903dd05d3477bad014c269470d395c879a Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Tue, 31 May 2011 11:20:40 -0500 Subject: MySQL database tables are currently using the MyISAM engine. Created migration script nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py to change all current tables to InnoDB. --- .../versions/019_set_engine_mysql_innodb.py | 57 ---------------------- .../versions/020_set_engine_mysql_innodb.py | 57 ++++++++++++++++++++++ 2 files changed, 57 insertions(+), 57 deletions(-) delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/019_set_engine_mysql_innodb.py create mode 100644 nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py (limited to 'nova') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/019_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/019_set_engine_mysql_innodb.py deleted file mode 100644 index be7ff5abd..000000000 --- a/nova/db/sqlalchemy/migrate_repo/versions/019_set_engine_mysql_innodb.py +++ /dev/null @@ -1,57 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# 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 MetaData, Table - -meta = MetaData() - -def upgrade(migrate_engine): - # Upgrade operations go here. Don't create your own engine; - # bind migrate_engine to your metadata - meta.bind = migrate_engine - if migrate_engine.name == "mysql": - migrate_engine.execute("ALTER TABLE auth_tokens Engine=InnoDB") - migrate_engine.execute("ALTER TABLE certificates Engine=InnoDB") - migrate_engine.execute("ALTER TABLE compute_nodes Engine=InnoDB") - migrate_engine.execute("ALTER TABLE console_pools Engine=InnoDB") - migrate_engine.execute("ALTER TABLE consoles Engine=InnoDB") - migrate_engine.execute("ALTER TABLE export_devices Engine=InnoDB") - migrate_engine.execute("ALTER TABLE fixed_ips Engine=InnoDB") - migrate_engine.execute("ALTER TABLE floating_ips Engine=InnoDB") - migrate_engine.execute("ALTER TABLE instance_actions Engine=InnoDB") - migrate_engine.execute("ALTER TABLE instance_metadata Engine=InnoDB") - migrate_engine.execute("ALTER TABLE instance_types Engine=InnoDB") - migrate_engine.execute("ALTER TABLE instances Engine=InnoDB") - migrate_engine.execute("ALTER TABLE iscsi_targets Engine=InnoDB") - migrate_engine.execute("ALTER TABLE key_pairs Engine=InnoDB") - migrate_engine.execute("ALTER TABLE migrate_version Engine=InnoDB") - migrate_engine.execute("ALTER TABLE migrations Engine=InnoDB") - migrate_engine.execute("ALTER TABLE networks Engine=InnoDB") - migrate_engine.execute("ALTER TABLE projects Engine=InnoDB") - migrate_engine.execute("ALTER TABLE quotas Engine=InnoDB") - migrate_engine.execute("ALTER TABLE security_group_instance_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE security_group_rules Engine=InnoDB") - migrate_engine.execute("ALTER TABLE security_groups Engine=InnoDB") - migrate_engine.execute("ALTER TABLE services Engine=InnoDB") - migrate_engine.execute("ALTER TABLE user_project_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE user_project_role_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE user_role_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE users Engine=InnoDB") - migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") - migrate_engine.execute("ALTER TABLE zones Engine=InnoDB") - -def downgrade(migrate_engine): - meta.bind = migrate_engine diff --git a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py new file mode 100644 index 000000000..be7ff5abd --- /dev/null +++ b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py @@ -0,0 +1,57 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# 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 MetaData, Table + +meta = MetaData() + +def upgrade(migrate_engine): + # Upgrade operations go here. Don't create your own engine; + # bind migrate_engine to your metadata + meta.bind = migrate_engine + if migrate_engine.name == "mysql": + migrate_engine.execute("ALTER TABLE auth_tokens Engine=InnoDB") + migrate_engine.execute("ALTER TABLE certificates Engine=InnoDB") + migrate_engine.execute("ALTER TABLE compute_nodes Engine=InnoDB") + migrate_engine.execute("ALTER TABLE console_pools Engine=InnoDB") + migrate_engine.execute("ALTER TABLE consoles Engine=InnoDB") + migrate_engine.execute("ALTER TABLE export_devices Engine=InnoDB") + migrate_engine.execute("ALTER TABLE fixed_ips Engine=InnoDB") + migrate_engine.execute("ALTER TABLE floating_ips Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instance_actions Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instance_metadata Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instance_types Engine=InnoDB") + migrate_engine.execute("ALTER TABLE instances Engine=InnoDB") + migrate_engine.execute("ALTER TABLE iscsi_targets Engine=InnoDB") + migrate_engine.execute("ALTER TABLE key_pairs Engine=InnoDB") + migrate_engine.execute("ALTER TABLE migrate_version Engine=InnoDB") + migrate_engine.execute("ALTER TABLE migrations Engine=InnoDB") + migrate_engine.execute("ALTER TABLE networks Engine=InnoDB") + migrate_engine.execute("ALTER TABLE projects Engine=InnoDB") + migrate_engine.execute("ALTER TABLE quotas Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_group_instance_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_group_rules Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_groups Engine=InnoDB") + migrate_engine.execute("ALTER TABLE services Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_project_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_project_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE users Engine=InnoDB") + migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") + migrate_engine.execute("ALTER TABLE zones Engine=InnoDB") + +def downgrade(migrate_engine): + meta.bind = migrate_engine -- cgit From b6e9072a89396aaf1ab616671fd427ec059a2daa Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Tue, 31 May 2011 11:31:35 -0500 Subject: Cleaned up pep8 errors. --- .../versions/020_set_engine_mysql_innodb.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'nova') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py index be7ff5abd..32126a453 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py @@ -18,6 +18,7 @@ from sqlalchemy import MetaData, Table meta = MetaData() + def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; # bind migrate_engine to your metadata @@ -42,16 +43,22 @@ def upgrade(migrate_engine): migrate_engine.execute("ALTER TABLE networks Engine=InnoDB") migrate_engine.execute("ALTER TABLE projects Engine=InnoDB") migrate_engine.execute("ALTER TABLE quotas Engine=InnoDB") - migrate_engine.execute("ALTER TABLE security_group_instance_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE security_group_rules Engine=InnoDB") + migrate_engine.execute("ALTER TABLE + security_group_instance_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE + security_group_rules Engine=InnoDB") migrate_engine.execute("ALTER TABLE security_groups Engine=InnoDB") migrate_engine.execute("ALTER TABLE services Engine=InnoDB") - migrate_engine.execute("ALTER TABLE user_project_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE user_project_role_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE user_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE + user_project_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE + user_project_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE + user_role_association Engine=InnoDB") migrate_engine.execute("ALTER TABLE users Engine=InnoDB") migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") migrate_engine.execute("ALTER TABLE zones Engine=InnoDB") + def downgrade(migrate_engine): meta.bind = migrate_engine -- cgit From 51247c01f8ec3b89657c130935d039ae9fa776b0 Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Tue, 31 May 2011 11:35:13 -0500 Subject: Cleaned up text conflict. --- .../migrate_repo/versions/020_set_engine_mysql_innodb.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nova') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py index 32126a453..9b565598f 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py @@ -43,18 +43,25 @@ def upgrade(migrate_engine): migrate_engine.execute("ALTER TABLE networks Engine=InnoDB") migrate_engine.execute("ALTER TABLE projects Engine=InnoDB") migrate_engine.execute("ALTER TABLE quotas Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_group_instance_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_group_rules Engine=InnoDB") + migrate_engine.execute("ALTER TABLE security_groups Engine=InnoDB") migrate_engine.execute("ALTER TABLE services Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_project_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_project_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE user_role_association Engine=InnoDB") + migrate_engine.execute("ALTER TABLE users Engine=InnoDB") migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") migrate_engine.execute("ALTER TABLE zones Engine=InnoDB") -- cgit From 2010bd7f8c200a95496cc47e395a21fc9f4e278e Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Tue, 31 May 2011 16:23:17 -0500 Subject: Cleaned up bug introduced after fixing ^Cp8 errors. --- .../versions/020_set_engine_mysql_innodb.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'nova') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py index 9b565598f..960b04037 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py @@ -44,23 +44,23 @@ def upgrade(migrate_engine): migrate_engine.execute("ALTER TABLE projects Engine=InnoDB") migrate_engine.execute("ALTER TABLE quotas Engine=InnoDB") - migrate_engine.execute("ALTER TABLE - security_group_instance_association Engine=InnoDB") + migrate_engine.execute( + "ALTER TABLE security_group_instance_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE - security_group_rules Engine=InnoDB") + migrate_engine.execute( + "ALTER TABLE security_group_rules Engine=InnoDB") migrate_engine.execute("ALTER TABLE security_groups Engine=InnoDB") migrate_engine.execute("ALTER TABLE services Engine=InnoDB") - migrate_engine.execute("ALTER TABLE - user_project_association Engine=InnoDB") + migrate_engine.execute( + "ALTER TABLE user_project_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE - user_project_role_association Engine=InnoDB") + migrate_engine.execute( + "ALTER TABLE user_project_role_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE - user_role_association Engine=InnoDB") + migrate_engine.execute( + "ALTER TABLE user_role_association Engine=InnoDB") migrate_engine.execute("ALTER TABLE users Engine=InnoDB") migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") -- cgit From 75cf63108befbc4dbc7f61c36862a43defb90654 Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Tue, 31 May 2011 16:28:43 -0500 Subject: Cleaned up bug introduced after fixing pep8 errors. --- .../migrate_repo/versions/020_set_engine_mysql_innodb.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'nova') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py index 960b04037..c49e37733 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py @@ -43,25 +43,18 @@ def upgrade(migrate_engine): migrate_engine.execute("ALTER TABLE networks Engine=InnoDB") migrate_engine.execute("ALTER TABLE projects Engine=InnoDB") migrate_engine.execute("ALTER TABLE quotas Engine=InnoDB") - migrate_engine.execute( "ALTER TABLE security_group_instance_association Engine=InnoDB") - migrate_engine.execute( "ALTER TABLE security_group_rules Engine=InnoDB") - migrate_engine.execute("ALTER TABLE security_groups Engine=InnoDB") migrate_engine.execute("ALTER TABLE services Engine=InnoDB") - migrate_engine.execute( "ALTER TABLE user_project_association Engine=InnoDB") - migrate_engine.execute( "ALTER TABLE user_project_role_association Engine=InnoDB") - migrate_engine.execute( "ALTER TABLE user_role_association Engine=InnoDB") - migrate_engine.execute("ALTER TABLE users Engine=InnoDB") migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") migrate_engine.execute("ALTER TABLE zones Engine=InnoDB") -- cgit From abeef6b6942b05469daceac4f95ac75f5b23fda5 Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Tue, 31 May 2011 16:41:32 -0500 Subject: Added new snapshots table to InnoDB migrations. --- nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py | 1 + 1 file changed, 1 insertion(+) (limited to 'nova') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py index c49e37733..6e590479f 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/020_set_engine_mysql_innodb.py @@ -58,6 +58,7 @@ def upgrade(migrate_engine): migrate_engine.execute("ALTER TABLE users Engine=InnoDB") migrate_engine.execute("ALTER TABLE volumes Engine=InnoDB") migrate_engine.execute("ALTER TABLE zones Engine=InnoDB") + migrate_engine.execute("ALTER TABLE snapshots Engine=InnoDB") def downgrade(migrate_engine): -- cgit From 5b45d5477cfff946ada581676db54fb254be6522 Mon Sep 17 00:00:00 2001 From: Lvov Maxim Date: Wed, 1 Jun 2011 16:40:19 +0400 Subject: osapi: added support for header X-Auth-Project-Id --- nova/api/openstack/auth.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'nova') diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py index 6c6ee22a2..e220ffcc2 100644 --- a/nova/api/openstack/auth.py +++ b/nova/api/openstack/auth.py @@ -50,19 +50,21 @@ class AuthMiddleware(wsgi.Middleware): if not self.has_authentication(req): return self.authenticate(req) user = self.get_user_by_authentication(req) - accounts = self.auth.get_projects(user=user) if not user: token = req.headers["X-Auth-Token"] msg = _("%(user)s could not be found with token '%(token)s'") LOG.warn(msg % locals()) return faults.Fault(webob.exc.HTTPUnauthorized()) - if accounts: - #we are punting on this til auth is settled, - #and possibly til api v1.1 (mdragon) - account = accounts[0] - else: - return faults.Fault(webob.exc.HTTPUnauthorized()) + try: + account = req.headers["X-Auth-Project-Id"] + except KeyError: + # FIXME: It needed only for compatibility + accounts = self.auth.get_projects(user=user) + if accounts: + account = accounts[0] + else: + return faults.Fault(webob.exc.HTTPUnauthorized()) if not self.auth.is_admin(user) and \ not self.auth.is_project_member(user, account): -- cgit From a1ea80431ea46aea5ec67cf152c7a7af5fd5aeac Mon Sep 17 00:00:00 2001 From: Lvov Maxim Date: Fri, 3 Jun 2011 21:13:16 +0400 Subject: fix comment --- nova/api/openstack/auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova') diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py index e220ffcc2..774426d58 100644 --- a/nova/api/openstack/auth.py +++ b/nova/api/openstack/auth.py @@ -59,7 +59,8 @@ class AuthMiddleware(wsgi.Middleware): try: account = req.headers["X-Auth-Project-Id"] except KeyError: - # FIXME: It needed only for compatibility + # FIXME(usrleon): It needed only for compatibility + # while osapi clients don't use this header accounts = self.auth.get_projects(user=user) if accounts: account = accounts[0] -- cgit From f0c4767dc14f950f7d18cc02e16e4d310774435d Mon Sep 17 00:00:00 2001 From: Alex Meade Date: Tue, 7 Jun 2011 09:56:51 -0400 Subject: Fixed type causing pylint "exception is not callable" Added param to fake_instance_create, fake objects should appear like the real object. pylint "No value passed for parameter 'values' in function call" --- nova/tests/test_vmwareapi.py | 2 +- nova/tests/vmwareapi/db_fakes.py | 2 +- nova/virt/xenapi/vmops.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'nova') diff --git a/nova/tests/test_vmwareapi.py b/nova/tests/test_vmwareapi.py index e5ebd1600..eddf01e9f 100644 --- a/nova/tests/test_vmwareapi.py +++ b/nova/tests/test_vmwareapi.py @@ -69,7 +69,7 @@ class VMWareAPIVMTestCase(test.TestCase): 'instance_type': 'm1.large', 'mac_address': 'aa:bb:cc:dd:ee:ff', } - self.instance = db.instance_create(values) + self.instance = db.instance_create(None, values) def _create_vm(self): """Create and spawn the VM.""" diff --git a/nova/tests/vmwareapi/db_fakes.py b/nova/tests/vmwareapi/db_fakes.py index 764de42d8..d4eb87daf 100644 --- a/nova/tests/vmwareapi/db_fakes.py +++ b/nova/tests/vmwareapi/db_fakes.py @@ -52,7 +52,7 @@ def stub_out_db_instance_api(stubs): else: raise NotImplementedError() - def fake_instance_create(values): + def fake_instance_create(context, values): """Stubs out the db.instance_create method.""" type_data = INSTANCE_TYPES[values['instance_type']] diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 32dae97c2..c6d2b0936 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -101,7 +101,7 @@ class VMOps(object): if not vm_ref: vm_ref = VMHelper.lookup(self._session, instance.name) if vm_ref is None: - raise exception(_('Attempted to power on non-existent instance' + raise Exception(_('Attempted to power on non-existent instance' ' bad instance id %s') % instance.id) LOG.debug(_("Starting instance %s"), instance.name) self._session.call_xenapi('VM.start', vm_ref, False, False) -- cgit From c680176d11edb46a28ba065f0548e18cbf1297d5 Mon Sep 17 00:00:00 2001 From: Alex Meade Date: Tue, 7 Jun 2011 13:32:53 -0400 Subject: Fixed incorrect error message Added missing import Fixed Typo (pylint "undefined variable NoneV") --- nova/compute/instance_types.py | 2 +- nova/compute/monitor.py | 1 + nova/console/vmrc.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'nova') diff --git a/nova/compute/instance_types.py b/nova/compute/instance_types.py index 1275a6fdd..1d246e445 100644 --- a/nova/compute/instance_types.py +++ b/nova/compute/instance_types.py @@ -114,7 +114,7 @@ def get_instance_type(id): ctxt = context.get_admin_context() return db.instance_type_get_by_id(ctxt, id) except exception.DBError: - raise exception.ApiError(_("Unknown instance type: %s") % name) + raise exception.ApiError(_("Unknown instance type: %s") % id) def get_instance_type_by_name(name): diff --git a/nova/compute/monitor.py b/nova/compute/monitor.py index 613734bef..9d8e2a25d 100644 --- a/nova/compute/monitor.py +++ b/nova/compute/monitor.py @@ -36,6 +36,7 @@ from twisted.application import service from nova import flags from nova import log as logging +from nova import utils from nova.virt import connection as virt_connection diff --git a/nova/console/vmrc.py b/nova/console/vmrc.py index cc8b0cdf5..fa805e019 100644 --- a/nova/console/vmrc.py +++ b/nova/console/vmrc.py @@ -119,7 +119,7 @@ class VMRCSessionConsole(VMRCConsole): """ vms = vim_session._call_method(vim_util, 'get_objects', 'VirtualMachine', ['name']) - vm_ref = NoneV + vm_ref = None for vm in vms: if vm.propSet[0].val == instance_name: vm_ref = vm.obj -- cgit From d920e7f53e59b1def67f7528dd6b6bcf35ba96b4 Mon Sep 17 00:00:00 2001 From: Alex Meade Date: Tue, 7 Jun 2011 14:33:01 -0400 Subject: Disabled pylint complaining about no 'self' parameter in a decorator function --- nova/auth/ldapdriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova') diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py index 183f7a985..7bcaa34b5 100644 --- a/nova/auth/ldapdriver.py +++ b/nova/auth/ldapdriver.py @@ -139,7 +139,7 @@ class LdapDriver(object): self.__cache = None return False - def __local_cache(key_fmt): + def __local_cache(key_fmt): #pylint: disable=E0213 """Wrap function to cache it's result in self.__cache. Works only with functions with one fixed argument. """ -- cgit From b7556544d222741c9bc0d312ae75ab5f84b4cd2d Mon Sep 17 00:00:00 2001 From: Alex Meade Date: Tue, 7 Jun 2011 14:48:13 -0400 Subject: Removed use of super --- nova/api/openstack/versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova') diff --git a/nova/api/openstack/versions.py b/nova/api/openstack/versions.py index 9db160102..4c682302f 100644 --- a/nova/api/openstack/versions.py +++ b/nova/api/openstack/versions.py @@ -35,7 +35,7 @@ class Versions(wsgi.Resource): 'application/xml': wsgi.XMLDictSerializer(metadata=metadata), } - super(Versions, self).__init__(None, serializers=serializers) + wsgi.Resource.__init__(self, None, serializers=serializers) def dispatch(self, request, *args): """Respond to a request for all OpenStack API versions.""" -- cgit From a90974347dd396990d8e6fadeac15abd07cb19ea Mon Sep 17 00:00:00 2001 From: John Tran Date: Tue, 7 Jun 2011 14:36:40 -0700 Subject: adding Authorizer key for ImportPublicKey --- nova/api/ec2/__init__.py | 1 + 1 file changed, 1 insertion(+) (limited to 'nova') diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index 1915d007d..890d57fe7 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -242,6 +242,7 @@ class Authorizer(wsgi.Middleware): 'CreateKeyPair': ['all'], 'DeleteKeyPair': ['all'], 'DescribeSecurityGroups': ['all'], + 'ImportPublicKey': ['all'], 'AuthorizeSecurityGroupIngress': ['netadmin'], 'RevokeSecurityGroupIngress': ['netadmin'], 'CreateSecurityGroup': ['netadmin'], -- cgit From 49dcee9ac6a4f78cb021181d5310541d9a42fafd Mon Sep 17 00:00:00 2001 From: Lvov Maxim Date: Wed, 8 Jun 2011 13:49:00 +0400 Subject: fix fake driver for using string project --- nova/tests/api/openstack/fakes.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nova') diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py index 8e0156afa..ce24bd860 100644 --- a/nova/tests/api/openstack/fakes.py +++ b/nova/tests/api/openstack/fakes.py @@ -328,6 +328,11 @@ class FakeAuthManager(object): return user.admin def is_project_member(self, user, project): + if not isinstance(project, Project): + try: + project = self.get_project(project) + except: + raise webob.exc.HTTPUnauthorized() return ((user.id in project.member_ids) or (user.id == project.project_manager_id)) -- cgit From f93717c7d74b24311c04f66b9e710322510d0ed2 Mon Sep 17 00:00:00 2001 From: Lvov Maxim Date: Wed, 8 Jun 2011 13:50:33 +0400 Subject: added tests for X-Auth-Project-Id header --- nova/tests/api/openstack/test_auth.py | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'nova') diff --git a/nova/tests/api/openstack/test_auth.py b/nova/tests/api/openstack/test_auth.py index 8f189c744..04ce78880 100644 --- a/nova/tests/api/openstack/test_auth.py +++ b/nova/tests/api/openstack/test_auth.py @@ -114,6 +114,28 @@ class Test(test.TestCase): self.assertEqual(result.status, '401 Unauthorized') self.assertEqual(self.destroy_called, True) + def test_authorize_project(self): + f = fakes.FakeAuthManager() + user = nova.auth.manager.User('id1', 'user1', 'user1_key', None, None) + f.add_user(user) + f.create_project('user1_project', user) + f.create_project('user2_project', user) + + req = webob.Request.blank('/v1.0/', {'HTTP_HOST': 'foo'}) + req.headers['X-Auth-User'] = 'user1' + req.headers['X-Auth-Key'] = 'user1_key' + result = req.get_response(fakes.wsgi_app()) + self.assertEqual(result.status, '204 No Content') + + token = result.headers['X-Auth-Token'] + self.stubs.Set(nova.api.openstack, 'APIRouterV10', fakes.FakeRouter) + req = webob.Request.blank('/v1.0/fake') + req.headers['X-Auth-Token'] = token + req.headers['X-Auth-Project-Id'] = 'user2_project' + result = req.get_response(fakes.wsgi_app()) + self.assertEqual(result.status, '200 OK') + self.assertEqual(result.headers['X-Test-Success'], 'True') + def test_bad_user_bad_key(self): req = webob.Request.blank('/v1.0/') req.headers['X-Auth-User'] = 'unknown_user' @@ -143,6 +165,48 @@ class Test(test.TestCase): result = req.get_response(fakes.wsgi_app()) self.assertEqual(result.status, '401 Unauthorized') + def test_bad_project(self): + f = fakes.FakeAuthManager() + user1 = nova.auth.manager.User('id1', 'user1', 'user1_key', None, None) + user2 = nova.auth.manager.User('id2', 'user2', 'user2_key', None, None) + f.add_user(user1) + f.add_user(user2) + f.create_project('user1_project', user1) + f.create_project('user2_project', user2) + + req = webob.Request.blank('/v1.0/', {'HTTP_HOST': 'foo'}) + req.headers['X-Auth-User'] = 'user1' + req.headers['X-Auth-Key'] = 'user1_key' + result = req.get_response(fakes.wsgi_app()) + self.assertEqual(result.status, '204 No Content') + + token = result.headers['X-Auth-Token'] + self.stubs.Set(nova.api.openstack, 'APIRouterV10', fakes.FakeRouter) + req = webob.Request.blank('/v1.0/fake') + req.headers['X-Auth-Token'] = token + req.headers['X-Auth-Project-Id'] = 'user2_project' + result = req.get_response(fakes.wsgi_app()) + self.assertEqual(result.status, '401 Unauthorized') + + def test_not_existing_project(self): + f = fakes.FakeAuthManager() + user1 = nova.auth.manager.User('id1', 'user1', 'user1_key', None, None) + f.add_user(user1) + f.create_project('user1_project', user1) + + req = webob.Request.blank('/v1.0/', {'HTTP_HOST': 'foo'}) + req.headers['X-Auth-User'] = 'user1' + req.headers['X-Auth-Key'] = 'user1_key' + result = req.get_response(fakes.wsgi_app()) + self.assertEqual(result.status, '204 No Content') + + token = result.headers['X-Auth-Token'] + self.stubs.Set(nova.api.openstack, 'APIRouterV10', fakes.FakeRouter) + req = webob.Request.blank('/v1.0/fake') + req.headers['X-Auth-Token'] = token + req.headers['X-Auth-Project-Id'] = 'unknown_project' + result = req.get_response(fakes.wsgi_app()) + self.assertEqual(result.status, '401 Unauthorized') class TestFunctional(test.TestCase): def test_token_expiry(self): -- cgit From 03ef0d1091cc1b6d9c3049b1d7b8cfae0019631e Mon Sep 17 00:00:00 2001 From: Lvov Maxim Date: Wed, 8 Jun 2011 13:52:02 +0400 Subject: added field NOVA_PROJECT_ID to template for future using --- nova/auth/novarc.template | 1 + 1 file changed, 1 insertion(+) (limited to 'nova') diff --git a/nova/auth/novarc.template b/nova/auth/novarc.template index 8170fcafe..28a3696a2 100644 --- a/nova/auth/novarc.template +++ b/nova/auth/novarc.template @@ -12,4 +12,5 @@ alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_P alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}" export NOVA_API_KEY="%(access)s" export NOVA_USERNAME="%(user)s" +export NOVA_PROJECT_ID="%(project)s" export NOVA_URL="%(os)s" -- cgit From a605905c11d8898e8cc15e830c17de3ce8c80fda Mon Sep 17 00:00:00 2001 From: Alex Meade Date: Wed, 8 Jun 2011 09:21:38 -0400 Subject: pep8 --- nova/auth/ldapdriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova') diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py index 7bcaa34b5..e9532473d 100644 --- a/nova/auth/ldapdriver.py +++ b/nova/auth/ldapdriver.py @@ -139,7 +139,7 @@ class LdapDriver(object): self.__cache = None return False - def __local_cache(key_fmt): #pylint: disable=E0213 + def __local_cache(key_fmt): # pylint: disable=E0213 """Wrap function to cache it's result in self.__cache. Works only with functions with one fixed argument. """ -- cgit From 3da61c0b225f824025f617f0a88f72c00e31b83e Mon Sep 17 00:00:00 2001 From: Lvov Maxim Date: Wed, 8 Jun 2011 21:03:52 +0400 Subject: fix exception type catched --- nova/tests/api/openstack/fakes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova') diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py index ce24bd860..8a17f0374 100644 --- a/nova/tests/api/openstack/fakes.py +++ b/nova/tests/api/openstack/fakes.py @@ -331,7 +331,7 @@ class FakeAuthManager(object): if not isinstance(project, Project): try: project = self.get_project(project) - except: + except exc.NotFound: raise webob.exc.HTTPUnauthorized() return ((user.id in project.member_ids) or (user.id == project.project_manager_id)) -- cgit From f786c112ce4753dfc1838eecbfc5a20314a5e35d Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Wed, 8 Jun 2011 21:58:59 +0400 Subject: PEP8 fix. --- nova/tests/api/openstack/test_auth.py | 1 + 1 file changed, 1 insertion(+) (limited to 'nova') diff --git a/nova/tests/api/openstack/test_auth.py b/nova/tests/api/openstack/test_auth.py index 04ce78880..af3478c7d 100644 --- a/nova/tests/api/openstack/test_auth.py +++ b/nova/tests/api/openstack/test_auth.py @@ -208,6 +208,7 @@ class Test(test.TestCase): result = req.get_response(fakes.wsgi_app()) self.assertEqual(result.status, '401 Unauthorized') + class TestFunctional(test.TestCase): def test_token_expiry(self): ctx = context.get_admin_context() -- cgit