Enable pep8 H403 checks
What a better thing to do on a Friday afternoon to chill out before the week-end? Change-Id: Ie264d2bff02794d80ddbecb95a6b2ff9a3840d44
This commit is contained in:
parent
782a71c012
commit
d06dcc69f5
@ -31,8 +31,10 @@ LOG = log.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class PollingTask(object):
|
class PollingTask(object):
|
||||||
"""Polling task for polling counters and inject into pipeline
|
"""Polling task for polling counters and inject into pipeline.
|
||||||
A polling task can be invoked periodically or only once"""
|
A polling task can be invoked periodically or only once.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, agent_manager):
|
def __init__(self, agent_manager):
|
||||||
self.manager = agent_manager
|
self.manager = agent_manager
|
||||||
|
@ -43,7 +43,8 @@ class ComputeNotificationBase(plugin.NotificationBase):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_exchange_topics(conf):
|
def get_exchange_topics(conf):
|
||||||
"""Return a sequence of ExchangeTopics defining the exchange and
|
"""Return a sequence of ExchangeTopics defining the exchange and
|
||||||
topics to be connected for this plugin."""
|
topics to be connected for this plugin.
|
||||||
|
"""
|
||||||
return [
|
return [
|
||||||
plugin.ExchangeTopics(
|
plugin.ExchangeTopics(
|
||||||
exchange=conf.nova_control_exchange,
|
exchange=conf.nova_control_exchange,
|
||||||
|
@ -24,12 +24,12 @@ from ceilometer import plugin
|
|||||||
|
|
||||||
|
|
||||||
class ComputePollster(plugin.PollsterBase):
|
class ComputePollster(plugin.PollsterBase):
|
||||||
"""Base class for plugins that support the polling API on the
|
"""Base class for plugins that support the polling API on the compute node.
|
||||||
compute node."""
|
"""
|
||||||
|
|
||||||
__metaclass__ = abc.ABCMeta
|
__metaclass__ = abc.ABCMeta
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def get_counters(self, manager, context):
|
def get_counters(self, manager, context):
|
||||||
"""Return a sequence of Counter instances from polling the
|
"""Return a sequence of Counter instances from polling the resources.
|
||||||
resources."""
|
"""
|
||||||
|
@ -40,7 +40,8 @@ class ImageBase(plugin.NotificationBase):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_exchange_topics(conf):
|
def get_exchange_topics(conf):
|
||||||
"""Return a sequence of ExchangeTopics defining the exchange and
|
"""Return a sequence of ExchangeTopics defining the exchange and
|
||||||
topics to be connected for this plugin."""
|
topics to be connected for this plugin.
|
||||||
|
"""
|
||||||
return [
|
return [
|
||||||
plugin.ExchangeTopics(
|
plugin.ExchangeTopics(
|
||||||
exchange=conf.glance_control_exchange,
|
exchange=conf.glance_control_exchange,
|
||||||
|
@ -57,8 +57,10 @@ class NetworkNotificationBase(plugin.NotificationBase):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_exchange_topics(conf):
|
def get_exchange_topics(conf):
|
||||||
"""Return a sequence of ExchangeTopics defining the exchange and
|
"""Return a sequence of ExchangeTopics defining the exchange and topics
|
||||||
topics to be connected for this plugin."""
|
to be connected for this plugin.
|
||||||
|
|
||||||
|
"""
|
||||||
return [
|
return [
|
||||||
plugin.ExchangeTopics(
|
plugin.ExchangeTopics(
|
||||||
exchange=conf.quantum_control_exchange,
|
exchange=conf.quantum_control_exchange,
|
||||||
|
@ -51,7 +51,8 @@ class NotificationBase(PluginBase):
|
|||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def get_event_types(self):
|
def get_event_types(self):
|
||||||
"""Return a sequence of strings defining the event types to be
|
"""Return a sequence of strings defining the event types to be
|
||||||
given to this plugin."""
|
given to this plugin.
|
||||||
|
"""
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def get_exchange_topics(self, conf):
|
def get_exchange_topics(self, conf):
|
||||||
@ -65,7 +66,8 @@ class NotificationBase(PluginBase):
|
|||||||
def process_notification(self, message):
|
def process_notification(self, message):
|
||||||
"""Return a sequence of Counter instances for the given message.
|
"""Return a sequence of Counter instances for the given message.
|
||||||
|
|
||||||
:param message: Message to process."""
|
:param message: Message to process.
|
||||||
|
"""
|
||||||
|
|
||||||
def notification_to_metadata(self, event):
|
def notification_to_metadata(self, event):
|
||||||
"""Transform a payload dict to a metadata dict."""
|
"""Transform a payload dict to a metadata dict."""
|
||||||
@ -87,5 +89,6 @@ class PollsterBase(PluginBase):
|
|||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def get_counters(self, manager, instance):
|
def get_counters(self, manager, instance):
|
||||||
"""Return a sequence of Counter instances from polling the
|
"""Return a sequence of Counter instances from polling the resources.
|
||||||
resources."""
|
|
||||||
|
"""
|
||||||
|
@ -65,5 +65,6 @@ class TransformerBase(object):
|
|||||||
"""Flush counters cached previously.
|
"""Flush counters cached previously.
|
||||||
|
|
||||||
:param context: Passed from the data collector.
|
:param context: Passed from the data collector.
|
||||||
:param source: Source of counters that are being published."""
|
:param source: Source of counters that are being published.
|
||||||
|
"""
|
||||||
return []
|
return []
|
||||||
|
@ -21,7 +21,9 @@ from ceilometer import transformer
|
|||||||
|
|
||||||
class TransformerAccumulator(transformer.TransformerBase):
|
class TransformerAccumulator(transformer.TransformerBase):
|
||||||
"""Transformer that accumulates counter until a threshold, and then flush
|
"""Transformer that accumulates counter until a threshold, and then flush
|
||||||
them out in the wild. """
|
them out in the wild.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, size=1, **kwargs):
|
def __init__(self, size=1, **kwargs):
|
||||||
if size >= 1:
|
if size >= 1:
|
||||||
|
@ -49,7 +49,8 @@ class _Base(plugin.NotificationBase):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_exchange_topics(conf):
|
def get_exchange_topics(conf):
|
||||||
"""Return a sequence of ExchangeTopics defining the exchange and
|
"""Return a sequence of ExchangeTopics defining the exchange and
|
||||||
topics to be connected for this plugin."""
|
topics to be connected for this plugin.
|
||||||
|
"""
|
||||||
return [
|
return [
|
||||||
plugin.ExchangeTopics(
|
plugin.ExchangeTopics(
|
||||||
exchange=conf.cinder_control_exchange,
|
exchange=conf.cinder_control_exchange,
|
||||||
|
@ -174,7 +174,8 @@ class TestPostSamples(FunctionalTest):
|
|||||||
def test_multiple_samples_some_null_sources(self):
|
def test_multiple_samples_some_null_sources(self):
|
||||||
"""Do accept a single post with some null sources
|
"""Do accept a single post with some null sources
|
||||||
this is a convience feature so you only have to set
|
this is a convience feature so you only have to set
|
||||||
one of the sample's source field."""
|
one of the sample's source field.
|
||||||
|
"""
|
||||||
s1 = [{'counter_name': 'my_counter_name',
|
s1 = [{'counter_name': 'my_counter_name',
|
||||||
'counter_type': 'gauge',
|
'counter_type': 'gauge',
|
||||||
'counter_unit': 'instance',
|
'counter_unit': 'instance',
|
||||||
|
2
tox.ini
2
tox.ini
@ -40,7 +40,7 @@ deps = -r{toxinidir}/requirements.txt
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E125,F403,H301,H302,H304,H306,H401,H402,H403
|
ignore = E125,F403,H301,H302,H304,H306,H401,H402
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,nova_tests
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,nova_tests
|
||||||
show-source = True
|
show-source = True
|
||||||
|
Loading…
Reference in New Issue
Block a user