Use comments rather than no-op string statements
This change replaces a few no-op string statements with regular comments. While there was no harm in the previous use of strings for comments, this allows us to re-enable the corresponding pylint check which may catch genuinely unintended cases. Change-Id: I796a059292e26c4df75c54f095d9e20e99187c98
This commit is contained in:
parent
8e12f3ca41
commit
713cbd5708
@ -47,7 +47,6 @@ disable=
|
|||||||
logging-not-lazy,
|
logging-not-lazy,
|
||||||
no-init,
|
no-init,
|
||||||
non-parent-init-called,
|
non-parent-init-called,
|
||||||
pointless-string-statement,
|
|
||||||
protected-access,
|
protected-access,
|
||||||
redefined-builtin,
|
redefined-builtin,
|
||||||
redefined-outer-name,
|
redefined-outer-name,
|
||||||
|
@ -16,20 +16,17 @@ import re
|
|||||||
|
|
||||||
import pep8
|
import pep8
|
||||||
|
|
||||||
"""
|
# Guidelines for writing new hacking checks
|
||||||
Guidelines for writing new hacking checks
|
#
|
||||||
|
# - Use only for Neutron specific tests. OpenStack general tests
|
||||||
- Use only for Neutron specific tests. OpenStack general tests
|
# should be submitted to the common 'hacking' module.
|
||||||
should be submitted to the common 'hacking' module.
|
# - Pick numbers in the range N3xx. Find the current test with
|
||||||
- Pick numbers in the range N3xx. Find the current test with
|
# the highest allocated number and then pick the next value.
|
||||||
the highest allocated number and then pick the next value.
|
# - Keep the test method code in the source file ordered based
|
||||||
- Keep the test method code in the source file ordered based
|
# on the N3xx value.
|
||||||
on the N3xx value.
|
# - List the new rule in the top level HACKING.rst file
|
||||||
- List the new rule in the top level HACKING.rst file
|
# - Add test cases for each new rule to
|
||||||
- Add test cases for each new rule to
|
# neutron/tests/unit/test_hacking.py
|
||||||
neutron/tests/unit/test_hacking.py
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
log_translation = re.compile(
|
log_translation = re.compile(
|
||||||
r"(.)*LOG\.(audit|error|info|warn|warning|critical|exception)\(\s*('|\")")
|
r"(.)*LOG\.(audit|error|info|warn|warning|critical|exception)\(\s*('|\")")
|
||||||
|
@ -123,9 +123,9 @@ class PluginV2(db_base_plugin_v2.NeutronDbPluginV2):
|
|||||||
"""
|
"""
|
||||||
base.FAULT_MAP.update(self.CISCO_FAULT_MAP)
|
base.FAULT_MAP.update(self.CISCO_FAULT_MAP)
|
||||||
|
|
||||||
"""
|
#
|
||||||
Extension API implementation
|
# Extension API implementation
|
||||||
"""
|
#
|
||||||
def get_all_qoss(self, tenant_id):
|
def get_all_qoss(self, tenant_id):
|
||||||
"""Get all QoS levels."""
|
"""Get all QoS levels."""
|
||||||
LOG.debug("get_all_qoss() called")
|
LOG.debug("get_all_qoss() called")
|
||||||
|
@ -590,7 +590,7 @@ class MidonetPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
|||||||
LOG.debug("MidonetPluginV2.get_port called: id=%(id)s "
|
LOG.debug("MidonetPluginV2.get_port called: id=%(id)s "
|
||||||
"fields=%(fields)r", {'id': id, 'fields': fields})
|
"fields=%(fields)r", {'id': id, 'fields': fields})
|
||||||
port = super(MidonetPluginV2, self).get_port(context, id, fields)
|
port = super(MidonetPluginV2, self).get_port(context, id, fields)
|
||||||
"Check if the port exists in MidoNet DB"""
|
# Check if the port exists in MidoNet DB
|
||||||
try:
|
try:
|
||||||
self.client.get_port(id)
|
self.client.get_port(id)
|
||||||
except midonet_lib.MidonetResourceNotFound as exc:
|
except midonet_lib.MidonetResourceNotFound as exc:
|
||||||
|
@ -16,14 +16,14 @@
|
|||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
""" Arista ML2 Mechanism driver specific configuration knobs.
|
|
||||||
|
|
||||||
Following are user configurable options for Arista ML2 Mechanism
|
# Arista ML2 Mechanism driver specific configuration knobs.
|
||||||
driver. The eapi_username, eapi_password, and eapi_host are
|
#
|
||||||
required options. Region Name must be the same that is used by
|
# Following are user configurable options for Arista ML2 Mechanism
|
||||||
Keystone service. This option is available to support multiple
|
# driver. The eapi_username, eapi_password, and eapi_host are
|
||||||
OpenStack/Neutron controllers.
|
# required options. Region Name must be the same that is used by
|
||||||
"""
|
# Keystone service. This option is available to support multiple
|
||||||
|
# OpenStack/Neutron controllers.
|
||||||
|
|
||||||
ARISTA_DRIVER_OPTS = [
|
ARISTA_DRIVER_OPTS = [
|
||||||
cfg.StrOpt('eapi_username',
|
cfg.StrOpt('eapi_username',
|
||||||
|
@ -16,12 +16,11 @@
|
|||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
"""Freescale CRD Server Configuration used by ML2 Mechanism Driver.
|
# Freescale CRD Server Configuration used by ML2 Mechanism Driver.
|
||||||
|
#
|
||||||
The following configuration is used by Freescale Drivers/Plugin
|
# The following configuration is used by Freescale Drivers/Plugin
|
||||||
like, FWaaS Plugin, VPNaaS Plugin etc.. which connect to Cloud Resource
|
# like, FWaaS Plugin, VPNaaS Plugin etc.. which connect to Cloud Resource
|
||||||
Discovery Service (CRD).
|
# Discovery Service (CRD).
|
||||||
"""
|
|
||||||
|
|
||||||
# CRD service options required for FSL SDN OS Mech Driver
|
# CRD service options required for FSL SDN OS Mech Driver
|
||||||
ml2_fslsdn_opts = [
|
ml2_fslsdn_opts = [
|
||||||
|
@ -19,7 +19,7 @@ from neutron.db import model_base
|
|||||||
from neutron.db import models_v2
|
from neutron.db import models_v2
|
||||||
|
|
||||||
|
|
||||||
"""New mapping tables."""
|
# New mapping tables.
|
||||||
|
|
||||||
|
|
||||||
class OFCId(object):
|
class OFCId(object):
|
||||||
|
@ -749,9 +749,9 @@ class NeutronPluginPLUMgridV2(db_base_plugin_v2.NeutronDbPluginV2,
|
|||||||
except Exception as err_message:
|
except Exception as err_message:
|
||||||
raise plum_excep.PLUMgridException(err_msg=err_message)
|
raise plum_excep.PLUMgridException(err_msg=err_message)
|
||||||
|
|
||||||
"""
|
#
|
||||||
Internal PLUMgrid Functions
|
# Internal PLUMgrid Functions
|
||||||
"""
|
#
|
||||||
|
|
||||||
def _get_plugin_version(self):
|
def _get_plugin_version(self):
|
||||||
return plugin_ver.VERSION
|
return plugin_ver.VERSION
|
||||||
|
Loading…
Reference in New Issue
Block a user