From 31bc2772d31aeb03f59e864626f906617396e32b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20K=C3=B6lker?= Date: Wed, 6 Mar 2013 17:29:40 -0600 Subject: [PATCH] Pep8 and License headers --- quark/__init__.py | 2 +- quark/api/auth.py | 22 +++++++++---------- quark/api/extensions/ip_addresses.py | 24 ++++++++++----------- quark/api/extensions/mac_address_ranges.py | 24 ++++++++++----------- quark/api/extensions/routes.py | 25 ++++++++++------------ quark/tests/__init__.py | 14 ++++++++++++ quark/tests/test_base.py | 15 +++++++++++++ quark/tests/test_db_models.py | 1 - quark/tests/test_ipam.py | 20 ++++++++++++----- 9 files changed, 89 insertions(+), 58 deletions(-) diff --git a/quark/__init__.py b/quark/__init__.py index cf68947..0982b06 100644 --- a/quark/__init__.py +++ b/quark/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012 OpenStack, LLC. +# Copyright (c) 2012 OpenStack Foundation # # 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/quark/api/auth.py b/quark/api/auth.py index 433c796..095a767 100644 --- a/quark/api/auth.py +++ b/quark/api/auth.py @@ -1,17 +1,17 @@ -# Copyright 2013 OpenStack LLC. -# All Rights Reserved. +# Copyright (c) 2013 OpenStack Foundation # -# 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. +# 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 webob.dec import webob.exc diff --git a/quark/api/extensions/ip_addresses.py b/quark/api/extensions/ip_addresses.py index ae7a15f..ceaff66 100644 --- a/quark/api/extensions/ip_addresses.py +++ b/quark/api/extensions/ip_addresses.py @@ -1,19 +1,17 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2013 OpenStack LLC. -# All Rights Reserved. +# Copyright (c) 2013 OpenStack Foundation # -# 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. +# 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 webob diff --git a/quark/api/extensions/mac_address_ranges.py b/quark/api/extensions/mac_address_ranges.py index 44534f0..cacc064 100644 --- a/quark/api/extensions/mac_address_ranges.py +++ b/quark/api/extensions/mac_address_ranges.py @@ -1,19 +1,17 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2013 OpenStack LLC. -# All Rights Reserved. +# Copyright (c) 2013 OpenStack Foundation # -# 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. +# 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 webob diff --git a/quark/api/extensions/routes.py b/quark/api/extensions/routes.py index fe33a11..79ec8e7 100644 --- a/quark/api/extensions/routes.py +++ b/quark/api/extensions/routes.py @@ -1,24 +1,21 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2013 OpenStack LLC. -# All Rights Reserved. +# Copyright (c) 2013 OpenStack Foundation # -# 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. +# 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 webob from quantum.api import extensions -from quantum.api.v2 import base from quantum.manager import QuantumManager from quantum.common import exceptions from quantum.openstack.common import log as logging diff --git a/quark/tests/__init__.py b/quark/tests/__init__.py index e69de29..096b33c 100644 --- a/quark/tests/__init__.py +++ b/quark/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2013 OpenStack Foundation +# +# 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/quark/tests/test_base.py b/quark/tests/test_base.py index 8a513c3..dc105b5 100644 --- a/quark/tests/test_base.py +++ b/quark/tests/test_base.py @@ -1,3 +1,18 @@ +# Copyright (c) 2013 OpenStack Foundation +# +# 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 unittest2 diff --git a/quark/tests/test_db_models.py b/quark/tests/test_db_models.py index eb8f0ee..6607c0c 100644 --- a/quark/tests/test_db_models.py +++ b/quark/tests/test_db_models.py @@ -17,7 +17,6 @@ from oslo.config import cfg from quantum import context from quantum.db import api as db_api -from quark.db import models import quark.plugin import test_base diff --git a/quark/tests/test_ipam.py b/quark/tests/test_ipam.py index d504e7b..7e6636f 100644 --- a/quark/tests/test_ipam.py +++ b/quark/tests/test_ipam.py @@ -1,6 +1,19 @@ -from collections import namedtuple +# Copyright (c) 2013 OpenStack Foundation +# +# 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 datetime import datetime -from sqlalchemy import create_engine import mock from oslo.config import cfg @@ -230,10 +243,7 @@ class TestQuarkIpam(test_base.TestBase): '01:02:04:00:00:00') def test_deallocate_mac_address_success(self): - net_id = None - port_id = None tenant_id = 'foobar' - reuse_after = 0 self._create_and_insert_mar() mar = self.context.session.query(models.MacAddressRange).first()