diff --git a/.bandit.yml b/.bandit.yml index 55c6741b..59d961d8 100644 --- a/.bandit.yml +++ b/.bandit.yml @@ -1,5 +1,7 @@ --- skips: [] -# No need to check for security issues in the test scripts! exclude_dirs: + # No need to check for security issues in the test scripts! - "./tests/" + # Ignore locally installed collection + - "./collections/" diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 6f6e5e7c..70596682 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -6,7 +6,7 @@ on: # yamllint disable runs-on: description: "The OS to run the job on" required: false - default: "ubuntu-22.04" + default: "ubuntu-24.04" type: string python-version: description: "The Python version to use" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 56fb0965..a1a490cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ on: # yamllint disable runs-on: description: "The OS to run the job on" required: false - default: "ubuntu-22.04" + default: "ubuntu-24.04" type: string full-integration: description: "Run full integration tests" @@ -30,8 +30,8 @@ jobs: fail-fast: false matrix: python-version: - - "3.10" - "3.11" + - "3.12" env: INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}" steps: @@ -51,12 +51,12 @@ jobs: fail-fast: false matrix: python-version: - - "3.11" + - "3.12" nautobot-version: - "2.3" ansible-version: - - "2.16" - "2.17" + - "2.18" with: python-version: "${{ matrix.python-version }}" nautobot-version: "${{ matrix.nautobot-version }}" @@ -70,8 +70,8 @@ jobs: fail-fast: false matrix: python-version: - - "3.10" - "3.11" + - "3.12" nautobot-version: - "2.0" - "2.1" @@ -80,6 +80,14 @@ jobs: ansible-version: - "2.16" - "2.17" + - "2.18" + exclude: + - python-version: "3.12" + nautobot-version: "2.0" + - python-version: "3.12" + nautobot-version: "2.1" + - python-version: "3.12" + nautobot-version: "2.2" with: python-version: "${{ matrix.python-version }}" nautobot-version: "${{ matrix.nautobot-version }}" diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index 3d776cf0..7ed013cb 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -6,7 +6,7 @@ on: # yamllint disable jobs: lint: - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-24.04" steps: - name: "Check out repository code" uses: "actions/checkout@v4" @@ -15,13 +15,13 @@ jobs: - name: "Linting" run: "invoke lint" unit: - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-24.04" strategy: fail-fast: false matrix: python-version: - - "3.10" - "3.11" + - "3.12" env: INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}" steps: @@ -39,8 +39,8 @@ jobs: fail-fast: false matrix: python-version: - - "3.10" - "3.11" + - "3.12" nautobot-version: - "2.0" - "2.1" @@ -49,6 +49,14 @@ jobs: ansible-version: - "2.16" - "2.17" + - "2.18" + exclude: + - python-version: "3.12" + nautobot-version: "2.0" + - python-version: "3.12" + nautobot-version: "2.1" + - python-version: "3.12" + nautobot-version: "2.2" with: python-version: "${{ matrix.python-version }}" nautobot-version: "${{ matrix.nautobot-version }}" @@ -57,7 +65,7 @@ jobs: - "unit" publish_github: name: "Publish to GitHub" - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-24.04" if: "startsWith(github.ref, 'refs/tags/v')" steps: - name: "Check out repository code" @@ -65,7 +73,7 @@ jobs: - name: "Set up Python" uses: "actions/setup-python@v5" with: - python-version: "3.10" + python-version: "3.11" - name: "Install Python Packages" run: "pip install ansible-core" - name: "Build the collection" @@ -82,7 +90,7 @@ jobs: - "integration" publish_galaxy: name: "Publish to Ansible Galaxy" - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-24.04" if: "startsWith(github.ref, 'refs/tags/v')" steps: - name: "Check out repository code" @@ -90,7 +98,7 @@ jobs: - name: "Set up Python" uses: "actions/setup-python@v5" with: - python-version: "3.10" + python-version: "3.11" - name: "Install Python Packages" run: "pip install ansible-core" - name: "Create the ansible.cfg file" diff --git a/.readthedocs.yml b/.readthedocs.yml index d392bf57..58c5fc86 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,9 +8,9 @@ version: 2 # Set the version of Python in the build environment. build: - os: "ubuntu-22.04" + os: "ubuntu-24.04" tools: - python: "3.10" + python: "3.11" jobs: post_install: - "ansible-galaxy collection install . --force" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e7c1c47..fee9f591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # networktocode.nautobot Release Notes +v5.6.0 +====== + +Minor Changes +------------- +- (#470) Dropped support for Python 3.10 to follow ansible-core 2.18 +- (#472) Added documentation on using custom fields in compose variables with the `inventory` plugin +- (#474) Fixed `lookup` plugin to properly handle templated variables in `api_filter` +- (#475) Added documentation for the `device_interface` module that `type` is required when creating a new interface +- (#477) Fixed query example in the `lookup_graphql` plugin documentation for compatibility with Nautobot 2.X +- (#478) Fixed the `cable` module to properly work with all cable types +- (#480) Fixed environment variable fallback for `url` and `token` in all modules +- (#481) Fixed environment variable fallback for `validate_certs` in all modules + v5.5.0 ====== diff --git a/Dockerfile b/Dockerfile index 5e0b4be0..99558f85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,11 @@ # # This base stage just installs the dependencies required for production # without any development deps. -ARG PYTHON_VER=3.10 +ARG PYTHON_VER=3.11 FROM python:${PYTHON_VER} AS base # Allow for flexible Python versions, for broader testing -ARG PYTHON_VER=3.10 +ARG PYTHON_VER=3.11 ENV PYTHON_VERSION=${PYTHON_VER} ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq shellcheck && apt-get clean @@ -60,7 +60,7 @@ FROM lint AS unittests ARG ANSIBLE_COLLECTIONS_PATH=/usr/share/ansible/collections ENV ANSIBLE_COLLECTIONS_PATH=${ANSIBLE_COLLECTIONS_PATH} -ARG PYTHON_VER=3.10 +ARG PYTHON_VER=3.11 ENV PYTHON_VERSION=${PYTHON_VER} # Allows for custom command line arguments to be passed to ansible-test (like -vvv) @@ -89,7 +89,7 @@ RUN ansible-test sanity $ANSIBLE_SANITY_ARGS \ plugins/ # Run unit tests -RUN ansible-test units $ANSIBLE_UNIT_ARGS --coverage --python ${PYTHON_VERSION} +RUN ansible-test units $ANSIBLE_UNIT_ARGS --coverage --requirements --python ${PYTHON_VERSION} ############ # Integration Tests diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 2aca2154..40f42d2f 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -545,3 +545,14 @@ releases: minor_changes: - (#464) Added full support for caching to GraphQL Inventory plugin - (#465) Changed `parent_location_type` to allow for explicit name attribute lookup + 5.6.0: + changes: + minor_changes: + - (#470) Dropped support for Python 3.10 to follow ansible-core 2.18 + - (#472) Added documentation on using custom fields in compose variables with the `inventory` plugin + - (#474) Fixed `lookup` plugin to properly handle templated variables in `api_filter` + - (#475) Added documentation for the `device_interface` module that `type` is required when creating a new interface + - (#477) Fixed query example in the `lookup_graphql` plugin documentation for compatibility with Nautobot 2.X + - (#478) Fixed the `cable` module to properly work with all cable types + - (#480) Fixed environment variable fallback for `url` and `token` in all modules + - (#481) Fixed environment variable fallback for `validate_certs` in all modules diff --git a/development/requirements.txt b/development/requirements.txt index d2be6f8d..00e1c8bd 100644 --- a/development/requirements.txt +++ b/development/requirements.txt @@ -1 +1 @@ -nautobot-bgp-models==0.20.0 \ No newline at end of file +nautobot-bgp-models==2.3.0 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index d8a4c7e3..4f9ec233 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,8 @@ x-args: &args PYTHON_VER: ${PYTHON_VER} + ANSIBLE_SANITY_ARGS: ${ANSIBLE_SANITY_ARGS:-} + ANSIBLE_UNIT_ARGS: ${ANSIBLE_UNIT_ARGS:-} # Build block with context and target default x-build: &build @@ -14,7 +16,8 @@ x-service: ANSIBLE_INTEGRATION_ARGS: ${ANSIBLE_INTEGRATION_ARGS:-} ANSIBLE_SANITY_ARGS: ${ANSIBLE_SANITY_ARGS:-} ANSIBLE_UNIT_ARGS: ${ANSIBLE_UNIT_ARGS:-} - NAUTOBOT_VER: ${INVOKE_NAUTOBOT_ANSIBLE_NAUTOBOT_VER:-} + NAUTOBOT_VER: ${NAUTOBOT_VER:-} + OUTPUT_INVENTORY_JSON: ${OUTPUT_INVENTORY_JSON:-} services: unit: @@ -33,3 +36,6 @@ services: build: <<: *build target: integration + volumes: + # This allows us to update the inventory files from inside the container + - ${PWD}/tests/integration/targets/inventory/files/:/tmp/inventory_files/ diff --git a/docs/getting_started/how-to-use/inventory.md b/docs/getting_started/how-to-use/inventory.md index a8fd3cbe..b9fe6ce6 100644 --- a/docs/getting_started/how-to-use/inventory.md +++ b/docs/getting_started/how-to-use/inventory.md @@ -11,6 +11,16 @@ compose: ansible_network_os: platform.network_driver ``` +You can also use custom fields on the device or a nested object. + +```yaml +--- +plugin: networktocode.nautobot.inventory +compose: + device_owner: custom_fields.device_owner + ansible_network_os: platforms.custom_fields.ansible_network_os +``` + ## Using Keyed Groups to set `ansible_network_os` to Platform Network Driver ```yaml diff --git a/docs/requirements.txt b/docs/requirements.txt index 96120465..bee6c684 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -ansible-core==2.15.12 +ansible-core==2.18 mkdocs==1.6.1 mkdocs-ansible-collection==0.2.0 mkdocs-material==9.5.30 diff --git a/galaxy.yml b/galaxy.yml index 5b0ddead..bcfbacf2 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -9,7 +9,7 @@ namespace: networktocode name: nautobot # The version of the collection. Must be compatible with semantic versioning -version: 5.5.0 +version: 5.6.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/hacking/local-test.sh b/hacking/local-test.sh index 2c6963e1..1a12affb 100755 --- a/hacking/local-test.sh +++ b/hacking/local-test.sh @@ -1,13 +1,18 @@ #!/usr/bin/env bash -# Usage: ./hacking/local-test.sh +################################################################################ +# DEPRECATED +# Run `invoke unit` or `invoke integration` to run the tests locally instead! +################################################################################ -# Run build, which will remove previously installed versions -./hacking/build.sh +# # Usage: ./hacking/local-test.sh -# Install new built version -ansible-galaxy collection install networktocode-nautobot-*.tar.gz -p . +# # Run build, which will remove previously installed versions +# ./hacking/build.sh -# You can now cd into the installed version and run tests -(cd ansible_collections/networktocode/nautobot/ && ansible-test units -v --python 3.9 && ansible-test sanity --requirements -v --python 3.9 --skip-test pep8 plugins/) -rm -rf ansible_collections +# # Install new built version +# ansible-galaxy collection install networktocode-nautobot-*.tar.gz -p . + +# # You can now cd into the installed version and run tests +# (cd ansible_collections/networktocode/nautobot/ && ansible-test units -v --python 3.9 && ansible-test sanity --requirements -v --python 3.9 --skip-test pep8 plugins/) +# rm -rf ansible_collections diff --git a/hacking/make-docs.sh b/hacking/make-docs.sh index 75594a9f..fa11c5a6 100755 --- a/hacking/make-docs.sh +++ b/hacking/make-docs.sh @@ -1,12 +1,17 @@ #!/usr/bin/env bash -# Usage: ./hacking/make-docs.sh +################################################################################ +# DEPRECATED +# Run `invoke docs` to host the docs locally instead! +################################################################################ -# Run build, which will remove previously installed versions -./hacking/build.sh +# # Usage: ./hacking/make-docs.sh -# Install new built version -ansible-galaxy collection install networktocode-nautobot-*.tar.gz -f +# # Run build, which will remove previously installed versions +# ./hacking/build.sh -# Run antisbull-docs now -antsibull-docs collection --use-current --squash-hierarchy --dest-dir docs/plugins/ networktocode.nautobot \ No newline at end of file +# # Install new built version +# ansible-galaxy collection install networktocode-nautobot-*.tar.gz -f + +# # Run antisbull-docs now +# antsibull-docs collection --use-current --squash-hierarchy --dest-dir docs/plugins/ networktocode.nautobot \ No newline at end of file diff --git a/hacking/update_test_inventories.sh b/hacking/update_test_inventories.sh index 9fb27f81..119c2b30 100755 --- a/hacking/update_test_inventories.sh +++ b/hacking/update_test_inventories.sh @@ -1,26 +1,31 @@ #!/usr/bin/env bash -# Stop on failure - if unit tests fail the inventory will not be updated -set -e +################################################################################ +# DEPRECATED +# Run `invoke integration --update-inventories` instead! +################################################################################ -# - Build Nautobot via development environment -# - Fill with test data, run ./tests/integration/nautobot-populate.py -# - Add '127.0.0.1 nautobot' to /etc/hosts -# - Run ./hacking/update_test_inventories.sh -# - Manually verify the diff of new JSON is correct, to prevent introducing a regression. +# # Stop on failure - if unit tests fail the inventory will not be updated +# set -e -# Install locally -export ANSIBLE_COLLECTIONS_PATHS=. -export OUTPUT_INVENTORY_JSON=tests/integration/targets/inventory/files +# # - Build Nautobot via development environment +# # - Fill with test data, run ./tests/integration/nautobot-populate.py +# # - Add '127.0.0.1 nautobot' to /etc/hosts +# # - Run ./hacking/update_test_inventories.sh +# # - Manually verify the diff of new JSON is correct, to prevent introducing a regression. -# Remove local cache -rm -rf /tmp/inventory_nautobot/ +# # Install locally +# export ANSIBLE_COLLECTIONS_PATHS=. +# export OUTPUT_INVENTORY_JSON=tests/integration/targets/inventory/files -# Clean and install the built collection -./hacking/build.sh +# # Remove local cache +# rm -rf /tmp/inventory_nautobot/ -# Install new built version -ansible-galaxy collection install networktocode-nautobot-*.tar.gz -p . +# # Clean and install the built collection +# ./hacking/build.sh -# Run the same script used by integration tests, but save the results -./tests/integration/targets/inventory/runme.sh +# # Install new built version +# ansible-galaxy collection install networktocode-nautobot-*.tar.gz -p . + +# # Run the same script used by integration tests, but save the results +# ./tests/integration/targets/inventory/runme.sh diff --git a/plugins/inventory/inventory.py b/plugins/inventory/inventory.py index 9e6d2a28..ede235d4 100644 --- a/plugins/inventory/inventory.py +++ b/plugins/inventory/inventory.py @@ -238,6 +238,9 @@ foo: last_updated bar: display nested_variable: rack.display + # You can also use custom fields on the device or a nested object + device_owner: custom_fields.device_owner + ansible_network_os: platforms.custom_fields.ansible_network_os # You can use keyed_groups to group on properties of devices or VMs. # NOTE: It's only possible to key off direct items on the device/VM objects. diff --git a/plugins/lookup/lookup.py b/plugins/lookup/lookup.py index 43082bff..17486f46 100644 --- a/plugins/lookup/lookup.py +++ b/plugins/lookup/lookup.py @@ -344,6 +344,8 @@ def run(self, terms, variables=None, **kwargs): api_token = kwargs.get("token") or os.getenv("NAUTOBOT_TOKEN") api_endpoint = kwargs.get("api_endpoint") or os.getenv("NAUTOBOT_URL") + if not api_endpoint or not api_token: + raise AnsibleError("Both api_endpoint and token are required") if kwargs.get("validate_certs") is not None: ssl_verify = kwargs.get("validate_certs") elif os.getenv("NAUTOBOT_VALIDATE_CERTS") is not None: @@ -352,6 +354,8 @@ def run(self, terms, variables=None, **kwargs): ssl_verify = True num_retries = kwargs.get("num_retries", "0") api_filter = kwargs.get("api_filter") + if api_filter: + api_filter = self._templar.do_template(api_filter) raw_return = kwargs.get("raw_data") plugin = kwargs.get("plugin") api_version = kwargs.get("api_version") @@ -360,7 +364,6 @@ def run(self, terms, variables=None, **kwargs): terms = [terms] nautobot = pynautobot.api(api_endpoint, token=api_token if api_token else None, api_version=api_version, verify=ssl_verify, retries=num_retries) - results = [] for term in terms: if plugin: diff --git a/plugins/lookup/lookup_graphql.py b/plugins/lookup/lookup_graphql.py index 8d4deaf2..701cc580 100644 --- a/plugins/lookup/lookup_graphql.py +++ b/plugins/lookup/lookup_graphql.py @@ -80,7 +80,7 @@ graph_variables: location_name: DEN query_string: | - query ($location_name:String!) { + query ($location_name:[String]) { locations (name: $location_name) { id name diff --git a/plugins/module_utils/utils.py b/plugins/module_utils/utils.py index 4e8d32f0..532055bd 100644 --- a/plugins/module_utils/utils.py +++ b/plugins/module_utils/utils.py @@ -18,7 +18,7 @@ from ansible.module_utils.common.text.converters import to_text -from ansible.module_utils.basic import missing_required_lib +from ansible.module_utils.basic import missing_required_lib, env_fallback from ansible.module_utils.urls import open_url PYNAUTOBOT_IMP_ERR = None @@ -479,10 +479,17 @@ "console_server_port", "power_port", "power_outlet", + "services", + # Cable termination types + "circuits.circuittermination", "dcim.consoleport", "dcim.consoleserverport", - "circuits.circuittermination", - "services", + "dcim.frontport", + "dcim.interface", + "dcim.powerfeed", + "dcim.poweroutlet", + "dcim.powerport", + "dcim.rearport", } REQUIRED_ID_FIND = { @@ -528,11 +535,11 @@ NAUTOBOT_ARG_SPEC = dict( - url=dict(type="str", required=True), - token=dict(type="str", required=True, no_log=True), + url=dict(type="str", required=True, fallback=(env_fallback, ["NAUTOBOT_URL"])), + token=dict(type="str", required=True, no_log=True, fallback=(env_fallback, ["NAUTOBOT_TOKEN"])), state=dict(required=False, default="present", choices=["present", "absent"]), query_params=dict(required=False, type="list", elements="str"), - validate_certs=dict(type="raw", default=True), + validate_certs=dict(type="raw", default=True, fallback=(env_fallback, ["NAUTOBOT_VALIDATE_CERTS"])), api_version=dict(type="str", required=False), ) diff --git a/plugins/modules/device_interface.py b/plugins/modules/device_interface.py index c7b95b3f..0deb7803 100644 --- a/plugins/modules/device_interface.py +++ b/plugins/modules/device_interface.py @@ -61,6 +61,7 @@ Form factor of the interface: ex. 1000Base-T (1GE), Virtual, 10GBASE-T (10GE) This has to be specified exactly as what is found within UI + - Required if I(state=present) and the interface does not exist yet required: false type: str version_added: "3.0.0" diff --git a/poetry.lock b/poetry.lock index aba0eb5c..d6865257 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "ansible-core" -version = "2.17.7" +version = "2.18.1" description = "Radically simple IT automation" optional = false -python-versions = ">=3.10" +python-versions = ">=3.11" files = [ - {file = "ansible_core-2.17.7-py3-none-any.whl", hash = "sha256:64d4f0a006687a5621aa80dca54fd0c5ae75145b7aac8c1b8d7f07a1399c4705"}, - {file = "ansible_core-2.17.7.tar.gz", hash = "sha256:3aaab735d6c4e2d6239bc326800dc0ecda2a1490caa8455b41084ec0bc54dacf"}, + {file = "ansible_core-2.18.1-py3-none-any.whl", hash = "sha256:4a312e416e09c7271188d6b8e2b1062fc6834fefd6a1814d0e02fb8aadb3e1ba"}, + {file = "ansible_core-2.18.1.tar.gz", hash = "sha256:14cac1f92bbdae881cb0616eddeb17925e8cb507e486087975e724533d9de74f"}, ] [package.dependencies] @@ -20,18 +20,15 @@ resolvelib = ">=0.5.3,<1.1.0" [[package]] name = "astroid" -version = "3.3.6" +version = "3.3.8" description = "An abstract syntax tree for Python with inference support." optional = false python-versions = ">=3.9.0" files = [ - {file = "astroid-3.3.6-py3-none-any.whl", hash = "sha256:db676dc4f3ae6bfe31cda227dc60e03438378d7a896aec57422c95634e8d722f"}, - {file = "astroid-3.3.6.tar.gz", hash = "sha256:6aaea045f938c735ead292204afdb977a36e989522b7833ef6fea94de743f442"}, + {file = "astroid-3.3.8-py3-none-any.whl", hash = "sha256:187ccc0c248bfbba564826c26f070494f7bc964fd286b6d9fff4420e55de828c"}, + {file = "astroid-3.3.8.tar.gz", hash = "sha256:a88c7994f914a4ea8572fac479459f4955eeccc877be3f2d959a33273b0cf40b"}, ] -[package.dependencies] -typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} - [[package]] name = "attrs" version = "24.3.0" @@ -126,8 +123,6 @@ mypy-extensions = ">=0.4.3" packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] @@ -227,127 +222,114 @@ pycparser = "*" [[package]] name = "charset-normalizer" -version = "3.4.0" +version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false -python-versions = ">=3.7.0" -files = [ - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, - {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, - {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, +python-versions = ">=3.7" +files = [ + {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"}, + {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"}, + {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, ] [[package]] name = "click" -version = "8.1.7" +version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, + {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, + {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, ] [package.dependencies] @@ -364,70 +346,6 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -[[package]] -name = "coverage" -version = "7.3.2" -description = "Code coverage measurement for Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "coverage-7.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d872145f3a3231a5f20fd48500274d7df222e291d90baa2026cc5152b7ce86bf"}, - {file = "coverage-7.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:310b3bb9c91ea66d59c53fa4989f57d2436e08f18fb2f421a1b0b6b8cc7fffda"}, - {file = "coverage-7.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f47d39359e2c3779c5331fc740cf4bce6d9d680a7b4b4ead97056a0ae07cb49a"}, - {file = "coverage-7.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa72dbaf2c2068404b9870d93436e6d23addd8bbe9295f49cbca83f6e278179c"}, - {file = "coverage-7.3.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:beaa5c1b4777f03fc63dfd2a6bd820f73f036bfb10e925fce067b00a340d0f3f"}, - {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:dbc1b46b92186cc8074fee9d9fbb97a9dd06c6cbbef391c2f59d80eabdf0faa6"}, - {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:315a989e861031334d7bee1f9113c8770472db2ac484e5b8c3173428360a9148"}, - {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d1bc430677773397f64a5c88cb522ea43175ff16f8bfcc89d467d974cb2274f9"}, - {file = "coverage-7.3.2-cp310-cp310-win32.whl", hash = "sha256:a889ae02f43aa45032afe364c8ae84ad3c54828c2faa44f3bfcafecb5c96b02f"}, - {file = "coverage-7.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c0ba320de3fb8c6ec16e0be17ee1d3d69adcda99406c43c0409cb5c41788a611"}, - {file = "coverage-7.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ac8c802fa29843a72d32ec56d0ca792ad15a302b28ca6203389afe21f8fa062c"}, - {file = "coverage-7.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:89a937174104339e3a3ffcf9f446c00e3a806c28b1841c63edb2b369310fd074"}, - {file = "coverage-7.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e267e9e2b574a176ddb983399dec325a80dbe161f1a32715c780b5d14b5f583a"}, - {file = "coverage-7.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2443cbda35df0d35dcfb9bf8f3c02c57c1d6111169e3c85fc1fcc05e0c9f39a3"}, - {file = "coverage-7.3.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4175e10cc8dda0265653e8714b3174430b07c1dca8957f4966cbd6c2b1b8065a"}, - {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1"}, - {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5c913b556a116b8d5f6ef834038ba983834d887d82187c8f73dec21049abd65c"}, - {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1981f785239e4e39e6444c63a98da3a1db8e971cb9ceb50a945ba6296b43f312"}, - {file = "coverage-7.3.2-cp311-cp311-win32.whl", hash = "sha256:43668cabd5ca8258f5954f27a3aaf78757e6acf13c17604d89648ecc0cc66640"}, - {file = "coverage-7.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10c39c0452bf6e694511c901426d6b5ac005acc0f78ff265dbe36bf81f808a2"}, - {file = "coverage-7.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4cbae1051ab791debecc4a5dcc4a1ff45fc27b91b9aee165c8a27514dd160836"}, - {file = "coverage-7.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63"}, - {file = "coverage-7.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c7bba973ebee5e56fe9251300c00f1579652587a9f4a5ed8404b15a0471f216"}, - {file = "coverage-7.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe494faa90ce6381770746077243231e0b83ff3f17069d748f645617cefe19d4"}, - {file = "coverage-7.3.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6e9589bd04d0461a417562649522575d8752904d35c12907d8c9dfeba588faf"}, - {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d51ac2a26f71da1b57f2dc81d0e108b6ab177e7d30e774db90675467c847bbdf"}, - {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:99b89d9f76070237975b315b3d5f4d6956ae354a4c92ac2388a5695516e47c84"}, - {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fa28e909776dc69efb6ed975a63691bc8172b64ff357e663a1bb06ff3c9b589a"}, - {file = "coverage-7.3.2-cp312-cp312-win32.whl", hash = "sha256:289fe43bf45a575e3ab10b26d7b6f2ddb9ee2dba447499f5401cfb5ecb8196bb"}, - {file = "coverage-7.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:7dbc3ed60e8659bc59b6b304b43ff9c3ed858da2839c78b804973f613d3e92ed"}, - {file = "coverage-7.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f94b734214ea6a36fe16e96a70d941af80ff3bfd716c141300d95ebc85339738"}, - {file = "coverage-7.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:af3d828d2c1cbae52d34bdbb22fcd94d1ce715d95f1a012354a75e5913f1bda2"}, - {file = "coverage-7.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:630b13e3036e13c7adc480ca42fa7afc2a5d938081d28e20903cf7fd687872e2"}, - {file = "coverage-7.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9eacf273e885b02a0273bb3a2170f30e2d53a6d53b72dbe02d6701b5296101c"}, - {file = "coverage-7.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8f17966e861ff97305e0801134e69db33b143bbfb36436efb9cfff6ec7b2fd9"}, - {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b4275802d16882cf9c8b3d057a0839acb07ee9379fa2749eca54efbce1535b82"}, - {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:72c0cfa5250f483181e677ebc97133ea1ab3eb68645e494775deb6a7f6f83901"}, - {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:cb536f0dcd14149425996821a168f6e269d7dcd2c273a8bff8201e79f5104e76"}, - {file = "coverage-7.3.2-cp38-cp38-win32.whl", hash = "sha256:307adb8bd3abe389a471e649038a71b4eb13bfd6b7dd9a129fa856f5c695cf92"}, - {file = "coverage-7.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:88ed2c30a49ea81ea3b7f172e0269c182a44c236eb394718f976239892c0a27a"}, - {file = "coverage-7.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b631c92dfe601adf8f5ebc7fc13ced6bb6e9609b19d9a8cd59fa47c4186ad1ce"}, - {file = "coverage-7.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d3d9df4051c4a7d13036524b66ecf7a7537d14c18a384043f30a303b146164e9"}, - {file = "coverage-7.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f7363d3b6a1119ef05015959ca24a9afc0ea8a02c687fe7e2d557705375c01f"}, - {file = "coverage-7.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2f11cc3c967a09d3695d2a6f03fb3e6236622b93be7a4b5dc09166a861be6d25"}, - {file = "coverage-7.3.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9"}, - {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3a4006916aa6fee7cd38db3bfc95aa9c54ebb4ffbfc47c677c8bba949ceba0a6"}, - {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9028a3871280110d6e1aa2df1afd5ef003bab5fb1ef421d6dc748ae1c8ef2ebc"}, - {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9f805d62aec8eb92bab5b61c0f07329275b6f41c97d80e847b03eb894f38d083"}, - {file = "coverage-7.3.2-cp39-cp39-win32.whl", hash = "sha256:d1c88ec1a7ff4ebca0219f5b1ef863451d828cccf889c173e1253aa84b1e07ce"}, - {file = "coverage-7.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b4767da59464bb593c07afceaddea61b154136300881844768037fd5e859353f"}, - {file = "coverage-7.3.2-pp38.pp39.pp310-none-any.whl", hash = "sha256:ae97af89f0fbf373400970c0a21eef5aa941ffeed90aee43650b81f7d7f47637"}, - {file = "coverage-7.3.2.tar.gz", hash = "sha256:be32ad29341b0170e795ca590e1c07e81fc061cb5b10c74ce7203491484404ef"}, -] - -[package.extras] -toml = ["tomli"] - [[package]] name = "cryptography" version = "44.0.0" @@ -492,20 +410,6 @@ files = [ graph = ["objgraph (>=1.7.2)"] profile = ["gprof2dot (>=2022.7.29)"] -[[package]] -name = "exceptiongroup" -version = "1.2.2" -description = "Backport of PEP 654 (exception groups)" -optional = false -python-versions = ">=3.7" -files = [ - {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, - {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, -] - -[package.extras] -test = ["pytest (>=6)"] - [[package]] name = "execnet" version = "2.1.1" @@ -539,25 +443,24 @@ dev = ["flake8", "markdown", "twine", "wheel"] [[package]] name = "hypothesis" -version = "6.122.5" +version = "6.123.11" description = "A library for property-based testing" optional = false python-versions = ">=3.9" files = [ - {file = "hypothesis-6.122.5-py3-none-any.whl", hash = "sha256:c50b104d9d5163ebdeb09ccd93626343664942570bcb067c41adf10394a81caf"}, - {file = "hypothesis-6.122.5.tar.gz", hash = "sha256:e0994f04331251d51e18040f497c839a52b37669b422fe4cfef85a54d41405bf"}, + {file = "hypothesis-6.123.11-py3-none-any.whl", hash = "sha256:58877d59318dd50bb7d6450ca1bf91215c75f6a96e2841eb8ad9544eca2dcce3"}, + {file = "hypothesis-6.123.11.tar.gz", hash = "sha256:63b099caa69ea456a594cb46bf6a374294c8a514c340d1a79396e8213a0b2b90"}, ] [package.dependencies] attrs = ">=22.2.0" -exceptiongroup = {version = ">=1.0.0", markers = "python_version < \"3.11\""} sortedcontainers = ">=2.1.0,<3.0.0" [package.extras] -all = ["black (>=19.10b0)", "click (>=7.0)", "crosshair-tool (>=0.0.78)", "django (>=4.2)", "dpcontracts (>=0.4)", "hypothesis-crosshair (>=0.0.18)", "lark (>=0.10.1)", "libcst (>=0.3.16)", "numpy (>=1.19.3)", "pandas (>=1.1)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2024.2)"] +all = ["black (>=19.10b0)", "click (>=7.0)", "crosshair-tool (>=0.0.81)", "django (>=4.2)", "dpcontracts (>=0.4)", "hypothesis-crosshair (>=0.0.18)", "lark (>=0.10.1)", "libcst (>=0.3.16)", "numpy (>=1.19.3)", "pandas (>=1.1)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2024.2)"] cli = ["black (>=19.10b0)", "click (>=7.0)", "rich (>=9.0.0)"] codemods = ["libcst (>=0.3.16)"] -crosshair = ["crosshair-tool (>=0.0.78)", "hypothesis-crosshair (>=0.0.18)"] +crosshair = ["crosshair-tool (>=0.0.81)", "hypothesis-crosshair (>=0.0.18)"] dateutil = ["python-dateutil (>=1.4)"] django = ["django (>=4.2)"] dpcontracts = ["dpcontracts (>=0.4)"] @@ -645,13 +548,13 @@ colors = ["colorama (>=0.4.6)"] [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, + {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, + {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, ] [package.dependencies] @@ -974,17 +877,17 @@ files = [ [[package]] name = "netutils" -version = "1.10.0" +version = "1.12.0" description = "Common helper functions useful in network automation." optional = false python-versions = "<4.0,>=3.8" files = [ - {file = "netutils-1.10.0-py3-none-any.whl", hash = "sha256:19b8cc3d2cf567a986f916c90f298d241af03a71c62ec6d38d6dc3395347670b"}, - {file = "netutils-1.10.0.tar.gz", hash = "sha256:f457fb85cb622e89aa0403fb2128c50986f7ce38d93a5873981727d088619793"}, + {file = "netutils-1.12.0-py3-none-any.whl", hash = "sha256:7cb37796ce86637814f8c899f64db2b054986b0eda719d3fcadc293d451a4db1"}, + {file = "netutils-1.12.0.tar.gz", hash = "sha256:96a790d11921063a6a64ee79c6e8c5a5ffcd05cbee07dd2b614d98c4416cffdd"}, ] [package.extras] -optionals = ["jsonschema (>=4.17.3,<5.0.0)", "napalm (>=4.0.0,<5.0.0)"] +optionals = ["jsonschema (>=4.17.3,<5.0.0)", "legacycrypt (==0.3)", "napalm (>=4.0.0,<5.0.0)"] [[package]] name = "packaging" @@ -1103,13 +1006,13 @@ files = [ [[package]] name = "pygments" -version = "2.18.0" +version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" files = [ - {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, - {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, + {file = "pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"}, + {file = "pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f"}, ] [package.extras] @@ -1117,27 +1020,25 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pylint" -version = "3.3.2" +version = "3.3.3" description = "python code static checker" optional = false python-versions = ">=3.9.0" files = [ - {file = "pylint-3.3.2-py3-none-any.whl", hash = "sha256:77f068c287d49b8683cd7c6e624243c74f92890f767f106ffa1ddf3c0a54cb7a"}, - {file = "pylint-3.3.2.tar.gz", hash = "sha256:9ec054ec992cd05ad30a6df1676229739a73f8feeabf3912c995d17601052b01"}, + {file = "pylint-3.3.3-py3-none-any.whl", hash = "sha256:26e271a2bc8bce0fc23833805a9076dd9b4d5194e2a02164942cb3cdc37b4183"}, + {file = "pylint-3.3.3.tar.gz", hash = "sha256:07c607523b17e6d16e2ae0d7ef59602e332caa762af64203c24b41c27139f36a"}, ] [package.dependencies] -astroid = ">=3.3.5,<=3.4.0-dev0" +astroid = ">=3.3.8,<=3.4.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ - {version = ">=0.2", markers = "python_version < \"3.11\""}, {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, ] isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" [package.extras] @@ -1146,13 +1047,13 @@ testutils = ["gitpython (>3)"] [[package]] name = "pymdown-extensions" -version = "10.12" +version = "10.14" description = "Extension pack for Python Markdown." optional = false python-versions = ">=3.8" files = [ - {file = "pymdown_extensions-10.12-py3-none-any.whl", hash = "sha256:49f81412242d3527b8b4967b990df395c89563043bc51a3d2d7d500e52123b77"}, - {file = "pymdown_extensions-10.12.tar.gz", hash = "sha256:b0ee1e0b2bef1071a47891ab17003bfe5bf824a398e13f49f8ed653b699369a7"}, + {file = "pymdown_extensions-10.14-py3-none-any.whl", hash = "sha256:202481f716cc8250e4be8fce997781ebf7917701b59652458ee47f2401f818b5"}, + {file = "pymdown_extensions-10.14.tar.gz", hash = "sha256:741bd7c4ff961ba40b7528d32284c53bc436b8b1645e8e37c3e57770b8700a34"}, ] [package.dependencies] @@ -1160,7 +1061,7 @@ markdown = ">=3.6" pyyaml = "*" [package.extras] -extra = ["pygments (>=2.12)"] +extra = ["pygments (>=2.19.1)"] [[package]] name = "pynautobot" @@ -1191,11 +1092,9 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=1.5,<2" -tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -1510,7 +1409,6 @@ files = [ [package.dependencies] markdown-it-py = ">=2.2.0" pygments = ">=2.13.0,<3.0.0" -typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.11\""} [package.extras] jupyter = ["ipywidgets (>=7.5.1,<9)"] @@ -1551,47 +1449,6 @@ files = [ [package.dependencies] pbr = ">=2.0.0" -[[package]] -name = "tomli" -version = "2.2.1" -description = "A lil' TOML parser" -optional = false -python-versions = ">=3.8" -files = [ - {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, - {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, - {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, - {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, - {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, - {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, - {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, - {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, - {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, - {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, -] - [[package]] name = "tomlkit" version = "0.13.2" @@ -1603,26 +1460,15 @@ files = [ {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, ] -[[package]] -name = "typing-extensions" -version = "4.12.2" -description = "Backported and Experimental Type Hints for Python 3.8+" -optional = false -python-versions = ">=3.8" -files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, -] - [[package]] name = "urllib3" -version = "2.2.3" +version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, - {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, + {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, + {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, ] [package.extras] @@ -1694,5 +1540,5 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" -python-versions = ">=3.10,<4.0" -content-hash = "4a4b2df2adba4d32390080ab8215d788f712accd58500894b9d7406fa57b9ceb" +python-versions = ">=3.11,<4.0" +content-hash = "0a5ef737bfd2396db04a3e4ce3c73f7773d3f931dcefc9f19194e2fa75d0b19e" diff --git a/pyproject.toml b/pyproject.toml index bcd358b5..d16000eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,19 @@ [tool.poetry] name = "nautobot_ansible_modules" -version = "5.5.0" +version = "5.6.0" description = "Ansible collection to interact with Nautobot's API" authors = ["Network to Code "] license = "Apache 2.0" package-mode = false [tool.poetry.dependencies] -python = ">=3.10,<4.0" +python = ">=3.11,<4.0" netutils = "^1.2" pynautobot = "^2.4.2" ansible-core = "^2.16" [tool.poetry.dev-dependencies] black = "*" -coverage = "7.3.2" cryptography = "*" jinja2 = "*" jmespath = "*" diff --git a/tasks.py b/tasks.py index ece48055..9f6601aa 100644 --- a/tasks.py +++ b/tasks.py @@ -34,7 +34,7 @@ def is_truthy(arg): "nautobot_ansible": { "nautobot_ver": "2.0.0", "project_name": "nautobot_ansible", - "python_ver": "3.10", + "python_ver": "3.11", "local": False, "compose_dir": os.path.join(os.path.dirname(__file__), "development"), "compose_files": ["docker-compose.yml"], @@ -226,8 +226,8 @@ def post_upgrade(context): def lint(context): """Run linting tools""" context.run( - "docker compose --project-name nautobot_ansible up --build --force-recreate --exit-code-from lint lint", - env={"PYTHON_VER": context["nautobot_ansible"]["python_ver"]}, + f"docker compose --project-name {context.nautobot_ansible.project_name} up --build --force-recreate --exit-code-from lint lint", + env={"PYTHON_VER": context.nautobot_ansible.python_ver}, ) @@ -239,27 +239,34 @@ def lint(context): ) def unit(context, verbose=0): """Run unit tests""" - env = {"PYTHON_VER": context["nautobot_ansible"]["python_ver"]} + env = {"PYTHON_VER": context.nautobot_ansible.python_ver} if verbose: + env["ANSIBLE_SANITY_ARGS"] = f"-{'v' * verbose}" env["ANSIBLE_UNIT_ARGS"] = f"-{'v' * verbose}" - context.run("docker compose --project-name nautobot_ansible up --build --force-recreate --exit-code-from unit unit", env=env) + context.run(f"docker compose --project-name {context.nautobot_ansible.project_name} up --build --force-recreate --exit-code-from unit unit", env=env) + # Clean up after the tests + context.run(f"docker compose --project-name {context.nautobot_ansible.project_name} down") @task( help={ "verbose": "Run the tests with verbose output; can be provided multiple times for more verbosity (e.g. -v, -vv, -vvv)", "tags": "Run specific test tags (e.g. 'device' or 'location'); can be provided multiple times (e.g. --tags device --tags location)", + "update_inventories": "Update the inventory integration test JSON files with the latest data", }, iterable=["tags"], incrementable=["verbose"], ) -def integration(context, verbose=0, tags=None): +def integration(context, verbose=0, tags=None, update_inventories=False): """Run all tests including integration tests""" build(context) # Destroy any existing containers and volumes that may be left over from a previous run destroy(context) start(context) - env = {"PYTHON_VER": context["nautobot_ansible"]["python_ver"]} + env = { + "PYTHON_VER": context.nautobot_ansible.python_ver, + "NAUTOBOT_VER": context.nautobot_ansible.nautobot_ver, + } ansible_args = [] if verbose: ansible_args.append(f"-{'v' * verbose}") @@ -267,8 +274,10 @@ def integration(context, verbose=0, tags=None): ansible_args.append(f"--tags {','.join(tags)}") if ansible_args: env["ANSIBLE_INTEGRATION_ARGS"] = " ".join(ansible_args) + if update_inventories: + env["OUTPUT_INVENTORY_JSON"] = "/tmp/inventory_files" # nosec B108 context.run( - "docker compose --project-name nautobot_ansible up --build --force-recreate --exit-code-from integration integration", + f"docker compose --project-name {context.nautobot_ansible.project_name} up --build --force-recreate --exit-code-from integration integration", env=env, ) # Clean up after the tests diff --git a/tests/integration/entrypoint.sh b/tests/integration/entrypoint.sh index 4d8a964a..24954d0c 100755 --- a/tests/integration/entrypoint.sh +++ b/tests/integration/entrypoint.sh @@ -34,10 +34,10 @@ function main { echo "# Running..." # shellcheck disable=SC2086 - ansible-test integration $ANSIBLE_INTEGRATION_ARGS --coverage --python "$PYTHON_VERSION" inventory "$@" - ansible-test integration $ANSIBLE_INTEGRATION_ARGS --coverage --python "$PYTHON_VERSION" regression-latest "$@" - ansible-test integration $ANSIBLE_INTEGRATION_ARGS --coverage --python "$PYTHON_VERSION" latest "$@" - ansible-test coverage report + ansible-test integration $ANSIBLE_INTEGRATION_ARGS --coverage --requirements --python "$PYTHON_VERSION" inventory "$@" + ansible-test integration $ANSIBLE_INTEGRATION_ARGS --coverage --requirements --python "$PYTHON_VERSION" regression-latest "$@" + ansible-test integration $ANSIBLE_INTEGRATION_ARGS --coverage --requirements --python "$PYTHON_VERSION" latest "$@" + ansible-test coverage report --requirements } main "$@" \ No newline at end of file diff --git a/tests/integration/nautobot-populate.py b/tests/integration/nautobot-populate.py index 358eefa9..f66f9414 100755 --- a/tests/integration/nautobot-populate.py +++ b/tests/integration/nautobot-populate.py @@ -9,10 +9,6 @@ import pynautobot from packaging import version -# NOTE: If anything depends on specific versions of Nautobot, can check INTEGRATION_TESTS in env -# os.environ["INTEGRATION_TESTS"] - - # Set nb variable to connect to Nautobot and use the variable in future calls nb_host = os.getenv("NAUTOBOT_URL", "http://nautobot:8000") nb_token = os.getenv("NAUTOBOT_TOKEN", "0123456789abcdef0123456789abcdef01234567") @@ -352,6 +348,7 @@ def make_nautobot_calls(endpoint, payload): created_devices = make_nautobot_calls(nb.dcim.devices, devices) # Device variables to be used later on test100 = nb.dcim.devices.get(name="test100") +test_device_r1 = nb.dcim.devices.get(name="TestDeviceR1") # Create rear port rear_ports = [{"name": "Test Rear Port", "device": test100.id, "type": "bnc", "positions": 5}] @@ -361,6 +358,10 @@ def make_nautobot_calls(endpoint, payload): power_ports = [{"name": "Test Power Port", "device": test100.id}] created_power_ports = make_nautobot_calls(nb.dcim.power_ports, power_ports) +# Create power outlets +power_outlets = [{"name": "R1 Power Outlet", "device": test_device_r1.id}] +created_power_outlets = make_nautobot_calls(nb.dcim.power_outlets, power_outlets) + # Create console ports console_ports = [{"name": "Test Console Port", "device": test100.id}] created_console_ports = make_nautobot_calls(nb.dcim.console_ports, console_ports) @@ -397,7 +398,6 @@ def make_nautobot_calls(endpoint, payload): test100_gi1 = nb.dcim.interfaces.get(name="GigabitEthernet1", device_id=test100.id) test100_gi2 = nb.dcim.interfaces.get(name="GigabitEthernet2", device_id=test100.id) - # Create IP Addresses ip_addresses = [ { @@ -623,9 +623,31 @@ def make_nautobot_calls(endpoint, payload): "type": "text", "content_types": ["circuits.circuit"], }, + { + "label": "My Device Custom Field", + "key": "my_device_custom_field", + "type": "text", + "content_types": ["dcim.device"], + }, + { + "label": "My Location Custom Field", + "key": "my_location_custom_field", + "type": "text", + "content_types": ["dcim.location"], + }, ] created_custom_fields = make_nautobot_calls(nb.extras.custom_fields, custom_fields) +# Set a custom field on a device +test100 = nb.dcim.devices.get(name="test100") +test100.custom_fields = {"my_device_custom_field": "Test Device Custom Field Value"} +test100.save() + +# Set a custom field on the location for the device +test100_location = nb.dcim.locations.get(id=test100.location.id) +test100_location.custom_fields = {"my_location_custom_field": "Test Location Custom Field Value"} +test100_location.save() + # Enable example job for job tests example_job_receiver = nb.extras.jobs.get(name="Example Simple Job Button Receiver") example_job_receiver.enabled = True diff --git a/tests/integration/targets/inventory/README.md b/tests/integration/targets/inventory/README.md index 39e98fb7..3c31bab3 100644 --- a/tests/integration/targets/inventory/README.md +++ b/tests/integration/targets/inventory/README.md @@ -37,3 +37,13 @@ We use `sort` - using the `-V` flag to designate we are sorting version numbers ``` > Note: We expand the **current** version to the full major.minor.patch version automatically in CI so the sorting works correctly with this pattern. If you verify with printf, make sure you use the full version number for the current version, but the short versions for the min and max to match what automation will do. + +## Updating Inventory JSON Files + +To update the inventory JSON files, you can run the `invoke integration` task with the `--update-inventories` flag. + +```bash +invoke integration --update-inventories +``` + +> WARNING: This does not diff the files against any expected output, it simply overwrites the files with the latest data. You will need to manually verify the output is correct! diff --git a/tests/integration/targets/inventory/compare_inventory_json.py b/tests/integration/targets/inventory/compare_inventory_json.py index 3216e328..bb96a33d 100755 --- a/tests/integration/targets/inventory/compare_inventory_json.py +++ b/tests/integration/targets/inventory/compare_inventory_json.py @@ -15,17 +15,9 @@ # Nautobot includes "created" and "last_updated" times on objects. These end up in the interfaces objects that are included verbatim from the Nautobot API. # "url" may be different if local tests use a different host/port +# "natural_slug" will be different whenever we update the test data, which just causes noise in the diffs # Remove these from files saved in git as test data -KEYS_REMOVE = frozenset(["created", "id", "last_updated", "rack_id", "url", "notes_url"]) - -# Ignore these when performing diffs as they will be different for each test run -KEYS_IGNORE = frozenset(["natural_slug"]) - - -def all_keys_to_ignore(): - keys = KEYS_REMOVE.union(KEYS_IGNORE) - - return keys +KEYS_REMOVE = frozenset(["created", "id", "last_updated", "rack_id", "url", "notes_url", "natural_slug"]) # Assume the object will not be recursive, as it originally came from JSON @@ -121,42 +113,44 @@ def main(): args = parser.parse_args() - data_a = read_json(args.filename_a) - if args.write: - # When writing test data, only remove "remove_keys" that will change on every git commit. - # This makes diffs more easily readable to ensure changes to test data look correct. - remove_keys(data_a, KEYS_REMOVE) - sort_hostvar_arrays(data_a) - sort_groups(data_a) - write_json(args.filename_b, data_a) - - else: + # Read in the new file output by the ansible-inventory command data_b = read_json(args.filename_b) - # Ignore keys that we don't want to diff, in addition to the ones removed that change on every commit - keys = all_keys_to_ignore() - remove_keys(data_a, keys) - remove_keys(data_b, keys) - - sort_hostvar_arrays(data_a) + # Remove keys that we don't want to diff, in addition to the ones removed that change on every commit + remove_keys(data_b, KEYS_REMOVE) sort_hostvar_arrays(data_b) - - sort_groups(data_a) sort_groups(data_b) + # Write the cleaned data back to the file + write_json(args.filename_b, data_b) + # If we are writing new test data, we should always fail the test so we don't get false positives + sys.exit(1) + + data_a = read_json(args.filename_a) + data_b = read_json(args.filename_b) + + # Remove keys that we don't want to diff, in addition to the ones removed that change on every commit + remove_keys(data_a, KEYS_REMOVE) + remove_keys(data_b, KEYS_REMOVE) - # Perform the diff - # syntax='symmetric' will produce output that prints both the before and after as "$insert" and "$delete" - # marshal=True removes any special types, allowing to be dumped as json - result = diff(data_a, data_b, marshal=True, syntax="symmetric") - - if result: - # Dictionary is not empty - print differences - print(json.dumps(result, sort_keys=True, indent=4)) - sys.exit(1) - else: - # Success, no differences - sys.exit(0) + sort_hostvar_arrays(data_a) + sort_hostvar_arrays(data_b) + + sort_groups(data_a) + sort_groups(data_b) + + # Perform the diff + # syntax='symmetric' will produce output that prints both the before and after as "$insert" and "$delete" + # marshal=True removes any special types, allowing to be dumped as json + result = diff(data_a, data_b, marshal=True, syntax="symmetric") + + if result: + # Dictionary is not empty - print differences + print(json.dumps(result, sort_keys=True, indent=4)) + sys.exit(1) + else: + # Success, no differences + sys.exit(0) if __name__ == "__main__": diff --git a/tests/integration/targets/inventory/files/test_2-2.2.json b/tests/integration/targets/inventory/files/test_2-2.2.json index 6117f988..c41f7d86 100644 --- a/tests/integration/targets/inventory/files/test_2-2.2.json +++ b/tests/integration/targets/inventory/files/test_2-2.2.json @@ -3,7 +3,9 @@ "hostvars": { "R1-Device": { "config_context": {}, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "interfaces": [], "is_virtual": false, @@ -26,7 +28,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -34,7 +35,9 @@ "Test Nexus One": { "ansible_host": "172.16.180.11", "config_context": {}, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Nexus Parent", "dns_name": "nexus.example.com", "interfaces": [ @@ -52,7 +55,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -68,7 +73,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_9171", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -108,7 +112,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-11_59b6", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -124,10 +127,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_c00f", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -141,7 +142,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -158,7 +158,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -173,7 +172,6 @@ "mode": null, "mtu": null, "name": "Ethernet1/1", - "natural_slug": "ethernet1-1_test-nexus-one__child-test-location_parent-test-location_a314", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -182,7 +180,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -208,7 +205,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -224,7 +223,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus Child One", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location_d562", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -262,7 +260,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-12_f322", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -278,10 +275,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_c00f", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -295,7 +290,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -312,7 +306,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -327,7 +320,6 @@ "mode": null, "mtu": null, "name": "Ethernet2/1", - "natural_slug": "ethernet2-1_test-nexus-child-one__child-test-location_parent-test-location_be66", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -336,7 +328,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -366,7 +357,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -382,7 +375,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_9171", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -410,7 +402,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_758f", "object_type": "ipam.service", "ports": [ 23 @@ -429,7 +420,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -451,7 +441,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth0_0a6c", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -460,7 +449,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -480,7 +468,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -505,7 +492,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth1_45be", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -514,7 +500,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -534,7 +519,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -559,7 +543,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_2cf8", "object_type": "ipam.service", "ports": [ 22 @@ -583,7 +566,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -603,14 +585,15 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] }, "TestDeviceR1": { "config_context": {}, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "interfaces": [], "is_virtual": false, @@ -634,7 +617,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -645,7 +627,9 @@ "pool.ntp.org" ] }, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_type": "Cisco Test", "interfaces": [ { @@ -662,7 +646,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -682,7 +668,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -720,7 +705,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_57e3", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -736,10 +720,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_c00f", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -753,7 +735,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -770,7 +751,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -785,7 +765,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet1", - "natural_slug": "gigabitethernet1_test100_test-tenant_child-test-location_parent-test-location_0bc5", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -794,7 +773,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -820,7 +798,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -840,7 +820,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -878,7 +857,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_6117", "object_type": "ipam.ipaddress", "parent": { "broadcast": "2001::ffff:ffff:ffff:ffff", @@ -894,10 +872,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_2001_64_8659", "network": "2001::", "object_type": "ipam.prefix", "parent": null, @@ -911,7 +887,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -928,7 +903,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -943,7 +917,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet2", - "natural_slug": "gigabitethernet2_test100_test-tenant_child-test-location_parent-test-location_be95", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -952,7 +925,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -978,7 +950,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -998,7 +972,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1032,7 +1005,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet3", - "natural_slug": "gigabitethernet3_test100_test-tenant_child-test-location_parent-test-location_135e", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1041,7 +1013,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1067,7 +1038,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1087,7 +1060,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1121,7 +1093,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet4", - "natural_slug": "gigabitethernet4_test100_test-tenant_child-test-location_parent-test-location_5982", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1130,7 +1101,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1164,7 +1134,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1184,7 +1156,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1225,7 +1196,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_57e3", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1254,7 +1224,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_6117", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1269,7 +1238,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_a068", "object_type": "ipam.service", "ports": [ 80 @@ -1288,7 +1256,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1308,7 +1278,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1334,7 +1303,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_aac7", "object_type": "ipam.service", "ports": [ 22 @@ -1353,7 +1321,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -1378,7 +1345,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test100-vm_eth0_7ee5", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1387,7 +1353,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1407,7 +1372,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1432,7 +1396,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test100-vm_eth1_4371", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1441,7 +1404,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1461,7 +1423,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1486,7 +1447,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test100-vm_eth2_f824", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1495,7 +1455,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1515,7 +1474,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1540,7 +1498,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test100-vm_eth3_3bb5", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1549,7 +1506,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1569,7 +1525,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1594,7 +1549,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test100-vm_eth4_0ba2", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1603,7 +1557,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1623,7 +1576,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1651,7 +1603,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -1674,7 +1625,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test101-vm_eth0_87dc", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1683,7 +1633,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1703,7 +1652,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1728,7 +1676,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test101-vm_eth1_9cfb", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1737,7 +1684,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1757,7 +1703,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1782,7 +1727,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test101-vm_eth2_8aee", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1791,7 +1735,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1811,7 +1754,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1836,7 +1778,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test101-vm_eth3_4f29", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1845,7 +1786,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1865,7 +1805,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1890,7 +1829,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test101-vm_eth4_d390", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1899,7 +1837,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1919,7 +1856,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1947,7 +1883,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -1972,7 +1907,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -1997,7 +1931,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -2017,7 +1950,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2-2.2_legacy.json b/tests/integration/targets/inventory/files/test_2-2.2_legacy.json index 1dcf9527..3de0f8be 100644 --- a/tests/integration/targets/inventory/files/test_2-2.2_legacy.json +++ b/tests/integration/targets/inventory/files/test_2-2.2_legacy.json @@ -2,7 +2,9 @@ "_meta": { "hostvars": { "R1-Device": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -35,14 +37,15 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] }, "Test Nexus One": { "ansible_host": "172.16.180.11", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -70,7 +73,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -86,7 +91,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_9171", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -114,7 +118,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_758f", "object_type": "ipam.service", "ports": [ 23 @@ -133,7 +136,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -155,7 +157,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_2cf8", "object_type": "ipam.service", "ports": [ 22 @@ -179,7 +180,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -199,13 +199,14 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] }, "TestDeviceR1": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -239,13 +240,14 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] }, "test100": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_roles": [ "Core Switch" ], @@ -276,7 +278,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -296,7 +300,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -337,7 +340,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_57e3", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -366,7 +368,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_6117", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -381,7 +382,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_a068", "object_type": "ipam.service", "ports": [ 80 @@ -400,7 +400,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -420,7 +422,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -446,7 +447,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_aac7", "object_type": "ipam.service", "ports": [ 22 @@ -465,7 +465,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -495,7 +494,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -521,7 +519,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -547,7 +544,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -573,7 +569,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -594,7 +589,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2-2.2_options.json b/tests/integration/targets/inventory/files/test_2-2.2_options.json index f4e7bba2..9e82b75b 100644 --- a/tests/integration/targets/inventory/files/test_2-2.2_options.json +++ b/tests/integration/targets/inventory/files/test_2-2.2_options.json @@ -2,7 +2,9 @@ "_meta": { "hostvars": { "R1-Device": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "display": "R1-Device", "is_virtual": false, @@ -24,10 +26,11 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, - "tags": [] + "tags": [], + "testing_device_cf": "", + "testing_location_cf": "Test Location Custom Field Value" }, "Test VM With Spaces": { "cluster": "Test Cluster 2", @@ -42,13 +45,14 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] }, "TestDeviceR1": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "display": "TestDeviceR1", "is_virtual": false, @@ -71,14 +75,17 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, - "tags": [] + "tags": [], + "testing_device_cf": "", + "testing_location_cf": "" }, "VC1": { "ansible_host": "nexus.example.com", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Nexus Parent", "display": "Test Nexus One", "dns_name": "nexus.example.com", @@ -97,13 +104,16 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, - "tags": [] + "tags": [], + "testing_device_cf": "", + "testing_location_cf": "Test Location Custom Field Value" }, "test100": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_type": "Cisco Test", "display": "test100", "is_virtual": false, @@ -125,12 +135,13 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], "tenant": "Test Tenant", - "tenant_group": "Test Tenant Group" + "tenant_group": "Test Tenant Group", + "testing_device_cf": "Test Device Custom Field Value", + "testing_location_cf": "Test Location Custom Field Value" }, "test100-vm": { "cluster": "Test Cluster", @@ -150,7 +161,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -173,7 +183,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -196,7 +205,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -219,7 +227,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -237,7 +244,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2-2.2_options.yml b/tests/integration/targets/inventory/files/test_2-2.2_options.yml index 50875085..a2eff86d 100644 --- a/tests/integration/targets/inventory/files/test_2-2.2_options.yml +++ b/tests/integration/targets/inventory/files/test_2-2.2_options.yml @@ -51,6 +51,8 @@ compose: display: display rack_id: rack.id ntp_servers: config_context.ntp_servers + testing_device_cf: custom_fields.my_device_custom_field + testing_location_cf: location.custom_fields.my_location_custom_field keyed_groups: - prefix: rack diff --git a/tests/integration/targets/inventory/files/test_2-2.2_options_flatten.json b/tests/integration/targets/inventory/files/test_2-2.2_options_flatten.json index cc1fcbe9..5fe349b0 100644 --- a/tests/integration/targets/inventory/files/test_2-2.2_options_flatten.json +++ b/tests/integration/targets/inventory/files/test_2-2.2_options_flatten.json @@ -11,6 +11,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": null, "rack": "Main Test Rack", "rack_groups": [ "Parent Rack Group" @@ -24,7 +25,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -48,7 +48,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -64,7 +66,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_9171", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -104,7 +105,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-11_59b6", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -120,10 +120,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_c00f", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -137,7 +135,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -154,7 +151,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -169,7 +165,6 @@ "mode": null, "mtu": null, "name": "Ethernet1/1", - "natural_slug": "ethernet1-1_test-nexus-one__child-test-location_parent-test-location_a314", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -178,7 +173,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -204,7 +198,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -220,7 +216,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus Child One", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location_d562", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -258,7 +253,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-12_f322", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -274,10 +268,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_c00f", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -291,7 +283,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -308,7 +299,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -323,7 +313,6 @@ "mode": null, "mtu": null, "name": "Ethernet2/1", - "natural_slug": "ethernet2-1_test-nexus-child-one__child-test-location_parent-test-location_be66", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -332,7 +321,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -352,6 +340,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": null, "primary_ip4": "172.16.180.11", "role": "Core Switch", "services": [ @@ -362,7 +351,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -378,7 +369,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_9171", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -406,7 +396,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_758f", "object_type": "ipam.service", "ports": [ 23 @@ -425,7 +414,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -445,7 +433,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth0_0a6c", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -454,7 +441,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -474,7 +460,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -499,7 +484,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth1_45be", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -508,7 +492,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -528,7 +511,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -553,7 +535,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_2cf8", "object_type": "ipam.service", "ports": [ 22 @@ -577,7 +558,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -597,7 +577,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -613,6 +592,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": null, "rack": "Sub Test Rack", "rack_groups": [ "Child Rack Group", @@ -626,7 +606,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -648,7 +627,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -668,7 +649,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -706,7 +686,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_57e3", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -722,10 +701,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_c00f", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -739,7 +716,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -756,7 +732,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -771,7 +746,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet1", - "natural_slug": "gigabitethernet1_test100_test-tenant_child-test-location_parent-test-location_0bc5", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -780,7 +754,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -806,7 +779,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -826,7 +801,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -864,7 +838,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_6117", "object_type": "ipam.ipaddress", "parent": { "broadcast": "2001::ffff:ffff:ffff:ffff", @@ -880,10 +853,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_2001_64_8659", "network": "2001::", "object_type": "ipam.prefix", "parent": null, @@ -897,7 +868,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -914,7 +884,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -929,7 +898,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet2", - "natural_slug": "gigabitethernet2_test100_test-tenant_child-test-location_parent-test-location_be95", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -938,7 +906,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -964,7 +931,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -984,7 +953,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1018,7 +986,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet3", - "natural_slug": "gigabitethernet3_test100_test-tenant_child-test-location_parent-test-location_135e", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1027,7 +994,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1053,7 +1019,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1073,7 +1041,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1107,7 +1074,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet4", - "natural_slug": "gigabitethernet4_test100_test-tenant_child-test-location_parent-test-location_5982", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1116,7 +1082,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1141,6 +1106,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": "Test Device Custom Field Value", "ntp_servers": [ "pool.ntp.org" ], @@ -1153,7 +1119,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1173,7 +1141,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1214,7 +1181,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_57e3", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1243,7 +1209,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_6117", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1258,7 +1223,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_a068", "object_type": "ipam.service", "ports": [ 80 @@ -1277,7 +1241,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1297,7 +1263,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1323,7 +1288,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_aac7", "object_type": "ipam.service", "ports": [ 22 @@ -1342,7 +1306,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -1365,7 +1328,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test100-vm_eth0_7ee5", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1374,7 +1336,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1394,7 +1355,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1419,7 +1379,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test100-vm_eth1_4371", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1428,7 +1387,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1448,7 +1406,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1473,7 +1430,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test100-vm_eth2_f824", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1482,7 +1438,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1502,7 +1457,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1527,7 +1481,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test100-vm_eth3_3bb5", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1536,7 +1489,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1556,7 +1508,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1581,7 +1532,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test100-vm_eth4_0ba2", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1590,7 +1540,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1610,7 +1559,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1638,7 +1586,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -1659,7 +1606,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test101-vm_eth0_87dc", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1668,7 +1614,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1688,7 +1633,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1713,7 +1657,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test101-vm_eth1_9cfb", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1722,7 +1665,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1742,7 +1684,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1767,7 +1708,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test101-vm_eth2_8aee", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1776,7 +1716,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1796,7 +1735,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1821,7 +1759,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test101-vm_eth3_4f29", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1830,7 +1767,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1850,7 +1786,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1875,7 +1810,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test101-vm_eth4_d390", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1884,7 +1818,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1904,7 +1837,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1932,7 +1864,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -1955,7 +1886,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -1978,7 +1908,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -1996,7 +1925,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2-2.2_plurals.json b/tests/integration/targets/inventory/files/test_2-2.2_plurals.json index 343851fd..7a374ceb 100644 --- a/tests/integration/targets/inventory/files/test_2-2.2_plurals.json +++ b/tests/integration/targets/inventory/files/test_2-2.2_plurals.json @@ -5,7 +5,9 @@ "config_context": [ {} ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -39,7 +41,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -49,7 +50,9 @@ "config_context": [ {} ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -72,7 +75,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -88,7 +93,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_9171", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -128,7 +132,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-11_59b6", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -144,10 +147,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_c00f", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -161,7 +162,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -178,7 +178,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -193,7 +192,6 @@ "mode": null, "mtu": null, "name": "Ethernet1/1", - "natural_slug": "ethernet1-1_test-nexus-one__child-test-location_parent-test-location_a314", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -202,7 +200,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -228,7 +225,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -244,7 +243,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus Child One", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location_d562", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -282,7 +280,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-12_f322", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -298,10 +295,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_c00f", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -315,7 +310,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -332,7 +326,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -347,7 +340,6 @@ "mode": null, "mtu": null, "name": "Ethernet2/1", - "natural_slug": "ethernet2-1_test-nexus-child-one__child-test-location_parent-test-location_be66", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -356,7 +348,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -390,7 +381,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -406,7 +399,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_9171", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -434,7 +426,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_758f", "object_type": "ipam.service", "ports": [ 23 @@ -453,7 +444,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -477,7 +467,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth0_0a6c", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -486,7 +475,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -506,7 +494,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -531,7 +518,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth1_45be", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -540,7 +526,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -560,7 +545,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -588,7 +572,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_2cf8", "object_type": "ipam.service", "ports": [ 22 @@ -612,7 +595,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_e84a", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -632,7 +614,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -641,7 +622,9 @@ "config_context": [ {} ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -676,7 +659,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -689,7 +671,9 @@ ] } ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_roles": [ "Core Switch" ], @@ -711,7 +695,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -731,7 +717,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -769,7 +754,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_57e3", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -785,10 +769,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_c00f", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -802,7 +784,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -819,7 +800,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -834,7 +814,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet1", - "natural_slug": "gigabitethernet1_test100_test-tenant_child-test-location_parent-test-location_0bc5", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -843,7 +822,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -869,7 +847,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -889,7 +869,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -927,7 +906,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_6117", "object_type": "ipam.ipaddress", "parent": { "broadcast": "2001::ffff:ffff:ffff:ffff", @@ -943,10 +921,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_2d05", "object_type": "ipam.namespace" }, - "natural_slug": "global_2001_64_8659", "network": "2001::", "object_type": "ipam.prefix", "parent": null, @@ -960,7 +936,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tenant": null, @@ -977,7 +952,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -992,7 +966,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet2", - "natural_slug": "gigabitethernet2_test100_test-tenant_child-test-location_parent-test-location_be95", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1001,7 +974,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1027,7 +999,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1047,7 +1021,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1081,7 +1054,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet3", - "natural_slug": "gigabitethernet3_test100_test-tenant_child-test-location_parent-test-location_135e", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1090,7 +1062,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1116,7 +1087,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1136,7 +1109,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1170,7 +1142,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet4", - "natural_slug": "gigabitethernet4_test100_test-tenant_child-test-location_parent-test-location_5982", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1179,7 +1150,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1216,7 +1186,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1236,7 +1208,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1277,7 +1248,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_57e3", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1306,7 +1276,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_6117", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1321,7 +1290,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_a068", "object_type": "ipam.service", "ports": [ 80 @@ -1340,7 +1308,9 @@ "asset_tag": null, "cluster": null, "comments": "", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1360,7 +1330,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_12cb", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1386,7 +1355,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_aac7", "object_type": "ipam.service", "ports": [ 22 @@ -1405,7 +1373,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -1434,7 +1401,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test100-vm_eth0_7ee5", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1443,7 +1409,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1463,7 +1428,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1488,7 +1452,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test100-vm_eth1_4371", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1497,7 +1460,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1517,7 +1479,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1542,7 +1503,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test100-vm_eth2_f824", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1551,7 +1511,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1571,7 +1530,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1596,7 +1554,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test100-vm_eth3_3bb5", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1605,7 +1562,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1625,7 +1581,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1650,7 +1605,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test100-vm_eth4_0ba2", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1659,7 +1613,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1679,7 +1632,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_bc38", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1710,7 +1662,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -1735,7 +1686,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test101-vm_eth0_87dc", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1744,7 +1694,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1764,7 +1713,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1789,7 +1737,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test101-vm_eth1_9cfb", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1798,7 +1745,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1818,7 +1764,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1843,7 +1788,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test101-vm_eth2_8aee", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1852,7 +1796,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1872,7 +1815,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1897,7 +1839,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test101-vm_eth3_4f29", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1906,7 +1847,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1926,7 +1866,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1951,7 +1890,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test101-vm_eth4_d390", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1960,7 +1898,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1980,7 +1917,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_6d1d", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -2011,7 +1947,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -2041,7 +1976,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -2071,7 +2005,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -2096,7 +2029,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2-2.2_plurals_flatten.json b/tests/integration/targets/inventory/files/test_2-2.2_plurals_flatten.json index 9b04f777..77409822 100644 --- a/tests/integration/targets/inventory/files/test_2-2.2_plurals_flatten.json +++ b/tests/integration/targets/inventory/files/test_2-2.2_plurals_flatten.json @@ -20,6 +20,7 @@ "manufacturers": [ "Cisco" ], + "my_device_custom_field": null, "rack_groups": [ "Parent Rack Group" ], @@ -33,7 +34,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -58,6 +58,7 @@ "manufacturers": [ "Cisco" ], + "my_device_custom_field": null, "primary_ip4": "172.16.180.11", "status": { "color": "4caf50", @@ -65,7 +66,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -84,7 +84,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -109,6 +108,7 @@ "manufacturers": [ "Cisco" ], + "my_device_custom_field": null, "rack_groups": [ "Child Rack Group", "Parent Rack Group" @@ -122,7 +122,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -150,6 +149,7 @@ "manufacturers": [ "Cisco" ], + "my_device_custom_field": "Test Device Custom Field Value", "ntp_servers": [ "pool.ntp.org" ], @@ -159,7 +159,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [], @@ -187,7 +186,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -211,7 +209,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -235,7 +232,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -259,7 +255,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] @@ -278,7 +273,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_efb8", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2.2-2.3.json b/tests/integration/targets/inventory/files/test_2.2-2.3.json index 83ec8f39..bc65dd98 100644 --- a/tests/integration/targets/inventory/files/test_2.2-2.3.json +++ b/tests/integration/targets/inventory/files/test_2.2-2.3.json @@ -3,7 +3,9 @@ "hostvars": { "R1-Device": { "config_context": {}, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "interfaces": [], "is_virtual": false, @@ -26,7 +28,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -34,7 +35,9 @@ "Test Nexus One": { "ansible_host": "172.16.180.11", "config_context": {}, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Nexus Parent", "dns_name": "nexus.example.com", "interfaces": [ @@ -53,7 +56,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -69,7 +74,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_725b", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -110,7 +114,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-11_69d8", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -125,10 +128,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_ab44", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -142,7 +143,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -159,7 +159,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -174,7 +173,6 @@ "mode": null, "mtu": null, "name": "Ethernet1/1", - "natural_slug": "ethernet1-1_test-nexus-one__child-test-location_parent-test-location_a1b2", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -183,7 +181,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -210,7 +207,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -226,7 +225,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus Child One", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location_cb9c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -265,7 +263,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-12_ee65", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -280,10 +277,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_ab44", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -297,7 +292,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -314,7 +308,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -329,7 +322,6 @@ "mode": null, "mtu": null, "name": "Ethernet2/1", - "natural_slug": "ethernet2-1_test-nexus-child-one__child-test-location_parent-test-location_93db", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -338,7 +330,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -369,7 +360,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -385,7 +378,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_725b", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -414,7 +406,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_067d", "object_type": "ipam.service", "ports": [ 23 @@ -433,7 +424,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -455,7 +445,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth0_f6c0", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -464,7 +453,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -484,7 +472,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -510,7 +497,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth1_f6e3", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -519,7 +505,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -539,7 +524,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -565,7 +549,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_cad2", "object_type": "ipam.service", "ports": [ 22 @@ -589,7 +572,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -610,14 +592,15 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] }, "TestDeviceR1": { "config_context": {}, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "interfaces": [], "is_virtual": false, @@ -641,7 +624,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -652,7 +634,9 @@ "pool.ntp.org" ] }, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_type": "Cisco Test", "interfaces": [ { @@ -670,7 +654,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -690,7 +676,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -729,7 +714,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_23b0", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -744,10 +728,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_ab44", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -761,7 +743,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -778,7 +759,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -793,7 +773,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet1", - "natural_slug": "gigabitethernet1_test100_test-tenant_child-test-location_parent-test-location_02a0", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -802,7 +781,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -829,7 +807,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -849,7 +829,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -888,7 +867,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_ee95", "object_type": "ipam.ipaddress", "parent": { "broadcast": "2001::ffff:ffff:ffff:ffff", @@ -903,10 +881,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_2001_64_8425", "network": "2001::", "object_type": "ipam.prefix", "parent": null, @@ -920,7 +896,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -937,7 +912,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -952,7 +926,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet2", - "natural_slug": "gigabitethernet2_test100_test-tenant_child-test-location_parent-test-location_e074", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -961,7 +934,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -988,7 +960,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1008,7 +982,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1043,7 +1016,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet3", - "natural_slug": "gigabitethernet3_test100_test-tenant_child-test-location_parent-test-location_8438", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1052,7 +1024,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1079,7 +1050,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1099,7 +1072,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1134,7 +1106,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet4", - "natural_slug": "gigabitethernet4_test100_test-tenant_child-test-location_parent-test-location_854c", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1143,7 +1114,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1178,7 +1148,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1198,7 +1170,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1240,7 +1211,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_23b0", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1269,7 +1239,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_ee95", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1284,7 +1253,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_3116", "object_type": "ipam.service", "ports": [ 80 @@ -1304,7 +1272,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1324,7 +1294,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1351,7 +1320,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_bfcf", "object_type": "ipam.service", "ports": [ 22 @@ -1370,7 +1338,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -1395,7 +1362,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test100-vm_eth0_cc3f", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1404,7 +1370,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1424,7 +1389,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1450,7 +1414,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test100-vm_eth1_02b8", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1459,7 +1422,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1479,7 +1441,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1505,7 +1466,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test100-vm_eth2_e6d3", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1514,7 +1474,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1534,7 +1493,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1560,7 +1518,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test100-vm_eth3_46e2", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1569,7 +1526,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1589,7 +1545,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1615,7 +1570,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test100-vm_eth4_f394", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1624,7 +1578,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1644,7 +1597,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1673,7 +1625,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -1696,7 +1647,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test101-vm_eth0_9dea", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1705,7 +1655,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1725,7 +1674,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1751,7 +1699,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test101-vm_eth1_5f26", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1760,7 +1707,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1780,7 +1726,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1806,7 +1751,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test101-vm_eth2_3f34", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1815,7 +1759,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1835,7 +1778,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1861,7 +1803,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test101-vm_eth3_4b7e", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1870,7 +1811,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1890,7 +1830,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1916,7 +1855,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test101-vm_eth4_82d6", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1925,7 +1863,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1945,7 +1882,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1974,7 +1910,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -1999,7 +1934,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -2024,7 +1958,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -2044,7 +1977,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2.2-2.3_options_flatten.json b/tests/integration/targets/inventory/files/test_2.2-2.3_options_flatten.json index 0db1a04d..151c6e66 100644 --- a/tests/integration/targets/inventory/files/test_2.2-2.3_options_flatten.json +++ b/tests/integration/targets/inventory/files/test_2.2-2.3_options_flatten.json @@ -11,6 +11,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": null, "rack": "Main Test Rack", "rack_groups": [ "Parent Rack Group" @@ -24,7 +25,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -49,7 +49,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -65,7 +67,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_725b", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -106,7 +107,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-11_69d8", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -121,10 +121,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_ab44", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -138,7 +136,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -155,7 +152,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -170,7 +166,6 @@ "mode": null, "mtu": null, "name": "Ethernet1/1", - "natural_slug": "ethernet1-1_test-nexus-one__child-test-location_parent-test-location_a1b2", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -179,7 +174,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -206,7 +200,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -222,7 +218,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus Child One", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location_cb9c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -261,7 +256,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-12_ee65", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -276,10 +270,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_ab44", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -293,7 +285,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -310,7 +301,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -325,7 +315,6 @@ "mode": null, "mtu": null, "name": "Ethernet2/1", - "natural_slug": "ethernet2-1_test-nexus-child-one__child-test-location_parent-test-location_93db", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -334,7 +323,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -354,6 +342,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": null, "primary_ip4": "172.16.180.11", "role": "Core Switch", "services": [ @@ -365,7 +354,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -381,7 +372,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_725b", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -410,7 +400,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_067d", "object_type": "ipam.service", "ports": [ 23 @@ -429,7 +418,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -449,7 +437,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth0_f6c0", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -458,7 +445,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -478,7 +464,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -504,7 +489,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth1_f6e3", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -513,7 +497,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -533,7 +516,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -559,7 +541,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_cad2", "object_type": "ipam.service", "ports": [ 22 @@ -583,7 +564,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -604,7 +584,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -620,6 +599,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": null, "rack": "Sub Test Rack", "rack_groups": [ "Child Rack Group", @@ -633,7 +613,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -656,7 +635,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -676,7 +657,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -715,7 +695,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_23b0", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -730,10 +709,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_ab44", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -747,7 +724,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -764,7 +740,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -779,7 +754,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet1", - "natural_slug": "gigabitethernet1_test100_test-tenant_child-test-location_parent-test-location_02a0", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -788,7 +762,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -815,7 +788,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -835,7 +810,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -874,7 +848,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_ee95", "object_type": "ipam.ipaddress", "parent": { "broadcast": "2001::ffff:ffff:ffff:ffff", @@ -889,10 +862,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_2001_64_8425", "network": "2001::", "object_type": "ipam.prefix", "parent": null, @@ -906,7 +877,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -923,7 +893,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -938,7 +907,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet2", - "natural_slug": "gigabitethernet2_test100_test-tenant_child-test-location_parent-test-location_e074", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -947,7 +915,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -974,7 +941,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -994,7 +963,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1029,7 +997,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet3", - "natural_slug": "gigabitethernet3_test100_test-tenant_child-test-location_parent-test-location_8438", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1038,7 +1005,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1065,7 +1031,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1085,7 +1053,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1120,7 +1087,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet4", - "natural_slug": "gigabitethernet4_test100_test-tenant_child-test-location_parent-test-location_854c", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1129,7 +1095,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1154,6 +1119,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": "Test Device Custom Field Value", "ntp_servers": [ "pool.ntp.org" ], @@ -1167,7 +1133,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1187,7 +1155,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1229,7 +1196,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_23b0", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1258,7 +1224,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_ee95", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1273,7 +1238,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_3116", "object_type": "ipam.service", "ports": [ 80 @@ -1293,7 +1257,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1313,7 +1279,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1340,7 +1305,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_bfcf", "object_type": "ipam.service", "ports": [ 22 @@ -1359,7 +1323,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -1382,7 +1345,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test100-vm_eth0_cc3f", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1391,7 +1353,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1411,7 +1372,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1437,7 +1397,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test100-vm_eth1_02b8", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1446,7 +1405,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1466,7 +1424,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1492,7 +1449,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test100-vm_eth2_e6d3", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1501,7 +1457,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1521,7 +1476,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1547,7 +1501,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test100-vm_eth3_46e2", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1556,7 +1509,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1576,7 +1528,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1602,7 +1553,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test100-vm_eth4_f394", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1611,7 +1561,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1631,7 +1580,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1660,7 +1608,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -1681,7 +1628,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test101-vm_eth0_9dea", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1690,7 +1636,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1710,7 +1655,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1736,7 +1680,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test101-vm_eth1_5f26", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1745,7 +1688,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1765,7 +1707,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1791,7 +1732,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test101-vm_eth2_3f34", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1800,7 +1740,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1820,7 +1759,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1846,7 +1784,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test101-vm_eth3_4b7e", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1855,7 +1792,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1875,7 +1811,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1901,7 +1836,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test101-vm_eth4_82d6", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1910,7 +1844,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1930,7 +1863,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1959,7 +1891,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -1982,7 +1913,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -2005,7 +1935,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -2023,7 +1952,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2.2-2.3_plurals.json b/tests/integration/targets/inventory/files/test_2.2-2.3_plurals.json index 7c3e3a5e..372354c5 100644 --- a/tests/integration/targets/inventory/files/test_2.2-2.3_plurals.json +++ b/tests/integration/targets/inventory/files/test_2.2-2.3_plurals.json @@ -5,7 +5,9 @@ "config_context": [ {} ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -39,7 +41,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -49,7 +50,9 @@ "config_context": [ {} ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -73,7 +76,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -89,7 +94,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_725b", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -130,7 +134,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-11_69d8", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -145,10 +148,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_ab44", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -162,7 +163,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -179,7 +179,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -194,7 +193,6 @@ "mode": null, "mtu": null, "name": "Ethernet1/1", - "natural_slug": "ethernet1-1_test-nexus-one__child-test-location_parent-test-location_a1b2", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -203,7 +201,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -230,7 +227,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -246,7 +245,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus Child One", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location_cb9c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -285,7 +283,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-12_ee65", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -300,10 +297,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_ab44", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -317,7 +312,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -334,7 +328,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -349,7 +342,6 @@ "mode": null, "mtu": null, "name": "Ethernet2/1", - "natural_slug": "ethernet2-1_test-nexus-child-one__child-test-location_parent-test-location_93db", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -358,7 +350,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -393,7 +384,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -409,7 +402,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_725b", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -438,7 +430,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_067d", "object_type": "ipam.service", "ports": [ 23 @@ -457,7 +448,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -481,7 +471,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth0_f6c0", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -490,7 +479,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -510,7 +498,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -536,7 +523,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth1_f6e3", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -545,7 +531,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -565,7 +550,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -594,7 +578,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_cad2", "object_type": "ipam.service", "ports": [ 22 @@ -618,7 +601,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -639,7 +621,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -648,7 +629,9 @@ "config_context": [ {} ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -683,7 +666,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -696,7 +678,9 @@ ] } ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_roles": [ "Core Switch" ], @@ -719,7 +703,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -739,7 +725,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -778,7 +763,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_23b0", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -793,10 +777,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_ab44", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -810,7 +792,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -827,7 +808,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -842,7 +822,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet1", - "natural_slug": "gigabitethernet1_test100_test-tenant_child-test-location_parent-test-location_02a0", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -851,7 +830,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -878,7 +856,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -898,7 +878,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -937,7 +916,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_ee95", "object_type": "ipam.ipaddress", "parent": { "broadcast": "2001::ffff:ffff:ffff:ffff", @@ -952,10 +930,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_1fa9", "object_type": "ipam.namespace" }, - "natural_slug": "global_2001_64_8425", "network": "2001::", "object_type": "ipam.prefix", "parent": null, @@ -969,7 +945,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tenant": null, @@ -986,7 +961,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -1001,7 +975,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet2", - "natural_slug": "gigabitethernet2_test100_test-tenant_child-test-location_parent-test-location_e074", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1010,7 +983,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1037,7 +1009,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1057,7 +1031,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1092,7 +1065,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet3", - "natural_slug": "gigabitethernet3_test100_test-tenant_child-test-location_parent-test-location_8438", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1101,7 +1073,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1128,7 +1099,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1148,7 +1121,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1183,7 +1155,6 @@ "mode": null, "mtu": null, "name": "GigabitEthernet4", - "natural_slug": "gigabitethernet4_test100_test-tenant_child-test-location_parent-test-location_854c", "object_type": "dcim.interface", "parent_interface": null, "status": { @@ -1192,7 +1163,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1230,7 +1200,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1250,7 +1222,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1292,7 +1263,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_23b0", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1321,7 +1291,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_ee95", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1336,7 +1305,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_3116", "object_type": "ipam.service", "ports": [ 80 @@ -1356,7 +1324,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1376,7 +1346,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1403,7 +1372,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_bfcf", "object_type": "ipam.service", "ports": [ 22 @@ -1422,7 +1390,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -1451,7 +1418,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test100-vm_eth0_cc3f", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1460,7 +1426,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1480,7 +1445,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1506,7 +1470,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test100-vm_eth1_02b8", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1515,7 +1478,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1535,7 +1497,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1561,7 +1522,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test100-vm_eth2_e6d3", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1570,7 +1530,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1590,7 +1549,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1616,7 +1574,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test100-vm_eth3_46e2", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1625,7 +1582,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1645,7 +1601,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1671,7 +1626,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test100-vm_eth4_f394", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1680,7 +1634,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1700,7 +1653,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_b0bc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1732,7 +1684,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -1757,7 +1708,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test101-vm_eth0_9dea", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1766,7 +1716,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1786,7 +1735,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1812,7 +1760,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test101-vm_eth1_5f26", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1821,7 +1768,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1841,7 +1787,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1867,7 +1812,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test101-vm_eth2_3f34", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1876,7 +1820,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1896,7 +1839,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1922,7 +1864,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test101-vm_eth3_4b7e", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1931,7 +1872,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1951,7 +1891,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1977,7 +1916,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test101-vm_eth4_82d6", "object_type": "virtualization.vminterface", "parent_interface": null, "status": { @@ -1986,7 +1924,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tagged_vlans": [], @@ -2006,7 +1943,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_68f2", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -2038,7 +1974,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -2068,7 +2003,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -2098,7 +2032,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -2123,7 +2056,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2.2-3_legacy.json b/tests/integration/targets/inventory/files/test_2.2-3_legacy.json index e02ef41a..6b4761a5 100644 --- a/tests/integration/targets/inventory/files/test_2.2-3_legacy.json +++ b/tests/integration/targets/inventory/files/test_2.2-3_legacy.json @@ -2,7 +2,9 @@ "_meta": { "hostvars": { "R1-Device": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -35,14 +37,15 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] }, "Test Nexus One": { "ansible_host": "172.16.180.11", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -71,7 +74,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -87,7 +92,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_725b", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -116,7 +120,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_067d", "object_type": "ipam.service", "ports": [ 23 @@ -135,7 +138,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -157,7 +159,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_cad2", "object_type": "ipam.service", "ports": [ 22 @@ -181,7 +182,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_8da0", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -202,13 +202,14 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] }, "TestDeviceR1": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -242,13 +243,14 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] }, "test100": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_roles": [ "Core Switch" ], @@ -280,7 +282,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -300,7 +304,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -342,7 +345,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_23b0", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -371,7 +373,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_ee95", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -386,7 +387,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_3116", "object_type": "ipam.service", "ports": [ 80 @@ -406,7 +406,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -426,7 +428,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_939c", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -453,7 +454,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_bfcf", "object_type": "ipam.service", "ports": [ 22 @@ -472,7 +472,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -502,7 +501,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -528,7 +526,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -554,7 +551,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -580,7 +576,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -601,7 +596,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2.2-3_options.json b/tests/integration/targets/inventory/files/test_2.2-3_options.json index 4bea679f..9e82b75b 100644 --- a/tests/integration/targets/inventory/files/test_2.2-3_options.json +++ b/tests/integration/targets/inventory/files/test_2.2-3_options.json @@ -2,7 +2,9 @@ "_meta": { "hostvars": { "R1-Device": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "display": "R1-Device", "is_virtual": false, @@ -24,10 +26,11 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, - "tags": [] + "tags": [], + "testing_device_cf": "", + "testing_location_cf": "Test Location Custom Field Value" }, "Test VM With Spaces": { "cluster": "Test Cluster 2", @@ -42,13 +45,14 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] }, "TestDeviceR1": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "display": "TestDeviceR1", "is_virtual": false, @@ -71,14 +75,17 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, - "tags": [] + "tags": [], + "testing_device_cf": "", + "testing_location_cf": "" }, "VC1": { "ansible_host": "nexus.example.com", - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Nexus Parent", "display": "Test Nexus One", "dns_name": "nexus.example.com", @@ -97,13 +104,16 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, - "tags": [] + "tags": [], + "testing_device_cf": "", + "testing_location_cf": "Test Location Custom Field Value" }, "test100": { - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_type": "Cisco Test", "display": "test100", "is_virtual": false, @@ -125,12 +135,13 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], "tenant": "Test Tenant", - "tenant_group": "Test Tenant Group" + "tenant_group": "Test Tenant Group", + "testing_device_cf": "Test Device Custom Field Value", + "testing_location_cf": "Test Location Custom Field Value" }, "test100-vm": { "cluster": "Test Cluster", @@ -150,7 +161,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -173,7 +183,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -196,7 +205,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -219,7 +227,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -237,7 +244,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2.2-3_options.yml b/tests/integration/targets/inventory/files/test_2.2-3_options.yml index 50875085..a2eff86d 100644 --- a/tests/integration/targets/inventory/files/test_2.2-3_options.yml +++ b/tests/integration/targets/inventory/files/test_2.2-3_options.yml @@ -51,6 +51,8 @@ compose: display: display rack_id: rack.id ntp_servers: config_context.ntp_servers + testing_device_cf: custom_fields.my_device_custom_field + testing_location_cf: location.custom_fields.my_location_custom_field keyed_groups: - prefix: rack diff --git a/tests/integration/targets/inventory/files/test_2.2-3_plurals_flatten.json b/tests/integration/targets/inventory/files/test_2.2-3_plurals_flatten.json index 08f75a6d..77409822 100644 --- a/tests/integration/targets/inventory/files/test_2.2-3_plurals_flatten.json +++ b/tests/integration/targets/inventory/files/test_2.2-3_plurals_flatten.json @@ -20,6 +20,7 @@ "manufacturers": [ "Cisco" ], + "my_device_custom_field": null, "rack_groups": [ "Parent Rack Group" ], @@ -33,7 +34,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -58,6 +58,7 @@ "manufacturers": [ "Cisco" ], + "my_device_custom_field": null, "primary_ip4": "172.16.180.11", "status": { "color": "4caf50", @@ -65,7 +66,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -84,7 +84,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -109,6 +108,7 @@ "manufacturers": [ "Cisco" ], + "my_device_custom_field": null, "rack_groups": [ "Child Rack Group", "Parent Rack Group" @@ -122,7 +122,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -150,6 +149,7 @@ "manufacturers": [ "Cisco" ], + "my_device_custom_field": "Test Device Custom Field Value", "ntp_servers": [ "pool.ntp.org" ], @@ -159,7 +159,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [], @@ -187,7 +186,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -211,7 +209,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -235,7 +232,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -259,7 +255,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] @@ -278,7 +273,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_e185", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2.3-3.json b/tests/integration/targets/inventory/files/test_2.3-3.json index 1e5169c9..83825f3d 100644 --- a/tests/integration/targets/inventory/files/test_2.3-3.json +++ b/tests/integration/targets/inventory/files/test_2.3-3.json @@ -3,7 +3,9 @@ "hostvars": { "R1-Device": { "config_context": {}, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "interfaces": [], "is_virtual": false, @@ -26,7 +28,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -34,7 +35,9 @@ "Test Nexus One": { "ansible_host": "172.16.180.11", "config_context": {}, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Nexus Parent", "dns_name": "nexus.example.com", "interfaces": [ @@ -53,7 +56,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -69,7 +74,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_6bf7", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -110,7 +114,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-11_1597", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -125,10 +128,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_418e", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -142,7 +143,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -159,7 +159,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -175,7 +174,6 @@ "module": null, "mtu": null, "name": "Ethernet1/1", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location___ethernet1-1_b2ec", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -185,7 +183,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -212,7 +209,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -228,7 +227,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus Child One", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location_8838", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -267,7 +265,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-12_1577", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -282,10 +279,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_418e", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -299,7 +294,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -316,7 +310,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -332,7 +325,6 @@ "module": null, "mtu": null, "name": "Ethernet2/1", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location___ethernet2-1_c397", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -342,7 +334,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -373,7 +364,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -389,7 +382,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_6bf7", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -418,7 +410,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_a54a", "object_type": "ipam.service", "ports": [ 23 @@ -437,7 +428,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -459,7 +449,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth0_0577", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -469,7 +458,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -489,7 +477,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_6754", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -515,7 +502,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth1_8f04", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -525,7 +511,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -545,7 +530,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_6754", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -571,7 +555,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_cbb3", "object_type": "ipam.service", "ports": [ 22 @@ -595,7 +578,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_6754", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -616,14 +598,15 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] }, "TestDeviceR1": { "config_context": {}, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_type": "Cisco Test", "interfaces": [], "is_virtual": false, @@ -647,7 +630,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -658,7 +640,9 @@ "pool.ntp.org" ] }, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_type": "Cisco Test", "interfaces": [ { @@ -676,7 +660,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -696,7 +682,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -735,7 +720,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_6b3b", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -750,10 +734,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_418e", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -767,7 +749,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -784,7 +765,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -800,7 +780,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet1", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet1_a77d", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -810,7 +789,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -837,7 +815,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -857,7 +837,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -896,7 +875,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_80d9", "object_type": "ipam.ipaddress", "parent": { "broadcast": "2001::ffff:ffff:ffff:ffff", @@ -911,10 +889,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_2001_64_12de", "network": "2001::", "object_type": "ipam.prefix", "parent": null, @@ -928,7 +904,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -945,7 +920,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -961,7 +935,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet2", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet2_0787", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -971,7 +944,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -998,7 +970,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1018,7 +992,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1054,7 +1027,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet3", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet3_75d6", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -1064,7 +1036,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1091,7 +1062,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1111,7 +1084,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1147,7 +1119,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet4", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet4_9d66", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -1157,7 +1128,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1192,7 +1162,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1212,7 +1184,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1254,7 +1225,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_6b3b", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1283,7 +1253,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_80d9", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1298,7 +1267,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_19f8", "object_type": "ipam.service", "ports": [ 80 @@ -1318,7 +1286,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1338,7 +1308,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1365,7 +1334,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_b2d4", "object_type": "ipam.service", "ports": [ 22 @@ -1384,7 +1352,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -1409,7 +1376,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test100-vm_eth0_342d", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1419,7 +1385,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1439,7 +1404,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1465,7 +1429,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test100-vm_eth1_ab21", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1475,7 +1438,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1495,7 +1457,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1521,7 +1482,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test100-vm_eth2_2f31", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1531,7 +1491,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1551,7 +1510,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1577,7 +1535,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test100-vm_eth3_8e1c", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1587,7 +1544,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1607,7 +1563,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1633,7 +1588,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test100-vm_eth4_0d2c", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1643,7 +1597,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1663,7 +1616,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1692,7 +1644,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -1715,7 +1666,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test101-vm_eth0_fd2c", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1725,7 +1675,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1745,7 +1694,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1771,7 +1719,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test101-vm_eth1_d10e", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1781,7 +1728,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1801,7 +1747,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1827,7 +1772,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test101-vm_eth2_7baf", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1837,7 +1781,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1857,7 +1800,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1883,7 +1825,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test101-vm_eth3_4434", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1893,7 +1834,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1913,7 +1853,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1939,7 +1878,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test101-vm_eth4_2978", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1949,7 +1887,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1969,7 +1906,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1998,7 +1934,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -2023,7 +1958,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -2048,7 +1982,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -2068,7 +2001,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2.3-3_options_flatten.json b/tests/integration/targets/inventory/files/test_2.3-3_options_flatten.json index 2a04a654..ec048b0c 100644 --- a/tests/integration/targets/inventory/files/test_2.3-3_options_flatten.json +++ b/tests/integration/targets/inventory/files/test_2.3-3_options_flatten.json @@ -11,6 +11,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": null, "rack": "Main Test Rack", "rack_groups": [ "Parent Rack Group" @@ -24,7 +25,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -49,7 +49,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -65,7 +67,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_6bf7", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -106,7 +107,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-11_1597", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -121,10 +121,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_418e", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -138,7 +136,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -155,7 +152,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -171,7 +167,6 @@ "module": null, "mtu": null, "name": "Ethernet1/1", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location___ethernet1-1_b2ec", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -181,7 +176,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -208,7 +202,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -224,7 +220,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus Child One", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location_8838", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -263,7 +258,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-12_1577", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -278,10 +272,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_418e", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -295,7 +287,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -312,7 +303,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -328,7 +318,6 @@ "module": null, "mtu": null, "name": "Ethernet2/1", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location___ethernet2-1_c397", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -338,7 +327,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -358,6 +346,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": null, "primary_ip4": "172.16.180.11", "role": "Core Switch", "services": [ @@ -369,7 +358,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -385,7 +376,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_6bf7", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -414,7 +404,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_a54a", "object_type": "ipam.service", "ports": [ 23 @@ -433,7 +422,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -453,7 +441,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth0_0577", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -463,7 +450,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -483,7 +469,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_6754", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -509,7 +494,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth1_8f04", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -519,7 +503,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -539,7 +522,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_6754", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -565,7 +547,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_cbb3", "object_type": "ipam.service", "ports": [ 22 @@ -589,7 +570,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_6754", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -610,7 +590,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -626,6 +605,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": null, "rack": "Sub Test Rack", "rack_groups": [ "Child Rack Group", @@ -639,7 +619,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -662,7 +641,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -682,7 +663,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -721,7 +701,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_6b3b", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -736,10 +715,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_418e", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -753,7 +730,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -770,7 +746,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -786,7 +761,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet1", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet1_a77d", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -796,7 +770,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -823,7 +796,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -843,7 +818,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -882,7 +856,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_80d9", "object_type": "ipam.ipaddress", "parent": { "broadcast": "2001::ffff:ffff:ffff:ffff", @@ -897,10 +870,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_2001_64_12de", "network": "2001::", "object_type": "ipam.prefix", "parent": null, @@ -914,7 +885,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -931,7 +901,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -947,7 +916,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet2", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet2_0787", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -957,7 +925,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -984,7 +951,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1004,7 +973,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1040,7 +1008,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet3", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet3_75d6", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -1050,7 +1017,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1077,7 +1043,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1097,7 +1065,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1133,7 +1100,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet4", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet4_9d66", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -1143,7 +1109,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1168,6 +1133,7 @@ "Parent Test Location" ], "manufacturer": "Cisco", + "my_device_custom_field": "Test Device Custom Field Value", "ntp_servers": [ "pool.ntp.org" ], @@ -1181,7 +1147,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1201,7 +1169,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1243,7 +1210,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_6b3b", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1272,7 +1238,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_80d9", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1287,7 +1252,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_19f8", "object_type": "ipam.service", "ports": [ 80 @@ -1307,7 +1271,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1327,7 +1293,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1354,7 +1319,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_b2d4", "object_type": "ipam.service", "ports": [ 22 @@ -1373,7 +1337,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -1396,7 +1359,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test100-vm_eth0_342d", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1406,7 +1368,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1426,7 +1387,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1452,7 +1412,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test100-vm_eth1_ab21", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1462,7 +1421,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1482,7 +1440,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1508,7 +1465,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test100-vm_eth2_2f31", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1518,7 +1474,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1538,7 +1493,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1564,7 +1518,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test100-vm_eth3_8e1c", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1574,7 +1527,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1594,7 +1546,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1620,7 +1571,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test100-vm_eth4_0d2c", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1630,7 +1580,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1650,7 +1599,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1679,7 +1627,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -1700,7 +1647,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test101-vm_eth0_fd2c", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1710,7 +1656,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1730,7 +1675,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1756,7 +1700,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test101-vm_eth1_d10e", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1766,7 +1709,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1786,7 +1728,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1812,7 +1753,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test101-vm_eth2_7baf", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1822,7 +1762,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1842,7 +1781,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1868,7 +1806,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test101-vm_eth3_4434", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1878,7 +1815,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1898,7 +1834,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1924,7 +1859,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test101-vm_eth4_2978", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1934,7 +1868,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1954,7 +1887,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1983,7 +1915,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -2006,7 +1937,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -2029,7 +1959,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -2047,7 +1976,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/files/test_2.3-3_plurals.json b/tests/integration/targets/inventory/files/test_2.3-3_plurals.json index 82d98aa9..71e09ffe 100644 --- a/tests/integration/targets/inventory/files/test_2.3-3_plurals.json +++ b/tests/integration/targets/inventory/files/test_2.3-3_plurals.json @@ -5,7 +5,9 @@ "config_context": [ {} ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -39,7 +41,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -49,7 +50,9 @@ "config_context": [ {} ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -73,7 +76,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -89,7 +94,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_6bf7", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -130,7 +134,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-11_1597", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -145,10 +148,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_418e", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -162,7 +163,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -179,7 +179,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -195,7 +194,6 @@ "module": null, "mtu": null, "name": "Ethernet1/1", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location___ethernet1-1_b2ec", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -205,7 +203,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -232,7 +229,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -248,7 +247,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus Child One", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location_8838", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -287,7 +285,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-12_1577", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -302,10 +299,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_418e", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -319,7 +314,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -336,7 +330,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -352,7 +345,6 @@ "module": null, "mtu": null, "name": "Ethernet2/1", - "natural_slug": "test-nexus-child-one__child-test-location_parent-test-location___ethernet2-1_c397", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -362,7 +354,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -397,7 +388,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -413,7 +406,6 @@ "object_type": "dcim.location" }, "name": "Test Nexus One", - "natural_slug": "test-nexus-one__child-test-location_parent-test-location_6bf7", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -442,7 +434,6 @@ "display": "telnet (TCP/23)", "ip_addresses": [], "name": "telnet", - "natural_slug": "telnet____test-nexus-one__child-test-location_parent-test-location_a54a", "object_type": "ipam.service", "ports": [ 23 @@ -461,7 +452,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -485,7 +475,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth0_0577", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -495,7 +484,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -515,7 +503,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_6754", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -541,7 +528,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster-2__test-vm-with-spaces_eth1_8f04", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -551,7 +537,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -571,7 +556,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_6754", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -600,7 +584,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh_test-cluster-2__test-vm-with-spaces_cbb3", "object_type": "ipam.service", "ports": [ 22 @@ -624,7 +607,6 @@ "local_config_context_schema": null, "memory": null, "name": "Test VM With Spaces", - "natural_slug": "test-cluster-2__test-vm-with-spaces_6754", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -645,7 +627,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -654,7 +635,9 @@ "config_context": [ {} ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": null + }, "device_roles": [ "Core Switch" ], @@ -689,7 +672,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -702,7 +684,9 @@ ] } ], - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_roles": [ "Core Switch" ], @@ -725,7 +709,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -745,7 +731,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -784,7 +769,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_6b3b", "object_type": "ipam.ipaddress", "parent": { "broadcast": "172.31.255.255", @@ -799,10 +783,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_172-16-0-0_12_418e", "network": "172.16.0.0", "object_type": "ipam.prefix", "parent": null, @@ -816,7 +798,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -833,7 +814,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -849,7 +829,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet1", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet1_a77d", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -859,7 +838,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -886,7 +864,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -906,7 +886,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -945,7 +924,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_80d9", "object_type": "ipam.ipaddress", "parent": { "broadcast": "2001::ffff:ffff:ffff:ffff", @@ -960,10 +938,8 @@ "display": "Global", "location": null, "name": "Global", - "natural_slug": "global_0603", "object_type": "ipam.namespace" }, - "natural_slug": "global_2001_64_12de", "network": "2001::", "object_type": "ipam.prefix", "parent": null, @@ -977,7 +953,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tenant": null, @@ -994,7 +969,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -1010,7 +984,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet2", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet2_0787", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -1020,7 +993,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1047,7 +1019,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1067,7 +1041,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1103,7 +1076,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet3", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet3_75d6", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -1113,7 +1085,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1140,7 +1111,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1160,7 +1133,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1196,7 +1168,6 @@ "module": null, "mtu": null, "name": "GigabitEthernet4", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location___gigabitethernet4_9d66", "object_type": "dcim.interface", "parent_interface": null, "role": null, @@ -1206,7 +1177,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1244,7 +1214,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1264,7 +1236,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1306,7 +1277,6 @@ "mask_length": 24, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_172-16-180-1_6b3b", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1335,7 +1305,6 @@ "mask_length": 64, "nat_inside": null, "nat_outside_list": [], - "natural_slug": "global_2001-1-1_80d9", "object_type": "ipam.ipaddress", "parent": { "object_type": "ipam.prefix" @@ -1350,7 +1319,6 @@ } ], "name": "http", - "natural_slug": "http____test100_test-tenant_child-test-location_parent-test-location_19f8", "object_type": "ipam.service", "ports": [ 80 @@ -1370,7 +1338,9 @@ "cluster": null, "comments": "", "controller_managed_device_group": null, - "custom_fields": {}, + "custom_fields": { + "my_device_custom_field": "Test Device Custom Field Value" + }, "device_redundancy_group": null, "device_redundancy_group_priority": null, "device_type": { @@ -1390,7 +1360,6 @@ "object_type": "dcim.location" }, "name": "test100", - "natural_slug": "test100_test-tenant_child-test-location_parent-test-location_eb90", "object_type": "dcim.device", "parent_bay": null, "platform": null, @@ -1417,7 +1386,6 @@ "display": "ssh (TCP/22)", "ip_addresses": [], "name": "ssh", - "natural_slug": "ssh____test100_test-tenant_child-test-location_parent-test-location_b2d4", "object_type": "ipam.service", "ports": [ 22 @@ -1436,7 +1404,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [], @@ -1465,7 +1432,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test100-vm_eth0_342d", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1475,7 +1441,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1495,7 +1460,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1521,7 +1485,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test100-vm_eth1_ab21", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1531,7 +1494,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1551,7 +1513,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1577,7 +1538,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test100-vm_eth2_2f31", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1587,7 +1547,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1607,7 +1566,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1633,7 +1591,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test100-vm_eth3_8e1c", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1643,7 +1600,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1663,7 +1619,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1689,7 +1644,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test100-vm_eth4_0d2c", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1699,7 +1653,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1719,7 +1672,6 @@ "local_config_context_schema": null, "memory": null, "name": "test100-vm", - "natural_slug": "test-cluster__test100-vm_3d00", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1751,7 +1703,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -1776,7 +1727,6 @@ "mode": null, "mtu": null, "name": "Eth0", - "natural_slug": "test-cluster__test101-vm_eth0_fd2c", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1786,7 +1736,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1806,7 +1755,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1832,7 +1780,6 @@ "mode": null, "mtu": null, "name": "Eth1", - "natural_slug": "test-cluster__test101-vm_eth1_d10e", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1842,7 +1789,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1862,7 +1808,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1888,7 +1833,6 @@ "mode": null, "mtu": null, "name": "Eth2", - "natural_slug": "test-cluster__test101-vm_eth2_7baf", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1898,7 +1842,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1918,7 +1861,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -1944,7 +1886,6 @@ "mode": null, "mtu": null, "name": "Eth3", - "natural_slug": "test-cluster__test101-vm_eth3_4434", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -1954,7 +1895,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -1974,7 +1914,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -2000,7 +1939,6 @@ "mode": null, "mtu": null, "name": "Eth4", - "natural_slug": "test-cluster__test101-vm_eth4_2978", "object_type": "virtualization.vminterface", "parent_interface": null, "role": null, @@ -2010,7 +1948,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tagged_vlans": [], @@ -2030,7 +1967,6 @@ "local_config_context_schema": null, "memory": null, "name": "test101-vm", - "natural_slug": "test-cluster__test101-vm_80dc", "object_type": "virtualization.virtualmachine", "platform": null, "primary_ip4": null, @@ -2062,7 +1998,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -2092,7 +2027,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -2122,7 +2056,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] @@ -2147,7 +2080,6 @@ "description": "Unit is active", "display": "Active", "name": "Active", - "natural_slug": "active_08bd", "object_type": "extras.status" }, "tags": [] diff --git a/tests/integration/targets/inventory/runme.sh b/tests/integration/targets/inventory/runme.sh index 9749666c..b948fa57 100755 --- a/tests/integration/targets/inventory/runme.sh +++ b/tests/integration/targets/inventory/runme.sh @@ -19,7 +19,7 @@ fi declare -a COMPARE_OPTIONS # empty array # OUTPUT_DIR is set by ansible-test -# OUTPUT_INVENTORY_JSON is only set if running hacking/update_test_inventories.sh to update the test diff data +# OUTPUT_INVENTORY_JSON is only set if running `invoke integration --update-inventories` to update the test diff data if [[ -n "${OUTPUT_INVENTORY_JSON:-}" ]] then OUTPUT_DIR="$OUTPUT_INVENTORY_JSON" @@ -73,7 +73,7 @@ do fi # Check if NAUTOBOT_VER is within the specified range if ! printf "%s\n%s\n%s\n" $MIN_VERSION $NAUTOBOT_VER $MAX_VERSION | sort -V -C; then - # The sort statement will return non-zero if the versions are not in order (min <= nautobot_ver <= max) + # The sort statement will return non-zero if the versions are not in order (min <= nautobot_ver < max) echo "NAUTOBOT_VER is $NAUTOBOT_VER, skipping inventory test: $NAME" continue fi diff --git a/tests/integration/targets/inventory/runme_config.template b/tests/integration/targets/inventory/runme_config.template index 1b292e62..c3846b79 100644 --- a/tests/integration/targets/inventory/runme_config.template +++ b/tests/integration/targets/inventory/runme_config.template @@ -4,3 +4,4 @@ # (integration_config.yml files are only helpful to ansible yaml-based tests) export NAUTOBOT_VER=${NAUTOBOT_VER} +export OUTPUT_INVENTORY_JSON=${OUTPUT_INVENTORY_JSON:-} diff --git a/tests/integration/targets/latest/tasks/cable.yml b/tests/integration/targets/latest/tasks/cable.yml index b0e0d931..5a8640ca 100644 --- a/tests/integration/targets/latest/tasks/cable.yml +++ b/tests/integration/targets/latest/tasks/cable.yml @@ -234,3 +234,34 @@ vars: circuit_termination: "{{ lookup('networktocode.nautobot.lookup', 'circuit-terminations', api_endpoint=nautobot_url, token=nautobot_token, api_filter='circuit=' ~ circuit['key'] ~ ' term_side=A') }}" interface: '{{ lookup(''networktocode.nautobot.lookup'', ''interfaces'', api_endpoint=nautobot_url, token=nautobot_token, api_filter=''device="test100" name="GigabitEthernet2"'') }}' + +- name: "CABLE 7: Issue #320 - dcim.powerport and dcim.poweroutlet" + networktocode.nautobot.cable: + url: "{{ nautobot_url }}" + token: "{{ nautobot_token }}" + termination_a_type: dcim.powerport + termination_a: + device: test100 + name: Test Power Port + termination_b_type: dcim.poweroutlet + termination_b: + device: TestDeviceR1 + name: R1 Power Outlet + status: "Connected" + state: present + register: test_seven + +- name: "CABLE 7: ASSERT - Issue #320 - dcim.powerport and dcim.poweroutlet" + assert: + that: + - test_seven is changed + - test_seven['diff']['before']['state'] == "absent" + - test_seven['diff']['after']['state'] == "present" + - test_seven['cable']['termination_a_type'] == "dcim.powerport" + - test_seven['cable']['termination_a_id'] == cable_test_seven_power_port['key'] + - test_seven['cable']['termination_b_type'] == "dcim.poweroutlet" + - test_seven['cable']['termination_b_id'] == cable_test_seven_power_outlet['key'] + - test_seven['msg'] == "cable dcim.powerport Test Power Port <> dcim.poweroutlet R1 Power Outlet created" + vars: + cable_test_seven_power_port: '{{ lookup(''networktocode.nautobot.lookup'', ''power-ports'', api_endpoint=nautobot_url, token=nautobot_token, api_filter=''device="test100" name="Test Power Port"'') }}' + cable_test_seven_power_outlet: '{{ lookup(''networktocode.nautobot.lookup'', ''power-outlets'', api_endpoint=nautobot_url, token=nautobot_token, api_filter=''device="TestDeviceR1" name="R1 Power Outlet"'') }}' diff --git a/tests/sanity/ignore-2.18.txt b/tests/sanity/ignore-2.18.txt new file mode 100644 index 00000000..935f26da --- /dev/null +++ b/tests/sanity/ignore-2.18.txt @@ -0,0 +1,2 @@ +plugins/modules/custom_field.py validate-modules:no-log-needed # key is not an actual secret that requires no_log to be set +plugins/modules/device_redundancy_group.py validate-modules:no-log-needed # secrets_group is not an actual secret that requires no_log to be set diff --git a/tests/unit/inventory/test_nb_inventory.py b/tests/unit/inventory/test_nb_inventory.py index ccfee73b..c86f3a2d 100644 --- a/tests/unit/inventory/test_nb_inventory.py +++ b/tests/unit/inventory/test_nb_inventory.py @@ -111,6 +111,7 @@ def test_refresh_url(inventory_fixture, options, expected): assert result == tuple(expected) +@pytest.mark.filterwarnings("ignore:Exception") def test_refresh_lookups(inventory_fixture): def raises_exception(): raise Exception("Error from within a thread") diff --git a/tests/unit/lookup/test_lookup.py b/tests/unit/lookup/test_lookup.py new file mode 100644 index 00000000..4140059c --- /dev/null +++ b/tests/unit/lookup/test_lookup.py @@ -0,0 +1,115 @@ +"""Tests for Nautobot Query Lookup Plugin.""" + +from ansible.errors import AnsibleError +from ansible.template import Templar +from ansible.parsing.dataloader import DataLoader +from ansible.vars.manager import VariableManager +from ansible.inventory.manager import InventoryManager +import pytest +from unittest.mock import patch, MagicMock + + +try: + from plugins.lookup.lookup import LookupModule +except ImportError: + import sys + + sys.path.append("tests") + sys.path.append("plugins/lookup") + + from lookup import LookupModule + + +@pytest.fixture +def lookup(): + """Fixture to create an instance of your lookup plugin.""" + return LookupModule() + + +@patch("plugins.lookup.lookup.pynautobot.api") +def test_basic_run(mock_pynautobot, lookup): + """Test basic functionality of the run method.""" + mock_api = MagicMock() + mock_pynautobot.return_value = mock_api + mock_api.dcim.devices.all.return_value = [{"id": 1, "name": "device1"}] + + terms = ["devices"] + kwargs = { + "token": "fake-token", + "api_endpoint": "https://nautobot.local", + } + result = lookup.run(terms, **kwargs) + + mock_pynautobot.assert_called_once_with("https://nautobot.local", token="fake-token", api_version=None, verify=True, retries="0") + assert result == [{"key": 1, "value": {"id": 1, "name": "device1"}}], "Expected a successful result" + + +def test_invalid_terms(lookup): + """Test when terms is not a list or valid input.""" + with pytest.raises(AnsibleError, match="Unrecognised term"): + with patch("plugins.lookup.lookup.get_endpoint", side_effect=KeyError): + kwargs = { + "token": "fake-token", + "api_endpoint": "https://nautobot.local", + } + lookup.run("invalid.term", **kwargs) + + +@patch("plugins.lookup.lookup.pynautobot.api") +def test_no_token_or_endpoint(mock_pynautobot, lookup): + """Test when neither token nor endpoint is provided.""" + with pytest.raises(AnsibleError): + lookup.run(["devices"], token=None, api_endpoint=None) + + +@patch("plugins.lookup.lookup.pynautobot.api") +def test_run_with_static_filter(mock_pynautobot, lookup): + """Test filters functionality of the run method.""" + mock_api = MagicMock() + mock_pynautobot.return_value = mock_api + mock_api.dcim.devices.filter.return_value = [{"id": 1, "name": "device1"}] + + # Initialize Ansible's Templar with necessary components + loader = DataLoader() + inventory = InventoryManager(loader=loader, sources=[]) + variable_manager = VariableManager(loader=loader, inventory=inventory) + templar = Templar(loader=loader, variables=variable_manager.get_vars()) + lookup._templar = templar + + terms = ["devices"] + kwargs = { + "token": "fake-token", + "api_endpoint": "https://nautobot.local", + "api_filter": "{'name': 'device1'}", + } + result = lookup.run(terms, **kwargs) + + mock_pynautobot.assert_called_once_with("https://nautobot.local", token="fake-token", api_version=None, verify=True, retries="0") + mock_api.dcim.devices.filter.assert_called_once_with(_raw_params=["{'name':", "'device1'}"]) + assert result == [{"key": 1, "value": {"id": 1, "name": "device1"}}], "Expected a successful result" + + +@patch("plugins.lookup.lookup.pynautobot.api") +def test_run_with_dynamic_filter(mock_pynautobot, lookup): + """Test dynamic filters functionality of the run method.""" + mock_api = MagicMock() + mock_pynautobot.return_value = mock_api + mock_api.dcim.devices.filter.return_value = [{"id": 1, "name": "device1"}] + + # Initialize Ansible's Templar with necessary components + loader = DataLoader() + variables = {"device_name": "device1"} + templar = Templar(loader=loader, variables=variables) + lookup._templar = templar + + terms = ["devices"] + kwargs = { + "token": "fake-token", + "api_endpoint": "https://nautobot.local", + "api_filter": "{'name': '{{ device_name }}'}", + } + result = lookup.run(terms, **kwargs) + + mock_pynautobot.assert_called_once_with("https://nautobot.local", token="fake-token", api_version=None, verify=True, retries="0") + mock_api.dcim.devices.filter.assert_called_once_with(_raw_params=["{'name':", "'device1'}"]) + assert result == [{"key": 1, "value": {"id": 1, "name": "device1"}}], "Expected a successful result" diff --git a/tests/unit/module_utils/test_data/build_query_params_child/data.json b/tests/unit/module_utils/test_data/build_query_params_child/data.json index 04f83a63..fde6e6a4 100644 --- a/tests/unit/module_utils/test_data/build_query_params_child/data.json +++ b/tests/unit/module_utils/test_data/build_query_params_child/data.json @@ -207,7 +207,7 @@ "name": "Ethernet1/1" }, "expected": { - "device_id": 1, + "device": "device1", "name": "Ethernet1/1" } } diff --git a/tests/unit/module_utils/test_nautobot_base_class.py b/tests/unit/module_utils/test_nautobot_base_class.py index e71b110c..f6c3baa0 100644 --- a/tests/unit/module_utils/test_nautobot_base_class.py +++ b/tests/unit/module_utils/test_nautobot_base_class.py @@ -231,7 +231,7 @@ def test_build_diff_returns_valid_diff(mock_module): def test_create_object_check_mode_false(mock_module, endpoint_mock, normalized_data, on_creation_diff): return_value = endpoint_mock.create().serialize() serialized_obj, diff = mock_module._create_object(endpoint_mock, normalized_data) - assert endpoint_mock.create.called_once_with(normalized_data) + endpoint_mock.create.assert_called_with(**normalized_data) assert serialized_obj.serialize() == return_value assert diff == on_creation_diff @@ -239,7 +239,7 @@ def test_create_object_check_mode_false(mock_module, endpoint_mock, normalized_d def test_create_object_check_mode_true(mock_module, endpoint_mock, normalized_data, on_creation_diff): mock_module.check_mode = True serialized_obj, diff = mock_module._create_object(endpoint_mock, normalized_data) - assert endpoint_mock.create.not_called() + endpoint_mock.create.assert_not_called() assert serialized_obj == normalized_data assert diff == on_creation_diff @@ -247,7 +247,7 @@ def test_create_object_check_mode_true(mock_module, endpoint_mock, normalized_da def test_delete_object_check_mode_false(mock_module, obj_mock, on_deletion_diff): mock_module.nb_object = obj_mock diff = mock_module._delete_object() - assert obj_mock.delete.called_once() + obj_mock.delete.assert_called_once() assert diff == on_deletion_diff @@ -255,7 +255,7 @@ def test_delete_object_check_mode_true(mock_module, obj_mock, on_deletion_diff): mock_module.check_mode = True mock_module.object = obj_mock diff = mock_module._delete_object() - assert obj_mock.delete.not_called() + obj_mock.delete.assert_not_called() assert diff == on_deletion_diff @@ -263,7 +263,7 @@ def test_update_object_no_changes(mock_module, obj_mock): mock_module.nb_object = obj_mock unchanged_data = obj_mock.serialize() serialized_object, diff = mock_module._update_object(unchanged_data) - assert obj_mock.update.not_called() + obj_mock.update.assert_not_called() assert serialized_object == unchanged_data assert diff is None @@ -271,7 +271,7 @@ def test_update_object_no_changes(mock_module, obj_mock): def test_update_object_with_changes_check_mode_false(mock_module, obj_mock, changed_serialized_obj, on_update_diff): mock_module.nb_object = obj_mock serialized_obj, diff = mock_module._update_object(changed_serialized_obj) - assert obj_mock.update.called_once_with(changed_serialized_obj) + obj_mock.update.assert_called_once_with(changed_serialized_obj) assert serialized_obj == obj_mock.serialize() assert diff == on_update_diff @@ -283,7 +283,7 @@ def test_update_object_with_changes_check_mode_true(mock_module, obj_mock, chang updated_serialized_obj.update(changed_serialized_obj) serialized_obj, diff = mock_module._update_object(changed_serialized_obj) - assert obj_mock.update.not_called() + obj_mock.update.assert_not_called() assert serialized_obj == updated_serialized_obj assert diff == on_update_diff