Replace Role Related Models with Generic Role Model¶
- Narrowly defined role models including
ipam.Roleare replaced by a generic
- If any of your models are using the replaced role models, it is required for you to remove the
rolefield from your model and add either
nautobot.extras.models.roles.RoleRequiredRoleModelMixinto your model class definition.
RoleModelMixinadds a nullable
RoleRequiredRoleModelMixinadds a required
- Please go here to check out how the
extras.Rolemodel works in v2.0.
Updates to Job and Job related models¶
Job Model Changes¶
See details about the fundamental changes to
Job Model here
Job Logging Changes¶
- Job logging is now handled by a logger off the Job itself and has a function for each level to send the message (info, warning, debug, etc).
JobResult.logno longer accepts a
loggerarg and app/job authors should transition to using the Job's logger methods instead of directly calling
- There is no longer a
log_failurefunction. Checkout the changes in detail here
JobResult Model Changes¶
JobResult no longer needs a
obj_type passed to it. It now needs a
task_name, and a
worker. See here for details.
Update CustomField, ComputedField, and Relationship¶
- In accordance with the removal of
slugfield in Nautobot v2.0,
slugfield is replaced by the
keyfield which contains a GraphQL-safe string that is used exclusively in the API and GraphQL.
CustomFieldmodel and renamed
labelfields are now used for display purposes only in the UI.
- Please go to their respective documentations for more information CustomField, ComputedField, and Relationship.