Code Duplication    Length = 26-28 lines in 2 locations

gvm/protocols/gmpv8.py 1 location

@@ 165-192 (lines=28) @@
162
        )
163
164
165
class FilterType(Enum):
166
    """ Enum for filter types """
167
168
    AGENT = "agent"
169
    ALERT = "alert"
170
    ASSET = "asset"
171
    SCAN_CONFIG = "config"
172
    CREDENTIAL = "credential"
173
    FILTER = "filter"
174
    GROUP = "group"
175
    HOST = "host"
176
    NOTE = "note"
177
    OPERATING_SYSTEM = "os"
178
    OVERRIDE = "override"
179
    PERMISSION = "permission"
180
    PORT_LIST = "port_list"
181
    REPORT = "report"
182
    REPORT_FORMAT = "report_format"
183
    RESULT = "result"
184
    ROLE = "role"
185
    SCHEDULE = "schedule"
186
    ALL_SECINFO = "secinfo"
187
    TAG = "tag"
188
    TARGET = "target"
189
    TASK = "task"
190
    TICKET = "ticket"
191
    USER = "user"
192
    VULNERABILITY = "vuln"
193
194
195
def get_filter_type_from_string(

gvm/protocols/gmpv7.py 1 location

@@ 373-398 (lines=26) @@
370
        )
371
372
373
class FilterType(Enum):
374
    """ Enum for filter types """
375
376
    AGENT = "agent"
377
    ALERT = "alert"
378
    ASSET = "asset"
379
    SCAN_CONFIG = "config"
380
    CREDENTIAL = "credential"
381
    FILTER = "filter"
382
    GROUP = "group"
383
    HOST = "host"
384
    NOTE = "note"
385
    OPERATING_SYSTEM = "os"
386
    OVERRIDE = "override"
387
    PERMISSION = "permission"
388
    PORT_LIST = "port_list"
389
    REPORT = "report"
390
    REPORT_FORMAT = "report_format"
391
    RESULT = "result"
392
    ROLE = "role"
393
    SCHEDULE = "schedule"
394
    ALL_SECINFO = "secinfo"
395
    TAG = "tag"
396
    TARGET = "target"
397
    TASK = "task"
398
    USER = "user"
399
400
401
def get_filter_type_from_string(