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

Adding host devices to a cluster should exclude devices already assigned #1579

Closed
Gelob opened this issue Oct 12, 2017 · 7 comments
Closed
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@Gelob
Copy link
Contributor

Gelob commented Oct 12, 2017

Issue type

[ ] Feature request
[ X ] Bug report
[ ] Documentation

Environment

  • Python version: 2.7.5
  • NetBox version: 2.2.1

Description

When searching for devices to add to a virtualization cluster (virtualization/clusters/1/devices/add/), devices that are already part of a cluster show up. If you attempt to add a device that is already part of an existing cluster you will get a Server Error `<type 'exceptions.TypeError'>

'NoneType' object is not iterable`

This would also help in finding devices quicker because the search only returns a limited number of results.

@RyanBreaker
Copy link
Contributor

I'll take a stab at this, hold my beer.

This should also probably be a bug report instead of feature request, especially since it does return an error.

@Gelob
Copy link
Contributor Author

Gelob commented Oct 12, 2017

@RyanBreaker consider your beer held. I've updated it to a bug report. I couldn't decide and figured feature.

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Oct 13, 2017
@jeremystretch jeremystretch changed the title Virtualization: Add Host Device should exclude devices already in an existing cluster Adding host devices to a cluster should exclude devices already assigned Oct 13, 2017
@jeremystretch
Copy link
Member

@Gelob I'm not able to reproduce this. Could you please update your report with the steps needed to reproduce the error?

@RyanBreaker
Copy link
Contributor

I was actually about to say, I don't get any Python errors but instead just a more generic message saying it cannot be added.

@RyanBreaker
Copy link
Contributor

@jeremystretch I guess it comes down to how we want it to behave then, if we want to just make devices already in a cluster even show up or just disable them from being selectable.

@jeremystretch jeremystretch added awaiting reply and removed type: bug A confirmed report of unexpected behavior in the application labels Oct 16, 2017
@Gelob
Copy link
Contributor Author

Gelob commented Oct 16, 2017

I think it has to do with when the cluster is assigned to a site, if its not assigned to a site I just get "Select a valid choice. 1812 is not one of the available choices."

If I assign the cluster to a site I do get the attached error
screen shot 2017-10-16 at 4 29 04 pm

  1. Create a new cluster, and assign it to a site.
  2. Create a new device in that same site
  3. Assign that device to the new cluster you created
  4. Try to assign that same device to that cluster (or another cluster that has a site assignment)

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application and removed awaiting reply labels Oct 17, 2017
@jeremystretch
Copy link
Member

Fixed in 34f1a9e

jeremystretch added a commit that referenced this issue Oct 17, 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: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants