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

Role model definition #2822

Merged
merged 165 commits into from Jan 10, 2023
Merged

Role model definition #2822

merged 165 commits into from Jan 10, 2023

Conversation

timizuoebideri1
Copy link
Contributor

@timizuoebideri1 timizuoebideri1 commented Nov 14, 2022

Closes: #1063

What's Changed

Role model and further related classes that are pertinent to Role models were created.

This PR only focuses on how role models would look like; If accepted, a different PR would be made that incorporates the role into the necessary models.

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

PR Milestones:

  • Create Role model
  • API view for role model, this PR would include: filterform, serializers, ViewSet and URLs -> PR
  • UI view for role model - CRUD operations -> PR
  • Add data migrations for roles i.e In IPAddress, there are several default roles that should be introduced automatically. and obtain existing roles in all apps -> PR
  • Add/update role fields to these models: Racks, Device, VirtualMachine, prefix, vlan, ipaddress
  • Remove outdated code and Models that was rendered obsolete by the implementation of a role model.
  • Add testcases
  • Add documentation

@timizuoebideri1 timizuoebideri1 linked an issue Nov 14, 2022 that may be closed by this pull request
@bryanculver bryanculver marked this pull request as ready for review November 14, 2022 16:20
@bryanculver
Copy link
Member

Looking for a model sanity check review.

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.

Looks like a solid start!

nautobot/extras/models/roles.py Outdated Show resolved Hide resolved
nautobot/extras/models/roles.py Outdated Show resolved Hide resolved
nautobot/extras/models/roles.py Outdated Show resolved Hide resolved
nautobot/extras/utils.py Outdated Show resolved Hide resolved
nautobot/extras/utils.py Outdated Show resolved Hide resolved
timizuoebideri1 and others added 2 commits November 15, 2022 05:16
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
nautobot/extras/fields.py Outdated Show resolved Hide resolved
nautobot/extras/fields.py Outdated Show resolved Hide resolved
nautobot/extras/fields.py Outdated Show resolved Hide resolved
nautobot/extras/models/base_properties.py Outdated Show resolved Hide resolved
nautobot/extras/models/base_properties.py Outdated Show resolved Hide resolved
nautobot/extras/models/base_properties.py Outdated Show resolved Hide resolved
nautobot/extras/models/roles.py Outdated Show resolved Hide resolved
nautobot/extras/models/roles.py Show resolved Hide resolved
nautobot/extras/models/statuses.py Outdated Show resolved Hide resolved
nautobot/circuits/templates/circuits/circuit_retrieve.html Outdated Show resolved Hide resolved
nautobot/core/fields.py Outdated Show resolved Hide resolved
nautobot/core/models/name_color_content_types.py Outdated Show resolved Hide resolved
nautobot/extras/querysets.py Outdated Show resolved Hide resolved
nautobot/extras/tests/test_filters.py Outdated Show resolved Hide resolved
nautobot/ipam/factory.py Show resolved Hide resolved
nautobot/ipam/views.py Show resolved Hide resolved
nautobot/docs/development/role-internals.md Show resolved Hide resolved
nautobot/extras/forms/mixins.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
nautobot/docs/installation/upgrading-from-nautobot-v1.md Outdated Show resolved Hide resolved
nautobot/extras/templates/extras/role_retrieve.html Outdated Show resolved Hide resolved
nautobot/extras/templates/extras/role_retrieve.html Outdated Show resolved Hide resolved
nautobot/extras/templates/extras/role_retrieve.html Outdated Show resolved Hide resolved
nautobot/extras/templates/extras/role_retrieve.html Outdated Show resolved Hide resolved
nautobot/extras/templates/extras/role_retrieve.html 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.

Fix the integration tests and I think this is otherwise ready to go!

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.

Add a generic Role model
6 participants