From 8a1db9b689bbcbd37515988517d212e218667d3e Mon Sep 17 00:00:00 2001 From: Nikhil Manchanda Date: Tue, 10 Dec 2013 15:24:43 -0800 Subject: [PATCH] Fixed PEP8/flake8 issues We need to fix PEP8/flake8 issues corresponding to the new hacking rules that got added before we can update to the new global requirements. Change-Id: Iff995139d258549ff9a8e3e5018e964efa2ab152 --- bin/trove-api | 2 +- bin/trove-cli | 54 +++++++++---------- bin/trove-conductor | 2 +- bin/trove-guestagent | 2 +- bin/trove-manage | 4 +- bin/trove-mgmt-taskmanager | 2 +- bin/trove-taskmanager | 2 +- run_tests.py | 18 +++++++ test-requirements.txt | 2 +- trove/common/rpc/service.py | 18 +++++++ trove/datastore/models.py | 18 +++++++ trove/datastore/service.py | 18 +++++++ trove/datastore/views.py | 18 +++++++ trove/guestagent/backup/__init__.py | 18 +++++++ trove/guestagent/datastore/mysql/manager.py | 18 +++++++ trove/guestagent/datastore/mysql/service.py | 18 +++++++ trove/tests/api/header.py | 18 +++++++ trove/tests/api/instances_delete.py | 18 +++++++ trove/tests/api/limits.py | 18 +++++++ trove/tests/api/mgmt/instances.py | 10 ++-- trove/tests/api/mgmt/malformed_json.py | 18 +++++++ trove/tests/api/mgmt/quotas.py | 18 +++++++ trove/tests/unittests/backup/test_storage.py | 2 +- .../tests/unittests/common/test_pagination.py | 18 +++++++ trove/tests/unittests/common/test_remote.py | 18 +++++++ trove/tests/util/event_simulator.py | 18 +++++++ trove/tests/util/mysql.py | 18 +++++++ 27 files changed, 347 insertions(+), 41 deletions(-) diff --git a/bin/trove-api b/bin/trove-api index b5c48f585d..01a33ed92b 100755 --- a/bin/trove-api +++ b/bin/trove-api @@ -53,5 +53,5 @@ if __name__ == '__main__': launcher.wait() except RuntimeError as error: import traceback - print traceback.format_exc() + print(traceback.format_exc()) sys.exit("ERROR: %s" % error) diff --git a/bin/trove-cli b/bin/trove-cli index 11eb8c1c42..0857262c88 100755 --- a/bin/trove-cli +++ b/bin/trove-cli @@ -43,7 +43,7 @@ oparser = None def _pretty_print(info): - print json.dumps(info, sort_keys=True, indent=4) + print(json.dumps(info, sort_keys=True, indent=4)) class InstanceCommands(object): @@ -61,7 +61,7 @@ class InstanceCommands(object): result = dbaas.instances.create(name, flavorRef, volume) _pretty_print(result._info) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def delete(self, id): """Delete the specified instance""" @@ -69,9 +69,9 @@ class InstanceCommands(object): try: result = dbaas.instances.delete(id) if result: - print result + print(result) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def get(self, id): """Get details for the specified instance""" @@ -79,7 +79,7 @@ class InstanceCommands(object): try: _pretty_print(dbaas.instances.get(id)._info) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def list(self): """List all instances for account""" @@ -88,7 +88,7 @@ class InstanceCommands(object): for instance in dbaas.instances.list(): _pretty_print(instance._info) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def resize(self, id, size): """Resize an instance volume""" @@ -96,9 +96,9 @@ class InstanceCommands(object): try: result = dbaas.instances.resize(id, size) if result: - print result + print(result) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def restart(self, id): """Restart the database""" @@ -106,9 +106,9 @@ class InstanceCommands(object): try: result = dbaas.instances.restart(id) if result: - print result + print(result) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) class FlavorsCommands(object): @@ -124,7 +124,7 @@ class FlavorsCommands(object): for flavor in dbaas.flavors.list(): _pretty_print(flavor._info) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) class DatabaseCommands(object): @@ -140,7 +140,7 @@ class DatabaseCommands(object): databases = [{'name': dbname}] dbaas.databases.create(id, databases) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def delete(self, id, dbname): """Delete a database""" @@ -148,7 +148,7 @@ class DatabaseCommands(object): try: dbaas.databases.delete(id, dbname) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def list(self, id): """List the databases""" @@ -157,7 +157,7 @@ class DatabaseCommands(object): for database in dbaas.databases.list(id): _pretty_print(database._info) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) class UserCommands(object): @@ -176,7 +176,7 @@ class UserCommands(object): 'databases': databases}] dbaas.users.create(id, users) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def delete(self, id, user): """Delete the specified user""" @@ -184,7 +184,7 @@ class UserCommands(object): try: dbaas.users.delete(id, user) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def list(self, id): """List all the users for an instance""" @@ -193,7 +193,7 @@ class UserCommands(object): for user in dbaas.users.list(id): _pretty_print(user._info) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) class RootCommands(object): @@ -207,9 +207,9 @@ class RootCommands(object): dbaas = common.get_client() try: user, password = dbaas.root.create(id) - print "User:\t\t%s\nPassword:\t%s" % (user, password) + print("User:\t\t%s\nPassword:\t%s" % (user, password)) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def enabled(self, id): """Check the instance for root access""" @@ -217,7 +217,7 @@ class RootCommands(object): try: _pretty_print(dbaas.root.is_root_enabled(id)) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) class VersionCommands(object): @@ -234,7 +234,7 @@ class VersionCommands(object): for version in versions: _pretty_print(version._info) except Exception: - print sys.exc_info()[1] + print(sys.exc_info()[1]) def config_options(): @@ -285,13 +285,13 @@ def main(): fn(*args) sys.exit(0) except TypeError as err: - print "Possible wrong number of arguments supplied." - print "%s %s: %s" % (cmd, action, fn.__doc__) - print "\t\t", [fn.func_code.co_varnames[i] for i in - range(fn.func_code.co_argcount)] - print "ERROR: %s" % err + print("Possible wrong number of arguments supplied.") + print("%s %s: %s" % (cmd, action, fn.__doc__)) + print("\t\t", [fn.func_code.co_varnames[i] for i in + range(fn.func_code.co_argcount)]) + print("ERROR: %s" % err) except Exception: - print "Command failed, please check the log for more info." + print("Command failed, please check the log for more info.") raise else: common.print_actions(cmd, actions) diff --git a/bin/trove-conductor b/bin/trove-conductor index d8e7340e1e..d491cb2b9d 100755 --- a/bin/trove-conductor +++ b/bin/trove-conductor @@ -58,5 +58,5 @@ if __name__ == '__main__': try: main() except RuntimeError as error: - print traceback.format_exc() + print(traceback.format_exc()) sys.exit("ERROR: %s" % error) diff --git a/bin/trove-guestagent b/bin/trove-guestagent index 92562797a6..3586c1b11f 100755 --- a/bin/trove-guestagent +++ b/bin/trove-guestagent @@ -60,5 +60,5 @@ if __name__ == '__main__': launcher.wait() except RuntimeError as error: import traceback - print traceback.format_exc() + print(traceback.format_exc()) sys.exit("ERROR: %s" % error) diff --git a/bin/trove-manage b/bin/trove-manage index 41d930422a..5c3cfab20c 100755 --- a/bin/trove-manage +++ b/bin/trove-manage @@ -128,8 +128,8 @@ if __name__ == '__main__': Commands().execute() sys.exit(0) except TypeError as e: - print _("Possible wrong number of arguments supplied %s") % e + print(_("Possible wrong number of arguments supplied %s") % e) sys.exit(2) except Exception: - print _("Command failed, please check log for more info") + print(_("Command failed, please check log for more info")) raise diff --git a/bin/trove-mgmt-taskmanager b/bin/trove-mgmt-taskmanager index def33ca8b8..950a95aa9c 100755 --- a/bin/trove-mgmt-taskmanager +++ b/bin/trove-mgmt-taskmanager @@ -57,5 +57,5 @@ if __name__ == '__main__': launcher.wait() except RuntimeError as error: import traceback - print traceback.format_exc() + print(traceback.format_exc()) sys.exit("ERROR: %s" % error) diff --git a/bin/trove-taskmanager b/bin/trove-taskmanager index 74cda28214..e1bf02b224 100755 --- a/bin/trove-taskmanager +++ b/bin/trove-taskmanager @@ -66,5 +66,5 @@ if __name__ == '__main__': launcher.wait() except RuntimeError as error: import traceback - print traceback.format_exc() + print(traceback.format_exc()) sys.exit("ERROR: %s" % error) diff --git a/run_tests.py b/run_tests.py index b0effa197e..7cbf7874bc 100644 --- a/run_tests.py +++ b/run_tests.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# 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. +# + import gettext import os import urllib diff --git a/test-requirements.txt b/test-requirements.txt index 1f0ca55567..d86ce27e04 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,7 +3,7 @@ pep8==1.4.5 pyflakes==0.7.2 flake8==2.0 hacking>=0.5.3,<0.6 -sphinx>=1.1.2 +sphinx>=1.1.2,<1.2 coverage nose diff --git a/trove/common/rpc/service.py b/trove/common/rpc/service.py index c985655a97..f4723bb82b 100644 --- a/trove/common/rpc/service.py +++ b/trove/common/rpc/service.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# 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. +# + import inspect import os diff --git a/trove/datastore/models.py b/trove/datastore/models.py index 8c962134ad..f4c4daf387 100644 --- a/trove/datastore/models.py +++ b/trove/datastore/models.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + from trove.common import cfg from trove.common import exception from trove.db import models as dbmodels diff --git a/trove/datastore/service.py b/trove/datastore/service.py index b141d042b4..e4682742f3 100644 --- a/trove/datastore/service.py +++ b/trove/datastore/service.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + from trove.common import wsgi from trove.datastore import models, views diff --git a/trove/datastore/views.py b/trove/datastore/views.py index a2b29085ed..91a345b3cc 100644 --- a/trove/datastore/views.py +++ b/trove/datastore/views.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + from trove.common.views import create_links diff --git a/trove/guestagent/backup/__init__.py b/trove/guestagent/backup/__init__.py index 4309bed973..810691f61a 100644 --- a/trove/guestagent/backup/__init__.py +++ b/trove/guestagent/backup/__init__.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + from trove.guestagent.backup.backupagent import BackupAgent AGENT = BackupAgent() diff --git a/trove/guestagent/datastore/mysql/manager.py b/trove/guestagent/datastore/mysql/manager.py index a58d7ed212..17cb3c8cc3 100644 --- a/trove/guestagent/datastore/mysql/manager.py +++ b/trove/guestagent/datastore/mysql/manager.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# 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. +# + import os from trove.common import cfg from trove.common import instance as rd_instance diff --git a/trove/guestagent/datastore/mysql/service.py b/trove/guestagent/datastore/mysql/service.py index 1f3a215dbd..29b1364da0 100644 --- a/trove/guestagent/datastore/mysql/service.py +++ b/trove/guestagent/datastore/mysql/service.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# 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. +# + import os import passlib.utils import re diff --git a/trove/tests/api/header.py b/trove/tests/api/header.py index 5d86c5fdea..b1e6fa2b4d 100644 --- a/trove/tests/api/header.py +++ b/trove/tests/api/header.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + from proboscis import test from proboscis.asserts import * from proboscis import SkipTest diff --git a/trove/tests/api/instances_delete.py b/trove/tests/api/instances_delete.py index 5fc4dc8d49..8785c84010 100644 --- a/trove/tests/api/instances_delete.py +++ b/trove/tests/api/instances_delete.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# 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. +# + import time from proboscis import before_class diff --git a/trove/tests/api/limits.py b/trove/tests/api/limits.py index 3f766125dc..2fb3ebd78d 100644 --- a/trove/tests/api/limits.py +++ b/trove/tests/api/limits.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + from nose.tools import assert_equal from nose.tools import assert_true diff --git a/trove/tests/api/mgmt/instances.py b/trove/tests/api/mgmt/instances.py index 4731273c27..b25ac74b20 100644 --- a/trove/tests/api/mgmt/instances.py +++ b/trove/tests/api/mgmt/instances.py @@ -108,11 +108,11 @@ def mgmt_instance_get(): #TODO(tim-simpson): Validate additional fields, assert # no extra fields exist. if api_instance.server is not None: - print "the real content of server: %s" % dir(api_instance.server) - print "the type of server: %s" % type(api_instance.server) - print "the real content of api_instance: %s" % dir(api_instance) - print "the type of api_instance: %s" % type(api_instance) - print hasattr(api_instance, "server") + print("the real content of server: %s" % dir(api_instance.server)) + print("the type of server: %s" % type(api_instance.server)) + print("the real content of api_instance: %s" % dir(api_instance)) + print("the type of api_instance: %s" % type(api_instance)) + print(hasattr(api_instance, "server")) with CollectionCheck("server", api_instance.server) as server: server.has_element("addresses", dict) diff --git a/trove/tests/api/mgmt/malformed_json.py b/trove/tests/api/mgmt/malformed_json.py index ff8c3e9744..573745d4d8 100644 --- a/trove/tests/api/mgmt/malformed_json.py +++ b/trove/tests/api/mgmt/malformed_json.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + from collections import deque from proboscis import test from proboscis.asserts import * diff --git a/trove/tests/api/mgmt/quotas.py b/trove/tests/api/mgmt/quotas.py index e80c06c797..5666bf8db9 100644 --- a/trove/tests/api/mgmt/quotas.py +++ b/trove/tests/api/mgmt/quotas.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + from proboscis import test from proboscis.asserts import * from proboscis import after_class diff --git a/trove/tests/unittests/backup/test_storage.py b/trove/tests/unittests/backup/test_storage.py index e7b7faf83d..da21a53f09 100644 --- a/trove/tests/unittests/backup/test_storage.py +++ b/trove/tests/unittests/backup/test_storage.py @@ -174,7 +174,7 @@ class SwiftStorageLoad(testtools.TestCase): self.assertEqual(download_stream.filename, "123") with download_stream as stream: - print "Testing SwiftDownloadStream context manager: %s" % stream + print("Testing SwiftDownloadStream context manager: %s" % stream) self.assertIsNotNone(download_stream.process, "SwiftDownloadStream process/cmd is supposed " diff --git a/trove/tests/unittests/common/test_pagination.py b/trove/tests/unittests/common/test_pagination.py index 9cb4c442e7..b2a1e054a3 100644 --- a/trove/tests/unittests/common/test_pagination.py +++ b/trove/tests/unittests/common/test_pagination.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# 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. +# + import testtools from trove.common.pagination import PaginatedDataView diff --git a/trove/tests/unittests/common/test_remote.py b/trove/tests/unittests/common/test_remote.py index 20496910ac..ebb4765136 100644 --- a/trove/tests/unittests/common/test_remote.py +++ b/trove/tests/unittests/common/test_remote.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + from mockito import mock, when, unstub import testtools from testtools.matchers import * diff --git a/trove/tests/util/event_simulator.py b/trove/tests/util/event_simulator.py index f2af50c4b7..f5b8324b9c 100644 --- a/trove/tests/util/event_simulator.py +++ b/trove/tests/util/event_simulator.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# 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. +# + """ Simulates time itself to make the fake mode tests run even faster. """ diff --git a/trove/tests/util/mysql.py b/trove/tests/util/mysql.py index 18d6383244..535031a736 100644 --- a/trove/tests/util/mysql.py +++ b/trove/tests/util/mysql.py @@ -1,3 +1,21 @@ +# Copyright 2013 OpenStack Foundation +# Copyright 2013 Rackspace Hosting +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# 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. +# + import pexpect import re from sqlalchemy import create_engine