Revision 9355a604

b/snf-tools/synnefo_tools/burnin/__init__.py
92 92
    kwargs["description"] = \
93 93
        "%prog runs a number of test scenarios on a Synnefo deployment."
94 94

  
95
    # Used * or ** magic. pylint: disable-msg=W0142
96
    parser = optparse.OptionParser(**kwargs)
95
    parser = optparse.OptionParser(**kwargs)  # pylint: disable=star-args
97 96
    parser.disable_interspersed_args()
98 97

  
99 98
    parser.add_option(
b/snf-tools/synnefo_tools/burnin/astakos_tests.py
42 42
from synnefo_tools.burnin import common
43 43

  
44 44

  
45
# Too many public methods. pylint: disable-msg=R0904
45
# pylint: disable=too-many-public-methods
46 46
class AstakosTestSuite(common.BurninTests):
47 47
    """Test Astakos functionality"""
48 48
    def test_001_unauthorized_access(self):
b/snf-tools/synnefo_tools/burnin/common.py
54 54

  
55 55
# --------------------------------------------------------------------
56 56
# Global variables
57
logger = None   # Invalid constant name. pylint: disable-msg=C0103
58
success = None  # Invalid constant name. pylint: disable-msg=C0103
57
logger = None   # pylint: disable=invalid-name
58
success = None  # pylint: disable=invalid-name
59 59
SNF_TEST_PREFIX = "snf-test-"
60 60
CONNECTION_RETRY_LIMIT = 2
61 61
SYSTEM_USERS = ["images@okeanos.grnet.gr", "images@demo.synnefo.org"]
......
79 79
        super(BurninTestResult, self).startTest(test)
80 80
        logger.log(test.__class__.__name__, test.shortDescription())
81 81

  
82
    # Method could be a function. pylint: disable-msg=R0201
82
    # pylint: disable=no-self-use
83 83
    def _test_failed(self, test, err):
84 84
        """Test failed"""
85 85
        # Get class name
......
108 108

  
109 109
# --------------------------------------------------------------------
110 110
# Helper Classes
111
# Too few public methods. pylint: disable-msg=R0903
112
# Too many instance attributes. pylint: disable-msg=R0902
111
# pylint: disable=too-few-public-methods
112
# pylint: disable=too-many-instance-attributes
113 113
class Clients(object):
114 114
    """Our kamaki clients"""
115 115
    auth_url = None
......
186 186

  
187 187
# --------------------------------------------------------------------
188 188
# BurninTests class
189
# Too many public methods (45/20). pylint: disable-msg=R0904
189
# pylint: disable=too-many-public-methods
190 190
class BurninTests(unittest.TestCase):
191 191
    """Common class that all burnin tests should implement"""
192 192
    clients = Clients()
......
245 245

  
246 246
    def _run_tests(self, tcases):
247 247
        """Run some generated testcases"""
248
        global success  # Using global. pylint: disable-msg=C0103,W0603,W0602
248
        global success  # pylint: disable=invalid-name, global-statement
249 249

  
250 250
        for tcase in tcases:
251 251
            self.info("Running testsuite %s", tcase.__name__)
......
514 514
        self.info("Getting quotas")
515 515
        return dict(self.clients.astakos.get_quotas())
516 516

  
517
    # Invalid argument name. pylint: disable-msg=C0103
518
    # Too many arguments. pylint: disable-msg=R0913
517
    # pylint: disable=invalid-name
518
    # pylint: disable=too-many-arguments
519 519
    def _check_quotas(self, puuid=None, disk=None, vm=None, diskspace=None,
520 520
                      ram=None, ip=None, cpu=None, network=None):
521 521
        """Check that quotas' changes are consistent
......
605 605

  
606 606
    """
607 607
    # Initialize logger
608
    global logger  # Using global statement. pylint: disable-msg=C0103,W0603
608
    global logger  # pylint: disable=invalid-name, global-statement
609 609
    curr_time = datetime.datetime.now()
610 610
    logger = Log(opts.log_folder, verbose=opts.verbose,
611 611
                 use_colors=opts.use_colors, in_parallel=False,
......
647 647
# Run Burnin
648 648
def run_burnin(testsuites, failfast=False):
649 649
    """Run burnin testsuites"""
650
    # Using global. pylint: disable-msg=C0103,W0603,W0602
650
    # pylint: disable=invalid-name,global-statement
651
    # pylint: disable=global-variable-not-assigned
651 652
    global logger, success
652 653

  
653 654
    success = True
......
662 663

  
663 664
def run_tests(tcases, failfast=False):
664 665
    """Run some testcases"""
665
    global success  # Using global. pylint: disable-msg=C0103,W0603,W0602
666
    # pylint: disable=invalid-name,global-statement
667
    # pylint: disable=global-variable-not-assigned
668
    global success
666 669

  
667 670
    for tcase in tcases:
668 671
        was_success = run_test(tcase)
b/snf-tools/synnefo_tools/burnin/cyclades_common.py
52 52
from synnefo_tools.burnin.common import BurninTests, MB, GB
53 53

  
54 54

  
55
# Too many public methods. pylint: disable-msg=R0904
55
# pylint: disable=too-many-public-methods
56 56
class CycladesTests(BurninTests):
57 57
    """Extends the BurninTests class for Cyclades"""
58 58
    def _try_until_timeout_expires(self, opmsg, check_fun):
......
356 356
        d_image = self.clients.cyclades.get_image_details(image['id'])
357 357
        return d_image['metadata']['osfamily'].lower().find(osfamily) >= 0
358 358

  
359
    # Method could be a function. pylint: disable-msg=R0201
359
    # pylint: disable=no-self-use
360 360
    def _ssh_execute(self, hostip, username, password, command):
361 361
        """Execute a command via ssh"""
362 362
        ssh = paramiko.SSHClient()
......
393 393
        self.info("Server's hostname is %s", hostname)
394 394
        return hostname
395 395

  
396
    # Too many arguments. pylint: disable-msg=R0913
396
    # pylint: disable=too-many-arguments
397 397
    def _check_file_through_ssh(self, hostip, username, password,
398 398
                                remotepath, content):
399 399
        """Fetch file from server and compare contents"""
b/snf-tools/synnefo_tools/burnin/images_tests.py
45 45
from synnefo_tools.burnin.common import BurninTests, Proper
46 46

  
47 47

  
48
# Too many public methods. pylint: disable-msg=R0904
48
# pylint: disable=too-many-public-methods
49 49
class FlavorsTestSuite(BurninTests):
50 50
    """Test flavor lists for consistency"""
51 51
    simple_flavors = Proper(value=None)
......
89 89

  
90 90

  
91 91
# --------------------------------------------------------------------
92
# Too many public methods. pylint: disable-msg=R0904
92
# pylint: disable=too-many-public-methods
93 93
class ImagesTestSuite(BurninTests):
94 94
    """Test image lists for consistency"""
95 95
    simple_images = Proper(value=None)
b/snf-tools/synnefo_tools/burnin/logger.py
220 220

  
221 221
    """
222 222
    # ----------------------------------
223
    # Too many arguments. pylint: disable-msg=R0913
223
    # pylint: disable=too-many-arguments
224 224
    def __init__(self, output_dir, verbose=1, use_colors=True,
225 225
                 in_parallel=False, log_level=0, curr_time=None):
226 226
        """Initialize our loggers
b/snf-tools/synnefo_tools/burnin/network_tests.py
42 42
from synnefo_tools.burnin.cyclades_common import CycladesTests
43 43

  
44 44

  
45
# Too many public methods. pylint: disable-msg=R0904
45
# pylint: disable=too-many-public-methods
46 46
class NetworkTestSuite(CycladesTests):
47 47
    """Test Networking in Cyclades"""
48 48
    avail_images = Proper(value=None)
b/snf-tools/synnefo_tools/burnin/pithos_tests.py
43 43
from synnefo_tools.burnin.common import BurninTests, Proper
44 44

  
45 45

  
46
# Too many public methods. pylint: disable-msg=R0904
46
# pylint: disable=too-many-public-methods
47 47
class PithosTestSuite(BurninTests):
48 48
    """Test Pithos functionality"""
49 49
    containers = Proper(value=None)
b/snf-tools/synnefo_tools/burnin/server_tests.py
48 48
from synnefo_tools.burnin.cyclades_common import CycladesTests
49 49

  
50 50

  
51
# Too many public methods. pylint: disable-msg=R0904
52
# Too many instance attributes. pylint: disable-msg=R0902
51
# pylint: disable=too-many-public-methods,too-many-instance-attributes
53 52
# This class gets replicated into actual TestCases dynamically
54 53
class GeneratedServerTestSuite(CycladesTests):
55 54
    """Test Spawning Serverfunctionality"""
......
248 247
            socket.AF_INET, self.ipv4[0], 3389)
249 248
        # No actual RDP processing done. We assume the RDP server is there
250 249
        # if the connection to the RDP port is successful.
251
        # pylint: disable-msg=W0511
250
        # pylint: disable=fixme
252 251
        # FIXME: Use rdesktop, analyze exit code? see manpage
253 252
        sock.close()
254 253

  
......
261 260
            socket.AF_INET, self.ipv6[0], 3389)
