From 0c3011101738f9e5b93e3846419cc75dff8b9092 Mon Sep 17 00:00:00 2001 From: Utkarsh Bairolia Date: Fri, 11 Aug 2023 13:22:59 +0530 Subject: [PATCH] added timestamp as well in snapshot name during decompile (#259) https://jira.nutanix.com/browse/CALM-39126 (cherry picked from commit d18399c153cab9c05e7b805c0ad4c6576ba29e27) --- calm/dsl/decompile/ndb.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/calm/dsl/decompile/ndb.py b/calm/dsl/decompile/ndb.py index ffb02e51..ea73dc84 100644 --- a/calm/dsl/decompile/ndb.py +++ b/calm/dsl/decompile/ndb.py @@ -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: