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

Nautobot 2.2 can't import DeviceType yaml or json files #5405

Closed
gsnider2195 opened this issue Mar 7, 2024 · 5 comments · Fixed by #5425
Closed

Nautobot 2.2 can't import DeviceType yaml or json files #5405

gsnider2195 opened this issue Mar 7, 2024 · 5 comments · Fixed by #5425
Assignees
Labels
type: bug Something isn't working as expected
Milestone

Comments

@gsnider2195
Copy link
Contributor

Environment

  • Nautobot version (Docker tag too if applicable): 2.2.0a1
  • Python version: n/a
  • Database platform, version: n/a
  • Middleware(s): n/a

Steps to Reproduce

  1. Go to next.demo.nautobot.com
  2. Click on Devices -> Device Types
  3. Click on the Import button

Expected Behavior

I'm directed to the form at https://next.demo.nautobot.com/dcim/device-types/import/ or a job form that can accept YAML or JSON

Observed Behavior

I'm directed to the generic CSV job import form at https://next.demo.nautobot.com/extras/jobs/nautobot.core.jobs.ImportObjects/run/?content_type=110

@gsnider2195 gsnider2195 added type: bug Something isn't working as expected triage This issue is new and has not been reviewed. labels Mar 7, 2024
@gsnider2195
Copy link
Contributor Author

As part of this issue we should also update the import logic to default any device component template CharField with defined choices to an other choice if we encounter a choice we don't recognize.

@gsnider2195 gsnider2195 changed the title Nautobot 2.2 can't import DeviceType yaml Nautobot 2.2 can't import DeviceType yaml or json files Mar 7, 2024
@glennmatthews
Copy link
Contributor

IMO we should keep the default CSV import button for DeviceTypes and add a new "Import Single YAML/JSON" button to the list view that explicitly goes to the /import/ URL.

@gsnider2195
Copy link
Contributor Author

Perhaps they could be separate tabs on the device type import view? That view already has tabs so we could add one more?

image

@lampwins lampwins removed the triage This issue is new and has not been reviewed. label Mar 8, 2024
@lampwins lampwins added this to the v2.2 milestone Mar 8, 2024
@lampwins
Copy link
Member

lampwins commented Mar 8, 2024

Screenshot 2024-03-08 at 2.43.59 PM.png

Let's use one of these on the device type list view where the yaml import is the default action.

@glennmatthews
Copy link
Contributor

Fixed by #5425.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants