From 3ab93a918742a1cb751d418a13ad643c41472b4d Mon Sep 17 00:00:00 2001
From: Christos Tranoris <tranoris@ece.upatras.gr>
Date: Thu, 7 Dec 2023 00:41:29 +0200
Subject: [PATCH] fix for #2

---
 .../etsi/osl/domain/model/kubernetes/KubernetesCRDV1.java   | 6 ++++--
 .../etsi/osl/domain/model/kubernetes/KubernetesCRV1.java    | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/etsi/osl/domain/model/kubernetes/KubernetesCRDV1.java b/src/main/java/org/etsi/osl/domain/model/kubernetes/KubernetesCRDV1.java
index bfdf907..35d6392 100644
--- a/src/main/java/org/etsi/osl/domain/model/kubernetes/KubernetesCRDV1.java
+++ b/src/main/java/org/etsi/osl/domain/model/kubernetes/KubernetesCRDV1.java
@@ -117,7 +117,8 @@ public class KubernetesCRDV1 extends DomainModelDefinition
 		rsc.addResourceSpecificationCharacteristicItemShort("yaml", this.yaml, EValueType.TEXT.getValue(), "", false);
 		rsc.addResourceSpecificationCharacteristicItemShort("json", this.json, EValueType.TEXT.getValue(), "", false);
         rsc.addResourceSpecificationCharacteristicItemShort( "_CR_SPEC", "", EValueType.TEXT.getValue(), "Used for providing the json Custom Resource description to apply", false);
-        rsc.addResourceSpecificationCharacteristicItemShort( "_CR_SPEC_APPLIED", "", EValueType.TEXT.getValue(), "Used for providing the json Custom Resource description as applied", false);
+        rsc.addResourceSpecificationCharacteristicItemShort( "_CR_SPEC_LASTSEND", "", EValueType.TEXT.getValue(), "Used for providing the last description send", false);
+        rsc.addResourceSpecificationCharacteristicItemShort( "_CR_SPEC_APPLIED", "", EValueType.TEXT.getValue(), "Used for providing the json Custom Resource description as applied by Kubernetes", false);
         rsc.addResourceSpecificationCharacteristicItemShort( "_CR_CHECK_FIELD", "", EValueType.TEXT.getValue(), "Used for providing the field that need to be checked for the resource status", false);
         rsc.addResourceSpecificationCharacteristicItemShort( "_CR_CHECKVAL_STANDBY", "", EValueType.TEXT.getValue(), "Used for providing the equivalent value from resource to signal the standby status", false);
         rsc.addResourceSpecificationCharacteristicItemShort( "_CR_CHECKVAL_ALARM", "", EValueType.TEXT.getValue(), "Used for providing the equivalent value from resource to signal the alarm status", false);
@@ -196,8 +197,9 @@ public class KubernetesCRDV1 extends DomainModelDefinition
 		rs.addResourceCharacteristicItemShort("metadata", this.metadata, EValueType.TEXT.getValue());
 		rs.addResourceCharacteristicItemShort("yaml", this.yaml, EValueType.TEXT.getValue());
 		rs.addResourceCharacteristicItemShort("json", this.json, EValueType.TEXT.getValue());
-		
+
         rs.addResourceCharacteristicItemShort("_CR_SPEC", this.cr_spec, EValueType.TEXT.getValue());
+        rs.addResourceCharacteristicItemShort("_CR_SPEC_LASTSEND", this.cr_spec, EValueType.TEXT.getValue());        
         rs.addResourceCharacteristicItemShort("_CR_SPEC_APPLIED", "", EValueType.TEXT.getValue());
         rs.addResourceCharacteristicItemShort("_CR_CHECK_FIELD", this.statusCheckFieldName, EValueType.TEXT.getValue());
         rs.addResourceCharacteristicItemShort("_CR_CHECKVAL_STANDBY", this.statusCheckValueStandby, EValueType.TEXT.getValue());
diff --git a/src/main/java/org/etsi/osl/domain/model/kubernetes/KubernetesCRV1.java b/src/main/java/org/etsi/osl/domain/model/kubernetes/KubernetesCRV1.java
index ec06b71..c550be8 100644
--- a/src/main/java/org/etsi/osl/domain/model/kubernetes/KubernetesCRV1.java
+++ b/src/main/java/org/etsi/osl/domain/model/kubernetes/KubernetesCRV1.java
@@ -119,7 +119,8 @@ public class KubernetesCRV1 extends DomainModelDefinition
         rsc.addResourceSpecificationCharacteristicItemShort( "json", "", EValueType.TEXT.getValue(), "", false);
 
         rsc.addResourceSpecificationCharacteristicItemShort( "_CR_SPEC", "", EValueType.TEXT.getValue(), "Used for providing the json Custom Resource description to apply", false);
-        rsc.addResourceSpecificationCharacteristicItemShort( "_CR_SPEC_APPLIED", "", EValueType.TEXT.getValue(), "Used for providing the json Custom Resource description as applied", false);
+        rsc.addResourceSpecificationCharacteristicItemShort( "_CR_SPEC_LASTSEND", "", EValueType.TEXT.getValue(), "Used for providing the last description send", false);
+        rsc.addResourceSpecificationCharacteristicItemShort( "_CR_SPEC_APPLIED", "", EValueType.TEXT.getValue(), "Used for providing the json Custom Resource description as applied by Kubernetes", false);
         rsc.addResourceSpecificationCharacteristicItemShort( "_CR_CHECK_FIELD", "", EValueType.TEXT.getValue(), "Used for providing the field that need to be checked for the resource status", false);
         rsc.addResourceSpecificationCharacteristicItemShort( "_CR_CHECKVAL_STANDBY", "", EValueType.TEXT.getValue(), "Used for providing the equivalent value from resource to signal the standby status", false);
         rsc.addResourceSpecificationCharacteristicItemShort( "_CR_CHECKVAL_ALARM", "", EValueType.TEXT.getValue(), "Used for providing the equivalent value from resource to signal the alarm status", false);
-- 
GitLab