Develop ansible module for host inventory - issue#493#805
Develop ansible module for host inventory - issue#493#805george-ghawali merged 26 commits intorelease/2.4.0from
Conversation
This reverts commit 50abda4.
abhinavbansal29
left a comment
There was a problem hiding this comment.
Please add Examples
|
/ok-to-test (inventory_test|ntnx_vms_v2)
Detailed Test Results |
|
/ok-to-test (inventory_test_hosts_v2|ntnx_vms_v2)
Detailed Test Results |
|
/ok-to-test inventory_test_hosts_v2
Detailed Test Results |
…, Storage Policies, EULA, Dynamic Inventory and Host Inventory modules with several improvements and bug fixes 2.4.0 Release (#804) * Changing release version in galaxy.yml * Removing extra flag (#817) * Dev, Tests, Docs and Examples for Associating or Disassociating categories to cluster (#762) * Dev Code for cluster categories * Dev, Tests, Docs and Examples for Associating or Disassociating categories to cluster * Dev file for performing the task * Fixing ansible lint * fixing sanity * Resolving comments * Fixing Examples for Clusters * Fixing lint * Adding STIGS info V2 Module - Release/2.4.0 (#733) * Adding dev&tests for STIGs info module V4 * minor fixes * renaming module * removing the deprecated API * isort fix * sanity fix * resolving comments * resolving comments * sanity fix * sanity fix * Adding dev&tests for STIGs info module V4 * minor fixes * renaming module * removing the deprecated API * isort fix * sanity fix * resolving comments * resolving comments * sanity fix * sanity fix * ansible lint fix * adding examples * adding total available result to dev and test * minor fix in total available results * adding enhancement for ntnx_vms_cd_rom_iso_v2 module (#826) * adding enhancement for ntnx_vms_cd_rom_iso_v2 module * isort fix * Adding SSL certificates V2 Module - Release/2.4.0 (#793) * Adding SSL certificates V2 Module dev code * Sanity fixes * sanity fix * sanity fix * doc fix * reformatting docs * Adding SSL certificates tests * sanity fix * isort fix * add examples * adding samples and minor fixes * variable renaming * resolving comments * adding msg to docs * Adding Storage Policies V2 Module - Release/2.4.0 (#773) * Adding Storage Policies V2 module - dev/tests/examples * sanity fix * removing extra debug statements * docs description fix * enable storage policies tests * disable storage policies tests * example fix * reformating modules in runtime.yml file * fixing total available results * variables renaming * remove negative test * resolving comments * resolving comments * remove debug statement * assertion fix * adding msg to docs * assertion fix * remove extra debug statement * Adding Key Management Server V2 Module - Release/2.4.0 (#738) * Adding dev and tests for KMS * Adding negative scnerios & minor fixes * Adding examples * isort, black &flake8 fixes * ansible lint fixes * Adding test for updating with invalid ext id * enable kms tests * add ntnx-security-py-client to req files * disable kms tests * Adding total available results field * enable kms tests * minor fixes * minor fixes * disable kms tests * Adding azure_key_vault object * remove debug statement * enable kms tests * Sanity fix * minor fixes * minor fix * disable kms tests * resolving comments * sanity fixes * resolving comments * ansible lint and sanity fixes * examples fix * undo inventory changes * resolving some comments * docs fix * resolving comments * resolving comments * adding sdk in the external req file * Adding Cluster Profiles V2 Module - Release/2.4.0 (#750) * Adding dev modules for cluster profiles * Add dev module to manage cluster profile association (apply/disassociate) * black fix * black fix * Adding examples for cluster profile in module * fix examples in module * minor fix * Adding initial tests with minor fix * sanity fix * Adding dryrun to cluster profile association module * Adding initial tests for cluster profiles * minor fixes * ansible lint & sanity fixes * sanity and ansible lint fixes * sanity and minor fixes * minor fix * enable cluster profiles tests * minor doc fix * add examples * adding samples and docs fixes * sanity fix * adding total available results to dev and test * fixes in examples and docs * uncomment variables * minor fixes * sanity fix * resolving comments * black fixes * sanity fix * Revert "sanity fix" This reverts commit 3d6d4ff. * sanity fix * sanity fix * resolving comments * Adding fix for KMS new attributes in Idempotency check (#833) * Adding fix to Abort task for Disk image instead of ISO (#840) * Adding fix to handle the return of new attribute in prism (#844) * Adding fix to handle the return on new attribute in prism * ansible lint fix * adding fix for new attribute * Adding delay before deleting bucket in object store (#845) * Adding msg in docs for many modules (#832) * Adding msg in docs for many modules * resolving comments * Adding fix for protection policies new attributes (#836) * Adding fix for protection policies new attributes * sanity fix * Adding test for setting is replication paused as true * remove extra debug statement * Adding missing docs in templates (#837) * Adding missing docs in templates * resolving comments * minor fix in docs * Adding docs fixes for storage policies (#843) * Adding docs fixes for storage policies * doc fix * dev & test fixes * ansible lint fix * Specifying detailedAssociations is supported only when ext_id is provided (#848) * Adding fix for guest customization (#847) * add test to workflow jobs * Revert "add test to workflow jobs" This reverts commit 1ed1fec. * Dev, Tests and Docs for EULA in licensing namespace (#751) * Dev, Tests and Docs for EULA in licensing namespace * Minor lint fixes * Fixing sanity * Minor fix in tests * Adding Examples for EULA * Fixing lint * Resolved comments * Minor fix * Resolving comments * Adding ntnx-licensing-py-client in requirements.txt * Resolving comments * Fixing test in Recivery points (#870) * Adding a fix for volume group constant value (#839) * Develop ansible module for host inventory - issue#493 (#805) * Develop ansible module for host inventory * doc fix * isort fix * setting env_fallback * minor fix * adding code fixes * isort fix * Adding inventory hosts tests * ansible lint fix * move extract_ip_address_from_external function to utils * Revert "move extract_ip_address_from_external function to utils" This reverts commit 50abda4. * resolving comments * ansible lint fix * docs fix * renaiming tests * remove extra tests * adding cpu_frequency_ghz to examples * Adding logger to inventory hosts * isort fix * Develop ansible module V2 for VM inventory (#806) * Develop ansible module V2 for VM inventory * isort fix * sanity fix * removing unwanted variables from inventory * isort fix * sanity fix * refactor _build_host_vars * code refactoring & code fixes * minor doc fix * isort and flake8 fixes * sanity fix * Adding inventory V2 tests * isort fix * Adding examples * sanity fix * isort fix * ansible lint fix & adding examples * adding ipv6 as ansible host in case ipv4 is not found * ansible lint fix * sanity and ansible lint fixes * resolving comments * docs fix * remove extra variable * minor fix * add tests to workflow * renaiming inventory tests * Revert "add tests to workflow" This reverts commit e5b9d14. * Adding logger to inventory V1 and V2 modules * isort fix * flake8 fix * remove extra function * Add logger based on flag to enable debug logs (#825) * Add logger based on flag to enable debug logs * undo changes to vms examples * black and flake8 fixes * Adding debug flag to docs in all modules * sanity fix * update logger docs name * remove API count & adding option for log file path * flake8 fix * Adding ntnx_logger doc to all V3 modules * sanity fix * sanity fix * sanity fix * sanity fix * fixes for pipeline * flake8 fix * minor change in path * minor fix * change in path * adding fix for enable_debug_logging * minor change in file path * Adding enable_debug_logging to main file for all tests * black fix * undo changes in ok to test command workflow * sanity fix * adding enable_debug_logginto new tests * Adding support for V3 * flake8 fix * resolving comments * Adding nutanix_log_file * black fix * set default value for log file * black fix * adding nutanix_log_file to all tests * adding date to file * Adding logger in EULA * Adding default path variable * adding DEFAULT_LOG_FILE to log_file var --------- Co-authored-by: Abhinav Bansal <abhinav.bansal1@nutanix.com> * flake8 fix * identation fix * adding minor fix in logger * Adding fix for filters in inventory files (#871) * Adding fix for ntp server IP list in clusters profiles (#834) * Adding fix for ntp server IP list * adding fix for ntp server ip list assertions * adding support for new attribute in clusters profiles * minor fix in assertion and sanity fix * ansible-lint fix * minor fix in check mode assertion * Adding current_ntp_server_config to clusters * uncomment tests * indentation fix * docs fix in ntnx_vms_v2 * Fixing tests for ISCSI Client connection (#877) * Fixing tests for ISCSI Client connection * Checking the list to get ext_id for the correct name * Fixing ansible lint * Fixing update operation for lcm config (#878) * Fixing update operation for lcm config * Fixing flake8 * Removing default values as we don't need them in update operations * Fixing tests and documentation * Minor doc fix * update SDKs versions * Revert "update SDKs versions" This reverts commit b035cc8. * minor fix in objects tests * updating docs for ntp_server_config_list in cluster module * updating docs for ntp_server_config_list in cluster module * Updating sdk versions in test requirements.txt * Minor fix * Changing version of objects * Adding wait for completion in LCM config module * task_ext_id assertion in LCM * Removed support for resource_limit from Projects module (#881) * Adding fix for ovas in logger * Adding file size in logger * Adding ALLOW_VERSION_NEGOTIATION to all api_client files * isort fix * set ALLOW_VERSION_NEGOTIATION to true --------- Co-authored-by: george-ghawali <george.ghawali@nutanix.com> Co-authored-by: george-ghawali <george.ghawali@hotmail.com>
* Changing release version in galaxy.yml * Removing extra flag (#817) * Dev, Tests, Docs and Examples for Associating or Disassociating categories to cluster (#762) * Dev Code for cluster categories * Dev, Tests, Docs and Examples for Associating or Disassociating categories to cluster * Dev file for performing the task * Fixing ansible lint * fixing sanity * Resolving comments * Fixing Examples for Clusters * Fixing lint * Adding STIGS info V2 Module - Release/2.4.0 (#733) * Adding dev&tests for STIGs info module V4 * minor fixes * renaming module * removing the deprecated API * isort fix * sanity fix * resolving comments * resolving comments * sanity fix * sanity fix * Adding dev&tests for STIGs info module V4 * minor fixes * renaming module * removing the deprecated API * isort fix * sanity fix * resolving comments * resolving comments * sanity fix * sanity fix * ansible lint fix * adding examples * adding total available result to dev and test * minor fix in total available results * adding enhancement for ntnx_vms_cd_rom_iso_v2 module (#826) * adding enhancement for ntnx_vms_cd_rom_iso_v2 module * isort fix * Adding SSL certificates V2 Module - Release/2.4.0 (#793) * Adding SSL certificates V2 Module dev code * Sanity fixes * sanity fix * sanity fix * doc fix * reformatting docs * Adding SSL certificates tests * sanity fix * isort fix * add examples * adding samples and minor fixes * variable renaming * resolving comments * adding msg to docs * Adding Storage Policies V2 Module - Release/2.4.0 (#773) * Adding Storage Policies V2 module - dev/tests/examples * sanity fix * removing extra debug statements * docs description fix * enable storage policies tests * disable storage policies tests * example fix * reformating modules in runtime.yml file * fixing total available results * variables renaming * remove negative test * resolving comments * resolving comments * remove debug statement * assertion fix * adding msg to docs * assertion fix * remove extra debug statement * Adding Key Management Server V2 Module - Release/2.4.0 (#738) * Adding dev and tests for KMS * Adding negative scnerios & minor fixes * Adding examples * isort, black &flake8 fixes * ansible lint fixes * Adding test for updating with invalid ext id * enable kms tests * add ntnx-security-py-client to req files * disable kms tests * Adding total available results field * enable kms tests * minor fixes * minor fixes * disable kms tests * Adding azure_key_vault object * remove debug statement * enable kms tests * Sanity fix * minor fixes * minor fix * disable kms tests * resolving comments * sanity fixes * resolving comments * ansible lint and sanity fixes * examples fix * undo inventory changes * resolving some comments * docs fix * resolving comments * resolving comments * adding sdk in the external req file * Adding Cluster Profiles V2 Module - Release/2.4.0 (#750) * Adding dev modules for cluster profiles * Add dev module to manage cluster profile association (apply/disassociate) * black fix * black fix * Adding examples for cluster profile in module * fix examples in module * minor fix * Adding initial tests with minor fix * sanity fix * Adding dryrun to cluster profile association module * Adding initial tests for cluster profiles * minor fixes * ansible lint & sanity fixes * sanity and ansible lint fixes * sanity and minor fixes * minor fix * enable cluster profiles tests * minor doc fix * add examples * adding samples and docs fixes * sanity fix * adding total available results to dev and test * fixes in examples and docs * uncomment variables * minor fixes * sanity fix * resolving comments * black fixes * sanity fix * Revert "sanity fix" This reverts commit 3d6d4ff. * sanity fix * sanity fix * resolving comments * Adding fix for KMS new attributes in Idempotency check (#833) * Adding fix to Abort task for Disk image instead of ISO (#840) * Adding fix to handle the return of new attribute in prism (#844) * Adding fix to handle the return on new attribute in prism * ansible lint fix * adding fix for new attribute * Adding delay before deleting bucket in object store (#845) * Adding msg in docs for many modules (#832) * Adding msg in docs for many modules * resolving comments * Adding fix for protection policies new attributes (#836) * Adding fix for protection policies new attributes * sanity fix * Adding test for setting is replication paused as true * remove extra debug statement * Adding missing docs in templates (#837) * Adding missing docs in templates * resolving comments * minor fix in docs * Adding docs fixes for storage policies (#843) * Adding docs fixes for storage policies * doc fix * dev & test fixes * ansible lint fix * Specifying detailedAssociations is supported only when ext_id is provided (#848) * Adding fix for guest customization (#847) * add test to workflow jobs * Revert "add test to workflow jobs" This reverts commit 1ed1fec. * Dev, Tests and Docs for EULA in licensing namespace (#751) * Dev, Tests and Docs for EULA in licensing namespace * Minor lint fixes * Fixing sanity * Minor fix in tests * Adding Examples for EULA * Fixing lint * Resolved comments * Minor fix * Resolving comments * Adding ntnx-licensing-py-client in requirements.txt * Resolving comments * Fixing test in Recivery points (#870) * Adding a fix for volume group constant value (#839) * Develop ansible module for host inventory - issue#493 (#805) * Develop ansible module for host inventory * doc fix * isort fix * setting env_fallback * minor fix * adding code fixes * isort fix * Adding inventory hosts tests * ansible lint fix * move extract_ip_address_from_external function to utils * Revert "move extract_ip_address_from_external function to utils" This reverts commit 50abda4. * resolving comments * ansible lint fix * docs fix * renaiming tests * remove extra tests * adding cpu_frequency_ghz to examples * Adding logger to inventory hosts * isort fix * Develop ansible module V2 for VM inventory (#806) * Develop ansible module V2 for VM inventory * isort fix * sanity fix * removing unwanted variables from inventory * isort fix * sanity fix * refactor _build_host_vars * code refactoring & code fixes * minor doc fix * isort and flake8 fixes * sanity fix * Adding inventory V2 tests * isort fix * Adding examples * sanity fix * isort fix * ansible lint fix & adding examples * adding ipv6 as ansible host in case ipv4 is not found * ansible lint fix * sanity and ansible lint fixes * resolving comments * docs fix * remove extra variable * minor fix * add tests to workflow * renaiming inventory tests * Revert "add tests to workflow" This reverts commit e5b9d14. * Adding logger to inventory V1 and V2 modules * isort fix * flake8 fix * remove extra function * Add logger based on flag to enable debug logs (#825) * Add logger based on flag to enable debug logs * undo changes to vms examples * black and flake8 fixes * Adding debug flag to docs in all modules * sanity fix * update logger docs name * remove API count & adding option for log file path * flake8 fix * Adding ntnx_logger doc to all V3 modules * sanity fix * sanity fix * sanity fix * sanity fix * fixes for pipeline * flake8 fix * minor change in path * minor fix * change in path * adding fix for enable_debug_logging * minor change in file path * Adding enable_debug_logging to main file for all tests * black fix * undo changes in ok to test command workflow * sanity fix * adding enable_debug_logginto new tests * Adding support for V3 * flake8 fix * resolving comments * Adding nutanix_log_file * black fix * set default value for log file * black fix * adding nutanix_log_file to all tests * adding date to file * Adding logger in EULA * Adding default path variable * adding DEFAULT_LOG_FILE to log_file var --------- Co-authored-by: Abhinav Bansal <abhinav.bansal1@nutanix.com> * flake8 fix * identation fix * adding minor fix in logger * Adding fix for filters in inventory files (#871) * Adding fix for ntp server IP list in clusters profiles (#834) * Adding fix for ntp server IP list * adding fix for ntp server ip list assertions * adding support for new attribute in clusters profiles * minor fix in assertion and sanity fix * ansible-lint fix * minor fix in check mode assertion * Adding current_ntp_server_config to clusters * uncomment tests * indentation fix * docs fix in ntnx_vms_v2 * Fixing tests for ISCSI Client connection (#877) * Fixing tests for ISCSI Client connection * Checking the list to get ext_id for the correct name * Fixing ansible lint * Fixing update operation for lcm config (#878) * Fixing update operation for lcm config * Fixing flake8 * Removing default values as we don't need them in update operations * Fixing tests and documentation * Minor doc fix * update SDKs versions * Revert "update SDKs versions" This reverts commit b035cc8. * minor fix in objects tests * updating docs for ntp_server_config_list in cluster module * updating docs for ntp_server_config_list in cluster module * Updating sdk versions in test requirements.txt * Minor fix * Changing version of objects * Adding wait for completion in LCM config module * task_ext_id assertion in LCM * Removed support for resource_limit from Projects module (#881) * Adding fix for ovas in logger * Adding file size in logger * Adding ALLOW_VERSION_NEGOTIATION to all api_client files * isort fix * set ALLOW_VERSION_NEGOTIATION to true * Readme Changes for 2.4.0 Release * Minor fix * Chnaged requirements for 2.4.0 release * Changelog changes * Minor fix * Minor lint fixes * Minor lint fixes * Minor lint fixes --------- Co-authored-by: george-ghawali <george.ghawali@nutanix.com> Co-authored-by: george-ghawali <george.ghawali@hotmail.com>
Summary
New dynamic inventory plugin
ntnx_prism_host_inventory_v2for fetching Nutanix hosts using V4 APIs and SDK instead of V3 direct API calls.Changes
Plugin:
plugins/inventory/ntnx_prism_host_inventory_v2.pyntnx_clustermgmt_py_clientSDKfetch_all_hostsoptionExample Config:
nutanix.ymlKey Features