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

ASN Ranges are not searchable by name #17537

Closed
dmulyalin opened this issue Sep 19, 2024 · 5 comments · Fixed by #17572
Closed

ASN Ranges are not searchable by name #17537

dmulyalin opened this issue Sep 19, 2024 · 5 comments · Fixed by #17572
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@dmulyalin
Copy link

dmulyalin commented Sep 19, 2024

Deployment Type

Self-hosted

NetBox Version

v4.1.1

Python Version

3.10

Steps to Reproduce

  1. Go to IPAM -> ASN Ranges
  2. Add new range, give it a name
  3. Try to search range by name either using global search or by using quick search or by using search

Expected Behavior

Searching ranges by name works

Observed Behavior

Ranges are not searchable by name, I remember that was working in 3.7.8 version

@dmulyalin dmulyalin added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Sep 19, 2024
@jeremystretch
Copy link
Member

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@jeremystretch jeremystretch added status: revisions needed This issue requires additional information to be actionable and removed status: needs triage This issue is awaiting triage by a maintainer labels Sep 19, 2024
@dmulyalin
Copy link
Author

Updated steps to reproduce @jeremystretch

@dmulyalin
Copy link
Author

dmulyalin commented Sep 20, 2024

Tested it on Netbox 3.7.8, 4.0.10 and 4.1.1 - all having same behavior, ASN Ranges are not searchable by their name, should this search index have added name field to get it working -

class ASNRangeIndex(SearchIndex):

The way how I came across the issue was running custom script to pull ASN ranges using this query for dropdown menu form, but it is not returning all ASN ranges, only some of them, it is working fine on 3.7.8 but not on 4.x - all existing asn ranges were available in drop down on 3.7.8 while only some on 4.0.10/4.1.1.:

from ipam.models import ASNRange, ASN, RIR
from extras.scripts import *

class test_asn_ranges(Script):
   
    asn_range = ObjectVar(
        label="ASN Range",
        description="Name of the ASN Range",
        model=ASNRange,
    ) 

    def run(self, data, commit):
        pass

@dmulyalin
Copy link
Author

dmulyalin commented Sep 20, 2024

Oh, actually I know why it was working for some asn ranges and for some not on version 4.0.10/4.1.1, cause ASNRangeIndex uses description to search for asn range:

display_attrs = ('rir', 'tenant', 'description')

and I did populate description field with value equal to range name for some of them but not for all.

@dmulyalin
Copy link
Author

If possible, could ASN range search index be updated to include ASN Range's name field please.

@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: revisions needed This issue requires additional information to be actionable labels Sep 23, 2024
@arthanson arthanson added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Sep 23, 2024
@arthanson arthanson self-assigned this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants