Passed
Pull Request — master (#119)
by
unknown
02:25
created

gmp.protocols.gmpv7.Gmp.create_agent()   A

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nop 8
dl 0
loc 6
rs 10
c 0
b 0
f 0

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
# -*- coding: utf-8 -*-
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
Module for communication with gvmd in Greenbone Management Protocol version 7
20
"""
21
22
import logging
23
24
from lxml import etree
25
26
from gmp.errors import GmpError
27
from gmp.xml import _GmpCommandFactory as GmpCommandFactory
28
29
logger = logging.getLogger(__name__)
0 ignored issues
show
Coding Style Naming introduced by
The name logger does not conform to the constant naming conventions ((([A-Z_][A-Z0-9_]*)|(__.*__))$).

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

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

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

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

Loading history...
30
31
PROTOCOL_VERSION = (7,)
32
33
def arguments_to_string(kwargs):
34
    """Convert arguments
35
36
    Converts dictionaries into gmp arguments string
37
38
    Arguments:
39
        kwargs {dict} -- Arguments
40
41
    Returns:
42
        string -- Arguments as string
43
    """
44
    msg = ''
45
    for key, value in kwargs.items():
46
        msg += str(key) + '=\'' + str(value) + '\' '
47
48
    return msg
49
50
def _check_command_status(xml):
51
    """Check gmp response
52
53
    Look into the gmp response and check for the status in the root element
54
55
    Arguments:
56
        xml {string} -- XML-Source
57
58
    Returns:
59
        bool -- True if valid, otherwise False
60
    """
61
62
    if xml is 0 or xml is None:
63
        logger.error('XML Command is empty')
64
        return False
65
66
    try:
67
        parser = etree.XMLParser(encoding='utf-8', recover=True)
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named XMLParser.

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

The member could have been renamed or removed.

Loading history...
68
69
        root = etree.XML(xml, parser=parser)
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named XML.

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

The member could have been renamed or removed.

Loading history...
70
        status = root.attrib['status']
71
        return status is not None and status[0] == '2'
72
73
    except etree.Error as e:
0 ignored issues
show
Bug introduced by
The Module lxml.etree does not seem to have a member named Error.

This 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 e does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

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

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

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

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

Loading history...
74
        logger.error('etree.XML(xml): %s', e)
75
        return False
76
77
78
class Gmp:
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 (115/20)
Loading history...
79
    """Python interface for Greenbone Management Protocol
80
81
    This class implements the `Greenbone Management Protocol version 7`_
82
83
    Attributes:
84
        connection (:class:`gmp.connection.GmpConnection`): Connection to use to
85
            talk with the gvmd daemon. See :mod:`gmp.connection` for possible
86
            connection types.
87
        transform (`callable`_, optional): Optional transform callable to
88
            convert response data. After each request the callable gets passed
89
            the plain response data which can be used to check the data and/or
90
            conversion into different representaitions like a xml dom.
91
92
            See :mod:`gmp.transform` for existing transforms.
93
94
    .. _Greenbone Management Protocol version 7:
95
        https://docs.greenbone.net/API/GMP/gmp-7.0.html
96
    .. _callable:
97
        https://docs.python.org/3.6/library/functions.html#callable
98
    """
99
100
    def __init__(self, connection, transform=None):
101
        # GMP Message Creator
102
        self._generator = GmpCommandFactory()
103
        self._connection = connection
104
105
        self._connected = False
106
107
        # Is authenticated on gvm
108
        self._authenticated = False
109
110
        self._transform_callable = transform
111
112
    @staticmethod
113
    def get_protocol_version():
114
        """Allow to determine the Greenbone Management Protocol version.
115
116
            Returns:
117
                str: Implemented version of the Greenbone Management Protocol
118
        """
119
        return '.'.join(str(x) for x in PROTOCOL_VERSION)
120
121
    def _read(self):
122
        """Read a command response from gvmd
123
124
        Returns:
125
            str: Response from server.
126
        """
127
        response = self._connection.read()
128
129
        logger.debug('read() %i Bytes response: %s', len(response), response)
130
131
        if response is None or len(str(response)) == 0:
0 ignored issues
show
Unused Code introduced by
Do not use len(SEQUENCE) as condition value
Loading history...
132
            raise GmpError('Connection was closed by remote server')
133
134
        return response
135
136
    def _send(self, data):
137
        """Send a command to gvmd
138
139
        Args:
140
            data (str): Data to be send over the connection to gvmd
141
        """
142
        self._connect()
143
        self._connection.send(data)
144
145
    def _connect(self):
146
        if not self.is_connected():
147
            self._connection.connect()
148
            self._connected = True
149
150
    def _transform(self, data):
151
        transform = self._transform_callable
152
        if transform is None:
153
            return data
154
        return transform(data)
155
156
    def is_connected(self):
157
        """Status of the current connection to gvmd
158
159
        Returns:
160
            bool: True if a connection to gvmd has been established.
161
        """
162
        return self._connected
163
164
    def is_authenticated(self):
165
        """Checks if the user is authenticated
166
167
        If the user is authenticated privilged GMP commands like get_tasks
168
        may be send to gvmd.
169
170
        Returns:
171
            bool: True if an authenticated connection to gvmd has been
172
            established.
173
        """
174
        return self._authenticated
175
176
    def disconnect(self):
177
        """Disconnect the connection to gvmd.
178
179
        Ends and closes the connection to gvmd.
180
        """
181
        if self.is_connected():
182
            self._connection.disconnect()
183
            self._connected = False
184
185
    def send_command(self, cmd):
186
        """Send a GMP command to gsad
187
188
        If the class isn't connected to gvmd yet the connection will be
189
        established automatically.
190
191
        Arguments:
192
            cmd (str): GMP command as string to be send over the connection to
193
                gvmd.
194
195
        Returns:
196
            any: The actual returned type depends on the set transform.
197
198
            Per default - if no transform is set explicitly - the response is
199
            returned as string.
200
        """
201
        self._send(cmd)
202
        response = self._read()
203
        return self._transform(response)
204
205
    def authenticate(self, username, password):
206
        """Authenticate to gvmd.
207
208
        The generated authenticate command will be send to server.
209
        Afterwards the response is read, tranformed and returned.
210
211
        Arguments:
212
            username (str): Username
213
            password (str): Password
214
215
        Returns:
216
            any, str by default: Transformed response from server.
217
        """
218
        cmd = self._generator.create_authenticate_command(
219
            username=username, password=password)
220
221
        self._send(cmd)
222
        response = self._read()
223
224
        if _check_command_status(response):
225
            self._authenticated = True
226
227
        return self._transform(response)
228
229
    def create_agent(self, installer, signature, name, comment='', copy='',
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...
230
                     howto_install='', howto_use=''):
231
        cmd = self._generator.create_agent_command(
232
            installer, signature, name, comment, copy, howto_install,
233
            howto_use)
234
        return self.send_command(cmd)
235
236
    def create_alert(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...
237
                     copy='', comment=''):
238
        cmd = self._generator.create_alert_command(name, condition, event,
239
                                                   method, filter_id, copy,
240
                                                   comment)
241
        return self.send_command(cmd)
242
243
    def create_asset(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...
244
        # TODO: Add the missing second method. Also the docs are not complete!
0 ignored issues
show
Coding Style introduced by
TODO and FIXME comments should generally be avoided.
Loading history...
245
        cmd = self._generator.create_asset_command(name, asset_type, comment)
246
        return self.send_command(cmd)
247
248
    def create_config(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...
249
        cmd = self._generator.create_config_command(copy_id, name)
250
        return self.send_command(cmd)
251
252
    def create_credential(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...
253
        cmd = self._generator.create_credential_command(name, kwargs)
254
        return self.send_command(cmd)
255
256
    def create_filter(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...
257
        cmd = self._generator.create_filter_command(name, make_unique,
258
                                                    kwargs)
259
        return self.send_command(cmd)
260
261
    def create_group(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...
262
        cmd = self._generator.create_group_command(name, kwargs)
263
        return self.send_command(cmd)
264
265
    # TODO: Create notes with comment returns bogus element. Research
0 ignored issues
show
Coding Style introduced by
TODO and FIXME comments should generally be avoided.
Loading history...
266
    def create_note(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...
267
        cmd = self._generator.create_note_command(text, nvt_oid, kwargs)
268
        return self.send_command(cmd)
269
270
    def create_override(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...
271
        cmd = self._generator.create_override_command(text, nvt_oid, kwargs)
272
        return self.send_command(cmd)
273
274
    def create_permission(self, name, subject_id, permission_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...
275
        cmd = self._generator.create_permission_command(
276
            name, subject_id, permission_type, kwargs)
277
        return self.send_command(cmd)
278
279
    def create_port_list(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...
280
        cmd = self._generator.create_port_list_command(name, port_range, kwargs)
281
        return self.send_command(cmd)
282
283
    def create_port_range(self, port_list_id, start, end, port_range_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...
best-practice introduced by
Too many arguments (6/5)
Loading history...
284
                          comment=''):
285
        cmd = self._generator.create_port_range_command(
286
            port_list_id, start, end, port_range_type, comment)
287
        return self.send_command(cmd)
288
289
    def create_report(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...
290
        cmd = self._generator.create_report_command(report_xml_string, kwargs)
291
        return self.send_command(cmd)
292
293
    def create_role(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...
294
        cmd = self._generator.create_role_command(name, kwargs)
295
        return self.send_command(cmd)
296
297
    def create_scanner(self, name, host, port, scanner_type, ca_pub,
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...
298
                       credential_id, **kwargs):
299
        cmd = self._generator.create_scanner_command(name, host, port,
300
                                                     scanner_type, ca_pub,
301
                                                     credential_id, kwargs)
302
        return self.send_command(cmd)
303
304
    def create_schedule(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...
305
        cmd = self._generator.create_schedule_command(name, kwargs)
306
        return self.send_command(cmd)
307
308
    def create_tag(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...
309
        cmd = self._generator.create_tag_command(name, resource_id,
310
                                                 resource_type, kwargs)
311
        return self.send_command(cmd)
312
313
    def create_target(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...
314
        # TODO: Missing variables
0 ignored issues
show
Coding Style introduced by
TODO and FIXME comments should generally be avoided.
Loading history...
315
        cmd = self._generator.create_target_command(name, make_unique, kwargs)
316
        return self.send_command(cmd)
317
318
    def create_task(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...
319
                    alert_ids=None, comment=''):
320
        if alert_ids is None:
321
            alert_ids = []
322
        cmd = self._generator.create_task_command(
323
            name, config_id, target_id, scanner_id, alert_ids, comment)
324
        return self.send_command(cmd)
325
326
    def create_user(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...
327
                    ifaces_allow='0', role_ids=(), hosts=None, ifaces=None):
328
        cmd = self._generator.create_user_command(
329
            name, password, copy, hosts_allow, ifaces_allow, role_ids, hosts,
330
            ifaces)
331
        return self.send_command(cmd)
332
333
    def delete_agent(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...
334
        cmd = self._generator.delete_agent_command(kwargs)
335
        return self.send_command(cmd)
336
337
    def delete_alert(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...
338
        cmd = self._generator.delete_alert_command(kwargs)
339
        return self.send_command(cmd)
340
341
    def delete_asset(self, asset_id, ultimate=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...
342
        cmd = self._generator.delete_asset_command(asset_id, ultimate)
343
        return self.send_command(cmd)
344
345
    def delete_config(self, config_id, ultimate=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...
346
        cmd = self._generator.delete_config_command(config_id, ultimate)
347
        return self.send_command(cmd)
348
349
    def delete_credential(self, credential_id, ultimate=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...
350
        cmd = self._generator.delete_credential_command(credential_id, ultimate)
351
        return self.send_command(cmd)
352
353
    def delete_filter(self, filter_id, ultimate=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...
354
        cmd = self._generator.delete_filter_command(filter_id, ultimate)
355
        return self.send_command(cmd)
356
357
    def delete_group(self, group_id, ultimate=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...
358
        cmd = self._generator.delete_group_command(group_id, ultimate)
359
        return self.send_command(cmd)
360
361
    def delete_note(self, note_id, ultimate=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...
362
        cmd = self._generator.delete_note_command(note_id, ultimate)
363
        return self.send_command(cmd)
364
365
    def delete_override(self, override_id, ultimate=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...
366
        cmd = self._generator.delete_override_command(override_id, ultimate)
367
        return self.send_command(cmd)
368
369
    def delete_permission(self, permission_id, ultimate=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...
370
        cmd = self._generator.delete_permission_command(permission_id, ultimate)
371
        return self.send_command(cmd)
372
373
    def delete_port_list(self, port_list_id, ultimate=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...
374
        cmd = self._generator.delete_port_list_command(port_list_id, ultimate)
375
        return self.send_command(cmd)
376
377
    def delete_port_range(self, port_range_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...
378
        cmd = self._generator.delete_port_range_command(port_range_id)
379
        return self.send_command(cmd)
380
381
    def delete_report(self, report_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...
382
        cmd = self._generator.delete_report_command(report_id)
383
        return self.send_command(cmd)
384
385
    def delete_report_format(self, report_format_id, ultimate=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...
386
        cmd = self._generator.delete_report_format_command(
387
            report_format_id, ultimate)
388
        return self.send_command(cmd)
389
390
    def delete_role(self, role_id, ultimate=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...
391
        cmd = self._generator.delete_role_command(role_id, ultimate)
392
        return self.send_command(cmd)
393
394
    def delete_scanner(self, scanner_id, ultimate=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...
395
        cmd = self._generator.delete_scanner_command(scanner_id, ultimate)
396
        return self.send_command(cmd)
397
398
    def delete_schedule(self, schedule_id, ultimate=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...
399
        cmd = self._generator.delete_schedule_command(schedule_id, ultimate)
400
        return self.send_command(cmd)
401
402
    def delete_tag(self, tag_id, ultimate=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...
403
        cmd = self._generator.delete_tag_command(tag_id, ultimate)
404
        return self.send_command(cmd)
405
406
    def delete_target(self, target_id, ultimate=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...
407
        cmd = self._generator.delete_target_command(target_id, ultimate)
408
        return self.send_command(cmd)
409
410
    def delete_task(self, task_id, ultimate=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...
411
        cmd = self._generator.delete_task_command(task_id, ultimate)
412
        return self.send_command(cmd)
413
414
    def delete_user(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...
415
        cmd = self._generator.delete_user_command(kwargs)
416
        return self.send_command(cmd)
417
418
    def describe_auth(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...
419
        return self.send_command('<describe_auth/>')
420
421
    def empty_trashcan(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...
422
        return self.send_command('<empty_trashcan/>')
423
424
    def get_agents(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...
425
        cmd = '<get_agents {0}/>'.format(arguments_to_string(kwargs))
426
        return self.send_command(cmd)
427
428
    def get_aggregates(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...
429
        cmd = '<get_aggregates {0}/>'.format(arguments_to_string(kwargs))
430
        return self.send_command(cmd)
431
432
    def get_alerts(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...
433
        cmd = '<get_alerts {0}/>'.format(arguments_to_string(kwargs))
434
        return self.send_command(cmd)
435
436
    def get_assets(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...
437
        cmd = '<get_assets {0}/>'.format(arguments_to_string(kwargs))
438
        return self.send_command(cmd)
439
440
    def get_credentials(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...
441
        cmd = '<get_credentials {0}/>'.format(arguments_to_string(kwargs))
442
        return self.send_command(cmd)
443
444
    def get_configs(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...
445
        cmd = '<get_configs {0}/>'.format(arguments_to_string(kwargs))
446
        return self.send_command(cmd)
447
448
    def get_feeds(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...
449
        cmd = '<get_feeds {0}/>'.format(arguments_to_string(kwargs))
450
        return self.send_command(cmd)
451
452
    def get_filters(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...
453
        cmd = '<get_filters {0}/>'.format(arguments_to_string(kwargs))
454
        return self.send_command(cmd)
455
456
    def get_groups(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...
457
        cmd = '<get_groups {0}/>'.format(arguments_to_string(kwargs))
458
        return self.send_command(cmd)
459
460
    def get_info(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...
461
        cmd = '<get_info {0}/>'.format(arguments_to_string(kwargs))
462
        return self.send_command(cmd)
463
464
    def get_notes(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...
465
        cmd = '<get_notes {0}/>'.format(arguments_to_string(kwargs))
466
        return self.send_command(cmd)
467
468
    def get_nvts(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...
469
        cmd = '<get_nvts {0}/>'.format(arguments_to_string(kwargs))
470
        return self.send_command(cmd)
471
472
    def get_nvt_families(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...
473
        cmd = '<get_nvt_families {0}/>'.format(arguments_to_string(kwargs))
474
        return self.send_command(cmd)
475
476
    def get_overrides(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...
477
        cmd = '<get_overrides {0}/>'.format(arguments_to_string(kwargs))
478
        return self.send_command(cmd)
479
480
    def get_permissions(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...
481
        cmd = '<get_permissions {0}/>'.format(arguments_to_string(kwargs))
482
        return self.send_command(cmd)
483
484
    def get_port_lists(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...
485
        cmd = '<get_port_lists {0}/>'.format(arguments_to_string(kwargs))
486
        return self.send_command(cmd)
487
488
    def get_preferences(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...
489
        cmd = '<get_preferences {0}/>'.format(arguments_to_string(kwargs))
490
        return self.send_command(cmd)
491
492
    def get_reports(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...
493
        cmd = '<get_reports {0}/>'.format(arguments_to_string(kwargs))
494
        return self.send_command(cmd)
495
496
    def get_report_formats(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...
497
        cmd = '<get_report_formats {0}/>'.format(arguments_to_string(kwargs))
498
        return self.send_command(cmd)
499
500
    def get_results(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...
501
        cmd = '<get_results {0}/>'.format(arguments_to_string(kwargs))
502
        return self.send_command(cmd)
503
504
    def get_roles(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...
505
        cmd = '<get_roles {0}/>'.format(arguments_to_string(kwargs))
506
        return self.send_command(cmd)
507
508
    def get_scanners(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...
509
        cmd = '<get_scanners {0}/>'.format(arguments_to_string(kwargs))
510
        return self.send_command(cmd)
511
512
    def get_schedules(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...
513
        cmd = '<get_schedules {0}/>'.format(arguments_to_string(kwargs))
514
        return self.send_command(cmd)
515
516
    def get_settings(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...
517
        cmd = '<get_settings {0}/>'.format(arguments_to_string(kwargs))
518
        return self.send_command(cmd)
519
520
    def get_system_reports(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...
521
        cmd = '<get_system_reports {0}/>'.format(arguments_to_string(kwargs))
522
        return self.send_command(cmd)
523
524
    def get_tags(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...
525
        cmd = '<get_tags {0}/>'.format(arguments_to_string(kwargs))
526
        return self.send_command(cmd)
527
528
    def get_targets(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...
529
        cmd = '<get_targets {0}/>'.format(arguments_to_string(kwargs))
530
        return self.send_command(cmd)
531
532
    def get_tasks(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...
533
        cmd = '<get_tasks {0}/>'.format(arguments_to_string(kwargs))
534
        return self.send_command(cmd)
535
536
    def get_users(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...
537
        cmd = '<get_users {0}/>'.format(arguments_to_string(kwargs))
538
        return self.send_command(cmd)
539
540
    def get_version(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...
541
        return self.send_command('<get_version/>')
542
543
    def help(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...
544
        cmd = '<help {0} />'.format(arguments_to_string(kwargs))
545
        return self.send_command(cmd)
546
547
    def modify_agent(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...
548
        cmd = self._generator.modify_agent_command(agent_id, name, comment)
549
        return self.send_command(cmd)
550
551
    def modify_alert(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...
552
        cmd = self._generator.modify_alert_command(alert_id, kwargs)
553
        return self.send_command(cmd)
554
555
    def modify_asset(self, asset_id, 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...
556
        cmd = '<modify_asset asset_id="%s"><comment>%s</comment>' \
557
              '</modify_asset>' % (asset_id, comment)
558
        return self.send_command(cmd)
559
560
    def modify_auth(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...
561
        cmd = self._generator.modify_auth_command(group_name,
562
                                                  auth_conf_settings)
563
        return self.send_command(cmd)
564
565
    def modify_config(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...
566
        cmd = self._generator.modify_config_command(selection, kwargs)
567
        return self.send_command(cmd)
568
569
    def modify_credential(self, credential_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...
570
        cmd = self._generator.modify_credential_command(
571
            credential_id, kwargs)
572
        return self.send_command(cmd)
573
574
    def modify_filter(self, filter_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...
575
        cmd = self._generator.modify_filter_command(filter_id, kwargs)
576
        return self.send_command(cmd)
577
578
    def modify_group(self, group_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...
579
        cmd = self._generator.modify_group_command(group_id, kwargs)
580
        return self.send_command(cmd)
581
582
    def modify_note(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...
583
        cmd = self._generator.modify_note_command(note_id, text, kwargs)
584
        return self.send_command(cmd)
585
586
    def modify_override(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...
587
        cmd = self._generator.modify_override_command(override_id, text,
588
                                                      kwargs)
589
        return self.send_command(cmd)
590
591
    def modify_permission(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...
592
        cmd = self._generator.modify_permission_command(
593
            permission_id, kwargs)
594
        return self.send_command(cmd)
595
596
    def modify_port_list(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...
597
        cmd = self._generator.modify_port_list_command(port_list_id, kwargs)
598
        return self.send_command(cmd)
599
600
    def modify_report(self, report_id, 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...
601
        cmd = '<modify_report report_id="{0}"><comment>{1}</comment>' \
602
              '</modify_report>'.format(report_id, comment)
603
        return self.send_command(cmd)
604
605
    def modify_report_format(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...
606
        cmd = self._generator.modify_report_format_command(report_format_id,
607
                                                           kwargs)
608
        return self.send_command(cmd)
609
610
    def modify_role(self, role_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...
611
        cmd = self._generator.modify_role_command(role_id, kwargs)
612
        return self.send_command(cmd)
613
614
    def modify_scanner(self, scanner_id, host, port, scanner_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...
615
        cmd = self._generator.modify_scanner_command(scanner_id, host, port,
616
                                                     scanner_type, kwargs)
617
        return self.send_command(cmd)
618
619
    def modify_schedule(self, schedule_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...
620
        cmd = self._generator.modify_schedule_command(schedule_id, kwargs)
621
        return self.send_command(cmd)
622
623
    def modify_setting(self, setting_id, 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...
624
        cmd = '<modify_setting setting_id="{0}"><name>{1}</name>' \
625
              '<value>{2}</value></modify_setting>' \
626
              ''.format(setting_id, name, value)
627
        return self.send_command(cmd)
628
629
    def modify_tag(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...
630
        cmd = self._generator.modify_tag_command(tag_id, kwargs)
631
        return self.send_command(cmd)
632
633
    def modify_target(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...
634
        cmd = self._generator.modify_target_command(target_id, kwargs)
635
        return self.send_command(cmd)
636
637
    def modify_task(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...
638
        cmd = self._generator.modify_task_command(task_id, kwargs)
639
        return self.send_command(cmd)
640
641
    def modify_user(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...
642
        cmd = self._generator.modify_user_command(kwargs)
643
        return self.send_command(cmd)
644
645
    def move_task(self, task_id, slave_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...
646
        cmd = '<move_task task_id="{0}" slave_id="{1}"/>'.format(
647
            task_id, slave_id)
648
        return self.send_command(cmd)
649
650
    def restore(self, entity_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...
651
        cmd = '<restore id="{0}"/>'.format(entity_id)
652
        return self.send_command(cmd)
653
654
    def resume_task(self, task_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...
655
        cmd = '<resume_task task_id="{0}"/>'.format(task_id)
656
        return self.send_command(cmd)
657
658
    def start_task(self, task_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...
659
        cmd = '<start_task task_id="{0}"/>'.format(task_id)
660
        return self.send_command(cmd)
661
662
    def stop_task(self, task_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...
663
        cmd = '<stop_task task_id="{0}"/>'.format(task_id)
664
        return self.send_command(cmd)
665
666
    def sync_cert(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...
667
        cmd = '<sync_cert/>'
668
        return self.send_command(cmd)
669
670
    def sync_config(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...
671
        cmd = '<sync_config/>'
672
        return self.send_command(cmd)
673
674
    def sync_feed(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...
675
        cmd = '<sync_feed/>'
676
        return self.send_command(cmd)
677
678
    def sync_scap(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...
679
        cmd = '<sync_scap/>'
680
        return self.send_command(cmd)
681
682
    def test_alert(self, alert_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...
683
        cmd = '<test_alert alert_id="{0}"/>'.format(alert_id)
684
        return self.send_command(cmd)
685
686
    def verify_agent(self, agent_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...
687
        cmd = '<verify_agent agent_id="{0}"/>'.format(agent_id)
688
        return self.send_command(cmd)
689
690
    def verify_report_format(self, report_format_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...
691
        cmd = '<verify_report_format report_format_id="{0}"/>'.format(
692
            report_format_id)
693
        return self.send_command(cmd)
694
695
    def verify_scanner(self, 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...
696
        cmd = '<verify_scanner scanner_id="{0}"/>'.format(scanner_id)
697
        return self.send_command(cmd)
698