From 84a6d4cd0e4f4f93012885fce81e2f6a700854d8 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Mon, 24 Jan 2011 15:48:03 -0600 Subject: [PATCH 01/13] Added copyright info --- bin/glance-api | 20 +++++++++----------- bin/glance-registry | 21 ++++++++++----------- glance/__init__.py | 16 ++++++++++++++++ glance/common/__init__.py | 16 ++++++++++++++++ glance/common/db/__init__.py | 5 ++--- glance/common/db/sqlalchemy/__init__.py | 16 ++++++++++++++++ glance/common/db/sqlalchemy/session.py | 4 ++-- glance/common/exception.py | 3 +-- glance/common/flags.py | 3 +-- glance/common/server.py | 3 +-- glance/common/utils.py | 3 +-- glance/common/wsgi.py | 4 +--- glance/registry/__init__.py | 3 +-- glance/registry/db/__init__.py | 5 ++--- glance/registry/db/api.py | 4 ++-- glance/registry/db/sqlalchemy/__init__.py | 3 +-- glance/registry/db/sqlalchemy/api.py | 4 ++-- glance/registry/db/sqlalchemy/models.py | 3 +-- tests/__init__.py | 16 ++++++++++++++++ tests/unit/__init__.py | 16 ++++++++++++++++ tools/install_venv.py | 5 +---- 21 files changed, 118 insertions(+), 55 deletions(-) diff --git a/bin/glance-api b/bin/glance-api index 576eb8b488..1884f3ca91 100755 --- a/bin/glance-api +++ b/bin/glance-api @@ -1,21 +1,19 @@ -#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 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 +# 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 +# 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. +# 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. """ Glance API Server diff --git a/bin/glance-registry b/bin/glance-registry index 8a5878b9e1..32d2c5a9a1 100755 --- a/bin/glance-registry +++ b/bin/glance-registry @@ -1,21 +1,20 @@ -#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 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 +# 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 +# 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. +# 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. + """ Reference implementation server for Glance Registry """ diff --git a/glance/__init__.py b/glance/__init__.py index e69de29bb2..d65c689a83 100644 --- a/glance/__init__.py +++ b/glance/__init__.py @@ -0,0 +1,16 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 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. diff --git a/glance/common/__init__.py b/glance/common/__init__.py index e69de29bb2..d65c689a83 100644 --- a/glance/common/__init__.py +++ b/glance/common/__init__.py @@ -0,0 +1,16 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 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. diff --git a/glance/common/db/__init__.py b/glance/common/db/__init__.py index fe6422cbd6..c4c506926c 100644 --- a/glance/common/db/__init__.py +++ b/glance/common/db/__init__.py @@ -1,8 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -16,6 +14,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + """ DB abstraction for Nova and Glance """ diff --git a/glance/common/db/sqlalchemy/__init__.py b/glance/common/db/sqlalchemy/__init__.py index e69de29bb2..d65c689a83 100644 --- a/glance/common/db/sqlalchemy/__init__.py +++ b/glance/common/db/sqlalchemy/__init__.py @@ -0,0 +1,16 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 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. diff --git a/glance/common/db/sqlalchemy/session.py b/glance/common/db/sqlalchemy/session.py index 41cf14f29f..2de1de1e62 100644 --- a/glance/common/db/sqlalchemy/session.py +++ b/glance/common/db/sqlalchemy/session.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -15,6 +14,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + """ Session Handling for SQLAlchemy backend """ diff --git a/glance/common/exception.py b/glance/common/exception.py index b95541df41..a341c880a0 100644 --- a/glance/common/exception.py +++ b/glance/common/exception.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/flags.py b/glance/common/flags.py index 2895af6978..e57840db90 100644 --- a/glance/common/flags.py +++ b/glance/common/flags.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/server.py b/glance/common/server.py index 9bd82f00ae..447be00837 100644 --- a/glance/common/server.py +++ b/glance/common/server.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/utils.py b/glance/common/utils.py index 51e63e3b4a..f242f0ca65 100644 --- a/glance/common/utils.py +++ b/glance/common/utils.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/wsgi.py b/glance/common/wsgi.py index 78c7ba0633..a32e4c86d6 100644 --- a/glance/common/wsgi.py +++ b/glance/common/wsgi.py @@ -1,8 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# Copyright 2010 OpenStack LLC. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/__init__.py b/glance/registry/__init__.py index c79bf27e18..c1257bd066 100644 --- a/glance/registry/__init__.py +++ b/glance/registry/__init__.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/db/__init__.py b/glance/registry/db/__init__.py index 27e796769a..e6bd4b6971 100644 --- a/glance/registry/db/__init__.py +++ b/glance/registry/db/__init__.py @@ -1,8 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -16,6 +14,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + """ DB abstraction for Nova and Glance """ diff --git a/glance/registry/db/api.py b/glance/registry/db/api.py index 2b99eeaf69..4b20e71db4 100644 --- a/glance/registry/db/api.py +++ b/glance/registry/db/api.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -15,6 +14,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + """ Defines interface for DB access """ diff --git a/glance/registry/db/sqlalchemy/__init__.py b/glance/registry/db/sqlalchemy/__init__.py index a16703b63f..0c1e1cb8f0 100644 --- a/glance/registry/db/sqlalchemy/__init__.py +++ b/glance/registry/db/sqlalchemy/__init__.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/db/sqlalchemy/api.py b/glance/registry/db/sqlalchemy/api.py index b15af1d617..e5eb5ce1b6 100644 --- a/glance/registry/db/sqlalchemy/api.py +++ b/glance/registry/db/sqlalchemy/api.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -15,6 +14,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + """ Implementation of SQLAlchemy backend """ diff --git a/glance/registry/db/sqlalchemy/models.py b/glance/registry/db/sqlalchemy/models.py index 2c963b350e..0fea28d743 100644 --- a/glance/registry/db/sqlalchemy/models.py +++ b/glance/registry/db/sqlalchemy/models.py @@ -1,7 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/__init__.py b/tests/__init__.py index e69de29bb2..d65c689a83 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,16 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 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. diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index e69de29bb2..d65c689a83 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -0,0 +1,16 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 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. diff --git a/tools/install_venv.py b/tools/install_venv.py index da76d0c123..0e2b3aec1b 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -1,11 +1,8 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # -# Copyright 2010 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 From 3cf374673901fbc8af4d4dd493786759138e5091 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Mon, 24 Jan 2011 16:18:06 -0600 Subject: [PATCH 02/13] Pylint cleanup --- doc/source/conf.py | 10 +++++----- tests/stubs.py | 7 +++---- tests/unit/test_api.py | 16 ++++++---------- tests/unit/test_clients.py | 32 +++++++++++++------------------- tests/unit/test_registry_api.py | 10 +++++----- tests/unit/test_stores.py | 8 +++----- tools/install_venv.py | 2 +- 7 files changed, 36 insertions(+), 49 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 89e7172f81..1aca3a1f8a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2010 OpenStack, LLC. +# Copyright (c) 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. @@ -35,7 +35,7 @@ import sys # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.append([os.path.abspath('../glance'), os.path.abspath('..'), - os.path.abspath('../bin') + os.path.abspath('../bin'), ]) # -- General configuration --------------------------------------------------- @@ -117,16 +117,16 @@ pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['glance.'] -# -- Options for man page output ----------------------------------------------- +# -- Options for man page output -------------------------------------------- -# Grouping the document tree for man pages. +# Grouping the document tree for man pages. # List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' man_pages = [ ('man/glanceapi', 'glance-api', u'Glance API Server', [u'OpenStack'], 1), ('man/glanceregistry', 'glance-registry', u'Glance Registry Server', - [u'OpenStack'], 1) + [u'OpenStack'], 1), ] diff --git a/tests/stubs.py b/tests/stubs.py index d0d00f1734..a0f705d7e7 100644 --- a/tests/stubs.py +++ b/tests/stubs.py @@ -117,6 +117,7 @@ def stub_out_s3_backend(stubs): class FakeSwiftAuth(object): pass + class FakeS3Connection(object): pass @@ -134,8 +135,7 @@ def stub_out_s3_backend(stubs): def chunk_it(): for i in xrange(0, len(cls.DATA), cls.CHUNK_SIZE): - yield cls.DATA[i:i+cls.CHUNK_SIZE] - + yield cls.DATA[i:i + cls.CHUNK_SIZE] return chunk_it() fake_swift_backend = FakeS3Backend() @@ -201,8 +201,7 @@ def stub_out_registry(stubs): DATA = \ {'files': [ {'location': 'file:///chunk0', 'size': 12345}, - {'location': 'file:///chunk1', 'size': 1235} - ]} + {'location': 'file:///chunk1', 'size': 1235}]} @classmethod def lookup(cls, _parsed_uri): diff --git a/tests/unit/test_api.py b/tests/unit/test_api.py index 73adb145ba..ac821ea7d5 100644 --- a/tests/unit/test_api.py +++ b/tests/unit/test_api.py @@ -88,8 +88,8 @@ class TestRegistryAPI(unittest.TestCase): 'name': 'fake image #2', 'is_public': True, 'type': 'kernel', - 'status': 'active' - } + 'status': 'active'} + req = webob.Request.blank('/images/detail') res = req.get_response(rserver.API()) res_dict = json.loads(res.body) @@ -105,8 +105,7 @@ class TestRegistryAPI(unittest.TestCase): """Tests that the /images POST registry API creates the image""" fixture = {'name': 'fake public image', 'is_public': True, - 'type': 'kernel' - } + 'type': 'kernel'} req = webob.Request.blank('/images') @@ -134,8 +133,7 @@ class TestRegistryAPI(unittest.TestCase): 'name': 'fake public image', 'is_public': True, 'type': 'kernel', - 'status': 'bad status' - } + 'status': 'bad status'} req = webob.Request.blank('/images') @@ -151,8 +149,7 @@ class TestRegistryAPI(unittest.TestCase): def test_update_image(self): """Tests that the /images PUT registry API updates the image""" fixture = {'name': 'fake public image #2', - 'type': 'ramdisk' - } + 'type': 'ramdisk'} req = webob.Request.blank('/images/2') @@ -175,8 +172,7 @@ class TestRegistryAPI(unittest.TestCase): 'name': 'fake public image', 'is_public': True, 'type': 'kernel', - 'status': 'bad status' - } + 'status': 'bad status'} req = webob.Request.blank('/images/3') diff --git a/tests/unit/test_clients.py b/tests/unit/test_clients.py index 5bd433f7cb..784daddb36 100644 --- a/tests/unit/test_clients.py +++ b/tests/unit/test_clients.py @@ -161,15 +161,13 @@ class TestRegistryClient(unittest.TestCase): 'type': 'kernel', 'size': 19, 'location': "file:///tmp/glance-tests/2", - 'properties': {'distro': 'Ubuntu 10.04 LTS'} - } + 'properties': {'distro': 'Ubuntu 10.04 LTS'}} expected = {'name': 'fake public image', 'is_public': True, 'type': 'kernel', 'size': 19, 'location': "file:///tmp/glance-tests/2", - 'properties': {'distro': 'Ubuntu 10.04 LTS'} - } + 'properties': {'distro': 'Ubuntu 10.04 LTS'}} new_image = self.client.add_image(fixture) @@ -216,8 +214,7 @@ class TestRegistryClient(unittest.TestCase): def test_update_image(self): """Tests that the /images PUT registry API updates the image""" fixture = {'name': 'fake public image #2', - 'type': 'ramdisk' - } + 'type': 'ramdisk'} self.assertTrue(self.client.update_image(2, fixture)) @@ -233,7 +230,7 @@ class TestRegistryClient(unittest.TestCase): 'name': 'fake public image', 'is_public': True, 'type': 'kernel', - 'status': 'bad status' + 'status': 'bad status', } self.assertRaises(exception.NotFound, @@ -386,9 +383,8 @@ class TestClient(unittest.TestCase): """Tests client returns image as queued""" fixture = {'name': 'fake public image', 'is_public': True, - 'type': 'kernel' + 'type': 'kernel', } - image_meta = self.client.add_image(fixture) self.assertEquals('queued', image_meta['status']) self.assertEquals(0, image_meta['size']) @@ -401,7 +397,6 @@ class TestClient(unittest.TestCase): 'size': 19, 'location': "file:///tmp/glance-tests/2", } - new_image = self.client.add_image(fixture) new_image_id = new_image['id'] @@ -425,16 +420,15 @@ class TestClient(unittest.TestCase): 'type': 'kernel', 'size': 19, 'location': "file:///tmp/glance-tests/2", - 'properties': {'distro': 'Ubuntu 10.04 LTS'} + 'properties': {'distro': 'Ubuntu 10.04 LTS'}, } expected = {'name': 'fake public image', 'is_public': True, 'type': 'kernel', 'size': 19, 'location': "file:///tmp/glance-tests/2", - 'properties': {'distro': 'Ubuntu 10.04 LTS'} + 'properties': {'distro': 'Ubuntu 10.04 LTS'}, } - new_image = self.client.add_image(fixture) new_image_id = new_image['id'] @@ -485,7 +479,7 @@ class TestClient(unittest.TestCase): 'is_public': True, 'type': 'kernel', 'size': 19, - 'properties': {'distro': 'Ubuntu 10.04 LTS'} + 'properties': {'distro': 'Ubuntu 10.04 LTS'}, } image_data_fixture = r"chunk00000remainder" @@ -510,7 +504,7 @@ class TestClient(unittest.TestCase): 'is_public': True, 'type': 'kernel', 'size': 19, - 'properties': {'distro': 'Ubuntu 10.04 LTS'} + 'properties': {'distro': 'Ubuntu 10.04 LTS'}, } image_data_fixture = r"chunk00000remainder" @@ -546,7 +540,7 @@ class TestClient(unittest.TestCase): fixture = {'name': 'fake public image', 'is_public': True, 'type': 'kernel', - 'properties': {'distro': 'Ubuntu 10.04 LTS'} + 'properties': {'distro': 'Ubuntu 10.04 LTS'}, } image_data_fixture = r"chunk00000remainder" @@ -574,7 +568,7 @@ class TestClient(unittest.TestCase): 'type': 'kernel', 'size': 19, 'store': 'bad', - 'properties': {'distro': 'Ubuntu 10.04 LTS'} + 'properties': {'distro': 'Ubuntu 10.04 LTS'}, } image_data_fixture = r"chunk00000remainder" @@ -587,7 +581,7 @@ class TestClient(unittest.TestCase): def test_update_image(self): """Tests that the /images PUT registry API updates the image""" fixture = {'name': 'fake public image #2', - 'type': 'ramdisk' + 'type': 'ramdisk', } self.assertTrue(self.client.update_image(2, fixture)) @@ -604,7 +598,7 @@ class TestClient(unittest.TestCase): 'name': 'fake public image', 'is_public': True, 'type': 'kernel', - 'status': 'bad status' + 'status': 'bad status', } self.assertRaises(exception.NotFound, diff --git a/tests/unit/test_registry_api.py b/tests/unit/test_registry_api.py index 9740c329c2..cfd657dbff 100644 --- a/tests/unit/test_registry_api.py +++ b/tests/unit/test_registry_api.py @@ -80,7 +80,7 @@ class TestImageController(unittest.TestCase): 'name': 'fake image #2', 'is_public': True, 'type': 'kernel', - 'status': 'active' + 'status': 'active', } req = webob.Request.blank('/images/detail') res = req.get_response(server.API()) @@ -97,7 +97,7 @@ class TestImageController(unittest.TestCase): """Tests that the /images POST registry API creates the image""" fixture = {'name': 'fake public image', 'is_public': True, - 'type': 'kernel' + 'type': 'kernel', } req = webob.Request.blank('/images') @@ -126,7 +126,7 @@ class TestImageController(unittest.TestCase): 'name': 'fake public image', 'is_public': True, 'type': 'kernel', - 'status': 'bad status' + 'status': 'bad status', } req = webob.Request.blank('/images') @@ -143,7 +143,7 @@ class TestImageController(unittest.TestCase): def test_update_image(self): """Tests that the /images PUT registry API updates the image""" fixture = {'name': 'fake public image #2', - 'type': 'ramdisk' + 'type': 'ramdisk', } req = webob.Request.blank('/images/2') @@ -167,7 +167,7 @@ class TestImageController(unittest.TestCase): 'name': 'fake public image', 'is_public': True, 'type': 'kernel', - 'status': 'bad status' + 'status': 'bad status', } req = webob.Request.blank('/images/3') diff --git a/tests/unit/test_stores.py b/tests/unit/test_stores.py index 24c02d3f30..98470f102f 100644 --- a/tests/unit/test_stores.py +++ b/tests/unit/test_stores.py @@ -96,19 +96,17 @@ class TestS3Backend(TestBackend): def test_get(self): s3_uri = "s3://user:password@localhost/bucket1/file.tar.gz" - expected_returns = ['I ', 'am', ' a', ' t', 'ea', 'po', 't,', ' s', + expected_returns = ['I ', 'am', ' a', ' t', 'ea', 'po', 't,', ' s', 'ho', 'rt', ' a', 'nd', ' s', 'to', 'ut', '\n'] - fetcher = get_from_backend(s3_uri, - expected_size=8, + fetcher = get_from_backend(s3_uri, + expected_size=8, conn_class=S3Backend) chunks = [c for c in fetcher] self.assertEqual(chunks, expected_returns) - class TestSwiftBackend(TestBackend): - def setUp(self): super(TestSwiftBackend, self).setUp() stubs.stub_out_swift_backend(self.stubs) diff --git a/tools/install_venv.py b/tools/install_venv.py index 0e2b3aec1b..0986d6a813 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -30,7 +30,7 @@ PIP_REQUIRES = os.path.join(ROOT, 'tools', 'pip-requires') def die(message, *args): - print >>sys.stderr, message % args + print >> sys.stderr, message % args sys.exit(1) From db3a02a92393257644cb0291a31474b30fc01a09 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Mon, 24 Jan 2011 16:34:46 -0600 Subject: [PATCH 03/13] Copyright year change --- glance/client.py | 2 +- glance/registry/client.py | 2 +- glance/registry/server.py | 2 +- glance/server.py | 2 +- glance/store/__init__.py | 2 +- glance/store/backends/__init__.py | 2 +- glance/store/filesystem.py | 2 +- glance/store/http.py | 2 +- glance/store/s3.py | 2 +- glance/store/swift.py | 2 +- glance/util.py | 2 +- run_tests.py | 2 +- tests/stubs.py | 2 +- tests/unit/swiftfakehttp.py | 2 +- tests/unit/test_api.py | 2 +- tests/unit/test_clients.py | 2 +- tests/unit/test_registry_api.py | 2 +- tests/unit/test_stores.py | 2 +- tests/utils.py | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/glance/client.py b/glance/client.py index 4260512b24..809a9188fb 100644 --- a/glance/client.py +++ b/glance/client.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/client.py b/glance/registry/client.py index af78a7a33e..f2dc5fd1b6 100644 --- a/glance/registry/client.py +++ b/glance/registry/client.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/server.py b/glance/registry/server.py index baeceae9f7..8173dbabe4 100644 --- a/glance/registry/server.py +++ b/glance/registry/server.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack LLC. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/server.py b/glance/server.py index 667e1fd1ae..145223451c 100644 --- a/glance/server.py +++ b/glance/server.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack LLC. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/__init__.py b/glance/store/__init__.py index 820cbb8fa0..6db2900189 100644 --- a/glance/store/__init__.py +++ b/glance/store/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/backends/__init__.py b/glance/store/backends/__init__.py index 14d83a9112..ef9ecccae0 100644 --- a/glance/store/backends/__init__.py +++ b/glance/store/backends/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/filesystem.py b/glance/store/filesystem.py index f7cef20f12..0ee080e6ee 100644 --- a/glance/store/filesystem.py +++ b/glance/store/filesystem.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/http.py b/glance/store/http.py index 4f5f0a91b7..f4bdc0fac0 100644 --- a/glance/store/http.py +++ b/glance/store/http.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/s3.py b/glance/store/s3.py index f235279bd4..866d18b487 100644 --- a/glance/store/s3.py +++ b/glance/store/s3.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/swift.py b/glance/store/swift.py index 68655e78bc..94e60c5f93 100644 --- a/glance/store/swift.py +++ b/glance/store/swift.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/util.py b/glance/util.py index e8de275980..f6be7decbb 100644 --- a/glance/util.py +++ b/glance/util.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack LLC. +# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/run_tests.py b/run_tests.py index 8f6531f484..a9f3789f2e 100644 --- a/run_tests.py +++ b/run_tests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/stubs.py b/tests/stubs.py index a0f705d7e7..03eec73e8e 100644 --- a/tests/stubs.py +++ b/tests/stubs.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/swiftfakehttp.py b/tests/unit/swiftfakehttp.py index 995ea8d7cc..c8c83d3af0 100644 --- a/tests/unit/swiftfakehttp.py +++ b/tests/unit/swiftfakehttp.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/test_api.py b/tests/unit/test_api.py index ac821ea7d5..b229b25047 100644 --- a/tests/unit/test_api.py +++ b/tests/unit/test_api.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/test_clients.py b/tests/unit/test_clients.py index 784daddb36..7fc325ed91 100644 --- a/tests/unit/test_clients.py +++ b/tests/unit/test_clients.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/test_registry_api.py b/tests/unit/test_registry_api.py index cfd657dbff..846af3b451 100644 --- a/tests/unit/test_registry_api.py +++ b/tests/unit/test_registry_api.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/test_stores.py b/tests/unit/test_stores.py index 98470f102f..924b371cb7 100644 --- a/tests/unit/test_stores.py +++ b/tests/unit/test_stores.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/utils.py b/tests/utils.py index e54d392d7c..d5e1ed8a26 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may From ebb5e9cf0c3e378886d07325fd702ed492e3ca48 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Mon, 24 Jan 2011 16:35:57 -0600 Subject: [PATCH 04/13] A few more copyrights --- builddeb.sh | 2 +- doc/source/client.rst | 2 +- doc/source/community.rst | 2 +- doc/source/gettingstarted.rst | 2 +- doc/source/glanceapi.rst | 2 +- doc/source/identifiers.rst | 2 +- doc/source/index.rst | 2 +- doc/source/registries.rst | 2 +- doc/source/statuses.rst | 2 +- setup.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) mode change 100755 => 100644 builddeb.sh diff --git a/builddeb.sh b/builddeb.sh old mode 100755 new mode 100644 index 45e60cdbee..5e823f831b --- a/builddeb.sh +++ b/builddeb.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2010 OpenStack, LLC +# Copyright 2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/client.rst b/doc/source/client.rst index 97ae0feaf5..48051473dd 100644 --- a/doc/source/client.rst +++ b/doc/source/client.rst @@ -1,5 +1,5 @@ .. - Copyright 2010 OpenStack, LLC + Copyright 2011 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/community.rst b/doc/source/community.rst index 7b73b6497a..d7abd39f80 100644 --- a/doc/source/community.rst +++ b/doc/source/community.rst @@ -1,5 +1,5 @@ .. - Copyright 2010 OpenStack, LLC + Copyright 2011 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/gettingstarted.rst b/doc/source/gettingstarted.rst index e0abbe3075..e0e65e7222 100644 --- a/doc/source/gettingstarted.rst +++ b/doc/source/gettingstarted.rst @@ -1,5 +1,5 @@ .. - Copyright 2010 OpenStack, LLC + Copyright 2011 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/glanceapi.rst b/doc/source/glanceapi.rst index ea8493b56e..67015223ef 100644 --- a/doc/source/glanceapi.rst +++ b/doc/source/glanceapi.rst @@ -1,5 +1,5 @@ .. - Copyright 2010 OpenStack, LLC + Copyright 2011 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/identifiers.rst b/doc/source/identifiers.rst index f85cdfcd88..4280d5a511 100644 --- a/doc/source/identifiers.rst +++ b/doc/source/identifiers.rst @@ -1,5 +1,5 @@ .. - Copyright 2010 OpenStack, LLC + Copyright 2011 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/index.rst b/doc/source/index.rst index 6716452c24..26657a6d9f 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,5 +1,5 @@ .. - Copyright 2010 OpenStack, LLC + Copyright 2011 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/registries.rst b/doc/source/registries.rst index 911562d4e0..97fe147c7c 100644 --- a/doc/source/registries.rst +++ b/doc/source/registries.rst @@ -1,5 +1,5 @@ .. - Copyright 2010 OpenStack, LLC + Copyright 2011 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/statuses.rst b/doc/source/statuses.rst index c9c875f2b3..9210f0da82 100644 --- a/doc/source/statuses.rst +++ b/doc/source/statuses.rst @@ -1,5 +1,5 @@ .. - Copyright 2010 OpenStack, LLC + Copyright 2011 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/setup.py b/setup.py index 8b82a5f481..455130d9aa 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (c) 2010 OpenStack, LLC. +# Copyright (c) 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. From 7bc9ed564c8974ed1e06a22e531c43ae19f8b30a Mon Sep 17 00:00:00 2001 From: Cerberus Date: Mon, 24 Jan 2011 17:00:29 -0600 Subject: [PATCH 05/13] Authors check --- glance/util.py | 16 ++++++++++++ tests/unit/test_misc.py | 55 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 tests/unit/test_misc.py diff --git a/glance/util.py b/glance/util.py index f6be7decbb..a372cd8745 100644 --- a/glance/util.py +++ b/glance/util.py @@ -19,6 +19,7 @@ A few utility routines used throughout Glance """ +import os def image_meta_to_http_headers(image_meta): """ @@ -84,6 +85,21 @@ def get_image_meta_from_headers(response): result['properties'] = properties return result +def parse_mailmap(mailmap='.mailmap'): + mapping = {} + if os.path.exists(mailmap): + fp = open(mailmap, 'r') + for l in fp: + l = l.strip() + if not l.startswith('#') and ' ' in l: + canonical_email, alias = l.split(' ') + mapping[alias] = canonical_email + return mapping + +def str_dict_replace(s, mapping): + for s1, s2 in mapping.iteritems(): + s = s.replace(s1, s2) + return s def has_body(req): """ diff --git a/tests/unit/test_misc.py b/tests/unit/test_misc.py new file mode 100644 index 0000000000..dd67456a54 --- /dev/null +++ b/tests/unit/test_misc.py @@ -0,0 +1,55 @@ +# 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. + +import os +import unittest + +from glance.util import parse_mailmap, str_dict_replace + + +class ProjectTestCase(unittest.TestCase): + def test_authors_up_to_date(self): + if os.path.exists('.bzr'): + contributors = set() + + mailmap = parse_mailmap('.mailmap') + + import bzrlib.workingtree + tree = bzrlib.workingtree.WorkingTree.open('.') + tree.lock_read() + try: + parents = tree.get_parent_ids() + g = tree.branch.repository.get_graph() + for p in parents[1:]: + rev_ids = [r for r, _ in g.iter_ancestry(parents) + if r != "null:"] + revs = tree.branch.repository.get_revisions(rev_ids) + for r in revs: + for author in r.get_apparent_authors(): + email = author.split(' ')[-1] + contributors.add(str_dict_replace(email, mailmap)) + + authors_file = open('Authors', 'r').read() + + missing = set() + for contributor in contributors: + if not contributor in authors_file: + missing.add(contributor) + + self.assertTrue(len(missing) == 0, + '%r not listed in Authors' % missing) + finally: + tree.unlock() From 8f4078821dd6902a4312c1d8008949dae0197f62 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Tue, 25 Jan 2011 00:17:38 -0600 Subject: [PATCH 06/13] Added bzr to pip-requires and refixed some pep8 stuff --- glance/util.py | 4 ++++ tools/pip-requires | 1 + 2 files changed, 5 insertions(+) diff --git a/glance/util.py b/glance/util.py index a372cd8745..4d24298bc6 100644 --- a/glance/util.py +++ b/glance/util.py @@ -21,6 +21,7 @@ A few utility routines used throughout Glance import os + def image_meta_to_http_headers(image_meta): """ Returns a set of image metadata into a dict @@ -85,6 +86,7 @@ def get_image_meta_from_headers(response): result['properties'] = properties return result + def parse_mailmap(mailmap='.mailmap'): mapping = {} if os.path.exists(mailmap): @@ -96,11 +98,13 @@ def parse_mailmap(mailmap='.mailmap'): mapping[alias] = canonical_email return mapping + def str_dict_replace(s, mapping): for s1, s2 in mapping.iteritems(): s = s.replace(s1, s2) return s + def has_body(req): """ Returns whether a Webob.Request object will possess an entity body. diff --git a/tools/pip-requires b/tools/pip-requires index a9cecabbac..9e6dac05d8 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -7,6 +7,7 @@ eventlet>=0.9.12 lockfile==0.8 python-daemon==1.5.5 python-gflags>=1.3 +bzr routes webob wsgiref From 5afa9e2b18c74589b6a55613c515663be4a8ac3d Mon Sep 17 00:00:00 2001 From: Cerberus Date: Wed, 26 Jan 2011 11:26:54 -0600 Subject: [PATCH 07/13] Merge prop fixes --- bin/glance-api | 3 ++- bin/glance-registry | 2 ++ doc/source/client.rst | 2 +- doc/source/community.rst | 2 +- doc/source/gettingstarted.rst | 2 +- doc/source/glanceapi.rst | 2 +- doc/source/identifiers.rst | 2 +- doc/source/index.rst | 2 +- doc/source/registries.rst | 2 +- doc/source/statuses.rst | 2 +- glance/__init__.py | 2 +- glance/client.py | 2 +- glance/common/__init__.py | 2 +- glance/common/db/__init__.py | 4 +++- glance/common/db/sqlalchemy/__init__.py | 2 +- glance/common/db/sqlalchemy/session.py | 3 ++- glance/common/exception.py | 3 ++- glance/common/flags.py | 3 ++- glance/common/server.py | 3 ++- glance/common/utils.py | 3 ++- glance/common/wsgi.py | 3 ++- glance/registry/__init__.py | 2 +- glance/registry/client.py | 2 +- glance/registry/db/__init__.py | 4 +++- glance/registry/db/api.py | 4 +++- glance/registry/db/sqlalchemy/__init__.py | 3 ++- glance/registry/db/sqlalchemy/api.py | 2 ++ glance/registry/db/sqlalchemy/models.py | 3 ++- glance/registry/server.py | 2 +- glance/server.py | 2 +- glance/store/__init__.py | 2 +- glance/store/backends/__init__.py | 2 +- glance/store/filesystem.py | 2 +- glance/store/http.py | 2 +- glance/store/s3.py | 2 +- glance/store/swift.py | 2 +- glance/util.py | 2 +- run_tests.py | 2 +- tests/__init__.py | 2 +- tests/stubs.py | 2 +- tests/unit/__init__.py | 2 +- tests/unit/swiftfakehttp.py | 2 +- tests/unit/test_api.py | 2 +- tests/unit/test_clients.py | 2 +- tests/unit/test_misc.py | 2 +- tests/unit/test_registry_api.py | 2 +- tests/unit/test_stores.py | 2 +- tests/utils.py | 2 +- tools/install_venv.py | 2 +- 49 files changed, 66 insertions(+), 47 deletions(-) diff --git a/bin/glance-api b/bin/glance-api index 1884f3ca91..6364112cb3 100755 --- a/bin/glance-api +++ b/bin/glance-api @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/bin/glance-registry b/bin/glance-registry index 32d2c5a9a1..e151c6ab9b 100755 --- a/bin/glance-registry +++ b/bin/glance-registry @@ -1,5 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # Copyright 2011 OpenStack LLC. # All Rights Reserved. # diff --git a/doc/source/client.rst b/doc/source/client.rst index 48051473dd..97ae0feaf5 100644 --- a/doc/source/client.rst +++ b/doc/source/client.rst @@ -1,5 +1,5 @@ .. - Copyright 2011 OpenStack, LLC + Copyright 2010 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/community.rst b/doc/source/community.rst index d7abd39f80..7b73b6497a 100644 --- a/doc/source/community.rst +++ b/doc/source/community.rst @@ -1,5 +1,5 @@ .. - Copyright 2011 OpenStack, LLC + Copyright 2010 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/gettingstarted.rst b/doc/source/gettingstarted.rst index e0e65e7222..e0abbe3075 100644 --- a/doc/source/gettingstarted.rst +++ b/doc/source/gettingstarted.rst @@ -1,5 +1,5 @@ .. - Copyright 2011 OpenStack, LLC + Copyright 2010 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/glanceapi.rst b/doc/source/glanceapi.rst index 67015223ef..ea8493b56e 100644 --- a/doc/source/glanceapi.rst +++ b/doc/source/glanceapi.rst @@ -1,5 +1,5 @@ .. - Copyright 2011 OpenStack, LLC + Copyright 2010 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/identifiers.rst b/doc/source/identifiers.rst index 4280d5a511..f85cdfcd88 100644 --- a/doc/source/identifiers.rst +++ b/doc/source/identifiers.rst @@ -1,5 +1,5 @@ .. - Copyright 2011 OpenStack, LLC + Copyright 2010 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/index.rst b/doc/source/index.rst index 26657a6d9f..6716452c24 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,5 +1,5 @@ .. - Copyright 2011 OpenStack, LLC + Copyright 2010 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/registries.rst b/doc/source/registries.rst index 97fe147c7c..911562d4e0 100644 --- a/doc/source/registries.rst +++ b/doc/source/registries.rst @@ -1,5 +1,5 @@ .. - Copyright 2011 OpenStack, LLC + Copyright 2010 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/statuses.rst b/doc/source/statuses.rst index 9210f0da82..c9c875f2b3 100644 --- a/doc/source/statuses.rst +++ b/doc/source/statuses.rst @@ -1,5 +1,5 @@ .. - Copyright 2011 OpenStack, LLC + Copyright 2010 OpenStack, LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/__init__.py b/glance/__init__.py index d65c689a83..b60695702c 100644 --- a/glance/__init__.py +++ b/glance/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/client.py b/glance/client.py index 809a9188fb..8d0ac3de89 100644 --- a/glance/client.py +++ b/glance/client.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/__init__.py b/glance/common/__init__.py index d65c689a83..b60695702c 100644 --- a/glance/common/__init__.py +++ b/glance/common/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/db/__init__.py b/glance/common/db/__init__.py index c4c506926c..13b461acfc 100644 --- a/glance/common/db/__init__.py +++ b/glance/common/db/__init__.py @@ -1,6 +1,8 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/db/sqlalchemy/__init__.py b/glance/common/db/sqlalchemy/__init__.py index d65c689a83..b60695702c 100644 --- a/glance/common/db/sqlalchemy/__init__.py +++ b/glance/common/db/sqlalchemy/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/db/sqlalchemy/session.py b/glance/common/db/sqlalchemy/session.py index 2de1de1e62..4fd03762c4 100644 --- a/glance/common/db/sqlalchemy/session.py +++ b/glance/common/db/sqlalchemy/session.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/exception.py b/glance/common/exception.py index a341c880a0..b95541df41 100644 --- a/glance/common/exception.py +++ b/glance/common/exception.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/flags.py b/glance/common/flags.py index e57840db90..2895af6978 100644 --- a/glance/common/flags.py +++ b/glance/common/flags.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/server.py b/glance/common/server.py index 447be00837..9bd82f00ae 100644 --- a/glance/common/server.py +++ b/glance/common/server.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/utils.py b/glance/common/utils.py index f242f0ca65..51e63e3b4a 100644 --- a/glance/common/utils.py +++ b/glance/common/utils.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/common/wsgi.py b/glance/common/wsgi.py index a32e4c86d6..029f7e82cd 100644 --- a/glance/common/wsgi.py +++ b/glance/common/wsgi.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/__init__.py b/glance/registry/__init__.py index c1257bd066..1d82c556c4 100644 --- a/glance/registry/__init__.py +++ b/glance/registry/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/client.py b/glance/registry/client.py index f2dc5fd1b6..a622129e5e 100644 --- a/glance/registry/client.py +++ b/glance/registry/client.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/db/__init__.py b/glance/registry/db/__init__.py index e6bd4b6971..c73cf36a28 100644 --- a/glance/registry/db/__init__.py +++ b/glance/registry/db/__init__.py @@ -1,6 +1,8 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/db/api.py b/glance/registry/db/api.py index 4b20e71db4..9b802e6c47 100644 --- a/glance/registry/db/api.py +++ b/glance/registry/db/api.py @@ -1,6 +1,8 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/db/sqlalchemy/__init__.py b/glance/registry/db/sqlalchemy/__init__.py index 0c1e1cb8f0..a16703b63f 100644 --- a/glance/registry/db/sqlalchemy/__init__.py +++ b/glance/registry/db/sqlalchemy/__init__.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/db/sqlalchemy/api.py b/glance/registry/db/sqlalchemy/api.py index e5eb5ce1b6..42fc6c3b9f 100644 --- a/glance/registry/db/sqlalchemy/api.py +++ b/glance/registry/db/sqlalchemy/api.py @@ -1,5 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # Copyright 2011 OpenStack LLC. # All Rights Reserved. # diff --git a/glance/registry/db/sqlalchemy/models.py b/glance/registry/db/sqlalchemy/models.py index 0fea28d743..2c963b350e 100644 --- a/glance/registry/db/sqlalchemy/models.py +++ b/glance/registry/db/sqlalchemy/models.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/server.py b/glance/registry/server.py index 8173dbabe4..6c77de8121 100644 --- a/glance/registry/server.py +++ b/glance/registry/server.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/server.py b/glance/server.py index 145223451c..a8f073b0ef 100644 --- a/glance/server.py +++ b/glance/server.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/__init__.py b/glance/store/__init__.py index 6db2900189..5e1a8bc23c 100644 --- a/glance/store/__init__.py +++ b/glance/store/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/backends/__init__.py b/glance/store/backends/__init__.py index ef9ecccae0..7a66459765 100644 --- a/glance/store/backends/__init__.py +++ b/glance/store/backends/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/filesystem.py b/glance/store/filesystem.py index 0ee080e6ee..1977c0a9d7 100644 --- a/glance/store/filesystem.py +++ b/glance/store/filesystem.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/http.py b/glance/store/http.py index f4bdc0fac0..4e713f2bfb 100644 --- a/glance/store/http.py +++ b/glance/store/http.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/s3.py b/glance/store/s3.py index 866d18b487..694fcfc6bf 100644 --- a/glance/store/s3.py +++ b/glance/store/s3.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/swift.py b/glance/store/swift.py index 94e60c5f93..8caab8dbc6 100644 --- a/glance/store/swift.py +++ b/glance/store/swift.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/util.py b/glance/util.py index 4d24298bc6..0caca8b8ba 100644 --- a/glance/util.py +++ b/glance/util.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/run_tests.py b/run_tests.py index a9f3789f2e..a63fcfaf85 100644 --- a/run_tests.py +++ b/run_tests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/__init__.py b/tests/__init__.py index d65c689a83..b60695702c 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/stubs.py b/tests/stubs.py index 03eec73e8e..d9716db972 100644 --- a/tests/stubs.py +++ b/tests/stubs.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index d65c689a83..b60695702c 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/swiftfakehttp.py b/tests/unit/swiftfakehttp.py index c8c83d3af0..54f7ec1945 100644 --- a/tests/unit/swiftfakehttp.py +++ b/tests/unit/swiftfakehttp.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/test_api.py b/tests/unit/test_api.py index b229b25047..f3fdf4f1ef 100644 --- a/tests/unit/test_api.py +++ b/tests/unit/test_api.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/test_clients.py b/tests/unit/test_clients.py index 7fc325ed91..5858c599a9 100644 --- a/tests/unit/test_clients.py +++ b/tests/unit/test_clients.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/test_misc.py b/tests/unit/test_misc.py index dd67456a54..07f1108c7c 100644 --- a/tests/unit/test_misc.py +++ b/tests/unit/test_misc.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC +# Copyright 2010-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 diff --git a/tests/unit/test_registry_api.py b/tests/unit/test_registry_api.py index 846af3b451..36ef5c02fe 100644 --- a/tests/unit/test_registry_api.py +++ b/tests/unit/test_registry_api.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/unit/test_stores.py b/tests/unit/test_stores.py index 924b371cb7..599ec4465a 100644 --- a/tests/unit/test_stores.py +++ b/tests/unit/test_stores.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/utils.py b/tests/utils.py index d5e1ed8a26..6c6268e914 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack, LLC +# Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tools/install_venv.py b/tools/install_venv.py index 0986d6a813..68a6190590 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2011 OpenStack LLC. +# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may From 92b839b1bf71d01bf0684441d5d681220ac96ab5 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Wed, 26 Jan 2011 12:42:52 -0600 Subject: [PATCH 08/13] Removing authors test for now --- glance/util.py | 20 --------------- tests/unit/test_misc.py | 55 ----------------------------------------- 2 files changed, 75 deletions(-) delete mode 100644 tests/unit/test_misc.py diff --git a/glance/util.py b/glance/util.py index 0caca8b8ba..8b497a7b30 100644 --- a/glance/util.py +++ b/glance/util.py @@ -19,8 +19,6 @@ A few utility routines used throughout Glance """ -import os - def image_meta_to_http_headers(image_meta): """ @@ -87,24 +85,6 @@ def get_image_meta_from_headers(response): return result -def parse_mailmap(mailmap='.mailmap'): - mapping = {} - if os.path.exists(mailmap): - fp = open(mailmap, 'r') - for l in fp: - l = l.strip() - if not l.startswith('#') and ' ' in l: - canonical_email, alias = l.split(' ') - mapping[alias] = canonical_email - return mapping - - -def str_dict_replace(s, mapping): - for s1, s2 in mapping.iteritems(): - s = s.replace(s1, s2) - return s - - def has_body(req): """ Returns whether a Webob.Request object will possess an entity body. diff --git a/tests/unit/test_misc.py b/tests/unit/test_misc.py deleted file mode 100644 index 07f1108c7c..0000000000 --- a/tests/unit/test_misc.py +++ /dev/null @@ -1,55 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010-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. - -import os -import unittest - -from glance.util import parse_mailmap, str_dict_replace - - -class ProjectTestCase(unittest.TestCase): - def test_authors_up_to_date(self): - if os.path.exists('.bzr'): - contributors = set() - - mailmap = parse_mailmap('.mailmap') - - import bzrlib.workingtree - tree = bzrlib.workingtree.WorkingTree.open('.') - tree.lock_read() - try: - parents = tree.get_parent_ids() - g = tree.branch.repository.get_graph() - for p in parents[1:]: - rev_ids = [r for r, _ in g.iter_ancestry(parents) - if r != "null:"] - revs = tree.branch.repository.get_revisions(rev_ids) - for r in revs: - for author in r.get_apparent_authors(): - email = author.split(' ')[-1] - contributors.add(str_dict_replace(email, mailmap)) - - authors_file = open('Authors', 'r').read() - - missing = set() - for contributor in contributors: - if not contributor in authors_file: - missing.add(contributor) - - self.assertTrue(len(missing) == 0, - '%r not listed in Authors' % missing) - finally: - tree.unlock() From 2c7f6ff811b6c5185559baaaf2c3540578c7f842 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Wed, 26 Jan 2011 14:44:36 -0600 Subject: [PATCH 09/13] Merge prop fixes and a few missed things --- builddeb.sh | 2 +- doc/source/conf.py | 6 +++--- glance/registry/__init__.py | 3 ++- glance/registry/client.py | 2 +- run_tests.sh | 0 tools/pip-requires | 1 - tools/with_venv.sh | 0 7 files changed, 7 insertions(+), 7 deletions(-) mode change 100755 => 100644 run_tests.sh mode change 100755 => 100644 tools/with_venv.sh diff --git a/builddeb.sh b/builddeb.sh index 5e823f831b..45e60cdbee 100644 --- a/builddeb.sh +++ b/builddeb.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/doc/source/conf.py b/doc/source/conf.py index 1aca3a1f8a..d667d5e332 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2011 OpenStack, LLC. +# Copyright (c) 2010 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ import sys # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.append([os.path.abspath('../glance'), os.path.abspath('..'), - os.path.abspath('../bin'), + os.path.abspath('../bin') ]) # -- General configuration --------------------------------------------------- @@ -126,7 +126,7 @@ man_pages = [ ('man/glanceapi', 'glance-api', u'Glance API Server', [u'OpenStack'], 1), ('man/glanceregistry', 'glance-registry', u'Glance Registry Server', - [u'OpenStack'], 1), + [u'OpenStack'], 1) ] diff --git a/glance/registry/__init__.py b/glance/registry/__init__.py index 1d82c556c4..c79bf27e18 100644 --- a/glance/registry/__init__.py +++ b/glance/registry/__init__.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/registry/client.py b/glance/registry/client.py index a622129e5e..af78a7a33e 100644 --- a/glance/registry/client.py +++ b/glance/registry/client.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/run_tests.sh b/run_tests.sh old mode 100755 new mode 100644 diff --git a/tools/pip-requires b/tools/pip-requires index 9e6dac05d8..a9cecabbac 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -7,7 +7,6 @@ eventlet>=0.9.12 lockfile==0.8 python-daemon==1.5.5 python-gflags>=1.3 -bzr routes webob wsgiref diff --git a/tools/with_venv.sh b/tools/with_venv.sh old mode 100755 new mode 100644 From 21d3c7222492237024739176b8e7fcacdc91b569 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Wed, 26 Jan 2011 22:04:29 -0600 Subject: [PATCH 10/13] A few more I missed --- bin/glance-api | 1 + bin/glance-registry | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/glance-api b/bin/glance-api index 6364112cb3..bddb8bca1a 100755 --- a/bin/glance-api +++ b/bin/glance-api @@ -1,3 +1,4 @@ +#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the diff --git a/bin/glance-registry b/bin/glance-registry index e151c6ab9b..62c4980179 100755 --- a/bin/glance-registry +++ b/bin/glance-registry @@ -1,3 +1,4 @@ +#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the From 3234cb335cce4674967a44e5fbbeb5ad34121e27 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Wed, 26 Jan 2011 22:19:13 -0600 Subject: [PATCH 11/13] A few more --- builddeb.sh | 0 glance/common/wsgi.py | 1 + glance/server.py | 2 +- glance/store/__init__.py | 2 +- glance/store/backends/__init__.py | 2 +- glance/store/filesystem.py | 2 +- glance/store/http.py | 2 +- glance/store/s3.py | 2 +- glance/store/swift.py | 2 +- glance/util.py | 2 +- run_tests.py | 2 +- run_tests.sh | 0 setup.py | 2 +- tests/unit/swiftfakehttp.py | 2 +- tests/utils.py | 2 +- tools/install_venv.py | 4 +++- 16 files changed, 16 insertions(+), 13 deletions(-) mode change 100644 => 100755 builddeb.sh mode change 100644 => 100755 run_tests.sh diff --git a/builddeb.sh b/builddeb.sh old mode 100644 new mode 100755 diff --git a/glance/common/wsgi.py b/glance/common/wsgi.py index 029f7e82cd..78c7ba0633 100644 --- a/glance/common/wsgi.py +++ b/glance/common/wsgi.py @@ -2,6 +2,7 @@ # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. +# Copyright 2010 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/server.py b/glance/server.py index a8f073b0ef..667e1fd1ae 100644 --- a/glance/server.py +++ b/glance/server.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack LLC. +# Copyright 2010 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/__init__.py b/glance/store/__init__.py index 5e1a8bc23c..820cbb8fa0 100644 --- a/glance/store/__init__.py +++ b/glance/store/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/backends/__init__.py b/glance/store/backends/__init__.py index 7a66459765..14d83a9112 100644 --- a/glance/store/backends/__init__.py +++ b/glance/store/backends/__init__.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/filesystem.py b/glance/store/filesystem.py index 1977c0a9d7..f7cef20f12 100644 --- a/glance/store/filesystem.py +++ b/glance/store/filesystem.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/http.py b/glance/store/http.py index 4e713f2bfb..4f5f0a91b7 100644 --- a/glance/store/http.py +++ b/glance/store/http.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/s3.py b/glance/store/s3.py index 694fcfc6bf..f235279bd4 100644 --- a/glance/store/s3.py +++ b/glance/store/s3.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/store/swift.py b/glance/store/swift.py index 8caab8dbc6..68655e78bc 100644 --- a/glance/store/swift.py +++ b/glance/store/swift.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/glance/util.py b/glance/util.py index 8b497a7b30..e8de275980 100644 --- a/glance/util.py +++ b/glance/util.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack LLC. +# Copyright 2010 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/run_tests.py b/run_tests.py index a63fcfaf85..8f6531f484 100644 --- a/run_tests.py +++ b/run_tests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/run_tests.sh b/run_tests.sh old mode 100644 new mode 100755 diff --git a/setup.py b/setup.py index e8b48d0b50..a4c6689450 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (c) 2011 OpenStack, LLC. +# Copyright (c) 2010 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/swiftfakehttp.py b/tests/unit/swiftfakehttp.py index 54f7ec1945..995ea8d7cc 100644 --- a/tests/unit/swiftfakehttp.py +++ b/tests/unit/swiftfakehttp.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tests/utils.py b/tests/utils.py index 6c6268e914..e54d392d7c 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack, LLC +# Copyright 2010 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tools/install_venv.py b/tools/install_venv.py index 68a6190590..354887ef3f 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -1,6 +1,8 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2010-2011 OpenStack LLC. +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# Copyright 2010 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may From ec35e6d5735babfe16c1f3e46dd6275b53147426 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Wed, 26 Jan 2011 22:23:57 -0600 Subject: [PATCH 12/13] feh --- tools/install_venv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/install_venv.py b/tools/install_venv.py index 354887ef3f..0234ce739c 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -2,9 +2,10 @@ # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. -# Copyright 2010 OpenStack LLC. # All Rights Reserved. # +# Copyright 2010 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 From 35085b8391b047b49ee1a764335f8a1814b57bfa Mon Sep 17 00:00:00 2001 From: Cerberus Date: Wed, 26 Jan 2011 22:28:22 -0600 Subject: [PATCH 13/13] Messed up a permission somehow --- tools/with_venv.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/with_venv.sh diff --git a/tools/with_venv.sh b/tools/with_venv.sh old mode 100644 new mode 100755