262 261
        # No actual RDP processing done. We assume the RDP server is there
263 262
        # if the connection to the RDP port is successful.
264
        # pylint: disable-msg=W0511
263
        # pylint: disable=fixme
265 264
        # FIXME: Use rdesktop, analyze exit code? see manpage
266 265
        sock.close()
267 266

  
b/snf-tools/synnefo_tools/burnin/stale_tests.py
40 40
from synnefo_tools.burnin.cyclades_common import CycladesTests
41 41

  
42 42

  
43
# Too many public methods. pylint: disable-msg=R0904
43
# pylint: disable=too-many-public-methods
44 44
class StaleServersTestSuite(CycladesTests):
45 45
    """Handle stale Servers"""
46 46
    stale_servers = Proper(value=None)
......
72 72
            self._delete_servers(self.stale_servers, error=True)
73 73

  
74 74

  
75
# Too many public methods. pylint: disable-msg=R0904
75
# pylint: disable=too-many-public-methods
76 76
class StaleFloatingIPsTestSuite(CycladesTests):
77 77
    """Handle stale Floating IPs"""
78 78
    stale_ips = Proper(value=None)
......
107 107
            self._delete_floating_ips(self.stale_ips)
108 108

  
109 109

  
110
# Too many public methods. pylint: disable-msg=R0904
110
# pylint: disable=too-many-public-methods
111 111
class StaleNetworksTestSuite(CycladesTests):
112 112
    """Handle stale Networks"""
113 113
    stale_networks = Proper(value=None)

Also available in: Unified diff