device_import.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {% extends '_base.html' %}
  2. {% load render_table from django_tables2 %}
  3. {% load form_helpers %}
  4. {% block title %}Device Import{% endblock %}
  5. {% block content %}
  6. {% include 'dcim/inc/device_import_header.html' %}
  7. <div class="row">
  8. <div class="col-md-12">
  9. <form action="." method="post" class="form">
  10. {% csrf_token %}
  11. {% render_form form %}
  12. <div class="form-group">
  13. <button type="submit" class="btn btn-primary">Submit</button>
  14. <a href="{% url obj_list_url %}" class="btn btn-default">Cancel</a>
  15. </div>
  16. </form>
  17. <h4>CSV Format</h4>
  18. <table class="table">
  19. <thead>
  20. <tr>
  21. <th>Field</th>
  22. <th>Description</th>
  23. <th>Example</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. <tr>
  28. <td>Name</td>
  29. <td>Device name (optional)</td>
  30. <td>rack101_sw1</td>
  31. </tr>
  32. <tr>
  33. <td>Device role</td>
  34. <td>Functional role of device</td>
  35. <td>ToR Switch</td>
  36. </tr>
  37. <tr>
  38. <td>Tenant</td>
  39. <td>Name of tenant (optional)</td>
  40. <td>Pied Piper</td>
  41. </tr>
  42. <tr>
  43. <td>Device manufacturer</td>
  44. <td>Hardware manufacturer</td>
  45. <td>Juniper</td>
  46. </tr>
  47. <tr>
  48. <td>Device model</td>
  49. <td>Hardware model</td>
  50. <td>EX4300-48T</td>
  51. </tr>
  52. <tr>
  53. <td>Platform</td>
  54. <td>Software running on device (optional)</td>
  55. <td>Juniper Junos</td>
  56. </tr>
  57. <tr>
  58. <td>Serial number</td>
  59. <td>Physical serial number (optional)</td>
  60. <td>CAB00577291</td>
  61. </tr>
  62. <tr>
  63. <td>Asset tag</td>
  64. <td>Unique alphanumeric tag (optional)</td>
  65. <td>ABC123456</td>
  66. </tr>
  67. <tr>
  68. <td>Site</td>
  69. <td>Site name</td>
  70. <td>Ashburn-VA</td>
  71. </tr>
  72. <tr>
  73. <td>Rack</td>
  74. <td>Rack name</td>
  75. <td>R101</td>
  76. </tr>
  77. <tr>
  78. <td>Position (U)</td>
  79. <td>Lowest-numbered rack unit occupied by the device (optional)</td>
  80. <td>21</td>
  81. </tr>
  82. <tr>
  83. <td>Face</td>
  84. <td>Rack face; front or rear (required if position is set)</td>
  85. <td>Rear</td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. <h4>Example</h4>
  90. <pre>rack101_sw1,ToR Switch,Pied Piper,Juniper,EX4300-48T,Juniper Junos,CAB00577291,ABC123456,Ashburn-VA,R101,21,Rear</pre>
  91. </div>
  92. </div>
  93. {% endblock %}