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

Remove slug from models #3439

Merged
merged 73 commits into from
Apr 4, 2023
Merged

Conversation

timizuoebideri1
Copy link
Contributor

Closes: #2907

What's Changed

TODO

  • Explanation of Change(s)
  • Added change log fragment(s) (for more information see the documentation)
  • Attached Screenshots, Payload Example
  • Unit, Integration Tests
  • Documentation Updates (when adding/changing features)
  • Example Plugin Updates (when adding/changing features)
  • Outline Remaining Work, Constraints from Design

@timizuoebideri1 timizuoebideri1 changed the base branch from develop to next March 17, 2023 12:32
nautobot/circuits/tables.py Outdated Show resolved Hide resolved
nautobot/circuits/tests/integration/test_relationships.py Outdated Show resolved Hide resolved
nautobot/circuits/tests/test_api.py Outdated Show resolved Hide resolved
nautobot/circuits/tests/test_api.py Outdated Show resolved Hide resolved
nautobot/circuits/tests/test_api.py Outdated Show resolved Hide resolved
nautobot/extras/management/__init__.py Outdated Show resolved Hide resolved
nautobot/extras/models/groups.py Outdated Show resolved Hide resolved
nautobot/extras/tests/test_api.py Outdated Show resolved Hide resolved
nautobot/extras/tests/test_dynamicgroups.py Outdated Show resolved Hide resolved
nautobot/extras/tests/test_dynamicgroups.py Outdated Show resolved Hide resolved
Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Etc. :-)

nautobot/circuits/tests/test_filters.py Outdated Show resolved Hide resolved
nautobot/circuits/tests/test_views.py Outdated Show resolved Hide resolved
nautobot/circuits/views.py Show resolved Hide resolved
nautobot/core/models/utils.py Outdated Show resolved Hide resolved
nautobot/circuits/filters.py Show resolved Hide resolved
nautobot/extras/tests/test_models.py Outdated Show resolved Hide resolved
nautobot/extras/tests/test_plugins.py Outdated Show resolved Hide resolved
nautobot/extras/tests/test_relationships.py Outdated Show resolved Hide resolved
nautobot/extras/tests/test_relationships.py Outdated Show resolved Hide resolved
nautobot/extras/tests/test_views.py Outdated Show resolved Hide resolved
timizuoebideri1 and others added 9 commits March 27, 2023 14:36
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
# Conflicts:
#	nautobot/core/testing/api.py
#	nautobot/dcim/tests/test_views.py
#	nautobot/docs/installation/upgrading-from-nautobot-v1.md
changes/3439.changed Outdated Show resolved Hide resolved
Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate to add this to the workload, but I think there are a bunch of HTML templates that also need corresponding updates, for example:

nautobot/circuits/templates/circuits/circuit_retrieve.html:                <li><a href="{% url 'circuits:circuit_list' %}?provider={{ object.provider.slug }}">{{ object.provider }}</a></li>
nautobot/circuits/templates/circuits/circuittermination_retrieve.html:    <li><a href="{% url 'circuits:circuit_list' %}?provider={{ object.circuit.provider.slug }}">{{ object.circuit.provider }}</a></li>
nautobot/circuits/templates/circuits/circuittype_retrieve.html:                        <a href="{% url 'circuits:circuit_list' %}?type={{ object.slug }}">{{ circuits_table.rows|length }}</a>
nautobot/circuits/templates/circuits/provider_create.html:            {% render_field form.slug %}
nautobot/circuits/templates/circuits/provider_retrieve.html:                        <a href="{% url 'circuits:circuit_list' %}?provider={{ object.slug }}">{{ circuits_table.rows|length }}</a>

nautobot/core/testing/api.py Outdated Show resolved Hide resolved
nautobot/core/testing/views.py Outdated Show resolved Hide resolved
nautobot/docs/installation/upgrading-from-nautobot-v1.md Outdated Show resolved Hide resolved
nautobot/docs/installation/upgrading-from-nautobot-v1.md Outdated Show resolved Hide resolved
| | `device_type_id` | Enhanced to support primary key UUIDs in addition to slugs | `/dcim/devices/?device_type=<uuid/slug>` |
| | `device_redundancy_group` | Enhanced to support primary key UUIDs in addition to names | `/dcim/devices/?device_redundancy_group=<uuid/name>` |
| | `manufacturer` | Enhanced to support primary key UUIDs in addition to names | `/dcim/devices/?manufacturer=<uuid/name>` |
| | `model` | Enhanced to support primary key UUIDs in addition to slugs | `/dcim/devices/?model=<uuid/slug>` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be names instead of slugs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think Device has model filter anymore, so i removed it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, it was replaced by device_type as documented in the "Removed Filter Fields" table below.

nautobot/docs/installation/upgrading-from-nautobot-v1.md Outdated Show resolved Hide resolved
nautobot/docs/installation/upgrading-from-nautobot-v1.md Outdated Show resolved Hide resolved
nautobot/docs/installation/upgrading-from-nautobot-v1.md Outdated Show resolved Hide resolved
nautobot/docs/installation/upgrading-from-nautobot-v1.md Outdated Show resolved Hide resolved
nautobot/docs/installation/upgrading-from-nautobot-v1.md Outdated Show resolved Hide resolved
timizuoebideri1 and others added 3 commits April 3, 2023 23:42
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for seeing this through!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Correct Existing Natural Keys 1 of 3 [Easy] - Basic name/slug objects.
2 participants