Triple double-quoted strings should be used for docstrings
Change-Id: Ie854ca1a468a0e71b7fa96e6606ead36d1c5d1d2
This commit is contained in:
parent
344a3872e7
commit
1f3bea3081
@ -26,7 +26,7 @@ LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
class DatabaseDispatcher(dispatcher.Base):
|
||||
'''Dispatcher class for recording metering data into database.
|
||||
"""Dispatcher class for recording metering data into database.
|
||||
|
||||
The dispatcher class which records each meter into a database configured
|
||||
in ceilometer configuration file.
|
||||
@ -35,7 +35,7 @@ class DatabaseDispatcher(dispatcher.Base):
|
||||
ceilometer.conf file
|
||||
|
||||
dispatchers = database
|
||||
'''
|
||||
"""
|
||||
def __init__(self, conf):
|
||||
super(DatabaseDispatcher, self).__init__(conf)
|
||||
self.storage_conn = storage.get_connection_from_config(conf)
|
||||
|
@ -38,7 +38,7 @@ cfg.CONF.register_opts(file_dispatcher_opts, group="dispatcher_file")
|
||||
|
||||
|
||||
class FileDispatcher(dispatcher.Base):
|
||||
'''Dispatcher class for recording metering data to a file.
|
||||
"""Dispatcher class for recording metering data to a file.
|
||||
|
||||
The dispatcher class which logs each meter into a file configured in
|
||||
ceilometer configuration file. An example configuration may look like the
|
||||
@ -52,7 +52,7 @@ class FileDispatcher(dispatcher.Base):
|
||||
|
||||
[collector]
|
||||
dispatchers = file
|
||||
'''
|
||||
"""
|
||||
|
||||
def __init__(self, conf):
|
||||
super(FileDispatcher, self).__init__(conf)
|
||||
|
@ -32,15 +32,15 @@ class _Base(plugin.CentralPollster):
|
||||
|
||||
@abc.abstractproperty
|
||||
def meter_name(self):
|
||||
'''Return a Meter Name.'''
|
||||
"""Return a Meter Name."""
|
||||
|
||||
@abc.abstractproperty
|
||||
def meter_type(self):
|
||||
'''Return a Meter Type.'''
|
||||
"""Return a Meter Type."""
|
||||
|
||||
@abc.abstractproperty
|
||||
def meter_unit(self):
|
||||
'''Return a Meter Unit.'''
|
||||
"""Return a Meter Unit."""
|
||||
|
||||
@staticmethod
|
||||
def _parse_my_resource(resource):
|
||||
|
@ -23,7 +23,7 @@ class Driver():
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_sample_data(self, meter_name, parse_url, params, cache):
|
||||
'''Return volume, resource_id, resource_metadata, timestamp in tuple.
|
||||
"""Return volume, resource_id, resource_metadata, timestamp in tuple.
|
||||
|
||||
If not implemented for meter_name, returns None
|
||||
'''
|
||||
"""
|
||||
|
@ -45,4 +45,4 @@ class PublisherBase(object):
|
||||
|
||||
@abc.abstractmethod
|
||||
def publish_samples(self, context, samples):
|
||||
"Publish samples into final conduit."
|
||||
"""Publish samples into final conduit."""
|
||||
|
@ -16,8 +16,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.
|
||||
'''Tests alarm operation
|
||||
'''
|
||||
"""Tests alarm operation."""
|
||||
|
||||
import datetime
|
||||
import json as jsonutils
|
||||
|
@ -37,19 +37,19 @@ class TestBase(test.BaseTestCase):
|
||||
def test_subclass_ng(self):
|
||||
|
||||
class NgSubclass1(statistics._Base):
|
||||
'''meter_name is lost.'''
|
||||
"""meter_name is lost."""
|
||||
|
||||
meter_type = sample.TYPE_GAUGE
|
||||
meter_unit = 'B'
|
||||
|
||||
class NgSubclass2(statistics._Base):
|
||||
'''meter_type is lost.'''
|
||||
"""meter_type is lost."""
|
||||
|
||||
meter_name = 'foo'
|
||||
meter_unit = 'B'
|
||||
|
||||
class NgSubclass3(statistics._Base):
|
||||
'''meter_unit is lost.'''
|
||||
"""meter_unit is lost."""
|
||||
|
||||
meter_name = 'foo'
|
||||
meter_type = sample.TYPE_GAUGE
|
||||
|
Loading…
x
Reference in New Issue
Block a user