Skip to content

Commit

Permalink
added timestamp as well in snapshot name during decompile (#259)
Browse files Browse the repository at this point in the history
https://jira.nutanix.com/browse/CALM-39126
(cherry picked from commit d18399c153cab9c05e7b805c0ad4c6576ba29e27)
  • Loading branch information
utkarshb07 authored and abhijeetkaurav1st committed Aug 11, 2023
1 parent 0991708 commit 0c30111
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions calm/dsl/decompile/ndb.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ def set_ndb_calm_reference(inarg_var_name, inarg_var_value):
obj = Cache.get_entity_data_using_uuid(
CACHE.NDB + CACHE.KEY_SEPARATOR + entity_map["cache"], inarg_var_value
)
if inarg_var_name == NutanixDBConst.Attrs.SNAPSHOT_WITH_TIMESTAMP:
return {
"value": obj.get("name", "")
+ " ("
+ obj.get("snapshot_timestamp", "")
+ ")",
"type": "Ref",
"ref": entity_map["ref"],
}
return {"value": obj.get("name", ""), "type": "Ref", "ref": entity_map["ref"]}
if inarg_var_name in tags_map:
try:
Expand Down

0 comments on commit 0c30111

Please sign in to comment.