Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "status" to Import Devices #853

Closed
candlerb opened this issue Jan 30, 2017 · 5 comments
Closed

Add "status" to Import Devices #853

candlerb opened this issue Jan 30, 2017 · 5 comments
Labels
type: feature Introduction of new functionality to the application

Comments

@candlerb
Copy link
Contributor

candlerb commented 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:

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

@candlerb candlerb changed the title Feature: Add "comments" to Import Devices Feature: Add "comments" and "status" to Import Devices Jan 30, 2017
@jeremystretch
Copy link
Member

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 jeremystretch added the type: feature Introduction of new functionality to the application label Jan 30, 2017
@candlerb
Copy link
Contributor Author

Should be OK now #422 is done I think

@jeremystretch
Copy link
Member

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

@candlerb
Copy link
Contributor Author

candlerb commented 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']
>>>

@jeremystretch jeremystretch changed the title Feature: Add "comments" and "status" to Import Devices Add "status" to Import Devices May 9, 2017
@jeremystretch
Copy link
Member

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.

lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants