diff --git a/bin/marconi-self-host b/bin/marconi-self-host index 471e3935..4342c458 100644 --- a/bin/marconi-self-host +++ b/bin/marconi-self-host @@ -1,24 +1,23 @@ #!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2012 Rackspace, Inc. +# Copyright (c) 2013 Rackspace, Inc. # -# 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. """Bootstrap for self-hosting a Marconi node -Alternatively, for hosting a WSGI app with an external server, configure +Alternatively, to host a WSGI app with an external server, configure kernel with the WSGI transport and export the WSGI app callable, e.g.: logging.config.fileConfig(logging_conf_file) diff --git a/marconi/__init__.py b/marconi/__init__.py index 7645f6d6..8d417163 100644 --- a/marconi/__init__.py +++ b/marconi/__init__.py @@ -1,17 +1,17 @@ -#!/usr/bin/env python -# Copyright 2012 Rackspace, Inc. +# Copyright (c) 2013 Rackspace Hosting, Inc. # -# 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. import marconi.version diff --git a/marconi/common/__init__.py b/marconi/common/__init__.py index d7ec39ab..5eb06c3b 100644 --- a/marconi/common/__init__.py +++ b/marconi/common/__init__.py @@ -1,3 +1,3 @@ -""" Code common to Marconi, including main application logic. """ +"""Code common to Marconi, including main application logic.""" from .kernel import Kernel # NOQA diff --git a/marconi/common/kernel.py b/marconi/common/kernel.py index 7ca5be7b..4baacb54 100644 --- a/marconi/common/kernel.py +++ b/marconi/common/kernel.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2013 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,13 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Defines the Marconi Kernel - -The Kernel loads up drivers per a given configuration, and manages their -lifetimes. - -""" - from ConfigParser import SafeConfigParser import marconi.transport.wsgi as wsgi @@ -29,6 +20,12 @@ import marconi.storage.reference as reference class Kernel(object): + """ + Defines the Marconi Kernel + + The Kernel loads up drivers per a given configuration, and manages their + lifetimes. + """ def __init__(self, config_file): # TODO(kgriffs) Error handling diff --git a/marconi/storage/__init__.py b/marconi/storage/__init__.py index 7aea1910..7a4b7160 100644 --- a/marconi/storage/__init__.py +++ b/marconi/storage/__init__.py @@ -1,3 +1,3 @@ -""" Marconi Storage Drivers """ +"""Marconi Storage Drivers""" from .driver_base import DriverBase # NOQA diff --git a/marconi/storage/driver_base.py b/marconi/storage/driver_base.py index e2034343..2bf23e70 100644 --- a/marconi/storage/driver_base.py +++ b/marconi/storage/driver_base.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2013 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Implements the DriverBase abstract class for Marconi storage drivers.""" - from abc import ABCMeta, abstractproperty diff --git a/marconi/storage/mongodb/__init__.py b/marconi/storage/mongodb/__init__.py index 45640ee3..f57088bb 100644 --- a/marconi/storage/mongodb/__init__.py +++ b/marconi/storage/mongodb/__init__.py @@ -1 +1 @@ -""" MongoDB Storage Driver for Marconi """ +"""MongoDB Storage Driver for Marconi""" diff --git a/marconi/storage/reference/__init__.py b/marconi/storage/reference/__init__.py index e28074b8..00c878c0 100644 --- a/marconi/storage/reference/__init__.py +++ b/marconi/storage/reference/__init__.py @@ -1,7 +1,7 @@ -"""In-memory reference Storage Driver for Marconi. +""" +In-memory reference Storage Driver for Marconi. Useful for automated testing and for prototyping storage driver concepts. - """ from .driver import Driver # NOQA diff --git a/marconi/storage/reference/driver.py b/marconi/storage/reference/driver.py index c8fa3db4..5ac0fc0b 100644 --- a/marconi/storage/reference/driver.py +++ b/marconi/storage/reference/driver.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2013 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/marconi/tests/__init__.py b/marconi/tests/__init__.py index ef43c644..1413a3e2 100644 --- a/marconi/tests/__init__.py +++ b/marconi/tests/__init__.py @@ -1,14 +1,16 @@ -#!/usr/bin/env python -# Copyright 2012 Rackspace, Inc. +# Copyright (c) 2013 Rackspace Hosting, Inc. # -# 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. + +"""Marconi Unit-ish Tests""" diff --git a/marconi/tests/test_simple.py b/marconi/tests/test_simple.py index a525f9ae..0c3a8598 100644 --- a/marconi/tests/test_simple.py +++ b/marconi/tests/test_simple.py @@ -1,6 +1,4 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2012 Rackspace, Inc. +# Copyright 2013 Rackspace, Inc. # # 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/marconi/tests/util/__init__.py b/marconi/tests/util/__init__.py index d8bbaa22..74db8c17 100644 --- a/marconi/tests/util/__init__.py +++ b/marconi/tests/util/__init__.py @@ -1,4 +1,3 @@ """Test utilities""" - from .test_suite import TestSuite # NOQA diff --git a/marconi/tests/util/test_suite.py b/marconi/tests/util/test_suite.py index 952df125..3063d378 100644 --- a/marconi/tests/util/test_suite.py +++ b/marconi/tests/util/test_suite.py @@ -1,40 +1,29 @@ -"""Defines the TestSuite class. - -Copyright 2013 by Rackspace Hosting, Inc. - -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. - -""" +# Copyright (c) 2013 Rackspace Hosting, Inc. +# +# 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 import os.path class TestSuite(testtools.TestCase): - """Child class of testtools.TestCase for testing Marconi + """ + Child class of testtools.TestCase for testing Marconi Inherit from this and write your test methods. If the child class defines a prepare(self) method, this method will be called before executing each test method. - - Attributes: - api: falcon.API instance used in simulating requests. - srmock: falcon.testing.StartResponseMock instance used in - simulating requests. - test_route: Randomly-generated route string (path) that tests can - use when wiring up resources. - - """ def setUp(self): @@ -47,11 +36,11 @@ class TestSuite(testtools.TestCase): prepare() def conf_path(self, filename): - """ Returns the full path to the specified Marconi conf file - - Args: - filename: Name of the conf file to find (e.g., "wsgi_memory.conf") + """ + Returns the full path to the specified Marconi conf file + :param filename: Name of the conf file to find (e.g., + "wsgi_memory.conf") """ parent = os.path.dirname(self._my_dir()) diff --git a/marconi/transport/__init__.py b/marconi/transport/__init__.py index 5fd00c9c..31c5afb2 100644 --- a/marconi/transport/__init__.py +++ b/marconi/transport/__init__.py @@ -1,3 +1,3 @@ -""" Marconi Transport Modules """ +"""Marconi Transport Drivers""" from .driver_base import DriverBase # NOQA diff --git a/marconi/transport/driver_base.py b/marconi/transport/driver_base.py index abf7000c..937beef4 100644 --- a/marconi/transport/driver_base.py +++ b/marconi/transport/driver_base.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2013 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Implements the DriverBase abstract class for Marconi transport drivers.""" - from abc import ABCMeta, abstractmethod @@ -25,6 +21,5 @@ class DriverBase: @abstractmethod def listen(): - # TODO(kgriffs): If this is all there is to DriverBase, do we - # even need it? + #TODO(kgriffs): If this is all there is to DriverBase, do we need it? pass diff --git a/marconi/transport/wsgi/__init__.py b/marconi/transport/wsgi/__init__.py index 348eb98b..ffd708de 100644 --- a/marconi/transport/wsgi/__init__.py +++ b/marconi/transport/wsgi/__init__.py @@ -1,3 +1,3 @@ -""" WSGI Transport Driver""" +"""WSGI Transport Driver""" from .driver import Driver # NOQA diff --git a/marconi/transport/wsgi/driver.py b/marconi/transport/wsgi/driver.py index f609446b..3173250d 100644 --- a/marconi/transport/wsgi/driver.py +++ b/marconi/transport/wsgi/driver.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2013 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/marconi/version.py b/marconi/version.py index 633a5f68..cdb24d97 100644 --- a/marconi/version.py +++ b/marconi/version.py @@ -1,19 +1,17 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2012 OpenStack LLC +# 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. from marconi.openstack.common import version as common_version