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.7.0 - Bug fixes and PC Projects changes #285

Merged
merged 36 commits into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9b808f5
feat/inventory_issue#232 (#233)
peshay Sep 14, 2022
62eb4f4
Add examples for images and static routes(#267)
alaa-bish Sep 18, 2022
db7d52d
Add mac address for vm creation (#272)
alaa-bish Sep 19, 2022
f3ee18e
fix iass example Imprv/issue#250 (#268)
alaa-bish Sep 19, 2022
e5de6b7
Consider cluster reference as well for getting subnet uuid (#266)
bhati-pradeep Sep 19, 2022
a1aa7dc
Bug/inventory#228 new (#278)
Gevorg-Khachatryan-97 Sep 21, 2022
90c6d9e
Bug/docs readme fixes (#280)
bhati-pradeep Sep 23, 2022
cc39cb7
Enable role mappings and new user / user groups creation in ntnx_proj…
bhati-pradeep Sep 28, 2022
43ee5d6
Enable PC tests
bhati-pradeep Sep 28, 2022
8e69786
formatting
bhati-pradeep Sep 28, 2022
7c2a0cd
Isort fix
bhati-pradeep Sep 28, 2022
0dd1e20
Minor subnet fix
bhati-pradeep Sep 28, 2022
042ae42
Cluster filters using name fix
bhati-pradeep Sep 28, 2022
925ef90
sanity fixes
bhati-pradeep Sep 28, 2022
11290bc
Minor read me changes
bhati-pradeep Sep 28, 2022
88cb1de
Handle overlay subnet case while filtering subnets in vms based on cl…
bhati-pradeep Sep 28, 2022
179ce7b
Minor tests and sanity fixes
bhati-pradeep Sep 28, 2022
da1ff39
Remove clusters pagination as API doesn't support
bhati-pradeep Sep 28, 2022
368b37c
Skippin cluster test due to tech issue
bhati-pradeep Sep 28, 2022
659675d
Make address groups tests names unique
bhati-pradeep Sep 28, 2022
2769625
Minor test fixes
bhati-pradeep Sep 29, 2022
3ad49f6
Test fix
bhati-pradeep Sep 29, 2022
3466216
Adding free uuids
bhati-pradeep Sep 29, 2022
a11195a
Minor fixes
bhati-pradeep Sep 29, 2022
64a3ff0
Minor fixes for system roles
bhati-pradeep Sep 29, 2022
79167db
Add examples and doc update
bhati-pradeep Sep 29, 2022
88a48b1
Minor example update
bhati-pradeep Sep 29, 2022
0776a35
Minor readme fix
bhati-pradeep Sep 29, 2022
d1dd064
Examples dependency
bhati-pradeep Sep 29, 2022
dce4d14
Release based readme change
bhati-pradeep Sep 29, 2022
270826f
1.7.0 read me update
bhati-pradeep Sep 29, 2022
3be3fe8
read me update
bhati-pradeep Sep 29, 2022
bd54685
changelog changes
bhati-pradeep Sep 29, 2022
93d3e20
changelog changes
bhati-pradeep Sep 29, 2022
f3e29d1
minor doc change
bhati-pradeep Sep 29, 2022
eb6f9ba
projects docs fix
bhati-pradeep Sep 29, 2022
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This collection has been tested against following versions:
## Python
This collection requires Python 2.7 or greater

## Prism Cenral
## Prism Central
> For the 1.1.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc2022.1.0.2, pc.2021.9.0.5 and pc.2021.8.0.1.

> For the 1.2.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.4, pc2022.1.0.2 and pc.2021.9.0.5.
Expand Down Expand Up @@ -93,7 +93,7 @@ For example, the playbook for iaas.yml is as follows:
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: true
Expand Down Expand Up @@ -214,7 +214,7 @@ We glady welcome contributions from the community. From updating the documentati
collections:
- nutanix.ncp
vars:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: true
Expand Down
2 changes: 1 addition & 1 deletion examples/acp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
Expand Down
2 changes: 1 addition & 1 deletion examples/acp_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
Expand Down
2 changes: 1 addition & 1 deletion examples/address_groups_crud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
Expand Down
2 changes: 1 addition & 1 deletion examples/clusters_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
Expand Down
2 changes: 1 addition & 1 deletion examples/fip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
Expand Down
2 changes: 1 addition & 1 deletion examples/fip_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
Expand Down
2 changes: 1 addition & 1 deletion examples/hosts_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
Expand Down
7 changes: 6 additions & 1 deletion examples/iaas/iaas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
tasks:
- name: Include vars file
include_vars:
file: vars.yml
- include_role:
name: external_subnet
- include_role:
name: vpc
- include_role:
name: static_route
- include_role:
name: overlay_subnet
- include_role:
Expand Down
5 changes: 4 additions & 1 deletion examples/iaas/policies_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
tasks:
- name: Include vars file
include_vars:
file: vars.yml
- include_role:
name: pbr
2 changes: 1 addition & 1 deletion examples/iaas/policies_delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
Expand Down
2 changes: 1 addition & 1 deletion examples/iaas/roles/external_subnet/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
- name: Inputs for external subnets task
include_tasks: external_subnet.yml
with_items:
- { name: Ext-Nat, vlan_id: 102, ip: 10.44.3.192, prefix: 27, gip: 10.44.3.193, sip: 10.44.3.198, eip: 10.44.3.207, eNat: True }
- { name: "{{external_subnet.name}}", vlan_id: "{{external_subnet.vlan_id}}", ip: "{{external_subnet.ip}}", prefix: "{{external_subnet.prefix}}", gip: "{{external_subnet.gip}}", sip: "{{external_subnet.sip}}", eip: "{{external_subnet.eip}}", eNat: "{{external_subnet.eNat}}" }
3 changes: 0 additions & 3 deletions examples/iaas/roles/external_subnet/vars/main.yml

This file was deleted.

18 changes: 10 additions & 8 deletions examples/iaas/roles/overlay_subnet/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
- name: Inputs for overlay subnets
include_tasks: overlay_subnet.yml
with_items:
- { name: Prod-SubnetA, vpc_name: Prod, nip: 10.1.1.0, prefix: 24, gip: 10.1.1.1, sip: 10.1.1.2, eip: 10.1.1.5,
domain_name: "calm.nutanix.com", dns_servers: ["8.8.8.8", "8.8.8.4"], domain_search: ["calm.nutanix.com", "eng.nutanix.com"] }
- { name: Prod-SubnetB, vpc_name: Prod, nip: 10.1.2.0, prefix: 24, gip: 10.1.2.1, sip: 10.1.2.2, eip: 10.1.2.5,
domain_name: "calm.nutanix.com", dns_servers: ["8.8.8.8", "8.8.8.4"], domain_search: ["calm.nutanix.com", "eng.nutanix.com"] }
- { name: Dev-SubnetA, vpc_name: Dev, nip: 10.1.1.0, prefix: 24, gip: 10.1.1.1, sip: 10.1.1.2, eip: 10.1.1.5,
domain_name: "calm.nutanix.com", dns_servers: ["8.8.8.8", "8.8.8.4"], domain_search: ["calm.nutanix.com", "eng.nutanix.com"] }
- { name: Dev-SubnetB, vpc_name: Dev, nip: 10.1.2.0, prefix: 24, gip: 10.1.2.1, sip: 10.1.2.2, eip: 10.1.2.5,
domain_name: "calm.nutanix.com", dns_servers: ["8.8.8.8", "8.8.8.4"], domain_search: ["calm.nutanix.com", "eng.nutanix.com"] }
- { name: "{{Prod_SubnetA.name}}", vpc_name: "{{Prod_SubnetA.vpc_name}}",
nip: "{{Prod_SubnetA.nip}}", prefix: "{{Prod_SubnetA.prefix}}",
gip: "{{Prod_SubnetA.gip}}", sip: "{{Prod_SubnetA.sip}}", eip: "{{Prod_SubnetA.eip}}",
domain_name: "{{domain_name}}", dns_servers: "{{dns_servers}}", domain_search: "{{domain_search}}" }
- { name: "{{Prod_SubnetB.name}}", vpc_name: "{{Prod_SubnetB.vpc_name}}", nip: "{{Prod_SubnetB.nip}}", prefix: "{{Prod_SubnetB.prefix}}", gip: "{{Prod_SubnetB.gip}}", sip: "{{Prod_SubnetB.sip}}", eip: "{{Prod_SubnetB.eip}}",
domain_name: "{{domain_name}}", dns_servers: "{{dns_servers}}", domain_search: "{{domain_search}}" }
- { name: "{{Dev_SubnetA.name}}", vpc_name: "{{Dev_SubnetA.vpc_name}}", nip: "{{Dev_SubnetA.nip}}", prefix: "{{Dev_SubnetA.prefix}}", gip: "{{Dev_SubnetA.gip}}", sip: "{{Dev_SubnetA.sip}}", eip: "{{Dev_SubnetA.eip}}",
domain_name: "{{domain_name}}", dns_servers: "{{dns_servers}}", domain_search: "{{domain_search}}" }
- { name: "{{Dev_SubnetB.name}}", vpc_name: "{{Dev_SubnetB.vpc_name}}", nip: "{{Dev_SubnetB.nip}}", prefix: "{{Dev_SubnetB.prefix}}", gip: "{{Dev_SubnetB.gip}}", sip: "{{Dev_SubnetB.sip}}", eip: "{{Dev_SubnetB.eip}}",
domain_name: "{{domain_name}}", dns_servers: "{{dns_servers}}", domain_search: "{{domain_search}}" }
4 changes: 2 additions & 2 deletions examples/iaas/roles/pbr/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
- name: Include PBR task
include_tasks: pbr.yml
with_items:
- { vpc_name: Prod, priority: 101, nip: 10.1.2.0, prefix: 24 }
- { vpc_name: Dev, priority: 101, nip: 10.1.2.0, prefix: 24 }
- { vpc_name: "{{vpc_names[0]}}", priority: 101, nip: 10.1.2.0, prefix: 24 }
- { vpc_name: "{{vpc_names[1]}}", priority: 101, nip: 10.1.2.0, prefix: 24 }
2 changes: 2 additions & 0 deletions examples/iaas/roles/static_route/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
collections:
- nutanix.ncp
6 changes: 6 additions & 0 deletions examples/iaas/roles/static_route/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Inputs for static routes task
include_tasks: static_route.yml
with_items:
- { vpc_uuid: "{{vpc_uuids[0]}}", subnet_name: "{{external_subnet.name}}", destination: "10.2.2.0/24"}
- { vpc_uuid: "{{vpc_uuids[1]}}", subnet_name: "{{external_subnet.name}}", destination: "10.2.3.0/24"}
14 changes: 14 additions & 0 deletions examples/iaas/roles/static_route/tasks/static_route.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- name: Create static route
ntnx_static_routes:
state: present
vpc_uuid: "{{ item.vpc_uuid }}"
static_routes:
- destination: "{{ item.destination }}"
next_hop:
external_subnet_ref:
name: "{{ item.subnet_name }}"
register: static_route
- debug:
msg:
- "uuid: {{ static_route.response.metadata.uuid }}"
8 changes: 4 additions & 4 deletions examples/iaas/roles/vm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Inputs for vm task
include_tasks: vm.yml
with_items:
- {name: "Prod-Wordpress-App", desc: "Prod-Wordpress-App", is_connected: True, subnet_name: Prod-SubnetA, image_name: "wordpress-appserver", private_ip: ""}
- {name: "Prod-Wordpress-DB", desc: "Prod-Wordpress-DB", is_connected: True, subnet_name: Prod-SubnetB, image_name: "wordpress-db", private_ip: 10.1.2.5}
- {name: "Dev-Wordpress-App", desc: "Dev-Wordpress-App", is_connected: True, subnet_name: Dev-SubnetA, image_name: "wordpress-appserver", private_ip: ""}
- {name: "Dev-Wordpress-DB", desc: "Dev-Wordpress-DB", is_connected: True, subnet_name: Dev-SubnetB, image_name: "wordpress-db", private_ip: 10.1.2.5}
- {name: "Prod-Wordpress-App", desc: "Prod-Wordpress-App", is_connected: True, subnet_name: "{{Prod_SubnetA.name}}", image_name: "wordpress-appserver", private_ip: ""}
- {name: "Prod-Wordpress-DB", desc: "Prod-Wordpress-DB", is_connected: True, subnet_name: "{{Prod_SubnetB.name}}", image_name: "wordpress-db", private_ip: 10.1.2.5}
- {name: "Dev-Wordpress-App", desc: "Dev-Wordpress-App", is_connected: True, subnet_name: "{{Dev_SubnetA.name}}", image_name: "wordpress-appserver", private_ip: ""}
- {name: "Dev-Wordpress-DB", desc: "Dev-Wordpress-DB", is_connected: True, subnet_name: "{{Dev_SubnetB.name}}", image_name: "wordpress-db", private_ip: 10.1.2.5}
2 changes: 1 addition & 1 deletion examples/iaas/roles/vm/tasks/vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: "{{ item.name }}"
desc: "{{ item.desc }}"
cluster:
name: auto_cluster_prod_1a642ea0a5c3
name: "{{ cluster.name }}"
networks:
- is_connected: "{{ item.is_connected }}"
subnet:
Expand Down
6 changes: 4 additions & 2 deletions examples/iaas/roles/vpc/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
- set_fact:
vpc_uuids: []
- name: Inputs vpcs task
include_tasks: vpc.yml
with_items:
- { name: Prod, subnet_name: Ext-Nat}
- { name: Dev, subnet_name: Ext-Nat}
- { name: "{{vpc_names[0]}}", subnet_name: "{{external_subnet.name}}"}
- { name: "{{vpc_names[1]}}", subnet_name: "{{external_subnet.name}}"}
4 changes: 3 additions & 1 deletion examples/iaas/roles/vpc/tasks/vpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
- debug:
msg:
- "name: {{ vpc.response.status.name }}"
- "uuid: {{ vpc.vpc_uuid }}"
- "uuid: {{ vpc.vpc_uuid }}"
- set_fact:
vpc_uuids: "{{ vpc_uuids + [ vpc.vpc_uuid ] }}"
49 changes: 49 additions & 0 deletions examples/iaas/vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
cluster:
name: auto_cluster_prod_f34ce3677ecf
external_subnet:
name: Ext-Nat
vlan_id: 102
ip: 10.44.3.192
prefix: 27
gip: 10.44.3.193
sip: 10.44.3.198
eip: 10.44.3.207
eNat: True
vpc_names: ["Prod", "Dev"]
domain_search: ["calm.nutanix.com", "eng.nutanix.com"]
dns_servers: ["8.8.8.8", "8.8.8.4"]
domain_name: "calm.nutanix.com"
Prod_SubnetA:
name: Prod_SubnetA
vpc_name: Prod
nip: 10.1.1.0
prefix: 24
gip: 10.1.1.1
sip: 10.1.1.2
eip: 10.1.1.5
Prod_SubnetB:
name: Prod_SubnetB
vpc_name: Prod
nip: 10.1.2.0
prefix: 24
gip: 10.1.2.1
sip: 10.1.2.2
eip: 10.1.2.5
Dev_SubnetA:
name: Dev_SubnetA
vpc_name: Dev
nip: 10.1.1.0
prefix: 24
gip: 10.1.1.1
sip: 10.1.1.2
eip: 10.1.1.5

Dev_SubnetB:
name: Dev_SubnetB
vpc_name: Dev
nip: 10.1.2.0
prefix: 24
gip: 10.1.2.1
sip: 10.1.2.2
eip: 10.1.2.5
84 changes: 84 additions & 0 deletions examples/images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
- name: Images playbook
hosts: localhost
gather_facts: false
collections:
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
tasks:
- name: Setting Variables
set_fact:
image_uuid: ""
source_path: ""
source_uri: ""
clusters_name: ""

- name: create image from local workstation
ntnx_images:
state: "present"
source_path: "{{source_path}}"
clusters:
- name: "{{clusters_name}}"
categories:
AppFamily:
- Backup
checksum:
checksum_algorithm: SHA_1
checksum_value: 44610efd741a3ab4a548a81ea94869bb8b692977
name: "ansible-test-with-categories-mapping"
desc: "description"
image_type: "ISO_IMAGE"
version:
product_name: "test"
product_version: "1.2.0"
wait: true

- name: create image from with source as remote server file location
ntnx_images:
state: "present"
source_uri: "{{source_uri}}"
clusters:
- name: "{{clusters_name}}"
categories:
AppFamily:
- Backup
checksum:
checksum_algorithm: SHA_1
checksum_value: 44610efd741a3ab4a548a81ea94869bb8b692977
name: "ansible-test-with-categories-mapping"
desc: "description"
image_type: "DISK_IMAGE"
version:
product_name: "test"
product_version: "1.2.0"
wait: true

- name: override categories of existing image
ntnx_images:
state: "present"
image_uuid: "{{image-uuid}}"
categories:
AppTier:
- Default
AppFamily:
- Backup
wait: true

- name: dettach all categories from existing image
ntnx_images:
state: "present"
image_uuid: "00000000-0000-0000-0000-000000000000"
remove_categories: true
wait: true

- name: delete existing image
ntnx_images:
state: "absent"
image_uuid: "00000000-0000-0000-0000-000000000000"
wait: true

2 changes: 1 addition & 1 deletion examples/karbon/cluster_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_host: <pc_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
Expand Down
Loading