Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
synnefo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
synnefo
Commits
46fa9093
Commit
46fa9093
authored
Feb 10, 2014
by
Ilias Tsitsimpis
Committed by
Giorgos Korfiatis
Feb 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
burnin: Change pylint disable-msg pragmas
'disable-msg' has been deprecated in favor of 'disable'.
parent
f73bc78c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
31 additions
and
30 deletions
+31
-30
snf-tools/synnefo_tools/burnin/__init__.py
snf-tools/synnefo_tools/burnin/__init__.py
+1
-2
snf-tools/synnefo_tools/burnin/astakos_tests.py
snf-tools/synnefo_tools/burnin/astakos_tests.py
+1
-1
snf-tools/synnefo_tools/burnin/common.py
snf-tools/synnefo_tools/burnin/common.py
+15
-12
snf-tools/synnefo_tools/burnin/cyclades_common.py
snf-tools/synnefo_tools/burnin/cyclades_common.py
+3
-3
snf-tools/synnefo_tools/burnin/images_tests.py
snf-tools/synnefo_tools/burnin/images_tests.py
+2
-2
snf-tools/synnefo_tools/burnin/logger.py
snf-tools/synnefo_tools/burnin/logger.py
+1
-1
snf-tools/synnefo_tools/burnin/network_tests.py
snf-tools/synnefo_tools/burnin/network_tests.py
+1
-1
snf-tools/synnefo_tools/burnin/pithos_tests.py
snf-tools/synnefo_tools/burnin/pithos_tests.py
+1
-1
snf-tools/synnefo_tools/burnin/server_tests.py
snf-tools/synnefo_tools/burnin/server_tests.py
+3
-4
snf-tools/synnefo_tools/burnin/stale_tests.py
snf-tools/synnefo_tools/burnin/stale_tests.py
+3
-3
No files found.
snf-tools/synnefo_tools/burnin/__init__.py
View file @
46fa9093
...
...
@@ -92,8 +92,7 @@ def parse_arguments(args):
kwargs
[
"description"
]
=
\
"%prog runs a number of test scenarios on a Synnefo deployment."
# Used * or ** magic. pylint: disable-msg=W0142
parser
=
optparse
.
OptionParser
(
**
kwargs
)
parser
=
optparse
.
OptionParser
(
**
kwargs
)
# pylint: disable=star-args
parser
.
disable_interspersed_args
()
parser
.
add_option
(
...
...
snf-tools/synnefo_tools/burnin/astakos_tests.py
View file @
46fa9093
...
...
@@ -42,7 +42,7 @@ from kamaki.clients import ClientError
from
synnefo_tools.burnin
import
common
#
Too many public methods. pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
AstakosTestSuite
(
common
.
BurninTests
):
"""Test Astakos functionality"""
def
test_001_unauthorized_access
(
self
):
...
...
snf-tools/synnefo_tools/burnin/common.py
View file @
46fa9093
...
...
@@ -54,8 +54,8 @@ from synnefo_tools.burnin.logger import Log
# --------------------------------------------------------------------
# Global variables
logger
=
None
#
Invalid constant name. pylint: disable-msg=C0103
success
=
None
#
Invalid constant name. pylint: disable-msg=C0103
logger
=
None
#
pylint: disable=invalid-name
success
=
None
#
pylint: disable=invalid-name
SNF_TEST_PREFIX
=
"snf-test-"
CONNECTION_RETRY_LIMIT
=
2
SYSTEM_USERS
=
[
"images@okeanos.grnet.gr"
,
"images@demo.synnefo.org"
]
...
...
@@ -79,7 +79,7 @@ class BurninTestResult(unittest.TestResult):
super
(
BurninTestResult
,
self
).
startTest
(
test
)
logger
.
log
(
test
.
__class__
.
__name__
,
test
.
shortDescription
())
#
Method could be a function. pylint: disable-msg=R0201
#
pylint: disable=no-self-use
def
_test_failed
(
self
,
test
,
err
):
"""Test failed"""
# Get class name
...
...
@@ -108,8 +108,8 @@ class BurninTestResult(unittest.TestResult):
# --------------------------------------------------------------------
# Helper Classes
#
Too few public methods. pylint: disable-msg=R0903
#
Too many instance attributes. pylint: disable-msg=R0902
#
pylint: disable=too-few-public-methods
#
pylint: disable=too-many-instance-attributes
class
Clients
(
object
):
"""Our kamaki clients"""
auth_url
=
None
...
...
@@ -186,7 +186,7 @@ class Proper(object):
# --------------------------------------------------------------------
# BurninTests class
#
Too many public methods (45/20). pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
BurninTests
(
unittest
.
TestCase
):
"""Common class that all burnin tests should implement"""
clients
=
Clients
()
...
...
@@ -245,7 +245,7 @@ class BurninTests(unittest.TestCase):
def
_run_tests
(
self
,
tcases
):
"""Run some generated testcases"""
global
success
#
Using global. pylint: disable-msg=C0103,W0603,W0602
global
success
#
pylint: disable=invalid-name, global-statement
for
tcase
in
tcases
:
self
.
info
(
"Running testsuite %s"
,
tcase
.
__name__
)
...
...
@@ -514,8 +514,8 @@ class BurninTests(unittest.TestCase):
self
.
info
(
"Getting quotas"
)
return
dict
(
self
.
clients
.
astakos
.
get_quotas
())
#
Invalid argument name. pylint: disable-msg=C0103
#
Too many arguments. pylint: disable-msg=R0913
#
pylint: disable=invalid-name
#
pylint: disable=too-many-arguments
def
_check_quotas
(
self
,
puuid
=
None
,
disk
=
None
,
vm
=
None
,
diskspace
=
None
,
ram
=
None
,
ip
=
None
,
cpu
=
None
,
network
=
None
):
"""Check that quotas' changes are consistent
...
...
@@ -605,7 +605,7 @@ def initialize(opts, testsuites, stale_testsuites):
"""
# Initialize logger
global
logger
#
Using global statement. pylint: disable-msg=C0103,W0603
global
logger
#
pylint: disable=invalid-name, global-statement
curr_time
=
datetime
.
datetime
.
now
()
logger
=
Log
(
opts
.
log_folder
,
verbose
=
opts
.
verbose
,
use_colors
=
opts
.
use_colors
,
in_parallel
=
False
,
...
...
@@ -647,7 +647,8 @@ def initialize(opts, testsuites, stale_testsuites):
# Run Burnin
def
run_burnin
(
testsuites
,
failfast
=
False
):
"""Run burnin testsuites"""
# Using global. pylint: disable-msg=C0103,W0603,W0602
# pylint: disable=invalid-name,global-statement
# pylint: disable=global-variable-not-assigned
global
logger
,
success
success
=
True
...
...
@@ -662,7 +663,9 @@ def run_burnin(testsuites, failfast=False):
def
run_tests
(
tcases
,
failfast
=
False
):
"""Run some testcases"""
global
success
# Using global. pylint: disable-msg=C0103,W0603,W0602
# pylint: disable=invalid-name,global-statement
# pylint: disable=global-variable-not-assigned
global
success
for
tcase
in
tcases
:
was_success
=
run_test
(
tcase
)
...
...
snf-tools/synnefo_tools/burnin/cyclades_common.py
View file @
46fa9093
...
...
@@ -52,7 +52,7 @@ from kamaki.clients import ClientError
from
synnefo_tools.burnin.common
import
BurninTests
,
MB
,
GB
#
Too many public methods. pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
CycladesTests
(
BurninTests
):
"""Extends the BurninTests class for Cyclades"""
def
_try_until_timeout_expires
(
self
,
opmsg
,
check_fun
):
...
...
@@ -356,7 +356,7 @@ class CycladesTests(BurninTests):
d_image
=
self
.
clients
.
cyclades
.
get_image_details
(
image
[
'id'
])
return
d_image
[
'metadata'
][
'osfamily'
].
lower
().
find
(
osfamily
)
>=
0
#
Method could be a function. pylint: disable-msg=R0201
#
pylint: disable=no-self-use
def
_ssh_execute
(
self
,
hostip
,
username
,
password
,
command
):
"""Execute a command via ssh"""
ssh
=
paramiko
.
SSHClient
()
...
...
@@ -393,7 +393,7 @@ class CycladesTests(BurninTests):
self
.
info
(
"Server's hostname is %s"
,
hostname
)
return
hostname
#
Too many arguments. pylint: disable-msg=R0913
#
pylint: disable=too-many-arguments
def
_check_file_through_ssh
(
self
,
hostip
,
username
,
password
,
remotepath
,
content
):
"""Fetch file from server and compare contents"""
...
...
snf-tools/synnefo_tools/burnin/images_tests.py
View file @
46fa9093
...
...
@@ -45,7 +45,7 @@ from kamaki.clients import ClientError
from
synnefo_tools.burnin.common
import
BurninTests
,
Proper
#
Too many public methods. pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
FlavorsTestSuite
(
BurninTests
):
"""Test flavor lists for consistency"""
simple_flavors
=
Proper
(
value
=
None
)
...
...
@@ -89,7 +89,7 @@ class FlavorsTestSuite(BurninTests):
# --------------------------------------------------------------------
#
Too many public methods. pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
ImagesTestSuite
(
BurninTests
):
"""Test image lists for consistency"""
simple_images
=
Proper
(
value
=
None
)
...
...
snf-tools/synnefo_tools/burnin/logger.py
View file @
46fa9093
...
...
@@ -220,7 +220,7 @@ class Log(object):
"""
# ----------------------------------
#
Too many arguments. pylint: disable-msg=R0913
#
pylint: disable=too-many-arguments
def
__init__
(
self
,
output_dir
,
verbose
=
1
,
use_colors
=
True
,
in_parallel
=
False
,
log_level
=
0
,
curr_time
=
None
):
"""Initialize our loggers
...
...
snf-tools/synnefo_tools/burnin/network_tests.py
View file @
46fa9093
...
...
@@ -42,7 +42,7 @@ from synnefo_tools.burnin.common import Proper
from
synnefo_tools.burnin.cyclades_common
import
CycladesTests
#
Too many public methods. pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
NetworkTestSuite
(
CycladesTests
):
"""Test Networking in Cyclades"""
avail_images
=
Proper
(
value
=
None
)
...
...
snf-tools/synnefo_tools/burnin/pithos_tests.py
View file @
46fa9093
...
...
@@ -43,7 +43,7 @@ import tempfile
from
synnefo_tools.burnin.common
import
BurninTests
,
Proper
#
Too many public methods. pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
PithosTestSuite
(
BurninTests
):
"""Test Pithos functionality"""
containers
=
Proper
(
value
=
None
)
...
...
snf-tools/synnefo_tools/burnin/server_tests.py
View file @
46fa9093
...
...
@@ -48,8 +48,7 @@ from synnefo_tools.burnin.common import BurninTests, Proper
from
synnefo_tools.burnin.cyclades_common
import
CycladesTests
# Too many public methods. pylint: disable-msg=R0904
# Too many instance attributes. pylint: disable-msg=R0902
# pylint: disable=too-many-public-methods,too-many-instance-attributes
# This class gets replicated into actual TestCases dynamically
class
GeneratedServerTestSuite
(
CycladesTests
):
"""Test Spawning Serverfunctionality"""
...
...
@@ -248,7 +247,7 @@ class GeneratedServerTestSuite(CycladesTests):
socket
.
AF_INET
,
self
.
ipv4
[
0
],
3389
)
# No actual RDP processing done. We assume the RDP server is there
# if the connection to the RDP port is successful.
# pylint: disable
-msg=W0511
# pylint: disable
=fixme
# FIXME: Use rdesktop, analyze exit code? see manpage
sock
.
close
()
...
...
@@ -261,7 +260,7 @@ class GeneratedServerTestSuite(CycladesTests):
socket
.
AF_INET
,
self
.
ipv6
[
0
],
3389
)
# No actual RDP processing done. We assume the RDP server is there
# if the connection to the RDP port is successful.
# pylint: disable
-msg=W0511
# pylint: disable
=fixme
# FIXME: Use rdesktop, analyze exit code? see manpage
sock
.
close
()
...
...
snf-tools/synnefo_tools/burnin/stale_tests.py
View file @
46fa9093
...
...
@@ -40,7 +40,7 @@ from synnefo_tools.burnin.common import Proper, SNF_TEST_PREFIX
from
synnefo_tools.burnin.cyclades_common
import
CycladesTests
#
Too many public methods. pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
StaleServersTestSuite
(
CycladesTests
):
"""Handle stale Servers"""
stale_servers
=
Proper
(
value
=
None
)
...
...
@@ -72,7 +72,7 @@ class StaleServersTestSuite(CycladesTests):
self
.
_delete_servers
(
self
.
stale_servers
,
error
=
True
)
#
Too many public methods. pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
StaleFloatingIPsTestSuite
(
CycladesTests
):
"""Handle stale Floating IPs"""
stale_ips
=
Proper
(
value
=
None
)
...
...
@@ -107,7 +107,7 @@ class StaleFloatingIPsTestSuite(CycladesTests):
self
.
_delete_floating_ips
(
self
.
stale_ips
)
#
Too many public methods. pylint: disable-msg=R0904
#
pylint: disable=too-many-public-methods
class
StaleNetworksTestSuite
(
CycladesTests
):
"""Handle stale Networks"""
stale_networks
=
Proper
(
value
=
None
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment