diff --git a/calm/dsl/builtins/models/constants.py b/calm/dsl/builtins/models/constants.py index b257f5c3..af4d861a 100644 --- a/calm/dsl/builtins/models/constants.py +++ b/calm/dsl/builtins/models/constants.py @@ -31,6 +31,9 @@ class SYSTEM_ACTIONS: SOFT_DELETE = "soft_delete" +HIDDEN_SUFFIX = "__hidden" + + class NutanixDB: """Nutanix DB class constant for dsl models""" @@ -73,3 +76,30 @@ class Tag: """Supported Tag Constant for Nutanix DB models resource_type""" DATABASE = "Database" + + class Attrs: + """NDB constant attrs""" + + CLUSTER = "cluster" + TAGS = "tags" + DATABASE = "database" + SNAPSHOT_WITH_TIMESTAMP = "snapshot_with_timeStamp" + TIME_MACHINE = "time_machine" + SLA = "sla" + + class Profile: + """Supported Profile for Nutanix DB models""" + + SOFTWARE_PROFILE = "software_profile" + SOFTWARE_PROFILE_VERSION = "software_profile_version" + COMPUTE_PROFILE = "compute_profile" + NETWORK_PROFILE = "network_profile" + DATABASE_PARAMETER_PROFILE = "database_parameter_profile" + + class Tag: + """Supported Tag Constant for Nutanix DB models""" + + DATABASE = "database" + TIME_MACHINE = "time_machine" + CLONE = "clone" + DATABASE_SERVER = "database_server" diff --git a/calm/dsl/builtins/models/custom_entity.py b/calm/dsl/builtins/models/custom_entity.py index b1672199..b88c0abc 100644 --- a/calm/dsl/builtins/models/custom_entity.py +++ b/calm/dsl/builtins/models/custom_entity.py @@ -2,6 +2,7 @@ from calm.dsl.log import get_logging_handle from .variable import CalmVariable +from .constants import HIDDEN_SUFFIX LOG = get_logging_handle(__name__) @@ -37,7 +38,7 @@ def __init__(self, **kwargs): self.field_values = dict() for field_name in kwargs: - if field_name not in self.FIELD_MAP: + if field_name not in self.FIELD_MAP or field_name.endswith(HIDDEN_SUFFIX): raise Exception( "field {} is not mapped as a property under {}".format( field_name, self.name diff --git a/calm/dsl/builtins/models/ndb.py b/calm/dsl/builtins/models/ndb.py index 89d2576f..9bb2d16f 100644 --- a/calm/dsl/builtins/models/ndb.py +++ b/calm/dsl/builtins/models/ndb.py @@ -6,7 +6,7 @@ from calm.dsl.log import get_logging_handle from calm.dsl.api.handle import get_api_client from .calm_ref import Ref -from .constants import NutanixDB as NutanixDBConst +from .constants import NutanixDB as NutanixDBConst, HIDDEN_SUFFIX from .helper import common as common_helper from .custom_entity import CustomEntity, OutputVariables @@ -33,35 +33,37 @@ class Create(CustomEntity): """ Database Server class for Postgres Create Action includes all field supported. Attributes supported for this class: - name: Name of the database server - password: Password of the database server - cluster: Cluster to use for the database server - software_profile: Software Profile to use for the database server - software_profile_version: Version of the Software Profile to use for the database server - compute_profile: Compute Profile to use for the database server - network_profile: Netwrok Profile to use for the database server - ip_address: Static IP address for static network profile if choosen - ssh_public_key: RSA based public key to use for the database server - description: Description of the database server + name: Name of the database server, + password: Password of the database server, + cluster: Cluster to use for the database server, + software_profile: Software Profile to use for the database server, + software_profile_version: Version of the Software Profile to use for the database server, + compute_profile: Compute Profile to use for the database server, + network_profile: Netwrok Profile to use for the database server, + ip_address: Static IP address for static network profile if choosen, + ssh_public_key: RSA based public key to use for the database server, + description: Description of the database server, """ name = "Create_Postgres_DatabaseServer" DUPLICATE_KEY_MAP = { - "network_profile": "networkprofileid", + NutanixDBConst.Attrs.Profile.NETWORK_PROFILE: "networkprofileid", } FIELD_MAP = { "name": "nodes__0__vmname", "password": "vm_password", - "cluster": "nxclusterid", - "software_profile": "softwareprofileid", - "software_profile_version": "softwareprofileversionid", - "compute_profile": "computeprofileid", - "network_profile": "nodes__0__networkprofileid", + NutanixDBConst.Attrs.CLUSTER: "nxclusterid", + NutanixDBConst.Attrs.Profile.SOFTWARE_PROFILE: "softwareprofileid", + NutanixDBConst.Attrs.Profile.SOFTWARE_PROFILE_VERSION: "softwareprofileversionid", + NutanixDBConst.Attrs.Profile.COMPUTE_PROFILE: "computeprofileid", + NutanixDBConst.Attrs.Profile.NETWORK_PROFILE: "nodes__0__networkprofileid", "ssh_public_key": "sshpublickey", "description": "actionarguments__0__value", "ip_address": "nodes__0__ip_infos__0__ip_addresses__0", - "description_actionargument_key": "actionarguments__0__name", # Not visible to users - "ip_type": "nodes__0__ip_infos__0__ip_type", # Not visible to users + "description_actionargument_key" + + HIDDEN_SUFFIX: "actionarguments__0__name", # Not visible to users + "ip_type" + + HIDDEN_SUFFIX: "nodes__0__ip_infos__0__ip_type", # Not visible to users } def pre_validate(self, account): @@ -231,28 +233,28 @@ class Clone(CustomEntity): """ Database class for Postgres Clone Action includes all field supported Attributes supported for this class: - name: Name of the Postgres Instance - password: Password of the database server - cluster: Cluster to use for the database server - compute_profile: Compute Profile to use for the database server - network_profile: Netwrok Profile to use for the database server - ssh_public_key: RSA based public key to use for the database server + name: Name of the Postgres Instance, + password: Password of the database server, + cluster: Cluster to use for the database server, + compute_profile: Compute Profile to use for the database server, + network_profile: Netwrok Profile to use for the database server, + ssh_public_key: RSA based public key to use for the database server, description: Description of the database server """ name = "Clone_Postgres_DatabaseServer" DUPLICATE_KEY_MAP = { - "network_profile": "nodes__0__network_profile_id", - "cluster": "nodes__0__nx_cluster_id", - "compute_profile": "nodes__0__compute_profile_id", + NutanixDBConst.Attrs.Profile.NETWORK_PROFILE: "nodes__0__network_profile_id", + NutanixDBConst.Attrs.CLUSTER: "nodes__0__nx_cluster_id", + NutanixDBConst.Attrs.Profile.COMPUTE_PROFILE: "nodes__0__compute_profile_id", "name": "nodes__0__vm_name", } FIELD_MAP = { "name": "postgresql_info__0__vm_name", "password": "vm_password", - "cluster": "nx_cluster_id", - "compute_profile": "compute_profile_id", - "network_profile": "network_profile_id", + NutanixDBConst.Attrs.CLUSTER: "nx_cluster_id", + NutanixDBConst.Attrs.Profile.COMPUTE_PROFILE: "compute_profile_id", + NutanixDBConst.Attrs.Profile.NETWORK_PROFILE: "network_profile_id", "ssh_public_key": "ssh_public_key", "description": "description", "node_count": "node_count", @@ -327,22 +329,22 @@ class Create(CustomEntity): """ Database class for Postgres Create Action includes all field supported Attributes supported for this class: - name: Name of the Postgres Instance - description: Description of the Postgres Instance - database_parameter_profile: Database Parameter Profile to use for Postgres Instance - initial_database_name: Intial Database name to use for Postgres Instance - initial_database_password: Intial Database password to use for Postgres Instance - listener_port: Listener Port to use for Postgres Instance - size: Size of the Postgres Instance - pre_create_script: Script to run before creating the Postgres Instance - post_create_script: Script to run after creating the Postgres Instance + name: Name of the Postgres Instance, + description: Description of the Postgres Instance, + database_parameter_profile: Database Parameter Profile to use for Postgres Instance, + initial_database_name: Intial Database name to use for Postgres Instance, + initial_database_password: Intial Database password to use for Postgres Instance, + listener_port: Listener Port to use for Postgres Instance, + size: Size of the Postgres Instance, + pre_create_script: Script to run before creating the Postgres Instance, + post_create_script: Script to run after creating the Postgres Instance, """ name = "Create_Postgres_Database" FIELD_MAP = { "name": "name", "description": "description", - "database_parameter_profile": "dbparameterprofileid", + NutanixDBConst.Attrs.Profile.DATABASE_PARAMETER_PROFILE: "dbparameterprofileid", "initial_database_name": "postgresql_info__0__database_names", "initial_database_password": "postgresql_info__0__db_password", "listener_port": "postgresql_info__0__listener_port", @@ -379,11 +381,11 @@ class Delete(CustomEntity): """ Database class for Postgres Delete Action includes all field supported Attributes supported for this class: - name: Name of the Postgres Instance + database: Ref of the Postgres Instance """ name = "Delete_Postgres_Database" - FIELD_MAP = {"name": "id"} + FIELD_MAP = {NutanixDBConst.Attrs.DATABASE: "id"} def pre_validate(self, account): """ @@ -410,16 +412,16 @@ class RestoreFromTimeMachine(CustomEntity): """ Database class for Postgres Restore from Time Machine Action includes all field supported Attributes supported for this class: - database: Name of the Postgres Instance - snapshot_with_timeStamp: Name of the snapshot along with TimeStamp (yyyy-mm-dd hh:mm:ss), Eg-> "era_auto_snapshot (2023-02-12 10:01:40)" - point in time: point in Time to Restore yyyy-mm-dd hh:mm:ss, Eg -> "2023-02-12 10:01:40" - time_zone: Time Zone of the snapshot/point in time (If not given defaults to system timezone) + database: Name of the Postgres Instance, + snapshot_with_timeStamp: Name of the snapshot along with TimeStamp (yyyy-mm-dd hh:mm:ss), Eg-> "era_auto_snapshot (2023-02-12 10:01:40)", + point in time: point in Time to Restore yyyy-mm-dd hh:mm:ss, Eg -> "2023-02-12 10:01:40", + time_zone: Time Zone of the snapshot/point in time (If not given defaults to system timezone), """ name = "Restore_From_TimeMachine_Postgres_Database" FIELD_MAP = { - "database": "database_id", - "snapshot_with_timeStamp": "snapshot_id", + NutanixDBConst.Attrs.DATABASE: "database_id", + NutanixDBConst.Attrs.SNAPSHOT_WITH_TIMESTAMP: "snapshot_id", "point_in_time": "user_pitr_timestamp", "time_zone": "time_zone_pitr", } @@ -529,19 +531,20 @@ class CreateSnapshot(CustomEntity): """ Database class for Postgres Snapshot Action includes all field supported Attributes supported for this class: - snapshot_name: (String) Snapshot Name - remove_schedule_in_days: (Integer) Removal Schedule - time_machine: (String) Time Machine Name - database: (String) Database Name + snapshot_name: (String) Snapshot Name, + remove_schedule_in_days: (Integer) Removal Schedule, + time_machine: (String) Time Machine Name, + database: (String) Database Name, """ name = "Create_Snaphost_Postgres_Database" FIELD_MAP = { "snapshot_name": "name", - "time_machine": "time_machine_id", - "database": "time_machine_id_from_database", + NutanixDBConst.Attrs.TIME_MACHINE: "time_machine_id", + NutanixDBConst.Attrs.DATABASE: "time_machine_id_from_database", "remove_schedule_in_days": "remove_schedule_in_days", - "is_removal_configured": "is_removal_configured", + "is_removal_configured" + + HIDDEN_SUFFIX: "is_removal_configured", # Not visible to users } def pre_validate(self, account): @@ -605,12 +608,12 @@ class Clone(CustomEntity): """ Database class for Postgres Clone Action includes all field supported Attributes supported for this class: - name: Name of the Postgres Instance - description: Description of the Postgres Instance - password: Password of the Postgres Instance - database_parameter_profile: Database Parameter Profile to use for Postgres Instance - pre_clone_cmd: Script to run before creating the Postgres Instance - post_clone_cmd: Script to run after creating the Postgres Instance + name: Name of the Postgres Instance, + description: Description of the Postgres Instance, + password: Password of the Postgres Instance, + database_parameter_profile: Database Parameter Profile to use for Postgres Instance, + pre_clone_cmd: Script to run before creating the Postgres Instance, + post_clone_cmd: Script to run after creating the Postgres Instance, """ name = "Clone_Postgres_Database" @@ -618,7 +621,7 @@ class Clone(CustomEntity): FIELD_MAP = { "name": "name", "description": "description", - "database_parameter_profile": "database_parameter_profile_id", + NutanixDBConst.Attrs.Profile.DATABASE_PARAMETER_PROFILE: "database_parameter_profile_id", "password": "postgresql_info__0__db_password", "pre_clone_cmd": "postgresql_info__0__pre_clone_cmd", "post_clone_cmd": "postgresql_info__0__post_clone_cmd", @@ -669,24 +672,24 @@ class Create(CustomEntity): """ TimeMachine class for Postgres Create Action includes all field supported Attributes supported for this class: - name: Name of the Time Machine - description: Description of the Time Machine - sla: SLA to use for the Time Machine - snapshottimeofday__hours: Hour of the day to take Snapshot - snapshottimeofday__minutes: Minute of the day to take Snapshot - snapshottimeofday__seconds: Second of the day to take Snapshot - snapshots_perday: Snapshots to take Per day - logbackup_interval: Log Backup Interval in minutes - weeklyschedule__dayofweek: Weekly Snapshot day of the week - monthlyschedule__dayofmonth: Monthly Snaphot day of the month - quartelyschedule__startmonth: Quarterly Snapshot start of the month + name: Name of the Time Machine, + description: Description of the Time Machine, + sla: SLA to use for the Time Machine, + snapshottimeofday__hours: Hour of the day to take Snapshot, + snapshottimeofday__minutes: Minute of the day to take Snapshot, + snapshottimeofday__seconds: Second of the day to take Snapshot, + snapshots_perday: Snapshots to take Per day, + logbackup_interval: Log Backup Interval in minutes, + weeklyschedule__dayofweek: Weekly Snapshot day of the week, + monthlyschedule__dayofmonth: Monthly Snaphot day of the month, + quartelyschedule__startmonth: Quarterly Snapshot start of the month, """ name = "Create_Postgres_TimeMachine" FIELD_MAP = { "name": "timemachineinfo__0__name", "description": "timemachineinfo__0__description", - "sla": "timemachineinfo__0__slaid", + NutanixDBConst.Attrs.SLA: "timemachineinfo__0__slaid", "snapshottimeofday__hours": "timemachineinfo__0__schedule__0__snapshottimeofday__0__hours", "snapshottimeofday__minutes": "timemachineinfo__0__schedule__0__snapshottimeofday__0__minutes", "snapshottimeofday__seconds": "timemachineinfo__0__schedule__0__snapshottimeofday__0__seconds", @@ -768,22 +771,22 @@ class Clone(CustomEntity): """ TimeMachine class for Postgres Clone Action includes all field supported Attributes supported for this class: - time_machine_name: Name of the Time Machine - snapshot_with_timeStamp: Name of the snapshot along with TimeStamp (yyyy-mm-dd hh:mm:ss), Eg-> "era_auto_snapshot (2023-02-12 10:01:40)" - point in time: point in Time to Restore yyyy-mm-dd hh:mm:ss, Eg -> "2023-02-12 10:01:40" - time_zone: Time Zone of the snapshot/point in time (If not given defaults to system timezone) - expiry_days: Number of days to expire - expiry_date_timezone : Timezone to be used for expiry date - delete_database: Boolean input for deletion of database - refresh_in_days: Number of days to refresh - refresh_time: Time at which refresh should trigger - refresh_date_timezone: Timezone for the refresh time + time_machine: Name of the Time Machine, + snapshot_with_timeStamp: Name of the snapshot along with TimeStamp (yyyy-mm-dd hh:mm:ss), Eg-> "era_auto_snapshot (2023-02-12 10:01:40)", + point in time: point in Time to Restore yyyy-mm-dd hh:mm:ss, Eg -> "2023-02-12 10:01:40", + time_zone: Time Zone of the snapshot/point in time (If not given defaults to system timezone), + expiry_days: Number of days to expire, + expiry_date_timezone : Timezone to be used for expiry date, + delete_database: Boolean input for deletion of database, + refresh_in_days: Number of days to refresh, + refresh_time: Time at which refresh should trigger, + refresh_date_timezone: Timezone for the refresh time, """ name = "Clone_Postgres_TimeMachine" FIELD_MAP = { - "time_machine_name": "time_machine_id", - "snapshot_with_timeStamp": "snapshot_id", + NutanixDBConst.Attrs.TIME_MACHINE: "time_machine_id", + NutanixDBConst.Attrs.SNAPSHOT_WITH_TIMESTAMP: "snapshot_id", "point_in_time": "user_pitr_timestamp", "time_zone": "time_zone", "expiry_days": "lcm_config__0__database_lcm_config__0__expiry_details__0__expire_in_days", @@ -792,8 +795,10 @@ class Clone(CustomEntity): "refresh_in_days": "lcm_config__0__database_lcm_config__0__refresh_details__0__refresh_in_days", "refresh_time": "lcm_config__0__database_lcm_config__0__refresh_details__0__refresh_time", "refresh_date_timezone": "lcm_config__0__database_lcm_config__0__refresh_details__0__refresh_date_timezone", - "schedule_data_refresh": "schedule_data_refresh", - "remove_schedule": "remove_schedule", + "schedule_data_refresh" + + HIDDEN_SUFFIX: "schedule_data_refresh", # Not visible to users + "remove_schedule" + + HIDDEN_SUFFIX: "remove_schedule", # Not visible to users } def pre_validate(self, account): @@ -922,14 +927,14 @@ class Create(CustomEntity): """ Tag class for Create Action includes all field supported Attributes supported for this class: - database_tags: array of NDB Database Tag Ref. Eg -> [ Ref.NutanixDB.Tag.Database(name1, value1), Ref.NutanixDB.Tag.Database(name=name2, value=value2) ] - time_machine_tags: array of NDB TimeMachine Tag Ref. Eg -> [ Ref.NutanixDB.Tag.TimeMachine(name=name1, value=value1), Ref.NutanixDB.Tag.TimeMachine(name2, value2) ] + database: array of NDB Database Tag Ref. Eg -> [ Ref.NutanixDB.Tag.Database(name1, value1), Ref.NutanixDB.Tag.Database(name=name2, value=value2) ], + time_machine: array of NDB TimeMachine Tag Ref. Eg -> [ Ref.NutanixDB.Tag.TimeMachine(name=name1, value=value1), Ref.NutanixDB.Tag.TimeMachine(name2, value2) ], """ name = "Create_Tag" FIELD_MAP = { - "database_tags": "tags", - "time_machine_tags": "timemachineinfo__0__tags", + NutanixDBConst.Attrs.Tag.DATABASE: "tags", + NutanixDBConst.Attrs.Tag.TIME_MACHINE: "timemachineinfo__0__tags", } def pre_validate(self, account): @@ -981,12 +986,12 @@ class Clone(CustomEntity): """ Tag class for Clone Action includes all field supported Attributes supported for this class: - tags: array of NDB Clone Tag Ref. Eg -> [ Ref.NutanixDB.Tag.Clone(name1, value1), Ref.NutanixDB.Tag.Clone(name=name2, value=value2) ] + clone: array of NDB Clone Tag Ref. Eg -> [ Ref.NutanixDB.Tag.Clone(name1, value1), Ref.NutanixDB.Tag.Clone(name=name2, value=value2) ] """ name = "Clone_Tag" FIELD_MAP = { - "tags": "tags", + NutanixDBConst.Attrs.Tag.CLONE: "tags", } def pre_validate(self, account): diff --git a/calm/dsl/decompile/ndb.py b/calm/dsl/decompile/ndb.py new file mode 100644 index 00000000..0273a705 --- /dev/null +++ b/calm/dsl/decompile/ndb.py @@ -0,0 +1,385 @@ +import sys +import json + +from calm.dsl.db.table_config import ResourceTypeCache +from calm.dsl.builtins.models.ndb import ( + DatabaseServer, + Database, + TimeMachine, + PostgresDatabaseOutputVariables, + Tag, +) +from calm.dsl.builtins.models.constants import ( + NutanixDB as NutanixDBConst, + HIDDEN_SUFFIX, +) +from calm.dsl.builtins.models.helper import common as common_helper +from calm.dsl.constants import CACHE +from calm.dsl.store import Cache + +from calm.dsl.log import get_logging_handle + +LOG = get_logging_handle(__name__) +KEY_SEPERATOR = "_" + +entities_map = { + NutanixDBConst.Attrs.DATABASE: { + "cache": CACHE.NDB_ENTITY.DATABASE, + "ref": "Ref.NutanixDB.Database", + }, + NutanixDBConst.Attrs.SLA: { + "cache": CACHE.NDB_ENTITY.SLA, + "ref": "Ref.NutanixDB.SLA", + }, + NutanixDBConst.Attrs.CLUSTER: { + "cache": CACHE.NDB_ENTITY.CLUSTER, + "ref": "Ref.NutanixDB.Cluster", + }, + NutanixDBConst.Attrs.SNAPSHOT_WITH_TIMESTAMP: { + "cache": CACHE.NDB_ENTITY.SNAPSHOT, + "ref": "Ref.NutanixDB.Snapshot", + }, + NutanixDBConst.Attrs.TIME_MACHINE: { + "cache": CACHE.NDB_ENTITY.TIME_MACHINE, + "ref": "Ref.NutanixDB.TimeMachine", + }, + # Profiles + NutanixDBConst.Attrs.Profile.COMPUTE_PROFILE: { + "cache": CACHE.NDB_ENTITY.PROFILE, + "ref": "Ref.NutanixDB.Profile.Compute", + }, + NutanixDBConst.Attrs.Profile.NETWORK_PROFILE: { + "cache": CACHE.NDB_ENTITY.PROFILE, + "ref": "Ref.NutanixDB.Profile.Network", + }, + NutanixDBConst.Attrs.Profile.DATABASE_PARAMETER_PROFILE: { + "cache": CACHE.NDB_ENTITY.PROFILE, + "ref": "Ref.NutanixDB.Profile.Database_Parameter", + }, + NutanixDBConst.Attrs.Profile.SOFTWARE_PROFILE: { + "cache": CACHE.NDB_ENTITY.PROFILE, + "ref": "Ref.NutanixDB.Profile.Software", + }, + NutanixDBConst.Attrs.Profile.SOFTWARE_PROFILE_VERSION: { + "cache": CACHE.NDB_ENTITY.PROFILE, + "ref": "Ref.NutanixDB.Profile.Software_Version", + }, +} + +# Tag options +tags_map = { + NutanixDBConst.Attrs.TAGS + + KEY_SEPERATOR + + NutanixDBConst.Attrs.Tag.DATABASE: "Ref.NutanixDB.Tag.Database", + NutanixDBConst.Attrs.TAGS + + KEY_SEPERATOR + + NutanixDBConst.Attrs.Tag.DATABASE_SERVER: "Ref.NutanixDB.Tag.DatabaseServer", + NutanixDBConst.Attrs.TAGS + + KEY_SEPERATOR + + NutanixDBConst.Attrs.Tag.TIME_MACHINE: "Ref.NutanixDB.Tag.TimeMachine", + NutanixDBConst.Attrs.TAGS + + KEY_SEPERATOR + + NutanixDBConst.Attrs.Tag.CLONE: "Ref.NutanixDB.Tag.Clone", +} + + +def set_ndb_calm_reference(inarg_var_name, inarg_var_value): + if not common_helper.is_not_macro(inarg_var_value): + return {"value": inarg_var_value, "type": "Non_Ref"} + + if inarg_var_name in entities_map: + entity_map = entities_map[inarg_var_name] + obj = Cache.get_entity_data_using_uuid( + CACHE.NDB + CACHE.KEY_SEPARATOR + entity_map["cache"], inarg_var_value + ) + return {"value": obj.get("name", ""), "type": "Ref", "ref": entity_map["ref"]} + if inarg_var_name in tags_map: + try: + tags = json.loads(inarg_var_value) + tag_values = [] + for tag in tags: + tag_cache_data = Cache.get_entity_data_using_uuid( + CACHE.NDB + CACHE.KEY_SEPARATOR + CACHE.NDB_ENTITY.TAG, + tag.get("tag_id", ""), + ) + tag_values.append( + { + "name": tag_cache_data.get("name", ""), + "value": tag.get("value", ""), + } + ) + + return { + "value": tag_values, + "type": "Tag_Ref", + "ref": tags_map[inarg_var_name], + } + except Exception as exc: + LOG.error( + "tag load failed for the value: {} with error {}".format(tags, exc) + ) + return {"value": [], "type": "Non_Ref"} + else: + return {"value": inarg_var_value, "type": "Non_Ref"} + + +def create_ndb_task_user_attrs( + task_name, + account_name, + rt_task, + inarg_list, + output_variable, + database_server_map=None, + database_map=None, + time_machine_map=None, + tag_map=None, + output_variable_map=None, +): + + output_var_attrs = {} + database_server_attrs = {} + database_attrs = {} + time_machine_attrs = {} + tag_attrs = {} + + database_server_reverse_field_map = ( + {v: k for k, v in database_server_map.items()} if database_server_map else {} + ) + database_reverse_field_map = ( + {v: k for k, v in database_map.items()} if database_map else {} + ) + time_machine_reverse_field_map = ( + {v: k for k, v in time_machine_map.items()} if time_machine_map else {} + ) + tag_reverse_field_map = {v: k for k, v in tag_map.items()} if tag_map else {} + output_vars_reverse_field_map = ( + {v: k for k, v in output_variable_map.items()} if output_variable_map else {} + ) + + for inarg in inarg_list: + modified_var_name = "" + if len(inarg["name"]) > len(rt_task) + 2: + modified_var_name = inarg["name"][len(rt_task) + 2 :] + + if ( + modified_var_name in database_server_reverse_field_map + and not database_server_reverse_field_map[modified_var_name].endswith( + HIDDEN_SUFFIX + ) + ): + database_server_attrs[ + database_server_reverse_field_map[modified_var_name] + ] = set_ndb_calm_reference( + database_server_reverse_field_map[modified_var_name], inarg["value"] + ) + elif ( + modified_var_name in database_reverse_field_map + and not database_reverse_field_map[modified_var_name].endswith( + HIDDEN_SUFFIX + ) + ): + database_attrs[ + database_reverse_field_map[modified_var_name] + ] = set_ndb_calm_reference( + database_reverse_field_map[modified_var_name], inarg["value"] + ) + elif ( + modified_var_name in time_machine_reverse_field_map + and not time_machine_reverse_field_map[modified_var_name].endswith( + HIDDEN_SUFFIX + ) + ): + time_machine_attrs[ + time_machine_reverse_field_map[modified_var_name] + ] = set_ndb_calm_reference( + time_machine_reverse_field_map[modified_var_name], inarg["value"] + ) + elif modified_var_name in tag_reverse_field_map and not tag_reverse_field_map[ + modified_var_name + ].endswith(HIDDEN_SUFFIX): + tag_attrs[ + tag_reverse_field_map[modified_var_name] + ] = set_ndb_calm_reference( + NutanixDBConst.Attrs.TAGS + + KEY_SEPERATOR + + tag_reverse_field_map[modified_var_name], + inarg["value"], + ) + + for value, output_var in output_variable.items(): + if output_var in output_vars_reverse_field_map: + output_var_attrs[output_vars_reverse_field_map[output_var]] = value + + return { + "name": task_name, + "account": account_name, + "output_vars": output_var_attrs, + "database_server": database_server_attrs, + "database": database_attrs, + "time_machine": time_machine_attrs, + "tag": tag_attrs, + } + + +def get_schema_file_and_user_attrs_for_postgres_create( + task_name, account_name, rt_task, inarg_list, output_vars +): + user_attrs = create_ndb_task_user_attrs( + task_name, + account_name, + rt_task, + inarg_list, + output_vars, + DatabaseServer.Postgres.Create.FIELD_MAP, + Database.Postgres.Create.FIELD_MAP, + TimeMachine.Postgres.Create.FIELD_MAP, + Tag.Create.FIELD_MAP, + PostgresDatabaseOutputVariables.Create.FIELD_MAP, + ) + + return "ndb_postgres_create.py.jinja2", user_attrs + + +def get_schema_file_and_user_attrs_for_postgres_clone( + task_name, account_name, rt_task, inarg_list, output_vars +): + user_attrs = create_ndb_task_user_attrs( + task_name, + account_name, + rt_task, + inarg_list, + output_vars, + DatabaseServer.Postgres.Clone.FIELD_MAP, + Database.Postgres.Clone.FIELD_MAP, + TimeMachine.Postgres.Clone.FIELD_MAP, + Tag.Clone.FIELD_MAP, + PostgresDatabaseOutputVariables.Clone.FIELD_MAP, + ) + + return "ndb_postgres_clone.py.jinja2", user_attrs + + +def get_schema_file_and_user_attrs_for_postgres_delete( + task_name, account_name, rt_task, inarg_list, output_vars +): + user_attrs = create_ndb_task_user_attrs( + task_name, + account_name, + rt_task, + inarg_list, + output_vars, + None, + Database.Postgres.Delete.FIELD_MAP, + ) + + return "ndb_postgres_delete.py.jinja2", user_attrs + + +def get_schema_file_and_user_attrs_for_postgres_restore( + task_name, account_name, rt_task, inarg_list, output_vars +): + user_attrs = create_ndb_task_user_attrs( + task_name, + account_name, + rt_task, + inarg_list, + output_vars, + None, + Database.Postgres.RestoreFromTimeMachine.FIELD_MAP, + None, + None, + PostgresDatabaseOutputVariables.RestoreFromTimeMachine.FIELD_MAP, + ) + + return "ndb_postgres_restore.py.jinja2", user_attrs + + +def get_schema_file_and_user_attrs_for_postgres_create_snapshot( + task_name, account_name, rt_task, inarg_list, output_vars +): + user_attrs = create_ndb_task_user_attrs( + task_name, + account_name, + rt_task, + inarg_list, + output_vars, + None, + Database.Postgres.CreateSnapshot.FIELD_MAP, + None, + None, + PostgresDatabaseOutputVariables.CreateSnapshot.FIELD_MAP, + ) + + return "ndb_postgres_create_snapshot.py.jinja2", user_attrs + + +rt_action_class_map = { + ( + NutanixDBConst.RESOURCE_TYPE.POSTGRES_DATABASE, + NutanixDBConst.ACTION_TYPE.CREATE, + ): get_schema_file_and_user_attrs_for_postgres_create, + ( + NutanixDBConst.RESOURCE_TYPE.POSTGRES_DATABASE, + NutanixDBConst.ACTION_TYPE.CLONE, + ): get_schema_file_and_user_attrs_for_postgres_clone, + ( + NutanixDBConst.RESOURCE_TYPE.POSTGRES_DATABASE, + NutanixDBConst.ACTION_TYPE.DELETE, + ): get_schema_file_and_user_attrs_for_postgres_delete, + ( + NutanixDBConst.RESOURCE_TYPE.POSTGRES_DATABASE, + NutanixDBConst.ACTION_TYPE.RESTORE_FROM_TIME_MACHINE, + ): get_schema_file_and_user_attrs_for_postgres_restore, + ( + NutanixDBConst.RESOURCE_TYPE.POSTGRES_DATABASE, + NutanixDBConst.ACTION_TYPE.CREATE_SNAPSHOT, + ): get_schema_file_and_user_attrs_for_postgres_create_snapshot, +} + + +def get_schema_file_and_user_attrs(task_name, attrs, account_name): + resource_type_uuid = attrs.get("resource_type_reference", {}).get("uuid", "") + action_uuid = attrs.get("action_reference", {}).get("uuid", "") + resource_type_cached_data = ResourceTypeCache.get_entity_data_using_uuid( + uuid=resource_type_uuid + ) + if not resource_type_cached_data: + LOG.error("resource_type not found in NDB provider") + sys.exit( + "resource_type uuid {} not found in NDB provider".format(resource_type_uuid) + ) + + for action in resource_type_cached_data["action_list"]: + if action_uuid == action["uuid"]: + rt_task = action["runbook"]["task_definition_list"][1]["name"] + modified_rt_task = "-".join(rt_task.lower().split()) + if ( + resource_type_cached_data["name"], + action["name"], + ) not in rt_action_class_map.keys(): + LOG.error( + "decompile for resource type {} and action {} not in rt_action_class_map".format( + resource_type_cached_data["name"], action["name"] + ) + ) + sys.exit("Decompile failed for RT_Operation task") + return rt_action_class_map[ + (resource_type_cached_data["name"], action["name"]) + ]( + task_name=task_name, + account_name=account_name, + rt_task=modified_rt_task, + inarg_list=attrs["inarg_list"], + output_vars=attrs["output_variables"], + ) + + LOG.error( + "No action uuid {} found in resource type {}".format( + action_uuid, resource_type_cached_data["name"] + ) + ) + sys.exit( + "No action uuid {} found in resource type {}".format( + action_uuid, resource_type_cached_data["name"] + ) + ) diff --git a/calm/dsl/decompile/schemas/ndb_postgres_clone.py.jinja2 b/calm/dsl/decompile/schemas/ndb_postgres_clone.py.jinja2 new file mode 100644 index 00000000..7c586e69 --- /dev/null +++ b/calm/dsl/decompile/schemas/ndb_postgres_clone.py.jinja2 @@ -0,0 +1,58 @@ +{% macro database_server_clone(obj) %} +DatabaseServer.Postgres.Clone( + {%- for key, val in obj.items() %} + {{ key }}={% if val.type == "Ref" %}{{val.ref}}('{{val.value}}'){% else %} '{{val.value}}' {% endif %}, + {%- endfor %} +) +{% endmacro %} + +{% macro database_clone(obj) %} +Database.Postgres.Clone( + {%- for key, val in obj.items() %} + {{ key }}={% if val.type == "Ref" %}{{val.ref}}('{{val.value}}'){% else %} '{{val.value}}' {% endif %}, + {%- endfor %} +) +{% endmacro %} + +{% macro time_machine_clone(obj) %} +TimeMachine.Postgres.Clone( + {%- for key, val in obj.items() %} + {{ key }}={% if val.type == "Ref" %}{{val.ref}}('{{val.value}}'){% else %} '{{val.value}}' {% endif %}, + {%- endfor %} +) +{% endmacro %} + +{% macro tag_clone(obj) %} +Tag.Clone( + {%- for key, obj_val in obj.items() %} + {{ key }}=[ + {%- for val in obj_val.value %} + {{obj_val.ref}}('{{val.name}}', '{{val.value}}'), + {%- endfor %} + ], + {%- endfor %} +) +{% endmacro %} + +{% macro output_vars_clone(obj) %} +PostgresDatabaseOutputVariables.Clone( + {%- for key, val in obj.items() %} + {{ key }}='{{ val }}', + {%- endfor %} +) +{% endmacro %} + +{% macro nutanix_db_postgres_clone(obj) %} +CalmTask.NutanixDB.PostgresDatabase.Clone( + name='{{ obj.name }}', + account=Ref.Account('{{ obj.account }}'), + database_server_config={{ database_server_clone(obj.database_server) }}, + instance_config={{ database_clone(obj.database) }}, + timemachine_config={{ time_machine_clone(obj.time_machine) }}, + tag_config={{ tag_clone(obj.tag) }}, + outargs={{ output_vars_clone(obj.output_vars) }} + +) +{% endmacro %} + +{{ nutanix_db_postgres_clone(obj) }} diff --git a/calm/dsl/decompile/schemas/ndb_postgres_create.py.jinja2 b/calm/dsl/decompile/schemas/ndb_postgres_create.py.jinja2 new file mode 100644 index 00000000..bef0127c --- /dev/null +++ b/calm/dsl/decompile/schemas/ndb_postgres_create.py.jinja2 @@ -0,0 +1,58 @@ +{% macro database_server_create(obj) %} +DatabaseServer.Postgres.Create( + {%- for key, val in obj.items() %} + {{ key }}={% if val.type == "Ref" %}{{val.ref}}('{{val.value}}'){% else %} '{{val.value}}' {% endif %}, + {%- endfor %} +) +{% endmacro %} + +{% macro database_create(obj) %} +Database.Postgres.Create( + {%- for key, val in obj.items() %} + {{ key }}={% if val.type == "Ref" %}{{val.ref}}('{{val.value}}'){% else %} '{{val.value}}' {% endif %}, + {%- endfor %} +) +{% endmacro %} + +{% macro time_machine_create(obj) %} +TimeMachine.Postgres.Create( + {%- for key, val in obj.items() %} + {{ key }}={% if val.type == "Ref" %}{{val.ref}}('{{val.value}}'){% else %} '{{val.value}}' {% endif %}, + {%- endfor %} +) +{% endmacro %} + +{% macro tag_create(obj) %} +Tag.Create( + {%- for key, obj_val in obj.items() %} + {{ key }}=[ + {%- for val in obj_val.value %} + {{obj_val.ref}}('{{val.name}}', '{{val.value}}'), + {%- endfor %} + ], + {%- endfor %} +) +{% endmacro %} + +{% macro output_vars_create(obj) %} +PostgresDatabaseOutputVariables.Create( + {%- for key, val in obj.items() %} + {{ key }}='{{ val }}', + {%- endfor %} +) +{% endmacro %} + +{% macro nutanix_db_postgres_create(obj) %} +CalmTask.NutanixDB.PostgresDatabase.Create( + name='{{ obj.name }}', + account=Ref.Account('{{ obj.account }}'), + database_server_config={{ database_server_create(obj.database_server) }}, + instance_config={{ database_create(obj.database) }}, + timemachine_config={{ time_machine_create(obj.time_machine) }}, + tag_config={{ tag_create(obj.tag) }}, + outargs={{ output_vars_create(obj.output_vars) }} + +) +{% endmacro %} + +{{ nutanix_db_postgres_create(obj) }} diff --git a/calm/dsl/decompile/schemas/ndb_postgres_create_snapshot.py.jinja2 b/calm/dsl/decompile/schemas/ndb_postgres_create_snapshot.py.jinja2 new file mode 100644 index 00000000..771ceb30 --- /dev/null +++ b/calm/dsl/decompile/schemas/ndb_postgres_create_snapshot.py.jinja2 @@ -0,0 +1,27 @@ +{% macro database_create_snapshot(obj) %} +Database.Postgres.CreateSnapshot( + {%- for key, val in obj.items() %} + {{ key }}={% if val.type == "Ref" %}{{val.ref}}('{{val.value}}'){% else %} '{{val.value}}' {% endif %}, + {%- endfor %} +) +{% endmacro %} + + +{% macro output_vars_create_snapshot(obj) %} +PostgresDatabaseOutputVariables.CreateSnapshot( + {%- for key, val in obj.items() %} + {{ key }}='{{ val }}', + {%- endfor %} +) +{% endmacro %} + +{% macro nutanix_db_postgres_create_snapshot(obj) %} +CalmTask.NutanixDB.PostgresDatabase.CreateSnapshot( + name='{{ obj.name }}', + account=Ref.Account('{{ obj.account }}'), + instance_config={{ database_create_snapshot(obj.database) }}, + outargs={{ output_vars_create_snapshot(obj.output_vars) }}, +) +{% endmacro %} + +{{ nutanix_db_postgres_create_snapshot(obj) }} diff --git a/calm/dsl/decompile/schemas/ndb_postgres_delete.py.jinja2 b/calm/dsl/decompile/schemas/ndb_postgres_delete.py.jinja2 new file mode 100644 index 00000000..8271aca7 --- /dev/null +++ b/calm/dsl/decompile/schemas/ndb_postgres_delete.py.jinja2 @@ -0,0 +1,18 @@ +{% macro database_delete(obj) %} +Database.Postgres.Delete( + {%- for key, val in obj.items() %} + {{ key }}={% if val.type == "Ref" %}{{val.ref}}('{{val.value}}'){% else %} '{{val.value}}' {% endif %}, + {%- endfor %} +) +{% endmacro %} + + +{% macro nutanix_db_postgres_delete(obj) %} +CalmTask.NutanixDB.PostgresDatabase.Delete( + name='{{ obj.name }}', + account=Ref.Account('{{ obj.account }}'), + instance_config={{ database_delete(obj.database) }}, +) +{% endmacro %} + +{{ nutanix_db_postgres_delete(obj) }} diff --git a/calm/dsl/decompile/schemas/ndb_postgres_restore.py.jinja2 b/calm/dsl/decompile/schemas/ndb_postgres_restore.py.jinja2 new file mode 100644 index 00000000..1a87741b --- /dev/null +++ b/calm/dsl/decompile/schemas/ndb_postgres_restore.py.jinja2 @@ -0,0 +1,27 @@ +{% macro database_restore(obj) %} +Database.Postgres.RestoreFromTimeMachine( + {%- for key, val in obj.items() %} + {{ key }}={% if val.type == "Ref" %}{{val.ref}}('{{val.value}}'){% else %} '{{val.value}}' {% endif %}, + {%- endfor %} +) +{% endmacro %} + + +{% macro output_vars_restore(obj) %} +PostgresDatabaseOutputVariables.RestoreFromTimeMachine( + {%- for key, val in obj.items() %} + {{ key }}='{{ val }}', + {%- endfor %} +) +{% endmacro %} + +{% macro nutanix_db_postgres_restore(obj) %} +CalmTask.NutanixDB.PostgresDatabase.RestoreFromTimeMachine( + name='{{ obj.name }}', + account=Ref.Account('{{ obj.account }}'), + instance_config={{ database_restore(obj.database) }}, + outargs={{ output_vars_restore(obj.output_vars) }}, +) +{% endmacro %} + +{{ nutanix_db_postgres_restore(obj) }} diff --git a/calm/dsl/decompile/task.py b/calm/dsl/decompile/task.py index 3ad9588f..8eaa744c 100644 --- a/calm/dsl/decompile/task.py +++ b/calm/dsl/decompile/task.py @@ -1,10 +1,14 @@ import os +import sys from calm.dsl.decompile.render import render_template +from calm.dsl.decompile.ndb import get_schema_file_and_user_attrs from calm.dsl.decompile.ref import render_ref_template from calm.dsl.decompile.credential import get_cred_var_name from calm.dsl.decompile.file_handler import get_scripts_dir, get_scripts_dir_key from calm.dsl.builtins import TaskType +from calm.dsl.db.table_config import AccountCache + from calm.dsl.builtins.models.task import EXIT_CONDITION_MAP from calm.dsl.log import get_logging_handle @@ -165,6 +169,20 @@ def render_task_template( "config": CONFIG_SPEC_MAP[config_name]["global_name"], } schema_file = "task_call_config.py.jinja2" + elif cls.type == "RT_OPERATION": + acc_uuid = cls.attrs["account_reference"]["uuid"] + account_cache_data = AccountCache.get_entity_data_using_uuid(uuid=acc_uuid) + if account_cache_data["provider_type"] == "NDB": + schema_file, user_attrs = get_schema_file_and_user_attrs( + cls.name, cls.attrs, account_cache_data["name"] + ) + else: + LOG.error("Provider type not supported for RT operation") + sys.exit( + "Provider type {} not supported for RT operation".format( + account_cache_data["provider_type"] + ) + ) elif cls.type == "DECISION": script_type = cls.attrs["script_type"] cls.attrs["script_file"] = create_script_file( @@ -193,7 +211,7 @@ def render_task_template( schema_file = "task_vm_restart.py.jinja2" else: LOG.error("Task type does not match any known types") - sys.exit("Invalid task task") + sys.exit("Invalid task {}".format(cls.type)) text = render_template(schema_file=schema_file, obj=user_attrs) return text.strip() diff --git a/calm/dsl/runbooks/__init__.py b/calm/dsl/runbooks/__init__.py index d189faca..b4cfe399 100644 --- a/calm/dsl/runbooks/__init__.py +++ b/calm/dsl/runbooks/__init__.py @@ -5,6 +5,13 @@ from calm.dsl.builtins.models.ref import ref, RefType from calm.dsl.builtins.models.calm_ref import Ref from calm.dsl.builtins.models.metadata import Metadata, MetadataType +from calm.dsl.builtins.models.ndb import ( + Database, + DatabaseServer, + TimeMachine, + Tag, + PostgresDatabaseOutputVariables, +) from calm.dsl.builtins.models.credential import ( basic_cred, secret_cred, @@ -64,4 +71,9 @@ "RunbookService", "create_endpoint_payload", "create_runbook_payload", + "Database", + "DatabaseServer", + "TimeMachine", + "Tag", + "PostgresDatabaseOutputVariables", ] diff --git a/tests/runbook_decompile/runbook_json/ndb_task.json b/tests/runbook_decompile/runbook_json/ndb_task.json new file mode 100644 index 00000000..c195026c --- /dev/null +++ b/tests/runbook_decompile/runbook_json/ndb_task.json @@ -0,0 +1,4285 @@ +{ + "status": { + "description": "", + "message_list": [], + "name": "stratos-rb", + "state": "ACTIVE", + "critical": false, + "attrs": {}, + "resources": { + "endpoints_information": [], + "endpoint_definition_list": [], + "credential_definition_list": [], + "runbook": { + "task_definition_list": [ + { + "retries": "0", + "description": "", + "type": "DAG", + "uuid": "85602933-9f09-afcf-2685-fd611d5942c3", + "child_tasks_local_reference_list": [ + { + "kind": "app_task", + "name": "Create Task", + "uuid": "34a40cf5-d71d-54ea-435b-961edb4e5bfd" + }, + { + "kind": "app_task", + "name": "Snapshot", + "uuid": "7a152677-5341-97ff-df35-e43ac414ee6c" + }, + { + "kind": "app_task", + "name": "Restore", + "uuid": "7546a911-e989-8ed5-788a-ab411fa7f06b" + }, + { + "kind": "app_task", + "name": "Task 4", + "uuid": "6369b6e9-b757-153c-b597-d2bfc5a2601d" + }, + { + "kind": "app_task", + "name": "Task 5", + "uuid": "8d530dd7-d985-44ce-c6d7-dcb973aa01b3" + } + ], + "state": "ACTIVE", + "attrs": { + "edges": [ + { + "from_task_reference": { + "kind": "app_task", + "name": "Create Task", + "uuid": "34a40cf5-d71d-54ea-435b-961edb4e5bfd" + }, + "edge_type": "user_defined", + "type": "", + "uuid": "b966ef52-097b-cf5c-efd0-cb0228822435", + "to_task_reference": { + "kind": "app_task", + "name": "Snapshot", + "uuid": "7a152677-5341-97ff-df35-e43ac414ee6c" + } + }, + { + "from_task_reference": { + "kind": "app_task", + "name": "Snapshot", + "uuid": "7a152677-5341-97ff-df35-e43ac414ee6c" + }, + "edge_type": "user_defined", + "type": "", + "uuid": "d7bda279-9ca0-8546-a921-af9efc7e074a", + "to_task_reference": { + "kind": "app_task", + "name": "Restore", + "uuid": "7546a911-e989-8ed5-788a-ab411fa7f06b" + } + }, + { + "from_task_reference": { + "kind": "app_task", + "name": "Restore", + "uuid": "7546a911-e989-8ed5-788a-ab411fa7f06b" + }, + "edge_type": "user_defined", + "type": "", + "uuid": "4747d99f-3874-1630-dbab-c28b7dac7dee", + "to_task_reference": { + "kind": "app_task", + "name": "Task 4", + "uuid": "6369b6e9-b757-153c-b597-d2bfc5a2601d" + } + }, + { + "from_task_reference": { + "kind": "app_task", + "name": "Task 4", + "uuid": "6369b6e9-b757-153c-b597-d2bfc5a2601d" + }, + "edge_type": "user_defined", + "type": "", + "uuid": "b5fc1070-6b3e-cadf-af1c-5b9fffccadae", + "to_task_reference": { + "kind": "app_task", + "name": "Task 5", + "uuid": "8d530dd7-d985-44ce-c6d7-dcb973aa01b3" + } + } + ], + "type": "" + }, + "timeout_secs": "0", + "inherit_target": false, + "message_list": [], + "variable_list": [], + "name": "d222cf21_dag" + }, + { + "retries": "0", + "description": "", + "type": "RT_OPERATION", + "uuid": "34a40cf5-d71d-54ea-435b-961edb4e5bfd", + "child_tasks_local_reference_list": [], + "state": "ACTIVE", + "attrs": { + "output_variables": { + "postgres": "database_name" + }, + "action_reference": { + "kind": "app_action", + "name": "Create", + "uuid": "a0205b18-8340-465b-9c4c-588ff19bbea6" + }, + "type": "RT_OPERATION", + "resource_type_reference": { + "kind": "resource_type", + "name": "Postgres Database Instance", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "name": "NDB_Account_for_TOI", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "runbook_reference": { + "kind": "app_runbook", + "name": "Create_ndb_runbook_aefe93bce6", + "uuid": "7e8dbfc3-5bb4-4876-b763-7842922d4b1c" + }, + "tag": "Database", + "action_output_variables": [ + "tags", + "properties", + "time_machine", + "database_name", + "type", + "database_instance_id", + "platform_data" + ], + "inarg_list": [ + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "cb7c7602-7a67-bf87-8c98-084739fea8af", + "value": "postgres_database", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "postgres_database" + ] + }, + "name": "create_nutanix_ndb_database__databasetype" + }, + { + "regex": { + "should_validate": true, + "value": "^(|[a-zA-Z][A-Za-z0-9_.-]+)$" + }, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "f16bf70c-de34-8825-9f24-b6219b28221b", + "value": "Postgres_Instance_Name", + "label": "Instance Name", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__name" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "a439a33d-1293-e146-4a15-f9f82188f6b5", + "value": "postgres Instance description", + "label": "Description", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__description" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [ + { + "message": "Secret value for variable is empty", + "reason": "EMPTY_VALUE", + "details": [ + { + "attribute_name": "secret" + } + ] + } + ], + "uuid": "1c20282d-9ed8-7402-2664-2f16fe163ad5", + "value": "", + "label": "Password", + "state": "ACTIVE", + "attrs": { + "is_secret_modified": false, + "secret_reference": { + "uuid": "8d889d1e-2234-4365-8084-931648c8a6df" + }, + "type": "" + }, + "editables": {}, + "is_hidden": false, + "type": "SECRET", + "options": {}, + "name": "create_nutanix_ndb_database__vm_password" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "1029b604-e7ee-7cea-a27d-27496326b28d", + "value": "3ee99083-171a-4e3c-97bf-2f7b429208e4", + "label": "Software Profile", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__softwareprofileid" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "22fd0cb7-56ea-392c-803d-389b0ea706dd", + "value": "56fd27d4-b79b-420e-bb97-3b9bf949d994", + "label": "Software Profile Version", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__softwareprofileversionid" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "a831df28-e01e-df20-3f64-abf2d667586a", + "value": "5658f371-120f-4057-95c2-323e8d5efd80", + "label": "Compute Profile", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__computeprofileid" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "775ab22b-b4b0-6e54-02be-8e70fb41d37e", + "value": "fe9cbc90-cd4e-4c19-b5d3-e12b0c0bd8e6", + "label": "Network Profile", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__networkprofileid" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "6527834a-97cd-6fb9-f7fa-92a7fd0aa865", + "value": "741e5e9e-20a0-4cf1-8ee2-d9b95d323123", + "label": "Database Parameter Profile", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__dbparameterprofileid" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "94564b8f-c29e-9de3-5ca8-3e735f722c67", + "value": "UTC", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__newdbservertimezone" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "dc289bb4-ed63-26b3-b6f5-be623fb51920", + "value": "true", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__createdbserver" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "fdd1a398-d1e3-f8fa-ecca-faa0c1010bc5", + "value": "1", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__nodecount" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "8707ccb5-7584-3570-fdf9-156ab4896a41", + "value": "e0b9c94a-ae8b-4cbd-bd83-a8c3d4ced6b7", + "label": "Cluster", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__nxclusterid" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "864e7f74-c4ed-74b2-3cf8-3c0ecef2a35f", + "value": "", + "label": "SSH Public Key for Node Access", + "state": "ACTIVE", + "attrs": { + "is_secret_modified": false, + "secret_reference": { + "uuid": "aa276a7e-91bd-4c2a-b129-c77c3f73fac3" + }, + "type": "" + }, + "editables": {}, + "is_hidden": false, + "type": "SECRET", + "options": {}, + "name": "create_nutanix_ndb_database__sshpublickey" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "60486863-31c0-5ce6-52bb-8e25262b15b6", + "value": "false", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__clustered" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "a254fe4e-cc02-eae5-8f21-aa0342847d47", + "value": "true", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__autotunestagingdrive" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "0ebcc29e-a441-b975-c55f-3255b37ba638", + "value": "Postgres database server", + "label": "Database Server VM Name", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__nodes__0__vmname" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "e699ccb3-bb67-6f9a-5e75-4f27f67cd753", + "value": "fe9cbc90-cd4e-4c19-b5d3-e12b0c0bd8e6", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__nodes__0__networkprofileid" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "4f49d385-8a18-9ca3-f01c-17d0a84c6461", + "value": "", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__nodes__0__dbserverid" + }, + { + "regex": { + "should_validate": true, + "value": "^(|[a-zA-Z][\\w.-]*)$" + }, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "d1ca872e-bc2f-8fa7-1a8e-96314c0922f9", + "value": "Time_Machine_name", + "label": "Name", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__name" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "d311bcc3-fa74-d37e-7633-f7b6e5103960", + "value": "", + "label": "Description", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__description" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "2e892599-d237-3ade-22dd-0dd2ad54b5c7", + "value": "@@{Sla}@@", + "label": "SLA", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__slaid" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "ca29d9bc-1565-a7a9-3404-2d9b8431b4fa", + "value": "true", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__autotunelogdrive" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "fb6cd2bc-6e79-111b-323f-0d8caad541db", + "value": "5", + "label": "Daily Snapshot at", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23" + ] + }, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__snapshottimeofday__0__hours" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "b165ddd4-b118-0890-bba7-55faa99ba2a3", + "value": "0", + "label": "Daily Snapshot at", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + "32", + "33", + "34", + "35", + "36", + "37", + "38", + "39", + "40", + "41", + "42", + "43", + "44", + "45", + "46", + "47", + "48", + "49", + "50", + "51", + "52", + "53", + "54", + "55", + "56", + "57", + "58", + "59" + ] + }, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__snapshottimeofday__0__minutes" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "75b67b4c-0018-c08c-1771-afbddde6038b", + "value": "0", + "label": "Daily Snapshot at", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + "32", + "33", + "34", + "35", + "36", + "37", + "38", + "39", + "40", + "41", + "42", + "43", + "44", + "45", + "46", + "47", + "48", + "49", + "50", + "51", + "52", + "53", + "54", + "55", + "56", + "57", + "58", + "59" + ] + }, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__snapshottimeofday__0__seconds" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "297322f4-3954-c5a6-de6c-7f64ebb76e72", + "value": "true", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__continuousschedule__0__enabled" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "a718ace9-d428-be5c-464d-3985650e6606", + "value": "30", + "label": "Log Catch Up Every", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "15", + "30", + "60", + "90", + "120" + ] + }, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__continuousschedule__0__logbackupinterval" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "6f9e8456-74b2-4d0e-aeca-c752bd153977", + "value": "1", + "label": "Snapshots Per Day", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "1", + "2", + "3", + "4", + "5", + "6" + ] + }, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__continuousschedule__0__snapshotsperday" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "e583b410-977b-ce48-1e7f-338cedc37e53", + "value": "true", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__weeklyschedule__0__enabled" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "a9516bb0-d9ca-0b75-d520-e250323d1d16", + "value": "MONDAY", + "label": "Weekly Snapshot on", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ] + }, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__weeklyschedule__0__dayofweek" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "f4ab072b-53b0-7636-afb9-131c91f5d700", + "value": "true", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__monthlyschedule__0__enabled" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "2a2f6158-f457-4b53-d661-a8bb8d93a515", + "value": "1", + "label": "Monthly Snapshot on the", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28" + ] + }, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__monthlyschedule__0__dayofmonth" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "be8a2f63-f55d-eaf0-6fa4-d017b99a745b", + "value": "true", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__quartelyschedule__0__enabled" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "8faef83b-4432-da57-c09e-e5dd31a899ba", + "value": "1", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28" + ] + }, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__quartelyschedule__0__dayofmonth" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "44c8476e-afd0-e9f3-7d79-cc243be16970", + "value": "JANUARY", + "label": "Quarterly Snapshot in", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "JANUARY", + "FEBRUARY", + "MARCH" + ] + }, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__quartelyschedule__0__startmonth" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "bb2e8814-5c51-438d-6543-87f9a8f60f42", + "value": "false", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__yearlyschedule__0__enabled" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "eeb090f7-8cef-89f8-af0c-a75e705c6064", + "value": "31", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__yearlyschedule__0__dayofmonth" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "4d2a451a-a419-a6d2-5cc8-79d5c84e48a3", + "value": "DECEMBER", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__yearlyschedule__0__month" + }, + { + "regex": { + "should_validate": true, + "value": "^(|[1-9][0-9]{2}|[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$" + }, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "c91689fa-af32-05e5-52a4-114852a7c129", + "value": "5432", + "label": "Port", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__listener_port" + }, + { + "regex": { + "should_validate": true, + "value": "^(|([1-9][0-9]{1,5}|10{6}))$" + }, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "d3a52505-89ee-450d-ce02-13c787939fae", + "value": "200", + "label": "Size (GiB)", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__database_size" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "2271afb8-898f-4c24-c21c-4306de1f7be0", + "value": "true", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__auto_tune_staging_drive" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "b7263331-6b2a-86ef-94ee-a63762bea87a", + "value": "false", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__cluster_database" + }, + { + "regex": { + "should_validate": true, + "value": "^(|[a-zA-Z_$][\\w$]{0,62})$" + }, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "2e564208-8587-d784-da8c-0dbc36530f88", + "value": "Intial_DB", + "label": "Name of Initial Database", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__database_names" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "92c767e9-e183-a74b-a2bf-69bb7bf78190", + "value": "", + "label": "Password", + "state": "ACTIVE", + "attrs": { + "is_secret_modified": false, + "secret_reference": { + "uuid": "d8a8b290-9fd7-43c0-98e0-f8e8c8439927" + }, + "type": "" + }, + "editables": {}, + "is_hidden": false, + "type": "SECRET", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__db_password" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "b708f985-4cb2-bf67-aab5-3007a6083743", + "value": "false", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__allocate_pg_hugepage" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "9c2a946a-792c-f7d3-71e3-0067d9070ea8", + "value": "md5", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__auth_method" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "81dd0a78-5c67-3054-5d7e-cbf28b450fd6", + "value": "", + "label": "Pre Create Command", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__pre_create_script" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "c5182919-28e2-36f0-88f3-9fb199e3fad3", + "value": "", + "label": "Post Create Command", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_nutanix_ndb_database__postgresql_info__0__post_create_script" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "4c3b98ff-f0a3-1ab5-0b57-4b00ef4d2647", + "value": "Postgres Description", + "label": "Database Server Description", + "state": "ACTIVE", + "attrs": { + "is_internal": false, + "type": "", + "omit_on_empty": true + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "create_nutanix_ndb_database__actionarguments__0__value" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "94bc7de9-a9f2-4a18-a5a6-fbc51f779bc3", + "value": "dbserver_description", + "label": "", + "state": "ACTIVE", + "attrs": { + "is_internal": false, + "type": "", + "omit_on_empty": true + }, + "editables": {}, + "is_hidden": true, + "type": "INPUT", + "options": {}, + "name": "create_nutanix_ndb_database__actionarguments__0__name" + }, + { + "regex": {}, + "val_type": "DICT", + "is_mandatory": false, + "description": "", + "data_type": "LIST", + "message_list": [], + "uuid": "eb2f5b6c-aa2c-62dc-546f-81666cfe4695", + "value": "[{\"tag_id\":\"b0066bf0-2134-44d0-a553-5938f04f5942\",\"tag_name\":\"qa_tag1\",\"value\":\"new tag value\"},{\"tag_id\":\"fabf6560-43de-4ea1-ad42-6f334a93a0e6\",\"tag_name\":\"db_tag_ÀÁÂÃÄÅÆÇÈÉÊËÌÍ_!#$%&()+-./:;<=>@^_`{|}~\",\"value\":\"tags\"}]", + "label": "Tags", + "state": "ACTIVE", + "attrs": { + "is_internal": false, + "type": "", + "omit_on_empty": true + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "create_nutanix_ndb_database__tags" + }, + { + "regex": {}, + "val_type": "DICT", + "is_mandatory": false, + "description": "", + "data_type": "LIST", + "message_list": [], + "uuid": "2414c6a1-2885-f678-aea3-ce9ef1d43d29", + "value": "[{\"tag_id\":\"5a7e0311-88f8-4a77-8f40-7828dd85a7cd\",\"tag_name\":\"tm_tag_ÀÁÂÃÄÅÆÇÈÉÊËÌÍ_!#$%&()+-./:;<=>@^_`{|}~\",\"value\":\"value TM\"}]", + "label": "Tags", + "state": "ACTIVE", + "attrs": { + "is_internal": false, + "type": "", + "omit_on_empty": true + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "create_nutanix_ndb_database__timemachineinfo__0__tags" + } + ] + }, + "timeout_secs": "0", + "inherit_target": false, + "message_list": [], + "variable_list": [], + "name": "Create Task" + }, + { + "retries": "0", + "description": "", + "type": "RT_OPERATION", + "uuid": "7a152677-5341-97ff-df35-e43ac414ee6c", + "child_tasks_local_reference_list": [], + "state": "ACTIVE", + "attrs": { + "output_variables": {}, + "action_reference": { + "kind": "app_action", + "name": "Create Snapshot", + "uuid": "a0bbfae7-2643-4932-85bb-adafbf961bd2" + }, + "type": "RT_OPERATION", + "resource_type_reference": { + "kind": "resource_type", + "name": "Postgres Database Instance", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "name": "NDB_Account_for_TOI", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "runbook_reference": { + "kind": "app_runbook", + "name": "Create Snapshot_ndb_runbook_e111adec9b", + "uuid": "7461abeb-8cd1-4dd1-8e1c-c40e40d5a4be" + }, + "tag": "Database", + "action_output_variables": [ + "database_snapshot", + "properties", + "dbserver_name", + "type", + "dbserver_ip", + "id", + "parent_snapshot", + "snapshot_uuid", + "platform_data" + ], + "inarg_list": [ + { + "regex": { + "should_validate": true, + "value": "^(|[a-zA-Z][A-Za-z0-9_.-]+)$" + }, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "72f1a6f0-1cb8-96a3-55a3-696fe67fb3ca", + "value": "Name_SNapshot", + "label": "Snapshot Name", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_snapshot_nutanix_ndb_database__name" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "b4f126a0-a4be-f62b-efd3-547b51ac8b3f", + "value": "@@{time_machine}@@", + "label": "Target Time Machine", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_snapshot_nutanix_ndb_database__time_machine_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "83cd91a8-de32-caa2-7845-57d775e455f9", + "value": "", + "label": "Target Time Machine", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_snapshot_nutanix_ndb_database__time_machine_name" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "e977496e-ade2-a9b5-31e6-1320c928f8c2", + "value": "", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "create_snapshot_nutanix_ndb_database__expiry_date_timezone" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "8b1355b6-befc-dde9-23a0-200c2faab6f0", + "value": "true", + "label": "Removal Schedule", + "state": "ACTIVE", + "attrs": { + "is_internal": true, + "type": "", + "omit_on_empty": false + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "create_snapshot_nutanix_ndb_database__is_removal_configured" + }, + { + "regex": { + "should_validate": true, + "value": "^(|([1-9]|[1-8][0-9]|90))$" + }, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "2a431b0f-b8e0-d095-2e32-9c3a5972f63b", + "value": "4", + "label": "Remove in (number of days)", + "state": "ACTIVE", + "attrs": { + "is_internal": false, + "type": "", + "omit_on_empty": true + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "create_snapshot_nutanix_ndb_database__remove_schedule_in_days" + } + ] + }, + "timeout_secs": "0", + "inherit_target": false, + "message_list": [], + "variable_list": [], + "name": "Snapshot" + }, + { + "retries": "0", + "description": "", + "type": "RT_OPERATION", + "uuid": "7546a911-e989-8ed5-788a-ab411fa7f06b", + "child_tasks_local_reference_list": [], + "state": "ACTIVE", + "attrs": { + "output_variables": { + "instance": "database_instance_id" + }, + "action_reference": { + "kind": "app_action", + "name": "Restore from Time Machine", + "uuid": "22f3602c-3b4b-4c34-8218-5d3b18b58946" + }, + "type": "RT_OPERATION", + "resource_type_reference": { + "kind": "resource_type", + "name": "Postgres Database Instance", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "name": "NDB_Account_for_TOI", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "runbook_reference": { + "kind": "app_runbook", + "name": "Restore from Time Machine_ndb_runbook_b797886482", + "uuid": "985437d3-e362-4796-9b7e-bb92b9f93c1f" + }, + "tag": "Database", + "action_output_variables": [ + "tags", + "properties", + "time_machine", + "database_name", + "type", + "database_instance_id", + "platform_data" + ], + "inarg_list": [ + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "7e936546-6907-eab3-5a93-ae2a7d9e2e4c", + "value": "@@{id}@@", + "label": "Target Database", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "restore_from_time_machine_nutanix_ndb_database__database_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "037d6365-01e1-be7e-cbef-04edf027ba21", + "value": "", + "label": "", + "state": "ACTIVE", + "attrs": { + "is_internal": true, + "type": "", + "omit_on_empty": false + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "restore_from_time_machine_nutanix_ndb_database__time_machine_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "af169074-3208-5b39-ea1c-6626ff94099c", + "value": "Asia/Calcutta", + "label": "", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "restore_from_time_machine_nutanix_ndb_database__time_zone_pitr" + }, + { + "regex": { + "should_validate": true, + "value": "^(|(\\d{4}-([0]\\d|[1][0-2])-([0-2]\\d|[3][0-1])\\s([0-1]\\d|[2][0-3]):[0-5]\\d:[0-5]\\d))$" + }, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "b1da62fb-43fc-7ab5-0da0-b767b4722963", + "value": "2023-04-26 14:22:31", + "label": "Point in Time", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "restore_from_time_machine_nutanix_ndb_database__user_pitr_timestamp" + } + ] + }, + "timeout_secs": "0", + "inherit_target": false, + "message_list": [], + "variable_list": [], + "name": "Restore" + }, + { + "retries": "0", + "description": "", + "type": "RT_OPERATION", + "uuid": "6369b6e9-b757-153c-b597-d2bfc5a2601d", + "child_tasks_local_reference_list": [], + "state": "ACTIVE", + "attrs": { + "output_variables": { + "Name": "database_name" + }, + "action_reference": { + "kind": "app_action", + "name": "Clone from Time Machine", + "uuid": "c36b45fc-3779-48bb-85a9-5602c476544f" + }, + "type": "RT_OPERATION", + "resource_type_reference": { + "kind": "resource_type", + "name": "Postgres Database Instance", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "name": "NDB_Account_for_TOI", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "runbook_reference": { + "kind": "app_runbook", + "name": "Clone from Time Machine_ndb_runbook_4b8932186e", + "uuid": "7c5b5edf-ffb1-4ea8-ab0b-cd4969f1360f" + }, + "tag": "Database", + "action_output_variables": [ + "type", + "id", + "time_machine", + "linked_databases", + "database_name", + "database_nodes", + "platform_data" + ], + "inarg_list": [ + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "fa3f50c1-2772-844d-1e53-77ac5ed7d538", + "value": "afdsf", + "label": "Instance Name", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__name" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "fc3c5929-91bc-744e-bba9-601c2426ba7c", + "value": "@@{Sla}@@", + "label": "Target Time Machine", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__time_machine_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "0c04a882-a61d-28f9-55c9-8a3ff4fa1e1e", + "value": "e0b9c94a-ae8b-4cbd-bd83-a8c3d4ced6b7", + "label": "Nutanix Cluster", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__nx_cluster_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "ac35daf0-1187-71c9-2bc7-31926b5fc48f", + "value": "", + "label": "SSH Public Key for Node Access", + "state": "ACTIVE", + "attrs": { + "is_secret_modified": false, + "secret_reference": { + "uuid": "671b31be-7f27-4b6f-bc5c-58ee4238e63c" + }, + "type": "" + }, + "editables": {}, + "is_hidden": false, + "type": "SECRET", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__ssh_public_key" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "311b2b47-ab59-9679-24bd-149ddf25ebe2", + "value": "@@{properties}@@", + "label": "Snapshot", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__snapshot_id" + }, + { + "regex": {}, + "val_type": "INT", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "107115cf-17e6-852c-d209-14c59b52202f", + "value": "1", + "label": "Node Count", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__node_count" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "d6e96a66-6eb8-e92c-3c3f-5321369c23a7", + "value": "asfas", + "label": "Description", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__description" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "53c631f7-8b8c-b1c1-8f69-a94fb733184d", + "value": "5658f371-120f-4057-95c2-323e8d5efd80", + "label": "Compute Profile", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__compute_profile_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "ebfe6c3b-c97d-38b4-abd8-d3382b222b9f", + "value": "@@{platform_data}@@", + "label": "Network Profile", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__network_profile_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "6176fe8f-279e-3390-ba2f-1d944d333bb3", + "value": "741e5e9e-20a0-4cf1-8ee2-d9b95d323123", + "label": "Database Parameter Profile", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__database_parameter_profile_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "ab5f3c28-1a22-d69c-0427-d35fa812db93", + "value": "VM_Instance", + "label": "Database Server VM Name", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__nodes__0__vm_name" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "ed479fa4-5bd7-c6ab-b8ad-d9ff473981fb", + "value": "", + "label": "Password", + "state": "ACTIVE", + "attrs": { + "is_secret_modified": false, + "secret_reference": { + "uuid": "96477dab-fc6d-4f9b-8d74-87a16e6220c8" + }, + "type": "" + }, + "editables": {}, + "is_hidden": false, + "type": "SECRET", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__vm_password" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "ae2ad653-db58-aff5-5c02-384ec5a1a198", + "value": "5658f371-120f-4057-95c2-323e8d5efd80", + "label": "Compute Profile", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__nodes__0__compute_profile_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "9a89c51a-782f-6354-a436-e75171f8d2da", + "value": "@@{platform_data}@@", + "label": "Network Profile", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__nodes__0__network_profile_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "dec47b5d-6af1-3dc8-5019-2a1fc1a786b6", + "value": "e0b9c94a-ae8b-4cbd-bd83-a8c3d4ced6b7", + "label": "Nutanix Cluster", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__nodes__0__nx_cluster_id" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "d38f1c5f-848a-e09d-8670-980c7f3164cf", + "value": "VM_Instance", + "label": "Database server VM Name", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__vm_name" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "f1ee3b10-7e22-f783-c28e-743d91ceb386", + "value": "dasfds", + "label": "Pre Clone Command", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__pre_clone_cmd" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "b006aa97-88e8-0448-6c11-5d27a8738227", + "value": "asdfds", + "label": "Post Clone Command", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__post_clone_cmd" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "c271344b-e09d-3e05-3923-990d5fc636c2", + "value": "", + "label": "Description", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__dbserver_description" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "a6e04312-2c38-af43-0a22-d77bb9de425e", + "value": "true", + "label": "Schedule Data Refresh", + "state": "ACTIVE", + "attrs": { + "is_internal": true, + "type": "", + "omit_on_empty": false + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__schedule_data_refresh" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "a2c553a0-87e8-b8a9-2f9b-97f1aa832ac1", + "value": "false", + "label": "Removal Schedule", + "state": "ACTIVE", + "attrs": { + "is_internal": true, + "type": "", + "omit_on_empty": false + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__remove_schedule" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "7ee99c80-7081-2fe3-0e25-719f9e5b4051", + "value": "", + "label": "Password", + "state": "ACTIVE", + "attrs": { + "is_secret_modified": false, + "secret_reference": { + "uuid": "d7296016-e1ad-45fa-91e0-1e053855dfb5" + }, + "type": "" + }, + "editables": {}, + "is_hidden": false, + "type": "SECRET", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__db_password" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "c6403f8f-00bb-a4d7-69d2-7dd62bf4893a", + "value": "UTC", + "label": "Expiry Date Timezone", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__expiry_details__0__expiry_date_timezone" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "774bd36e-244b-100a-37f3-a0d6e837568a", + "value": "false", + "label": "Delete Database", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__expiry_details__0__delete_database" + }, + { + "regex": { + "should_validate": true, + "value": "^(|([0-1]\\d|[2][0-3]):[0-5]\\d:[0-5]\\d)$" + }, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "86a1667f-7a83-8d1c-9b54-fd4d74cb3032", + "value": "12:12:12", + "label": "Refresh Time", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__refresh_details__0__refresh_time" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "9a15c661-e679-cabf-3173-908c1ff2dede", + "value": "Asia/Calcutta", + "label": "Refresh Date Timezone", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__refresh_details__0__refresh_date_timezone" + }, + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "738c08b4-3045-f260-12a6-585ed9c6307d", + "value": "UTC", + "label": "Timezone", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__time_zone" + }, + { + "regex": { + "should_validate": true, + "value": "^(|([1-9]|[1-8][0-9]|90))$" + }, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "78a3cb28-058c-e998-388d-13c04588736c", + "value": "2", + "label": "Refresh every (number of days)", + "state": "ACTIVE", + "attrs": { + "is_internal": false, + "type": "", + "omit_on_empty": true + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__refresh_details__0__refresh_in_days" + }, + { + "regex": {}, + "val_type": "DICT", + "is_mandatory": false, + "description": "", + "data_type": "LIST", + "message_list": [], + "uuid": "b9d14b7a-994c-ca03-4846-10c4a674cded", + "value": "[{\"tag_id\":\"61201158-b0b6-4b23-ac3a-dae774cc320b\",\"tag_name\":\"clone_tag_ÀÁÂÃÄÅÆÇÈÉÊËÌÍ_!#$%&()+-./:;<=>@^_`{|}~\",\"value\":\"clone\"}]", + "label": "Tags", + "state": "ACTIVE", + "attrs": { + "is_internal": false, + "type": "", + "omit_on_empty": true + }, + "editables": {}, + "is_hidden": false, + "type": "INPUT", + "options": {}, + "name": "clone_from_time_machine_nutanix_ndb_database__tags" + } + ] + }, + "timeout_secs": "0", + "inherit_target": false, + "message_list": [], + "variable_list": [], + "name": "Task 4" + }, + { + "retries": "0", + "description": "", + "type": "RT_OPERATION", + "uuid": "8d530dd7-d985-44ce-c6d7-dcb973aa01b3", + "child_tasks_local_reference_list": [], + "state": "ACTIVE", + "attrs": { + "output_variables": {}, + "action_reference": { + "kind": "app_action", + "name": "Delete", + "uuid": "18176324-cae3-412b-829e-ce28384f04e8" + }, + "type": "RT_OPERATION", + "resource_type_reference": { + "kind": "resource_type", + "name": "Postgres Database Instance", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "name": "NDB_Account_for_TOI", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "runbook_reference": { + "kind": "app_runbook", + "name": "Delete_ndb_runbook_8efa2e9242", + "uuid": "218b232b-d823-4ac1-a6c7-c621bfc55eca" + }, + "tag": "Database", + "action_output_variables": [], + "inarg_list": [ + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": true, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "7dfccff5-ecc1-2d1f-d94f-ae08bcc315a5", + "value": "@@{database_name}@@", + "label": "Target Database", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": {}, + "name": "delete_nutanix_ndb_database__id" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "73dd0762-04a9-fe49-c0bf-e73d99c22ff2", + "value": "true", + "label": "Delete", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "delete_nutanix_ndb_database__delete" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "2c25b27a-d91a-a5bf-9d51-0cd64324833e", + "value": "false", + "label": "Remove", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "delete_nutanix_ndb_database__remove" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "c9263b5d-af28-00ee-e753-dc0da8469fa4", + "value": "false", + "label": "Soft Remove", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "delete_nutanix_ndb_database__soft_remove" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "730793b4-d6b1-ddf9-9d49-0cdf9c0d6ff5", + "value": "false", + "label": "Forced", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "delete_nutanix_ndb_database__forced" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "1337bf9e-27ba-57d0-ead0-af7aad810152", + "value": "true", + "label": "Delete Time Machine", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "delete_nutanix_ndb_database__delete_time_machine" + }, + { + "regex": {}, + "val_type": "BOOLEAN", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "0d5fafb4-01cb-34b7-fea2-76b7ae89c0d5", + "value": "true", + "label": "Delete Logical Cluster", + "state": "ACTIVE", + "attrs": {}, + "editables": {}, + "is_hidden": true, + "type": "LOCAL", + "options": {}, + "name": "delete_nutanix_ndb_database__delete_logical_cluster" + } + ] + }, + "timeout_secs": "0", + "inherit_target": false, + "message_list": [], + "variable_list": [], + "name": "Task 5" + } + ], + "description": "", + "message_list": [], + "uuid": "e918b5f1-659d-f90a-41bb-70ca4e91122e", + "state": "ACTIVE", + "variable_list": [ + { + "regex": {}, + "val_type": "STRING", + "is_mandatory": false, + "description": "", + "data_type": "BASE", + "message_list": [], + "uuid": "bfccc8ca-9d55-6048-1837-31061647ba00", + "value": "value", + "label": "", + "state": "ACTIVE", + "attrs": { + "type": "" + }, + "editables": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [] + }, + "name": "Sla" + } + ], + "main_task_local_reference": { + "kind": "app_task", + "name": "d222cf21_dag", + "uuid": "85602933-9f09-afcf-2685-fd611d5942c3" + }, + "name": "7c055c11_runbook" + }, + "type": "workflow", + "default_target_reference": { + "kind": "app_endpoint", + "name": "psqlVM", + "uuid": "f4ac5301-9505-0cc6-4cdd-16ee92f99e0d" + } + } + }, + "spec": { + "name": "stratos-rb", + "resources": { + "runbook": { + "main_task_local_reference": { + "kind": "app_task", + "uuid": "85602933-9f09-afcf-2685-fd611d5942c3" + }, + "task_definition_list": [ + { + "attrs": { + "edges": [ + { + "from_task_reference": { + "kind": "app_task", + "uuid": "34a40cf5-d71d-54ea-435b-961edb4e5bfd" + }, + "uuid": "b966ef52-097b-cf5c-efd0-cb0228822435", + "to_task_reference": { + "kind": "app_task", + "uuid": "7a152677-5341-97ff-df35-e43ac414ee6c" + } + }, + { + "from_task_reference": { + "kind": "app_task", + "uuid": "7a152677-5341-97ff-df35-e43ac414ee6c" + }, + "uuid": "d7bda279-9ca0-8546-a921-af9efc7e074a", + "to_task_reference": { + "kind": "app_task", + "uuid": "7546a911-e989-8ed5-788a-ab411fa7f06b" + } + }, + { + "from_task_reference": { + "kind": "app_task", + "uuid": "7546a911-e989-8ed5-788a-ab411fa7f06b" + }, + "uuid": "4747d99f-3874-1630-dbab-c28b7dac7dee", + "to_task_reference": { + "kind": "app_task", + "uuid": "6369b6e9-b757-153c-b597-d2bfc5a2601d" + } + }, + { + "from_task_reference": { + "kind": "app_task", + "uuid": "6369b6e9-b757-153c-b597-d2bfc5a2601d" + }, + "uuid": "b5fc1070-6b3e-cadf-af1c-5b9fffccadae", + "to_task_reference": { + "kind": "app_task", + "uuid": "8d530dd7-d985-44ce-c6d7-dcb973aa01b3" + } + } + ] + }, + "type": "DAG", + "name": "d222cf21_dag", + "child_tasks_local_reference_list": [ + { + "kind": "app_task", + "uuid": "34a40cf5-d71d-54ea-435b-961edb4e5bfd" + }, + { + "kind": "app_task", + "uuid": "7a152677-5341-97ff-df35-e43ac414ee6c" + }, + { + "kind": "app_task", + "uuid": "7546a911-e989-8ed5-788a-ab411fa7f06b" + }, + { + "kind": "app_task", + "uuid": "6369b6e9-b757-153c-b597-d2bfc5a2601d" + }, + { + "kind": "app_task", + "uuid": "8d530dd7-d985-44ce-c6d7-dcb973aa01b3" + } + ], + "uuid": "85602933-9f09-afcf-2685-fd611d5942c3" + }, + { + "uuid": "34a40cf5-d71d-54ea-435b-961edb4e5bfd", + "child_tasks_local_reference_list": [], + "attrs": { + "output_variables": { + "postgres": "database_name" + }, + "action_reference": { + "kind": "app_action", + "uuid": "a0205b18-8340-465b-9c4c-588ff19bbea6" + }, + "resource_type_reference": { + "kind": "resource_type", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "tag": "Database", + "inarg_list": [ + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__databasetype", + "data_type": "BASE", + "value": "postgres_database", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "postgres_database" + ] + }, + "uuid": "cb7c7602-7a67-bf87-8c98-084739fea8af" + }, + { + "regex": { + "value": "^(|[a-zA-Z][A-Za-z0-9_.-]+)$" + }, + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__name", + "data_type": "BASE", + "value": "Postgres_Instance_Name", + "label": "Instance Name", + "is_hidden": false, + "type": "LOCAL", + "uuid": "f16bf70c-de34-8825-9f24-b6219b28221b" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__description", + "data_type": "BASE", + "value": "postgres Instance description", + "label": "Description", + "is_hidden": false, + "type": "LOCAL", + "uuid": "a439a33d-1293-e146-4a15-f9f82188f6b5" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__vm_password", + "data_type": "BASE", + "label": "Password", + "attrs": { + "is_secret_modified": false + }, + "is_hidden": false, + "type": "SECRET", + "uuid": "1c20282d-9ed8-7402-2664-2f16fe163ad5" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__softwareprofileid", + "data_type": "BASE", + "value": "3ee99083-171a-4e3c-97bf-2f7b429208e4", + "label": "Software Profile", + "is_hidden": false, + "type": "LOCAL", + "uuid": "1029b604-e7ee-7cea-a27d-27496326b28d" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__softwareprofileversionid", + "data_type": "BASE", + "value": "56fd27d4-b79b-420e-bb97-3b9bf949d994", + "label": "Software Profile Version", + "is_hidden": false, + "type": "LOCAL", + "uuid": "22fd0cb7-56ea-392c-803d-389b0ea706dd" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__computeprofileid", + "data_type": "BASE", + "value": "5658f371-120f-4057-95c2-323e8d5efd80", + "label": "Compute Profile", + "is_hidden": false, + "type": "LOCAL", + "uuid": "a831df28-e01e-df20-3f64-abf2d667586a" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__networkprofileid", + "data_type": "BASE", + "value": "fe9cbc90-cd4e-4c19-b5d3-e12b0c0bd8e6", + "label": "Network Profile", + "is_hidden": false, + "type": "LOCAL", + "uuid": "775ab22b-b4b0-6e54-02be-8e70fb41d37e" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__dbparameterprofileid", + "data_type": "BASE", + "value": "741e5e9e-20a0-4cf1-8ee2-d9b95d323123", + "label": "Database Parameter Profile", + "is_hidden": false, + "type": "LOCAL", + "uuid": "6527834a-97cd-6fb9-f7fa-92a7fd0aa865" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__newdbservertimezone", + "data_type": "BASE", + "value": "UTC", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "94564b8f-c29e-9de3-5ca8-3e735f722c67" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__createdbserver", + "data_type": "BASE", + "value": "true", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "dc289bb4-ed63-26b3-b6f5-be623fb51920" + }, + { + "val_type": "INT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__nodecount", + "data_type": "BASE", + "value": "1", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "fdd1a398-d1e3-f8fa-ecca-faa0c1010bc5" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__nxclusterid", + "data_type": "BASE", + "value": "e0b9c94a-ae8b-4cbd-bd83-a8c3d4ced6b7", + "label": "Cluster", + "is_hidden": false, + "type": "LOCAL", + "uuid": "8707ccb5-7584-3570-fdf9-156ab4896a41" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__sshpublickey", + "data_type": "BASE", + "label": "SSH Public Key for Node Access", + "attrs": { + "is_secret_modified": false + }, + "is_hidden": false, + "type": "SECRET", + "uuid": "864e7f74-c4ed-74b2-3cf8-3c0ecef2a35f" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__clustered", + "data_type": "BASE", + "value": "false", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "60486863-31c0-5ce6-52bb-8e25262b15b6" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__autotunestagingdrive", + "data_type": "BASE", + "value": "true", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "a254fe4e-cc02-eae5-8f21-aa0342847d47" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__nodes__0__vmname", + "data_type": "BASE", + "value": "Postgres database server", + "label": "Database Server VM Name", + "is_hidden": false, + "type": "LOCAL", + "uuid": "0ebcc29e-a441-b975-c55f-3255b37ba638" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__nodes__0__networkprofileid", + "data_type": "BASE", + "value": "fe9cbc90-cd4e-4c19-b5d3-e12b0c0bd8e6", + "label": "", + "is_hidden": false, + "type": "LOCAL", + "uuid": "e699ccb3-bb67-6f9a-5e75-4f27f67cd753" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__nodes__0__dbserverid", + "data_type": "BASE", + "value": "", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "4f49d385-8a18-9ca3-f01c-17d0a84c6461" + }, + { + "regex": { + "value": "^(|[a-zA-Z][\\w.-]*)$" + }, + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__timemachineinfo__0__name", + "data_type": "BASE", + "value": "Time_Machine_name", + "label": "Name", + "is_hidden": false, + "type": "LOCAL", + "uuid": "d1ca872e-bc2f-8fa7-1a8e-96314c0922f9" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__description", + "data_type": "BASE", + "value": "", + "label": "Description", + "is_hidden": false, + "type": "LOCAL", + "uuid": "d311bcc3-fa74-d37e-7633-f7b6e5103960" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__timemachineinfo__0__slaid", + "data_type": "BASE", + "value": "@@{Sla}@@", + "label": "SLA", + "is_hidden": false, + "type": "LOCAL", + "uuid": "2e892599-d237-3ade-22dd-0dd2ad54b5c7" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__autotunelogdrive", + "data_type": "BASE", + "value": "true", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "ca29d9bc-1565-a7a9-3404-2d9b8431b4fa" + }, + { + "val_type": "INT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__snapshottimeofday__0__hours", + "data_type": "BASE", + "value": "5", + "label": "Daily Snapshot at", + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23" + ] + }, + "uuid": "fb6cd2bc-6e79-111b-323f-0d8caad541db" + }, + { + "val_type": "INT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__snapshottimeofday__0__minutes", + "data_type": "BASE", + "value": "0", + "label": "Daily Snapshot at", + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + "32", + "33", + "34", + "35", + "36", + "37", + "38", + "39", + "40", + "41", + "42", + "43", + "44", + "45", + "46", + "47", + "48", + "49", + "50", + "51", + "52", + "53", + "54", + "55", + "56", + "57", + "58", + "59" + ] + }, + "uuid": "b165ddd4-b118-0890-bba7-55faa99ba2a3" + }, + { + "val_type": "INT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__snapshottimeofday__0__seconds", + "data_type": "BASE", + "value": "0", + "label": "Daily Snapshot at", + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + "32", + "33", + "34", + "35", + "36", + "37", + "38", + "39", + "40", + "41", + "42", + "43", + "44", + "45", + "46", + "47", + "48", + "49", + "50", + "51", + "52", + "53", + "54", + "55", + "56", + "57", + "58", + "59" + ] + }, + "uuid": "75b67b4c-0018-c08c-1771-afbddde6038b" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__continuousschedule__0__enabled", + "data_type": "BASE", + "value": "true", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "297322f4-3954-c5a6-de6c-7f64ebb76e72" + }, + { + "val_type": "INT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__continuousschedule__0__logbackupinterval", + "data_type": "BASE", + "value": "30", + "label": "Log Catch Up Every", + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "15", + "30", + "60", + "90", + "120" + ] + }, + "uuid": "a718ace9-d428-be5c-464d-3985650e6606" + }, + { + "val_type": "INT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__continuousschedule__0__snapshotsperday", + "data_type": "BASE", + "value": "1", + "label": "Snapshots Per Day", + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "1", + "2", + "3", + "4", + "5", + "6" + ] + }, + "uuid": "6f9e8456-74b2-4d0e-aeca-c752bd153977" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__weeklyschedule__0__enabled", + "data_type": "BASE", + "value": "true", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "e583b410-977b-ce48-1e7f-338cedc37e53" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__weeklyschedule__0__dayofweek", + "data_type": "BASE", + "value": "MONDAY", + "label": "Weekly Snapshot on", + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ] + }, + "uuid": "a9516bb0-d9ca-0b75-d520-e250323d1d16" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__monthlyschedule__0__enabled", + "data_type": "BASE", + "value": "true", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "f4ab072b-53b0-7636-afb9-131c91f5d700" + }, + { + "val_type": "INT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__monthlyschedule__0__dayofmonth", + "data_type": "BASE", + "value": "1", + "label": "Monthly Snapshot on the", + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28" + ] + }, + "uuid": "2a2f6158-f457-4b53-d661-a8bb8d93a515" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__quartelyschedule__0__enabled", + "data_type": "BASE", + "value": "true", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "be8a2f63-f55d-eaf0-6fa4-d017b99a745b" + }, + { + "val_type": "INT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__quartelyschedule__0__dayofmonth", + "data_type": "BASE", + "value": "1", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28" + ] + }, + "uuid": "8faef83b-4432-da57-c09e-e5dd31a899ba" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__quartelyschedule__0__startmonth", + "data_type": "BASE", + "value": "JANUARY", + "label": "Quarterly Snapshot in", + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED", + "choices": [ + "JANUARY", + "FEBRUARY", + "MARCH" + ] + }, + "uuid": "44c8476e-afd0-e9f3-7d79-cc243be16970" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__yearlyschedule__0__enabled", + "data_type": "BASE", + "value": "false", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "bb2e8814-5c51-438d-6543-87f9a8f60f42" + }, + { + "val_type": "INT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__yearlyschedule__0__dayofmonth", + "data_type": "BASE", + "value": "31", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "eeb090f7-8cef-89f8-af0c-a75e705c6064" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__schedule__0__yearlyschedule__0__month", + "data_type": "BASE", + "value": "DECEMBER", + "label": "", + "is_hidden": false, + "type": "LOCAL", + "uuid": "4d2a451a-a419-a6d2-5cc8-79d5c84e48a3" + }, + { + "regex": { + "value": "^(|[1-9][0-9]{2}|[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$" + }, + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__postgresql_info__0__listener_port", + "data_type": "BASE", + "value": "5432", + "label": "Port", + "is_hidden": false, + "type": "LOCAL", + "uuid": "c91689fa-af32-05e5-52a4-114852a7c129" + }, + { + "regex": { + "value": "^(|([1-9][0-9]{1,5}|10{6}))$" + }, + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__postgresql_info__0__database_size", + "data_type": "BASE", + "value": "200", + "label": "Size (GiB)", + "is_hidden": false, + "type": "LOCAL", + "uuid": "d3a52505-89ee-450d-ce02-13c787939fae" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__postgresql_info__0__auto_tune_staging_drive", + "data_type": "BASE", + "value": "true", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "2271afb8-898f-4c24-c21c-4306de1f7be0" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__postgresql_info__0__cluster_database", + "data_type": "BASE", + "value": "false", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "b7263331-6b2a-86ef-94ee-a63762bea87a" + }, + { + "regex": { + "value": "^(|[a-zA-Z_$][\\w$]{0,62})$" + }, + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__postgresql_info__0__database_names", + "data_type": "BASE", + "value": "Intial_DB", + "label": "Name of Initial Database", + "is_hidden": false, + "type": "LOCAL", + "uuid": "2e564208-8587-d784-da8c-0dbc36530f88" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_nutanix_ndb_database__postgresql_info__0__db_password", + "data_type": "BASE", + "label": "Password", + "attrs": { + "is_secret_modified": false + }, + "is_hidden": false, + "type": "SECRET", + "uuid": "92c767e9-e183-a74b-a2bf-69bb7bf78190" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__postgresql_info__0__allocate_pg_hugepage", + "data_type": "BASE", + "value": "false", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "b708f985-4cb2-bf67-aab5-3007a6083743" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__postgresql_info__0__auth_method", + "data_type": "BASE", + "value": "md5", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "9c2a946a-792c-f7d3-71e3-0067d9070ea8" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__postgresql_info__0__pre_create_script", + "data_type": "BASE", + "value": "", + "label": "Pre Create Command", + "is_hidden": false, + "type": "LOCAL", + "uuid": "81dd0a78-5c67-3054-5d7e-cbf28b450fd6" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__postgresql_info__0__post_create_script", + "data_type": "BASE", + "value": "", + "label": "Post Create Command", + "is_hidden": false, + "type": "LOCAL", + "uuid": "c5182919-28e2-36f0-88f3-9fb199e3fad3" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__actionarguments__0__value", + "data_type": "BASE", + "value": "Postgres Description", + "label": "Database Server Description", + "attrs": { + "is_internal": false, + "omit_on_empty": true + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "4c3b98ff-f0a3-1ab5-0b57-4b00ef4d2647" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__actionarguments__0__name", + "data_type": "BASE", + "value": "dbserver_description", + "label": "", + "attrs": { + "is_internal": false, + "omit_on_empty": true + }, + "is_hidden": true, + "type": "INPUT", + "uuid": "94bc7de9-a9f2-4a18-a5a6-fbc51f779bc3" + }, + { + "val_type": "DICT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__tags", + "data_type": "LIST", + "value": "[{\"tag_id\":\"b0066bf0-2134-44d0-a553-5938f04f5942\",\"tag_name\":\"qa_tag1\",\"value\":\"new tag value\"},{\"tag_id\":\"fabf6560-43de-4ea1-ad42-6f334a93a0e6\",\"tag_name\":\"db_tag_ÀÁÂÃÄÅÆÇÈÉÊËÌÍ_!#$%&()+-./:;<=>@^_`{|}~\",\"value\":\"tags\"}]", + "label": "Tags", + "attrs": { + "is_internal": false, + "omit_on_empty": true + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "eb2f5b6c-aa2c-62dc-546f-81666cfe4695" + }, + { + "val_type": "DICT", + "is_mandatory": false, + "name": "create_nutanix_ndb_database__timemachineinfo__0__tags", + "data_type": "LIST", + "value": "[{\"tag_id\":\"5a7e0311-88f8-4a77-8f40-7828dd85a7cd\",\"tag_name\":\"tm_tag_ÀÁÂÃÄÅÆÇÈÉÊËÌÍ_!#$%&()+-./:;<=>@^_`{|}~\",\"value\":\"value TM\"}]", + "label": "Tags", + "attrs": { + "is_internal": false, + "omit_on_empty": true + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "2414c6a1-2885-f678-aea3-ce9ef1d43d29" + } + ] + }, + "type": "RT_OPERATION", + "variable_list": [], + "name": "Create Task" + }, + { + "uuid": "7a152677-5341-97ff-df35-e43ac414ee6c", + "child_tasks_local_reference_list": [], + "attrs": { + "output_variables": {}, + "action_reference": { + "kind": "app_action", + "uuid": "a0bbfae7-2643-4932-85bb-adafbf961bd2" + }, + "resource_type_reference": { + "kind": "resource_type", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "tag": "Database", + "inarg_list": [ + { + "regex": { + "value": "^(|[a-zA-Z][A-Za-z0-9_.-]+)$" + }, + "val_type": "STRING", + "is_mandatory": false, + "name": "create_snapshot_nutanix_ndb_database__name", + "data_type": "BASE", + "value": "Name_SNapshot", + "label": "Snapshot Name", + "is_hidden": false, + "type": "LOCAL", + "uuid": "72f1a6f0-1cb8-96a3-55a3-696fe67fb3ca" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "create_snapshot_nutanix_ndb_database__time_machine_id", + "data_type": "BASE", + "value": "@@{time_machine}@@", + "label": "Target Time Machine", + "is_hidden": false, + "type": "LOCAL", + "uuid": "b4f126a0-a4be-f62b-efd3-547b51ac8b3f" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_snapshot_nutanix_ndb_database__time_machine_name", + "data_type": "BASE", + "value": "", + "label": "Target Time Machine", + "is_hidden": false, + "type": "LOCAL", + "uuid": "83cd91a8-de32-caa2-7845-57d775e455f9" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "create_snapshot_nutanix_ndb_database__expiry_date_timezone", + "data_type": "BASE", + "value": "", + "label": "", + "is_hidden": false, + "type": "LOCAL", + "uuid": "e977496e-ade2-a9b5-31e6-1320c928f8c2" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "create_snapshot_nutanix_ndb_database__is_removal_configured", + "data_type": "BASE", + "value": "true", + "label": "Removal Schedule", + "attrs": { + "is_internal": true, + "omit_on_empty": false + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "8b1355b6-befc-dde9-23a0-200c2faab6f0" + }, + { + "regex": { + "value": "^(|([1-9]|[1-8][0-9]|90))$" + }, + "val_type": "STRING", + "is_mandatory": false, + "name": "create_snapshot_nutanix_ndb_database__remove_schedule_in_days", + "data_type": "BASE", + "value": "4", + "label": "Remove in (number of days)", + "attrs": { + "is_internal": false, + "omit_on_empty": true + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "2a431b0f-b8e0-d095-2e32-9c3a5972f63b" + } + ] + }, + "type": "RT_OPERATION", + "variable_list": [], + "name": "Snapshot" + }, + { + "uuid": "7546a911-e989-8ed5-788a-ab411fa7f06b", + "child_tasks_local_reference_list": [], + "attrs": { + "output_variables": { + "instance": "database_instance_id" + }, + "action_reference": { + "kind": "app_action", + "uuid": "22f3602c-3b4b-4c34-8218-5d3b18b58946" + }, + "resource_type_reference": { + "kind": "resource_type", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "tag": "Database", + "inarg_list": [ + { + "val_type": "STRING", + "is_mandatory": true, + "name": "restore_from_time_machine_nutanix_ndb_database__database_id", + "data_type": "BASE", + "value": "@@{id}@@", + "label": "Target Database", + "is_hidden": false, + "type": "LOCAL", + "uuid": "7e936546-6907-eab3-5a93-ae2a7d9e2e4c" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "restore_from_time_machine_nutanix_ndb_database__time_machine_id", + "data_type": "BASE", + "value": "", + "label": "", + "attrs": { + "is_internal": true, + "omit_on_empty": false + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "037d6365-01e1-be7e-cbef-04edf027ba21" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "restore_from_time_machine_nutanix_ndb_database__time_zone_pitr", + "data_type": "BASE", + "value": "Asia/Calcutta", + "label": "", + "is_hidden": true, + "type": "LOCAL", + "uuid": "af169074-3208-5b39-ea1c-6626ff94099c" + }, + { + "regex": { + "value": "^(|(\\d{4}-([0]\\d|[1][0-2])-([0-2]\\d|[3][0-1])\\s([0-1]\\d|[2][0-3]):[0-5]\\d:[0-5]\\d))$" + }, + "val_type": "STRING", + "is_mandatory": false, + "name": "restore_from_time_machine_nutanix_ndb_database__user_pitr_timestamp", + "data_type": "BASE", + "value": "2023-04-26 14:22:31", + "label": "Point in Time", + "is_hidden": false, + "type": "LOCAL", + "uuid": "b1da62fb-43fc-7ab5-0da0-b767b4722963" + } + ] + }, + "type": "RT_OPERATION", + "variable_list": [], + "name": "Restore" + }, + { + "uuid": "6369b6e9-b757-153c-b597-d2bfc5a2601d", + "child_tasks_local_reference_list": [], + "attrs": { + "output_variables": { + "Name": "database_name" + }, + "action_reference": { + "kind": "app_action", + "uuid": "c36b45fc-3779-48bb-85a9-5602c476544f" + }, + "resource_type_reference": { + "kind": "resource_type", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "tag": "Database", + "inarg_list": [ + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__name", + "data_type": "BASE", + "value": "afdsf", + "label": "Instance Name", + "is_hidden": false, + "type": "LOCAL", + "uuid": "fa3f50c1-2772-844d-1e53-77ac5ed7d538" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__time_machine_id", + "data_type": "BASE", + "value": "@@{Sla}@@", + "label": "Target Time Machine", + "is_hidden": false, + "type": "LOCAL", + "uuid": "fc3c5929-91bc-744e-bba9-601c2426ba7c" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__nx_cluster_id", + "data_type": "BASE", + "value": "e0b9c94a-ae8b-4cbd-bd83-a8c3d4ced6b7", + "label": "Nutanix Cluster", + "is_hidden": false, + "type": "LOCAL", + "uuid": "0c04a882-a61d-28f9-55c9-8a3ff4fa1e1e" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__ssh_public_key", + "data_type": "BASE", + "label": "SSH Public Key for Node Access", + "attrs": { + "is_secret_modified": false + }, + "is_hidden": false, + "type": "SECRET", + "uuid": "ac35daf0-1187-71c9-2bc7-31926b5fc48f" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__snapshot_id", + "data_type": "BASE", + "value": "@@{properties}@@", + "label": "Snapshot", + "is_hidden": false, + "type": "LOCAL", + "uuid": "311b2b47-ab59-9679-24bd-149ddf25ebe2" + }, + { + "val_type": "INT", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__node_count", + "data_type": "BASE", + "value": "1", + "label": "Node Count", + "is_hidden": false, + "type": "LOCAL", + "uuid": "107115cf-17e6-852c-d209-14c59b52202f" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__description", + "data_type": "BASE", + "value": "asfas", + "label": "Description", + "is_hidden": false, + "type": "LOCAL", + "uuid": "d6e96a66-6eb8-e92c-3c3f-5321369c23a7" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__compute_profile_id", + "data_type": "BASE", + "value": "5658f371-120f-4057-95c2-323e8d5efd80", + "label": "Compute Profile", + "is_hidden": false, + "type": "LOCAL", + "uuid": "53c631f7-8b8c-b1c1-8f69-a94fb733184d" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__network_profile_id", + "data_type": "BASE", + "value": "@@{platform_data}@@", + "label": "Network Profile", + "is_hidden": false, + "type": "LOCAL", + "uuid": "ebfe6c3b-c97d-38b4-abd8-d3382b222b9f" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__database_parameter_profile_id", + "data_type": "BASE", + "value": "741e5e9e-20a0-4cf1-8ee2-d9b95d323123", + "label": "Database Parameter Profile", + "is_hidden": false, + "type": "LOCAL", + "uuid": "6176fe8f-279e-3390-ba2f-1d944d333bb3" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__nodes__0__vm_name", + "data_type": "BASE", + "value": "VM_Instance", + "label": "Database Server VM Name", + "is_hidden": false, + "type": "LOCAL", + "uuid": "ab5f3c28-1a22-d69c-0427-d35fa812db93" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__vm_password", + "data_type": "BASE", + "label": "Password", + "attrs": { + "is_secret_modified": false + }, + "is_hidden": false, + "type": "SECRET", + "uuid": "ed479fa4-5bd7-c6ab-b8ad-d9ff473981fb" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__nodes__0__compute_profile_id", + "data_type": "BASE", + "value": "5658f371-120f-4057-95c2-323e8d5efd80", + "label": "Compute Profile", + "is_hidden": false, + "type": "LOCAL", + "uuid": "ae2ad653-db58-aff5-5c02-384ec5a1a198" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__nodes__0__network_profile_id", + "data_type": "BASE", + "value": "@@{platform_data}@@", + "label": "Network Profile", + "is_hidden": false, + "type": "LOCAL", + "uuid": "9a89c51a-782f-6354-a436-e75171f8d2da" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__nodes__0__nx_cluster_id", + "data_type": "BASE", + "value": "e0b9c94a-ae8b-4cbd-bd83-a8c3d4ced6b7", + "label": "Nutanix Cluster", + "is_hidden": false, + "type": "LOCAL", + "uuid": "dec47b5d-6af1-3dc8-5019-2a1fc1a786b6" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__vm_name", + "data_type": "BASE", + "value": "VM_Instance", + "label": "Database server VM Name", + "is_hidden": false, + "type": "LOCAL", + "uuid": "d38f1c5f-848a-e09d-8670-980c7f3164cf" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__pre_clone_cmd", + "data_type": "BASE", + "value": "dasfds", + "label": "Pre Clone Command", + "is_hidden": false, + "type": "LOCAL", + "uuid": "f1ee3b10-7e22-f783-c28e-743d91ceb386" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__post_clone_cmd", + "data_type": "BASE", + "value": "asdfds", + "label": "Post Clone Command", + "is_hidden": false, + "type": "LOCAL", + "uuid": "b006aa97-88e8-0448-6c11-5d27a8738227" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__dbserver_description", + "data_type": "BASE", + "value": "", + "label": "Description", + "is_hidden": false, + "type": "LOCAL", + "uuid": "c271344b-e09d-3e05-3923-990d5fc636c2" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__schedule_data_refresh", + "data_type": "BASE", + "value": "true", + "label": "Schedule Data Refresh", + "attrs": { + "is_internal": true, + "omit_on_empty": false + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "a6e04312-2c38-af43-0a22-d77bb9de425e" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__remove_schedule", + "data_type": "BASE", + "value": "false", + "label": "Removal Schedule", + "attrs": { + "is_internal": true, + "omit_on_empty": false + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "a2c553a0-87e8-b8a9-2f9b-97f1aa832ac1" + }, + { + "val_type": "STRING", + "is_mandatory": true, + "name": "clone_from_time_machine_nutanix_ndb_database__postgresql_info__0__db_password", + "data_type": "BASE", + "label": "Password", + "attrs": { + "is_secret_modified": false + }, + "is_hidden": false, + "type": "SECRET", + "uuid": "7ee99c80-7081-2fe3-0e25-719f9e5b4051" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__expiry_details__0__expiry_date_timezone", + "data_type": "BASE", + "value": "UTC", + "label": "Expiry Date Timezone", + "is_hidden": false, + "type": "LOCAL", + "uuid": "c6403f8f-00bb-a4d7-69d2-7dd62bf4893a" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__expiry_details__0__delete_database", + "data_type": "BASE", + "value": "false", + "label": "Delete Database", + "is_hidden": false, + "type": "LOCAL", + "uuid": "774bd36e-244b-100a-37f3-a0d6e837568a" + }, + { + "regex": { + "value": "^(|([0-1]\\d|[2][0-3]):[0-5]\\d:[0-5]\\d)$" + }, + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__refresh_details__0__refresh_time", + "data_type": "BASE", + "value": "12:12:12", + "label": "Refresh Time", + "is_hidden": false, + "type": "LOCAL", + "uuid": "86a1667f-7a83-8d1c-9b54-fd4d74cb3032" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__refresh_details__0__refresh_date_timezone", + "data_type": "BASE", + "value": "Asia/Calcutta", + "label": "Refresh Date Timezone", + "is_hidden": true, + "type": "LOCAL", + "uuid": "9a15c661-e679-cabf-3173-908c1ff2dede" + }, + { + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__time_zone", + "data_type": "BASE", + "value": "UTC", + "label": "Timezone", + "is_hidden": true, + "type": "LOCAL", + "uuid": "738c08b4-3045-f260-12a6-585ed9c6307d" + }, + { + "regex": { + "value": "^(|([1-9]|[1-8][0-9]|90))$" + }, + "val_type": "STRING", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__lcm_config__0__database_lcm_config__0__refresh_details__0__refresh_in_days", + "data_type": "BASE", + "value": "2", + "label": "Refresh every (number of days)", + "attrs": { + "is_internal": false, + "omit_on_empty": true + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "78a3cb28-058c-e998-388d-13c04588736c" + }, + { + "val_type": "DICT", + "is_mandatory": false, + "name": "clone_from_time_machine_nutanix_ndb_database__tags", + "data_type": "LIST", + "value": "[{\"tag_id\":\"61201158-b0b6-4b23-ac3a-dae774cc320b\",\"tag_name\":\"clone_tag_ÀÁÂÃÄÅÆÇÈÉÊËÌÍ_!#$%&()+-./:;<=>@^_`{|}~\",\"value\":\"clone\"}]", + "label": "Tags", + "attrs": { + "is_internal": false, + "omit_on_empty": true + }, + "is_hidden": false, + "type": "INPUT", + "uuid": "b9d14b7a-994c-ca03-4846-10c4a674cded" + } + ] + }, + "type": "RT_OPERATION", + "variable_list": [], + "name": "Task 4" + }, + { + "uuid": "8d530dd7-d985-44ce-c6d7-dcb973aa01b3", + "child_tasks_local_reference_list": [], + "attrs": { + "output_variables": {}, + "action_reference": { + "kind": "app_action", + "uuid": "18176324-cae3-412b-829e-ce28384f04e8" + }, + "resource_type_reference": { + "kind": "resource_type", + "uuid": "722a4722-beb9-49ec-8229-80e552091a24" + }, + "account_reference": { + "kind": "account", + "uuid": "2ebca133-6161-41b7-a69e-459995e814c0" + }, + "tag": "Database", + "inarg_list": [ + { + "val_type": "STRING", + "is_mandatory": true, + "name": "delete_nutanix_ndb_database__id", + "data_type": "BASE", + "value": "@@{database_name}@@", + "label": "Target Database", + "is_hidden": false, + "type": "LOCAL", + "uuid": "7dfccff5-ecc1-2d1f-d94f-ae08bcc315a5" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "delete_nutanix_ndb_database__delete", + "data_type": "BASE", + "value": "true", + "label": "Delete", + "is_hidden": true, + "type": "LOCAL", + "uuid": "73dd0762-04a9-fe49-c0bf-e73d99c22ff2" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "delete_nutanix_ndb_database__remove", + "data_type": "BASE", + "value": "false", + "label": "Remove", + "is_hidden": true, + "type": "LOCAL", + "uuid": "2c25b27a-d91a-a5bf-9d51-0cd64324833e" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "delete_nutanix_ndb_database__soft_remove", + "data_type": "BASE", + "value": "false", + "label": "Soft Remove", + "is_hidden": true, + "type": "LOCAL", + "uuid": "c9263b5d-af28-00ee-e753-dc0da8469fa4" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "delete_nutanix_ndb_database__forced", + "data_type": "BASE", + "value": "false", + "label": "Forced", + "is_hidden": true, + "type": "LOCAL", + "uuid": "730793b4-d6b1-ddf9-9d49-0cdf9c0d6ff5" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "delete_nutanix_ndb_database__delete_time_machine", + "data_type": "BASE", + "value": "true", + "label": "Delete Time Machine", + "is_hidden": true, + "type": "LOCAL", + "uuid": "1337bf9e-27ba-57d0-ead0-af7aad810152" + }, + { + "val_type": "BOOLEAN", + "is_mandatory": false, + "name": "delete_nutanix_ndb_database__delete_logical_cluster", + "data_type": "BASE", + "value": "true", + "label": "Delete Logical Cluster", + "is_hidden": true, + "type": "LOCAL", + "uuid": "0d5fafb4-01cb-34b7-fea2-76b7ae89c0d5" + } + ] + }, + "type": "RT_OPERATION", + "variable_list": [], + "name": "Task 5" + } + ], + "name": "7c055c11_runbook", + "variable_list": [ + { + "val_type": "STRING", + "name": "Sla", + "data_type": "BASE", + "uuid": "bfccc8ca-9d55-6048-1837-31061647ba00", + "value": "value", + "label": "", + "attrs": {}, + "is_hidden": false, + "type": "LOCAL", + "options": { + "type": "PREDEFINED" + }, + "description": "" + } + ], + "uuid": "e918b5f1-659d-f90a-41bb-70ca4e91122e" + }, + "endpoint_definition_list": [], + "credential_definition_list": [], + "default_target_reference": { + "kind": "app_endpoint", + "uuid": "f4ac5301-9505-0cc6-4cdd-16ee92f99e0d", + "name": "psqlVM" + } + } + }, + "api_version": "3.0", + "metadata": { + "last_update_time": "1688483478927527", + "use_categories_mapping": false, + "kind": "runbook", + "uuid": "2d9015ba-7656-098b-14bd-4ae9ef1e7eff", + "project_reference": { + "kind": "project", + "name": "test_project_default_dsl", + "uuid": "c5fd465b-f1e3-4af7-b484-55a69639b338" + }, + "creation_time": "1688482415149917", + "spec_version": 2, + "owner_reference": { + "kind": "user", + "uuid": "00000000-0000-0000-0000-000000000000", + "name": "admin" + }, + "name": "stratos-rb" + } +} \ No newline at end of file diff --git a/tests/runbook_decompile/test_rb_decompile.py b/tests/runbook_decompile/test_rb_decompile.py index cf7a6b0d..dde6dea4 100644 --- a/tests/runbook_decompile/test_rb_decompile.py +++ b/tests/runbook_decompile/test_rb_decompile.py @@ -18,6 +18,7 @@ "vm_poweroff.json", "vm_restart.json", "task_tree_runbook.json", + "ndb_task.json", ]