Skip to content

Commit

Permalink
Task/m calm 37367 rt task decompile (#245)
Browse files Browse the repository at this point in the history
Co-authored-by: imranpasha1 <[email protected]>
Co-authored-by: Nirbhay Bagmar <[email protected]>
Co-authored-by: Bekkam Venkata Aditya <[email protected]>
Co-authored-by: Abhishek Patwardhan <[email protected]>
(cherry picked from commit 1f1ab6084b67ec776eba0591f138699f4e98b8df)
  • Loading branch information
utkarshb07 authored and abhijeetkaurav1st committed Aug 6, 2023
1 parent 6cbd4f6 commit 81756c6
Show file tree
Hide file tree
Showing 13 changed files with 5,022 additions and 97 deletions.
30 changes: 30 additions & 0 deletions calm/dsl/builtins/models/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class SYSTEM_ACTIONS:
SOFT_DELETE = "soft_delete"


HIDDEN_SUFFIX = "__hidden"


class NutanixDB:
"""Nutanix DB class constant for dsl models"""

Expand Down Expand Up @@ -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"
3 changes: 2 additions & 1 deletion calm/dsl/builtins/models/custom_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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
Expand Down
195 changes: 100 additions & 95 deletions calm/dsl/builtins/models/ndb.py

Large diffs are not rendered by default.

Loading

0 comments on commit 81756c6

Please sign in to comment.