├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.md │ ├── enhancement-request.md │ └── feature-request.md ├── labeler.yml └── workflows │ ├── ansible-lint.yml │ ├── black.yml │ ├── flake8.yml │ ├── isort.yml │ ├── ok-to-test-command.yml │ ├── ok-to-test.yml │ ├── pr-labels.yml │ └── unit_testing.yml ├── .gitignore ├── CHANGELOG.md ├── CHANGELOG.rst ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── _config.yml ├── changelogs ├── changelog.yaml └── config.yaml ├── examples ├── README.md ├── Volume_groups_v2 │ ├── volume_groups_disks_v2.yml │ ├── volume_groups_iscsi_clients_v2.yml │ ├── volume_groups_v2.yml │ └── volume_groups_vms_v2.yml ├── acp.yml ├── acp_info.yml ├── address_groups_crud.yml ├── categories_v2 │ └── categories_v2.yml ├── category_crud.yml ├── cluster_management_v2 │ ├── clusters_and_hosts_v2.yml │ └── clusters_nodes_v2.yml ├── clusters_info.yml ├── data_protection_v2 │ ├── Readme.md │ ├── Recovery_Points.png │ └── recovery_points_v2.yml ├── dr │ ├── protection_policy.yml │ └── recovery_plan_with_execution.yml ├── fc │ ├── api_keys_create.yml │ ├── api_keys_info.yml │ ├── fc.yml │ ├── imaged_cluster_info.yml │ └── imaged_nodes_info.yml ├── fip.yml ├── fip_info.yml ├── foundation │ ├── get_images_info.yml │ ├── image_nodes.yml │ ├── image_upload.yml │ ├── ipmi_config.yml │ └── node_discovery_network_info.yml ├── hosts_info.yml ├── iaas │ ├── iaas.yml │ ├── policies_create.yml │ ├── policies_delete.yml │ ├── roles │ │ ├── external_subnet │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── external_subnet.yml │ │ │ │ └── main.yml │ │ ├── fip │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── fip.yml │ │ │ │ └── main.yml │ │ ├── overlay_subnet │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── main.yml │ │ │ │ └── overlay_subnet.yml │ │ ├── pbr │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── main.yml │ │ │ │ └── pbr.yml │ │ ├── pbr_delete │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── main.yml │ │ │ │ └── pbr_delete.yml │ │ ├── static_route │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── main.yml │ │ │ │ └── static_route.yml │ │ ├── vm │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── main.yml │ │ │ │ └── vm.yml │ │ └── vpc │ │ │ ├── meta │ │ │ └── main.yml │ │ │ └── tasks │ │ │ ├── main.yml │ │ │ └── vpc.yml │ └── vars.yml ├── iam_v2 │ ├── authorization_policies_v2.yml │ ├── directory_services_v2.yml │ ├── operations_v2.yml │ ├── roles_v2.yml │ ├── saml_identity_provider_v2.yml │ ├── user_groups_v2.yml │ └── users_v2.yml ├── images.yml ├── inventory │ ├── ansible.cfg │ └── nutanix.yaml ├── karbon │ ├── cluster_info.yml │ ├── create_k8s_cluster.yml │ ├── create_registries.yml │ └── registries_info.yml ├── lcm_v2 │ └── lcm_v2.yml ├── local_user_create_vm │ ├── README.md │ ├── cloud_init.yml │ ├── create_local_user_and_entities.yml │ └── create_vm_using_local_user.yml ├── ndb │ ├── README.md │ ├── all_day2_actions.yml │ ├── create_clone.yml │ ├── create_stretched_vlan.yml │ ├── create_time_machine_cluster.yml │ ├── create_vlan.yml │ ├── db_server_vms.yml │ ├── ndb_workflow.png │ ├── provision_database_on_registered_db_server.yml │ ├── provision_postgres_ha_instance_with_ips.yml │ ├── refresh_clone.yml │ ├── registr_cluster.yml │ ├── single_instance_postgress_database.yml │ ├── soft_delete_database_instance.yml │ └── software_profiles.yml ├── networks_v2 │ ├── address_groups_v2.yml │ ├── floating_ip_v2.yml │ ├── pbrs_v2.yml │ ├── routes_v2.yml │ ├── security_rules_v2.yml │ ├── service_groups_v2.yml │ ├── subnets_v2.yml │ └── vpcs_v2.yml ├── pbr.yml ├── pbr_info.yml ├── permissions_info.yml ├── prism_v2 │ ├── prism_central_backup_restore.yml │ ├── prism_central_deploy.yml │ └── prism_central_unregister.yml ├── projects_crud.yml ├── projects_with_role_mapping.yml ├── protection_policies_v2 │ ├── promote_restore_vgs.yml │ ├── promote_restore_vms.yml │ └── protection_policies_crud_v2.yml ├── roles_crud.yml ├── static_routes.yml ├── storage_container_v2 │ └── storage_container_v2.yml ├── subnet.yml ├── subnet_info.yml ├── user-groups.yml ├── user.yml ├── vm.yml ├── vm_info.yml ├── vm_operations.yml ├── vm_update.yml ├── vm_update_cdrom.yml ├── vmm_v2 │ ├── vms_categories_v2.yml │ ├── vms_cd_rom_v2.yml │ ├── vms_clone_v2.yml │ ├── vms_disks_v2.yml │ ├── vms_ngt_v2.yml │ ├── vms_nics_v2.yml │ ├── vms_serial_ports_v2.yml │ ├── vms_stage_guest_customization_v2.yml │ ├── vms_templates_v2.yml │ ├── vms_v2.yml │ └── vms_v2_fetch_all_vms.yml ├── vpc.yml └── vpc_info.yml ├── galaxy.yml ├── meta └── runtime.yml ├── plugins ├── README.md ├── __init__.py ├── doc_fragments │ ├── ntnx_credentials.py │ ├── ntnx_foundation_base_module.py │ ├── ntnx_info.py │ ├── ntnx_info_v2.py │ ├── ntnx_ndb_base_module.py │ ├── ntnx_ndb_info_base_module.py │ ├── ntnx_operations.py │ ├── ntnx_operations_v2.py │ └── ntnx_vms_base.py ├── inventory │ └── ntnx_prism_vm_inventory.py ├── module_utils │ ├── base_module.py │ ├── utils.py │ ├── v3 │ │ ├── __init__.py │ │ ├── base_info_module.py │ │ ├── constants.py │ │ ├── entity.py │ │ ├── fc │ │ │ ├── __init__.py │ │ │ ├── api_keys.py │ │ │ ├── fc.py │ │ │ ├── imaged_clusters.py │ │ │ └── imaged_nodes.py │ │ ├── foundation │ │ │ ├── __init__.py │ │ │ ├── base_module.py │ │ │ ├── bmc_ipmi_config.py │ │ │ ├── discover_nodes.py │ │ │ ├── enumerate_aos_packages.py │ │ │ ├── enumerate_hypervisor_isos.py │ │ │ ├── foundation.py │ │ │ ├── image_nodes.py │ │ │ ├── image_upload.py │ │ │ ├── node_discovery.py │ │ │ ├── node_network_details.py │ │ │ └── progress.py │ │ ├── karbon │ │ │ ├── clusters.py │ │ │ ├── karbon.py │ │ │ ├── node_pools.py │ │ │ └── registries.py │ │ ├── ndb │ │ │ ├── __init__.py │ │ │ ├── base_info_module.py │ │ │ ├── base_module.py │ │ │ ├── clusters.py │ │ │ ├── database_clones.py │ │ │ ├── database_engines │ │ │ │ ├── database_engine.py │ │ │ │ ├── db_engine_factory.py │ │ │ │ └── postgres.py │ │ │ ├── database_instances.py │ │ │ ├── db_server_cluster.py │ │ │ ├── db_server_vm.py │ │ │ ├── maintenance_window.py │ │ │ ├── nutanix_database.py │ │ │ ├── operations.py │ │ │ ├── profiles │ │ │ │ ├── profile_types.py │ │ │ │ └── profiles.py │ │ │ ├── slas.py │ │ │ ├── snapshots.py │ │ │ ├── stretched_vlans.py │ │ │ ├── tags.py │ │ │ ├── time_machines.py │ │ │ └── vlans.py │ │ ├── prism │ │ │ ├── __init__.py │ │ │ ├── accounts.py │ │ │ ├── acps.py │ │ │ ├── address_groups.py │ │ │ ├── categories.py │ │ │ ├── clusters.py │ │ │ ├── floating_ips.py │ │ │ ├── groups.py │ │ │ ├── hosts.py │ │ │ ├── idempotence_identifiers.py │ │ │ ├── image_placement_policy.py │ │ │ ├── images.py │ │ │ ├── pbrs.py │ │ │ ├── permissions.py │ │ │ ├── prism.py │ │ │ ├── projects.py │ │ │ ├── projects_internal.py │ │ │ ├── protection_rules.py │ │ │ ├── recovery_plan_jobs.py │ │ │ ├── recovery_plans.py │ │ │ ├── roles.py │ │ │ ├── security_rules.py │ │ │ ├── service_groups.py │ │ │ ├── spec │ │ │ │ ├── categories_mapping.py │ │ │ │ └── vms.py │ │ │ ├── static_routes.py │ │ │ ├── subnets.py │ │ │ ├── tasks.py │ │ │ ├── user_groups.py │ │ │ ├── users.py │ │ │ ├── virtual_switches.py │ │ │ ├── vms.py │ │ │ ├── vpcs.py │ │ │ └── vpn_connections.py │ │ └── utils.py │ └── v4 │ │ ├── __init__.py │ │ ├── base_info_module.py │ │ ├── clusters_mgmt │ │ ├── api_client.py │ │ ├── helpers.py │ │ └── spec │ │ │ └── clusters.py │ │ ├── constants.py │ │ ├── data_policies │ │ ├── api_client.py │ │ └── helpers.py │ │ ├── data_protection │ │ ├── api_client.py │ │ └── helpers.py │ │ ├── flow │ │ ├── api_client.py │ │ └── helpers.py │ │ ├── iam │ │ ├── api_client.py │ │ └── helpers.py │ │ ├── lcm │ │ ├── api_client.py │ │ └── helpers.py │ │ ├── network │ │ ├── api_client.py │ │ └── helpers.py │ │ ├── prism │ │ ├── helpers.py │ │ ├── pc_api_client.py │ │ ├── spec │ │ │ └── pc.py │ │ └── tasks.py │ │ ├── sdk_mock.py │ │ ├── spec_generator.py │ │ ├── utils.py │ │ ├── vmm │ │ ├── api_client.py │ │ ├── helpers.py │ │ └── spec │ │ │ └── vms.py │ │ └── volumes │ │ ├── api_client.py │ │ ├── helpers.py │ │ └── spec │ │ └── volume_group.py └── modules │ ├── __init__.py │ ├── ntnx_acps.py │ ├── ntnx_acps_info.py │ ├── ntnx_address_groups.py │ ├── ntnx_address_groups_info.py │ ├── ntnx_address_groups_info_v2.py │ ├── ntnx_address_groups_v2.py │ ├── ntnx_authorization_policies_info_v2.py │ ├── ntnx_authorization_policies_v2.py │ ├── ntnx_categories.py │ ├── ntnx_categories_info.py │ ├── ntnx_categories_info_v2.py │ ├── ntnx_categories_v2.py │ ├── ntnx_clusters_info.py │ ├── ntnx_clusters_info_v2.py │ ├── ntnx_clusters_nodes_v2.py │ ├── ntnx_clusters_v2.py │ ├── ntnx_directory_services_info_v2.py │ ├── ntnx_directory_services_v2.py │ ├── ntnx_discover_unconfigured_nodes_v2.py │ ├── ntnx_floating_ips.py │ ├── ntnx_floating_ips_info.py │ ├── ntnx_floating_ips_info_v2.py │ ├── ntnx_floating_ips_v2.py │ ├── ntnx_foundation.py │ ├── ntnx_foundation_aos_packages_info.py │ ├── ntnx_foundation_bmc_ipmi_config.py │ ├── ntnx_foundation_central.py │ ├── ntnx_foundation_central_api_keys.py │ ├── ntnx_foundation_central_api_keys_info.py │ ├── ntnx_foundation_central_imaged_clusters_info.py │ ├── ntnx_foundation_central_imaged_nodes_info.py │ ├── ntnx_foundation_discover_nodes_info.py │ ├── ntnx_foundation_hypervisor_images_info.py │ ├── ntnx_foundation_image_upload.py │ ├── ntnx_foundation_node_network_info.py │ ├── ntnx_gpus_info_v2.py │ ├── ntnx_gpus_v2.py │ ├── ntnx_hosts_info.py │ ├── ntnx_hosts_info_v2.py │ ├── ntnx_image_placement_policies_info.py │ ├── ntnx_image_placement_policies_info_v2.py │ ├── ntnx_image_placement_policies_v2.py │ ├── ntnx_image_placement_policy.py │ ├── ntnx_images.py │ ├── ntnx_images_info.py │ ├── ntnx_images_info_v2.py │ ├── ntnx_images_v2.py │ ├── ntnx_karbon_clusters.py │ ├── ntnx_karbon_clusters_info.py │ ├── ntnx_karbon_clusters_node_pools.py │ ├── ntnx_karbon_registries.py │ ├── ntnx_karbon_registries_info.py │ ├── ntnx_lcm_config_info_v2.py │ ├── ntnx_lcm_config_v2.py │ ├── ntnx_lcm_entities_info_v2.py │ ├── ntnx_lcm_inventory_v2.py │ ├── ntnx_lcm_prechecks_v2.py │ ├── ntnx_lcm_status_info_v2.py │ ├── ntnx_lcm_upgrades_v2.py │ ├── ntnx_ndb_authorize_db_server_vms.py │ ├── ntnx_ndb_clones_info.py │ ├── ntnx_ndb_clusters.py │ ├── ntnx_ndb_clusters_info.py │ ├── ntnx_ndb_database_clone_refresh.py │ ├── ntnx_ndb_database_clones.py │ ├── ntnx_ndb_database_log_catchup.py │ ├── ntnx_ndb_database_restore.py │ ├── ntnx_ndb_database_scale.py │ ├── ntnx_ndb_database_snapshots.py │ ├── ntnx_ndb_databases.py │ ├── ntnx_ndb_databases_info.py │ ├── ntnx_ndb_db_server_vms.py │ ├── ntnx_ndb_db_servers_info.py │ ├── ntnx_ndb_linked_databases.py │ ├── ntnx_ndb_maintenance_tasks.py │ ├── ntnx_ndb_maintenance_window.py │ ├── ntnx_ndb_maintenance_windows_info.py │ ├── ntnx_ndb_profiles.py │ ├── ntnx_ndb_profiles_info.py │ ├── ntnx_ndb_register_database.py │ ├── ntnx_ndb_register_db_server_vm.py │ ├── ntnx_ndb_replicate_database_snapshots.py │ ├── ntnx_ndb_slas.py │ ├── ntnx_ndb_slas_info.py │ ├── ntnx_ndb_snapshots_info.py │ ├── ntnx_ndb_stretched_vlans.py │ ├── ntnx_ndb_tags.py │ ├── ntnx_ndb_tags_info.py │ ├── ntnx_ndb_time_machine_clusters.py │ ├── ntnx_ndb_time_machines_info.py │ ├── ntnx_ndb_vlans.py │ ├── ntnx_ndb_vlans_info.py │ ├── ntnx_nodes_network_info_v2.py │ ├── ntnx_operations_info_v2.py │ ├── ntnx_pbrs.py │ ├── ntnx_pbrs_info.py │ ├── ntnx_pbrs_info_v2.py │ ├── ntnx_pbrs_v2.py │ ├── ntnx_pc_backup_target_info_v2.py │ ├── ntnx_pc_backup_target_v2.py │ ├── ntnx_pc_config_info_v2.py │ ├── ntnx_pc_deploy_v2.py │ ├── ntnx_pc_registration_v2.py │ ├── ntnx_pc_restorable_domain_managers_info_v2.py │ ├── ntnx_pc_restore_points_info_v2.py │ ├── ntnx_pc_restore_source_info_v2.py │ ├── ntnx_pc_restore_source_v2.py │ ├── ntnx_pc_restore_v2.py │ ├── ntnx_pc_unregistration_v2.py │ ├── ntnx_permissions_info.py │ ├── ntnx_projects.py │ ├── ntnx_projects_info.py │ ├── ntnx_promote_protected_resources_v2.py │ ├── ntnx_protected_resources_info_v2.py │ ├── ntnx_protection_policies_info_v2.py │ ├── ntnx_protection_policies_v2.py │ ├── ntnx_protection_rules.py │ ├── ntnx_protection_rules_info.py │ ├── ntnx_recovery_plan_jobs.py │ ├── ntnx_recovery_plan_jobs_info.py │ ├── ntnx_recovery_plans.py │ ├── ntnx_recovery_plans_info.py │ ├── ntnx_recovery_point_replicate_v2.py │ ├── ntnx_recovery_point_restore_v2.py │ ├── ntnx_recovery_points_info_v2.py │ ├── ntnx_recovery_points_v2.py │ ├── ntnx_restore_protected_resources_v2.py │ ├── ntnx_roles.py │ ├── ntnx_roles_info.py │ ├── ntnx_roles_info_v2.py │ ├── ntnx_roles_v2.py │ ├── ntnx_route_tables_info_v2.py │ ├── ntnx_routes_info_v2.py │ ├── ntnx_routes_v2.py │ ├── ntnx_saml_identity_providers_info_v2.py │ ├── ntnx_saml_identity_providers_v2.py │ ├── ntnx_security_rules.py │ ├── ntnx_security_rules_info.py │ ├── ntnx_security_rules_info_v2.py │ ├── ntnx_security_rules_v2.py │ ├── ntnx_service_groups.py │ ├── ntnx_service_groups_info.py │ ├── ntnx_service_groups_info_v2.py │ ├── ntnx_service_groups_v2.py │ ├── ntnx_static_routes.py │ ├── ntnx_static_routes_info.py │ ├── ntnx_storage_containers_info_v2.py │ ├── ntnx_storage_containers_stats_v2.py │ ├── ntnx_storage_containers_v2.py │ ├── ntnx_subnets.py │ ├── ntnx_subnets_info.py │ ├── ntnx_subnets_info_v2.py │ ├── ntnx_subnets_v2.py │ ├── ntnx_templates_deploy_v2.py │ ├── ntnx_templates_guest_os_v2.py │ ├── ntnx_templates_info_v2.py │ ├── ntnx_templates_v2.py │ ├── ntnx_templates_version_v2.py │ ├── ntnx_templates_versions_info_v2.py │ ├── ntnx_user_groups.py │ ├── ntnx_user_groups_info.py │ ├── ntnx_user_groups_info_v2.py │ ├── ntnx_user_groups_v2.py │ ├── ntnx_users.py │ ├── ntnx_users_info.py │ ├── ntnx_users_info_v2.py │ ├── ntnx_users_v2.py │ ├── ntnx_vm_recovery_point_info_v2.py │ ├── ntnx_vm_revert_v2.py │ ├── ntnx_vms.py │ ├── ntnx_vms_categories_v2.py │ ├── ntnx_vms_cd_rom_info_v2.py │ ├── ntnx_vms_cd_rom_iso_v2.py │ ├── ntnx_vms_cd_rom_v2.py │ ├── ntnx_vms_clone.py │ ├── ntnx_vms_clone_v2.py │ ├── ntnx_vms_disks_info_v2.py │ ├── ntnx_vms_disks_v2.py │ ├── ntnx_vms_info.py │ ├── ntnx_vms_info_v2.py │ ├── ntnx_vms_ngt_info_v2.py │ ├── ntnx_vms_ngt_insert_iso_v2.py │ ├── ntnx_vms_ngt_update_v2.py │ ├── ntnx_vms_ngt_upgrade_v2.py │ ├── ntnx_vms_ngt_v2.py │ ├── ntnx_vms_nics_info_v2.py │ ├── ntnx_vms_nics_ip_v2.py │ ├── ntnx_vms_nics_migrate_v2.py │ ├── ntnx_vms_nics_v2.py │ ├── ntnx_vms_ova.py │ ├── ntnx_vms_power_actions_v2.py │ ├── ntnx_vms_serial_port_info_v2.py │ ├── ntnx_vms_serial_port_v2.py │ ├── ntnx_vms_stage_guest_customization_v2.py │ ├── ntnx_vms_v2.py │ ├── ntnx_volume_groups_categories_v2.py │ ├── ntnx_volume_groups_disks_info_v2.py │ ├── ntnx_volume_groups_disks_v2.py │ ├── ntnx_volume_groups_info_v2.py │ ├── ntnx_volume_groups_iscsi_clients_info_v2.py │ ├── ntnx_volume_groups_iscsi_clients_v2.py │ ├── ntnx_volume_groups_v2.py │ ├── ntnx_volume_groups_vms_v2.py │ ├── ntnx_vpcs.py │ ├── ntnx_vpcs_info.py │ ├── ntnx_vpcs_info_v2.py │ └── ntnx_vpcs_v2.py ├── pyproject.toml ├── requirements.txt ├── scripts └── codegen.py ├── setup.cfg └── tests ├── __init__.py ├── integration ├── requirements.txt └── targets │ ├── ntnx_acps │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create_acps.yml │ │ ├── delete_acp.yml │ │ ├── main.yml │ │ ├── negative_scenarios.yml │ │ └── update_acps.yml │ ├── ntnx_acps_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_address_groups │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ ├── delete.yml │ │ ├── main.yml │ │ └── update.yml │ ├── ntnx_address_groups_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── address_groups_info.yml │ │ └── main.yml │ ├── ntnx_address_groups_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── address_groups.yml │ │ └── main.yml │ ├── ntnx_authorization_policies_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── all_operations.yml │ │ └── main.yml │ ├── ntnx_categories │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── all_operations.yml │ │ └── main.yml │ ├── ntnx_categories_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_categories_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── all_operations.yml │ │ └── main.yml │ ├── ntnx_clusters_and_hosts_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── cluster_crud.yml │ │ └── main.yml │ ├── ntnx_clusters_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── get_clusters_info.yml │ │ └── main.yml │ ├── ntnx_clusters_nodes_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── add_remove_nodes.yml │ │ └── main.yml │ ├── ntnx_directory_services_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── all_operations.yml │ │ └── main.yml │ ├── ntnx_floating_ips_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── all_operation.yml │ │ └── main.yml │ └── vars │ │ └── main.yml │ ├── ntnx_foundation │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── image_nodes.yml │ │ ├── main.yml │ │ └── negative_scenarios.yml │ ├── ntnx_foundation_aos_packages_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── get_aos.yml │ │ └── main.yml │ ├── ntnx_foundation_bmc_ipmi_config │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── configure_ipmi.yml │ │ └── main.yml │ ├── ntnx_foundation_central │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── image_nodes.yml │ │ └── main.yml │ └── vars │ │ └── main.yml │ ├── ntnx_foundation_central_api_keys │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create_key.yml │ │ └── main.yml │ ├── ntnx_foundation_central_api_keys_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── key_info.yml │ │ └── main.yml │ ├── ntnx_foundation_central_imaged_clusters_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── get_cluster_info.yml │ │ └── main.yml │ ├── ntnx_foundation_central_imaged_nodes_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── get_node_info.yml │ │ └── main.yml │ ├── ntnx_foundation_discover_nodes_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── discover_nodes.yml │ │ └── main.yml │ ├── ntnx_foundation_hypervisor_images_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── get_hypervisors.yml │ │ └── main.yml │ ├── ntnx_foundation_image_upload │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ ├── negative_scenarios.yml │ │ └── upload.yml │ ├── ntnx_foundation_node_network_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── get_info.yml │ │ └── main.yml │ ├── ntnx_foundation_sanity │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── image_nodes.yml │ │ └── main.yml │ ├── ntnx_gpus_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── gpus_operations.yml │ │ └── main.yml │ ├── ntnx_hosts_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── get_hosts_info.yml │ │ └── main.yml │ ├── ntnx_image_placement_policies_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_image_placement_policy │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ ├── delete.yml │ │ ├── main.yml │ │ └── update.yml │ ├── ntnx_image_placement_policy_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── image_policy_operations.yml │ │ └── main.yml │ ├── ntnx_images │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ ├── delete.yml │ │ ├── main.yml │ │ └── update.yml │ ├── ntnx_images_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_images_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── images_operations.yml │ │ └── main.yml │ ├── ntnx_karbon_clusters_and_info │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── crud.yml │ │ ├── main.yml │ │ └── negative_scenarios.yml │ └── vars │ │ └── main.yml │ ├── ntnx_karbon_registries │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ ├── main.yml │ │ └── negative_scenarios.yml │ ├── ntnx_karbon_registries_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_lcm_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── lcm_operations.yml │ │ └── main.yml │ ├── ntnx_ndb_availability_databases │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── readme.md │ └── tasks │ │ ├── main.yml │ │ └── tests.yml │ ├── ntnx_ndb_clones_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_ndb_clusters │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── CRUD.yml │ │ └── main.yml │ ├── ntnx_ndb_database_clones │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── clones.yml │ │ └── main.yml │ ├── ntnx_ndb_databases_actions │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── readme.md │ └── tasks │ │ ├── all_actions.yml │ │ └── main.yml │ ├── ntnx_ndb_databases_sanity │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── tests.yml │ ├── ntnx_ndb_databases_single_instance_1 │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── readme.md │ └── tasks │ │ ├── main.yml │ │ └── tests.yml │ ├── ntnx_ndb_databases_single_instance_2 │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── readme.md │ └── tasks │ │ ├── main.yml │ │ └── tests.yml │ ├── ntnx_ndb_db_server_vms │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── readme.md │ └── tasks │ │ ├── crud.yml │ │ └── main.yml │ ├── ntnx_ndb_maintenance_windows │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── readme.md │ └── tasks │ │ ├── crud.yml │ │ └── main.yml │ ├── ntnx_ndb_profiles │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── compute.yml │ │ ├── db_params.yml │ │ ├── main.yml │ │ └── network_profile.yml │ ├── ntnx_ndb_profiles_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_ndb_slas │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── CRUD.yml │ │ └── main.yml │ ├── ntnx_ndb_snapshots_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_ndb_software_profiles │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── crud.yml │ │ └── main.yml │ ├── ntnx_ndb_tags │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── crud.yml │ │ └── main.yml │ ├── ntnx_ndb_time_machines_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_ndb_time_machines_with_multi_clusters │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── data_access_management_and_snapshots.yml │ │ └── main.yml │ ├── ntnx_ndb_vlans │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create_vlans.yml │ │ ├── main.yml │ │ └── negative_scenarios.yml │ ├── ntnx_operations_info_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── permissions_info.yml │ ├── ntnx_ova │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create_ova.yml │ │ └── main.yml │ ├── ntnx_pbrs_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── all_operation.yml │ │ └── main.yml │ └── vars │ │ └── main.yml │ ├── ntnx_permissions_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── permissions_info.yml │ ├── ntnx_power_actions_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── power_actions.yml │ ├── ntnx_prism_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── deploy_pc.yml │ │ ├── main.yml │ │ ├── pc_backup_restore_from_cluster.yml │ │ ├── pc_backup_restore_using_object_store.yml │ │ └── unregister_pcs_connection.yml │ ├── ntnx_projects │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create_project.yml │ │ ├── delete_project.yml │ │ ├── main.yml │ │ ├── projects_with_role_mappings.yml │ │ └── update_project.yml │ ├── ntnx_projects_info │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── projects_info.yml │ └── vars │ │ └── main.yml │ ├── ntnx_protection_policies_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── protection_policies.yml │ └── vars │ │ └── main.yml │ ├── ntnx_protection_rules │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── protection_rules.yml │ ├── ntnx_protection_rules_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── rules_info.yml │ ├── ntnx_recovery_plans_and_jobs │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── crud.yml │ │ └── main.yml │ ├── ntnx_recovery_plans_and_jobs_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_recovery_points_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── recovery_points.yml │ ├── ntnx_roles │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ ├── delete.yml │ │ ├── main.yml │ │ └── update.yml │ ├── ntnx_roles_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── roles_info.yml │ ├── ntnx_roles_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── roles_operations.yml │ ├── ntnx_routes_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── routes.yml │ ├── ntnx_saml_identity_providers_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── all_operation.yml │ │ └── main.yml │ └── vars │ │ └── main.yml │ ├── ntnx_security_rules │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── app_rule.yml │ │ ├── isolation_rule.yml │ │ ├── main.yml │ │ ├── quarantine_rule.yml │ │ └── vdi.yml │ ├── ntnx_security_rules_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── get_security_rules.yml │ │ └── main.yml │ ├── ntnx_security_rules_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── application_rules_and_info_tests.yml │ │ ├── isolation_rules_tests.yml │ │ ├── main.yml │ │ └── quarantine_rules_tests.yml │ ├── ntnx_service_groups │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ ├── main.yml │ │ └── update.yml │ ├── ntnx_service_groups_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_service_groups_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── service_groups.yml │ ├── ntnx_static_routes │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ └── main.yml │ ├── ntnx_static_routes_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── info.yml │ │ └── main.yml │ ├── ntnx_storage_containers_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── all_operation.yml │ │ └── main.yml │ ├── ntnx_user_groups │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ └── main.yml │ ├── ntnx_user_groups_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── user_groups.yml │ ├── ntnx_users │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ └── main.yml │ ├── ntnx_users_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── users_info.yml │ ├── ntnx_users_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── users_operations.yml │ ├── ntnx_vms_categories_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── vms_categories.yml │ ├── ntnx_vms_cd_rom_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── cd_rom_operations.yml │ │ └── main.yml │ ├── ntnx_vms_clone │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ └── main.yml │ ├── ntnx_vms_clone_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── clone.yml │ │ └── main.yml │ ├── ntnx_vms_disks_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── disks_operations.yml │ │ └── main.yml │ ├── ntnx_vms_ngt_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── vms_ngt.yml │ ├── ntnx_vms_nics_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── nics_operations.yml │ ├── ntnx_vms_serial_port_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── serial_ports.yml │ ├── ntnx_vms_stage_guest_customization_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── stage.yml │ └── vars │ │ └── main.yml │ ├── ntnx_vms_templates_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── all_templates_operation.yml │ │ └── main.yml │ ├── ntnx_vms_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create_delete_info_vm.yml │ │ ├── create_delete_uefi_vms.yml │ │ ├── main.yml │ │ └── update_vm.yml │ ├── ntnx_volume_groups_disks_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── disks.yml │ │ └── main.yml │ ├── ntnx_volume_groups_iscsi_clients_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── iscsi_client_connections.yml │ │ └── main.yml │ ├── ntnx_volume_groups_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── volume_groups_crud.yml │ ├── ntnx_volume_groups_vms_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── ahv_vm_vg_connections.yml │ │ └── main.yml │ ├── ntnx_vpcs_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── all_operations.yml │ │ └── main.yml │ └── vars │ │ └── main.yml │ ├── nutanix_floating_ips │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── create_floating_ips.yml │ │ ├── main.yml │ │ └── negative_scenarios.yml │ └── vars │ │ └── main.yml │ ├── nutanix_floating_ips_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── list_floating_ips.yml │ │ └── main.yml │ ├── nutanix_pbrs │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── create_pbrs.yml │ │ ├── main.yml │ │ └── negative_scenarios.yml │ └── vars │ │ └── main.yml │ ├── nutanix_pbrs_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── list_pbrs.yml │ │ └── main.yml │ ├── nutanix_subnets │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── create_subnet.yml │ │ ├── delete_subnet.yml │ │ ├── main.yml │ │ └── negative_scenarios.yml │ └── vars │ │ └── main.yml │ ├── nutanix_subnets_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── list_subnets.yml │ │ └── main.yml │ ├── nutanix_subnets_v2 │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── subnet_operations.yml │ └── vars │ │ └── main.yml │ ├── nutanix_vms │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── create.yml │ │ ├── delete.yml │ │ ├── main.yml │ │ ├── negative_scenarios.yml │ │ ├── negative_vm_update.yml │ │ ├── vm_operations.yml │ │ └── vm_update.yml │ ├── nutanix_vms_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── list_vms.yml │ │ └── main.yml │ ├── nutanix_vpcs │ ├── aliases │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── create_vpcs.yml │ │ ├── delete_vpc.yml │ │ ├── main.yml │ │ └── negative_scenarios.yml │ └── vars │ │ └── main.yml │ ├── nutanix_vpcs_info │ ├── aliases │ ├── meta │ │ └── main.yml │ └── tasks │ │ ├── list_vpcs.yml │ │ └── main.yml │ ├── prepare_env │ ├── playbooks │ │ ├── cleanup.yml │ │ └── prepare_env.yml │ └── vars │ │ ├── .gitkeep │ │ └── main.yml │ ├── prepare_fc_env │ ├── playbooks │ │ └── prepare_fc_env.yml │ └── vars │ │ └── .gitkeep │ ├── prepare_foundation_env │ ├── playbooks │ │ ├── cleanup.yml │ │ ├── prepare_foundation_env.yml │ │ └── tmp │ │ │ └── .gitkeep │ └── vars │ │ ├── .gitkeep │ │ └── main.yml │ └── prepare_ndb_env │ ├── paybooks │ ├── prepare_env.yml │ └── tmp │ │ └── .gitkeep │ ├── playbooks │ ├── prepare_env.yml │ └── tmp │ │ └── .gitkeep │ └── vars │ ├── .gitkeep │ └── main.yml └── unit ├── __init__.py ├── compat ├── __init__.py ├── builtins.py ├── mock.py └── unittest.py └── plugins ├── __init__.py ├── module_utils ├── __init__.py └── test_entity.py └── modules ├── __init__.py └── utils.py /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Use this to file bug 4 | title: "[Bug] in module " 5 | labels: bug 6 | assignees: alaa-bish, dina-abuhijleh, Gevorg-Khachatryan-97, premkarat 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. ansible command 16 | 2. sample playbook used 17 | 18 | **Stack trace** 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | 24 | **Additional context** 25 | Add any other context about the problem here. 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Enhancement request 3 | about: Use this to file enhancement 4 | title: "[Imprv] add functionality to module " 5 | labels: enhancement 6 | assignees: alaa-bish, dina-abuhijleh, Gevorg-Khachatryan-97, premkarat 7 | 8 | --- 9 | 10 | **Describe the request** 11 | 12 | **Current behaviour** 13 | 14 | **Expected behaviour** 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Use this to file new functionality 4 | title: "[Feat] Develop ansible module for " 5 | labels: feature 6 | assignees: alaa-bish, dina-abuhijleh, Gevorg-Khachatryan-97, premkarat 7 | 8 | --- 9 | 10 | Requirements: 11 | - [ ] 12 | - [ ] 13 | 14 | Todo: 15 | - [ ] Client SDK, get_spec() 16 | - [ ] Ansible spec & spec validator 17 | - [ ] Unit test, sanity test 18 | - [ ] Integration test 19 | - [ ] Documentation 20 | - [ ] Examples 21 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 🐍 python: 3 | - "**/*.py" 4 | - "*.py" 5 | 6 | 📝 documentation: 7 | - "**/*.md" 8 | - "*.md" 9 | 10 | ⚙ ci: 11 | - .github/** 12 | 13 | ⚙ build: 14 | - Makefile 15 | -------------------------------------------------------------------------------- /.github/workflows/ansible-lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: ansible-lint 3 | # on: 4 | # push: 5 | # branches: 6 | # - main 7 | # pull_request: 8 | # branches: 9 | # - main 10 | on: 11 | - pull_request 12 | 13 | jobs: 14 | build: 15 | name: Ansible Lint 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: Set up Python 3.x (latest) 20 | uses: actions/setup-python@v2 21 | with: 22 | python-version: 3.x 23 | - name: Run ansible-lint 24 | uses: ansible/ansible-lint@main 25 | -------------------------------------------------------------------------------- /.github/workflows/black.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Black 3 | # on: 4 | # push: 5 | # branches: 6 | # - main 7 | # pull_request: 8 | # branches: 9 | # - main 10 | on: 11 | - pull_request 12 | 13 | jobs: 14 | black: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Set up Python 3.x (latest) 19 | uses: actions/setup-python@v2 20 | with: 21 | python-version: 3.x 22 | - name: black 23 | uses: psf/black@stable 24 | with: 25 | version: 22.8.0 26 | -------------------------------------------------------------------------------- /.github/workflows/flake8.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Flake8 3 | # on: 4 | # push: 5 | # branches: 6 | # - main 7 | # pull_request: 8 | # branches: 9 | # - main 10 | on: 11 | - pull_request 12 | 13 | jobs: 14 | flake8: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Set up Python 3.10 19 | uses: actions/setup-python@v2 20 | with: 21 | python-version: "3.10" 22 | - name: Run Flake8 23 | run: | 24 | pip install -r requirements.txt 25 | flake8 26 | -------------------------------------------------------------------------------- /.github/workflows/isort.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Isort 3 | # on: 4 | # push: 5 | # branches: 6 | # - main 7 | # pull_request: 8 | # branches: 9 | # - main 10 | on: 11 | - pull_request 12 | 13 | jobs: 14 | isort: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Set up Python 3.x 19 | uses: actions/setup-python@v2 20 | with: 21 | python-version: 3.x 22 | - uses: isort/isort-action@master 23 | -------------------------------------------------------------------------------- /.github/workflows/ok-to-test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Ok-To-Test 3 | 4 | on: [issue_comment] 5 | jobs: 6 | test: 7 | runs-on: ubuntu-latest 8 | if: ${{ github.event.issue.pull_request }} 9 | steps: 10 | - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." 11 | - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" 12 | - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." 13 | - run: echo "Your Github Token is ${{ secrets.GITHUB_TOKEN }}" 14 | 15 | - name: Slash Command Dispatch 16 | uses: peter-evans/slash-command-dispatch@v2 17 | with: 18 | token: ${{ secrets.PAT }} 19 | commands: ok-to-test 20 | permission: write 21 | - run: echo "🍏 This job's status is ${{ job.status }}." 22 | -------------------------------------------------------------------------------- /.github/workflows/pr-labels.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: PR Labeler 3 | 4 | on: 5 | - pull_request 6 | 7 | jobs: 8 | label: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/labeler@v2 12 | with: 13 | repo-token: ${{ secrets.GITHUB_TOKEN }} 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | nutanix-ncp-* 2 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman 2 | -------------------------------------------------------------------------------- /changelogs/config.yaml: -------------------------------------------------------------------------------- 1 | changelog_filename_template: ../CHANGELOG.rst 2 | changelog_filename_version_depth: 0 3 | changes_file: changelog.yaml 4 | changes_format: combined 5 | ignore_other_fragment_extensions: true 6 | keep_fragments: false 7 | mention_ancestor: true 8 | new_plugins_after_name: removed_features 9 | notesdir: fragments 10 | prelude_section_name: release_summary 11 | prelude_section_title: Release Summary 12 | sanitize_changelog: true 13 | sections: 14 | - - major_changes 15 | - Major Changes 16 | - - minor_changes 17 | - Minor Changes 18 | - - breaking_changes 19 | - Breaking Changes / Porting Guide 20 | - - deprecated_features 21 | - Deprecated Features 22 | - - removed_features 23 | - Removed Features (previously deprecated) 24 | - - security_fixes 25 | - Security Fixes 26 | - - bugfixes 27 | - Bugfixes 28 | - - known_issues 29 | - Known Issues 30 | title: Nutanix.Ncp 31 | trivial_section_name: trivial 32 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | ## Examples Dependency 2 | These examples has been tested against following versions : 3 | 1. ansible-core==2.15.0 4 | 5 | 6 | > Install ansible community general package from https://galaxy.ansible.com/ui/repo/published/community/general/ 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/Volume_groups_v2/volume_groups_vms_v2.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Summary: 3 | # This playbook will do: 4 | # 1. Attach VM to Volume Group 5 | # 2. Detach VM from Volume Group 6 | 7 | - name: Volume groups vms playbook 8 | hosts: localhost 9 | gather_facts: false 10 | module_defaults: 11 | group/nutanix.ncp.ntnx: 12 | nutanix_host: 13 | nutanix_username: 14 | nutanix_password: 15 | validate_certs: false 16 | tasks: 17 | - name: Setting Variables 18 | ansible.builtin.set_fact: 19 | vg1_uuid: "f4b1b3b4-4b1b-4b1b-4b1b-4b1b4b1b4b1b" 20 | vm1_uuid: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6" 21 | 22 | - name: Attach VM1 to VG 23 | nutanix.ncp.ntnx_volume_groups_vms_v2: 24 | state: present 25 | volume_group_ext_id: "{{ vg1_uuid }}" 26 | ext_id: "{{ vm1_uuid }}" 27 | index: 1 28 | register: result 29 | 30 | - name: Detach VM1 from VG 31 | nutanix.ncp.ntnx_volume_groups_vms_v2: 32 | state: absent 33 | volume_group_ext_id: "{{ vg1_uuid }}" 34 | ext_id: "{{ vm1_uuid }}" 35 | register: result 36 | -------------------------------------------------------------------------------- /examples/acp_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: ACP_Info playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: List ACPs using ascending, sorting and name filter 14 | nutanix.ncp.ntnx_acps_info: 15 | filter: 16 | name: "{{ acp_name }}" 17 | kind: access_control_policy 18 | sort_order: "ASCENDING" 19 | sort_attribute: "name" 20 | register: result 21 | ignore_errors: true 22 | 23 | - name: List ACPs using length and offset 24 | nutanix.ncp.ntnx_acps_info: 25 | length: 3 26 | offset: 0 27 | register: result 28 | ignore_errors: true 29 | -------------------------------------------------------------------------------- /examples/clusters_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Clusters_Info playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: Test getting all clusters 14 | nutanix.ncp.ntnx_clusters_info: 15 | register: clusters 16 | 17 | - name: Test getting particular cluster using uuid 18 | nutanix.ncp.ntnx_clusters_info: 19 | cluster_uuid: "{{ clusters.response.entities[0].metadata.uuid }}" 20 | register: result 21 | 22 | - name: List clusters using length, offset, sort order and priority sort attribute 23 | nutanix.ncp.ntnx_clusters_info: 24 | length: 2 25 | offset: 0 26 | sort_order: "ASCENDING" 27 | sort_attribute: "name" 28 | register: result 29 | 30 | - name: List clusters using filter and custom_filter 31 | nutanix.ncp.ntnx_clusters_info: 32 | filter: 33 | name: 34 | custom_filter: 35 | external_ip: 36 | register: result 37 | -------------------------------------------------------------------------------- /examples/data_protection_v2/Recovery_Points.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/examples/data_protection_v2/Recovery_Points.png -------------------------------------------------------------------------------- /examples/fc/api_keys_create.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: API Keys Playbook 3 | hosts: localhost 4 | gather_facts: false 5 | tasks: 6 | - name: Create a new API Key 7 | nutanix.ncp.ntnx_foundation_central_api_keys: 8 | nutanix_host: "{{ pc }}" 9 | nutanix_username: "{{ username }}" 10 | nutanix_password: "{{ password }}" 11 | validate_certs: false 12 | alias: test-alias 13 | register: output 14 | 15 | - name: Output of api_key 16 | ansible.builtin.debug: 17 | msg: "{{ output }}" 18 | -------------------------------------------------------------------------------- /examples/fc/api_keys_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: API Keys Info Playbook 3 | hosts: localhost 4 | gather_facts: false 5 | tasks: 6 | - name: API key response with alias 7 | nutanix.ncp.ntnx_foundation_central_api_keys: 8 | nutanix_host: "{{ pc }}" 9 | nutanix_username: "{{ username }}" 10 | nutanix_password: "{{ password }}" 11 | validate_certs: false 12 | alias: test 13 | register: output 14 | 15 | - name: API key response with key_uuid 16 | nutanix.ncp.ntnx_foundation_central_api_keys: 17 | nutanix_host: "{{ pc }}" 18 | nutanix_username: "{{ username }}" 19 | nutanix_password: "{{ password }}" 20 | validate_certs: false 21 | key_uuid: 22 | register: output 23 | 24 | - name: Output of api_key 25 | ansible.builtin.debug: 26 | msg: "{{ output }}" 27 | -------------------------------------------------------------------------------- /examples/fip.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: FIP playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | tasks: 12 | - name: Setting Variables 13 | ansible.builtin.set_fact: 14 | external_subnet_name: "" 15 | vm_name: "" 16 | 17 | - name: Create floating ip with external subnet uuid 18 | nutanix.ncp.ntnx_floating_ips: 19 | state: present 20 | wait: true 21 | external_subnet: 22 | name: "{{ external_subnet_name }}" 23 | register: result 24 | 25 | - name: Assign floating ip to vm 26 | nutanix.ncp.ntnx_floating_ips: 27 | state: present 28 | external_subnet: 29 | name: "{{ external_subnet.name }}" 30 | vm: 31 | name: "{{ vm_name }}" 32 | register: result 33 | 34 | - name: Delete all created floating ips 35 | nutanix.ncp.ntnx_floating_ips: 36 | state: absent 37 | fip_uuid: "{{ result.fip_uuid }}" 38 | register: result 39 | -------------------------------------------------------------------------------- /examples/fip_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: FIP_Info playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: List floating_ips using ascending ip sorting and floating_ip filter 14 | nutanix.ncp.ntnx_floating_ips_info: 15 | filter: 16 | floating_ip: "10.0.1.2" 17 | kind: floating_ip 18 | sort_order: "ASCENDING" 19 | sort_attribute: "floating_ip" 20 | register: result 21 | ignore_errors: true 22 | 23 | - name: List floating_ips using length and offset 24 | nutanix.ncp.ntnx_floating_ips_info: 25 | length: 3 26 | offset: 0 27 | register: result 28 | ignore_errors: true 29 | 30 | - name: List floating_ips using filter and custom_filter 31 | nutanix.ncp.ntnx_floating_ips_info: 32 | filter: 33 | name: 34 | custom_filter: 35 | private_ip: 36 | register: result 37 | -------------------------------------------------------------------------------- /examples/foundation/get_images_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # pull hypervisor and nos packages info from FVM 3 | - name: Get hypervisor and nos packages info from FVM 4 | hosts: localhost 5 | gather_facts: false 6 | tasks: 7 | - name: Get hypervisor images info from foundation 8 | nutanix.ncp.ntnx_foundation_hypervisor_images_info: 9 | nutanix_host: 10.xx.xx.xx 10 | register: hyp 11 | 12 | - name: Get aos images info from foundation 13 | nutanix.ncp.ntnx_foundation_aos_packages_info: 14 | nutanix_host: 10.xx.xx.xx 15 | register: nos 16 | 17 | - name: Print available hypervisor image details 18 | ansible.builtin.debug: 19 | msg: "{{ hyp }}" 20 | - name: Print available NOS image details 21 | ansible.builtin.debug: 22 | msg: "{{ nos }}" 23 | -------------------------------------------------------------------------------- /examples/foundation/image_upload.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Here this will upload image from local machine (where this script runs) to the FVM 3 | - name: Upload images 4 | hosts: localhost 5 | gather_facts: false 6 | tasks: 7 | - name: Image upload 8 | # check_mode: yes 9 | nutanix.ncp.ntnx_foundation_image_upload: 10 | nutanix_host: 10.xx.xx.xx 11 | # change state to "absent" to delete this image. For delete, source is not required 12 | state: present 13 | source: 14 | filename: 15 | # value of installer_type must be one of: kvm, esx, hyperv, xen or nos 16 | installer_type: kvm 17 | timeout: 1800 18 | register: upload_result 19 | 20 | - name: Print upload result 21 | ansible.builtin.debug: 22 | msg: "{{ upload_result }}" 23 | -------------------------------------------------------------------------------- /examples/foundation/ipmi_config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Here we will configure IPMI of one node 3 | - name: Configure IPMI 4 | hosts: localhost 5 | gather_facts: false 6 | tasks: 7 | - name: Configure ipmi 8 | # check_mode: yes 9 | nutanix.ncp.ntnx_foundation_bmc_ipmi_config: 10 | nutanix_host: 10.xx.xx.xx 11 | ipmi_user: 12 | ipmi_password: 13 | ipmi_netmask: xx.xx.xx.xx 14 | ipmi_gateway: 10.xx.xx.xx 15 | blocks: 16 | - nodes: 17 | - ipmi_mac: xx:xx:xx:xx:xx:xx 18 | ipmi_ip: 10.xx.xx.xx 19 | register: output 20 | 21 | - name: Print output 22 | ansible.builtin.debug: 23 | msg: "{{ output }}" 24 | -------------------------------------------------------------------------------- /examples/foundation/node_discovery_network_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Here we will discover nodes and also get node network info of particular some discovered nodes 3 | - name: Discover nodes and get their network info 4 | hosts: localhost 5 | gather_facts: false 6 | tasks: 7 | - name: Discover all nodes 8 | nutanix.ncp.ntnx_foundation_discover_nodes_info: 9 | nutanix_host: 10.xx.xx.xx 10 | # unskip line 12 to include configured(nodes part of cluster) nodes in the output 11 | # include_configured: true 12 | register: discovered_nodes 13 | 14 | # get network info of nodes discovered from ntnx_foundation_discover_nodes_info module 15 | - name: Get node network info of some discovered nodes 16 | nutanix.ncp.ntnx_foundation_node_network_info: 17 | nutanix_host: 10.xx.xx.xx 18 | nodes: 19 | - "{{discovered_nodes.blocks.0.nodes.0.ipv6_address}}" 20 | - "{{discovered_nodes.blocks.1.nodes.0.ipv6_address}}" 21 | register: result 22 | 23 | - name: Print node network info 24 | ansible.builtin.debug: 25 | msg: "{{ result }}" 26 | -------------------------------------------------------------------------------- /examples/hosts_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Hosts_Info playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: Test getting all hosts 14 | nutanix.ncp.ntnx_hosts_info: 15 | register: hosts_list 16 | 17 | - name: Test getting particular host using uuid 18 | nutanix.ncp.ntnx_hosts_info: 19 | host_uuid: "{{ hosts_list.response.entities[0].metadata.uuid }}" 20 | register: result 21 | 22 | - name: List hosts using length, offset, sort order and name sort attribute 23 | nutanix.ncp.ntnx_hosts_info: 24 | length: 2 25 | offset: 0 26 | sort_order: "ASCENDING" 27 | sort_attribute: "name" 28 | register: result 29 | ignore_errors: true 30 | 31 | - name: List hosts using filter and custom_filter 32 | nutanix.ncp.ntnx_hosts_info: 33 | filter: 34 | name: 35 | custom_filter: 36 | serial_number: 37 | register: result 38 | -------------------------------------------------------------------------------- /examples/iaas/iaas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: IaaS Provisioning 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | tasks: 12 | - name: Include vars file 13 | ansible.builtin.include_vars: 14 | file: vars.yml 15 | - name: Include external_subnet role 16 | ansible.builtin.include_role: 17 | name: external_subnet 18 | - name: Include vpc role 19 | ansible.builtin.include_role: 20 | name: vpc 21 | - name: Include static_route role 22 | ansible.builtin.include_role: 23 | name: static_route 24 | - name: Include overlay_subnet role 25 | ansible.builtin.include_role: 26 | name: overlay_subnet 27 | - name: Include vm role 28 | ansible.builtin.include_role: 29 | name: vm 30 | - name: Include fip role 31 | ansible.builtin.include_role: 32 | name: fip 33 | -------------------------------------------------------------------------------- /examples/iaas/policies_create.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Policy based routing - NACLs 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | tasks: 12 | - name: Include vars file 13 | ansible.builtin.include_vars: 14 | file: vars.yml 15 | - name: Include pbr role 16 | ansible.builtin.include_role: 17 | name: pbr 18 | -------------------------------------------------------------------------------- /examples/iaas/policies_delete.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Policy based routing - NACLs 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | tasks: 12 | - name: Include pbr role 13 | ansible.builtin.include_role: 14 | name: pbr_delete 15 | -------------------------------------------------------------------------------- /examples/iaas/roles/external_subnet/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - nutanix.ncp 4 | -------------------------------------------------------------------------------- /examples/iaas/roles/external_subnet/tasks/external_subnet.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start external subnet task 3 | ansible.builtin.debug: 4 | msg: Create {{ item.name }} external subnet 5 | 6 | - name: Create external subnet 7 | nutanix.ncp.ntnx_subnets: 8 | state: present 9 | name: "{{ item.name }}" 10 | external_subnet: 11 | vlan_id: "{{ item.vlan_id }}" 12 | cluster: 13 | name: "{{ cluster.name }}" 14 | enable_nat: "{{ item.eNat }}" 15 | ipam: 16 | network_ip: "{{ item.ip }}" 17 | network_prefix: "{{ item.prefix }}" 18 | gateway_ip: "{{ item.gip }}" 19 | ip_pools: 20 | - start_ip: "{{ item.sip }}" 21 | end_ip: "{{ item.eip }}" 22 | register: external_network 23 | - name: Print external subnet name and uuid 24 | ansible.builtin.debug: 25 | msg: 26 | - "name: Ext_Nat" 27 | - "uuid: {{ external_network.subnet_uuid }}" 28 | -------------------------------------------------------------------------------- /examples/iaas/roles/external_subnet/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Inputs for external subnets task 3 | ansible.builtin.include_tasks: external_subnet.yml 4 | with_items: 5 | - name: "{{ external_subnet.name }}" 6 | vlan_id: "{{ external_subnet.vlan_id }}" 7 | ip: "{{ external_subnet.ip }}" 8 | prefix: "{{ external_subnet.prefix }}" 9 | gip: "{{ external_subnet.gip }}" 10 | sip: "{{ external_subnet.sip }}" 11 | eip: "{{ external_subnet.eip }}" 12 | eNat: "{{ external_subnet.eNat }}" 13 | -------------------------------------------------------------------------------- /examples/iaas/roles/fip/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - nutanix.ncp 4 | -------------------------------------------------------------------------------- /examples/iaas/roles/fip/tasks/fip.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Assign Floating IP for "{{ item.vm_name }}" 3 | nutanix.ncp.ntnx_floating_ips: 4 | state: present 5 | external_subnet: 6 | name: Ext-Nat 7 | vm: 8 | name: "{{ item.vm_name }}" 9 | register: fip 10 | - name: Print fip uuid and vm name 11 | ansible.builtin.debug: 12 | msg: 13 | - "VM name: {{ item.vm_name }}" 14 | - "uuid: {{ fip.fip_uuid }}" 15 | -------------------------------------------------------------------------------- /examples/iaas/roles/fip/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Inputs for Floating IP task 3 | ansible.builtin.include_tasks: fip.yml 4 | with_items: 5 | - { vm_name: Prod-Wordpress-App } 6 | - { vm_name: Dev-Wordpress-App } 7 | -------------------------------------------------------------------------------- /examples/iaas/roles/overlay_subnet/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - nutanix.ncp 4 | -------------------------------------------------------------------------------- /examples/iaas/roles/overlay_subnet/tasks/overlay_subnet.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start overlay subnet task 3 | ansible.builtin.debug: 4 | msg: Create {{ item.name }} overlay subnet 5 | 6 | - name: Create overlay subnet 7 | nutanix.ncp.ntnx_subnets: 8 | state: present 9 | name: "{{ item.name }}" 10 | overlay_subnet: 11 | vpc: 12 | name: "{{ item.vpc_name }}" 13 | ipam: 14 | network_ip: "{{ item.nip }}" 15 | network_prefix: "{{ item.prefix }}" 16 | gateway_ip: "{{ item.gip }}" 17 | ip_pools: 18 | - start_ip: "{{ item.sip }}" 19 | end_ip: "{{ item.eip }}" 20 | dhcp: 21 | dns_servers: "{{ item.dns_servers }}" 22 | domain_name: "{{ item.domain_name }}" 23 | domain_search: "{{ item.domain_search }}" 24 | register: overlay 25 | - name: Print overlay name and uuid 26 | ansible.builtin.debug: 27 | msg: 28 | - "name: {{ overlay.response.status.name }}" 29 | - "uuid: {{ overlay.subnet_uuid }}" 30 | -------------------------------------------------------------------------------- /examples/iaas/roles/pbr/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - nutanix.ncp 4 | -------------------------------------------------------------------------------- /examples/iaas/roles/pbr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Include PBR task 3 | ansible.builtin.include_tasks: pbr.yml 4 | with_items: 5 | - { vpc_name: "{{ vpc_names[0] }}", priority: 101, nip: 10.1.2.0, prefix: 24 } 6 | - { vpc_name: "{{ vpc_names[1] }}", priority: 101, nip: 10.1.2.0, prefix: 24 } 7 | -------------------------------------------------------------------------------- /examples/iaas/roles/pbr/tasks/pbr.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create PBR for vpc "{{ item.vpc_name }}" 3 | nutanix.ncp.ntnx_pbrs: 4 | state: present 5 | vpc: 6 | name: "{{ item.vpc_name }}" 7 | priority: "{{ item.priority }}" 8 | source: 9 | network: 10 | ip: "{{ item.nip }}" 11 | prefix: "{{ item.prefix }}" 12 | destination: 13 | external: true 14 | protocol: 15 | any: true 16 | action: 17 | deny: true 18 | register: pbr 19 | - name: Print vpc name and pbr uuid 20 | ansible.builtin.debug: 21 | msg: 22 | - "vpc_name: {{ item.vpc_name }}" 23 | - "uuid: {{ pbr.pbr_uuid }}" 24 | -------------------------------------------------------------------------------- /examples/iaas/roles/pbr_delete/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - nutanix.ncp 4 | -------------------------------------------------------------------------------- /examples/iaas/roles/pbr_delete/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Include PBR task 3 | ansible.builtin.include_tasks: pbr_delete.yml 4 | with_items: 5 | - { pbr_uuid: 8c6ce427-a63d-482d-bf59-b8a14a062c1d } 6 | - { pbr_uuid: fb6fb539-7b24-48a1-b285-9a1fb8b97e5f } 7 | -------------------------------------------------------------------------------- /examples/iaas/roles/pbr_delete/tasks/pbr_delete.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Delete PBR "{{ item.pbr_uuid }}" 3 | nutanix.ncp.nutanix.ncp.ntnx_pbrs: 4 | state: absent 5 | pbr_uuid: "{{ item.pbr_uuid }}" 6 | register: pbr 7 | - name: Print pbr uuid 8 | ansible.builtin.debug: 9 | msg: 10 | - "uuid: {{ pbr.pbr_uuid }}" 11 | -------------------------------------------------------------------------------- /examples/iaas/roles/static_route/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - nutanix.ncp 4 | -------------------------------------------------------------------------------- /examples/iaas/roles/static_route/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Inputs for static routes task 3 | ansible.builtin.include_tasks: static_route.yml 4 | with_items: 5 | - { vpc_uuid: "{{ vpc_uuids[0] }}", subnet_name: "{{ external_subnet.name }}", destination: 10.2.2.0/24 } 6 | - { vpc_uuid: "{{ vpc_uuids[1] }}", subnet_name: "{{ external_subnet.name }}", destination: 10.2.3.0/24 } 7 | -------------------------------------------------------------------------------- /examples/iaas/roles/static_route/tasks/static_route.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create static route 3 | nutanix.ncp.ntnx_static_routes: 4 | state: present 5 | vpc_uuid: "{{ item.vpc_uuid }}" 6 | static_routes: 7 | - destination: "{{ item.destination }}" 8 | next_hop: 9 | external_subnet_ref: 10 | name: "{{ item.subnet_name }}" 11 | register: static_route 12 | - name: Print static route uuid 13 | ansible.builtin.debug: 14 | msg: 15 | - "uuid: {{ static_route.response.metadata.uuid }}" 16 | -------------------------------------------------------------------------------- /examples/iaas/roles/vm/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - nutanix.ncp 4 | -------------------------------------------------------------------------------- /examples/iaas/roles/vm/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Inputs for vm task 3 | ansible.builtin.include_tasks: vm.yml 4 | with_items: 5 | - name: Prod-Wordpress-App 6 | desc: Prod-Wordpress-App 7 | is_connected: true 8 | subnet_name: "{{ Prod_SubnetA.name }}" 9 | image_name: wordpress-appserver 10 | private_ip: "" 11 | - name: Prod-Wordpress-DB 12 | desc: Prod-Wordpress-DB 13 | is_connected: true 14 | subnet_name: "{{ Prod_SubnetB.name }}" 15 | image_name: wordpress-db 16 | private_ip: 10.1.2.5 17 | - name: Dev-Wordpress-App 18 | desc: Dev-Wordpress-App 19 | is_connected: true 20 | subnet_name: "{{ Dev_SubnetA.name }}" 21 | image_name: wordpress-appserver 22 | private_ip: "" 23 | - name: Dev-Wordpress-DB 24 | desc: Dev-Wordpress-DB 25 | is_connected: true 26 | subnet_name: "{{ Dev_SubnetB.name }}" 27 | image_name: wordpress-db 28 | private_ip: 10.1.2.5 29 | -------------------------------------------------------------------------------- /examples/iaas/roles/vm/tasks/vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start vm task 3 | ansible.builtin.debug: 4 | msg: Create "{{ item.name }}" VM 5 | 6 | - name: Create VM 7 | nutanix.ncp.ntnx_vms: 8 | state: present 9 | name: "{{ item.name }}" 10 | desc: "{{ item.desc }}" 11 | cluster: 12 | name: "{{ cluster.name }}" 13 | networks: 14 | - is_connected: "{{ item.is_connected }}" 15 | subnet: 16 | name: "{{ item.subnet_name }}" 17 | private_ip: "{{ item.private_ip }}" 18 | disks: 19 | - type: DISK 20 | size_gb: 30 21 | bus: SATA 22 | clone_image: 23 | name: "{{ item.image_name }}" 24 | register: vm 25 | - name: Print vm name and uuid 26 | ansible.builtin.debug: 27 | msg: 28 | - "name: {{ vm.response.status.name }}" 29 | - "uuid: {{ vm.vm_uuid }}" 30 | -------------------------------------------------------------------------------- /examples/iaas/roles/vpc/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - nutanix.ncp 4 | -------------------------------------------------------------------------------- /examples/iaas/roles/vpc/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Define vpc_uuids variable 3 | ansible.builtin.set_fact: 4 | vpc_uuids: [] 5 | - name: Inputs vpcs task 6 | ansible.builtin.include_tasks: vpc.yml 7 | with_items: 8 | - { name: "{{ vpc_names[0] }}", subnet_name: "{{ external_subnet.name }}" } 9 | - { name: "{{ vpc_names[1] }}", subnet_name: "{{ external_subnet.name }}" } 10 | -------------------------------------------------------------------------------- /examples/iaas/roles/vpc/tasks/vpc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start vpc task 3 | ansible.builtin.debug: 4 | msg: Create {{ item.name }} VPC with external connectivity to "{{ item.subnet_name }}" 5 | 6 | - name: Create VPC with external connectivity 7 | nutanix.ncp.ntnx_vpcs: 8 | state: present 9 | name: "{{ item.name }}" 10 | external_subnets: 11 | - subnet_name: "{{ item.subnet_name }}" 12 | register: vpc 13 | - name: Print vpc response 14 | ansible.builtin.debug: 15 | msg: 16 | - "name: {{ vpc.response.status.name }}" 17 | - "uuid: {{ vpc.vpc_uuid }}" 18 | - name: Define vpc_uuids variable 19 | ansible.builtin.set_fact: 20 | vpc_uuids: "{{ vpc_uuids + [vpc.vpc_uuid] }}" 21 | -------------------------------------------------------------------------------- /examples/iaas/vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | cluster: 3 | name: auto_cluster_prod_f34ce3677ecf 4 | external_subnet: 5 | name: Ext-Nat 6 | vlan_id: 102 7 | ip: 10.44.3.192 8 | prefix: 27 9 | gip: 10.44.3.193 10 | sip: 10.44.3.198 11 | eip: 10.44.3.207 12 | eNat: true 13 | vpc_names: [Prod, Dev] 14 | domain_search: [calm.nutanix.com, eng.nutanix.com] 15 | dns_servers: [8.8.8.8, 8.8.8.4] 16 | domain_name: calm.nutanix.com 17 | Prod_SubnetA: 18 | name: Prod_SubnetA 19 | vpc_name: Prod 20 | nip: 10.1.1.0 21 | prefix: 24 22 | gip: 10.1.1.1 23 | sip: 10.1.1.2 24 | eip: 10.1.1.5 25 | Prod_SubnetB: 26 | name: Prod_SubnetB 27 | vpc_name: Prod 28 | nip: 10.1.2.0 29 | prefix: 24 30 | gip: 10.1.2.1 31 | sip: 10.1.2.2 32 | eip: 10.1.2.5 33 | Dev_SubnetA: 34 | name: Dev_SubnetA 35 | vpc_name: Dev 36 | nip: 10.1.1.0 37 | prefix: 24 38 | gip: 10.1.1.1 39 | sip: 10.1.1.2 40 | eip: 10.1.1.5 41 | 42 | Dev_SubnetB: 43 | name: Dev_SubnetB 44 | vpc_name: Dev 45 | nip: 10.1.2.0 46 | prefix: 24 47 | gip: 10.1.2.1 48 | sip: 10.1.2.2 49 | eip: 10.1.2.5 50 | -------------------------------------------------------------------------------- /examples/inventory/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | inventory = nutanix.yaml 3 | 4 | [inventory] 5 | enable_plugins = nutanix.ncp.ntnx_prism_vm_inventory 6 | -------------------------------------------------------------------------------- /examples/inventory/nutanix.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | plugin: nutanix.ncp.ntnx_prism_vm_inventory 3 | nutanix_hostname: 4 | nutanix_username: 5 | nutanix_password: 6 | validate_certs: false 7 | data: { offset: 0, length: 1000 } 8 | groups: 9 | group_1: "'' in name" 10 | group_2: "''==name" 11 | keyed_groups: 12 | - prefix: host 13 | separator: ":" 14 | key: ansible_host 15 | -------------------------------------------------------------------------------- /examples/karbon/cluster_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Get k8s cluster info 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: Set cluster name 14 | ansible.builtin.set_fact: 15 | cluster_name: 16 | 17 | - name: Test getting cluster using name 18 | nutanix.ncp.ntnx_karbon_clusters_info: 19 | cluster_name: "{{ cluster_name }}" 20 | register: result 21 | 22 | - name: Test getting cluster with ssh config using cluster name 23 | nutanix.ncp.ntnx_karbon_clusters_info: 24 | cluster_name: "{{ cluster_name }}" 25 | fetch_ssh_credentials: true 26 | register: result 27 | 28 | - name: Test getting cluster with kubeconfig config using cluster name 29 | nutanix.ncp.ntnx_karbon_clusters_info: 30 | cluster_name: "{{ cluster_name }}" 31 | fetch_kubeconfig: true 32 | register: result 33 | -------------------------------------------------------------------------------- /examples/karbon/registries_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Get registeries info 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: Test getting all registries 14 | nutanix.ncp.ntnx_karbon_registries_info: 15 | register: registries 16 | 17 | - name: Test getting particular register using name 18 | nutanix.ncp.ntnx_karbon_registries_info: 19 | registry_name: "{{ registries.response[1].name }}" 20 | register: result 21 | -------------------------------------------------------------------------------- /examples/local_user_create_vm/README.md: -------------------------------------------------------------------------------- 1 | ## Playbook description 2 | Below is the flow for playbooks: 3 | 1. Upload image from local to PC. 4 | 2. Create category key-value pair. 5 | 3. Create local user. 6 | 4. Create authorization policy. 7 | 5. Create VM using local user, with image uploaded and guest customization. 8 | 6. Power ON the VM. 9 | 10 | Tested with: 11 | - Nutanix ansible provider: v2.0 12 | - Prism Central: v2024.3 13 | 14 | Sequence to run: 15 | 1. Run with user having required permissions: create_local_user_and_entities.yml 16 | 2. Check and update cloud_init.yml 17 | 3. Run with user created in step 1: create_vm_using_local_user.yml 18 | -------------------------------------------------------------------------------- /examples/local_user_create_vm/cloud_init.yml: -------------------------------------------------------------------------------- 1 | # cloud-config 2 | chpasswd: 3 | list: | 4 | : 5 | expire: false 6 | ssh_pwauth: true 7 | -------------------------------------------------------------------------------- /examples/ndb/create_stretched_vlan.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create stretched vlan 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: Create stretched vlan 14 | nutanix.ncp.ntnx_ndb_stretched_vlans: 15 | name: "{{ st_vlan.name }}" 16 | desc: "{{ st_vlan.desc }}" 17 | vlans: 18 | - 19 | - 20 | register: output 21 | 22 | - name: Print output 23 | ansible.builtin.debug: 24 | msg: "{{ output }}" 25 | -------------------------------------------------------------------------------- /examples/ndb/create_time_machine_cluster.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: NDB time machine's cluster creation 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: NDB time machine's cluster creation 14 | nutanix.ncp.ntnx_ndb_time_machine_clusters: 15 | time_machine_uuid: "{{ time_machine.uuid }}" 16 | cluster: 17 | name: "{{ cluster.name }}" 18 | sla: 19 | name: "{{ sla.name }}" 20 | type: "{{ type }}" 21 | register: output 22 | 23 | - name: Print output 24 | ansible.builtin.debug: 25 | msg: "{{ output }}" 26 | -------------------------------------------------------------------------------- /examples/ndb/ndb_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/examples/ndb/ndb_workflow.png -------------------------------------------------------------------------------- /examples/ndb/refresh_clone.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create Refresh clone 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: Set vars 14 | ansible.builtin.set_fact: 15 | clone_db: 16 | uuid: 17 | snapshot: 18 | uuid: 19 | 20 | - name: Create spec for refresh clone to a pitr timestamp 21 | check_mode: true 22 | nutanix.ncp.ntnx_ndb_database_clone_refresh: 23 | uuid: "{{ clone_db.uuid }}" 24 | pitr_timestamp: "2023-02-04 07:29:36" 25 | timezone: UTC 26 | register: output 27 | 28 | - name: Print output 29 | ansible.builtin.debug: 30 | msg: "{{ output }}" 31 | 32 | - name: Refresh db clone 33 | nutanix.ncp.ntnx_ndb_database_clone_refresh: 34 | uuid: "{{ clone_db.uuid }}" 35 | snapshot_uuid: "{{ snapshot.uuid }}" 36 | register: output 37 | 38 | - name: Print output 39 | ansible.builtin.debug: 40 | msg: "{{ output }}" 41 | -------------------------------------------------------------------------------- /examples/ndb/soft_delete_database_instance.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Soft delete single instance database and time machine associated 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: Soft delete single instance database and time machine associated 14 | nutanix.ncp.ntnx_ndb_databases: 15 | state: absent 16 | db_uuid: c0a4433a-49f2-40f3-ae52-d88788d2824b 17 | soft_delete: true 18 | delete_time_machine: true 19 | register: output 20 | 21 | - name: Print output 22 | ansible.builtin.debug: 23 | msg: "{{ output }}" 24 | -------------------------------------------------------------------------------- /examples/pbr.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: PBR playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | tasks: 12 | - name: Setting Variables 13 | ansible.builtin.set_fact: 14 | cluster_name: "" 15 | cluster_uuid: "" 16 | priority: "" 17 | vpc_uuid: "" 18 | 19 | - name: Create PBR with vpc uuid with any source or destination or protocol with deny action 20 | nutanix.ncp.ntnx_pbrs: 21 | state: present 22 | priority: "{{ priority }}" 23 | vpc: 24 | uuid: "{{ vpc_uuid }}" 25 | source: 26 | any: true 27 | destination: 28 | any: true 29 | action: 30 | deny: true 31 | protocol: 32 | any: true 33 | register: result 34 | - name: Delete pbrs 35 | nutanix.ncp.ntnx_pbrs: 36 | state: absent 37 | pbr_uuid: "{{ result.pbr_uuid }}" 38 | -------------------------------------------------------------------------------- /examples/pbr_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: PBR_Info playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: List pbrs using length and offset 14 | nutanix.ncp.ntnx_pbrs_info: 15 | length: 1 16 | offset: 0 17 | register: result 18 | ignore_errors: true 19 | 20 | - name: List pbrs using ascending priority sorting 21 | nutanix.ncp.ntnx_pbrs_info: 22 | sort_order: "ASCENDING" 23 | sort_attribute: "priority" 24 | register: result 25 | ignore_errors: true 26 | -------------------------------------------------------------------------------- /examples/permissions_info.yml: -------------------------------------------------------------------------------- 1 | ########## Permissions Info Module Examples ################################ 2 | - name: PC permissions 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: "" 8 | nutanix_username: "" 9 | nutanix_password: "" 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: Get all permissions 14 | nutanix.ncp.ntnx_permissions_info: 15 | register: op1 16 | 17 | - name: Get permissions using filter 18 | nutanix.ncp.ntnx_permissions_info: 19 | filter: 20 | name: 21 | register: op2 22 | 23 | - name: Get permission using uuid 24 | nutanix.ncp.ntnx_permissions_info: 25 | permission_uuid: 26 | register: op3 27 | 28 | - name: Output 29 | ansible.builtin.debug: 30 | msg: "{{ op3 }}" 31 | -------------------------------------------------------------------------------- /examples/subnet_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Subnet_Info playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | 12 | tasks: 13 | - name: List subnets using subnet_type filter criteria 14 | nutanix.ncp.ntnx_subnets_info: 15 | filter: 16 | subnet_type: "VLAN" 17 | kind: subnet 18 | register: result 19 | ignore_errors: true 20 | 21 | - name: List subnets using length, offset and vlan_id ascending sorting 22 | nutanix.ncp.ntnx_subnets_info: 23 | length: 1 24 | offset: 2 25 | sort_order: "ASCENDING" 26 | sort_attribute: "vlan_id" 27 | check_mode: true 28 | register: result 29 | ignore_errors: true 30 | 31 | - name: List subnets filter and custom_filter 32 | nutanix.ncp.ntnx_subnets_info: 33 | filter: 34 | name: 35 | custom_filter: 36 | adapter_type: 37 | vswitch_name: 38 | register: result 39 | -------------------------------------------------------------------------------- /examples/vmm_v2/vms_clone_v2.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Summary: 3 | # This playbook will do: 4 | # 1. Clone VM with same attributes values 5 | # 2. Clone VM with different attributes values 6 | 7 | - name: VM clone playbook 8 | hosts: localhost 9 | gather_facts: false 10 | module_defaults: 11 | group/nutanix.ncp.ntnx: 12 | nutanix_host: 13 | nutanix_username: 14 | nutanix_password: 15 | validate_certs: false 16 | tasks: 17 | - name: Setting Variables 18 | ansible.builtin.set_fact: 19 | vm_uuid: "a990cfaa-95a8-4861-bdf6-14060555442d" 20 | 21 | - name: Clone VM with same attributes values 22 | nutanix.ncp.ntnx_vms_clone_v2: 23 | ext_id: "{{ vm_uuid }}" 24 | name: "integration_test_vm_clone1" 25 | register: result 26 | ignore_errors: true 27 | 28 | - name: Clone VM with different attributes values 29 | nutanix.ncp.ntnx_vms_clone_v2: 30 | ext_id: "{{ vm_uuid }}" 31 | name: "integration_test_vm_clone2" 32 | num_sockets: 2 33 | num_cores_per_socket: 2 34 | num_threads_per_core: 2 35 | register: result 36 | ignore_errors: true 37 | -------------------------------------------------------------------------------- /examples/vmm_v2/vms_stage_guest_customization_v2.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Summary: 3 | # This playbook will update guest customization script for a VM 4 | 5 | - name: VM guest guest customization playbook 6 | hosts: localhost 7 | gather_facts: false 8 | module_defaults: 9 | group/nutanix.ncp.ntnx: 10 | nutanix_host: 11 | nutanix_username: 12 | nutanix_password: 13 | validate_certs: false 14 | tasks: 15 | - name: Setting Variables 16 | ansible.builtin.set_fact: 17 | vm_uuid: "323e4567-e89b-12d3-a456-426614174001" 18 | 19 | - name: Update guest script 20 | nutanix.ncp.ntnx_vms_stage_guest_customization_v2: 21 | ext_id: "{{ vm_uuid }}" 22 | config: 23 | cloudinit: 24 | datasource_type: CONFIG_DRIVE_V2 25 | cloud_init_script: 26 | user_data: 27 | value: I2Nsb3VkLWNvbmZpZwpkaXNhYmxlX3Jvb3Q6IGZhbHNlCnNzaF9wd2F1dGg6ICAgdHJ1ZQ== 28 | register: result 29 | -------------------------------------------------------------------------------- /examples/vpc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: VPC playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | tasks: 12 | - name: Setting Variables 13 | ansible.builtin.set_fact: 14 | external_subnet_name: "" 15 | vm_name: "" 16 | 17 | - name: Create min VPC with subnet name 18 | nutanix.ncp.ntnx_vpcs: 19 | state: present 20 | wait: true 21 | name: MinVPC 22 | external_subnets: 23 | - subnet_name: "{{ external_subnet.name }}" 24 | register: result 25 | 26 | - name: Delete all created vpcs 27 | nutanix.ncp.ntnx_vpcs: 28 | state: absent 29 | vpc_uuid: "{{ result.vpc_uuid }}" 30 | register: result 31 | -------------------------------------------------------------------------------- /examples/vpc_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: VPC_Info playbook 3 | hosts: localhost 4 | gather_facts: false 5 | module_defaults: 6 | group/nutanix.ncp.ntnx: 7 | nutanix_host: 8 | nutanix_username: 9 | nutanix_password: 10 | validate_certs: false 11 | tasks: 12 | - name: Setting Variables 13 | ansible.builtin.set_fact: 14 | vpc_name: "" 15 | 16 | - name: List VPC using name filter criteria 17 | nutanix.ncp.ntnx_vpcs_info: 18 | filter: 19 | name: "{{ vpc_name }}" 20 | kind: vpc 21 | register: result 22 | ignore_errors: true 23 | 24 | - name: List VPC using length, offset and descending name sorting 25 | nutanix.ncp.ntnx_vpcs_info: 26 | length: 4 27 | offset: 1 28 | sort_order: "DESCENDING" 29 | sort_attribute: "name" 30 | check_mode: true 31 | register: result 32 | ignore_errors: true 33 | -------------------------------------------------------------------------------- /galaxy.yml: -------------------------------------------------------------------------------- 1 | namespace: "nutanix" 2 | name: "ncp" 3 | version: "2.1.1" 4 | readme: "README.md" 5 | authors: 6 | - "Abhishek Chaudhary (@abhimutant)" 7 | - "Pradeepsingh Bhati (@bhati-pradeep)" 8 | - "Prem Karat (@premkarat)" 9 | - "Gevorg Khachatryan (@Gevorg-Khachatryan-97)" 10 | - "Alaa Bishtawi (@alaa-bish)" 11 | - "Abhinav Bansal (@abhinavbansal29)" 12 | - "George Ghawali (@george-ghawali)" 13 | description: Nutanix Ansible Collection 14 | license_file: "LICENSE" 15 | tags: [nutanix, prism, ahv, cloud, infrastructure] 16 | repository: https://github.com/nutanix/nutanix.ansible 17 | documentation: https://galaxy.ansible.com/ui/repo/published/nutanix/ncp/ 18 | homepage: https://nutanix.github.io/nutanix.ansible/ 19 | issues: https://github.com/nutanix/nutanix.ansible/issues 20 | build_ignore: [] 21 | -------------------------------------------------------------------------------- /plugins/README.md: -------------------------------------------------------------------------------- 1 | # Collections Plugins Directory 2 | 3 | This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that 4 | is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that 5 | would contain module utils and modules respectively. 6 | 7 | Here is an example directory of the majority of plugins currently supported by Ansible: 8 | 9 | ``` 10 | └── plugins 11 | ├── action 12 | ├── become 13 | ├── cache 14 | ├── callback 15 | ├── cliconf 16 | ├── connection 17 | ├── filter 18 | ├── httpapi 19 | ├── inventory 20 | ├── lookup 21 | ├── module_utils 22 | ├── modules 23 | ├── netconf 24 | ├── shell 25 | ├── strategy 26 | ├── terminal 27 | ├── test 28 | └── vars 29 | ``` 30 | 31 | A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible-core/devel/plugins/plugins.html). 32 | -------------------------------------------------------------------------------- /plugins/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/plugins/__init__.py -------------------------------------------------------------------------------- /plugins/doc_fragments/ntnx_foundation_base_module.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright: (c) 2017, Ansible Project 4 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 5 | 6 | from __future__ import absolute_import, division, print_function 7 | 8 | __metaclass__ = type 9 | 10 | 11 | class ModuleDocFragment(object): 12 | 13 | # Plugin options for ntnx Foundation 14 | DOCUMENTATION = r""" 15 | options: 16 | nutanix_host: 17 | description: 18 | - Foundation VM hostname or IP address 19 | type: str 20 | required: true 21 | nutanix_port: 22 | description: 23 | - PC port 24 | type: str 25 | default: "8000" 26 | required: false 27 | timeout: 28 | description: 29 | - timeout for polling imaging nodes & cluster creation process in seconds 30 | type: int 31 | required: false 32 | default: 60 33 | """ 34 | -------------------------------------------------------------------------------- /plugins/doc_fragments/ntnx_info_v2.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright: (c) 2017, Ansible Project 4 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 5 | 6 | from __future__ import absolute_import, division, print_function 7 | 8 | __metaclass__ = type 9 | 10 | 11 | class ModuleDocFragment(object): 12 | 13 | # Plugin options for ntnx files info 14 | DOCUMENTATION = r""" 15 | options: 16 | filter: 17 | description: 18 | - The filter in OData syntax used for the results 19 | type: str 20 | page: 21 | description: 22 | - The number of page 23 | type: int 24 | limit: 25 | description: 26 | - The number of records 27 | type: int 28 | orderby: 29 | description: 30 | - The sort order in which results are returned 31 | type: str 32 | select: 33 | description: 34 | - The attribute name to select 35 | type: str 36 | """ 37 | -------------------------------------------------------------------------------- /plugins/doc_fragments/ntnx_operations.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright: (c) 2017, Ansible Project 4 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 5 | 6 | from __future__ import absolute_import, division, print_function 7 | 8 | __metaclass__ = type 9 | 10 | 11 | class ModuleDocFragment(object): 12 | 13 | # Plugin options for ntnx CRUD operations 14 | DOCUMENTATION = r""" 15 | options: 16 | state: 17 | description: 18 | - Specify state 19 | - If C(state) is set to C(present) then the operation will be create the item 20 | - >- 21 | If C(state) is set to C(absent) and if the item exists, then 22 | item is removed. 23 | choices: 24 | - present 25 | - absent 26 | type: str 27 | default: present 28 | wait: 29 | description: Wait for the CRUD operation to complete. 30 | type: bool 31 | required: false 32 | default: True 33 | """ 34 | -------------------------------------------------------------------------------- /plugins/doc_fragments/ntnx_operations_v2.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright: (c) 2017, Ansible Project 4 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 5 | 6 | from __future__ import absolute_import, division, print_function 7 | 8 | __metaclass__ = type 9 | 10 | 11 | class ModuleDocFragment(object): 12 | 13 | # Plugin options for ntnx files CRUD operations 14 | DOCUMENTATION = r""" 15 | options: 16 | state: 17 | description: 18 | - Specify state 19 | - If C(state) is set to C(present) then the operation will be create the item 20 | - >- 21 | If C(state) is set to C(absent) and if the item exists, then 22 | item is removed. 23 | choices: 24 | - present 25 | - absent 26 | type: str 27 | default: present 28 | wait: 29 | description: Wait for the CRUD operation to complete. 30 | type: bool 31 | required: false 32 | default: True 33 | """ 34 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/plugins/module_utils/v3/__init__.py -------------------------------------------------------------------------------- /plugins/module_utils/v3/fc/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/plugins/module_utils/v3/fc/__init__.py -------------------------------------------------------------------------------- /plugins/module_utils/v3/fc/api_keys.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, print_function 2 | 3 | from copy import deepcopy 4 | 5 | from .fc import FoundationCentral 6 | 7 | __metaclass__ = type 8 | 9 | 10 | class ApiKey(FoundationCentral): 11 | entity_type = "api_keys" 12 | 13 | def __init__(self, module): 14 | resource_type = "/api_keys" 15 | super(ApiKey, self).__init__(module, resource_type=resource_type) 16 | self.build_spec_methods = {"alias": self._build_spec_alias} 17 | 18 | def _get_default_spec(self): 19 | return deepcopy({"alias": None}) 20 | 21 | def _build_spec_alias(self, payload, alias): 22 | payload["alias"] = alias 23 | return payload, None 24 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/fc/fc.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, print_function 2 | 3 | from ..entity import Entity 4 | 5 | __metaclass__ = type 6 | 7 | 8 | class FoundationCentral(Entity): 9 | __BASEURL__ = "/api/fc/v1" 10 | 11 | def __init__(self, module, resource_type): 12 | resource_type = self.__BASEURL__ + resource_type 13 | super(FoundationCentral, self).__init__(module, resource_type) 14 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/foundation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/plugins/module_utils/v3/foundation/__init__.py -------------------------------------------------------------------------------- /plugins/module_utils/v3/foundation/enumerate_aos_packages.py: -------------------------------------------------------------------------------- 1 | # This file is part of Ansible 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | from __future__ import absolute_import, division, print_function 4 | 5 | from .foundation import Foundation 6 | 7 | __metaclass__ = type 8 | 9 | 10 | class EnumerateAOSPackages(Foundation): 11 | def __init__(self, module): 12 | resource_type = "/enumerate_nos_packages" 13 | super(EnumerateAOSPackages, self).__init__(module, resource_type=resource_type) 14 | 15 | def list(self): 16 | resp = self.read() 17 | return resp 18 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/foundation/enumerate_hypervisor_isos.py: -------------------------------------------------------------------------------- 1 | # This file is part of Ansible 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | from __future__ import absolute_import, division, print_function 4 | 5 | from .foundation import Foundation 6 | 7 | __metaclass__ = type 8 | 9 | 10 | class EnumerateHypervisorIsos(Foundation): 11 | def __init__(self, module): 12 | resource_type = "/enumerate_hypervisor_isos" 13 | super(EnumerateHypervisorIsos, self).__init__( 14 | module, resource_type=resource_type 15 | ) 16 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/foundation/foundation.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, print_function 2 | 3 | from ..entity import Entity 4 | 5 | __metaclass__ = type 6 | 7 | 8 | class Foundation(Entity): 9 | __BASEURL__ = "/foundation" 10 | 11 | def __init__(self, module, resource_type, additional_headers=None): 12 | resource_type = self.__BASEURL__ + resource_type 13 | super(Foundation, self).__init__( 14 | module, resource_type, scheme="http", additional_headers=additional_headers 15 | ) 16 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/foundation/node_network_details.py: -------------------------------------------------------------------------------- 1 | # This file is part of Ansible 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | from __future__ import absolute_import, division, print_function 4 | 5 | from .foundation import Foundation 6 | 7 | __metaclass__ = type 8 | 9 | 10 | class NodeNetworkDetails(Foundation): 11 | def __init__(self, module): 12 | resource_type = "/node_network_details" 13 | super(NodeNetworkDetails, self).__init__(module, resource_type=resource_type) 14 | 15 | def retrieve(self, nodes, timeout=60): 16 | nodes_query = {"nodes": list(map(lambda e: {"ipv6_address": e}, nodes))} 17 | if timeout: 18 | nodes_query["timeout"] = str(timeout) 19 | resp = self.create(data=nodes_query, timeout=timeout) 20 | 21 | nodes = resp.get("nodes", []) 22 | return nodes 23 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/karbon/karbon.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, print_function 2 | 3 | __metaclass__ = type 4 | 5 | from ..entity import Entity 6 | 7 | 8 | class Karbon(Entity): 9 | __BASEURL__ = "/karbon" 10 | 11 | def __init__(self, module, resource_type, additional_headers=None): 12 | resource_type = self.__BASEURL__ + resource_type 13 | super(Karbon, self).__init__( 14 | module, resource_type, additional_headers=additional_headers 15 | ) 16 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/ndb/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/plugins/module_utils/v3/ndb/__init__.py -------------------------------------------------------------------------------- /plugins/module_utils/v3/ndb/base_info_module.py: -------------------------------------------------------------------------------- 1 | # Copyright: 2021, Ansible Project 2 | # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause ) 3 | from __future__ import absolute_import, division, print_function 4 | 5 | from copy import deepcopy 6 | 7 | from .base_module import NdbBaseModule 8 | 9 | __metaclass__ = type 10 | 11 | 12 | class NdbBaseInfoModule(NdbBaseModule): 13 | def __init__(self, **kwargs): 14 | self.argument_spec = deepcopy(NdbBaseModule.argument_spec) 15 | self.argument_spec.pop("state") 16 | self.argument_spec.pop("wait") 17 | self.argument_spec.pop("timeout") 18 | super(NdbBaseInfoModule, self).__init__(**kwargs) 19 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/ndb/nutanix_database.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, print_function 2 | 3 | from ..entity import Entity 4 | 5 | __metaclass__ = type 6 | 7 | 8 | class NutanixDatabase(Entity): 9 | __BASEURL__ = "/era" 10 | api_version = "/v0.9" 11 | 12 | def __init__(self, module, resource_type, additional_headers=None): 13 | resource_type = self.__BASEURL__ + self.api_version + resource_type 14 | super(NutanixDatabase, self).__init__( 15 | module, 16 | resource_type, 17 | additional_headers=additional_headers, 18 | ) 19 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/prism/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/plugins/module_utils/v3/prism/__init__.py -------------------------------------------------------------------------------- /plugins/module_utils/v3/prism/hosts.py: -------------------------------------------------------------------------------- 1 | # This file is part of Ansible 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | from __future__ import absolute_import, division, print_function 4 | 5 | __metaclass__ = type 6 | 7 | from .prism import Prism 8 | 9 | 10 | class Host(Prism): 11 | def __init__(self, module): 12 | resource_type = "/hosts" 13 | super(Host, self).__init__(module, resource_type=resource_type) 14 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/prism/idempotence_identifiers.py: -------------------------------------------------------------------------------- 1 | # This file is part of Ansible 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | from __future__ import absolute_import, division, print_function 4 | 5 | __metaclass__ = type 6 | 7 | import uuid 8 | 9 | from .prism import Prism 10 | 11 | 12 | class IdempotenceIdenitifiers(Prism): 13 | def __init__(self, module): 14 | resource_type = "/idempotence_identifiers" 15 | super(IdempotenceIdenitifiers, self).__init__( 16 | module, resource_type=resource_type 17 | ) 18 | 19 | def get_idempotent_uuids(self, count=1): 20 | if count < 1: 21 | return [] 22 | spec = {"client_identifier": str(uuid.uuid4()), "count": count} 23 | resp = self.create(spec) 24 | return resp["uuid_list"] 25 | 26 | # this func requests for UUID5 algo uuids used mainly for pc users 27 | def get_salted_uuids(self, name_list): 28 | spec = {"name_list": name_list} 29 | resp = self.create(spec, endpoint="salted") 30 | return resp["name_uuid_list"] 31 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/prism/prism.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, print_function 2 | 3 | __metaclass__ = type 4 | 5 | from ..entity import Entity 6 | 7 | 8 | class Prism(Entity): 9 | __BASEURL__ = "/api/nutanix/v3" 10 | 11 | def __init__(self, module, resource_type, additional_headers=None): 12 | resource_type = self.__BASEURL__ + resource_type 13 | super(Prism, self).__init__( 14 | module, resource_type, additional_headers=additional_headers 15 | ) 16 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/prism/vpn_connections.py: -------------------------------------------------------------------------------- 1 | # This file is part of Ansible 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | from __future__ import absolute_import, division, print_function 4 | 5 | __metaclass__ = type 6 | 7 | from .prism import Prism 8 | 9 | 10 | class VpnConnection(Prism): 11 | def __init__(self, module): 12 | resource_type = "/vpn_connections" 13 | super(VpnConnection, self).__init__(module, resource_type=resource_type) 14 | 15 | 16 | # Helper functions 17 | 18 | 19 | def get_vpn_connection_uuid(module, config): 20 | if "name" in config: 21 | vpn_obj = VpnConnection(module) 22 | name = config.get("name") 23 | uuid = vpn_obj.get_uuid(name) 24 | if not uuid: 25 | error = "VPN connection {0} not found.".format(name) 26 | return None, error 27 | elif "uuid" in config: 28 | uuid = config.get("uuid") 29 | else: 30 | error = "Config {0} doesn't have name or uuid key".format(config) 31 | None, error 32 | 33 | return uuid, None 34 | -------------------------------------------------------------------------------- /plugins/module_utils/v3/utils.py: -------------------------------------------------------------------------------- 1 | # This file is part of Ansible 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | 4 | from __future__ import absolute_import, division, print_function 5 | 6 | __metaclass__ = type 7 | 8 | 9 | def check_for_idempotency(spec, resp, **kwargs): 10 | state = kwargs.get("state") 11 | if spec == resp: 12 | if ( 13 | state == "present" 14 | # only for VMs 15 | or ( 16 | state in ["soft_shutdown", "hard_poweroff", "power_off"] 17 | and resp["spec"]["resources"]["power_state"] == "OFF" 18 | ) 19 | # only for VMs 20 | or ( 21 | state == "power_on" and resp["spec"]["resources"]["power_state"] == "ON" 22 | ) 23 | ): 24 | return True 25 | return False 26 | -------------------------------------------------------------------------------- /plugins/module_utils/v4/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/plugins/module_utils/v4/__init__.py -------------------------------------------------------------------------------- /plugins/module_utils/v4/base_info_module.py: -------------------------------------------------------------------------------- 1 | # Copyright: (c) 2024, Nutanix 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | 4 | from __future__ import absolute_import, division, print_function 5 | 6 | from copy import deepcopy 7 | 8 | from ..base_module import BaseModule 9 | 10 | __metaclass__ = type 11 | 12 | 13 | class BaseInfoModule(BaseModule): 14 | """ 15 | Base Info module class for Nutanix PC v4 list APIs based modules 16 | """ 17 | 18 | info_argument_spec = dict( 19 | filter=dict(type="str"), 20 | page=dict(type="int"), 21 | limit=dict(type="int"), 22 | orderby=dict(type="str"), 23 | select=dict(type="str"), 24 | ) 25 | 26 | def __init__(self, skip_info_args=False, **kwargs): 27 | self.argument_spec = deepcopy(BaseModule.argument_spec) 28 | self.argument_spec.pop("state") 29 | self.argument_spec.pop("wait") 30 | if not skip_info_args: 31 | self.argument_spec.update(self.info_argument_spec) 32 | super(BaseInfoModule, self).__init__(**kwargs) 33 | -------------------------------------------------------------------------------- /plugins/module_utils/v4/data_policies/helpers.py: -------------------------------------------------------------------------------- 1 | # Copyright: (c) 2025, Nutanix 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | 4 | from __future__ import absolute_import, division, print_function 5 | 6 | __metaclass__ = type 7 | 8 | from ..utils import raise_api_exception # noqa: E402 9 | 10 | 11 | def get_protection_policy(module, api_instance, ext_id): 12 | """ 13 | This method will return protection policy info using external ID. 14 | Args: 15 | module: Ansible module 16 | api_instance: ProtectionPoliciesApi instance from ntnx_datapolicies_py_client sdk 17 | ext_id (str): Protection policy external ID 18 | Returns: 19 | protection_policy_info (object): protection policy info 20 | """ 21 | try: 22 | return api_instance.get_protection_policy_by_id(extId=ext_id).data 23 | except Exception as e: 24 | raise_api_exception( 25 | module=module, 26 | exception=e, 27 | msg="Api Exception raised while fetching protection policy info using ext_id", 28 | ) 29 | -------------------------------------------------------------------------------- /plugins/module_utils/v4/sdk_mock.py: -------------------------------------------------------------------------------- 1 | # Copyright: (c) 2024, Nutanix 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | 4 | from __future__ import absolute_import, division, print_function 5 | 6 | __metaclass__ = type 7 | 8 | 9 | class MockSDK(object): 10 | def __getattribute__(self, item): 11 | try: 12 | return object.__getattribute__(self, item) 13 | except AttributeError: 14 | return None 15 | 16 | 17 | mock_sdk = MockSDK() 18 | -------------------------------------------------------------------------------- /plugins/module_utils/v4/volumes/helpers.py: -------------------------------------------------------------------------------- 1 | # Copyright: (c) 2024, Nutanix 2 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 3 | 4 | from __future__ import absolute_import, division, print_function 5 | 6 | __metaclass__ = type 7 | 8 | from ..utils import raise_api_exception # noqa: E402 9 | 10 | 11 | def get_volume_group(module, api_instance, ext_id): 12 | """ 13 | Get volume group by ext_id 14 | Args: 15 | module: Ansible module 16 | api_instance: VolumeGroupApi instance from ntnx_volumes_py_client sdk 17 | ext_id: ext_id of volume group 18 | Returns: 19 | vg (obj): VolumeGroup info object 20 | """ 21 | try: 22 | return api_instance.get_volume_group_by_id(extId=ext_id).data 23 | except Exception as e: 24 | raise_api_exception( 25 | module=module, 26 | exception=e, 27 | msg="Api Exception raised while fetching Volume group info using ext_id", 28 | ) 29 | -------------------------------------------------------------------------------- /plugins/modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/plugins/modules/__init__.py -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 88 3 | target-version = ['py36', 'py37', 'py38'] 4 | include = '\.pyi?$' 5 | exclude = ''' 6 | /( 7 | \.eggs 8 | | \.git 9 | | \.hg 10 | | \.mypy_cache 11 | | \.tox 12 | | \.venv 13 | | _build 14 | | buck-out 15 | | build 16 | | dist 17 | | venv 18 | | examples 19 | )/ 20 | ''' -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pip>=21.3.1 2 | ipaddress>=1.0.23 3 | setuptools>=44.1.1 4 | requests>=2.26.0 5 | black>=22.8.0 6 | flake8>=4.0.1 7 | isort>=5.9.3 8 | coverage>=7.3.2 9 | shyaml>=0.6.2 10 | markupsafe>=2 11 | ntnx-clustermgmt-py-client>=4.0.1 12 | ntnx-iam-py-client>=4.0.1 13 | ntnx-microseg-py-client>=4.0.1 14 | ntnx-networking-py-client>=4.0.1 15 | ntnx-prism-py-client>=4.0.1 16 | ntnx-vmm-py-client>=4.0.1 17 | ntnx-volumes-py-client>=4.0.1 18 | ntnx-dataprotection-py-client>=4.0.1 19 | ntnx_datapolicies_py_client>=4.0.1 20 | ntnx_lifecycle_py_client>=4.0.1 -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [isort] 2 | multi_line_output=3 3 | include_trailing_comma=True 4 | force_grid_wrap=0 5 | use_parentheses=True 6 | line_length=88 7 | [flake8] 8 | ignore = E203, E266, E501, W503 9 | exclude = .git, __pycache__, venv, tests/unit/compat 10 | max-line-length = 88 11 | max-complexity = 18 12 | select = B,C,E,F,W,T4 13 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/__init__.py -------------------------------------------------------------------------------- /tests/integration/requirements.txt: -------------------------------------------------------------------------------- 1 | pip~=21.3.1 2 | ipaddress~=1.0.23 3 | setuptools~=44.1.1 4 | ansible-core==2.16.0 5 | requests~=2.26.0 6 | black==22.8.0 7 | flake8==4.0.1 8 | isort==5.9.3 9 | coverage==7.3.2 10 | shyaml==0.6.2 11 | markupsafe==2 12 | ntnx-clustermgmt-py-client==4.0.1 13 | ntnx-iam-py-client==4.0.1 14 | ntnx-microseg-py-client==4.0.1 15 | ntnx-networking-py-client==4.0.1 16 | ntnx-prism-py-client==4.0.1 17 | ntnx-vmm-py-client==4.0.1 18 | ntnx-volumes-py-client==4.0.1 19 | ntnx-dataprotection-py-client==4.0.1 20 | ntnx_datapolicies_py_client==4.0.1 21 | ntnx_lifecycle_py_client==4.0.1 -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_acps/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_acps/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_acps/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create_acps.yml 11 | ansible.builtin.import_tasks: "create_acps.yml" 12 | - name: Import delete_acp.yml 13 | ansible.builtin.import_tasks: "delete_acp.yml" 14 | - name: Import update_acps.yml 15 | ansible.builtin.import_tasks: "update_acps.yml" 16 | - name: Import negative_scenarios.yml 17 | ansible.builtin.import_tasks: "negative_scenarios.yml" 18 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_acps_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_acps_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_acps_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import info.yml 11 | ansible.builtin.import_tasks: "info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_address_groups/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_address_groups/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_address_groups/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | - name: Import update.yml 13 | ansible.builtin.import_tasks: "update.yml" 14 | - name: Import delete.yml 15 | ansible.builtin.import_tasks: "delete.yml" 16 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_address_groups_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_address_groups_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_address_groups_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "address_groups_info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_address_groups_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_address_groups_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_address_groups_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import address_groups.yml 11 | ansible.builtin.import_tasks: address_groups.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_authorization_policies_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_authorization_policies_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_authorization_policies_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import all authorization policies test 11 | ansible.builtin.import_tasks: all_operations.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_categories/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_categories/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_categories/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import all_operations.yml 11 | ansible.builtin.import_tasks: "all_operations.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_categories_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_categories_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_categories_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import info.yml 11 | ansible.builtin.import_tasks: "info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_categories_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_categories_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_categories_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import all_operations.yml 11 | ansible.builtin.import_tasks: "all_operations.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_clusters_and_hosts_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_clusters_and_hosts_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_clusters_and_hosts_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import clusters crud tests and hosts info tests 11 | ansible.builtin.import_tasks: cluster_crud.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_clusters_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_clusters_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_clusters_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import get_clusters_info.yml 11 | ansible.builtin.import_tasks: "get_clusters_info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_clusters_nodes_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_clusters_nodes_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_clusters_nodes_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import add_remove_nodes.yml 11 | ansible.builtin.import_tasks: add_remove_nodes.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_directory_services_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_directory_services_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_directory_services_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import all_operations.yml 11 | ansible.builtin.import_tasks: all_operations.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_floating_ips_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_floating_ips_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_floating_ips_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_floating_ips_v2 integration test 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: all_operation.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_floating_ips_v2/vars/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/ntnx_floating_ips_v2/vars/main.yml -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_foundation_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ foundation_host }}" 6 | block: 7 | - name: Import image_nodes.yml 8 | ansible.builtin.import_tasks: "image_nodes.yml" 9 | - name: Import negative_scenarios.yml 10 | ansible.builtin.import_tasks: "negative_scenarios.yml" 11 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_aos_packages_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_aos_packages_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_foundation_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_aos_packages_info/tasks/get_aos.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start testing ntnx_foundation_aos_packages_info 3 | ansible.builtin.debug: 4 | msg: start testing ntnx_foundation_aos_packages_info 5 | 6 | - name: Get aos_packages_info from foundation 7 | ntnx_foundation_aos_packages_info: 8 | register: result 9 | 10 | - name: Creation Status 11 | ansible.builtin.assert: 12 | that: 13 | - result.aos_packages | length > 0 14 | - result.aos_packages is defined 15 | - result.failed==false 16 | - result.changed==false 17 | fail_msg: " Fail : unable to get aos_packages " 18 | success_msg: "Success: got aos_packages successfully " 19 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_aos_packages_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_aos_packages_info integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_aos_packages_info: 5 | nutanix_host: "{{ foundation_host }}" 6 | block: 7 | - name: Import Tasks 8 | ansible.builtin.import_tasks: get_aos.yml 9 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_bmc_ipmi_config/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_bmc_ipmi_config/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_foundation_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_bmc_ipmi_config/tasks/configure_ipmi.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start testing ntnx_foundation_bmc_ipmi_config 3 | ansible.builtin.debug: 4 | msg: start testing ntnx_foundation_bmc_ipmi_config 5 | 6 | - name: Configure ipmi 7 | ntnx_foundation_bmc_ipmi_config: 8 | ipmi_user: "{{ bmc.ipmi_user }}" 9 | ipmi_password: "{{ bmc.ipmi_password }}" 10 | ipmi_netmask: "{{ bmc.ipmi_netmask }}" 11 | ipmi_gateway: "{{ bmc.ipmi_gateway }}" 12 | timeout: 100 13 | blocks: 14 | - nodes: 15 | - ipmi_mac: "{{ bmc.ipmi_mac }}" 16 | ipmi_ip: "{{ bmc.ipmi_ip }}" 17 | register: result 18 | 19 | - name: Creation Status 20 | ansible.builtin.assert: 21 | that: 22 | - result.response is defined 23 | - result.failed==false 24 | - result.changed==true 25 | - result.response.blocks.0.nodes.0.ipmi_configure_successful==true 26 | - result.response.blocks.0.nodes.0.ipmi_message is defined 27 | fail_msg: bmc ipmi configure was failed with error result.error 28 | success_msg: bmc ipmi configure was successful 29 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_bmc_ipmi_config/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_bmc_ipmi_config integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_bmc_ipmi_config: 5 | nutanix_host: "{{ foundation_host }}" 6 | block: 7 | - name: Import Tasks 8 | ansible.builtin.import_tasks: configure_ipmi.yml 9 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_fc_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_central integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_central: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import Tasks 11 | ansible.builtin.import_tasks: image_nodes.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | cluster_name: test_cluster 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_api_keys/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_api_keys/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_fc_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_api_keys/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_central_api_keys integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_central_api_keys: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import Tasks 11 | ansible.builtin.import_tasks: create_key.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_api_keys_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_api_keys_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_fc_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_api_keys_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_central_api_keys_info integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_central_api_keys: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: false 9 | 10 | nutanix.ncp.ntnx_foundation_central_api_keys_info: 11 | nutanix_host: "{{ ip }}" 12 | nutanix_username: "{{ username }}" 13 | nutanix_password: "{{ password }}" 14 | validate_certs: false 15 | block: 16 | - name: Import Tasks 17 | ansible.builtin.import_tasks: key_info.yml 18 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_imaged_clusters_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_imaged_clusters_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_fc_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_imaged_clusters_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_central_imaged_clusters_info integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_central_imaged_clusters_info: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import Tasks 11 | ansible.builtin.import_tasks: get_cluster_info.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_imaged_nodes_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_imaged_nodes_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_fc_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_central_imaged_nodes_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_central_imaged_nodes_info integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_central_imaged_nodes_info: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import Tasks 11 | ansible.builtin.import_tasks: get_node_info.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_discover_nodes_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_discover_nodes_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_foundation_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_discover_nodes_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_discover_nodes_info integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_discover_nodes_info: 5 | nutanix_host: "{{ foundation_host }}" 6 | block: 7 | - name: Import Tasks 8 | ansible.builtin.import_tasks: discover_nodes.yml 9 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_hypervisor_images_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_hypervisor_images_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_foundation_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_hypervisor_images_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_hypervisor_images_info integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_hypervisor_images_info: 5 | nutanix_host: "{{ foundation_host }}" 6 | block: 7 | - name: Import Tasks 8 | ansible.builtin.import_tasks: get_hypervisors.yml 9 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_image_upload/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_image_upload/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_foundation_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_image_upload/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_image_upload integration tests 3 | module_defaults: 4 | nutanix.ncp.ntnx_foundation_image_upload: 5 | nutanix_host: "{{ foundation_host }}" 6 | block: 7 | - name: Import Tasks 8 | ansible.builtin.import_tasks: upload.yml 9 | - name: Import Tasks 10 | ansible.builtin.import_tasks: negative_scenarios.yml 11 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_image_upload/tasks/negative_scenarios.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Image upload with wrong installer_type 3 | ntnx_foundation_image_upload: 4 | state: present 5 | source: "{{ source }}" 6 | filename: integration-test-ntnx-package.tar.gz 7 | installer_type: wrong installer type 8 | timeout: 3600 9 | register: result 10 | ignore_errors: true 11 | 12 | - name: Creation Status 13 | ansible.builtin.assert: 14 | that: 15 | - result.failed==true 16 | - result.changed==false 17 | - "result.msg == 'value of installer_type must be one of: kvm, esx, hyperv, xen, nos, got: wrong installer type'" 18 | fail_msg: " Fail : image uploaded with wrong installer type" 19 | success_msg: "Success: returned error as expected " 20 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_node_network_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_node_network_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_foundation_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_node_network_info/tasks/get_info.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start testing ntnx_foundation_node_network_info 3 | ansible.builtin.debug: 4 | msg: start testing ntnx_foundation_node_network_info 5 | 6 | - name: Discover nodes 7 | ntnx_foundation_discover_nodes_info: 8 | register: result 9 | 10 | - name: Get node network info 11 | ntnx_foundation_node_network_info: 12 | nodes: 13 | - "{{result.blocks.0.nodes.0.ipv6_address}}" 14 | - "{{result.blocks.1.nodes.0.ipv6_address}}" 15 | register: result 16 | 17 | - name: Creation Status 18 | ansible.builtin.assert: 19 | that: 20 | - result.nodes is defined 21 | - result.failed==false 22 | - result.changed==false 23 | - result.nodes.0.ipmi_ip is defined 24 | - result.nodes.0.ipmi_gateway is defined 25 | - result.nodes.0.hypervisor_hostname is defined 26 | fail_msg: " Fail : unable to get node network info " 27 | success_msg: "Success: Got node network info successfully " 28 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_node_network_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_node_network_info integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ foundation_host }}" 6 | block: 7 | - name: Import Tasks 8 | ansible.builtin.import_tasks: get_info.yml 9 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_sanity/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_sanity/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_foundation_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_foundation_sanity/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_foundation_sanity integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ foundation_host }}" 6 | block: 7 | - name: Import Tasks 8 | ansible.builtin.import_tasks: image_nodes.yml 9 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_gpus_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_gpus_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_gpus_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import gpus_operations.yml 11 | ansible.builtin.import_tasks: "gpus_operations.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_hosts_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_hosts_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_hosts_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import get_hosts_info.yml 11 | ansible.builtin.import_tasks: "get_hosts_info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_image_placement_policies_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_image_placement_policies_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_image_placement_policies_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import info.yml 11 | ansible.builtin.import_tasks: "info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_image_placement_policy/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_image_placement_policy/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_image_placement_policy/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | - name: Import update.yml 13 | ansible.builtin.import_tasks: "update.yml" 14 | - name: Import delete.yml 15 | ansible.builtin.import_tasks: "delete.yml" 16 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_image_placement_policy_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_image_placement_policy_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_image_placement_policy_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module_defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import image_policy_operations.yml 11 | ansible.builtin.import_tasks: image_policy_operations.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_images/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_images/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_images/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | - name: Import update.yml 13 | ansible.builtin.import_tasks: "update.yml" 14 | - name: Import delete.yml 15 | ansible.builtin.import_tasks: "delete.yml" 16 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_images_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_images_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_images_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import info.yml 11 | ansible.builtin.import_tasks: "info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_images_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_images_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_images_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module_defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import images_operations.yml 11 | ansible.builtin.import_tasks: images_operations.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_clusters_and_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_clusters_and_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_clusters_and_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_karbon_clusters_and_info integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import Tasks 11 | ansible.builtin.import_tasks: crud.yml 12 | - name: Import Tasks 13 | ansible.builtin.import_tasks: negative_scenarios.yml 14 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_clusters_and_info/vars/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/ntnx_karbon_clusters_and_info/vars/main.yml -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_registries/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_registries/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_registries/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_karbon_registries integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: create.yml 12 | - name: Import negative_scenarios.yml 13 | ansible.builtin.import_tasks: negative_scenarios.yml 14 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_registries/tasks/negative_scenarios.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Negative test cases for ntnx_karbon_registries 3 | ansible.builtin.debug: 4 | msg: Start negative test cases for ntnx_karbon_registries 5 | 6 | - name: Create registry with wrong port number 7 | ntnx_karbon_registries: 8 | name: test_registry 9 | url: "{{ url }}" 10 | port: 501 11 | register: result 12 | ignore_errors: true 13 | 14 | - name: Check listing status 15 | ansible.builtin.assert: 16 | that: 17 | - result.response is defined 18 | - result.failed == true 19 | - result.changed == false 20 | fail_msg: "Fail: create registry with wrong port number finished successfully" 21 | success_msg: "Pass: Returned as expected " 22 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_registries_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_registries_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_karbon_registries_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_karbon_registries_info integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import Tasks 11 | ansible.builtin.import_tasks: info.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_lcm_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_lcm_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_lcm_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import lcm_operations.yml 11 | ansible.builtin.import_tasks: lcm_operations.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_availability_databases/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_availability_databases/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_availability_databases/readme.md: -------------------------------------------------------------------------------- 1 | ### Modules Tested: 2 | 1. HA instances using ntnx_ndb_databases 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_availability_databases/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_availability_databases integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | 10 | block: 11 | - name: Import tasks 12 | ansible.builtin.import_tasks: tests.yml 13 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_clones_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_clones_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_clones_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_clones_info integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: info.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_clusters/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_clusters/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_clusters/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_clusters integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: CRUD.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_database_clones/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_database_clones/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_database_clones/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_database_clones integration test 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | 10 | block: 11 | - name: Import tasks 12 | ansible.builtin.import_tasks: clones.yml 13 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_actions/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_actions/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_actions/readme.md: -------------------------------------------------------------------------------- 1 | ### Modules Tested: 2 | 1. ntnx_ndb_database_log_catchup 3 | 2. ntnx_ndb_database_restore 4 | 3. ntnx_ndb_database_snapshots 5 | 4. ntnx_ndb_database_scale 6 | 5. ntnx_ndb_linked_databases 7 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_actions/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_databases_actions integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | 10 | block: 11 | - name: Import the actions 12 | ansible.builtin.import_tasks: all_actions.yml 13 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_sanity/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_sanity/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_sanity/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_databases_sanity integration test 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | 10 | block: 11 | - name: Get all databases 12 | ansible.builtin.import_tasks: tests.yml 13 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_single_instance_1/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_single_instance_1/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_single_instance_1/readme.md: -------------------------------------------------------------------------------- 1 | ### Modules Tested: 2 | 1. ntnx_ndb_databases 3 | 2. ntns_ndb_register_database 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_single_instance_1/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_databases_single_instance_1 integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | 10 | block: 11 | - name: Import tasks 12 | ansible.builtin.import_tasks: tests.yml 13 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_single_instance_2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_single_instance_2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_single_instance_2/readme.md: -------------------------------------------------------------------------------- 1 | ### Modules Tested: 2 | 1. ntnx_ndb_databases 3 | 2. ntns_ndb_register_database 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_databases_single_instance_2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_databases_single_instance_2 integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | 10 | block: 11 | - name: Import tasks 12 | ansible.builtin.import_tasks: tests.yml 13 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_db_server_vms/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_db_server_vms/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_db_server_vms/readme.md: -------------------------------------------------------------------------------- 1 | ### Summary 2 | This test flow tests db server vm provision, unregister, register, update and delete scenarios. 3 | 4 | ### Modules Tested: 5 | 1. ntnx_ndb_db_server_vms 6 | 2. ntns_ndb_register_db_server_vm 7 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_db_server_vms/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_db_server_vms integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: crud.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_maintenance_windows/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_maintenance_windows/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_maintenance_windows/readme.md: -------------------------------------------------------------------------------- 1 | ### Modules Tested: 2 | 1. ntnx_ndb_maitenance_window 3 | 2. ntnx_ndb_maitenance_windows_info 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_maintenance_windows/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_maintenance_windows integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: crud.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_profiles/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_profiles/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_profiles/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_profiles integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: compute.yml 12 | - name: Import tasks 13 | ansible.builtin.import_tasks: db_params.yml 14 | - name: Import tasks 15 | ansible.builtin.import_tasks: network_profile.yml 16 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_profiles_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_profiles_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_profiles_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_profiles_info integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: info.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_slas/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_slas/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_slas/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_slas integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: CRUD.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_snapshots_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_snapshots_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_snapshots_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_snapshots_info integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: info.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_software_profiles/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_software_profiles/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_software_profiles/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_software_profiles integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | 10 | block: 11 | - name: Import tasks 12 | ansible.builtin.import_tasks: crud.yml 13 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_tags/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_tags/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_tags/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_tags integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: crud.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_time_machines_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_time_machines_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_time_machines_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_time_machines_info integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: info.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_time_machines_with_multi_clusters integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import tasks 11 | ansible.builtin.import_tasks: data_access_management_and_snapshots.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_vlans/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_vlans/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_ndb_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ndb_vlans/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ntnx_ndb_vlans integration tests 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ndb_ip }}" 6 | nutanix_username: "{{ ndb_username }}" 7 | nutanix_password: "{{ ndb_password }}" 8 | validate_certs: false 9 | block: 10 | - name: Import create_vlans.yml 11 | ansible.builtin.import_tasks: create_vlans.yml 12 | - name: Import negative_scenarios.yml 13 | ansible.builtin.import_tasks: negative_scenarios.yml 14 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_operations_info_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_operations_info_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_operations_info_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import permissions_info.yml 11 | ansible.builtin.import_tasks: permissions_info.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ova/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ova/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_ova/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create_ova.yml 11 | ansible.builtin.import_tasks: "create_ova.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_pbrs_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_pbrs_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_pbrs_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import all_operation.yml 11 | ansible.builtin.import_tasks: "all_operation.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_pbrs_v2/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | priority: [205, 206, 207, 208, 209, 210, 211, 212, 213, 214] 3 | network: 4 | ip: 192.168.2.0 5 | prefix: 24 6 | protocol: 7 | number: 80 8 | reroute: 9 | ip: 10.1.3.2 10 | prefix_length: 32 11 | tcp: 12 | port: 80 13 | port_rangelist: [100, 120] 14 | udp: 15 | port: 69 16 | port_rangelist: [150, 170] 17 | icmp: 18 | code: 3 19 | type: 3 20 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_permissions_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_permissions_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_permissions_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import permissions_info.yml 11 | ansible.builtin.import_tasks: "permissions_info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_power_actions_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_power_actions_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_power_actions_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import power_actions.yml 11 | ansible.builtin.import_tasks: "power_actions.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_prism_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_prism_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_prism_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import pc_backup_restore_from_cluster.yml 11 | ansible.builtin.import_tasks: "pc_backup_restore_from_cluster.yml" 12 | - name: Import pc_backup_restore_using_object_store.yml 13 | ansible.builtin.import_tasks: "pc_backup_restore_using_object_store.yml" 14 | - name: Import deploy_pc.yml 15 | ansible.builtin.import_tasks: "deploy_pc.yml" 16 | - name: Import unregister_pcs_connection.yml 17 | ansible.builtin.import_tasks: "unregister_pcs_connection.yml" 18 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_projects/aliases: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/ntnx_projects/aliases -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_projects/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_projects/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create_project.yml 11 | ansible.builtin.import_tasks: "create_project.yml" 12 | - name: Import delete_project.yml 13 | ansible.builtin.import_tasks: "delete_project.yml" 14 | - name: Import update_project.yml 15 | ansible.builtin.import_tasks: "update_project.yml" 16 | - name: Import projects_with_role_mappings.yml 17 | ansible.builtin.import_tasks: "projects_with_role_mappings.yml" 18 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_projects_info/aliases: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/ntnx_projects_info/aliases -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_projects_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_projects_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import projects_info.yml 11 | ansible.builtin.import_tasks: "projects_info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_projects_info/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_protection_policies_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_protection_policies_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_protection_policies_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import protection_policies.yml 11 | ansible.builtin.import_tasks: protection_policies.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_protection_rules/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_protection_rules/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_protection_rules/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import protection_rules.yml 11 | ansible.builtin.import_tasks: "protection_rules.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_protection_rules_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_protection_rules_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_protection_rules_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import rules_info.yml 11 | ansible.builtin.import_tasks: "rules_info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_recovery_plans_and_jobs/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_recovery_plans_and_jobs/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_recovery_plans_and_jobs/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import crud.yml 11 | ansible.builtin.import_tasks: "crud.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_recovery_plans_and_jobs_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_recovery_plans_and_jobs_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_recovery_plans_and_jobs_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import info.yml 11 | ansible.builtin.import_tasks: "info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_recovery_points_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_recovery_points_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_recovery_points_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import recovery_points.yml 11 | ansible.builtin.import_tasks: recovery_points.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_roles/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_roles/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_roles/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | - name: Import update.yml 13 | ansible.builtin.import_tasks: "update.yml" 14 | - name: Import delete.yml 15 | ansible.builtin.import_tasks: "delete.yml" 16 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_roles_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_roles_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_roles_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import roles_info.yml 11 | ansible.builtin.import_tasks: "roles_info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_roles_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_roles_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_roles_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import roles_operations.yml 11 | ansible.builtin.import_tasks: roles_operations.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_routes_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_routes_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_routes_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import routes.yml 11 | ansible.builtin.import_tasks: "routes.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_saml_identity_providers_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_saml_identity_providers_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_saml_identity_providers_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import all_operation.yml 11 | ansible.builtin.import_tasks: all_operation.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_saml_identity_providers_v2/vars/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/ntnx_saml_identity_providers_v2/vars/main.yml -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_security_rules/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_security_rules/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_security_rules/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import app_rule.yml 11 | ansible.builtin.import_tasks: "app_rule.yml" 12 | - name: Import isolation_rule.yml 13 | ansible.builtin.import_tasks: "isolation_rule.yml" 14 | - name: Import quarantine_rule.yml 15 | ansible.builtin.import_tasks: "quarantine_rule.yml" 16 | - name: Import vdi.yml 17 | ansible.builtin.import_tasks: "vdi.yml" 18 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_security_rules_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_security_rules_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_security_rules_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import get_security_rules.yml 11 | ansible.builtin.import_tasks: "get_security_rules.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_security_rules_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_security_rules_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_security_rules_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import tests for application rule CRUD and security rules info tests 11 | ansible.builtin.import_tasks: application_rules_and_info_tests.yml 12 | - name: Import create, update and delete tests for isolation type security rules 13 | ansible.builtin.import_tasks: isolation_rules_tests.yml 14 | - name: Import tests for quarantine type security rules 15 | ansible.builtin.import_tasks: quarantine_rules_tests.yml 16 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_service_groups/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_service_groups/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_service_groups/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import info.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | - name: Import update.yml 13 | ansible.builtin.import_tasks: "update.yml" 14 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_service_groups_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_service_groups_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_service_groups_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_service_groups_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_service_groups_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_service_groups_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import service_groups.yml 11 | ansible.builtin.import_tasks: service_groups.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_static_routes/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_static_routes/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_static_routes/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_static_routes_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_static_routes_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_static_routes_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import info.yml 11 | ansible.builtin.import_tasks: "info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_storage_containers_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_storage_containers_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_storage_containers_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import storage container all operation tests 11 | ansible.builtin.import_tasks: "all_operation.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_user_groups/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_user_groups/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_user_groups/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_user_groups_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_user_groups_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_user_groups_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import user_groups.yml 11 | ansible.builtin.import_tasks: user_groups.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_users/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_users/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_users/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_users_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_users_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_users_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import users_info.yml 11 | ansible.builtin.import_tasks: "users_info.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_users_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_users_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_users_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import users_operations.yml 11 | ansible.builtin.import_tasks: users_operations.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_categories_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_categories_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_categories_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import vms_categories.yml 11 | ansible.builtin.import_tasks: "vms_categories.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_cd_rom_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_cd_rom_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_cd_rom_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import cd_rom_operations.yml 11 | ansible.builtin.import_tasks: "cd_rom_operations.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_clone/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_clone/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_clone/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_clone_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_clone_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_clone_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import clone.yml 11 | ansible.builtin.import_tasks: "clone.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_disks_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_disks_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_disks_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import disks_operations.yml 11 | ansible.builtin.import_tasks: "disks_operations.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_ngt_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_ngt_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_ngt_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module_defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import vms_ngt.yml 11 | ansible.builtin.import_tasks: vms_ngt.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_nics_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_nics_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_nics_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import nics_operations.yml 11 | ansible.builtin.import_tasks: "nics_operations.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_serial_port_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_serial_port_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_serial_port_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import serial_ports.yml 11 | ansible.builtin.import_tasks: "serial_ports.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_stage_guest_customization_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_stage_guest_customization_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - prepare_env 4 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_stage_guest_customization_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module_defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import stage.yml 11 | ansible.builtin.import_tasks: stage.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_stage_guest_customization_v2/vars/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/ntnx_vms_stage_guest_customization_v2/vars/main.yml -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_templates_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_templates_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_templates_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module_defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import all_templates_operation.yml 11 | ansible.builtin.import_tasks: all_templates_operation.yml 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vms_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create_delete_info_vm.yml 11 | ansible.builtin.import_tasks: create_delete_info_vm.yml 12 | - name: Import update_vm.yml 13 | ansible.builtin.import_tasks: "update_vm.yml" 14 | - name: Import create_delete_uefi_vms.yml 15 | ansible.builtin.import_tasks: "create_delete_uefi_vms.yml" 16 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_disks_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_disks_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_disks_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import disks.yml 11 | ansible.builtin.import_tasks: "disks.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_iscsi_clients_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_iscsi_clients_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_iscsi_clients_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import iscsi_client_connections.yml 11 | ansible.builtin.import_tasks: "iscsi_client_connections.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import volume_groups_crud.yml 11 | ansible.builtin.import_tasks: "volume_groups_crud.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_vms_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_vms_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_volume_groups_vms_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import ahv_vm_vg_connections.yml 11 | ansible.builtin.import_tasks: "ahv_vm_vg_connections.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vpcs_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vpcs_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vpcs_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import all_operations.yml 11 | ansible.builtin.import_tasks: "all_operations.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/ntnx_vpcs_v2/vars/main.yml: -------------------------------------------------------------------------------- 1 | dns_servers: ["8.8.8.8", "8.8.4.4"] 2 | routable_ips: 3 | network_ip: 192.168.2.0 4 | network_prefix: 24 5 | network_ip_2: 192.168.8.0 6 | network_prefix_2: 24 7 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_floating_ips/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_floating_ips/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_floating_ips/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create_floating_ips.yml 11 | ansible.builtin.import_tasks: "create_floating_ips.yml" 12 | - name: Import delete_floating_ips.yml 13 | ansible.builtin.import_tasks: "negative_scenarios.yml" 14 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_floating_ips/vars/main.yml: -------------------------------------------------------------------------------- 1 | private_ip: 192.168.0.11 2 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_floating_ips_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_floating_ips_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_floating_ips_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import list_floating_ips.yml 11 | ansible.builtin.import_tasks: "list_floating_ips.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_pbrs/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_pbrs/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_pbrs/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create_pbrs.yml 11 | ansible.builtin.import_tasks: "create_pbrs.yml" 12 | - name: Import delete_pbrs.yml 13 | ansible.builtin.import_tasks: "negative_scenarios.yml" 14 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_pbrs/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | priority: [205, 206, 207, 208, 209, 210, 211, 212, 213] 3 | network: 4 | ip: 192.168.2.0 5 | prefix: 24 6 | protocol: 7 | number: 80 8 | reroute_ip: 10.1.3.2 9 | tcp: 10 | port: 80 11 | port_rangelist: 100-120 12 | udp: 13 | port: 69 14 | port_rangelist: 150-170 15 | icmp: 16 | code: 3 17 | type: 3 18 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_pbrs_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_pbrs_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_pbrs_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import list_pbrs.yml 11 | ansible.builtin.import_tasks: "list_pbrs.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_subnets/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_subnets/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_subnets/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create_subnet.yml 11 | ansible.builtin.import_tasks: "create_subnet.yml" 12 | - name: Import delete_subnet.yml 13 | ansible.builtin.import_tasks: "delete_subnet.yml" 14 | - name: Import negative_scenarios.yml 15 | ansible.builtin.import_tasks: "negative_scenarios.yml" 16 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_subnets_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_subnets_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_subnets_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import list_subnets.yml 11 | ansible.builtin.import_tasks: "list_subnets.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_subnets_v2/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_subnets_v2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_subnets_v2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import subnet_operations.yml 11 | ansible.builtin.import_tasks: "subnet_operations.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vms/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vms/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vms/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create.yml 11 | ansible.builtin.import_tasks: "create.yml" 12 | - name: Import negative_scenarios.yml 13 | ansible.builtin.import_tasks: "negative_scenarios.yml" 14 | - name: Import delete.yml 15 | ansible.builtin.import_tasks: "delete.yml" 16 | - name: Import vm_operations.yml 17 | ansible.builtin.import_tasks: "vm_operations.yml" 18 | - name: Import vm_update.yml 19 | ansible.builtin.import_tasks: "vm_update.yml" 20 | - name: Import negative_vm_update.yml 21 | ansible.builtin.import_tasks: "negative_vm_update.yml" 22 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vms_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vms_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vms_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set module defaults 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import list_vms.yml 11 | ansible.builtin.import_tasks: "list_vms.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vpcs/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vpcs/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vpcs/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import create_vpcs.yml 11 | ansible.builtin.import_tasks: "create_vpcs.yml" 12 | - name: Import delete_vpc.yml 13 | ansible.builtin.import_tasks: "delete_vpc.yml" 14 | - name: Import negative_scenarios.yml 15 | ansible.builtin.import_tasks: "negative_scenarios.yml" 16 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vpcs/vars/main.yml: -------------------------------------------------------------------------------- 1 | dns_servers: ["8.8.8.8", "8.8.4.4"] 2 | routable_ips: 3 | network_ip: 192.168.2.0 4 | network_prefix: 24 5 | network_ip_2: 192.168.8.0 6 | network_prefix_2: 24 7 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vpcs_info/aliases: -------------------------------------------------------------------------------- 1 | disabled -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vpcs_info/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_env 3 | -------------------------------------------------------------------------------- /tests/integration/targets/nutanix_vpcs_info/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Initializing variables 3 | module_defaults: 4 | group/nutanix.ncp.ntnx: 5 | nutanix_host: "{{ ip }}" 6 | nutanix_username: "{{ username }}" 7 | nutanix_password: "{{ password }}" 8 | validate_certs: "{{ validate_certs }}" 9 | block: 10 | - name: Import list_vpcs.yml 11 | ansible.builtin.import_tasks: "list_vpcs.yml" 12 | -------------------------------------------------------------------------------- /tests/integration/targets/prepare_env/vars/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/prepare_env/vars/.gitkeep -------------------------------------------------------------------------------- /tests/integration/targets/prepare_fc_env/playbooks/prepare_fc_env.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Prepare the environment 3 | hosts: localhost 4 | gather_facts: false 5 | 6 | tasks: 7 | - name: Include var file 8 | ansible.builtin.include_vars: ../vars/main.yml 9 | -------------------------------------------------------------------------------- /tests/integration/targets/prepare_fc_env/vars/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/prepare_fc_env/vars/.gitkeep -------------------------------------------------------------------------------- /tests/integration/targets/prepare_foundation_env/playbooks/cleanup.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Clean up the environment 3 | hosts: localhost 4 | gather_facts: false 5 | tasks: 6 | - name: Include var file 7 | ansible.builtin.include_vars: ../vars/main.yml 8 | # - name: Delete files 9 | # file: 10 | # path: "{{ source }}" 11 | # state: absent 12 | # ignore_errors: true 13 | -------------------------------------------------------------------------------- /tests/integration/targets/prepare_foundation_env/playbooks/prepare_foundation_env.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Prepare the environment 3 | hosts: localhost 4 | gather_facts: false 5 | 6 | tasks: 7 | - name: Include var file 8 | ansible.builtin.include_vars: ../vars/main.yml 9 | -------------------------------------------------------------------------------- /tests/integration/targets/prepare_foundation_env/playbooks/tmp/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/prepare_foundation_env/playbooks/tmp/.gitkeep -------------------------------------------------------------------------------- /tests/integration/targets/prepare_foundation_env/vars/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/prepare_foundation_env/vars/.gitkeep -------------------------------------------------------------------------------- /tests/integration/targets/prepare_ndb_env/paybooks/prepare_env.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Prepare the environment for ndb 3 | hosts: localhost 4 | gather_facts: false 5 | 6 | tasks: 7 | - name: Include var file 8 | ansible.builtin.include_vars: ../vars/main.yml 9 | - name: Set environment variables 10 | ansible.builtin.set_fact: 11 | ndb_ip: "{{ lookup('env', 'NDB_HOST') }}" 12 | ndb_username: "{{ lookup('env', 'NDB_USERNAME') }}" 13 | ndb_password: "{{ lookup('env', 'NDB_PASSWORD') }}" 14 | - name: Insert credentials block to vars 15 | ansible.builtin.blockinfile: 16 | path: ../vars/main.yml 17 | marker: "# {mark} ANSIBLE MANAGED BLOCK insertion 0" 18 | block: | 19 | ndb_ip: "{{ lookup('env', 'NDB_HOST') }}" 20 | ndb_username: "{{ lookup('env', 'NDB_USERNAME') }}" 21 | ndb_password: "{{ lookup('env', 'NDB_PASSWORD') }}" 22 | -------------------------------------------------------------------------------- /tests/integration/targets/prepare_ndb_env/paybooks/tmp/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/prepare_ndb_env/paybooks/tmp/.gitkeep -------------------------------------------------------------------------------- /tests/integration/targets/prepare_ndb_env/playbooks/prepare_env.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Prepare the environment for ndb 3 | hosts: localhost 4 | gather_facts: false 5 | 6 | tasks: 7 | - name: Include var file 8 | ansible.builtin.include_vars: ../vars/main.yml 9 | - name: Set environment variables 10 | ansible.builtin.set_fact: 11 | ndb_ip: "{{ lookup('env', 'NDB_HOST') }}" 12 | ndb_username: "{{ lookup('env', 'NDB_USERNAME') }}" 13 | ndb_password: "{{ lookup('env', 'NDB_PASSWORD') }}" 14 | - name: Insert credentials block to vars 15 | ansible.builtin.blockinfile: 16 | path: ../vars/main.yml 17 | marker: "# {mark} ANSIBLE MANAGED BLOCK insertion 0" 18 | block: | 19 | ndb_ip: "{{ lookup('env', 'NDB_HOST') }}" 20 | ndb_username: "{{ lookup('env', 'NDB_USERNAME') }}" 21 | ndb_password: "{{ lookup('env', 'NDB_PASSWORD') }}" 22 | -------------------------------------------------------------------------------- /tests/integration/targets/prepare_ndb_env/playbooks/tmp/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/prepare_ndb_env/playbooks/tmp/.gitkeep -------------------------------------------------------------------------------- /tests/integration/targets/prepare_ndb_env/vars/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/integration/targets/prepare_ndb_env/vars/.gitkeep -------------------------------------------------------------------------------- /tests/unit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/unit/__init__.py -------------------------------------------------------------------------------- /tests/unit/compat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/unit/compat/__init__.py -------------------------------------------------------------------------------- /tests/unit/plugins/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/unit/plugins/__init__.py -------------------------------------------------------------------------------- /tests/unit/plugins/module_utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/unit/plugins/module_utils/__init__.py -------------------------------------------------------------------------------- /tests/unit/plugins/modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nutanix/nutanix.ansible/c8292fc92dc171b697d83898003547e258fd5a94/tests/unit/plugins/modules/__init__.py --------------------------------------------------------------------------------