Code Duplication    Length = 33-36 lines in 4 locations

gvm/protocols/gmpv8/types.py 1 location

@@ 104-139 (lines=36) @@
101
]
102
103
104
class EntityType(Enum):
105
    """ Enum for entity types """
106
107
    AGENT = "agent"
108
    ALERT = "alert"
109
    ASSET = "asset"
110
    CERT_BUND_ADV = "cert_bund_adv"
111
    CPE = "cpe"
112
    CREDENTIAL = "credential"
113
    CVE = "cve"
114
    DFN_CERT_ADV = "dfn_cert_adv"
115
    FILTER = "filter"
116
    GROUP = "group"
117
    HOST = "host"
118
    INFO = "info"
119
    NOTE = "note"
120
    NVT = "nvt"
121
    OPERATING_SYSTEM = "os"
122
    OVALDEF = "ovaldef"
123
    OVERRIDE = "override"
124
    PERMISSION = "permission"
125
    PORT_LIST = "port_list"
126
    REPORT = "report"
127
    REPORT_FORMAT = "report_format"
128
    RESULT = "result"
129
    ROLE = "role"
130
    SCAN_CONFIG = "config"
131
    SCANNER = "scanner"
132
    SCHEDULE = "schedule"
133
    TAG = "tag"
134
    TARGET = "target"
135
    TASK = "task"
136
    USER = "user"
137
138
    TICKET = "ticket"
139
    VULNERABILITY = "vuln"
140
141
142
def get_entity_type_from_string(

gvm/protocols/gmpv208/types.py 1 location

@@ 107-141 (lines=35) @@
104
]
105
106
107
class EntityType(Enum):
108
    """ Enum for entity types """
109
110
    ALERT = "alert"
111
    ASSET = "asset"
112
    CERT_BUND_ADV = "cert_bund_adv"
113
    CPE = "cpe"
114
    CREDENTIAL = "credential"
115
    CVE = "cve"
116
    DFN_CERT_ADV = "dfn_cert_adv"
117
    FILTER = "filter"
118
    GROUP = "group"
119
    HOST = "host"
120
    INFO = "info"
121
    NOTE = "note"
122
    NVT = "nvt"
123
    OPERATING_SYSTEM = "os"
124
    OVALDEF = "ovaldef"
125
    OVERRIDE = "override"
126
    PERMISSION = "permission"
127
    PORT_LIST = "port_list"
128
    REPORT = "report"
129
    REPORT_FORMAT = "report_format"
130
    RESULT = "result"
131
    ROLE = "role"
132
    SCAN_CONFIG = "config"
133
    SCANNER = "scanner"
134
    SCHEDULE = "schedule"
135
    TAG = "tag"
136
    TARGET = "target"
137
    TASK = "task"
138
    TICKET = "ticket"
139
    TLS_CERTIFICATE = "tls_certificate"
140
    USER = "user"
141
    VULNERABILITY = "vuln"
142
143
144
def get_entity_type_from_string(

gvm/protocols/gmpv7/types.py 1 location

@@ 315-347 (lines=33) @@
312
        )
313
314
315
class EntityType(Enum):
316
    """ Enum for entity types """
317
318
    AGENT = "agent"
319
    ALERT = "alert"
320
    ASSET = "asset"
321
    CERT_BUND_ADV = "cert_bund_adv"
322
    CPE = "cpe"
323
    CREDENTIAL = "credential"
324
    CVE = "cve"
325
    DFN_CERT_ADV = "dfn_cert_adv"
326
    FILTER = "filter"
327
    GROUP = "group"
328
    HOST = "host"
329
    INFO = "info"
330
    NOTE = "note"
331
    NVT = "nvt"
332
    OPERATING_SYSTEM = "os"
333
    OVALDEF = "ovaldef"
334
    OVERRIDE = "override"
335
    PERMISSION = "permission"
336
    PORT_LIST = "port_list"
337
    REPORT = "report"
338
    REPORT_FORMAT = "report_format"
339
    RESULT = "result"
340
    ROLE = "role"
341
    SCAN_CONFIG = "config"
342
    SCANNER = "scanner"
343
    SCHEDULE = "schedule"
344
    TAG = "tag"
345
    TARGET = "target"
346
    TASK = "task"
347
    USER = "user"
348
349
350
def get_entity_type_from_string(

gvm/protocols/gmpv9/types.py 1 location

@@ 100-135 (lines=36) @@
97
]
98
99
100
class EntityType(Enum):
101
    """ Enum for entity types """
102
103
    AGENT = "agent"
104
    ALERT = "alert"
105
    ASSET = "asset"
106
    CERT_BUND_ADV = "cert_bund_adv"
107
    CPE = "cpe"
108
    CREDENTIAL = "credential"
109
    CVE = "cve"
110
    DFN_CERT_ADV = "dfn_cert_adv"
111
    FILTER = "filter"
112
    GROUP = "group"
113
    HOST = "host"
114
    INFO = "info"
115
    NOTE = "note"
116
    NVT = "nvt"
117
    OPERATING_SYSTEM = "os"
118
    OVALDEF = "ovaldef"
119
    OVERRIDE = "override"
120
    PERMISSION = "permission"
121
    PORT_LIST = "port_list"
122
    REPORT = "report"
123
    REPORT_FORMAT = "report_format"
124
    RESULT = "result"
125
    ROLE = "role"
126
    SCAN_CONFIG = "config"
127
    SCANNER = "scanner"
128
    SCHEDULE = "schedule"
129
    TAG = "tag"
130
    TARGET = "target"
131
    TASK = "task"
132
    TICKET = "ticket"
133
    TLS_CERTIFICATE = "tls_certificate"
134
    USER = "user"
135
    VULNERABILITY = "vuln"
136
137
138
def get_entity_type_from_string(