2017-06-16 16:01:44 -04:00
|
|
|
# Models which support custom fields
|
2019-04-17 13:36:05 -04:00
|
|
|
CUSTOMFIELD_MODELS = [
|
|
|
|
'circuits.circuit',
|
|
|
|
'circuits.provider',
|
|
|
|
'dcim.device',
|
|
|
|
'dcim.devicetype',
|
|
|
|
'dcim.powerfeed',
|
|
|
|
'dcim.rack',
|
|
|
|
'dcim.site',
|
|
|
|
'ipam.aggregate',
|
|
|
|
'ipam.ipaddress',
|
|
|
|
'ipam.prefix',
|
|
|
|
'ipam.service',
|
|
|
|
'ipam.vlan',
|
|
|
|
'ipam.vrf',
|
|
|
|
'secrets.secret',
|
|
|
|
'tenancy.tenant',
|
|
|
|
'virtualization.cluster',
|
|
|
|
'virtualization.virtualmachine',
|
|
|
|
]
|
2017-06-16 16:01:44 -04:00
|
|
|
|
2019-04-15 17:12:41 -04:00
|
|
|
# Custom links
|
2019-04-17 13:36:05 -04:00
|
|
|
CUSTOMLINK_MODELS = [
|
2019-04-15 21:29:02 -04:00
|
|
|
'circuits.circuit',
|
|
|
|
'circuits.provider',
|
|
|
|
'dcim.cable',
|
|
|
|
'dcim.device',
|
|
|
|
'dcim.devicetype',
|
|
|
|
'dcim.powerpanel',
|
|
|
|
'dcim.powerfeed',
|
|
|
|
'dcim.rack',
|
|
|
|
'dcim.site',
|
|
|
|
'ipam.aggregate',
|
|
|
|
'ipam.ipaddress',
|
|
|
|
'ipam.prefix',
|
|
|
|
'ipam.service',
|
|
|
|
'ipam.vlan',
|
|
|
|
'ipam.vrf',
|
|
|
|
'secrets.secret',
|
|
|
|
'tenancy.tenant',
|
|
|
|
'virtualization.cluster',
|
|
|
|
'virtualization.virtualmachine',
|
|
|
|
]
|
|
|
|
|
2017-06-16 16:01:44 -04:00
|
|
|
# Graph types
|
|
|
|
GRAPH_TYPE_INTERFACE = 100
|
2019-09-18 15:59:52 -04:00
|
|
|
GRAPH_TYPE_DEVICE = 150
|
2017-06-16 16:01:44 -04:00
|
|
|
GRAPH_TYPE_PROVIDER = 200
|
|
|
|
GRAPH_TYPE_SITE = 300
|
|
|
|
GRAPH_TYPE_CHOICES = (
|
|
|
|
(GRAPH_TYPE_INTERFACE, 'Interface'),
|
2019-09-18 15:59:52 -04:00
|
|
|
(GRAPH_TYPE_DEVICE, 'Device'),
|
2017-06-16 16:01:44 -04:00
|
|
|
(GRAPH_TYPE_PROVIDER, 'Provider'),
|
|
|
|
(GRAPH_TYPE_SITE, 'Site'),
|
|
|
|
)
|
|
|
|
|
|
|
|
# Models which support export templates
|
|
|
|
EXPORTTEMPLATE_MODELS = [
|
2019-04-17 13:36:05 -04:00
|
|
|
'circuits.circuit',
|
|
|
|
'circuits.provider',
|
|
|
|
'dcim.cable',
|
|
|
|
'dcim.consoleport',
|
|
|
|
'dcim.device',
|
|
|
|
'dcim.devicetype',
|
|
|
|
'dcim.interface',
|
2019-09-25 12:07:41 -04:00
|
|
|
'dcim.inventoryitem',
|
2019-04-17 13:36:05 -04:00
|
|
|
'dcim.manufacturer',
|
|
|
|
'dcim.powerpanel',
|
|
|
|
'dcim.powerport',
|
|
|
|
'dcim.powerfeed',
|
|
|
|
'dcim.rack',
|
|
|
|
'dcim.rackgroup',
|
|
|
|
'dcim.region',
|
|
|
|
'dcim.site',
|
|
|
|
'dcim.virtualchassis',
|
|
|
|
'ipam.aggregate',
|
|
|
|
'ipam.ipaddress',
|
|
|
|
'ipam.prefix',
|
|
|
|
'ipam.service',
|
|
|
|
'ipam.vlan',
|
|
|
|
'ipam.vrf',
|
|
|
|
'secrets.secret',
|
|
|
|
'tenancy.tenant',
|
|
|
|
'virtualization.cluster',
|
|
|
|
'virtualization.virtualmachine',
|
2017-06-16 16:01:44 -04:00
|
|
|
]
|
|
|
|
|
2017-09-19 17:47:42 -04:00
|
|
|
# Report logging levels
|
|
|
|
LOG_DEFAULT = 0
|
|
|
|
LOG_SUCCESS = 10
|
|
|
|
LOG_INFO = 20
|
|
|
|
LOG_WARNING = 30
|
|
|
|
LOG_FAILURE = 40
|
|
|
|
LOG_LEVEL_CODES = {
|
|
|
|
LOG_DEFAULT: 'default',
|
|
|
|
LOG_SUCCESS: 'success',
|
|
|
|
LOG_INFO: 'info',
|
|
|
|
LOG_WARNING: 'warning',
|
|
|
|
LOG_FAILURE: 'failure',
|
|
|
|
}
|
2018-05-30 11:19:10 -04:00
|
|
|
|
|
|
|
# Models which support registered webhooks
|
2019-04-17 14:19:57 -04:00
|
|
|
WEBHOOK_MODELS = [
|
|
|
|
'circuits.circuit',
|
|
|
|
'circuits.provider',
|
|
|
|
'dcim.cable',
|
|
|
|
'dcim.consoleport',
|
|
|
|
'dcim.consoleserverport',
|
|
|
|
'dcim.device',
|
|
|
|
'dcim.devicebay',
|
|
|
|
'dcim.devicetype',
|
|
|
|
'dcim.interface',
|
|
|
|
'dcim.inventoryitem',
|
|
|
|
'dcim.frontport',
|
|
|
|
'dcim.manufacturer',
|
|
|
|
'dcim.poweroutlet',
|
|
|
|
'dcim.powerpanel',
|
|
|
|
'dcim.powerport',
|
|
|
|
'dcim.powerfeed',
|
|
|
|
'dcim.rack',
|
|
|
|
'dcim.rearport',
|
|
|
|
'dcim.region',
|
|
|
|
'dcim.site',
|
|
|
|
'dcim.virtualchassis',
|
|
|
|
'ipam.aggregate',
|
|
|
|
'ipam.ipaddress',
|
|
|
|
'ipam.prefix',
|
|
|
|
'ipam.service',
|
|
|
|
'ipam.vlan',
|
|
|
|
'ipam.vrf',
|
|
|
|
'secrets.secret',
|
|
|
|
'tenancy.tenant',
|
|
|
|
'virtualization.cluster',
|
|
|
|
'virtualization.virtualmachine',
|
|
|
|
]
|