Skip to content

Commit 923e9c7

Browse files
bhati-pradeepGevorg-Khachatryan-97alaa-bish
authored
v1.9.0 release branch and qualifications (#379)
* fix bug#349 (#357) * fix bug#349 * fix --------- Co-authored-by: alaa-bish <[email protected]> * Fetch available IPs for network profiles in NDB (#346) * Add available IPs in network profiles response as per flag * doc fix * isort fix * sanity fix * Fix mismatch of virtual switch in subnet creation (#341) * Fix mismatch of virtual switch in subnet creation * fix isort issues * fix for etcd min disk size (#356) * fix for etcd min disk size * fix doc and tests --------- Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> Co-authored-by: alaa-bish <[email protected]> * Support multi-tiers target in application network security rule (#342) * Change apptier to have multiple app tiers in app security policy * Doc changes * Doc changes * flake8 fixes * sanity fixes * Fix setting some configuration for cluster in foundation (#343) * Fix cluster fields configuration issues * lint fix * fix filters combination expression (#353) * Feat/karbon clusters update (#351) * create and delete node pools * separate node pools entity * update functionality for nodes count and labels * sanity fix * functionality to get subnet by name * fix defaults * fix arguments * fix for etcd min disk size * Add integration tests * fix bug#349 * sanity fix * Revert "fix for etcd min disk size" This reverts commit fb30a68. * Revert "fix bug#349" This reverts commit 9a30aa3. * fixes * fixes * doc fix * fixes to wait tasks completion * fix tests * fixes for update labels failure * fix for black issue * add tests * fix --------- Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> Co-authored-by: alaa-bish <[email protected]> * fix tests * NDB tags info module (#348) * NDB tags info module with docs and tests * Doc fix * tags info doc fix * Minor spelling changes * Add nutanix open source support info in read me * Enable karbon tests * Enable PC setup * Disable NDB tests * set validate_certs * Delete user group post projects test for cleanup. Skip IDP tests * fix tests * Minor test fix * Fix sanity * Add docs and release notes. Add sanity tests for NDB and Foundation and enable their tests * sanity fixes * Add docs for karbon new module and minor fixes * sanity fixes * fix sanity * Disable netwoek segmentation in foundation sanity tests * Skip Liquid syntax checks for conflicting ansible playbook code * Update release dates --------- Co-authored-by: Gevorg Khachatryan <[email protected]> Co-authored-by: alaa-bish <[email protected]>
1 parent 67013f5 commit 923e9c7

File tree

129 files changed

+2913
-664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+2913
-664
lines changed

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
## v1.8.0 (28 Feb 2022)
1+
## v1.9.0 (11 July 2023)
2+
3+
4+
**Improvements:**
5+
6+
- ntnx_profiles_info - [Impr] Develop ansible module for getting available IPs for given network profiles in NDB [\#345](https://github.com/nutanix/nutanix.ansible/issues/345)
7+
- ntnx_security_rules - [Imprv] Flow Network Security Multi-Tier support in Security Policy definition [\#319](https://github.com/nutanix/nutanix.ansible/issues/319)
8+
9+
**Bugs:**
10+
11+
- info modules - [Bug] Multiple filters params are not considered for fetching entities in PC based info modules [[\#352](https://github.com/nutanix/nutanix.ansible/issues/352)]
12+
- ntnx_foundation - [Bug] clusters parameters not being passed to Foundation Server in module nutanix.ncp.ntnx_foundation [[\#307](https://github.com/nutanix/nutanix.ansible/issues/307)]
13+
- ntnx_karbon_clusters - [Bug] error in sample karbon/create_k8s_cluster.yml [[\#349](https://github.com/nutanix/nutanix.ansible/issues/349)]
14+
- ntnx_karbon_clusters - [Bug] impossible to deploy NKE cluster with etcd using disk smaller than 120GB [[\#350](https://github.com/nutanix/nutanix.ansible/issues/350)]
15+
- ntnx_subnets - [Bug] wrong virtual_switch selected in module ntnx_subnets [\#328](https://github.com/nutanix/nutanix.ansible/issues/328)
16+
17+
**New Modules:**
18+
19+
- ntnx_karbon_clusters_node_pools - Create,Update and Delete worker node pools with the provided configuration.
20+
- ntnx_ndb_tags_info - info module for ndb tags info
21+
22+
23+
24+
## v1.8.0 (28 Feb 2023)
225

326
**Features**
427

CHANGELOG.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,35 @@ Nutanix.Ncp Release Notes
55
.. contents:: Topics
66

77

8+
v1.9.0
9+
======
10+
11+
Minor Changes
12+
-------------
13+
14+
- ntnx_profiles_info - [Impr] Develop ansible module for getting available IPs for given network profiles in NDB [\#345](https://github.com/nutanix/nutanix.ansible/issues/345)
15+
- ntnx_security_rules - [Imprv] Flow Network Security Multi-Tier support in Security Policy definition [\#319](https://github.com/nutanix/nutanix.ansible/issues/319)
16+
17+
Deprecated Features
18+
-------------------
19+
20+
- ntnx_security_rules - The ``apptier`` option in target group has been removed. New option called ``apptiers`` has been added to support multi tier policy.
21+
22+
Bugfixes
23+
--------
24+
25+
- info modules - [Bug] Multiple filters params are not considered for fetching entities in PC based info modules [[\#352](https://github.com/nutanix/nutanix.ansible/issues/352)]
26+
- ntnx_foundation - [Bug] clusters parameters not being passed to Foundation Server in module nutanix.ncp.ntnx_foundation [[\#307](https://github.com/nutanix/nutanix.ansible/issues/307)]
27+
- ntnx_karbon_clusters - [Bug] error in sample karbon/create_k8s_cluster.yml [[\#349](https://github.com/nutanix/nutanix.ansible/issues/349)]
28+
- ntnx_karbon_clusters - [Bug] impossible to deploy NKE cluster with etcd using disk smaller than 120GB [[\#350](https://github.com/nutanix/nutanix.ansible/issues/350)]
29+
- ntnx_subnets - [Bug] wrong virtual_switch selected in module ntnx_subnets [\#328](https://github.com/nutanix/nutanix.ansible/issues/328)
30+
31+
New Modules
32+
-----------
33+
34+
- ntnx_karbon_clusters_node_pools - Create,Update and Delete a worker node pools with the provided configuration.
35+
- ntnx_ndb_tags_info - info module for ndb tags info
36+
837
v1.8.0
938
======
1039

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ It is designed keeping simplicity as the core value. Hence it is
1010

1111
Checkout this [blog](https://www.nutanix.dev/2022/08/05/getting-started-with-the-nutanix-ansible-module/) for getting started with nutanix ansible module.
1212

13+
## Support
14+
15+
Ansible Nutanix Provider leverages the community-supported model. See [Open Source Support](https://portal.nutanix.com/page/documents/kbs/details?targetId=kA07V000000LdWPSA0) for more information about its support policy.
16+
1317
# Version compatibility
1418

1519
## Ansible
@@ -33,14 +37,19 @@ This collection requires Python 2.7 or greater
3337
3438
> For the 1.7.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.6, pc.2022.4 and pc2022.1.0.2.
3539
36-
> For the 1.8.0-beta.1 release of the ansible plugin it will have N compatibility with the Prism Central APIs. This release was tested against Prism Central version pc.2022.6 .
40+
> For the 1.8.0 release of the ansible plugin it will have N compatibility with the Prism Central APIs. This release was tested against Prism Central version pc.2022.6 .
41+
42+
> 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 .
43+
3744
### Notes:
3845
1. Static routes module (ntnx_static_routes) is supported for PC versions >= pc.2022.1
3946

4047
2. Adding cluster references in projects module (ntnx_projects) is supported for PC versions >= pc.2022.1
4148

4249
3. For Users and User Groups modules (ntnx_users and ntnx_user_groups), adding Identity Provider (IdP) & Organizational Unit (OU) based users/groups are supported for PC versions >= pc.2022.1
4350

51+
4. ntnx_security_rules - The ``apptier`` option in target group has been removed. New option called ``apptiers`` has been added to support multi tier policy.
52+
4453
Prism Central based examples: https://github.com/nutanix/nutanix.ansible/tree/main/examples/
4554

4655
## Foundation
@@ -56,12 +65,15 @@ Foundation Central based examples : https://github.com/nutanix/nutanix.ansible/t
5665
## Karbon
5766
> For the 1.6.0 release of the ansible plugin, it will have N-2 compatibility with the Karbon. This release was tested against Karbon versions v2.3.0, v2.4.0 and v2.5.0
5867
68+
> 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
69+
5970
Karbon based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/karbon
6071

6172
## Nutanix Database Service (ERA)
62-
> For the 1.8.0-beta.1 release of the ansible plugin, it will have N-1 compatibility with the Nutanix Database Service (ERA). This release was tested against era versions v2.4.1 and v2.4.0
6373

64-
> For the 1.8.0 release of the ansible plugin, it will have N-1 compatibility with the Nutanix Database Service (ERA). This release was tested against era versions v2.5.0 and v2.5.1
74+
> For the 1.8.0 release of the ansible plugin, it will have N-1 compatibility with the Nutanix Database Service (ERA). This release was tested against NDB versions v2.5.0 and v2.5.1
75+
76+
> For the 1.9.0 release of the ansible plugin, it was tested against NDB versions v2.5.0.2
6577
6678
NDB based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/ndb
6779

@@ -150,6 +162,7 @@ ansible-playbook examples/iaas/iaas.yml
150162
| ntnx_image_placement_policies_info | List existing image placement policies. |
151163
| ntnx_karbon_clusters | Create, Delete k8s clusters |
152164
| ntnx_karbon_clusters_info | Get clusters info. |
165+
| ntnx_karbon_clusters_node_pools | Update node pools of kubernetes cluster |
153166
| ntnx_karbon_registries | Create, Delete a karbon private registry entry |
154167
| ntnx_karbon_registries_info | Get karbon private registry registry info. |
155168
| ntnx_pbrs | Create or delete a PBR. |
@@ -211,6 +224,7 @@ ansible-playbook examples/iaas/iaas.yml
211224
| ntnx_ndb_stretched_vlans | Get stretched vlans inf in NDB |
212225
| ntnx_ndb_time_machine_clusters | Manage clusters in NDB time machines |
213226
| ntnx_ndb_tags | Create, update and delete tags |
227+
| ntnx_ndb_tags_info | Get tags info |
214228
| ntnx_ndb_database_clones | Create, update and delete database clones |
215229
| ntnx_ndb_database_snapshots | Create, update and delete database snapshots |
216230
| ntnx_ndb_database_clone_refresh | Perform database clone refresh |

changelogs/changelog.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,3 +387,33 @@ releases:
387387
name: ntnx_ndb_time_machines_info
388388
namespace: ''
389389
release_date: '2022-10-20'
390+
1.9.0:
391+
changes:
392+
bugfixes:
393+
- info modules - [Bug] Multiple filters params are not considered for fetching
394+
entities in PC based info modules [[\#352](https://github.com/nutanix/nutanix.ansible/issues/352)]
395+
- ntnx_foundation - [Bug] clusters parameters not being passed to Foundation
396+
Server in module nutanix.ncp.ntnx_foundation [[\#307](https://github.com/nutanix/nutanix.ansible/issues/307)]
397+
- ntnx_karbon_clusters - [Bug] error in sample karbon/create_k8s_cluster.yml
398+
[[\#349](https://github.com/nutanix/nutanix.ansible/issues/349)]
399+
- ntnx_karbon_clusters - [Bug] impossible to deploy NKE cluster with etcd using
400+
disk smaller than 120GB [[\#350](https://github.com/nutanix/nutanix.ansible/issues/350)]
401+
- ntnx_subnets - [Bug] wrong virtual_switch selected in module ntnx_subnets
402+
[\#328](https://github.com/nutanix/nutanix.ansible/issues/328)
403+
deprecated_features:
404+
- ntnx_security_rules - The ``apptier`` option in target group has been removed.
405+
New option called ``apptiers`` has been added to support multi tier policy.
406+
minor_changes:
407+
- ntnx_profiles_info - [Impr] Develop ansible module for getting available IPs
408+
for given network profiles in NDB [\#345](https://github.com/nutanix/nutanix.ansible/issues/345)
409+
- ntnx_security_rules - [Imprv] Flow Network Security Multi-Tier support in
410+
Security Policy definition [\#319](https://github.com/nutanix/nutanix.ansible/issues/319)
411+
modules:
412+
- description: Create,Update and Delete a worker node pools with the provided
413+
configuration.
414+
name: ntnx_karbon_clusters_node_pools
415+
namespace: ''
416+
- description: info module for ndb tags info
417+
name: ntnx_ndb_tags_info
418+
namespace: ''
419+
release_date: '2023-07-11'

examples/karbon/create_k8s_cluster.yml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
name: <subnet_name>
2121
uuid: <subnet_uuid>
2222
storage_class:
23-
name: <container_name>
23+
name: <storage_class_name>
24+
storage_container:
25+
name: <storage_container_name>
2426
cni:
2527
node_cidr_mask_size: 24
2628
service_ipv4_cidr: "172.19.0.0/16"
@@ -53,9 +55,9 @@
5355
nutanix_cluster_password: "{{nutanix_cluster_password}}"
5456
nutanix_cluster_username: "{{nutanix_cluster_username}}"
5557
default_storage_class: True
56-
name: test-storage-class
58+
name: "{{storage_class.name}}"
5759
reclaim_policy: Delete
58-
storage_container: "{{storage_class.name}}"
60+
storage_container: "{{storage_container.name}}"
5961
file_system: ext4
6062
flash_mode: False
6163
register: result
@@ -100,13 +102,42 @@
100102
nutanix_cluster_password: "{{nutanix_cluster_password}}"
101103
nutanix_cluster_username: "{{nutanix_cluster_username}}"
102104
default_storage_class: True
103-
name: test-storage-class
105+
name: "{{storage_class.name}}"
104106
reclaim_policy: Retain
105-
storage_container: "{{storage_class.name}}"
107+
storage_container: "{{storage_container.name}}"
106108
file_system: xfs
107109
flash_mode: true
108110
register: result
109111

112+
- name: Create worker node pool with subnet uuid
113+
ntnx_karbon_clusters_node_pools:
114+
node_subnet:
115+
uuid: "<uuid>"
116+
node_pool_name: "{{karbon_name}}"
117+
cluster_name: "{{cluster.name}}"
118+
pool_config:
119+
num_instances: 2
120+
cpu: 4
121+
memory_gb: 8
122+
disk_gb: 120
123+
register: result
124+
ignore_errors: true
125+
126+
- name: update pool by increasing cpu,memory_gb,num_instances and add labels
127+
ntnx_karbon_clusters_node_pools:
128+
wait: True
129+
node_pool_name: "{{karbon_name}}"
130+
cluster_name: "{{cluster.name}}"
131+
pool_config:
132+
cpu: 6
133+
memory_gb: 10
134+
disk_gb: 150
135+
num_instances: 4
136+
add_labels:
137+
property1: "test-property1"
138+
register: result
139+
ignore_errors: true
140+
110141
- name: create prod cluster
111142
ntnx_karbon_clusters:
112143
cluster:
@@ -126,7 +157,7 @@
126157
nutanix_cluster_password: "{{nutanix_cluster_password}}"
127158
nutanix_cluster_username: "{{nutanix_cluster_username}}"
128159
default_storage_class: True
129-
name: test-storage-class
160+
name: "{{storage_class.name}}"
130161
reclaim_policy: Delete
131162
storage_container: "{{storage_container.name}}"
132163
file_system: ext4

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace: "nutanix"
22
name: "ncp"
3-
version: "1.8.0"
3+
version: "1.9.0"
44
readme: "README.md"
55
authors:
66
- "Abhishek Chaudhary (@abhimutant)"

meta/runtime.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ action_groups:
8080
- ntnx_ndb_stretched_vlans
8181
- ntnx_ndb_time_machine_clusters
8282
- ntnx_ndb_tags
83+
- ntnx_ndb_tags_info
8384
- ntnx_ndb_database_clones
8485
- ntnx_ndb_database_snapshots
8586
- ntnx_ndb_database_clone_refresh
@@ -95,3 +96,4 @@ action_groups:
9596
- ntnx_ndb_maintenance_window
9697
- ntnx_ndb_maintenance_windows_info
9798
- ntnx_ndb_slas
99+
- ntnx_karbon_clusters_node_pools

plugins/module_utils/entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def unify_spec(self, spec1, spec2):
471471

472472
@staticmethod
473473
def _parse_filters(filters):
474-
return ",".join(map(lambda i: "{0}=={1}".format(i[0], i[1]), filters.items()))
474+
return ";".join(map(lambda i: "{0}=={1}".format(i[0], i[1]), filters.items()))
475475

476476
@staticmethod
477477
def _filter_entities(entities, custom_filters):

plugins/module_utils/foundation/image_nodes.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,33 +111,36 @@ def _build_spec_blocks(self, payload, blocks):
111111
payload["blocks"] = _blocks
112112
return payload, None
113113

114-
def _build_spec_cluster(self, payload, param):
115-
clusters = []
116-
for cluster in param:
114+
def _build_spec_cluster(self, payload, clusters):
115+
cluster_specs = []
116+
for cluster in clusters:
117117
cluster_spec = self._get_default_cluster_spec(cluster)
118118
cluster_spec["cluster_name"] = cluster.get("name")
119119
cluster_spec["cluster_external_ip"] = cluster.get("cvm_vip", None)
120120

121-
if cluster_spec.get("cvm_ntp_servers"):
121+
if cluster.get("cvm_ntp_servers"):
122122
cluster_spec["cvm_ntp_servers"] = self._list2str(
123123
cluster.get("cvm_ntp_servers")
124124
)
125-
if cluster_spec.get("cvm_dns_servers"):
125+
if cluster.get("cvm_dns_servers"):
126126
cluster_spec["cvm_dns_servers"] = self._list2str(
127127
cluster.get("cvm_dns_servers")
128128
)
129-
if cluster_spec.get("hypervisor_ntp_servers"):
129+
if cluster.get("hypervisor_ntp_servers"):
130130
cluster_spec["hypervisor_ntp_servers"] = self._list2str(
131131
cluster.get("hypervisor_ntp_servers")
132132
)
133133

134+
if cluster.get("timezone"):
135+
cluster_spec["timezone"] = cluster.get("timezone")
136+
134137
cluster_spec["cluster_members"] = cluster.get("cluster_members")
135138

136-
if len(cluster_spec["cluster_members"]) == 1:
139+
if len(cluster["cluster_members"]) == 1:
137140
cluster_spec["single_node_cluster"] = True
138141

139-
clusters.append(cluster_spec)
140-
payload["clusters"] = clusters
142+
cluster_specs.append(cluster_spec)
143+
payload["clusters"] = cluster_specs
141144
return payload, None
142145

143146
def _build_spec_hypervisor_iso(self, payload, value):

plugins/module_utils/karbon/clusters.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def validate_resources(resources, resource_type):
159159
min_cpu = 4
160160
min_memory = 8
161161
min_disk_size = 120
162+
min_etcd_disk_size = 40
162163
err = "{0} cannot be less then {1}"
163164
if (
164165
resource_type == "master"
@@ -176,6 +177,10 @@ def validate_resources(resources, resource_type):
176177
return None, err.format("cpu", min_cpu)
177178
if resources["memory_gb"] < min_memory:
178179
return None, err.format("memory_gb", min_memory)
179-
if resources["disk_gb"] < min_disk_size:
180-
return None, err.format("disk_gb", min_disk_size)
180+
if resource_type == "etcd":
181+
if resources["disk_gb"] < min_etcd_disk_size:
182+
return None, err.format("disk_gb", min_etcd_disk_size)
183+
else:
184+
if resources["disk_gb"] < min_disk_size:
185+
return None, err.format("disk_gb", min_disk_size)
181186
return resources, None

0 commit comments

Comments
 (0)