Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.9.1 #428

Merged
merged 44 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0bc4af7
example fix (#420)
Gevorg-Khachatryan-97 Oct 25, 2023
73e846b
Add cluster URL to response only when there is cluster creation (#402)
bhati-pradeep Oct 25, 2023
e3629ff
fiql string in filtering (#423)
Gevorg-Khachatryan-97 Oct 25, 2023
d1a0016
Bug/issue#383 (#411)
alaa-bish Oct 25, 2023
0054cc9
Fix #391 and #418 (#419)
bhati-pradeep Oct 25, 2023
8579162
functionality to update owner of vms (#412)
Gevorg-Khachatryan-97 Oct 25, 2023
b32df80
example for vms inventory (#410)
Gevorg-Khachatryan-97 Oct 25, 2023
7171027
fix for custom filter and examples (#417)
Gevorg-Khachatryan-97 Oct 30, 2023
f5e9dca
example for vms inventory (#426)
Gevorg-Khachatryan-97 Oct 30, 2023
efb51fd
Add support for PC Categories (#405)
Gianlu Oct 30, 2023
8d01d81
Bug/issue#400 (#403)
Gevorg-Khachatryan-97 Oct 30, 2023
97c2d8b
example for VMs with guest customization file which injects variables…
Gevorg-Khachatryan-97 Oct 30, 2023
5069b95
Fix: Syntax Errors in Create App Security Rule Ex (#394)
Nathaniel-Roberts Oct 30, 2023
74908fe
functionality to handle issue when size of new disk is absent (#393)
Gevorg-Khachatryan-97 Oct 30, 2023
46ca173
example fix (#392)
Gevorg-Khachatryan-97 Oct 30, 2023
5c94380
sanity fix
alaa-bish Oct 31, 2023
7a9f51a
fix for issue#360 (#408)
Gevorg-Khachatryan-97 Oct 31, 2023
54d0bef
improve clone examples (#407)
alaa-bish Oct 31, 2023
2fae70f
sanity fix
alaa-bish Oct 31, 2023
d60ffd1
disbale tests
alaa-bish Nov 1, 2023
236af45
Enhance Acp Tests
alaa-bish Nov 1, 2023
94b969c
fix disks issue when size gb is not given for clone image disks
bhati-pradeep Nov 1, 2023
78929dd
Merge pull request #429 from nutanix/bug/fix-backward-compatibility-i…
alaa-bish Nov 1, 2023
8407a3a
Set release version 1.9.1
alaa-bish Nov 2, 2023
7470a34
enable image tests
alaa-bish Nov 2, 2023
59981dc
enable foundation sanity test
alaa-bish Nov 6, 2023
fa9e332
Minor foundation test fix
bhati-pradeep Nov 6, 2023
9780a8f
Enable pc tests
bhati-pradeep Nov 6, 2023
6b5cd67
Enable karbon and foundation sanity
bhati-pradeep Nov 6, 2023
42120c3
disables tests
alaa-bish Nov 6, 2023
6b6e701
enables tests
alaa-bish Nov 6, 2023
85b4ce4
enable pc tests
alaa-bish Nov 6, 2023
7269bed
add tests for clones with latest snapshot. And enable clones and NDB …
bhati-pradeep Nov 6, 2023
4f1c197
Merge branch 'release/1.9.1' of github.com:nutanix/nutanix.ansible in…
bhati-pradeep Nov 6, 2023
4782dda
skip protection rules tests
bhati-pradeep Nov 6, 2023
1749b84
Add random naming for acp test with user reference
bhati-pradeep Nov 7, 2023
4a4a1f6
Bug/191 fix database sanity test (#430)
alaa-bish Nov 7, 2023
ec3113e
fix ntnx_database_sanity
bhati-pradeep Nov 7, 2023
9e688b1
Add Contributaiong (#431)
alaa-bish Nov 9, 2023
884064e
Release Notes and changelog changes
bhati-pradeep Nov 9, 2023
d03ceb2
Merge branch 'release/1.9.1' of github.com:nutanix/nutanix.ansible in…
bhati-pradeep Nov 9, 2023
f636c26
Minor typo fix
bhati-pradeep Nov 9, 2023
2cdba39
remove unrequired file
bhati-pradeep Nov 9, 2023
0a65a3e
Minor release bug list change due to non cherry picks
bhati-pradeep Nov 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
## v1.9.1 (09 November 2023)


**Improvements:**

- docs - [Imprv] add doc regarding running integration tests locally [[\#435](https://github.com/nutanix/nutanix.ansible/issues/435)]
- info modules - [Imprv] add examples for custom_filter [[\#416](https://github.com/nutanix/nutanix.ansible/issues/416)]
- ndb clones - [Imprv] Enable database clones and clone refresh using latest snapshot flag [[\#391](https://github.com/nutanix/nutanix.ansible/issues/391)]
- ndb clones - [Imprv] add examples for NDB database clone under examples folder [[\#386](https://github.com/nutanix/nutanix.ansible/issues/386)]
- ntnx_prism_vm_inventory - Add support for PC Categories [[\#405](https://github.com/nutanix/nutanix.ansible/issues/405)]
- ntnx_prism_vm_inventory - [Imprv] add examples for dynamic inventory using ntnx_prism_vm_inventory [[\#401](https://github.com/nutanix/nutanix.ansible/issues/401)]
- ntnx_vms - [Imprv] add possibility to specify / modify vm user ownership and project [[\#378](https://github.com/nutanix/nutanix.ansible/issues/378)]
- ntnx_vms - owner association upon vm creation module [[\#359](https://github.com/nutanix/nutanix.ansible/issues/359)]
- ntnx_vms_info - [Imprv] add examples with guest customization for module ntnx_vms [[\#395](https://github.com/nutanix/nutanix.ansible/issues/395)]

**Bugs:**

- ntnx_foundation - [Bug] Error when Clusters Block is missing in module ntnx_foundation [[\#397](https://github.com/nutanix/nutanix.ansible/issues/397)]
- ntnx_ndb_time_machines_info - [Bug] ntnx_ndb_time_machines_info not fetching all attributes when name is used for fetching [[\#418](https://github.com/nutanix/nutanix.ansible/issues/418)]
- ntnx_security_rules - Fix Syntax Errors in Create App Security Rule Example [[\#394](https://github.com/nutanix/nutanix.ansible/pull/394/files)]
- ntnx_vms - [Bug] Error when updating size_gb using the int filter in module ntnx_vms [[\#400](https://github.com/nutanix/nutanix.ansible/issues/400)]
- ntnx_vms - [Bug] hard_poweroff has been moved to state from operation [[\#415](https://github.com/nutanix/nutanix.ansible/issues/415)]
- ntnx_vms_clone - [Bug] cannot change boot_config when cloning in module ntnx_vms_clone [[\#360](https://github.com/nutanix/nutanix.ansible/issues/359)]
- website - [Bug] Github page deployment action is failing. [[\#483](https://github.com/nutanix/nutanix.ansible/issues/483)]

**Full Changelog:** [here](https://github.com/nutanix/nutanix.ansible/compare/v1.9.0...v1.9.1)

## v1.9.0 (11 July 2023)


Expand All @@ -19,6 +46,7 @@
- ntnx_karbon_clusters_node_pools - Create,Update and Delete worker node pools with the provided configuration.
- ntnx_ndb_tags_info - info module for ndb tags info

**Full Changelog:** [here](https://github.com/nutanix/nutanix.ansible/compare/v1.8.0...v1.9.0)


## v1.8.0 (28 Feb 2023)
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ Nutanix.Ncp Release Notes
.. contents:: Topics


v1.9.1
======

Minor Changes
-------------

- docs - [Imprv] add doc regarding running integration tests locally [[\#435](https://github.com/nutanix/nutanix.ansible/issues/435)]
- info modules - [Imprv] add examples for custom_filter [[\#416](https://github.com/nutanix/nutanix.ansible/issues/416)]
- ndb clones - [Imprv] Enable database clones and clone refresh using latest snapshot flag [[\#391](https://github.com/nutanix/nutanix.ansible/issues/391)]
- ndb clones - [Imprv] add examples for NDB database clone under examples folder [[\#386](https://github.com/nutanix/nutanix.ansible/issues/386)]
- ntnx_prism_vm_inventory - Add support for PC Categories [[\#405](https://github.com/nutanix/nutanix.ansible/issues/405)]
- ntnx_prism_vm_inventory - [Imprv] add examples for dynamic inventory using ntnx_prism_vm_inventory [[\#401](https://github.com/nutanix/nutanix.ansible/issues/401)]
- ntnx_vms - [Imprv] add possibility to specify / modify vm user ownership and project [[\#378](https://github.com/nutanix/nutanix.ansible/issues/378)]
- ntnx_vms - owner association upon vm creation module [[\#359](https://github.com/nutanix/nutanix.ansible/issues/359)]
- ntnx_vms_info - [Imprv] add examples with guest customization for module ntnx_vms [[\#395](https://github.com/nutanix/nutanix.ansible/issues/395)]

Bugfixes
--------

- ntnx_foundation - [Bug] Error when Clusters Block is missing in module ntnx_foundation [[\#397](https://github.com/nutanix/nutanix.ansible/issues/397)]
- ntnx_ndb_time_machines_info - [Bug] ntnx_ndb_time_machines_info not fetching all attributes when name is used for fetching [[\#418](https://github.com/nutanix/nutanix.ansible/issues/418)]
- ntnx_security_rules - Fix Syntax Errors in Create App Security Rule Example [[\#394](https://github.com/nutanix/nutanix.ansible/pull/394/files)]
- ntnx_vms - [Bug] Error when updating size_gb using the int filter in module ntnx_vms [[\#400](https://github.com/nutanix/nutanix.ansible/issues/400)]
- ntnx_vms - [Bug] hard_poweroff has been moved to state from operation [[\#415](https://github.com/nutanix/nutanix.ansible/issues/415)]
- ntnx_vms_clone - [Bug] cannot change boot_config when cloning in module ntnx_vms_clone [[\#360](https://github.com/nutanix/nutanix.ansible/issues/359)]
- website - [Bug] Github page deployment action is failing. [[\#483](https://github.com/nutanix/nutanix.ansible/issues/483)]

v1.9.0
======

Expand Down
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ This collection requires Python 2.7 or greater

> For the 1.9.0 release of the ansible plugin it will have N-1 compatibility with the Prism Central APIs. This release was tested against Prism Central version pc.2023.1 and pc.2023.1.0.1 .

> For the 1.9.1 release of the ansible plugin it will have N-1 compatibility with the Prism Central APIs. This release was tested against Prism Central version pc.2023.3 and pc.2023.1.0.2 .

### Notes:
1. Static routes module (ntnx_static_routes) is supported for PC versions >= pc.2022.1

Expand All @@ -55,6 +57,8 @@ Prism Central based examples: https://github.com/nutanix/nutanix.ansible/tree/ma
## Foundation
> For the 1.1.0 release of the ansible plugin, it will have N-1 compatibility with the Foundation. This release was tested against Foundation versions v5.2 and v5.1.1

> For the 1.9.1 release of the ansible plugin, it was tested against NDB versions v2.5.2

Foundation based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/foundation

## Foundation Central
Expand All @@ -67,6 +71,8 @@ Foundation Central based examples : https://github.com/nutanix/nutanix.ansible/t

> For the 1.9.0 release of the ansible plugin, it was tested against Karbon versions v2.6.0, v2.7.0 and v2.8.0

> For the 1.9.1 release of the ansible plugin, it was tested against Karbon version v2.8.0

Karbon based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/karbon

## Nutanix Database Service (ERA)
Expand All @@ -75,6 +81,8 @@ Karbon based examples : https://github.com/nutanix/nutanix.ansible/tree/main/exa

> For the 1.9.0 release of the ansible plugin, it was tested against NDB versions v2.5.0.2

> For the 1.9.1 release of the ansible plugin, it was tested against NDB versions v2.5.1.1

NDB based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/ndb

### Notes:
Expand Down Expand Up @@ -260,6 +268,56 @@ We glady welcome contributions from the community. From updating the documentati
* [Contributing Guide](CONTRIBUTING.md)
* [Code of Conduct](CODE_OF_CONDUCT.md)

# Testing

## Integration Testing for Nutanix Ansible Modules

To conduct integration tests for a specific Ansible module such as the `ntnx_vms` module, the following step-by-step procedures can be followed:

### Prerequisites
- Ensure you are in the installed collection directory where the module is located. For example:
`/Users/mac.user1/.ansible/collections/ansible_collections/nutanix/ncp`

### Setting up Variables
1. Navigate to the `tests/integration/targets` directory within the collection.

2. Define the necessary variables within the feature-specific var files, such as `tests/integration/targets/prepare_env/vars/main.yml`, `tests/integration/targets/prepare_foundation_env/vars/main.yml`,`tests/integration/targets/prepare_ndb_env/tasks/prepare_env.yml`, etc.

Note: For Karbon and FC tests, use the PC vars exclusively, as these features rely on pc setup. Not all variables are mandatory; define only the required variables for the particular feature to be tested.

3. Run the test setup playbook for the specific feature you intend to test to create entities in setup:
- For PC, NDB, and Foundation tests, execute the relevant commands:
```bash
ansible-playbook prepare_env/tasks/prepare_env.yml
ansible-playbook prepare_ndb_env/tasks/prepare_env.yml
ansible-playbook prepare_foundation_env/tasks/prepare_foundation_env.yml
```

### Running Integration Tests
1. Conduct integration tests for all modules using:
```bash
ansible-test integration
```

2. To perform integration tests for a specific module:
```bash
ansible-test integration module_test_name
```
Replace `module_test_name` with test directory name under tests/integration/targets.

### Cleanup
1. After completing the integration tests, perform a cleanup specific to the tested feature:
- For PC tests, execute the command:
```bash
ansible-playbook prepare_env/tasks/clean_up.yml
```
- For Foundation tests, execute the command:
```bash
ansible-playbook prepare_foundation_env/tasks/clean_up.yml
```

By following these steps, you can perform comprehensive integration testing for the specified Ansible module and ensure a clean testing environment afterward. Define only the necessary variables for the specific feature you intend to test.

# Examples
## Playbook for IaaS provisioning on Nutanix

Expand Down
31 changes: 31 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -417,3 +417,34 @@ releases:
name: ntnx_ndb_tags_info
namespace: ''
release_date: '2023-07-11'
1.9.1:
changes:
bugfixes:
- ntnx_foundation - [Bug] Error when Clusters Block is missing in module ntnx_foundation
[[\#397](https://github.com/nutanix/nutanix.ansible/issues/397)]
- ntnx_ndb_time_machines_info - [Bug] ntnx_ndb_time_machines_info not fetching
all attributes when name is used for fetching [[\#418](https://github.com/nutanix/nutanix.ansible/issues/418)]
- ntnx_security_rules - Fix Syntax Errors in Create App Security Rule Example
[[\#394](https://github.com/nutanix/nutanix.ansible/pull/394/files)]
- ntnx_vms - [Bug] Error when updating size_gb using the int filter in module
ntnx_vms [[\#400](https://github.com/nutanix/nutanix.ansible/issues/400)]
- ntnx_vms - [Bug] hard_poweroff has been moved to state from operation [[\#415](https://github.com/nutanix/nutanix.ansible/issues/415)]
- ntnx_vms_clone - [Bug] cannot change boot_config when cloning in module ntnx_vms_clone
[[\#360](https://github.com/nutanix/nutanix.ansible/issues/359)]
- website - [Bug] Github page deployment action is failing. [[\#483](https://github.com/nutanix/nutanix.ansible/issues/483)]
minor_changes:
- docs - [Imprv] add doc regarding running integration tests locally [[\#435](https://github.com/nutanix/nutanix.ansible/issues/435)]
- info modules - [Imprv] add examples for custom_filter [[\#416](https://github.com/nutanix/nutanix.ansible/issues/416)]
- ndb clones - [Imprv] Enable database clones and clone refresh using latest
snapshot flag [[\#391](https://github.com/nutanix/nutanix.ansible/issues/391)]
- ndb clones - [Imprv] add examples for NDB database clone under examples folder
[[\#386](https://github.com/nutanix/nutanix.ansible/issues/386)]
- ntnx_prism_vm_inventory - Add support for PC Categories [[\#405](https://github.com/nutanix/nutanix.ansible/issues/405)]
- ntnx_prism_vm_inventory - [Imprv] add examples for dynamic inventory using
ntnx_prism_vm_inventory [[\#401](https://github.com/nutanix/nutanix.ansible/issues/401)]
- ntnx_vms - [Imprv] add possibility to specify / modify vm user ownership and
project [[\#378](https://github.com/nutanix/nutanix.ansible/issues/378)]
- ntnx_vms - owner association upon vm creation module [[\#359](https://github.com/nutanix/nutanix.ansible/issues/359)]
- ntnx_vms_info - [Imprv] add examples with guest customization for module ntnx_vms
[[\#395](https://github.com/nutanix/nutanix.ansible/issues/395)]
release_date: '2023-10-09'
8 changes: 8 additions & 0 deletions examples/clusters_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,11 @@
sort_order: "ASCENDING"
sort_attribute: "name"
register: result

- name: List clusters using filter and custom_filter
ntnx_clusters_info:
filter:
name: <name>
custom_filter:
external_ip: <external_ip>
register: result
9 changes: 9 additions & 0 deletions examples/fip_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@
offset: 0
register: result
ignore_errors: True


- name: List floating_ips using filter and custom_filter
ntnx_floating_ips_info:
filter:
name: <name>
custom_filter:
private_ip: <private_ip>
register: result
8 changes: 8 additions & 0 deletions examples/hosts_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,11 @@
sort_attribute: "name"
register: result
ignore_errors: True

- name: List hosts using filter and custom_filter
ntnx_hosts_info:
filter:
name: <name>
custom_filter:
serial_number: <serial_number>
register: result
7 changes: 7 additions & 0 deletions examples/inventory/ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[defaults]
inventory = nutanix.yaml

[inventory]
enable_plugins = nutanix.ncp.ntnx_prism_vm_inventory


13 changes: 13 additions & 0 deletions examples/inventory/nutanix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
plugin: nutanix.ncp.ntnx_prism_vm_inventory
nutanix_hostname: <pc_ip>
nutanix_username: <username>
nutanix_password: <password>
validate_certs: false
data: {"offset": 0, "length": 1000}
groups:
group_1: "'<name_prefix>' in name"
group_2: "'<vm_name>'==name"
keyed_groups:
- prefix: "host"
separator: ':'
key: "ansible_host"
121 changes: 121 additions & 0 deletions examples/ndb/create_clone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
- name: Create clone
hosts: localhost
gather_facts: false
collections:
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <ndb-era-ip>
nutanix_username: <username>
nutanix_password: <password>
validate_certs: false

tasks:
- set_fact:
clone_db:
name: <Clone Db Name>
db_params_profile:
name: <Db Profile Name>
vm:
name: <Vm Name>
password: <Vm password>
cluster:
name: <Cluster Name>
network_profile:
name: <Network Profile Name>
compute_profile:
name: <Compute Profile Name>
public_ssh_key: <Public SSH Key>
time_machine:
name: <Time Machine Name>
snapshot:
uuid: <Snapshot UUID>

- name: create clone using snapshot
ntnx_ndb_database_clones:
name: "{{clone_db.name}}"
desc: "ansible-created-clone"

db_params_profile:
name: "{{db_params_profile.name}}"

db_vm:
create_new_server:
name: "{{ vm.name }}"
desc: "vm for db server"
password: "{{ vm.password }}"
cluster:
name: "{{cluster.name}}"
network_profile:
name: "{{ network_profile.name }}"
compute_profile:
name: "{{ compute_profile.name }}"
pub_ssh_key: "{{ public_ssh_key }}"

postgres:
db_password: "{{vm.password}}"

time_machine:
name: "{{time_machine.name}}"
snapshot_uuid: "{{snapshot.uuid}}"

removal_schedule:
days: 2
timezone: "Asia/Calcutta"
remind_before_in_days: 1
delete_database: True

refresh_schedule:
days: 2
time: "12:00:00"
timezone: "Asia/Calcutta"

register: output

- debug:
msg: "{{output}}"

- name: create clone using point in time
ntnx_ndb_database_clones:
name: "{{clone_db.name}}"
desc: "ansible-created-clone"

db_params_profile:
name: "{{db_params_profile.name}}"

db_vm:
create_new_server:
name: "{{ vm.name }}"
desc: "vm for db server"
password: "{{ vm.password }}"
cluster:
name: "{{cluster.name}}"
network_profile:
name: "{{ network_profile.name }}"
compute_profile:
name: "{{ compute_profile.name }}"
pub_ssh_key: "{{ public_ssh_key }}"

postgres:
db_password: "{{vm.password}}"

time_machine:
name: "{{time_machine.name}}"
pitr_timestamp: "2023-02-28 12:00:00"
timestamp: "Asia/Calcutta"

removal_schedule:
days: 2
timezone: "Asia/Calcutta"
remind_before_in_days: 1
delete_database: True

refresh_schedule:
days: 2
time: "12:00:00"
timezone: "Asia/Calcutta"
register: output

- debug:
msg: "{{output}}"
Loading
Loading