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

Updates for Nautobot 2.0 #142

Merged
merged 62 commits into from
Jul 13, 2023
Merged

Updates for Nautobot 2.0 #142

merged 62 commits into from
Jul 13, 2023

Conversation

jdrew82
Copy link
Contributor

@jdrew82 jdrew82 commented Jun 21, 2023

This PR is focused on the updates required to support Nautobot 2.0. The changes involved include:

  • Updated all imports to be derived from new module locations.
  • Updated all models that no longer have slugs to use replacement field.
  • Updated navigation to use new NavMenu elements.
  • Updated metrics to use new Jobs model attributes.
  • Updated example Jobs to use new Location model instead of Region/Site along with updating IPAddress to specify parent Prefix.
  • Updated example Jobs to use new Job pattern with passed variables.
  • Updated Job loading to use new register_jobs function.
  • Updated logging in example Jobs to use new logger on JobResult.
  • Updated Infoblox integration to work with Nautobot 2.0.
  • Refactored Infoblox integration to have tags applied to imported objects after sync is complete.
  • Added pylint-nautobot to dev dependencies.
  • Addressed various linter complaints.
  • Corrected tests to address field and model changes.

Both example import Job and Infoblox -> Nautobot import Job are functional with test instances.

Addresses #148.

Starting update to support Nautobot 2.0

Now requires Nautobot 2.0 or better.
…ocationType of Region & Site

Also updated to use new register_jobs pattern.
Also discovered issubclass to determine if Job is subclass of DataSource or DataTarget which is better than checking for SSoT in slug that no longer exists.
Updated Regions and Sites to use Locations and LocationTypes to match migrations. Same with Prefixs using Namespace for uniqueness instead of Tenant now. Also removed slug and used names for Status, Region, and Site. Logging has been updated to use JobResult object. Dry-run var is now using DryRunVar() for scheduling support.

Updated everything to latest locations for Nautobot 2.0 so many many breaking changes.
As part of the changes removed Aggregate objects as that is no longer a valid model in 2.0. Updated all Site creation to be a Location. Also removed the associated setting for importing Aggregates.

Updates for Nautobot 2.0 so lots of breaking changes. No longer an Aggregate object to import and removed extraneous Job. The `import_rfc1918" setting is no longer valid.
Copy link
Contributor

@chadell chadell left a comment

Choose a reason for hiding this comment

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

it looks go for me

@jdrew82
Copy link
Contributor Author

jdrew82 commented Jul 11, 2023

This should be ready for a re-review for beta 2. I fixed all the issues with Infoblox integration working with 2.0 and confirmed the example Job and the Infoblox import jobs work.

Copy link
Contributor

@chadell chadell left a comment

Choose a reason for hiding this comment

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

it still makes sense to me

pyproject.toml Outdated Show resolved Hide resolved
@Kircheneer
Copy link
Contributor

Very tiny nitpick, apart from that we're good

Copy link
Contributor

@Kircheneer Kircheneer left a comment

Choose a reason for hiding this comment

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

LGTM

@jdrew82 jdrew82 merged commit 28b0225 into next-2.0 Jul 13, 2023
11 checks passed
@jdrew82 jdrew82 deleted the feat-2.0_update branch July 13, 2023 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

4 participants