Passed
Pull Request — master (#97)
by
unknown
01:54
created

gmp.xml._GmpCommandFactory.modify_role_command()   A

Complexity

Conditions 5

Size

Total Lines 23
Code Lines 18

Duplication

Lines 23
Ratio 100 %

Importance

Changes 0
Metric Value
cc 5
eloc 18
nop 3
dl 23
loc 23
rs 9.0333
c 0
b 0
f 0
1
# -*- coding: utf-8 -*-
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
coding-style introduced by
Too many lines in module (1697/1000)
Loading history...
2
# Copyright (C) 2018 Greenbone Networks GmbH
3
#
4
# SPDX-License-Identifier: GPL-3.0-or-later
5
#
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
import defusedxml.lxml as secET
20
21
from lxml import etree
22
23
FILTER_NAMES = [
24
    'Agent',
25
    'Alert',
26
    'Asset',
27
    'Config',
28
    'Credential',
29
    'Filter',
30
    'Group',
31
    'Note',
32
    'Override',
33
    'Permission',
34
    'Port List',
35
    'Report',
36
    'Report Format',
37
    'Result',
38
    'Role',
39
    'Schedule',
40
    'SecInfo',
41
    'Tag',
42
    'Target',
43
    'Task',
44
    'User',
45
]
46
47
class XmlCommandElement:
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Unused Code introduced by
The variable __class__ seems to be unused.
Loading history...
48
49
    def __init__(self, element):
50
        self._element = element
51
52
    def add_element(self, name, text=None, attrs=None):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
53
        node = etree.SubElement(self._element, name, attrib=attrs)
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
54
        node.text = text
55
        return XmlCommandElement(node)
56
57
    def set_attribute(self, name, value):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
58
        self._element.set(name, value)
59
60
    def to_string(self):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
61
        return etree.tostring(self._element).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
62
63
    def __str__(self):
64
        return self.to_string()
65
66
67
class XmlCommand(XmlCommandElement):
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Unused Code introduced by
The variable __class__ seems to be unused.
Loading history...
68
69
    def __init__(self, name):
70
        super().__init__(etree.Element(name))
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
71
72
73
class _GmpCommandFactory:
0 ignored issues
show
Unused Code introduced by
The variable __class__ seems to be unused.
Loading history...
best-practice introduced by
Too many public methods (40/20)
Loading history...
74
75
    """Factory to create gmp - Greenbone Manangement Protocol - commands
76
    """
77
78
    def create_agent_command(self, installer, signature, name, comment='',
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
best-practice introduced by
Too many arguments (8/5)
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
79
                             copy='', howto_install='', howto_use=''):
80
81
        cmd = XmlCommand('create_agent')
82
        cmd.add_element('installer', installer)
83
        cmd.add_element('signature', signature)
84
        cmd.add_element('name', name)
85
86
        if comment:
87
            cmd.add_element('comment', comment)
88
89
        if copy:
90
            cmd.add_element('copy', copy)
91
92
        if howto_install:
93
            cmd.add_element('howto_install', howto_install)
94
95
        if howto_use:
96
            cmd.add_element('howto_use', howto_use)
97
98
        return cmd.to_string()
99
100
    def create_alert_command(self, name, condition, event, method, filter_id='',
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
best-practice introduced by
Too many arguments (8/5)
Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (16/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
101
                             copy='', comment=''):
102
103
        cmd = XmlCommand('create_alert')
104
        cmd.add_element('name', name)
105
106
        if len(condition) > 1:
107
            conditions = cmd.add_element('condition', condition[0])
108
            for value, key in condition[1].items():
109
                _data = conditions.add_element('data', value)
110
                _data.add_element('name', key)
111
112
        elif condition[0] == "Always":
113
            conditions = cmd.add_element('condition', condition[0])
114
115
        if len(event) > 1:
116
            events = cmd.add_element('event', event[0])
117
            for value, key in event[1].items():
118
                _data = events.add_element('data', value)
119
                _data.add_element('name', key)
120
121
        if len(method) > 1:
122
            methods = cmd.add_element('method', method[0])
123
            for value, key in method[1].items():
124
                _data = methods.add_element('data', value)
125
                _data.add_element('name', key)
126
127
        if filter_id:
128
            cmd.add_element('filter')
129
            cmd.set_attribute('id', filter_id)
130
131
        if copy:
132
            cmd.add_element('copy', copy)
133
134
        if comment:
135
            cmd.add_element('comment', comment)
136
137
        return cmd.to_string()
138
139
    def create_asset_command(self, name, asset_type, comment=''):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
140
        if asset_type not in ('host', 'os'):
141
            raise ValueError('create_asset requires asset_type to be either '
142
                             'host or os')
143
        cmd = XmlCommand('create_asset')
144
        asset = cmd.add_element('asset')
145
        asset.add_element('type', asset_type)
146
        asset.add_element('name', name)
147
148
        if comment:
149
            asset.add_element('comment', comment)
150
151
        return cmd.to_string()
152
153
    def create_authenticate_command(self, username, password):
0 ignored issues
show
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
154
        """Generates string for authentification on gvmd
155
156
        Creates the gmp authentication xml string.
157
        Inserts the username and password into it.
158
159
        Keyword Arguments:
160
            username {str} -- Username for GVM User
161
            password {str} -- Password for GVM User
162
        """
163
        cmd = XmlCommand('authenticate')
164
165
        credentials = cmd.add_element('credentials')
166
        credentials.add_element('username', username)
167
        credentials.add_element('password', password)
168
169
        return cmd.to_string()
170
171
    def create_config_command(self, copy_id, name):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
172
173
        xmlRoot = etree.Element('create_config')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
174
        _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
175
        _xmlCopy.text = copy_id
176
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
177
        _xmlName.text = name
178
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
179
180 View Code Duplication
    def create_credential_command(self, name, kwargs):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (36/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
181
182
        xmlRoot = etree.Element('create_credential')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
183
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
184
        _xmlName.text = name
185
186
        comment = kwargs.get('comment', '')
187
        if comment:
188
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
189
            _xmlComment.text = comment
190
191
        copy = kwargs.get('copy', '')
192
        if copy:
193
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
194
            _xmlCopy.text = copy
195
196
        allow_insecure = kwargs.get('allow_insecure', '')
197
        if allow_insecure:
198
            _xmlAllowinsecure = etree.SubElement(xmlRoot, 'allow_insecure')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAllowinsecure does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
199
            _xmlAllowinsecure.text = allow_insecure
200
201
        certificate = kwargs.get('certificate', '')
202
        if certificate:
203
            _xmlCertificate = etree.SubElement(xmlRoot, 'certificate')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCertificate does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
204
            _xmlCertificate.text = certificate
205
206
        key = kwargs.get('key', '')
207
        if key:
208
            phrase = key['phrase']
209
            private = key['private']
210
            if not phrase:
211
                raise ValueError('create_credential requires a phrase element')
212
            if not private:
213
                raise ValueError('create_credential requires a '
214
                                 'private element')
215
216
            _xmlKey = etree.SubElement(xmlRoot, 'key')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlKey does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
217
            _xmlKeyphrase = etree.SubElement(_xmlKey, 'phrase')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlKeyphrase does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
218
            _xmlKeyphrase.text = phrase
219
            _xmlKeyprivate = etree.SubElement(_xmlKey, 'private')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlKeyprivate does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
220
            _xmlKeyprivate.text = private
221
222
        login = kwargs.get('login', '')
223
        if login:
224
            _xmlLogin = etree.SubElement(xmlRoot, 'login')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlLogin does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
225
            _xmlLogin.text = login
226
227
        password = kwargs.get('password', '')
228
        if password:
229
            _xmlPass = etree.SubElement(xmlRoot, 'password')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPass does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
230
            _xmlPass.text = password
231
232
        auth_algorithm = kwargs.get('auth_algorithm', '')
233
        if auth_algorithm:
234
            if auth_algorithm not in ('md5', 'sha1'):
235
                raise ValueError('create_credential requires auth_algorithm '
236
                                 'to be either md5 or sha1')
237
            _xmlAuthalg = etree.SubElement(xmlRoot, 'auth_algorithm')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAuthalg does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
238
            _xmlAuthalg.text = auth_algorithm
239
240
        community = kwargs.get('community', '')
241
        if community:
242
            _xmlCommunity = etree.SubElement(xmlRoot, 'community')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCommunity does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
243
            _xmlCommunity.text = community
244
245
        privacy = kwargs.get('privacy', '')
246
        if privacy:
247
            algorithm = privacy.algorithm
248
            if algorithm not in ('aes', 'des'):
249
                raise ValueError('create_credential requires algorithm '
250
                                 'to be either aes or des')
251
            p_password = privacy.password
252
            _xmlPrivacy = etree.SubElement(xmlRoot, 'privacy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPrivacy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
253
            _xmlAlgorithm = etree.SubElement(_xmlPrivacy, 'algorithm')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAlgorithm does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
254
            _xmlAlgorithm.text = algorithm
255
            _xmlPpass = etree.SubElement(_xmlPrivacy, 'password')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPpass does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
256
            _xmlPpass.text = p_password
257
258
        cred_type = kwargs.get('type', '')
259
        if cred_type:
260
            if cred_type not in ('cc', 'snmp', 'up', 'usk'):
261
                raise ValueError('create_credential requires type '
262
                                 'to be either cc, snmp, up or usk')
263
            _xmlCredtype = etree.SubElement(xmlRoot, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCredtype does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
264
            _xmlCredtype.text = cred_type
265
266
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
267
268 View Code Duplication
    def create_filter_command(self, name, make_unique, kwargs):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (16/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
269
270
        xmlRoot = etree.Element('create_filter')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
271
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
272
        _xmlName.text = name
273
        _xmlUnique = etree.SubElement(_xmlName, 'make_unique')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlUnique does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
274
        if make_unique:
275
            _xmlUnique.text = '1'
276
        else:
277
            _xmlUnique.text = '0'
278
279
        comment = kwargs.get('comment', '')
280
        if comment:
281
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
282
            _xmlComment.text = comment
283
284
        copy = kwargs.get('copy', '')
285
        if copy:
286
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
287
            _xmlCopy.text = copy
288
289
        term = kwargs.get('term', '')
290
        if term:
291
            _xmlTerm = etree.SubElement(xmlRoot, 'term')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTerm does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
292
            _xmlTerm.text = term
293
294
        filter_type = kwargs.get('type', '')
295
        if filter_type:
296
            if filter_type not in FILTER_NAMES:
297
                raise ValueError('create_filter requires type '
298
                                 'to be either cc, snmp, up or usk')
299
            _xmlFiltertype = etree.SubElement(xmlRoot, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFiltertype does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
300
            _xmlFiltertype.text = filter_type
301
302
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
303
304
    def create_group_command(self, name, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
305
306
        xmlRoot = etree.Element('create_group')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
307
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
308
        _xmlName.text = name
309
310
        comment = kwargs.get('comment', '')
311
        if comment:
312
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
313
            _xmlComment.text = comment
314
315
        copy = kwargs.get('copy', '')
316
        if copy:
317
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
318
            _xmlCopy.text = copy
319
320
        special = kwargs.get('special', '')
321
        if special:
322
            _xmlSpecial = etree.SubElement(xmlRoot, 'specials')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSpecial does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
323
            _xmlFull = etree.SubElement(_xmlSpecial, 'full')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFull does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
324
325
        users = kwargs.get('users', '')
326
        if users:
327
            _xmlUser = etree.SubElement(xmlRoot, 'users')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlUser does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
328
            _xmlUser.text = users
329
330
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
331
332
    def create_note_command(self, text, nvt_oid, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (26/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
333
334
        xmlRoot = etree.Element('create_note')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
335
        _xmlText = etree.SubElement(xmlRoot, 'text')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlText does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
336
        _xmlText.text = text
337
        _xmlNvt = etree.SubElement(xmlRoot, 'nvt', oid=nvt_oid)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlNvt does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
338
339
        active = kwargs.get('active', '')
340
        if active:
341
            _xmlActive = etree.SubElement(xmlRoot, 'active')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlActive does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
342
            _xmlActive.text = active
343
344
        comment = kwargs.get('comment', '')
345
        if comment:
346
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
347
            _xmlComment.text = comment
348
349
        copy = kwargs.get('copy', '')
350
        if copy:
351
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
352
            _xmlCopy.text = copy
353
354
        hosts = kwargs.get('hosts', '')
355
        if hosts:
356
            _xmlHosts = etree.SubElement(xmlRoot, 'hosts')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
357
            _xmlHosts.text = hosts
358
359
        port = kwargs.get('port', '')
360
        if port:
361
            _xmlPort = etree.SubElement(xmlRoot, 'port')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlPort does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
362
            _xmlPort.text = port
363
364
        result_id = kwargs.get('result_id', '')
365
        if result_id:
366
            _xmlResultid = etree.SubElement(xmlRoot, 'result', id=result_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlResultid does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
367
368
        severity = kwargs.get('severity', '')
369
        if severity:
370
            _xmlSeverity = etree.SubElement(xmlRoot, 'severity')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSeverity does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
371
            _xmlSeverity.text = severity
372
373
        task_id = kwargs.get('task_id', '')
374
        if task_id:
375
            _xmlTaskid = etree.SubElement(xmlRoot, 'task', id=task_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTaskid does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
376
377
        threat = kwargs.get('threat', '')
378
        if threat:
379
            _xmlThreat = etree.SubElement(xmlRoot, 'threat')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlThreat does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
380
            _xmlThreat.text = threat
381
382
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
383
384
    def create_override_command(self, text, nvt_oid, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (30/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
385
386
        xmlRoot = etree.Element('create_override')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
387
        _xmlText = etree.SubElement(xmlRoot, 'text')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlText does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
388
        _xmlText.text = text
389
        _xmlNvt = etree.SubElement(xmlRoot, 'nvt', oid=nvt_oid)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlNvt does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
390
391
        active = kwargs.get('active', '')
392
        if active:
393
            _xmlActive = etree.SubElement(xmlRoot, 'active')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlActive does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
394
            _xmlActive.text = active
395
396
        comment = kwargs.get('comment', '')
397
        if comment:
398
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
399
            _xmlComment.text = comment
400
401
        copy = kwargs.get('copy', '')
402
        if copy:
403
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
404
            _xmlCopy.text = copy
405
406
        hosts = kwargs.get('hosts', '')
407
        if hosts:
408
            _xmlHosts = etree.SubElement(xmlRoot, 'hosts')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
409
            _xmlHosts.text = hosts
410
411
        port = kwargs.get('port', '')
412
        if port:
413
            _xmlPort = etree.SubElement(xmlRoot, 'port')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlPort does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
414
            _xmlPort.text = port
415
416
        result_id = kwargs.get('result_id', '')
417
        if result_id:
418
            _xmlResultid = etree.SubElement(xmlRoot, 'result', id=result_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlResultid does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
419
420
        severity = kwargs.get('severity', '')
421
        if severity:
422
            _xmlSeverity = etree.SubElement(xmlRoot, 'severity')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSeverity does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
423
            _xmlSeverity.text = severity
424
425
        new_severity = kwargs.get('new_severity', '')
426
        if new_severity:
427
            _xmlNSeverity = etree.SubElement(xmlRoot, 'new_severity')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlNSeverity does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
428
            _xmlNSeverity.text = new_severity
429
430
        task_id = kwargs.get('task_id', '')
431
        if task_id:
432
            _xmlTaskid = etree.SubElement(xmlRoot, 'task', id=task_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTaskid does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
433
434
        threat = kwargs.get('threat', '')
435
        if threat:
436
            _xmlThreat = etree.SubElement(xmlRoot, 'threat')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlThreat does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
437
            _xmlThreat.text = threat
438
439
        new_threat = kwargs.get('new_threat', '')
440
        if new_threat:
441
            _xmlNThreat = etree.SubElement(xmlRoot, 'new_threat')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlNThreat does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
442
            _xmlNThreat.text = new_threat
443
444
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
445
446
    def create_permission_command(self, name, subject_id, type, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Bug Best Practice introduced by
This seems to re-define the built-in type.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (19/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
447
        # pretty(gmp.create_permission('get_version',
448
        # 'cc9cac5e-39a3-11e4-abae-406186ea4fc5', 'role'))
449
        # libs.gvm_connection.GMPError: Error in NAME
450
        # TODO: Research why!!
0 ignored issues
show
Coding Style introduced by
TODO and FIXME comments should generally be avoided.
Loading history...
451
452
        if not name:
453
            raise ValueError('create_permission requires a name element')
454
        if not subject_id:
455
            raise ValueError('create_permission requires a subject_id element')
456
        if type not in ('user', 'group', 'role'):
457
            raise ValueError('create_permission requires type '
458
                             'to be either user, group or role')
459
460
        xmlRoot = etree.Element('create_permission')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
461
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
462
        _xmlName.text = name
463
        _xmlSubject = etree.SubElement(xmlRoot, 'subject', id=subject_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSubject does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
464
        _xmlType = etree.SubElement(_xmlSubject, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlType does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
465
        _xmlType.text = type
466
467
        comment = kwargs.get('comment', '')
468
        if comment:
469
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
470
            _xmlComment.text = comment
471
472
        copy = kwargs.get('copy', '')
473
        if copy:
474
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
475
            _xmlCopy.text = copy
476
477
        resource = kwargs.get('resource', '')
478
        if resource:
479
            resource_id = resource.id
480
            resource_type = resource.type
481
            _xmlResource = etree.SubElement(xmlRoot, 'resource',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlResource does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
482
                                            id=resource_id)
483
            _xmlRType = etree.SubElement(_xmlResource, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlRType does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
484
            _xmlRType.text = resource_type
485
486
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
487
488
    def create_port_list_command(self, name, port_range, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
489
490
        if not name:
491
            raise ValueError('create_port_list requires a name element')
492
        if not port_range:
493
            raise ValueError('create_port_list requires a port_range element')
494
495
        xmlRoot = etree.Element('create_port_list')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
496
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
497
        _xmlName.text = name
498
        _xmlPortrange = etree.SubElement(xmlRoot, 'port_range')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPortrange does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
499
        _xmlPortrange.text = port_range
500
501
        comment = kwargs.get('comment', '')
502
        if comment:
503
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
504
            _xmlComment.text = comment
505
506
        copy = kwargs.get('copy', '')
507
        if copy:
508
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
509
            _xmlCopy.text = copy
510
511
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
512
513
    def create_port_range_command(self, port_list_id, start, end, type,
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Bug Best Practice introduced by
This seems to re-define the built-in type.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
best-practice introduced by
Too many arguments (6/5)
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
514
                                  comment=''):
515
516
        if not port_list_id:
517
            raise ValueError('create_port_range requires '
518
                             'a port_list_id element')
519
        if not type:
520
            raise ValueError('create_port_range requires a type element')
521
522
        xmlRoot = etree.Element('create_port_range')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
523
        _xmlPlist = etree.SubElement(xmlRoot, 'port_list', id=port_list_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPlist does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
524
        _xmlStart = etree.SubElement(xmlRoot, 'start')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlStart does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
525
        _xmlStart.text = start
526
        _xmlEnd = etree.SubElement(xmlRoot, 'end')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlEnd does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
527
        _xmlEnd.text = end
528
        _xmlType = etree.SubElement(xmlRoot, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlType does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
529
        _xmlType.text = type
530
531
        if len(comment):
0 ignored issues
show
Unused Code introduced by
Do not use len(SEQUENCE) as condition value
Loading history...
532
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
533
            _xmlComment.text = comment
534
535
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
536
537
    def create_report_command(self, report_xml_string, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
538
539
        if not report_xml_string:
540
            raise ValueError('create_report requires a report')
541
542
        task_id = kwargs.get('task_id', '')
543
        task_name = kwargs.get('task_name', '')
544
545
        xmlRoot = etree.Element('create_report')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
546
        comment = kwargs.get('comment', '')
547
        if task_id:
548
            _xmlTask = etree.SubElement(xmlRoot, 'task', id=task_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTask does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
549
        elif task_name:
550
            _xmlTask = etree.SubElement(xmlRoot, 'task')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTask does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
551
            _xmlName = etree.SubElement(_xmlTask, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
552
            _xmlName.text = task_name
553
            if comment:
554
                _xmlComment = etree.SubElement(_xmlTask, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
555
                _xmlComment.text = comment
556
        else:
557
            raise ValueError('create_report requires an id or name for a task')
558
559
        in_assets = kwargs.get('in_assets', '')
560
        if in_assets:
561
            _xmlInAsset = etree.SubElement(xmlRoot, 'in_assets')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlInAsset does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
562
            _xmlInAsset.text = in_assets
563
564
        xmlReport = secET.fromstring(report_xml_string)
0 ignored issues
show
Coding Style Naming introduced by
The name xmlReport does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
565
        xmlRoot.append(xmlReport)
566
567
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
568
569 View Code Duplication
    def create_role_command(self, name, kwargs):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
570
571
        if not name:
572
            raise ValueError('create_role requires a name element')
573
574
        xmlRoot = etree.Element('create_role')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
575
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
576
        _xmlName.text = name
577
578
        comment = kwargs.get('comment', '')
579
        if comment:
580
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
581
            _xmlComment.text = comment
582
583
        copy = kwargs.get('copy', '')
584
        if copy:
585
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
586
            _xmlCopy.text = copy
587
588
        users = kwargs.get('users', '')
589
        if users:
590
            _xmlUser = etree.SubElement(xmlRoot, 'users')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlUser does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
591
            _xmlUser.text = users
592
593
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
594
595 View Code Duplication
    def create_scanner_command(self, name, host, port, type, ca_pub,
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Bug Best Practice introduced by
This seems to re-define the built-in type.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
best-practice introduced by
Too many arguments (8/5)
Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (20/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
596
                               credential_id, kwargs):
597
        if not name:
598
            raise ValueError('create_scanner requires a name element')
599
        if not host:
600
            raise ValueError('create_scanner requires a host element')
601
        if not port:
602
            raise ValueError('create_scanner requires a port element')
603
        if not type:
604
            raise ValueError('create_scanner requires a type element')
605
        if not ca_pub:
606
            raise ValueError('create_scanner requires a ca_pub element')
607
        if not credential_id:
608
            raise ValueError('create_scanner requires a credential_id element')
609
610
        xmlRoot = etree.Element('create_scanner')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
611
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
612
        _xmlName.text = name
613
        _xmlHost = etree.SubElement(xmlRoot, 'host')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHost does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
614
        _xmlHost.text = host
615
        _xmlPort = etree.SubElement(xmlRoot, 'port')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPort does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
616
        _xmlPort.text = port
617
        _xmlType = etree.SubElement(xmlRoot, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlType does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
618
        _xmlType.text = type
619
        _xmlCAPub = etree.SubElement(xmlRoot, 'ca_pub')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCAPub does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
620
        _xmlCAPub.text = ca_pub
621
        _xmlCred = etree.SubElement(xmlRoot, 'credential',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCred does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
622
                                    id=str(credential_id))
623
624
        comment = kwargs.get('comment', '')
625
        if comment:
626
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
627
            _xmlComment.text = comment
628
629
        copy = kwargs.get('copy', '')
630
        if copy:
631
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
632
            _xmlCopy.text = copy
633
634
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
635
636 View Code Duplication
    def create_schedule_command(self, name, kwargs):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (30/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
637
        if not name:
638
            raise ValueError('create_schedule requires a name element')
639
640
        xmlRoot = etree.Element('create_schedule')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
641
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
642
        _xmlName.text = name
643
644
        comment = kwargs.get('comment', '')
645
        if comment:
646
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
647
            _xmlComment.text = comment
648
649
        copy = kwargs.get('copy', '')
650
        if copy:
651
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
652
            _xmlCopy.text = copy
653
654
        first_time = kwargs.get('first_time', '')
655
        if first_time:
656
            first_time_minute = first_time['minute']
657
            first_time_hour = first_time['hour']
658
            first_time_day_of_month = first_time['day_of_month']
659
            first_time_month = first_time['month']
660
            first_time_year = first_time['year']
661
662
            _xmlFtime = etree.SubElement(xmlRoot, 'first_time')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFtime does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
663
            _xmlMinute = etree.SubElement(_xmlFtime, 'minute')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlMinute does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
664
            _xmlMinute.text = str(first_time_minute)
665
            _xmlHour = etree.SubElement(_xmlFtime, 'hour')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHour does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
666
            _xmlHour.text = str(first_time_hour)
667
            _xmlDay = etree.SubElement(_xmlFtime, 'day_of_month')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlDay does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
668
            _xmlDay.text = str(first_time_day_of_month)
669
            _xmlMonth = etree.SubElement(_xmlFtime, 'month')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlMonth does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
670
            _xmlMonth.text = str(first_time_month)
671
            _xmlYear = etree.SubElement(_xmlFtime, 'year')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlYear does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
672
            _xmlYear.text = str(first_time_year)
673
674
        duration = kwargs.get('duration', '')
675
        if len(duration) > 1:
676
            _xmlDuration = etree.SubElement(xmlRoot, 'duration')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlDuration does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
677
            _xmlDuration.text = str(duration[0])
678
            _xmlUnit = etree.SubElement(_xmlDuration, 'unit')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlUnit does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
679
            _xmlUnit.text = str(duration[1])
680
681
        period = kwargs.get('period', '')
682
        if len(period) > 1:
683
            _xmlPeriod = etree.SubElement(xmlRoot, 'period')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPeriod does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
684
            _xmlPeriod.text = str(period[0])
685
            _xmlPUnit = etree.SubElement(_xmlPeriod, 'unit')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPUnit does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
686
            _xmlPUnit.text = str(period[1])
687
688
        timezone = kwargs.get('timezone', '')
689
        if timezone:
690
            _xmlTimezone = etree.SubElement(xmlRoot, 'timezone')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTimezone does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
691
            _xmlTimezone.text = str(timezone)
692
693
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
694
695
    def create_tag_command(self, name, resource_id, resource_type, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (18/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
696
697
        xmlRoot = etree.Element('create_tag')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
698
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
699
        _xmlName.text = name
700
        _xmlResource = etree.SubElement(xmlRoot, 'resource',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlResource does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
701
                                        id=str(resource_id))
702
        _xmlRType = etree.SubElement(_xmlResource, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlRType does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
703
        _xmlRType.text = resource_type
704
705
        comment = kwargs.get('comment', '')
706
        if comment:
707
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
708
            _xmlComment.text = comment
709
710
        copy = kwargs.get('copy', '')
711
        if copy:
712
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
713
            _xmlCopy.text = copy
714
715
        value = kwargs.get('value', '')
716
        if value:
717
            _xmlValue = etree.SubElement(xmlRoot, 'value')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlValue does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
718
            _xmlValue.text = value
719
720
        active = kwargs.get('active', '')
721
        if active:
722
            _xmlActive = etree.SubElement(xmlRoot, 'active')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlActive does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
723
            _xmlActive.text = active
724
725
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
726
727
    def create_target_command(self, name, make_unique, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (32/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
728
        if not name:
729
            raise ValueError('create_target requires a name element')
730
731
        xmlRoot = etree.Element('create_target')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
732
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
733
        _xmlName.text = name
734
        if make_unique:
735
            unique = '1'
736
        else:
737
            unique = '0'
738
        _xmlUnique = etree.SubElement(_xmlName, 'make_unique')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlUnique does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
739
        _xmlUnique.text = unique
740
741
        if 'asset_hosts' in kwargs:
742
            hosts = kwargs.get('asset_hosts')
743
            filter = hosts['filter']
0 ignored issues
show
Bug Best Practice introduced by
This seems to re-define the built-in filter.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
744
            _xmlHosts = etree.SubElement(xmlRoot, 'asset_hosts',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
745
                                         filter=str(filter))
746
        elif 'hosts' in kwargs:
747
            hosts = kwargs.get('hosts')
748
            _xmlHosts = etree.SubElement(xmlRoot, 'hosts')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
749
            _xmlHosts.text = hosts
750
        else:
751
            raise ValueError('create_target requires either a hosts or '
752
                             'an asset_hosts element')
753
754
        if 'comment' in kwargs:
755
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
756
            _xmlComment.text = kwargs.get('comment')
757
758
        if 'copy' in kwargs:
759
            # NOTE: It seems that hosts/asset_hosts is silently ignored by the
760
            # server when copy is supplied. But for specification conformance
761
            # we raise the ValueError above and consider copy optional.
762
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
763
            _xmlCopy.text = kwargs.get('copy')
764
765
        if 'exclude_hosts' in kwargs:
766
            _xmlExHosts = etree.SubElement(xmlRoot, 'exclude_hosts')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlExHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
767
            _xmlExHosts.text = kwargs.get('exclude_hosts')
768
769
        if 'ssh_credential' in kwargs:
770
            ssh_credential = kwargs.get('ssh_credential')
771
            if 'id' in ssh_credential:
772
                _xmlSSH = etree.SubElement(xmlRoot, 'ssh_credential',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSSH does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
773
                                           id=ssh_credential['id'])
774
                _xmlSSH.text = ''
775
                if 'port' in ssh_credential:
776
                    _xmlSSHport = etree.SubElement(_xmlSSH, 'port')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSSHport does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
777
                    _xmlSSHport.text = ssh_credential['port']
778
            else:
779
                raise ValueError('ssh_credential requires an id attribute')
780
781
        if 'smb_credential' in kwargs:
782
            smb_credential = kwargs.get('smb_credential')
783
            if 'id' in smb_credential:
784
                _xmlSMB = etree.SubElement(xmlRoot, 'smb_credential',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSMB does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
785
                                           id=smb_credential['id'])
786
            else:
787
                raise ValueError('smb_credential requires an id attribute')
788
789
        if 'esxi_credential' in kwargs:
790
            esxi_credential = kwargs.get('esxi_credential')
791
            if 'id' in esxi_credential:
792
                _xmlEsxi = etree.SubElement(xmlRoot, 'esxi_credential',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlEsxi does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
793
                                            id=esxi_credential['id'])
794
            else:
795
                raise ValueError('esxi_credential requires an id attribute')
796
797
        if 'snmp_credential' in kwargs:
798
            snmp_credential = kwargs.get('snmp_credential')
799
            if 'id' in snmp_credential:
800
                _xmlSnmp = etree.SubElement(xmlRoot, 'snmp_credential',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSnmp does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
801
                                            id=snmp_credential['id'])
802
            else:
803
                raise ValueError('snmp_credential requires an id attribute')
804
805
        if 'alive_tests' in kwargs:
806
            # NOTE: As the alive_tests are referenced by their name and some
807
            # names contain ampersand ('&') characters it should be considered
808
            # replacing any characters special to XML in the variable with
809
            # their corresponding entities.
810
            _xmlAlive = etree.SubElement(xmlRoot, 'alive_tests')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAlive does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
811
            _xmlAlive.text = kwargs.get('alive_tests')
812
813
        if 'reverse_lookup_only' in kwargs:
814
            reverse_lookup_only = kwargs.get('reverse_lookup_only')
815
            _xmlLookup = etree.SubElement(xmlRoot, 'reverse_lookup_only')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlLookup does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
816
            if reverse_lookup_only:
817
                _xmlLookup.text = '1'
818
            else:
819
                _xmlLookup.text = '0'
820
821
        if 'reverse_lookup_unify' in kwargs:
822
            reverse_lookup_unify = kwargs.get('reverse_lookup_unify')
823
            _xmlLookupU = etree.SubElement(xmlRoot, 'reverse_lookup_unify')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlLookupU does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
824
            if reverse_lookup_unify:
825
                _xmlLookupU.text = '1'
826
            else:
827
                _xmlLookupU.text = '0'
828
829
        if 'port_range' in kwargs:
830
            _xmlPortR = etree.SubElement(xmlRoot, 'port_range')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPortR does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
831
            _xmlPortR.text = kwargs.get('port_range')
832
833
        if 'port_list' in kwargs:
834
            port_list = kwargs.get('port_list')
835
            if 'id' in port_list:
836
                _xmlPortL = etree.SubElement(xmlRoot, 'port_list',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPortL does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
837
                                             id=str(port_list['id']))
838
            else:
839
                raise ValueError('port_list requires an id attribute')
840
841
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
842
843
    def create_task_command(self, name, config_id, target_id, scanner_id,
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
best-practice introduced by
Too many arguments (7/5)
Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (16/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
844
                            alert_ids=None, comment=''):
845
        if alert_ids is None:
846
            alert_ids = []
847
        xmlRoot = etree.Element('create_task')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
848
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
849
        _xmlName.text = name
850
        _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
851
        _xmlComment.text = comment
852
        _xmlConfig = etree.SubElement(xmlRoot, 'config', id=config_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlConfig does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
853
        _xmlTarget = etree.SubElement(xmlRoot, 'target', id=target_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTarget does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
854
        _xmlScanner = etree.SubElement(xmlRoot, 'scanner', id=scanner_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlScanner does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
855
856
        #if given the alert_id is wrapped and integrated suitably as xml
857
        if len(alert_ids) > 0:
0 ignored issues
show
Unused Code introduced by
Do not use len(SEQUENCE) as condition value
Loading history...
858
            if isinstance(alert_ids, str):
859
                #if a single id is given as a string wrap it into a list
860
                alert_ids = [alert_ids]
861
            if isinstance(alert_ids, list):
862
                #parse all given alert id's
863
                for alert in alert_ids:
864
                    _xmlAlert = etree.SubElement(
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAlert does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
865
                        xmlRoot, 'alert', id=str(alert))
866
867
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
868
869
    def create_user_command(self, name, password, copy='', hosts_allow='0',
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (18/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
870
                            ifaces_allow='0', role_ids=(), hosts=None,
871
                            ifaces=None):
872
        xmlRoot = etree.Element('create_user')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
873
        _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
874
        _xmlName.text = name
875
876
        if copy:
877
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
878
            _xmlCopy.text = copy
879
880
        if password:
881
            _xmlPass = etree.SubElement(xmlRoot, 'password')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPass does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
882
            _xmlPass.text = password
883
884
        if hosts is not None:
885
            _xmlHosts = etree.SubElement(xmlRoot, 'hosts',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
886
                                         allow=str(hosts_allow))
887
            _xmlHosts.text = hosts
888
889
        if ifaces is not None:
890
            _xmlIFaces = etree.SubElement(xmlRoot, 'ifaces',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlIFaces does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
891
                                          allow=str(ifaces_allow))
892
            _xmlIFaces.text = ifaces
893
894
        if len(role_ids) > 0:
0 ignored issues
show
Unused Code introduced by
Do not use len(SEQUENCE) as condition value
Loading history...
895
            for role in role_ids:
896
                _xmlRole = etree.SubElement(xmlRoot, 'role',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlRole does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
897
                                            allow=str(role))
898
899
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
900
901
    def modify_agent_command(self, agent_id, name='', comment=''):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
902
        if not agent_id:
903
            raise ValueError('modify_agent requires an agent_id element')
904
905
        xmlRoot = etree.Element('modify_agent', agent_id=str(agent_id))
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
906
        if name:
907
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
908
            _xmlName.text = name
909
910
        if comment:
911
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
912
            _xmlComment.text = comment
913
914
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
915
916
    def modify_alert_command(self, alert_id, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (21/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
917
        if not alert_id:
918
            raise ValueError('modify_alert requires an agent_id element')
919
920
        xmlRoot = etree.Element('modify_alert', alert_id=str(alert_id))
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
921
922
        name = kwargs.get('name', '')
923
        if name:
924
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
925
            _xmlName.text = name
926
927
        comment = kwargs.get('comment', '')
928
        if comment:
929
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
930
            _xmlComment.text = comment
931
932
        filter_id = kwargs.get('filter_id', '')
933
        if filter_id:
934
            _xmlFilter = etree.SubElement(xmlRoot, 'filter', id=filter_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFilter does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
935
936
        event = kwargs.get('event', '')
937
        if len(event) > 1:
938
            _xmlEvent = etree.SubElement(xmlRoot, 'event')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlEvent does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
939
            _xmlEvent.text = event[0]
940
            for value, key in event[1].items():
941
                _xmlData = etree.SubElement(_xmlEvent, 'data')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlData does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
942
                _xmlData.text = value
943
                _xmlDName = etree.SubElement(_xmlData, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlDName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
944
                _xmlDName.text = key
945
946
        condition = kwargs.get('condition', '')
947
        if len(condition) > 1:
948
            _xmlCond = etree.SubElement(xmlRoot, 'condition')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCond does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
949
            _xmlCond.text = condition[0]
950
            for value, key in condition[1].items():
951
                _xmlData = etree.SubElement(_xmlCond, 'data')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlData does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
952
                _xmlData.text = value
953
                _xmlDName = etree.SubElement(_xmlData, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlDName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
954
                _xmlDName.text = key
955
956
        method = kwargs.get('method', '')
957
        if len(method) > 1:
958
            _xmlMethod = etree.SubElement(xmlRoot, 'method')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlMethod does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
959
            _xmlMethod.text = method[0]
960
            for value, key in method[1].items():
961
                _xmlData = etree.SubElement(_xmlMethod, 'data')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlData does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
962
                _xmlData.text = value
963
                _xmlDName = etree.SubElement(_xmlData, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlDName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
964
                _xmlDName.text = key
965
966
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
967
968
    def modify_auth_command(self, group_name, auth_conf_settings):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
969
        if not group_name:
970
            raise ValueError('modify_auth requires a group element '
971
                             'with a name attribute')
972
        if not auth_conf_settings:
973
            raise ValueError('modify_auth requires '
974
                             'an auth_conf_settings element')
975
976
        xmlRoot = etree.Element('modify_auth')
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
977
        _xmlGroup = etree.SubElement(xmlRoot, 'group', name=str(group_name))
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlGroup does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
978
979
        for key, value in auth_conf_settings.items():
980
            _xmlAuthConf = etree.SubElement(_xmlGroup, 'auth_conf_setting')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAuthConf does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
981
            _xmlKey = etree.SubElement(_xmlAuthConf, 'key')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlKey does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
982
            _xmlKey.text = key
983
            _xmlValue = etree.SubElement(_xmlAuthConf, 'value')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlValue does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
984
            _xmlValue.text = value
985
986
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
987
988
    def modify_config_command(self, selection, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (21/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
989
        if selection not in ('nvt_pref', 'sca_pref',
990
                             'family_selection', 'nvt_selection'):
991
            raise ValueError('selection must be one of nvt_pref, sca_pref, '
992
                             'family_selection or nvt_selection')
993
        config_id = kwargs.get('config_id')
994
995
        xmlRoot = etree.Element('modify_config', config_id=str(config_id))
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
996
997
        if selection in 'nvt_pref':
998
            nvt_oid = kwargs.get('nvt_oid')
999
            name = kwargs.get('name')
1000
            value = kwargs.get('value')
1001
            _xmlPref = etree.SubElement(xmlRoot, 'preference')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPref does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1002
            _xmlNvt = etree.SubElement(_xmlPref, 'nvt', oid=nvt_oid)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlNvt does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1003
            _xmlName = etree.SubElement(_xmlPref, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1004
            _xmlName.text = name
1005
            _xmlValue = etree.SubElement(_xmlPref, 'value')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlValue does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1006
            _xmlValue.text = value
1007
1008
        elif selection in 'nvt_selection':
1009
            nvt_oid = kwargs.get('nvt_oid')
1010
            family = kwargs.get('family')
1011
            _xmlNvtSel = etree.SubElement(xmlRoot, 'nvt_selection')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlNvtSel does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1012
            _xmlFamily = etree.SubElement(_xmlNvtSel, 'family')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFamily does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1013
            _xmlFamily.text = family
1014
1015
            if isinstance(nvt_oid, list):
1016
                for nvt in nvt_oid:
1017
                    _xmlNvt = etree.SubElement(_xmlNvtSel, 'nvt', oid=nvt)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlNvt does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1018
            else:
1019
                _xmlNvt = etree.SubElement(_xmlNvtSel, 'nvt', oid=nvt)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable nvt does not seem to be defined.
Loading history...
Coding Style Naming introduced by
The name _xmlNvt does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1020
1021
        elif selection in 'family_selection':
1022
            family = kwargs.get('family')
1023
            _xmlFamSel = etree.SubElement(xmlRoot, 'family_selection')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFamSel does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1024
            _xmlGrow = etree.SubElement(_xmlFamSel, 'growing')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlGrow does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1025
            _xmlGrow.text = '1'
1026
            _xmlFamily = etree.SubElement(_xmlFamSel, 'family')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFamily does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1027
            _xmlName = etree.SubElement(_xmlFamily, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1028
            _xmlName.text = family
1029
            _xmlAll = etree.SubElement(_xmlFamily, 'all')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAll does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1030
            _xmlAll.text = '1'
1031
            _xmlGrowI = etree.SubElement(_xmlFamily, 'growing')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlGrowI does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1032
            _xmlGrowI.text = '1'
1033
        else:
1034
            raise NotImplementedError
1035
1036
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1037
1038 View Code Duplication
    def modify_credential_command(self, credential_id, kwargs):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (35/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1039
        if not credential_id:
1040
            raise ValueError('modify_credential requires '
1041
                             'a credential_id attribute')
1042
1043
        xmlRoot = etree.Element('modify_credential',
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1044
                                credential_id=credential_id)
1045
1046
        comment = kwargs.get('comment', '')
1047
        if comment:
1048
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1049
            _xmlComment.text = comment
1050
1051
        name = kwargs.get('name', '')
1052
        if name:
1053
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1054
            _xmlName.text = name
1055
1056
        allow_insecure = kwargs.get('allow_insecure', '')
1057
        if allow_insecure:
1058
            _xmlAllowinsecure = etree.SubElement(xmlRoot, 'allow_insecure')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAllowinsecure does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1059
            _xmlAllowinsecure.text = allow_insecure
1060
1061
        certificate = kwargs.get('certificate', '')
1062
        if certificate:
1063
            _xmlCertificate = etree.SubElement(xmlRoot, 'certificate')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCertificate does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1064
            _xmlCertificate.text = certificate
1065
1066
        key = kwargs.get('key', '')
1067
        if key:
1068
            phrase = key['phrase']
1069
            private = key['private']
1070
            if not phrase:
1071
                raise ValueError('modify_credential requires a phrase element')
1072
            if not private:
1073
                raise ValueError('modify_credential requires '
1074
                                 'a private element')
1075
            _xmlKey = etree.SubElement(xmlRoot, 'key')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlKey does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1076
            _xmlKeyphrase = etree.SubElement(_xmlKey, 'phrase')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlKeyphrase does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1077
            _xmlKeyphrase.text = phrase
1078
            _xmlKeyprivate = etree.SubElement(_xmlKey, 'private')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlKeyprivate does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1079
            _xmlKeyprivate.text = private
1080
1081
        login = kwargs.get('login', '')
1082
        if login:
1083
            _xmlLogin = etree.SubElement(xmlRoot, 'login')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlLogin does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1084
            _xmlLogin.text = login
1085
1086
        password = kwargs.get('password', '')
1087
        if password:
1088
            _xmlPass = etree.SubElement(xmlRoot, 'password')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPass does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1089
            _xmlPass.text = password
1090
1091
        auth_algorithm = kwargs.get('auth_algorithm', '')
1092
        if auth_algorithm:
1093
            if auth_algorithm not in ('md5', 'sha1'):
1094
                raise ValueError('modify_credential requires auth_algorithm '
1095
                                 'to be either md5 or sha1')
1096
            _xmlAuthalg = etree.SubElement(xmlRoot, 'auth_algorithm')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAuthalg does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1097
            _xmlAuthalg.text = auth_algorithm
1098
1099
        community = kwargs.get('community', '')
1100
        if community:
1101
            _xmlCommunity = etree.SubElement(xmlRoot, 'community')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCommunity does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1102
            _xmlCommunity.text = community
1103
1104
        privacy = kwargs.get('privacy', '')
1105
        if privacy:
1106
            algorithm = privacy.algorithm
1107
            if algorithm not in ('aes', 'des'):
1108
                raise ValueError('modify_credential requires algorithm '
1109
                                 'to be either aes or des')
1110
            p_password = privacy.password
1111
            _xmlPrivacy = etree.SubElement(xmlRoot, 'privacy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPrivacy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1112
            _xmlAlgorithm = etree.SubElement(_xmlPrivacy, 'algorithm')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAlgorithm does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1113
            _xmlAlgorithm.text = algorithm
1114
            _xmlPpass = etree.SubElement(_xmlPrivacy, 'password')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPpass does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1115
            _xmlPpass.text = p_password
1116
1117
        cred_type = kwargs.get('type', '')
1118
        if cred_type:
1119
            if cred_type not in ('cc', 'snmp', 'up', 'usk'):
1120
                raise ValueError('modify_credential requires type '
1121
                                 'to be either cc, snmp, up or usk')
1122
            _xmlCredtype = etree.SubElement(xmlRoot, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCredtype does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1123
            _xmlCredtype.text = cred_type
1124
1125
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1126
1127 View Code Duplication
    def modify_filter_command(self, filter_id, kwargs):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1128
        if not filter_id:
1129
            raise ValueError('modify_filter requires a filter_id attribute')
1130
1131
        xmlRoot = etree.Element('modify_filter', filter_id=filter_id)
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1132
1133
        comment = kwargs.get('comment', '')
1134
        if comment:
1135
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1136
            _xmlComment.text = comment
1137
1138
        name = kwargs.get('name', '')
1139
        if name:
1140
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1141
            _xmlName.text = name
1142
1143
        copy = kwargs.get('copy', '')
1144
        if copy:
1145
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1146
            _xmlCopy.text = copy
1147
1148
        term = kwargs.get('term', '')
1149
        if term:
1150
            _xmlTerm = etree.SubElement(xmlRoot, 'term')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTerm does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1151
            _xmlTerm.text = term
1152
1153
        filter_type = kwargs.get('type', '')
1154
        if filter_type:
1155
            if filter_type not in ('cc', 'snmp', 'up', 'usk'):
1156
                raise ValueError('modify_filter requires type '
1157
                                 'to be either cc, snmp, up or usk')
1158
            _xmlFiltertype = etree.SubElement(xmlRoot, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFiltertype does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1159
            _xmlFiltertype.text = filter_type
1160
1161
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1162
1163 View Code Duplication
    def modify_group_command(self, group_id, kwargs):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1164
        if not group_id:
1165
            raise ValueError('modify_group requires a group_id attribute')
1166
1167
        xmlRoot = etree.Element('modify_group', group_id=group_id)
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1168
1169
        comment = kwargs.get('comment', '')
1170
        if comment:
1171
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1172
            _xmlComment.text = comment
1173
1174
        name = kwargs.get('name', '')
1175
        if name:
1176
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1177
            _xmlName.text = name
1178
1179
        users = kwargs.get('users', '')
1180
        if users:
1181
            _xmlUser = etree.SubElement(xmlRoot, 'users')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlUser does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1182
            _xmlUser.text = users
1183
1184
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1185
1186
    def modify_note_command(self, note_id, text, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (21/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1187
        if not note_id:
1188
            raise ValueError('modify_note requires a note_id attribute')
1189
        if not text:
1190
            raise ValueError('modify_note requires a text element')
1191
1192
        xmlRoot = etree.Element('modify_note', note_id=note_id)
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1193
        _xmlText = etree.SubElement(xmlRoot, 'text')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlText does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1194
        _xmlText.text = text
1195
1196
        active = kwargs.get('active', '')
1197
        if active:
1198
            _xmlActive = etree.SubElement(xmlRoot, 'active')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlActive does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1199
            _xmlActive.text = active
1200
1201
        hosts = kwargs.get('hosts', '')
1202
        if hosts:
1203
            _xmlHosts = etree.SubElement(xmlRoot, 'hosts')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1204
            _xmlHosts.text = hosts
1205
1206
        port = kwargs.get('port', '')
1207
        if port:
1208
            _xmlPort = etree.SubElement(xmlRoot, 'port')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlPort does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
1209
            _xmlPort.text = port
1210
1211
        result_id = kwargs.get('result_id', '')
1212
        if result_id:
1213
            _xmlResultid = etree.SubElement(xmlRoot, 'result', id=result_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlResultid does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1214
1215
        severity = kwargs.get('severity', '')
1216
        if severity:
1217
            _xmlSeverity = etree.SubElement(xmlRoot, 'severity')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSeverity does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1218
            _xmlSeverity.text = severity
1219
1220
        task_id = kwargs.get('task_id', '')
1221
        if task_id:
1222
            _xmlTaskid = etree.SubElement(xmlRoot, 'task', id=task_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTaskid does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1223
1224
        threat = kwargs.get('threat', '')
1225
        if threat:
1226
            _xmlThreat = etree.SubElement(xmlRoot, 'threat')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlThreat does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1227
            _xmlThreat.text = threat
1228
1229
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1230
1231
    def modify_override_command(self, override_id, text, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (25/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1232
        xmlRoot = etree.Element('modify_override',
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1233
                                override_id=override_id)
1234
        _xmlText = etree.SubElement(xmlRoot, 'text')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlText does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1235
        _xmlText.text = text
1236
1237
        active = kwargs.get('active', '')
1238
        if active:
1239
            _xmlActive = etree.SubElement(xmlRoot, 'active')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlActive does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1240
            _xmlActive.text = active
1241
1242
        hosts = kwargs.get('hosts', '')
1243
        if hosts:
1244
            _xmlHosts = etree.SubElement(xmlRoot, 'hosts')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1245
            _xmlHosts.text = hosts
1246
1247
        port = kwargs.get('port', '')
1248
        if port:
1249
            _xmlPort = etree.SubElement(xmlRoot, 'port')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlPort does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
1250
            _xmlPort.text = port
1251
1252
        result_id = kwargs.get('result_id', '')
1253
        if result_id:
1254
            _xmlResultid = etree.SubElement(xmlRoot, 'result', id=result_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlResultid does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1255
1256
        severity = kwargs.get('severity', '')
1257
        if severity:
1258
            _xmlSeverity = etree.SubElement(xmlRoot, 'severity')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSeverity does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1259
            _xmlSeverity.text = severity
1260
1261
        new_severity = kwargs.get('new_severity', '')
1262
        if new_severity:
1263
            _xmlNSeverity = etree.SubElement(xmlRoot, 'new_severity')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlNSeverity does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
1264
            _xmlNSeverity.text = new_severity
1265
1266
        task_id = kwargs.get('task_id', '')
1267
        if task_id:
1268
            _xmlTaskid = etree.SubElement(xmlRoot, 'task', id=task_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTaskid does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1269
1270
        threat = kwargs.get('threat', '')
1271
        if threat:
1272
            _xmlThreat = etree.SubElement(xmlRoot, 'threat')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlThreat does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1273
            _xmlThreat.text = threat
1274
1275
        new_threat = kwargs.get('new_threat', '')
1276
        if new_threat:
1277
            _xmlNThreat = etree.SubElement(xmlRoot, 'new_threat')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlNThreat does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
1278
            _xmlNThreat.text = new_threat
1279
1280
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1281
1282
    def modify_permission_command(self, permission_id, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (19/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1283
        if not permission_id:
1284
            raise ValueError('modify_permission requires '
1285
                             'a permission_id element')
1286
1287
        xmlRoot = etree.Element('modify_permission',
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1288
                                permission_id=permission_id)
1289
1290
        comment = kwargs.get('comment', '')
1291
        if comment:
1292
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1293
            _xmlComment.text = comment
1294
1295
        name = kwargs.get('name', '')
1296
        if name:
1297
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1298
            _xmlName.text = name
1299
1300
        resource = kwargs.get('resource', '')
1301
        if resource:
1302
            resource_id = resource['id']
1303
            resource_type = resource['type']
1304
            _xmlResource = etree.SubElement(xmlRoot, 'resource',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlResource does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1305
                                            id=resource_id)
1306
            _xmlRType = etree.SubElement(_xmlResource, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlRType does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1307
            _xmlRType.text = resource_type
1308
1309
        subject = kwargs.get('subject', '')
1310
        if subject:
1311
            subject_id = subject['id']
1312
            subject_type = subject['type']
1313
            _xmlSubject = etree.SubElement(xmlRoot, 'subject', id=subject_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSubject does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1314
            _xmlType = etree.SubElement(_xmlSubject, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlType does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1315
            _xmlType.text = subject_type
1316
1317
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1318
1319
    def modify_port_list_command(self, port_list_id, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1320
        if not port_list_id:
1321
            raise ValueError('modify_port_list requires '
1322
                             'a port_list_id attribute')
1323
        xmlRoot = etree.Element('modify_port_list',
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1324
                                port_list_id=port_list_id)
1325
1326
        comment = kwargs.get('comment', '')
1327
        if comment:
1328
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1329
            _xmlComment.text = comment
1330
1331
        name = kwargs.get('name', '')
1332
        if name:
1333
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1334
            _xmlName.text = name
1335
1336
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1337
1338
    def modify_report_format_command(self, report_format_id, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (17/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1339
        if len(kwargs) < 1:
1340
            raise Exception('modify_report_format: Missing parameter')
1341
1342
        xmlRoot = etree.Element('modify_report_format',
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1343
                                report_format_id=report_format_id)
1344
1345
        active = kwargs.get('active', '')
1346
        if active:
1347
            _xmlActive = etree.SubElement(xmlRoot, 'active')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlActive does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1348
            _xmlActive.text = active
1349
1350
        name = kwargs.get('name', '')
1351
        if name:
1352
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1353
            _xmlName.text = name
1354
1355
            summary = kwargs.get('summary', '')
1356
        if summary:
0 ignored issues
show
introduced by
The variable summary does not seem to be defined in case name on line 1351 is False. Are you sure this can never be the case?
Loading history...
1357
            _xmlSummary = etree.SubElement(xmlRoot, 'summary')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSummary does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1358
            _xmlSummary.text = summary
1359
1360
        param = kwargs.get('param', '')
1361
        if param:
1362
            p_name = param[0]
1363
            p_value = param[1]
1364
            _xmlParam = etree.SubElement(xmlRoot, 'param')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlParam does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1365
            _xmlPname = etree.SubElement(_xmlParam, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPname does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1366
            _xmlPname.text = p_name
1367
            _xmlValue = etree.SubElement(_xmlParam, 'value')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlValue does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1368
            _xmlValue.text = p_value
1369
1370
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1371
1372 View Code Duplication
    def modify_role_command(self, role_id, kwargs):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1373
        if not role_id:
1374
            raise ValueError('modify_role requires a role_id element')
1375
1376
        xmlRoot = etree.Element('modify_role',
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1377
                                role_id=role_id)
1378
1379
        comment = kwargs.get('comment', '')
1380
        if comment:
1381
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1382
            _xmlComment.text = comment
1383
1384
        name = kwargs.get('name', '')
1385
        if name:
1386
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1387
            _xmlName.text = name
1388
1389
        users = kwargs.get('users', '')
1390
        if users:
1391
            _xmlUser = etree.SubElement(xmlRoot, 'users')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlUser does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1392
            _xmlUser.text = users
1393
1394
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1395
1396 View Code Duplication
    def modify_scanner_command(self, scanner_id, host, port, scanner_type,
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
best-practice introduced by
Too many arguments (6/5)
Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (19/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1397
                               kwargs):
1398
        if not scanner_id:
1399
            raise ValueError('modify_scanner requires a scanner_id element')
1400
        if not host:
1401
            raise ValueError('modify_scanner requires a host element')
1402
        if not port:
1403
            raise ValueError('modify_scanner requires a port element')
1404
        if not scanner_type:
1405
            raise ValueError('modify_scanner requires a type element')
1406
1407
        xmlRoot = etree.Element('modify_scanner', scanner_id=scanner_id)
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1408
        _xmlHost = etree.SubElement(xmlRoot, 'host')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHost does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1409
        _xmlHost.text = host
1410
        _xmlPort = etree.SubElement(xmlRoot, 'port')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPort does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1411
        _xmlPort.text = port
1412
        _xmlType = etree.SubElement(xmlRoot, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlType does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1413
        _xmlType.text = scanner_type
1414
1415
        comment = kwargs.get('comment', '')
1416
        if comment:
1417
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1418
            _xmlComment.text = comment
1419
1420
        name = kwargs.get('name', '')
1421
        if name:
1422
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1423
            _xmlName.text = name
1424
1425
        ca_pub = kwargs.get('ca_pub', '')
1426
        if ca_pub:
1427
            _xmlCAPub = etree.SubElement(xmlRoot, 'ca_pub')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCAPub does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1428
            _xmlCAPub.text = ca_pub
1429
1430
        credential_id = kwargs.get('credential_id', '')
1431
        if credential_id:
1432
            _xmlCred = etree.SubElement(xmlRoot, 'credential',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCred does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1433
                                        id=str(credential_id))
1434
1435
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1436
1437 View Code Duplication
    def modify_schedule_command(self, schedule_id, kwargs):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (29/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1438
        if not schedule_id:
1439
            raise ValueError('modify_schedule requires a schedule_id element')
1440
1441
        xmlRoot = etree.Element('modify_schedule', schedule_id=schedule_id)
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1442
        comment = kwargs.get('comment', '')
1443
        if comment:
1444
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1445
            _xmlComment.text = comment
1446
1447
        name = kwargs.get('name', '')
1448
        if name:
1449
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1450
            _xmlName.text = name
1451
1452
        first_time = kwargs.get('first_time', '')
1453
        if first_time:
1454
            first_time_minute = first_time['minute']
1455
            first_time_hour = first_time['hour']
1456
            first_time_day_of_month = first_time['day_of_month']
1457
            first_time_month = first_time['month']
1458
            first_time_year = first_time['year']
1459
1460
            _xmlFtime = etree.SubElement(xmlRoot, 'first_time')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFtime does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1461
            _xmlMinute = etree.SubElement(_xmlFtime, 'minute')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlMinute does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1462
            _xmlMinute.text = str(first_time_minute)
1463
            _xmlHour = etree.SubElement(_xmlFtime, 'hour')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHour does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1464
            _xmlHour.text = str(first_time_hour)
1465
            _xmlDay = etree.SubElement(_xmlFtime, 'day_of_month')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlDay does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1466
            _xmlDay.text = str(first_time_day_of_month)
1467
            _xmlMonth = etree.SubElement(_xmlFtime, 'month')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlMonth does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1468
            _xmlMonth.text = str(first_time_month)
1469
            _xmlYear = etree.SubElement(_xmlFtime, 'year')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlYear does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1470
            _xmlYear.text = str(first_time_year)
1471
1472
        duration = kwargs.get('duration', '')
1473
        if len(duration) > 1:
1474
            _xmlDuration = etree.SubElement(xmlRoot, 'duration')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlDuration does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1475
            _xmlDuration.text = str(duration[0])
1476
            _xmlUnit = etree.SubElement(_xmlDuration, 'unit')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlUnit does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1477
            _xmlUnit.text = str(duration[1])
1478
1479
        period = kwargs.get('period', '')
1480
        if len(period) > 1:
1481
            _xmlPeriod = etree.SubElement(xmlRoot, 'period')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPeriod does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1482
            _xmlPeriod.text = str(period[0])
1483
            _xmlPUnit = etree.SubElement(_xmlPeriod, 'unit')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPUnit does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1484
            _xmlPUnit.text = str(period[1])
1485
1486
        timezone = kwargs.get('timezone', '')
1487
        if timezone:
1488
            _xmlTimezone = etree.SubElement(xmlRoot, 'timezone')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTimezone does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1489
            _xmlTimezone.text = str(timezone)
1490
1491
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1492
1493
    def modify_tag_command(self, tag_id, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (18/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1494
        if not tag_id:
1495
            raise ValueError('modify_tag requires a tag_id element')
1496
1497
        xmlRoot = etree.Element('modify_tag', tag_id=str(tag_id))
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1498
1499
        comment = kwargs.get('comment', '')
1500
        if comment:
1501
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1502
            _xmlComment.text = comment
1503
1504
        name = kwargs.get('name', '')
1505
        if name:
1506
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1507
            _xmlName.text = name
1508
1509
        value = kwargs.get('value', '')
1510
        if value:
1511
            _xmlValue = etree.SubElement(xmlRoot, 'value')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlValue does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
1512
            _xmlValue.text = value
1513
1514
        active = kwargs.get('active', '')
1515
        if active:
1516
            _xmlActive = etree.SubElement(xmlRoot, 'active')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlActive does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1517
            _xmlActive.text = value
1518
1519
        resource = kwargs.get('resource', '')
1520
        if resource:
1521
            resource_id = resource['id']
1522
            resource_type = resource['type']
1523
            _xmlResource = etree.SubElement(xmlRoot, 'resource',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlResource does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1524
                                            resource_id=resource_id)
1525
            _xmlRType = etree.SubElement(_xmlResource, 'type')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlRType does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1526
            _xmlRType.text = resource_type
1527
1528
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1529
1530
    def modify_target_command(self, target_id, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (25/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1531
        if not target_id:
1532
            raise ValueError('modify_target requires a target_id element')
1533
1534
        xmlRoot = etree.Element('modify_target', target_id=target_id)
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1535
1536
        comment = kwargs.get('comment', '')
1537
        if comment:
1538
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1539
            _xmlComment.text = comment
1540
1541
        name = kwargs.get('name', '')
1542
        if name:
1543
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1544
            _xmlName.text = name
1545
1546
        hosts = kwargs.get('hosts', '')
1547
        if hosts:
1548
            _xmlHosts = etree.SubElement(xmlRoot, 'hosts')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1549
            _xmlHosts.text = hosts
1550
1551
        copy = kwargs.get('copy', '')
1552
        if copy:
1553
            _xmlCopy = etree.SubElement(xmlRoot, 'copy')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlCopy does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1554
            _xmlCopy.text = kwargs.get('copy')
1555
1556
        exclude_hosts = kwargs.get('exclude_hosts', '')
1557
        if exclude_hosts:
1558
            _xmlExHosts = etree.SubElement(xmlRoot, 'exclude_hosts')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlExHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1559
            _xmlExHosts.text = kwargs.get('exclude_hosts')
1560
1561
        alive_tests = kwargs.get('alive_tests', '')
1562
        if alive_tests:
1563
            _xmlAlive = etree.SubElement(xmlRoot, 'alive_tests')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAlive does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1564
            _xmlAlive.text = kwargs.get('alive_tests')
1565
1566
        reverse_lookup_only = kwargs.get('reverse_lookup_only', '')
1567
        if reverse_lookup_only:
1568
            _xmlLookup = etree.SubElement(xmlRoot, 'reverse_lookup_only')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlLookup does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1569
            _xmlLookup.text = reverse_lookup_only
1570
1571
        reverse_lookup_unify = kwargs.get('reverse_lookup_unify', '')
1572
        if reverse_lookup_unify:
1573
            _xmlLookupU = etree.SubElement(xmlRoot, 'reverse_lookup_unify')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlLookupU does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
1574
            _xmlLookupU.text = reverse_lookup_unify
1575
1576
        port_range = kwargs.get('port_range', '')
1577
        if port_range:
1578
            _xmlPortR = etree.SubElement(xmlRoot, 'port_range')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPortR does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1579
            _xmlPortR.text = kwargs.get('port_range')
1580
1581
        port_list = kwargs.get('port_list', '')
1582
        if port_list:
1583
            _xmlPortL = etree.SubElement(xmlRoot, 'port_list',
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
Coding Style Naming introduced by
The name _xmlPortL does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
1584
                                         id=str(port_list))
1585
1586
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1587
1588
    def modify_task_command(self, task_id, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (33/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1589
        if not task_id:
1590
            raise ValueError('modify_task requires a task_id element')
1591
1592
        xmlRoot = etree.Element('modify_task', task_id=task_id)
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1593
1594
        name = kwargs.get('name', '')
1595
        if name:
1596
            _xmlName = etree.SubElement(xmlRoot, 'name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1597
            _xmlName.text = name
1598
1599
        comment = kwargs.get('comment', '')
1600
        if comment:
1601
            _xmlComment = etree.SubElement(xmlRoot, 'comment')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlComment does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1602
            _xmlComment.text = comment
1603
1604
        target_id = kwargs.get('target_id', '')
1605
        if target_id:
1606
            _xmlTarget = etree.SubElement(xmlRoot, 'target', id=target_id)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlTarget does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1607
1608
        scanner = kwargs.get('scanner', '')
1609
        if scanner:
1610
            _xmlScanner = etree.SubElement(xmlRoot, 'scanner', id=scanner)
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlScanner does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1611
1612
        schedule_periods = kwargs.get('schedule_periods', '')
1613
        if schedule_periods:
1614
            _xmlPeriod = etree.SubElement(xmlRoot, 'schedule_periods')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPeriod does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1615
            _xmlPeriod.text = str(schedule_periods)
1616
1617
        schedule = kwargs.get('schedule', '')
1618
        if schedule:
1619
            _xmlSched = etree.SubElement(xmlRoot, 'schedule', id=str(schedule))
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSched does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1620
1621
        alert = kwargs.get('alert', '')
1622
        if alert:
1623
            _xmlAlert = etree.SubElement(xmlRoot, 'alert', id=str(alert))
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlAlert does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1624
1625
        observers = kwargs.get('observers', '')
1626
        if observers:
1627
            _xmlObserver = etree.SubElement(xmlRoot, 'observers')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlObserver does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1628
            _xmlObserver.text = str(observers)
1629
1630
        preferences = kwargs.get('preferences', '')
1631
        if preferences:
1632
            _xmlPrefs = etree.SubElement(xmlRoot, 'preferences')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPrefs does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1633
            for n in range(len(preferences["scanner_name"])):
0 ignored issues
show
Coding Style Naming introduced by
The name n does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
1634
                preferences_scanner_name = preferences["scanner_name"][n]
1635
                preferences_value = preferences["value"][n]
1636
                _xmlPref = etree.SubElement(_xmlPrefs, 'preference')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPref does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1637
                _xmlScan = etree.SubElement(_xmlPref, 'scanner_name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlScan does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1638
                _xmlScan.text = preferences_scanner_name
1639
                _xmlVal = etree.SubElement(_xmlPref, 'value')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlVal does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1640
                _xmlVal.text = preferences_value
1641
1642
        file = kwargs.get('file', '')
1643
        if file:
1644
            file_name = file['name']
1645
            file_action = file['action']
1646
            if file_action != "update" and file_action != "remove":
1647
                raise ValueError('action can only be "update" or "remove"!')
1648
            _xmlFile = etree.SubElement(xmlRoot, 'file', name=file_name,
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlFile does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1649
                                        action=file_action)
1650
1651
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1652
1653
    def modify_user_command(self, kwargs):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (21/15).
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
1654
        user_id = kwargs.get('user_id', '')
1655
        name = kwargs.get('name', '')
1656
1657
        if not user_id and not name:
1658
            raise ValueError('modify_user requires '
1659
                             'either a user_id or a name element')
1660
1661
        xmlRoot = etree.Element('modify_user', user_id=str(user_id))
0 ignored issues
show
Coding Style Naming introduced by
The name xmlRoot does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named Element.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1662
1663
        new_name = kwargs.get('new_name', '')
1664
        if new_name:
1665
            _xmlName = etree.SubElement(xmlRoot, 'new_name')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlName does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1666
            _xmlName.text = new_name
1667
1668
        password = kwargs.get('password', '')
1669
        if password:
1670
            _xmlPass = etree.SubElement(xmlRoot, 'password')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlPass does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1671
            _xmlPass.text = password
1672
1673
        role_ids = kwargs.get('role_ids', '')
1674
        if len(role_ids) > 0:
0 ignored issues
show
Unused Code introduced by
Do not use len(SEQUENCE) as condition value
Loading history...
1675
            for role in role_ids:
1676
                _xmlRole = etree.SubElement(xmlRoot, 'role',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlRole does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1677
                                            id=str(role))
1678
        hosts = kwargs.get('hosts', '')
1679
        hosts_allow = kwargs.get('hosts_allow', '')
1680
        if hosts or hosts_allow:
1681
            _xmlHosts = etree.SubElement(xmlRoot, 'hosts',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlHosts does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1682
                                         allow=str(hosts_allow))
1683
            _xmlHosts.text = hosts
1684
1685
        ifaces = kwargs.get('ifaces', '')
1686
        ifaces_allow = kwargs.get('ifaces_allow', '')
1687
        if ifaces or ifaces_allow:
1688
            _xmlIFaces = etree.SubElement(xmlRoot, 'ifaces',
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlIFaces does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1689
                                          allow=str(ifaces_allow))
1690
            _xmlIFaces.text = ifaces
1691
1692
        sources = kwargs.get('sources', '')
1693
        if sources:
1694
            _xmlSource = etree.SubElement(xmlRoot, 'sources')
0 ignored issues
show
Coding Style Naming introduced by
The name _xmlSource does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module lxml.etree does not seem to have a member named SubElement.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1695
            _xmlSource.text = sources
1696
1697
        return etree.tostring(xmlRoot).decode('utf-8')
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named tostring.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
1698