Code Duplication    Length = 26-28 lines in 2 locations

gvm/protocols/gmpv8/types.py 1 location

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

gvm/protocols/gmpv7/types.py 1 location

@@ 390-415 (lines=26) @@
387
        )
388
389
390
class FilterType(Enum):
391
    """ Enum for filter types """
392
393
    AGENT = "agent"
394
    ALERT = "alert"
395
    ASSET = "asset"
396
    SCAN_CONFIG = "config"
397
    CREDENTIAL = "credential"
398
    FILTER = "filter"
399
    GROUP = "group"
400
    HOST = "host"
401
    NOTE = "note"
402
    OPERATING_SYSTEM = "os"
403
    OVERRIDE = "override"
404
    PERMISSION = "permission"
405
    PORT_LIST = "port_list"
406
    REPORT = "report"
407
    REPORT_FORMAT = "report_format"
408
    RESULT = "result"
409
    ROLE = "role"
410
    SCHEDULE = "schedule"
411
    ALL_SECINFO = "secinfo"
412
    TAG = "tag"
413
    TARGET = "target"
414
    TASK = "task"
415
    USER = "user"
416
417
418
def get_filter_type_from_string(