-
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.
New Modules for NDB features for 1.8.0-beta.1 release (#292)
* era basic spec design * database CRUD code * Handling new fields for era connection and fixing crud flows * Test automation for database instance crud * Minor fix * Feat/era info (#290) Info modules for NDB features Co-authored-by: alaa-bish <[email protected]> Co-authored-by: Pradeepsingh Bhati <[email protected]> Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> * Add option for version ID in software profile * Add info tests for database in crud tests * Minro update * Handling error cases * 1. Doc fixes. 2. Let entity class handle failed api errors then client code * Add example in docs * Doc fixes * Add examples * supress output for ndb tests * Minor doc update * fixing tests * Minor test fix * use nutanix_* based creds terms for ndb as well * Minor doc fix * formatting * Minor fix * ADD return Delete vms in between tests to free up space fix fix fix Doc fixes * Doc updates * Example for postgress database creation * read me changes * Docs and examples * minor fixes * Add soft delete example * Release docs update * Minor change log update Co-authored-by: Gevorg Khachatryan <[email protected]> Co-authored-by: alaa-bish <[email protected]>
- Loading branch information
1 parent
8566a90
commit 99780cd
Showing
60 changed files
with
5,407 additions
and
26 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
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
50 changes: 50 additions & 0 deletions
50
examples/ndb/provision_database_on_registered_db_server.yml
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,50 @@ | ||
--- | ||
- name: Single instance postgres database creation on registered db server | ||
hosts: localhost | ||
gather_facts: false | ||
collections: | ||
- nutanix.ncp | ||
module_defaults: | ||
group/nutanix.ncp.ntnx: | ||
nutanix_host: <ndb-era-server-ip> | ||
nutanix_username: <username> | ||
nutanix_password: <password> | ||
validate_certs: false | ||
|
||
tasks: | ||
|
||
- name: Create single instance postgres database on registered db server vm | ||
ntnx_ndb_databases: | ||
|
||
name: POSTGRES_DATABASE_ANSIBLE | ||
|
||
db_params_profile: | ||
name: DEFAULT_POSTGRES_PARAMS | ||
|
||
db_vm: | ||
use_registered_server: | ||
name: otiakmxh | ||
|
||
postgres: | ||
listener_port: "5432" | ||
db_name: prad | ||
db_password: db_password | ||
db_size: 200 | ||
|
||
time_machine: | ||
name: POSTGRES_DATABASE_ANSIBLE_TM | ||
sla: | ||
name: DEFAULT_OOB_GOLD_SLA | ||
schedule: | ||
daily: "11:00:00" | ||
weekly: WEDNESDAY | ||
monthly: 4 | ||
quaterly: JANUARY | ||
yearly: FEBRUARY | ||
log_catchup: 30 | ||
snapshots_per_day: 2 | ||
|
||
register: output | ||
|
||
- debug: | ||
msg: "{{output}}" |
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,60 @@ | ||
--- | ||
- name: Single instance postgres database creation with new db server VM | ||
hosts: localhost | ||
gather_facts: false | ||
collections: | ||
- nutanix.ncp | ||
module_defaults: | ||
group/nutanix.ncp.ntnx: | ||
nutanix_host: <ndb-era-server-ip> | ||
nutanix_username: <username> | ||
nutanix_password: <password> | ||
validate_certs: false | ||
|
||
tasks: | ||
|
||
- name: Create single instance postgres database | ||
ntnx_ndb_databases: | ||
|
||
name: POSTGRES_DATABASE_ANSIBLE | ||
|
||
db_params_profile: | ||
name: DEFAULT_POSTGRES_PARAMS | ||
|
||
db_vm: | ||
create_new_server: | ||
name: postgres_server_ansible | ||
password: temp_password | ||
cluster: | ||
name: EraCluster | ||
software_profile: | ||
name: POSTGRES_10.4_OOB | ||
network_profile: | ||
name: DEFAULT_OOB_POSTGRESQL_NETWORK | ||
compute_profile: | ||
name: DEFAULT_OOB_SMALL_COMPUTE | ||
pub_ssh_key: "<publickey-for-vm-access>" | ||
|
||
postgres: | ||
listener_port: "5432" | ||
db_name: prad | ||
db_password: db_password | ||
db_size: 200 | ||
|
||
time_machine: | ||
name: POSTGRES_DATABASE_ANSIBLE_TM | ||
sla: | ||
name: DEFAULT_OOB_GOLD_SLA | ||
schedule: | ||
daily: "11:00:00" | ||
weekly: WEDNESDAY | ||
monthly: 4 | ||
quaterly: JANUARY | ||
yearly: FEBRUARY | ||
log_catchup: 30 | ||
snapshots_per_day: 2 | ||
|
||
register: output | ||
|
||
- debug: | ||
msg: "{{output}}" |
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,25 @@ | ||
--- | ||
- name: Soft delete single instance database and time machine associated | ||
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: | ||
|
||
- name: Soft delete single instance database and time machine associated | ||
ntnx_ndb_databases: | ||
state: "absent" | ||
db_uuid: c0a4433a-49f2-40f3-ae52-d88788d2824b | ||
soft_delete: true | ||
delete_time_machine: true | ||
register: output | ||
|
||
- debug: | ||
msg: "{{output}}" |
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,41 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright: (c) 2017, Ansible Project | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
|
||
from __future__ import absolute_import, division, print_function | ||
|
||
__metaclass__ = type | ||
|
||
|
||
class ModuleDocFragment(object): | ||
|
||
# Plugin options for ntnx ndb | ||
DOCUMENTATION = r""" | ||
options: | ||
nutanix_host: | ||
description: | ||
- ndb era server IP address | ||
- C(nutanix_host). If not set then the value of the C(NUTANIX_HOST), environment variable is used. | ||
type: str | ||
required: true | ||
nutanix_password: | ||
description: | ||
- ndb era server password | ||
- C(nutanix_password). If not set then the value of the C(NUTANIX_PASSWORD), environment variable is used. | ||
type: str | ||
required: true | ||
nutanix_username: | ||
description: | ||
- ndb era server username | ||
- C(nutanix_username). If not set then the value of the C(NUTANIX_USERNAME), environment variable is used. | ||
type: str | ||
required: true | ||
validate_certs: | ||
description: | ||
- Set value to C(False) to skip validation for self signed certificates | ||
- This is not recommended for production setup | ||
- C(validate_certs). If not set then the value of the C(VALIDATE_CERTS), environment variable is used. | ||
type: bool | ||
default: 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
Oops, something went wrong.