-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feat/hosts and cluseters info modules (#231) Info modules for hosts and clusters info Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> Co-authored-by: alaa-bish <[email protected]> Co-authored-by: Pradeepsingh Bhati <[email protected]> * fix hosts and clusters * Module for PC categories (#236) Module for categories Co-authored-by: alaa-bish <[email protected]> * Module for users (#246) Users module Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> Co-authored-by: Pradeepsingh Bhati <[email protected]> * Module for Service Groups (#242) Service groups module Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> Co-authored-by: alaa-bish <[email protected]> * Module for user groups (#245) User group module Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> Co-authored-by: Pradeepsingh Bhati <[email protected]> * Feat/access control policies (#238) ACP modules Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> Co-authored-by: alaa-bish <[email protected]> Co-authored-by: Pradeepsingh Bhati <[email protected]> * New modules for Projects, Projects Info, Users Info and User Groups info (#237) Modules for projects, users info and user groups info Co-authored-by: alaa-bish <[email protected]> * fix filter examples (#227) * Permissions, Address Groups and Roles modules (#243) * Permissions module * Add meta runtime changes * Roles module * Info module for roles and minor fixes * Address groups module * Minor typo fixes * Test for roles * tests for address groups * Minor fix and formatting * Change subnet_details to subnets for address groups * roles docs * Add examples and docs * Fix info tests * Doc fix * Examples of projects and categories * Minor change * runtime changes * Var changes * skip dest create * fix tests * Minor fix * add examples * Remove quarantine uuid * sanity fix * Skip some tests * Revert disabled tests * Unskip more tests * Remove debug statements * remove debug from categoris * fix image tests * roles test fix * fix readme * Fix static routes test * Formatting * enable static routes * Minor fix * Skip project with cluster tests. IDP and OU related tests for users and user groups (#249) Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> * Skip image upload tests * update vlan ids * Read me changes * Update docs * Minor fixes and update ansible version * Fix lint * Change Log update * minor update * Minor fix * Minor changes * Minor fix * Fix sanity * Formatting * Fix sanity * Ansible version revert * Ansible version changes * readme changes * Class name changes entitiy modules * Static routes minor fix Co-authored-by: Gevorg Khachatryan <[email protected]> Co-authored-by: alaa-bish <[email protected]>
- Loading branch information
1 parent
1171943
commit 02c9c5b
Showing
175 changed files
with
9,619 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
- name: ACP 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: Create ACP with all specfactions | ||
ntnx_acps: | ||
validate_certs: False | ||
state: present | ||
nutanix_host: "{{ IP }}" | ||
nutanix_username: "{{ username }}" | ||
nutanix_password: "{{ password }}" | ||
name: acp_with_all_specfactions | ||
role: | ||
uuid: "{{ role.uuid }}" | ||
user_uuids: | ||
- "{{ user_uuid }}" | ||
user_group_uuids: | ||
- "{{ user_group_uuid }}" | ||
filters: | ||
- scope_filter: | ||
lhs: PROJECT | ||
operator: IN | ||
rhs: | ||
uuid_list: | ||
- "{{ project.uuid }}" | ||
entity_filter: | ||
lhs: ALL | ||
operator: IN | ||
rhs: | ||
collection: ALL | ||
|
||
- name: Delete ACP | ||
ntnx_acps: | ||
state: absent | ||
acp_uuid: "{{ acp_uuid }}" | ||
register: result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
- name: ACP_Info 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: List ACPs using ascending, sorting and name filter | ||
ntnx_floating_ips_info: | ||
filter: | ||
name: "{{ acp_name }}" | ||
kind: access_control_policy | ||
sort_order: "ASCENDING" | ||
sort_attribute: "name" | ||
register: result | ||
ignore_errors: True | ||
|
||
- name: List ACPs using length and offset | ||
ntnx_floating_ips_info: | ||
length: 3 | ||
offset: 0 | ||
register: result | ||
ignore_errors: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
- name: Address group crud playbook. Here we will create, update, read and delete the address group. | ||
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: Create a address group | ||
ntnx_address_groups: | ||
state: present | ||
name: test-ansible-group-1 | ||
desc: test-ansible-group-1-desc | ||
subnets: | ||
- network_ip: "10.1.1.0" | ||
network_prefix: 24 | ||
- network_ip: "10.1.2.2" | ||
network_prefix: 32 | ||
register: ag | ||
|
||
- name: update address group | ||
ntnx_address_groups: | ||
state: present | ||
address_group_uuid: "{{ag.address_group_uuid}}" | ||
name: test-ansible-group-1-updated | ||
desc: test-ansible-group-1-desc-updated | ||
subnets: | ||
- network_ip: "10.1.3.0" | ||
network_prefix: 24 | ||
register: updated_ag | ||
|
||
- name: Read the updated address group | ||
ntnx_address_groups_info: | ||
address_group_uuid: "{{updated_ag.address_group_uuid}}" | ||
register: ag_info | ||
|
||
- name: Print the address group details | ||
debug: | ||
msg: "{{ag_info}}" | ||
|
||
- name: Delete the address group. | ||
ntnx_address_groups: | ||
state: absent | ||
address_group_uuid: "{{updated_ag.address_group_uuid}}" | ||
register: op | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
- name: categories crud playbook. Here we will create, update, read and delete the category key values. | ||
hosts: localhost | ||
gather_facts: false | ||
collections: | ||
- nutanix.ncp | ||
module_defaults: | ||
group/nutanix.ncp.ntnx: | ||
nutanix_host: <pc-ip> | ||
nutanix_username: <username> | ||
nutanix_password: <password> | ||
validate_certs: false | ||
tasks: | ||
- name: Create only category key with description | ||
ntnx_categories: | ||
state: "present" | ||
name: "test-cat-1" | ||
desc: "test-cat-1-desc" | ||
register: cat1 | ||
|
||
- name: Add category values to test-cat-1 | ||
ntnx_categories: | ||
state: "present" | ||
name: "test-cat-1" | ||
values: | ||
- "val1" | ||
- "val2" | ||
|
||
- name: Create category key with values | ||
ntnx_categories: | ||
state: "present" | ||
name: "test-cat-2" | ||
desc: "test-cat-2-desc" | ||
values: | ||
- "val3" | ||
- "val4" | ||
register: cat2 | ||
|
||
- name: Add more category values to test-cat-2 | ||
ntnx_categories: | ||
state: "present" | ||
name: "test-cat-2" | ||
values: | ||
- "val5" | ||
- "val6" | ||
|
||
- name: Get categories info | ||
ntnx_categories_info: | ||
name: "test-cat-1" | ||
register: cat1_info | ||
|
||
- name: Delete val1 category value from test-cat-1 | ||
ntnx_categories: | ||
state: absent | ||
name: "test-cat-1" | ||
values: | ||
- val1 | ||
|
||
- name: delete all category values from test-cat-1 | ||
ntnx_categories: | ||
state: absent | ||
name: "test-cat-1" | ||
remove_values: true | ||
|
||
- name: delete category key test-cat-2 including its all values | ||
ntnx_categories: | ||
state: absent | ||
name: "test-cat-2" | ||
remove_values: true | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
- name: Clusters_Info 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: test getting all clusters | ||
ntnx_clusters_info: | ||
register: clusters | ||
|
||
- name: test getting particular cluster using uuid | ||
ntnx_clusters_info: | ||
cluster_uuid: '{{ clusters.response.entities[0].metadata.uuid }}' | ||
register: result | ||
|
||
- name: List clusters using length, offset, sort order and priority sort attribute | ||
ntnx_clusters_info: | ||
length: 2 | ||
offset: 0 | ||
sort_order: "ASCENDING" | ||
sort_attribute: "name" | ||
register: result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
- name: Hosts_Info 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: test getting all hosts | ||
ntnx_hosts_info: | ||
register: hosts | ||
|
||
- name: test getting particular host using uuid | ||
ntnx_hosts_info: | ||
host_uuid: '{{ hosts.response.entities[0].metadata.uuid }}' | ||
register: result | ||
|
||
- name: List hosts using length, offset, sort order and name sort attribute | ||
ntnx_hosts_info: | ||
length: 2 | ||
offset: 0 | ||
sort_order: "ASCENDING" | ||
sort_attribute: "name" | ||
register: result | ||
ignore_errors: True |
Oops, something went wrong.