Add "status" to Import Devices #670

Closed
opened 2025-12-29 16:24:36 +01:00 by adam · 5 comments
Owner

Originally created by @candlerb on GitHub (Jan 30, 2017).

I would like to be able to import "comments" as part of bulk device import. Also device "status" (Active or Offline)

Related:

  • #568 - Bulk import custom fields
  • #655 - Convert CSV import to use headers

If #655 were implemented, then presumably it would be trivial to allow all fields of the device to be imported.

Originally created by @candlerb on GitHub (Jan 30, 2017). I would like to be able to import "comments" as part of bulk device import. Also device "status" (Active or Offline) Related: * #568 - Bulk import custom fields * #655 - Convert CSV import to use headers If #655 were implemented, then presumably it would be trivial to allow all fields of the device to be imported.
adam added the type: feature label 2025-12-29 16:24:36 +01:00
adam closed this issue 2025-12-29 16:24:36 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 30, 2017):

I've shied away from enabling the import/export of free-form comments because we may run into issues concerning line breaks and formatting. I'm sure it's workable, I just haven't had the time to test it.

@jeremystretch commented on GitHub (Jan 30, 2017): I've shied away from enabling the import/export of free-form comments because we may run into issues concerning line breaks and formatting. I'm sure it's workable, I just haven't had the time to test it.
Author
Owner

@candlerb commented on GitHub (Jan 30, 2017):

Should be OK now #422 is done I think

@candlerb commented on GitHub (Jan 30, 2017): Should be OK now #422 is done I think
Author
Owner

@jeremystretch commented on GitHub (Mar 23, 2017):

We still need to devise a method for dealing with line breaks in comments.

@jeremystretch commented on GitHub (Mar 23, 2017): We still need to devise a method for dealing with line breaks in comments.
Author
Owner

@candlerb commented on GitHub (Mar 23, 2017):

The CSV format supports it by means of line breaks within quoted fields, even though such CSV files aren't amenable to normal line-oriented Unix tools like grep.

e.g. a cell with a line-break in Excel:

image

Exported as CSV:

$ cat Workbook1.csv
"Foo
Bar"

$ hexdump -C Workbook1.csv
00000000  22 46 6f 6f 0a 42 61 72  22                       |"Foo.Bar"|
00000009

Imported into Python:

>>> import csv
>>> for r in csv.reader(open('Workbook1.csv')): print repr(r)
...
['Foo\nBar']
>>>
@candlerb commented on GitHub (Mar 23, 2017): The CSV format supports it by means of line breaks within quoted fields, even though such CSV files aren't amenable to normal line-oriented Unix tools like grep. e.g. a cell with a line-break in Excel: ![image](https://cloud.githubusercontent.com/assets/44789/24254116/f6673f04-0fd9-11e7-9128-b5ea3423dcb5.png) Exported as CSV: ~~~ $ cat Workbook1.csv "Foo Bar" $ hexdump -C Workbook1.csv 00000000 22 46 6f 6f 0a 42 61 72 22 |"Foo.Bar"| 00000009 ~~~ Imported into Python: ~~~ >>> import csv >>> for r in csv.reader(open('Workbook1.csv')): print repr(r) ... ['Foo\nBar'] >>> ~~~
Author
Owner

@jeremystretch commented on GitHub (May 9, 2017):

I'm limiting the scope of this issue to the addition of the "status" field. We don't currently support the importation of comments for any models; that can be addressed separately in the future.

@jeremystretch commented on GitHub (May 9, 2017): I'm limiting the scope of this issue to the addition of the "status" field. We don't currently support the importation of comments for any models; that can be addressed separately in the future.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#670