nautobot 2.2.0b1__py3-none-any.whl → 2.2.1__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/__init__.py +31 -0
- nautobot/apps/api.py +1 -2
- nautobot/apps/utils.py +4 -0
- nautobot/apps/views.py +2 -0
- nautobot/circuits/api/urls.py +1 -2
- nautobot/circuits/api/views.py +0 -12
- nautobot/circuits/apps.py +1 -1
- nautobot/circuits/tests/test_filters.py +1 -1
- nautobot/core/api/routers.py +50 -3
- nautobot/core/api/utils.py +4 -0
- nautobot/core/api/views.py +21 -15
- nautobot/core/cli/__init__.py +18 -11
- nautobot/core/constants.py +85 -0
- nautobot/core/filters.py +7 -1
- nautobot/core/forms/widgets.py +1 -2
- nautobot/core/graphql/schema.py +1 -0
- nautobot/core/management/commands/generate_test_data.py +4 -4
- nautobot/core/models/__init__.py +1 -0
- nautobot/core/settings.py +24 -3
- nautobot/core/settings.yaml +20 -0
- nautobot/core/signals.py +1 -0
- nautobot/core/tables.py +2 -1
- nautobot/core/templates/admin/base.html +23 -94
- nautobot/core/templates/generic/object_retrieve.html +2 -2
- nautobot/core/templates/graphene/graphiql.html +18 -47
- nautobot/core/templates/inc/footer.html +5 -5
- nautobot/core/templates/inc/javascript.html +4 -4
- nautobot/core/templates/inc/media.html +2 -2
- nautobot/core/templates/inc/nav_menu.html +0 -7
- nautobot/core/templates/nautobot_config.py.j2 +14 -1
- nautobot/core/templates/rest_framework/api.html +12 -5
- nautobot/core/templatetags/helpers.py +2 -2
- nautobot/core/testing/__init__.py +1 -1
- nautobot/core/testing/filters.py +1 -1
- nautobot/core/testing/views.py +30 -0
- nautobot/core/tests/integration/test_view_authentication.py +68 -0
- nautobot/core/tests/test_api.py +13 -6
- nautobot/core/tests/test_csv.py +5 -4
- nautobot/core/tests/test_filters.py +2 -1
- nautobot/core/tests/test_graphql.py +4 -14
- nautobot/core/tests/test_navigations.py +3 -0
- nautobot/core/tests/test_views.py +44 -16
- nautobot/core/utils/data.py +1 -2
- nautobot/core/utils/lookup.py +126 -0
- nautobot/core/views/__init__.py +3 -7
- nautobot/core/views/generic.py +20 -6
- nautobot/core/views/mixins.py +7 -1
- nautobot/core/views/renderers.py +11 -6
- nautobot/dcim/api/serializers.py +4 -4
- nautobot/dcim/api/urls.py +2 -3
- nautobot/dcim/api/views.py +7 -18
- nautobot/dcim/apps.py +8 -4
- nautobot/dcim/elevations.py +5 -1
- nautobot/dcim/factory.py +7 -7
- nautobot/dcim/filters/__init__.py +16 -17
- nautobot/dcim/forms.py +61 -45
- nautobot/dcim/homepage.py +11 -3
- nautobot/dcim/management/commands/migrate_location_contacts.py +218 -0
- nautobot/dcim/migrations/0057_controller_models.py +11 -70
- nautobot/dcim/models/__init__.py +2 -2
- nautobot/dcim/models/devices.py +14 -16
- nautobot/dcim/models/racks.py +1 -3
- nautobot/dcim/navigation.py +23 -31
- nautobot/dcim/signals.py +6 -6
- nautobot/dcim/tables/__init__.py +2 -2
- nautobot/dcim/tables/devices.py +13 -16
- nautobot/dcim/tables/template_code.py +1 -1
- nautobot/dcim/templates/dcim/controller_create.html +70 -0
- nautobot/dcim/templates/dcim/controller_retrieve.html +35 -18
- nautobot/dcim/templates/dcim/controllermanageddevicegroup_create.html +88 -0
- nautobot/dcim/templates/dcim/device/lldp_neighbors.html +75 -43
- nautobot/dcim/templates/dcim/device.html +11 -3
- nautobot/dcim/templates/dcim/device_edit.html +1 -1
- nautobot/dcim/templates/dcim/devicefamily_retrieve.html +4 -0
- nautobot/dcim/templates/dcim/softwareimagefile_retrieve.html +1 -1
- nautobot/dcim/tests/test_api.py +47 -6
- nautobot/dcim/tests/test_filters.py +92 -81
- nautobot/dcim/tests/test_graphql.py +11 -1
- nautobot/dcim/tests/test_models.py +15 -15
- nautobot/dcim/tests/test_signals.py +3 -1
- nautobot/dcim/tests/test_views.py +24 -12
- nautobot/dcim/urls.py +1 -1
- nautobot/dcim/views.py +25 -15
- nautobot/extras/api/serializers.py +20 -1
- nautobot/extras/api/urls.py +1 -2
- nautobot/extras/api/views.py +0 -10
- nautobot/extras/apps.py +7 -0
- nautobot/extras/context_managers.py +15 -4
- nautobot/extras/filters/__init__.py +53 -2
- nautobot/extras/filters/customfields.py +14 -9
- nautobot/extras/filters/mixins.py +6 -1
- nautobot/extras/forms/contacts.py +7 -0
- nautobot/extras/health_checks.py +1 -0
- nautobot/extras/jobs.py +1 -0
- nautobot/extras/managers.py +15 -2
- nautobot/extras/models/contacts.py +1 -0
- nautobot/extras/models/customfields.py +25 -2
- nautobot/extras/models/datasources.py +1 -0
- nautobot/extras/models/mixins.py +1 -0
- nautobot/extras/navigation.py +71 -65
- nautobot/extras/plugins/__init__.py +2 -1
- nautobot/extras/plugins/views.py +7 -11
- nautobot/extras/querysets.py +1 -2
- nautobot/extras/secrets/providers.py +1 -0
- nautobot/extras/signals.py +15 -5
- nautobot/extras/tasks.py +70 -17
- nautobot/extras/tests/test_api.py +2 -4
- nautobot/extras/tests/test_customfields.py +72 -9
- nautobot/extras/tests/test_dynamicgroups.py +2 -0
- nautobot/extras/tests/test_filters.py +89 -4
- nautobot/extras/tests/test_models.py +9 -0
- nautobot/extras/tests/test_relationships.py +10 -1
- nautobot/extras/tests/test_views.py +112 -1
- nautobot/extras/views.py +18 -17
- nautobot/ipam/api/serializers.py +10 -0
- nautobot/ipam/api/urls.py +1 -2
- nautobot/ipam/api/views.py +0 -11
- nautobot/ipam/apps.py +3 -2
- nautobot/ipam/tables.py +2 -22
- nautobot/ipam/tests/test_graphql.py +2 -3
- nautobot/ipam/tests/test_tables.py +42 -0
- nautobot/ipam/tests/test_views.py +1 -0
- nautobot/ipam/views.py +9 -9
- nautobot/project-static/css/base.css +1 -0
- nautobot/project-static/docs/404.html +126 -73
- nautobot/project-static/docs/apps/index.html +127 -71
- nautobot/project-static/docs/apps/nautobot-apps.html +127 -71
- nautobot/project-static/docs/assets/javascripts/{bundle.8fd75fb4.min.js → bundle.bd41221c.min.js} +2 -2
- nautobot/project-static/docs/assets/javascripts/{bundle.8fd75fb4.min.js.map → bundle.bd41221c.min.js.map} +3 -3
- nautobot/project-static/docs/assets/stylesheets/main.bcfcd587.min.css +1 -0
- nautobot/project-static/docs/assets/stylesheets/main.bcfcd587.min.css.map +1 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +167 -73
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +165 -72
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +128 -72
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +127 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +345 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +172 -73
- nautobot/project-static/docs/development/apps/api/configuration-view.html +127 -71
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +127 -71
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +127 -71
- nautobot/project-static/docs/development/apps/api/models/global-search.html +127 -71
- nautobot/project-static/docs/development/apps/api/models/graphql.html +127 -71
- nautobot/project-static/docs/development/apps/api/models/index.html +127 -71
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +127 -71
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +127 -71
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +127 -71
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +127 -71
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +127 -71
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +127 -71
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +127 -71
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +127 -71
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +127 -71
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +127 -71
- nautobot/project-static/docs/development/apps/api/prometheus.html +127 -71
- nautobot/project-static/docs/development/apps/api/setup.html +127 -71
- nautobot/project-static/docs/development/apps/api/testing.html +127 -71
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +127 -71
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +127 -71
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +127 -71
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +127 -71
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +127 -71
- nautobot/project-static/docs/development/apps/api/views/base-template.html +127 -71
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +141 -80
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +144 -83
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +127 -71
- nautobot/project-static/docs/development/apps/api/views/index.html +127 -71
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +127 -71
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +127 -71
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +127 -71
- nautobot/project-static/docs/development/apps/api/views/notes.html +127 -71
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +127 -71
- nautobot/project-static/docs/development/apps/api/views/urls.html +127 -71
- nautobot/project-static/docs/development/apps/index.html +127 -71
- nautobot/project-static/docs/development/apps/migration/code-updates.html +127 -71
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +127 -71
- nautobot/project-static/docs/development/apps/migration/from-v1.html +127 -71
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +127 -71
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +127 -71
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +127 -71
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +127 -71
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +127 -71
- nautobot/project-static/docs/development/core/application-registry.html +127 -71
- nautobot/project-static/docs/development/core/best-practices.html +145 -79
- nautobot/project-static/docs/development/core/bootstrap-ui.html +127 -71
- nautobot/project-static/docs/development/core/caching.html +127 -71
- nautobot/project-static/docs/development/core/controllers.html +141 -275
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +127 -71
- nautobot/project-static/docs/development/core/extending-models.html +13 -8166
- nautobot/project-static/docs/development/core/generic-views.html +142 -86
- nautobot/project-static/docs/development/core/getting-started.html +146 -81
- nautobot/project-static/docs/development/core/homepage.html +145 -89
- nautobot/project-static/docs/development/core/index.html +127 -71
- nautobot/project-static/docs/development/core/model-checklist.html +8354 -0
- nautobot/project-static/docs/development/core/model-features.html +130 -74
- nautobot/project-static/docs/development/core/natural-keys.html +127 -71
- nautobot/project-static/docs/development/core/navigation-menu.html +127 -71
- nautobot/project-static/docs/development/core/release-checklist.html +127 -71
- nautobot/project-static/docs/development/core/role-internals.html +127 -71
- nautobot/project-static/docs/development/core/settings.html +127 -71
- nautobot/project-static/docs/development/core/style-guide.html +127 -71
- nautobot/project-static/docs/development/core/templates.html +127 -71
- nautobot/project-static/docs/development/core/testing.html +127 -71
- nautobot/project-static/docs/development/core/user-preferences.html +127 -71
- nautobot/project-static/docs/development/extending-models.html +3 -3
- nautobot/project-static/docs/development/index.html +127 -71
- nautobot/project-static/docs/development/jobs/index.html +128 -72
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +127 -71
- nautobot/project-static/docs/index.html +126 -73
- nautobot/project-static/docs/models/dcim/{controllerdevicegroup.html → controllermanageddevicegroup.html} +3 -3
- nautobot/project-static/docs/objects.inv +0 -0
- nautobot/project-static/docs/release-notes/index.html +127 -71
- nautobot/project-static/docs/release-notes/version-1.0.html +127 -71
- nautobot/project-static/docs/release-notes/version-1.1.html +127 -71
- nautobot/project-static/docs/release-notes/version-1.2.html +127 -71
- nautobot/project-static/docs/release-notes/version-1.3.html +127 -71
- nautobot/project-static/docs/release-notes/version-1.4.html +127 -71
- nautobot/project-static/docs/release-notes/version-1.5.html +127 -71
- nautobot/project-static/docs/release-notes/version-1.6.html +127 -71
- nautobot/project-static/docs/release-notes/version-2.0.html +127 -71
- nautobot/project-static/docs/release-notes/version-2.1.html +538 -254
- nautobot/project-static/docs/release-notes/version-2.2.html +520 -101
- nautobot/project-static/docs/requirements.txt +3 -3
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +264 -259
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +127 -71
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +127 -71
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +127 -71
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +127 -71
- nautobot/project-static/docs/user-guide/administration/configuration/optional-settings.html +192 -71
- nautobot/project-static/docs/user-guide/administration/configuration/required-settings.html +127 -71
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +127 -71
- nautobot/project-static/docs/user-guide/administration/guides/caching.html +127 -71
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +127 -71
- nautobot/project-static/docs/user-guide/administration/guides/healthcheck.html +127 -71
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +127 -71
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +131 -71
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +127 -71
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +127 -71
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +130 -74
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +127 -71
- nautobot/project-static/docs/user-guide/administration/installation/docker.html +134 -74
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +127 -71
- nautobot/project-static/docs/user-guide/administration/installation/health-checks.html +8616 -0
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +127 -71
- nautobot/project-static/docs/user-guide/administration/installation/index.html +127 -71
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +127 -71
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +127 -71
- nautobot/project-static/docs/user-guide/administration/installation/selinux-troubleshooting.html +130 -74
- nautobot/project-static/docs/user-guide/administration/installation/services.html +127 -71
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +127 -71
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +127 -71
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +127 -71
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +127 -71
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +127 -71
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +127 -71
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +127 -71
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +127 -71
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +127 -71
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +127 -71
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +127 -71
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +127 -71
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +362 -79
- nautobot/project-static/docs/user-guide/core-data-model/dcim/{controllerdevicegroup.html → controllermanageddevicegroup.html} +210 -85
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +130 -74
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +138 -71
- nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +138 -71
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +127 -71
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/{contact-and-team.html → contacts-and-teams.html} +128 -72
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +129 -73
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +129 -73
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +127 -71
- nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +127 -71
- nautobot/project-static/docs/user-guide/index.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +127 -71
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +127 -71
- nautobot/project-static/jquery/jquery-3.7.1.min.js +2 -0
- nautobot/project-static/{jquery-ui-1.13.1 → jquery-ui-1.13.2}/images/ui-icons_444444_256x240.png +0 -0
- nautobot/project-static/{jquery-ui-1.13.1 → jquery-ui-1.13.2}/images/ui-icons_555555_256x240.png +0 -0
- nautobot/project-static/{jquery-ui-1.13.1 → jquery-ui-1.13.2}/images/ui-icons_777620_256x240.png +0 -0
- nautobot/project-static/{jquery-ui-1.13.1 → jquery-ui-1.13.2}/images/ui-icons_777777_256x240.png +0 -0
- nautobot/project-static/{jquery-ui-1.13.1 → jquery-ui-1.13.2}/images/ui-icons_cc0000_256x240.png +0 -0
- nautobot/project-static/{jquery-ui-1.13.1 → jquery-ui-1.13.2}/images/ui-icons_ffffff_256x240.png +0 -0
- nautobot/project-static/jquery-ui-1.13.2/jquery-ui.min.css +7 -0
- nautobot/project-static/jquery-ui-1.13.2/jquery-ui.min.js +6 -0
- nautobot/project-static/jquery-ui-1.13.2/jquery-ui.structure.min.css +5 -0
- nautobot/project-static/{jquery-ui-1.13.1 → jquery-ui-1.13.2}/jquery-ui.theme.min.css +1 -1
- nautobot/tenancy/api/urls.py +1 -2
- nautobot/tenancy/api/views.py +0 -12
- nautobot/tenancy/tables.py +1 -1
- nautobot/tenancy/tests/test_views.py +1 -0
- nautobot/users/api/urls.py +1 -2
- nautobot/users/api/views.py +2 -65
- nautobot/users/views.py +8 -8
- nautobot/virtualization/api/urls.py +1 -2
- nautobot/virtualization/api/views.py +0 -12
- {nautobot-2.2.0b1.dist-info → nautobot-2.2.1.dist-info}/METADATA +24 -24
- {nautobot-2.2.0b1.dist-info → nautobot-2.2.1.dist-info}/RECORD +418 -412
- nautobot/dcim/templates/dcim/controllerdevicegroup_create.html +0 -43
- nautobot/project-static/docs/assets/stylesheets/main.f2e4d321.min.css +0 -1
- nautobot/project-static/docs/assets/stylesheets/main.f2e4d321.min.css.map +0 -1
- nautobot/project-static/jquery/jquery-3.6.0.min.js +0 -2
- nautobot/project-static/jquery-ui-1.13.1/jquery-ui.min.css +0 -7
- nautobot/project-static/jquery-ui-1.13.1/jquery-ui.min.js +0 -6
- nautobot/project-static/jquery-ui-1.13.1/jquery-ui.structure.min.css +0 -5
- /nautobot/dcim/templates/dcim/{controllerdevicegroup_retrieve.html → controllermanageddevicegroup_retrieve.html} +0 -0
- {nautobot-2.2.0b1.dist-info → nautobot-2.2.1.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.2.0b1.dist-info → nautobot-2.2.1.dist-info}/NOTICE +0 -0
- {nautobot-2.2.0b1.dist-info → nautobot-2.2.1.dist-info}/WHEEL +0 -0
- {nautobot-2.2.0b1.dist-info → nautobot-2.2.1.dist-info}/entry_points.txt +0 -0
nautobot/dcim/tables/__init__.py
CHANGED
|
@@ -8,7 +8,7 @@ from .cables import CableTable
|
|
|
8
8
|
from .devices import (
|
|
9
9
|
ConsolePortTable,
|
|
10
10
|
ConsoleServerPortTable,
|
|
11
|
-
|
|
11
|
+
ControllerManagedDeviceGroupTable,
|
|
12
12
|
ControllerTable,
|
|
13
13
|
DeviceBayTable,
|
|
14
14
|
DeviceConsolePortTable,
|
|
@@ -66,7 +66,7 @@ __all__ = (
|
|
|
66
66
|
"ConsoleServerPortTable",
|
|
67
67
|
"ConsoleServerPortTemplateTable",
|
|
68
68
|
"ControllerTable",
|
|
69
|
-
"
|
|
69
|
+
"ControllerManagedDeviceGroupTable",
|
|
70
70
|
"DeviceBayTable",
|
|
71
71
|
"DeviceBayTemplateTable",
|
|
72
72
|
"DeviceConsolePortTable",
|
nautobot/dcim/tables/devices.py
CHANGED
|
@@ -14,7 +14,7 @@ from nautobot.dcim.models import (
|
|
|
14
14
|
ConsolePort,
|
|
15
15
|
ConsoleServerPort,
|
|
16
16
|
Controller,
|
|
17
|
-
|
|
17
|
+
ControllerManagedDeviceGroup,
|
|
18
18
|
Device,
|
|
19
19
|
DeviceBay,
|
|
20
20
|
DeviceRedundancyGroup,
|
|
@@ -60,7 +60,7 @@ __all__ = (
|
|
|
60
60
|
"ConsolePortTable",
|
|
61
61
|
"ConsoleServerPortTable",
|
|
62
62
|
"ControllerTable",
|
|
63
|
-
"
|
|
63
|
+
"ControllerManagedDeviceGroupTable",
|
|
64
64
|
"DeviceBayTable",
|
|
65
65
|
"DeviceConsolePortTable",
|
|
66
66
|
"DeviceConsoleServerPortTable",
|
|
@@ -164,7 +164,7 @@ class DeviceTable(StatusTableMixin, RoleTableMixin, BaseTable):
|
|
|
164
164
|
device_redundancy_group_priority = tables.TemplateColumn(
|
|
165
165
|
template_code="""{% if record.device_redundancy_group %}<span class="badge badge-default">{{ record.device_redundancy_group_priority|default:'None' }}</span>{% else %}—{% endif %}"""
|
|
166
166
|
)
|
|
167
|
-
|
|
167
|
+
controller_managed_device_group = tables.Column(linkify=True)
|
|
168
168
|
secrets_group = tables.Column(linkify=True)
|
|
169
169
|
tags = TagColumn(url_name="dcim:device_list")
|
|
170
170
|
|
|
@@ -193,7 +193,7 @@ class DeviceTable(StatusTableMixin, RoleTableMixin, BaseTable):
|
|
|
193
193
|
"vc_priority",
|
|
194
194
|
"device_redundancy_group",
|
|
195
195
|
"device_redundancy_group_priority",
|
|
196
|
-
"
|
|
196
|
+
"controller_managed_device_group",
|
|
197
197
|
"secrets_group",
|
|
198
198
|
"tags",
|
|
199
199
|
)
|
|
@@ -919,7 +919,7 @@ class VirtualChassisTable(BaseTable):
|
|
|
919
919
|
master = tables.Column(linkify=True)
|
|
920
920
|
member_count = LinkedCountColumn(
|
|
921
921
|
viewname="dcim:device_list",
|
|
922
|
-
url_params={"
|
|
922
|
+
url_params={"virtual_chassis": "pk"},
|
|
923
923
|
verbose_name="Members",
|
|
924
924
|
)
|
|
925
925
|
tags = TagColumn(url_name="dcim:virtualchassis_list")
|
|
@@ -1142,8 +1142,8 @@ class ControllerTable(BaseTable):
|
|
|
1142
1142
|
role = tables.Column(linkify=True)
|
|
1143
1143
|
tenant = TenantColumn()
|
|
1144
1144
|
external_integration = tables.Column(linkify=True)
|
|
1145
|
-
|
|
1146
|
-
|
|
1145
|
+
controller_device = tables.Column(linkify=True)
|
|
1146
|
+
controller_device_redundancy_group = tables.Column(linkify=True)
|
|
1147
1147
|
tags = TagColumn(url_name="dcim:controller_list")
|
|
1148
1148
|
actions = ButtonsColumn(Controller)
|
|
1149
1149
|
|
|
@@ -1160,8 +1160,8 @@ class ControllerTable(BaseTable):
|
|
|
1160
1160
|
"role",
|
|
1161
1161
|
"tenant",
|
|
1162
1162
|
"external_integration",
|
|
1163
|
-
"
|
|
1164
|
-
"
|
|
1163
|
+
"controller_device",
|
|
1164
|
+
"controller_device_redundancy_group",
|
|
1165
1165
|
"tags",
|
|
1166
1166
|
"actions",
|
|
1167
1167
|
)
|
|
@@ -1173,28 +1173,25 @@ class ControllerTable(BaseTable):
|
|
|
1173
1173
|
"platform",
|
|
1174
1174
|
"role",
|
|
1175
1175
|
"tenant",
|
|
1176
|
-
"external_integration",
|
|
1177
|
-
"deployed_controller_device",
|
|
1178
|
-
"deployed_controller_group",
|
|
1179
1176
|
"actions",
|
|
1180
1177
|
)
|
|
1181
1178
|
|
|
1182
1179
|
|
|
1183
|
-
class
|
|
1180
|
+
class ControllerManagedDeviceGroupTable(BaseTable):
|
|
1184
1181
|
"""Table for list view."""
|
|
1185
1182
|
|
|
1186
1183
|
pk = ToggleColumn()
|
|
1187
1184
|
name = tables.TemplateColumn(template_code=TREE_LINK, attrs={"td": {"class": "text-nowrap"}})
|
|
1188
1185
|
weight = tables.Column()
|
|
1189
1186
|
controller = tables.Column(linkify=True)
|
|
1190
|
-
tags = TagColumn(url_name="dcim:
|
|
1191
|
-
actions = ButtonsColumn(
|
|
1187
|
+
tags = TagColumn(url_name="dcim:controllermanageddevicegroup_list")
|
|
1188
|
+
actions = ButtonsColumn(ControllerManagedDeviceGroup)
|
|
1192
1189
|
device_count = tables.TemplateColumn(template_code=LINKED_RECORD_COUNT, verbose_name="Devices")
|
|
1193
1190
|
|
|
1194
1191
|
class Meta(BaseTable.Meta):
|
|
1195
1192
|
"""Meta attributes."""
|
|
1196
1193
|
|
|
1197
|
-
model =
|
|
1194
|
+
model = ControllerManagedDeviceGroup
|
|
1198
1195
|
fields = (
|
|
1199
1196
|
"pk",
|
|
1200
1197
|
"name",
|
|
@@ -91,7 +91,7 @@ LINKED_RECORD_COUNT = """
|
|
|
91
91
|
|
|
92
92
|
TREE_LINK = """
|
|
93
93
|
{% load helpers %}
|
|
94
|
-
{% tree_hierarchy_ui_representation record.tree_depth|as_range table.
|
|
94
|
+
{% tree_hierarchy_ui_representation record.tree_depth|as_range table.hide_hierarchy_ui %}
|
|
95
95
|
<a href="{{ record.get_absolute_url }}">{{ record.name }}</a>
|
|
96
96
|
"""
|
|
97
97
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{% extends 'generic/object_create.html' %}
|
|
2
|
+
{% load form_helpers %}
|
|
3
|
+
|
|
4
|
+
{% block form %}
|
|
5
|
+
<div class="panel panel-default">
|
|
6
|
+
<div class="panel-heading"><strong>Controller</strong></div>
|
|
7
|
+
<div class="panel-body">
|
|
8
|
+
{% render_field form.name %}
|
|
9
|
+
{% render_field form.status %}
|
|
10
|
+
{% render_field form.role %}
|
|
11
|
+
{% render_field form.location %}
|
|
12
|
+
{% render_field form.platform %}
|
|
13
|
+
{% render_field form.description %}
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="panel panel-default">
|
|
17
|
+
<div class="panel-heading"><strong>Integration</strong></div>
|
|
18
|
+
<div class="panel-body">
|
|
19
|
+
{% render_field form.external_integration %}
|
|
20
|
+
{% with controllerdevice_tab_active=form.initial.controller_device %}
|
|
21
|
+
<ul class="nav nav-tabs" role="tablist">
|
|
22
|
+
<li role="presentation"{% if controllerdevice_tab_active %} class="active"{% endif %}><a href="#controllerdevice" role="tab" data-toggle="tab">Controller Device</a></li>
|
|
23
|
+
<li role="presentation"{% if not controllerdevice_tab_active %} class="active"{% endif %}><a href="#controller_device_redundancy_group" role="tab" data-toggle="tab">Controller Device Redundancy Group</a></li>
|
|
24
|
+
</ul>
|
|
25
|
+
<div class="tab-content">
|
|
26
|
+
<div class="tab-pane{% if not controllerdevice_tab_active %} active{% endif %}" id="controller_device_redundancy_group">
|
|
27
|
+
{% render_field form.controller_device_redundancy_group %}
|
|
28
|
+
</div>
|
|
29
|
+
<div class="tab-pane{% if controllerdevice_tab_active %} active{% endif %}" id="controllerdevice">
|
|
30
|
+
{% render_field form.controller_device %}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
{% endwith %}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="panel panel-default">
|
|
37
|
+
<div class="panel-heading"><strong>Tenancy</strong></div>
|
|
38
|
+
<div class="panel-body">
|
|
39
|
+
{% render_field form.tenant_group %}
|
|
40
|
+
{% render_field form.tenant %}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
{% include 'inc/extras_features_edit_form_fields.html' %}
|
|
44
|
+
{% endblock form %}
|
|
45
|
+
|
|
46
|
+
{% block javascript %}
|
|
47
|
+
<script type="text/javascript">
|
|
48
|
+
const controllerDevice = $('#id_controller_device');
|
|
49
|
+
const controllerDeviceRedundancyGroup = $('#id_controller_device_redundancy_group');
|
|
50
|
+
|
|
51
|
+
const controllerUpdated = function() {
|
|
52
|
+
if (controllerDevice.val()) {
|
|
53
|
+
controllerDeviceRedundancyGroup.val('');
|
|
54
|
+
controllerDeviceRedundancyGroup.trigger('change');
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const controllerDeviceRedundancyGroupUpdated = function() {
|
|
59
|
+
if (controllerDeviceRedundancyGroup.val()) {
|
|
60
|
+
controllerDevice.val('');
|
|
61
|
+
controllerDevice.trigger('change');
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
controllerDevice.on('select2:select', controllerUpdated);
|
|
66
|
+
controllerDevice.on('select2:unselect', controllerUpdated);
|
|
67
|
+
controllerDeviceRedundancyGroup.on('select2:select', controllerDeviceRedundancyGroupUpdated);
|
|
68
|
+
controllerDeviceRedundancyGroup.on('select2:unselect', controllerDeviceRedundancyGroupUpdated);
|
|
69
|
+
</script>
|
|
70
|
+
{% endblock %}
|
|
@@ -22,10 +22,6 @@
|
|
|
22
22
|
<td>Role</td>
|
|
23
23
|
<td>{{ object.role|hyperlinked_object }}</td>
|
|
24
24
|
</tr>
|
|
25
|
-
<tr>
|
|
26
|
-
<td>Description</td>
|
|
27
|
-
<td>{{ object.description|placeholder }}</td>
|
|
28
|
-
</tr>
|
|
29
25
|
<tr>
|
|
30
26
|
<td>Location</td>
|
|
31
27
|
<td>{{ object.location|hyperlinked_object }}</td>
|
|
@@ -35,34 +31,55 @@
|
|
|
35
31
|
<td>{{ object.platform|hyperlinked_object }}</td>
|
|
36
32
|
</tr>
|
|
37
33
|
<tr>
|
|
38
|
-
<td>
|
|
39
|
-
<td>
|
|
34
|
+
<td>Tenant</td>
|
|
35
|
+
<td>
|
|
36
|
+
{% if object.tenant and object.tenant.tenant_group %}
|
|
37
|
+
{{ object.tenant.tenant_group|hyperlinked_object }} /
|
|
38
|
+
{% endif %}
|
|
39
|
+
{{ object.tenant|hyperlinked_object }}
|
|
40
|
+
</td>
|
|
40
41
|
</tr>
|
|
41
42
|
<tr>
|
|
42
|
-
<td>
|
|
43
|
-
<td>{{ object.
|
|
43
|
+
<td>Description</td>
|
|
44
|
+
<td>{{ object.description|placeholder }}</td>
|
|
44
45
|
</tr>
|
|
46
|
+
</table>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
{% endblock content_left_page %}
|
|
50
|
+
|
|
51
|
+
{% block content_right_page %}
|
|
52
|
+
<div class="panel panel-default">
|
|
53
|
+
<div class="panel-heading">
|
|
54
|
+
<strong>Integration</strong>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="table-responsive">
|
|
57
|
+
<table class="table table-hover panel-body attr-table">
|
|
45
58
|
<tr>
|
|
46
59
|
<td>External Integration</td>
|
|
47
60
|
<td>{{ object.external_integration|hyperlinked_object }}</td>
|
|
48
61
|
</tr>
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
{% if object.controller_device %}
|
|
63
|
+
<tr>
|
|
64
|
+
<td>Controller Device</td>
|
|
65
|
+
<td>{{ object.controller_device|hyperlinked_object }}</td>
|
|
66
|
+
</tr>
|
|
67
|
+
{% endif %}
|
|
68
|
+
{% if object.controller_device_redundancy_group %}
|
|
69
|
+
<tr>
|
|
70
|
+
<td>Controller Device Redundancy Group</td>
|
|
71
|
+
<td>{{ object.controller_device_redundancy_group|hyperlinked_object }}</td>
|
|
72
|
+
</tr>
|
|
73
|
+
{% endif %}
|
|
57
74
|
</table>
|
|
58
75
|
</div>
|
|
59
76
|
</div>
|
|
60
|
-
{% endblock
|
|
77
|
+
{% endblock content_right_page %}
|
|
61
78
|
|
|
62
79
|
{% block content_full_width_page %}
|
|
63
80
|
<div class="panel panel-default">
|
|
64
81
|
<div class="panel-heading">
|
|
65
|
-
<strong>Devices</strong>
|
|
82
|
+
<strong>Managed Devices</strong>
|
|
66
83
|
</div>
|
|
67
84
|
{% include 'responsive_table.html' with table=devices_table %}
|
|
68
85
|
</div>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{% extends 'generic/object_create.html' %}
|
|
2
|
+
{% load form_helpers %}
|
|
3
|
+
{% load helpers %}
|
|
4
|
+
{% load static %}
|
|
5
|
+
|
|
6
|
+
{% block form %}
|
|
7
|
+
<div class="panel panel-default">
|
|
8
|
+
<div class="panel-heading"><strong>Controller</strong></div>
|
|
9
|
+
<div class="panel-body">
|
|
10
|
+
{% render_field form.controller.as_hidden %}
|
|
11
|
+
{% render_field form.controller %}
|
|
12
|
+
{% render_field form.name %}
|
|
13
|
+
{% render_field form.devices %}
|
|
14
|
+
{% render_field form.parent %}
|
|
15
|
+
{% render_field form.weight %}
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
{% include 'inc/extras_features_edit_form_fields.html' %}
|
|
19
|
+
{% endblock form %}
|
|
20
|
+
|
|
21
|
+
{% block javascript %}
|
|
22
|
+
<script type="text/javascript">
|
|
23
|
+
const controllerUrl = '{% url 'dcim-api:controller-list' %}';
|
|
24
|
+
const controllerGroupUrl = '{% url 'dcim-api:controllermanageddevicegroup-list' %}';
|
|
25
|
+
|
|
26
|
+
const parentInput = $('select#id_parent');
|
|
27
|
+
const controllerInput = $('select#id_controller');
|
|
28
|
+
const hiddenControllerInput = $('input#id_controller');
|
|
29
|
+
|
|
30
|
+
const request = (url, calback) => {
|
|
31
|
+
$.ajax({
|
|
32
|
+
url,
|
|
33
|
+
method: "GET",
|
|
34
|
+
success: calback,
|
|
35
|
+
error: (error) => {
|
|
36
|
+
const message = `Error in request. URL: ${url}`;
|
|
37
|
+
console.error(message, error);
|
|
38
|
+
alert(message);
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const setController = (uid) => {
|
|
44
|
+
console.log('Set controller:', uid);
|
|
45
|
+
if (controllerInput.find(`option[value=${uid}]`).length) {
|
|
46
|
+
controllerInput.val(uid);
|
|
47
|
+
hiddenControllerInput.val(uid);
|
|
48
|
+
} else {
|
|
49
|
+
request(`${controllerUrl}${uid}/`, (data) => {
|
|
50
|
+
console.log('Controller data:', data);
|
|
51
|
+
controllerInput.append(new Option(data.name, uid));
|
|
52
|
+
setController(uid);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const updateControllerFromParent = (parentUid) => {
|
|
58
|
+
request(
|
|
59
|
+
`${controllerGroupUrl}${parentUid}/`,
|
|
60
|
+
(data) => data.controller && setController(data.controller.id),
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const onParentInput = (event) => {
|
|
65
|
+
const parentUid = parentInput.val();
|
|
66
|
+
if (parentUid) {
|
|
67
|
+
controllerInput.prop("disabled", true);
|
|
68
|
+
if (event) {
|
|
69
|
+
updateControllerFromParent(parentUid);
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
controllerInput.prop("disabled", false);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const onControllerInput = () => {
|
|
77
|
+
hiddenControllerInput.val(controllerInput.val());
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
parentInput.on('select2:select', onParentInput);
|
|
81
|
+
parentInput.on('select2:unselect', onParentInput);
|
|
82
|
+
|
|
83
|
+
controllerInput.on('select2:select', onControllerInput);
|
|
84
|
+
controllerInput.on('select2:unselect', onControllerInput);
|
|
85
|
+
|
|
86
|
+
onParentInput();
|
|
87
|
+
</script>
|
|
88
|
+
{% endblock %}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
<th>Interface</th>
|
|
16
16
|
<th>Configured Device</th>
|
|
17
17
|
<th>Configured Interface</th>
|
|
18
|
+
<th>Configured MAC Address</th>
|
|
18
19
|
<th>LLDP Device</th>
|
|
19
20
|
<th>LLDP Interface</th>
|
|
20
21
|
</tr>
|
|
@@ -27,18 +28,21 @@
|
|
|
27
28
|
<td class="configured_device" data="{{ iface.connected_endpoint.device }}" data-chassis="{{ iface.connected_endpoint.device.virtual_chassis.name }}">
|
|
28
29
|
{{ iface.connected_endpoint.device|hyperlinked_object }}
|
|
29
30
|
</td>
|
|
30
|
-
<td class="configured_interface" data="{{ iface.connected_endpoint }}">
|
|
31
|
+
<td class="configured_interface" data-interface-name="{{ iface.connected_endpoint }}">
|
|
31
32
|
<span title="{{ iface.connected_endpoint.get_type_display }}">{{ iface.connected_endpoint }}</span>
|
|
32
33
|
</td>
|
|
34
|
+
<td class="configured_mac" data-mac-address="{{ iface.connected_endpoint.mac_address }}">
|
|
35
|
+
<span>{{ iface.connected_endpoint.mac_address }}</span>
|
|
36
|
+
</td>
|
|
33
37
|
{% elif iface.connected_endpoint.circuit %}
|
|
34
38
|
{% with circuit=iface.connected_endpoint.circuit %}
|
|
35
|
-
<td colspan="
|
|
39
|
+
<td colspan="3">
|
|
36
40
|
<i class="mdi mdi-lightning-bolt" title="Circuit"></i>
|
|
37
41
|
<a href="{{ circuit.get_absolute_url }}">{{ circuit.provider }} {{ circuit }}</a>
|
|
38
42
|
</td>
|
|
39
43
|
{% endwith %}
|
|
40
44
|
{% else %}
|
|
41
|
-
<td colspan="
|
|
45
|
+
<td colspan="3">None</td>
|
|
42
46
|
{% endif %}
|
|
43
47
|
<td class="device"></td>
|
|
44
48
|
<td class="interface"></td>
|
|
@@ -52,51 +56,79 @@
|
|
|
52
56
|
{% block javascript %}
|
|
53
57
|
{{ block.super }}
|
|
54
58
|
<script type="text/javascript">
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
var ready = (callback) => {
|
|
60
|
+
if (document.readyState != "loading") {
|
|
61
|
+
callback();
|
|
62
|
+
} else {
|
|
63
|
+
document.addEventListener("DOMContentLoaded", callback);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
function getAttribute(node, querySelector, attribute) {
|
|
68
|
+
if (node === null or node.querySelector(querySelector) === null) {
|
|
69
|
+
return "";
|
|
70
|
+
}
|
|
71
|
+
return node.querySelector(querySelector).getAttribute(attribute) || "";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
ready(() => {
|
|
75
|
+
fetch("{% url 'dcim-api:device-napalm' pk=object.pk %}?method=get_lldp_neighbors_detail")
|
|
76
|
+
.then((response) => {
|
|
77
|
+
if (!response.ok) {
|
|
78
|
+
throw Error(response.statusText);
|
|
79
|
+
}
|
|
80
|
+
return response.json();
|
|
81
|
+
})
|
|
82
|
+
.then((data) => {
|
|
83
|
+
const interfaces = data["get_lldp_neighbors_detail"];
|
|
84
|
+
for (var iface of Object.keys(interfaces)) {
|
|
85
|
+
const neighbor = interfaces[iface][0];
|
|
86
|
+
const row = document.querySelector('*[data-interface-name="'+ iface.split(".")[0].replace(/([\/:])/g, "\\$1") + '"]');
|
|
87
|
+
// var row = $('*[data-interface-name="' + iface.split(".")[0].replace(/([\/:])/g, "\\$1") + '"]');
|
|
63
88
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
89
|
+
// Glean configured hostnames/interfaces from the DOM
|
|
90
|
+
const configured_device = getAttribute(row, 'td.configured_device', 'data');
|
|
91
|
+
const configured_chassis = getAttribute(row, 'td.configured_device', 'data-chassis');
|
|
92
|
+
const configured_interface = getAttribute(row, 'td.configured_interface', 'data-interface-name').toLowerCase();
|
|
93
|
+
const configured_mac_address = getAttribute(row, 'td.configured_mac', 'data-mac-address').toLowerCase();
|
|
94
|
+
let configured_interface_short = null;
|
|
95
|
+
if (configured_interface) {
|
|
96
|
+
// Match long-form IOS names against short ones (e.g. Gi0/1 == GigabitEthernet0/1).
|
|
97
|
+
configured_interface_short = configured_interface.replace(/^([A-Z][a-z])[^0-9]*([0-9\/]+)$/, "$1$2");
|
|
98
|
+
}
|
|
73
99
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
100
|
+
// Clean up hostnames/interfaces learned via LLDP
|
|
101
|
+
const neighbor_host = neighbor['remote_system_name'] || ""; // sanitize hostname if it's null to avoid breaking the split func
|
|
102
|
+
const neighbor_port = neighbor['remote_port'] || ""; // sanitize port if it's null to avoid breaking the split func
|
|
103
|
+
const lldp_device = neighbor_host.split(".")[0]; // Strip off any trailing domain name
|
|
104
|
+
const lldp_interface = neighbor_port.split(".")[0].toLowerCase(); // Strip off any trailing subinterface ID
|
|
79
105
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
106
|
+
// Add LLDP neighbors to table
|
|
107
|
+
row.querySelector('td.device').textContent = lldp_device;
|
|
108
|
+
row.querySelector('td.interface').textContent = lldp_interface;
|
|
83
109
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
110
|
+
// Apply colors to rows
|
|
111
|
+
if (!configured_device && lldp_device) {
|
|
112
|
+
row.classList.add('info');
|
|
113
|
+
} else if ((configured_device == lldp_device || configured_chassis == lldp_device) && configured_interface == lldp_interface) {
|
|
114
|
+
row.classList.add('success');
|
|
115
|
+
} else if ((configured_device == lldp_device || configured_chassis == lldp_device) && configured_interface_short == lldp_interface) {
|
|
116
|
+
row.classList.add('success');
|
|
117
|
+
} else if ((configured_device == lldp_device || configured_chassis == lldp_device) && configured_mac_address == lldp_interface) {
|
|
118
|
+
row.classList.add('success');
|
|
119
|
+
} else {
|
|
120
|
+
row.classList.add('danger');
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
.catch((error) => {
|
|
125
|
+
if (error.responseText) {
|
|
126
|
+
alert(error.responseText);
|
|
127
|
+
} else {
|
|
128
|
+
throw error;
|
|
98
129
|
}
|
|
99
130
|
});
|
|
100
131
|
});
|
|
132
|
+
|
|
101
133
|
</script>
|
|
102
|
-
{% endblock %}
|
|
134
|
+
{% endblock %}
|
|
@@ -206,11 +206,19 @@
|
|
|
206
206
|
</td>
|
|
207
207
|
</tr>
|
|
208
208
|
<tr>
|
|
209
|
-
<td>Controller Device Group</td>
|
|
209
|
+
<td>Controller Managed Device Group</td>
|
|
210
210
|
<td>
|
|
211
|
-
{{ object.
|
|
211
|
+
{{ object.controller_managed_device_group|hyperlinked_object }}
|
|
212
212
|
</td>
|
|
213
213
|
</tr>
|
|
214
|
+
{% if object.controller_managed_device_group %}
|
|
215
|
+
<tr>
|
|
216
|
+
<td>Managed by Controller</td>
|
|
217
|
+
<td>
|
|
218
|
+
{{ object.controller_managed_device_group.controller|hyperlinked_object }}
|
|
219
|
+
</td>
|
|
220
|
+
</tr>
|
|
221
|
+
{% endif %}
|
|
214
222
|
{% if object.cluster %}
|
|
215
223
|
<tr>
|
|
216
224
|
<td>Cluster</td>
|
|
@@ -352,7 +360,7 @@
|
|
|
352
360
|
</div>
|
|
353
361
|
</div>
|
|
354
362
|
</div>
|
|
355
|
-
{% if
|
|
363
|
+
{% if object.is_contact_associable_model %}
|
|
356
364
|
<div id="contacts" role="tabpanel" class="tab-pane {% if request.GET.tab == 'contacts' %}active{% else %}fade{% endif %}">
|
|
357
365
|
<div class="row">
|
|
358
366
|
<div class="col-md-12">
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
{% render_field form.secrets_group %}
|
|
91
91
|
{% render_field form.device_redundancy_group %}
|
|
92
92
|
{% render_field form.device_redundancy_group_priority %}
|
|
93
|
-
{% render_field form.
|
|
93
|
+
{% render_field form.controller_managed_device_group %}
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
96
|
<div class="panel panel-default">
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
<td>Device Types</td>
|
|
19
19
|
<td><a href="{% url 'dcim:devicetype_list' %}?device_family={{ object.name }}">{{ object.device_type_count }}</a></td>
|
|
20
20
|
</tr>
|
|
21
|
+
<tr>
|
|
22
|
+
<td>Total Devices</td>
|
|
23
|
+
<td>{{ total_devices }}</td>
|
|
24
|
+
</tr>
|
|
21
25
|
</table>
|
|
22
26
|
</div>
|
|
23
27
|
{% endblock %}
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
</div>
|
|
170
170
|
</div>
|
|
171
171
|
</div>
|
|
172
|
-
{% if
|
|
172
|
+
{% if object.is_contact_associable_model %}
|
|
173
173
|
<div id="contacts" role="tabpanel" class="tab-pane {% if request.GET.tab == 'contacts' %}active{% else %}fade{% endif %}">
|
|
174
174
|
<div class="row">
|
|
175
175
|
<div class="col-md-12">
|