summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorMichael Gundlach <michael.gundlach@rackspace.com>2010-08-18 16:28:27 +0000
committerTarmac <>2010-08-18 16:28:27 +0000
commit663667cdcf1bd16be33dc9b993123b7fc566caed (patch)
tree102289b0f30b6bd0d83ccee8196c013881bf45f1 /nova
parent018ce9abbfb7047eff1e99379fba098a365e89eb (diff)
parent7cd16b5754a38257d6b492bc29e6f99f2537f11a (diff)
downloadnova-663667cdcf1bd16be33dc9b993123b7fc566caed.tar.gz
nova-663667cdcf1bd16be33dc9b993123b7fc566caed.tar.xz
nova-663667cdcf1bd16be33dc9b993123b7fc566caed.zip
Since pylint=0.19 is our version, force everyone to use the disable-msg syntax.
Diffstat (limited to 'nova')
-rw-r--r--nova/network/linux_net.py4
-rw-r--r--nova/network/model.py8
-rw-r--r--nova/network/service.py2
-rw-r--r--nova/network/vpn.py2
-rw-r--r--nova/rpc.py8
-rw-r--r--nova/tests/network_unittest.py4
-rw-r--r--nova/tests/rpc_unittest.py2
-rw-r--r--nova/wsgi.py4
8 files changed, 17 insertions, 17 deletions
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
index a5014b2cb..9e5aabd97 100644
--- a/nova/network/linux_net.py
+++ b/nova/network/linux_net.py
@@ -154,7 +154,7 @@ def start_dnsmasq(network):
try:
os.kill(pid, signal.SIGHUP)
return
- except Exception as exc: # pylint: disable=W0703
+ except Exception as exc: # pylint: disable-msg=W0703
logging.debug("Hupping dnsmasq threw %s", exc)
# FLAGFILE and DNSMASQ_INTERFACE in env
@@ -170,7 +170,7 @@ def stop_dnsmasq(network):
if pid:
try:
os.kill(pid, signal.SIGTERM)
- except Exception as exc: # pylint: disable=W0703
+ except Exception as exc: # pylint: disable-msg=W0703
logging.debug("Killing dnsmasq threw %s", exc)
diff --git a/nova/network/model.py b/nova/network/model.py
index d3a6a6552..6e4fcc47e 100644
--- a/nova/network/model.py
+++ b/nova/network/model.py
@@ -59,7 +59,7 @@ logging.getLogger().setLevel(logging.DEBUG)
class Vlan(datastore.BasicModel):
"""Tracks vlans assigned to project it the datastore"""
- def __init__(self, project, vlan): # pylint: disable=W0231
+ def __init__(self, project, vlan): # pylint: disable-msg=W0231
"""
Since we don't want to try and find a vlan by its identifier,
but by a project id, we don't call super-init.
@@ -161,7 +161,7 @@ class FixedIp(datastore.BasicModel):
'state': 'none'}
@classmethod
- # pylint: disable=R0913
+ # pylint: disable-msg=R0913
def create(cls, user_id, project_id, address, mac, hostname, network_id):
"""Creates an FixedIp object"""
addr = cls(address)
@@ -215,7 +215,7 @@ class BaseNetwork(datastore.BasicModel):
return {'network_id': self.network_id, 'network_str': self.network_str}
@classmethod
- # pylint: disable=R0913
+ # pylint: disable-msg=R0913
def create(cls, user_id, project_id, security_group, vlan, network_str):
"""Create a BaseNetwork object"""
network_id = "%s:%s" % (project_id, security_group)
@@ -268,7 +268,7 @@ class BaseNetwork(datastore.BasicModel):
"""Returns the project associated with this network"""
return manager.AuthManager().get_project(self['project_id'])
- # pylint: disable=R0913
+ # pylint: disable-msg=R0913
def _add_host(self, user_id, project_id, ip_address, mac, hostname):
"""Add a host to the datastore"""
self.address_class.create(user_id, project_id, ip_address,
diff --git a/nova/network/service.py b/nova/network/service.py
index da102a056..d3aa1c46f 100644
--- a/nova/network/service.py
+++ b/nova/network/service.py
@@ -195,7 +195,7 @@ class VlanNetworkService(BaseNetworkService):
# simplified and improved. Also there it may be useful
# to support vlans separately from dhcp, instead of having
# both of them together in this class.
- # pylint: disable=W0221
+ # pylint: disable-msg=W0221
def allocate_fixed_ip(self,
user_id,
project_id,
diff --git a/nova/network/vpn.py b/nova/network/vpn.py
index cf2579e61..85366ed89 100644
--- a/nova/network/vpn.py
+++ b/nova/network/vpn.py
@@ -105,7 +105,7 @@ class NetworkData(datastore.BasicModel):
return datastore.Redis.instance().scard('ip:%s:ports' % vpn_ip)
@property
- def ip(self): # pylint: disable=C0103
+ def ip(self): # pylint: disable-msg=C0103
"""The ip assigned to the project"""
return self['ip']
diff --git a/nova/rpc.py b/nova/rpc.py
index 824a66b5b..84a9b5590 100644
--- a/nova/rpc.py
+++ b/nova/rpc.py
@@ -59,7 +59,7 @@ class Connection(carrot_connection.BrokerConnection):
params['backend_cls'] = fakerabbit.Backend
# NOTE(vish): magic is fun!
- # pylint: disable=W0142
+ # pylint: disable-msg=W0142
cls._instance = cls(**params)
return cls._instance
@@ -104,7 +104,7 @@ class Consumer(messaging.Consumer):
if self.failed_connection:
# NOTE(vish): conn is defined in the parent class, we can
# recreate it as long as we create the backend too
- # pylint: disable=W0201
+ # pylint: disable-msg=W0201
self.conn = Connection.recreate()
self.backend = self.conn.create_backend()
super(Consumer, self).fetch(no_ack, auto_ack, enable_callbacks)
@@ -114,7 +114,7 @@ class Consumer(messaging.Consumer):
# NOTE(vish): This is catching all errors because we really don't
# exceptions to be logged 10 times a second if some
# persistent failure occurs.
- except Exception: # pylint: disable=W0703
+ except Exception: # pylint: disable-msg=W0703
if not self.failed_connection:
logging.exception("Failed to fetch message from queue")
self.failed_connection = True
@@ -178,7 +178,7 @@ class AdapterConsumer(TopicConsumer):
node_func = getattr(self.proxy, str(method))
node_args = dict((str(k), v) for k, v in args.iteritems())
# NOTE(vish): magic is fun!
- # pylint: disable=W0142
+ # pylint: disable-msg=W0142
d = defer.maybeDeferred(node_func, **node_args)
if msg_id:
d.addCallback(lambda rval: msg_reply(msg_id, rval, None))
diff --git a/nova/tests/network_unittest.py b/nova/tests/network_unittest.py
index 039509809..993bfacc2 100644
--- a/nova/tests/network_unittest.py
+++ b/nova/tests/network_unittest.py
@@ -36,7 +36,7 @@ FLAGS = flags.FLAGS
class NetworkTestCase(test.TrialTestCase):
"""Test cases for network code"""
- def setUp(self): # pylint: disable=C0103
+ def setUp(self): # pylint: disable-msg=C0103
super(NetworkTestCase, self).setUp()
# NOTE(vish): if you change these flags, make sure to change the
# flags in the corresponding section in nova-dhcpbridge
@@ -60,7 +60,7 @@ class NetworkTestCase(test.TrialTestCase):
vpn.NetworkData.create(self.projects[i].id)
self.service = service.VlanNetworkService()
- def tearDown(self): # pylint: disable=C0103
+ def tearDown(self): # pylint: disable-msg=C0103
super(NetworkTestCase, self).tearDown()
for project in self.projects:
self.manager.delete_project(project)
diff --git a/nova/tests/rpc_unittest.py b/nova/tests/rpc_unittest.py
index 764a97416..e12a28fbc 100644
--- a/nova/tests/rpc_unittest.py
+++ b/nova/tests/rpc_unittest.py
@@ -32,7 +32,7 @@ FLAGS = flags.FLAGS
class RpcTestCase(test.BaseTestCase):
"""Test cases for rpc"""
- def setUp(self): # pylint: disable=C0103
+ def setUp(self): # pylint: disable-msg=C0103
super(RpcTestCase, self).setUp()
self.conn = rpc.Connection.instance()
self.receiver = TestReceiver()
diff --git a/nova/wsgi.py b/nova/wsgi.py
index a0a175dc7..fd87afe6e 100644
--- a/nova/wsgi.py
+++ b/nova/wsgi.py
@@ -83,7 +83,7 @@ class Application(object):
raise NotImplementedError("You must implement __call__")
-class Middleware(Application): # pylint: disable=W0223
+class Middleware(Application): # pylint: disable-msg=W0223
"""
Base WSGI middleware wrapper. These classes require an application to be
initialized that will be called next. By default the middleware will
@@ -91,7 +91,7 @@ class Middleware(Application): # pylint: disable=W0223
behavior.
"""
- def __init__(self, application): # pylint: disable=W0231
+ def __init__(self, application): # pylint: disable-msg=W0231
self.application = application
@webob.dec.wsgify