constants.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Models which support custom fields
  2. CUSTOMFIELD_MODELS = [
  3. 'circuits.circuit',
  4. 'circuits.provider',
  5. 'dcim.device',
  6. 'dcim.devicetype',
  7. 'dcim.powerfeed',
  8. 'dcim.rack',
  9. 'dcim.site',
  10. 'ipam.aggregate',
  11. 'ipam.ipaddress',
  12. 'ipam.prefix',
  13. 'ipam.service',
  14. 'ipam.vlan',
  15. 'ipam.vrf',
  16. 'secrets.secret',
  17. 'tenancy.tenant',
  18. 'virtualization.cluster',
  19. 'virtualization.virtualmachine',
  20. ]
  21. # Custom links
  22. CUSTOMLINK_MODELS = [
  23. 'circuits.circuit',
  24. 'circuits.provider',
  25. 'dcim.cable',
  26. 'dcim.device',
  27. 'dcim.devicetype',
  28. 'dcim.powerpanel',
  29. 'dcim.powerfeed',
  30. 'dcim.rack',
  31. 'dcim.site',
  32. 'ipam.aggregate',
  33. 'ipam.ipaddress',
  34. 'ipam.prefix',
  35. 'ipam.service',
  36. 'ipam.vlan',
  37. 'ipam.vrf',
  38. 'secrets.secret',
  39. 'tenancy.tenant',
  40. 'virtualization.cluster',
  41. 'virtualization.virtualmachine',
  42. ]
  43. # Models which support export templates
  44. EXPORTTEMPLATE_MODELS = [
  45. 'circuits.circuit',
  46. 'circuits.provider',
  47. 'dcim.cable',
  48. 'dcim.consoleport',
  49. 'dcim.device',
  50. 'dcim.devicetype',
  51. 'dcim.interface',
  52. 'dcim.inventoryitem',
  53. 'dcim.manufacturer',
  54. 'dcim.powerpanel',
  55. 'dcim.powerport',
  56. 'dcim.powerfeed',
  57. 'dcim.rack',
  58. 'dcim.rackgroup',
  59. 'dcim.region',
  60. 'dcim.site',
  61. 'dcim.virtualchassis',
  62. 'ipam.aggregate',
  63. 'ipam.ipaddress',
  64. 'ipam.prefix',
  65. 'ipam.service',
  66. 'ipam.vlan',
  67. 'ipam.vrf',
  68. 'secrets.secret',
  69. 'tenancy.tenant',
  70. 'virtualization.cluster',
  71. 'virtualization.virtualmachine',
  72. ]
  73. # Report logging levels
  74. LOG_DEFAULT = 0
  75. LOG_SUCCESS = 10
  76. LOG_INFO = 20
  77. LOG_WARNING = 30
  78. LOG_FAILURE = 40
  79. LOG_LEVEL_CODES = {
  80. LOG_DEFAULT: 'default',
  81. LOG_SUCCESS: 'success',
  82. LOG_INFO: 'info',
  83. LOG_WARNING: 'warning',
  84. LOG_FAILURE: 'failure',
  85. }
  86. # Models which support registered webhooks
  87. WEBHOOK_MODELS = [
  88. 'circuits.circuit',
  89. 'circuits.provider',
  90. 'dcim.cable',
  91. 'dcim.consoleport',
  92. 'dcim.consoleserverport',
  93. 'dcim.device',
  94. 'dcim.devicebay',
  95. 'dcim.devicetype',
  96. 'dcim.interface',
  97. 'dcim.inventoryitem',
  98. 'dcim.frontport',
  99. 'dcim.manufacturer',
  100. 'dcim.poweroutlet',
  101. 'dcim.powerpanel',
  102. 'dcim.powerport',
  103. 'dcim.powerfeed',
  104. 'dcim.rack',
  105. 'dcim.rearport',
  106. 'dcim.region',
  107. 'dcim.site',
  108. 'dcim.virtualchassis',
  109. 'ipam.aggregate',
  110. 'ipam.ipaddress',
  111. 'ipam.prefix',
  112. 'ipam.service',
  113. 'ipam.vlan',
  114. 'ipam.vrf',
  115. 'secrets.secret',
  116. 'tenancy.tenant',
  117. 'virtualization.cluster',
  118. 'virtualization.virtualmachine',
  119. ]