nautobot 2.3.15b1__py3-none-any.whl → 2.3.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nautobot might be problematic. Click here for more details.
- nautobot/circuits/views.py +3 -3
- nautobot/cloud/models.py +1 -1
- nautobot/core/api/fields.py +5 -5
- nautobot/core/api/serializers.py +9 -9
- nautobot/core/api/views.py +3 -2
- nautobot/core/apps/__init__.py +5 -2
- nautobot/core/celery/schedulers.py +1 -1
- nautobot/core/filters.py +19 -16
- nautobot/core/forms/fields.py +5 -5
- nautobot/core/graphql/types.py +1 -1
- nautobot/core/jobs/__init__.py +4 -4
- nautobot/core/jobs/cleanup.py +1 -1
- nautobot/core/jobs/groups.py +1 -1
- nautobot/core/management/commands/validate_models.py +1 -1
- nautobot/core/models/__init__.py +1 -1
- nautobot/core/models/query_functions.py +2 -2
- nautobot/core/models/tree_queries.py +2 -2
- nautobot/core/settings.py +3 -0
- nautobot/core/settings.yaml +8 -0
- nautobot/core/tables.py +5 -5
- nautobot/core/templates/inc/media.html +3 -0
- nautobot/core/templates/nautobot_config.py.j2 +3 -0
- nautobot/core/testing/filters.py +7 -3
- nautobot/core/testing/views.py +5 -0
- nautobot/core/tests/integration/test_app_home.py +0 -1
- nautobot/core/tests/integration/test_app_navbar.py +0 -1
- nautobot/core/tests/integration/test_filters.py +0 -2
- nautobot/core/tests/integration/test_home.py +0 -1
- nautobot/core/tests/integration/test_navbar.py +0 -1
- nautobot/core/tests/integration/test_view_authentication.py +1 -0
- nautobot/core/tests/runner.py +1 -1
- nautobot/core/tests/test_views.py +29 -0
- nautobot/core/urls.py +9 -0
- nautobot/core/views/generic.py +51 -43
- nautobot/core/views/mixins.py +21 -11
- nautobot/dcim/api/serializers.py +48 -48
- nautobot/dcim/forms.py +2 -0
- nautobot/dcim/graphql/types.py +2 -2
- nautobot/dcim/models/device_component_templates.py +2 -2
- nautobot/dcim/models/device_components.py +22 -20
- nautobot/dcim/models/devices.py +1 -1
- nautobot/dcim/models/locations.py +3 -3
- nautobot/dcim/models/power.py +6 -5
- nautobot/dcim/models/racks.py +4 -4
- nautobot/dcim/tables/__init__.py +3 -3
- nautobot/dcim/tables/devicetypes.py +2 -2
- nautobot/dcim/tests/test_filters.py +1 -0
- nautobot/dcim/tests/test_graphql.py +52 -0
- nautobot/dcim/tests/test_models.py +4 -1
- nautobot/dcim/views.py +1 -1
- nautobot/extras/api/customfields.py +2 -2
- nautobot/extras/api/serializers.py +72 -69
- nautobot/extras/api/views.py +4 -4
- nautobot/extras/forms/mixins.py +1 -1
- nautobot/extras/health_checks.py +1 -2
- nautobot/extras/jobs.py +5 -5
- nautobot/extras/managers.py +3 -1
- nautobot/extras/migrations/0018_joblog_data_migration.py +7 -9
- nautobot/extras/models/customfields.py +12 -11
- nautobot/extras/models/groups.py +13 -9
- nautobot/extras/models/jobs.py +4 -4
- nautobot/extras/models/models.py +2 -2
- nautobot/extras/plugins/views.py +1 -1
- nautobot/extras/tables.py +5 -5
- nautobot/extras/test_jobs/api_test_job.py +1 -1
- nautobot/extras/test_jobs/atomic_transaction.py +2 -2
- nautobot/extras/test_jobs/dry_run.py +1 -1
- nautobot/extras/test_jobs/fail.py +5 -5
- nautobot/extras/test_jobs/file_output.py +1 -1
- nautobot/extras/test_jobs/file_upload_fail.py +1 -1
- nautobot/extras/test_jobs/file_upload_pass.py +1 -1
- nautobot/extras/test_jobs/ipaddress_vars.py +3 -1
- nautobot/extras/test_jobs/jobs_module/jobs_submodule/jobs.py +1 -1
- nautobot/extras/test_jobs/location_with_custom_field.py +1 -1
- nautobot/extras/test_jobs/log_redaction.py +1 -1
- nautobot/extras/test_jobs/log_skip_db_logging.py +1 -1
- nautobot/extras/test_jobs/modify_db.py +1 -1
- nautobot/extras/test_jobs/object_var_optional.py +1 -1
- nautobot/extras/test_jobs/object_var_required.py +1 -1
- nautobot/extras/test_jobs/object_vars.py +1 -1
- nautobot/extras/test_jobs/pass.py +3 -3
- nautobot/extras/test_jobs/profiling.py +1 -1
- nautobot/extras/test_jobs/relative_import.py +3 -3
- nautobot/extras/test_jobs/soft_time_limit_greater_than_time_limit.py +1 -1
- nautobot/extras/test_jobs/task_queues.py +1 -1
- nautobot/extras/tests/integration/test_plugin_banner.py +0 -2
- nautobot/extras/tests/test_api.py +13 -13
- nautobot/extras/tests/test_customfields.py +1 -1
- nautobot/extras/tests/test_datasources.py +2 -1
- nautobot/extras/tests/test_dynamicgroups.py +1 -1
- nautobot/extras/tests/test_filters.py +6 -6
- nautobot/extras/tests/test_forms.py +20 -1
- nautobot/extras/tests/test_jobs.py +11 -11
- nautobot/extras/tests/test_models.py +10 -10
- nautobot/extras/tests/test_relationships.py +1 -1
- nautobot/extras/tests/test_views.py +16 -16
- nautobot/extras/views.py +20 -16
- nautobot/ipam/api/fields.py +3 -3
- nautobot/ipam/api/serializers.py +33 -33
- nautobot/ipam/api/views.py +37 -61
- nautobot/ipam/querysets.py +2 -2
- nautobot/ipam/tests/test_api.py +12 -1
- nautobot/ipam/tests/test_forms.py +51 -47
- nautobot/ipam/tests/test_migrations.py +30 -30
- nautobot/ipam/tests/test_querysets.py +14 -0
- nautobot/project-static/docs/404.html +2 -2
- nautobot/project-static/docs/apps/index.html +2 -2
- nautobot/project-static/docs/apps/nautobot-apps.html +2 -2
- nautobot/project-static/docs/assets/javascripts/{bundle.83f73b43.min.js → bundle.88dd0f4e.min.js} +2 -2
- nautobot/project-static/docs/assets/javascripts/{bundle.83f73b43.min.js.map → bundle.88dd0f4e.min.js.map} +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +3 -3
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +3 -3
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +4 -4
- nautobot/project-static/docs/development/apps/api/configuration-view.html +2 -2
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +2 -2
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +2 -2
- nautobot/project-static/docs/development/apps/api/models/global-search.html +2 -2
- nautobot/project-static/docs/development/apps/api/models/graphql.html +2 -2
- nautobot/project-static/docs/development/apps/api/models/index.html +2 -2
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/table-extensions.html +2 -2
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +2 -2
- nautobot/project-static/docs/development/apps/api/prometheus.html +2 -2
- nautobot/project-static/docs/development/apps/api/setup.html +2 -2
- nautobot/project-static/docs/development/apps/api/testing.html +2 -2
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +2 -2
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +2 -2
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +2 -2
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +2 -2
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/base-template.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/index.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/notes.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +2 -2
- nautobot/project-static/docs/development/apps/api/views/urls.html +2 -2
- nautobot/project-static/docs/development/apps/index.html +2 -2
- nautobot/project-static/docs/development/apps/migration/code-updates.html +2 -2
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +2 -2
- nautobot/project-static/docs/development/apps/migration/from-v1.html +2 -2
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +2 -2
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +2 -2
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +2 -2
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +2 -2
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +2 -2
- nautobot/project-static/docs/development/core/application-registry.html +2 -2
- nautobot/project-static/docs/development/core/best-practices.html +2 -2
- nautobot/project-static/docs/development/core/bootstrap-ui.html +2 -2
- nautobot/project-static/docs/development/core/caching.html +2 -2
- nautobot/project-static/docs/development/core/controllers.html +2 -2
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +27 -70
- nautobot/project-static/docs/development/core/generic-views.html +2 -2
- nautobot/project-static/docs/development/core/getting-started.html +2 -2
- nautobot/project-static/docs/development/core/homepage.html +2 -2
- nautobot/project-static/docs/development/core/index.html +2 -2
- nautobot/project-static/docs/development/core/model-checklist.html +2 -2
- nautobot/project-static/docs/development/core/model-features.html +2 -2
- nautobot/project-static/docs/development/core/natural-keys.html +2 -2
- nautobot/project-static/docs/development/core/navigation-menu.html +2 -2
- nautobot/project-static/docs/development/core/release-checklist.html +2 -2
- nautobot/project-static/docs/development/core/role-internals.html +2 -2
- nautobot/project-static/docs/development/core/settings.html +2 -2
- nautobot/project-static/docs/development/core/style-guide.html +2 -2
- nautobot/project-static/docs/development/core/templates.html +2 -2
- nautobot/project-static/docs/development/core/testing.html +2 -2
- nautobot/project-static/docs/development/core/user-preferences.html +2 -2
- nautobot/project-static/docs/development/index.html +2 -2
- nautobot/project-static/docs/development/jobs/index.html +2 -2
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +2 -2
- nautobot/project-static/docs/index.html +2 -2
- nautobot/project-static/docs/overview/application_stack.html +2 -2
- nautobot/project-static/docs/overview/design_philosophy.html +2 -2
- nautobot/project-static/docs/release-notes/index.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.0.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.1.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.2.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.3.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.4.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.5.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.6.html +2 -2
- nautobot/project-static/docs/release-notes/version-2.0.html +2 -2
- nautobot/project-static/docs/release-notes/version-2.1.html +2 -2
- nautobot/project-static/docs/release-notes/version-2.2.html +2 -2
- nautobot/project-static/docs/release-notes/version-2.3.html +471 -220
- nautobot/project-static/docs/requirements.txt +2 -2
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +270 -270
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +2 -2
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +2 -2
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +2 -2
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +2 -2
- nautobot/project-static/docs/user-guide/administration/configuration/redis.html +2 -2
- nautobot/project-static/docs/user-guide/administration/configuration/settings.html +29 -2
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +2 -2
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +2 -2
- nautobot/project-static/docs/user-guide/administration/guides/docker.html +2 -2
- nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +2 -2
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +2 -2
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +2 -2
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +2 -2
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +2 -2
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +2 -2
- nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +2 -2
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +2 -2
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +2 -2
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +2 -2
- nautobot/project-static/docs/user-guide/administration/installation/index.html +2 -2
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +2 -2
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +2 -2
- nautobot/project-static/docs/user-guide/administration/installation/services.html +2 -2
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +2 -2
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +2 -2
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +2 -2
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +2 -2
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +2 -2
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +2 -2
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +2 -2
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +2 -2
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +2 -2
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +2 -2
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +2 -2
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +2 -2
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +2 -2
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +2 -2
- nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +2 -2
- nautobot/project-static/docs/user-guide/index.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +2 -2
- nautobot/users/admin.py +1 -1
- nautobot/users/api/serializers.py +4 -4
- nautobot/users/api/views.py +1 -1
- nautobot/virtualization/api/serializers.py +4 -4
- {nautobot-2.3.15b1.dist-info → nautobot-2.3.16.dist-info}/METADATA +5 -4
- {nautobot-2.3.15b1.dist-info → nautobot-2.3.16.dist-info}/RECORD +392 -393
- {nautobot-2.3.15b1.dist-info → nautobot-2.3.16.dist-info}/WHEEL +1 -1
- nautobot/core/fixtures/user-data.json +0 -59
- {nautobot-2.3.15b1.dist-info → nautobot-2.3.16.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.3.15b1.dist-info → nautobot-2.3.16.dist-info}/NOTICE +0 -0
- {nautobot-2.3.15b1.dist-info → nautobot-2.3.16.dist-info}/entry_points.txt +0 -0
nautobot/ipam/tests/test_api.py
CHANGED
|
@@ -2,6 +2,7 @@ from concurrent.futures.thread import ThreadPoolExecutor
|
|
|
2
2
|
import json
|
|
3
3
|
from random import shuffle
|
|
4
4
|
from unittest import skip
|
|
5
|
+
import uuid
|
|
5
6
|
|
|
6
7
|
from django.contrib.contenttypes.models import ContentType
|
|
7
8
|
from django.db import connection
|
|
@@ -506,7 +507,8 @@ class PrefixTest(APIViewTestCases.APIViewTestCase):
|
|
|
506
507
|
url, {"prefix_length": "hello", "status": self.status.pk}, format="json", **self.header
|
|
507
508
|
)
|
|
508
509
|
self.assertHttpStatus(response, status.HTTP_400_BAD_REQUEST)
|
|
509
|
-
self.assertIn("prefix_length", response.data
|
|
510
|
+
self.assertIn("prefix_length", response.data)
|
|
511
|
+
self.assertEqual(response.data["prefix_length"], "This field must be an integer.")
|
|
510
512
|
|
|
511
513
|
def test_create_multiple_available_prefixes(self):
|
|
512
514
|
"""
|
|
@@ -1482,6 +1484,15 @@ class VLANGroupTest(APIViewTestCases.APIViewTestCase):
|
|
|
1482
1484
|
f"Invalid VLAN Group requested: {some_other_vlan_group}. Only VLAN Group {self.vlan_group} is permitted.",
|
|
1483
1485
|
response.data["detail"],
|
|
1484
1486
|
)
|
|
1487
|
+
invalid_id = uuid.uuid4()
|
|
1488
|
+
data[0]["vlan_group"] = invalid_id # Invalid UUID
|
|
1489
|
+
response = self.client.post(url, data, format="json", **self.header)
|
|
1490
|
+
self.assertHttpStatus(response, status.HTTP_204_NO_CONTENT)
|
|
1491
|
+
self.assertIn("detail", response.data)
|
|
1492
|
+
self.assertEqual(
|
|
1493
|
+
f"VLAN Group with pk {invalid_id} does not exist.",
|
|
1494
|
+
response.data["detail"],
|
|
1495
|
+
)
|
|
1485
1496
|
|
|
1486
1497
|
def test_create_available_vlans_with_permissions_constraint(self):
|
|
1487
1498
|
url = reverse("ipam-api:vlangroup-available-vlans", kwargs={"pk": self.vlan_group.pk})
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"""Test IPAM forms."""
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations # python 3.8
|
|
4
|
+
|
|
5
|
+
from django.forms import Form
|
|
3
6
|
from django.test import TestCase
|
|
4
7
|
|
|
5
8
|
from nautobot.core.testing.forms import FormTestCases
|
|
@@ -9,62 +12,63 @@ from nautobot.ipam.choices import IPAddressTypeChoices
|
|
|
9
12
|
from nautobot.ipam.models import IPAddress, Namespace, Prefix
|
|
10
13
|
|
|
11
14
|
|
|
12
|
-
class
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
class NetworkFormTestCases:
|
|
16
|
+
class BaseNetworkFormTest(TestCase):
|
|
17
|
+
form_class: type[Form]
|
|
18
|
+
field_name: str
|
|
19
|
+
object_name: str
|
|
20
|
+
extra_data = {}
|
|
21
|
+
|
|
22
|
+
def setUp(self):
|
|
23
|
+
super().setUp()
|
|
24
|
+
self.namespace = Namespace.objects.create(name="IPAM Form Test")
|
|
25
|
+
self.status = Status.objects.get(name="Active")
|
|
26
|
+
self.prefix_status = Status.objects.get_for_model(Prefix).first()
|
|
27
|
+
self.ip_status = Status.objects.get_for_model(IPAddress).first()
|
|
28
|
+
self.parent = Prefix.objects.create(
|
|
29
|
+
prefix="192.168.1.0/24", namespace=self.namespace, status=self.prefix_status
|
|
30
|
+
)
|
|
31
|
+
self.parent2 = Prefix.objects.create(
|
|
32
|
+
prefix="192.168.0.0/16", namespace=self.namespace, status=self.prefix_status
|
|
33
|
+
)
|
|
34
|
+
self.parent6 = Prefix.objects.create(
|
|
35
|
+
prefix="2001:0db8::/40", namespace=self.namespace, status=self.prefix_status
|
|
36
|
+
)
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
def test_valid_ip_address(self):
|
|
39
|
+
data = {self.field_name: "192.168.2.0/24", "namespace": self.namespace, "status": self.status}
|
|
40
|
+
data.update(self.extra_data)
|
|
41
|
+
form = self.form_class(data)
|
|
38
42
|
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
self.assertTrue(form.is_valid())
|
|
44
|
+
self.assertTrue(form.save())
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
def test_address_invalid_ipv4(self):
|
|
47
|
+
data = {self.field_name: "192.168.0.1/64", "namespace": self.namespace, "status": self.status}
|
|
48
|
+
data.update(self.extra_data)
|
|
49
|
+
form = self.form_class(data)
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
self.assertFalse(form.is_valid())
|
|
52
|
+
self.assertEqual("Please specify a valid IPv4 or IPv6 address.", form.errors[self.field_name][0])
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
def test_address_zero_mask(self):
|
|
55
|
+
data = {self.field_name: "192.168.0.1/0", "namespace": self.namespace, "status": self.status}
|
|
56
|
+
data.update(self.extra_data)
|
|
57
|
+
form = self.form_class(data)
|
|
54
58
|
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
# With the advent of `Prefix.parent`, it's now possible to create a /0 .
|
|
60
|
+
self.assertTrue(form.is_valid())
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
def test_address_missing_mask(self):
|
|
63
|
+
data = {self.field_name: "192.168.0.1", "namespace": self.namespace, "status": self.status}
|
|
64
|
+
data.update(self.extra_data)
|
|
65
|
+
form = self.form_class(data)
|
|
62
66
|
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
self.assertFalse(form.is_valid())
|
|
68
|
+
self.assertEqual("CIDR mask (e.g. /24) is required.", form.errors[self.field_name][0])
|
|
65
69
|
|
|
66
70
|
|
|
67
|
-
class PrefixFormTest(BaseNetworkFormTest, FormTestCases.BaseFormTestCase):
|
|
71
|
+
class PrefixFormTest(NetworkFormTestCases.BaseNetworkFormTest, FormTestCases.BaseFormTestCase):
|
|
68
72
|
form_class = forms.PrefixForm
|
|
69
73
|
field_name = "prefix"
|
|
70
74
|
object_name = "prefix"
|
|
@@ -79,7 +83,7 @@ class PrefixFormTest(BaseNetworkFormTest, FormTestCases.BaseFormTestCase):
|
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
|
|
82
|
-
class IPAddressFormTest(BaseNetworkFormTest
|
|
86
|
+
class IPAddressFormTest(NetworkFormTestCases.BaseNetworkFormTest):
|
|
83
87
|
form_class = forms.IPAddressForm
|
|
84
88
|
field_name = "address"
|
|
85
89
|
object_name = "IP address"
|
|
@@ -29,29 +29,29 @@ class AggregateToPrefixMigrationTestCase(NautobotDataMigrationTest):
|
|
|
29
29
|
request_id=uuid.uuid4(),
|
|
30
30
|
)
|
|
31
31
|
|
|
32
|
-
def populateDataBeforeMigration(self,
|
|
32
|
+
def populateDataBeforeMigration(self, installed_apps):
|
|
33
33
|
"""Populate Aggregate data before migrating to Prefixes"""
|
|
34
34
|
|
|
35
|
-
self.aggregate =
|
|
35
|
+
self.aggregate = installed_apps.get_model("ipam", "Aggregate")
|
|
36
36
|
# Workaround for django-taggit manager not working in migrations.
|
|
37
37
|
# https://github.com/jazzband/django-taggit/issues/101
|
|
38
38
|
# https://github.com/jazzband/django-taggit/issues/454
|
|
39
39
|
self.aggregate.tags = TagsField()
|
|
40
|
-
self.computed_field =
|
|
41
|
-
self.content_type =
|
|
42
|
-
self.custom_field =
|
|
43
|
-
self.custom_link =
|
|
44
|
-
self.dynamic_group =
|
|
45
|
-
self.note =
|
|
46
|
-
self.object_change =
|
|
47
|
-
self.object_permission =
|
|
48
|
-
self.prefix =
|
|
40
|
+
self.computed_field = installed_apps.get_model("extras", "computedfield")
|
|
41
|
+
self.content_type = installed_apps.get_model("contenttypes", "ContentType")
|
|
42
|
+
self.custom_field = installed_apps.get_model("extras", "customfield")
|
|
43
|
+
self.custom_link = installed_apps.get_model("extras", "customlink")
|
|
44
|
+
self.dynamic_group = installed_apps.get_model("extras", "DynamicGroup")
|
|
45
|
+
self.note = installed_apps.get_model("extras", "note")
|
|
46
|
+
self.object_change = installed_apps.get_model("extras", "objectchange")
|
|
47
|
+
self.object_permission = installed_apps.get_model("users", "objectpermission")
|
|
48
|
+
self.prefix = installed_apps.get_model("ipam", "prefix")
|
|
49
49
|
self.prefix.tags = TagsField()
|
|
50
|
-
self.relationship =
|
|
51
|
-
self.relationship_association =
|
|
52
|
-
self.rir =
|
|
53
|
-
self.status =
|
|
54
|
-
self.tag =
|
|
50
|
+
self.relationship = installed_apps.get_model("extras", "relationship")
|
|
51
|
+
self.relationship_association = installed_apps.get_model("extras", "relationshipassociation")
|
|
52
|
+
self.rir = installed_apps.get_model("ipam", "RIR")
|
|
53
|
+
self.status = installed_apps.get_model("extras", "status")
|
|
54
|
+
self.tag = installed_apps.get_model("extras", "tag")
|
|
55
55
|
|
|
56
56
|
self.aggregate_ct = self.content_type.objects.get_for_model(self.aggregate)
|
|
57
57
|
self.prefix_ct = self.content_type.objects.get_for_model(self.prefix)
|
|
@@ -114,8 +114,8 @@ class AggregateToPrefixMigrationTestCase(NautobotDataMigrationTest):
|
|
|
114
114
|
self.aggregate1.tags.add("AggregateTagA", "AggregateTagB")
|
|
115
115
|
self.aggregate2.tags.add("AggregateTagA")
|
|
116
116
|
self.aggregate3.tags.add("AggregateTagB")
|
|
117
|
-
self.aggregate5.tags.add("AggregateTagA", "AggregateTagB")
|
|
118
|
-
self.aggregate6.tags.add("AggregateTagB")
|
|
117
|
+
self.aggregate5.tags.add("AggregateTagA", "AggregateTagB") # pylint: disable=no-member
|
|
118
|
+
self.aggregate6.tags.add("AggregateTagB") # pylint: disable=no-member
|
|
119
119
|
|
|
120
120
|
# notes
|
|
121
121
|
self.note.objects.create(
|
|
@@ -141,7 +141,7 @@ class AggregateToPrefixMigrationTestCase(NautobotDataMigrationTest):
|
|
|
141
141
|
self.note.objects.create(
|
|
142
142
|
note="Aggregate5 test note",
|
|
143
143
|
assigned_object_type=self.aggregate_ct,
|
|
144
|
-
assigned_object_id=self.aggregate5.id,
|
|
144
|
+
assigned_object_id=self.aggregate5.id, # pylint: disable=no-member
|
|
145
145
|
)
|
|
146
146
|
|
|
147
147
|
# object permissions
|
|
@@ -157,8 +157,8 @@ class AggregateToPrefixMigrationTestCase(NautobotDataMigrationTest):
|
|
|
157
157
|
# object changes
|
|
158
158
|
self._create_objectchange(self.prefix1, "Pre-migration object change for prefix1")
|
|
159
159
|
self._create_objectchange(self.prefix4, "Pre-migration object change for prefix4")
|
|
160
|
-
self._create_objectchange(self.prefix5, "Pre-migration object change for prefix5")
|
|
161
|
-
self._create_objectchange(self.aggregate5, "Pre-migration object change for aggregate5")
|
|
160
|
+
self._create_objectchange(self.prefix5, "Pre-migration object change for prefix5") # pylint: disable=no-member
|
|
161
|
+
self._create_objectchange(self.aggregate5, "Pre-migration object change for aggregate5") # pylint: disable=no-member
|
|
162
162
|
|
|
163
163
|
# custom fields
|
|
164
164
|
prefix_cf1 = self.custom_field.objects.create(name="prefixcf1")
|
|
@@ -179,24 +179,24 @@ class AggregateToPrefixMigrationTestCase(NautobotDataMigrationTest):
|
|
|
179
179
|
|
|
180
180
|
self.aggregate3._custom_field_data["aggregatecf1"] = "testdata aggregatecf1 aggregate3"
|
|
181
181
|
|
|
182
|
-
self.prefix5._custom_field_data["prefixcf1"] = "testdata prefixcf1 prefix5"
|
|
183
|
-
self.prefix5._custom_field_data["prefixaggregatecf1"] = "testdata prefixaggregatecf1 prefix5"
|
|
182
|
+
self.prefix5._custom_field_data["prefixcf1"] = "testdata prefixcf1 prefix5" # pylint: disable=no-member
|
|
183
|
+
self.prefix5._custom_field_data["prefixaggregatecf1"] = "testdata prefixaggregatecf1 prefix5" # pylint: disable=no-member
|
|
184
184
|
|
|
185
|
-
self.aggregate5._custom_field_data["prefixaggregatecf1"] = "testdata prefixaggregatecf1 aggregate5"
|
|
186
|
-
self.aggregate5._custom_field_data["aggregatecf1"] = "testdata aggregatecf1 aggregate5"
|
|
185
|
+
self.aggregate5._custom_field_data["prefixaggregatecf1"] = "testdata prefixaggregatecf1 aggregate5" # pylint: disable=no-member
|
|
186
|
+
self.aggregate5._custom_field_data["aggregatecf1"] = "testdata aggregatecf1 aggregate5" # pylint: disable=no-member
|
|
187
187
|
|
|
188
|
-
self.aggregate6._custom_field_data["prefixaggregatecf1"] = "testdata prefixaggregatecf1 aggregate6"
|
|
188
|
+
self.aggregate6._custom_field_data["prefixaggregatecf1"] = "testdata prefixaggregatecf1 aggregate6" # pylint: disable=no-member
|
|
189
189
|
|
|
190
190
|
self.prefix1.save()
|
|
191
191
|
self.prefix2.save()
|
|
192
192
|
self.prefix3.save()
|
|
193
193
|
self.prefix4.save()
|
|
194
|
-
self.prefix5.save()
|
|
194
|
+
self.prefix5.save() # pylint: disable=no-member
|
|
195
195
|
self.aggregate1.save()
|
|
196
196
|
self.aggregate2.save()
|
|
197
197
|
self.aggregate3.save()
|
|
198
|
-
self.aggregate5.save()
|
|
199
|
-
self.aggregate6.save()
|
|
198
|
+
self.aggregate5.save() # pylint: disable=no-member
|
|
199
|
+
self.aggregate6.save() # pylint: disable=no-member
|
|
200
200
|
|
|
201
201
|
@skipIf(
|
|
202
202
|
connection.vendor != "postgresql",
|
|
@@ -390,7 +390,7 @@ class AggregateToPrefixMigrationTestCase(NautobotDataMigrationTest):
|
|
|
390
390
|
2,
|
|
391
391
|
)
|
|
392
392
|
|
|
393
|
-
for prefix in (self.prefix2, self.prefix3, self.prefix5):
|
|
393
|
+
for prefix in (self.prefix2, self.prefix3, self.prefix5): # pylint: disable=no-member
|
|
394
394
|
self.assertEqual(
|
|
395
395
|
self.object_change.objects.filter(changed_object_id=prefix.id).count(),
|
|
396
396
|
1,
|
|
@@ -478,6 +478,20 @@ class IPAddressQuerySet(TestCase):
|
|
|
478
478
|
[instance for ip, instance in self.ips.items() if re.match(r"2001(.*)1", ip)],
|
|
479
479
|
)
|
|
480
480
|
|
|
481
|
+
def test_get_or_create(self):
|
|
482
|
+
# https://github.com/nautobot/nautobot/issues/6676
|
|
483
|
+
ip_obj, created = IPAddress.objects.update_or_create(
|
|
484
|
+
defaults={
|
|
485
|
+
"status": self.ipaddr_status,
|
|
486
|
+
},
|
|
487
|
+
host="10.0.0.1",
|
|
488
|
+
mask_length="24",
|
|
489
|
+
namespace=self.namespace,
|
|
490
|
+
)
|
|
491
|
+
self.assertFalse(created)
|
|
492
|
+
self.assertEqual(str(ip_obj.address), "10.0.0.1/24")
|
|
493
|
+
self.assertEqual(ip_obj.parent.namespace, self.namespace)
|
|
494
|
+
|
|
481
495
|
|
|
482
496
|
class PrefixQuerysetTestCase(TestCase):
|
|
483
497
|
queryset = Prefix.objects.all()
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
<link rel="icon" href="/projects/core/en/stable/assets/favicon.ico">
|
|
15
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.
|
|
15
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.49">
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -8650,7 +8650,7 @@
|
|
|
8650
8650
|
<script id="__config" type="application/json">{"base": "/projects/core/en/stable/", "features": ["content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "/projects/core/en/stable/assets/javascripts/workers/search.6ce7567c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
|
|
8651
8651
|
|
|
8652
8652
|
|
|
8653
|
-
<script src="/projects/core/en/stable/assets/javascripts/bundle.
|
|
8653
|
+
<script src="/projects/core/en/stable/assets/javascripts/bundle.88dd0f4e.min.js"></script>
|
|
8654
8654
|
|
|
8655
8655
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
8656
8656
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
<link rel="icon" href="../assets/favicon.ico">
|
|
21
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.
|
|
21
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.49">
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -8817,7 +8817,7 @@
|
|
|
8817
8817
|
<script id="__config" type="application/json">{"base": "..", "features": ["content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../assets/javascripts/workers/search.6ce7567c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
|
|
8818
8818
|
|
|
8819
8819
|
|
|
8820
|
-
<script src="../assets/javascripts/bundle.
|
|
8820
|
+
<script src="../assets/javascripts/bundle.88dd0f4e.min.js"></script>
|
|
8821
8821
|
|
|
8822
8822
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
8823
8823
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
<link rel="icon" href="../assets/favicon.ico">
|
|
19
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.
|
|
19
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.49">
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -8751,7 +8751,7 @@
|
|
|
8751
8751
|
<script id="__config" type="application/json">{"base": "..", "features": ["content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../assets/javascripts/workers/search.6ce7567c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
|
|
8752
8752
|
|
|
8753
8753
|
|
|
8754
|
-
<script src="../assets/javascripts/bundle.
|
|
8754
|
+
<script src="../assets/javascripts/bundle.88dd0f4e.min.js"></script>
|
|
8755
8755
|
|
|
8756
8756
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
8757
8757
|
|