device_import.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. <div class="col-md-12 text-right">
  14. <button type="submit" class="btn btn-primary">Submit</button>
  15. {% if return_url %}
  16. <a href="{% url return_url %}" class="btn btn-default">Cancel</a>
  17. {% endif %}
  18. </div>
  19. </div>
  20. </form>
  21. <h4>CSV Format</h4>
  22. <table class="table">
  23. <thead>
  24. <tr>
  25. <th>Field</th>
  26. <th>Description</th>
  27. <th>Example</th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. <tr>
  32. <td>Name</td>
  33. <td>Device name (optional)</td>
  34. <td>rack101_sw1</td>
  35. </tr>
  36. <tr>
  37. <td>Device role</td>
  38. <td>Functional role of device</td>
  39. <td>ToR Switch</td>
  40. </tr>
  41. <tr>
  42. <td>Tenant</td>
  43. <td>Name of tenant (optional)</td>
  44. <td>Pied Piper</td>
  45. </tr>
  46. <tr>
  47. <td>Device manufacturer</td>
  48. <td>Hardware manufacturer</td>
  49. <td>Juniper</td>
  50. </tr>
  51. <tr>
  52. <td>Device model</td>
  53. <td>Hardware model</td>
  54. <td>EX4300-48T</td>
  55. </tr>
  56. <tr>
  57. <td>Platform</td>
  58. <td>Software running on device (optional)</td>
  59. <td>Juniper Junos</td>
  60. </tr>
  61. <tr>
  62. <td>Serial number</td>
  63. <td>Physical serial number (optional)</td>
  64. <td>CAB00577291</td>
  65. </tr>
  66. <tr>
  67. <td>Asset tag</td>
  68. <td>Unique alphanumeric tag (optional)</td>
  69. <td>ABC123456</td>
  70. </tr>
  71. <tr>
  72. <td>Site</td>
  73. <td>Site name</td>
  74. <td>Ashburn-VA</td>
  75. </tr>
  76. <tr>
  77. <td>Rack</td>
  78. <td>Rack name (optional)</td>
  79. <td>R101</td>
  80. </tr>
  81. <tr>
  82. <td>Position (U)</td>
  83. <td>Lowest-numbered rack unit occupied by the device (optional)</td>
  84. <td>21</td>
  85. </tr>
  86. <tr>
  87. <td>Face</td>
  88. <td>Rack face; front or rear (required if position is set)</td>
  89. <td>Rear</td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. <h4>Example</h4>
  94. <pre>rack101_sw1,ToR Switch,Pied Piper,Juniper,EX4300-48T,Juniper Junos,CAB00577291,ABC123456,Ashburn-VA,R101,21,Rear</pre>
  95. </div>
  96. </div>
  97. {% endblock %}