Commit 158443b3 authored by Christos Tranoris's avatar Christos Tranoris
Browse files

fix for #9

parent bdec583f
Loading
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -169,6 +169,13 @@ public class KubernetesConfigMap extends DomainModelDefinition
		.resourceSpecification( rSpecRef )
		.resourceSpecification( rSpecRef )
		.resourceVersion( this.version);
		.resourceVersion( this.version);
		
		
	      String cprefix = "";
	        if ( this.name.indexOf('@')>0) {
	            String firstToken = this.name.substring(  0, this.name.indexOf('@') );
	            cprefix = this.kind + "." + firstToken + ".";         
	        }
	        
	        
		rs.addResourceCharacteristicItemShort("clusterMasterURL", this.clusterMasterURL, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("clusterMasterURL", this.clusterMasterURL, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("currentContextCluster", this.currentContextCluster, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("currentContextCluster", this.currentContextCluster, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("fullResourceName", this.fullResourceName, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("fullResourceName", this.fullResourceName, EValueType.TEXT.getValue());
@@ -176,8 +183,8 @@ public class KubernetesConfigMap extends DomainModelDefinition
		rs.addResourceCharacteristicItemShort("apiGroup", this.apiGroup, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("apiGroup", this.apiGroup, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("UID", this.UID, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("UID", this.UID, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("metadata", this.metadata, EValueType.OBJECT.getValue());
		rs.addResourceCharacteristicItemShort("metadata", this.metadata, EValueType.OBJECT.getValue());
		rs.addResourceCharacteristicItemShort("yaml", this.yaml, EValueType.TEXT.getValue());
		//rs.addResourceCharacteristicItemShort("yaml", this.yaml, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("json", this.json, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort(cprefix + "json", this.json, EValueType.TEXT.getValue());
        rs.addResourceCharacteristicItemShort("data", this.dataObj, EValueType.OBJECT.getValue());
        rs.addResourceCharacteristicItemShort("data", this.dataObj, EValueType.OBJECT.getValue());
		
		


+9 −2
Original line number Original line Diff line number Diff line
@@ -169,6 +169,13 @@ public class KubernetesSecret extends DomainModelDefinition
		.resourceSpecification( rSpecRef )
		.resourceSpecification( rSpecRef )
		.resourceVersion( this.version);
		.resourceVersion( this.version);
		
		
        String cprefix = "";
        if ( this.name.indexOf('@')>0) {
            String firstToken = this.name.substring(  0, this.name.indexOf('@') );
            cprefix = this.kind + "." + firstToken + ".";         
        }
        
        
		rs.addResourceCharacteristicItemShort("clusterMasterURL", this.clusterMasterURL, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("clusterMasterURL", this.clusterMasterURL, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("currentContextCluster", this.currentContextCluster, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("currentContextCluster", this.currentContextCluster, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("fullResourceName", this.fullResourceName, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("fullResourceName", this.fullResourceName, EValueType.TEXT.getValue());
@@ -176,8 +183,8 @@ public class KubernetesSecret extends DomainModelDefinition
		rs.addResourceCharacteristicItemShort("apiGroup", this.apiGroup, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("apiGroup", this.apiGroup, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("UID", this.UID, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("UID", this.UID, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("metadata", this.metadata, EValueType.OBJECT.getValue());
		rs.addResourceCharacteristicItemShort("metadata", this.metadata, EValueType.OBJECT.getValue());
		rs.addResourceCharacteristicItemShort("yaml", this.yaml, EValueType.TEXT.getValue());
		//rs.addResourceCharacteristicItemShort("yaml", this.yaml, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("json", this.json, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort(cprefix + "json", this.json, EValueType.TEXT.getValue());
        rs.addResourceCharacteristicItemShort("data", this.dataObj, EValueType.OBJECT.getValue());
        rs.addResourceCharacteristicItemShort("data", this.dataObj, EValueType.OBJECT.getValue());
		
		


+1 −1
Original line number Original line Diff line number Diff line
@@ -197,7 +197,7 @@ public class KubernetesService extends DomainModelDefinition
		rs.addResourceCharacteristicItemShort("apiGroup", this.apiGroup, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("apiGroup", this.apiGroup, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("UID", this.UID, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("UID", this.UID, EValueType.TEXT.getValue());
		rs.addResourceCharacteristicItemShort("metadata", this.metadata, EValueType.OBJECT.getValue());
		rs.addResourceCharacteristicItemShort("metadata", this.metadata, EValueType.OBJECT.getValue());
		rs.addResourceCharacteristicItemShort("yaml", this.yaml, EValueType.TEXT.getValue());
		//rs.addResourceCharacteristicItemShort("yaml", this.yaml, EValueType.TEXT.getValue());
        rs.addResourceCharacteristicItemShort(cprefix + "json", this.json, EValueType.TEXT.getValue());
        rs.addResourceCharacteristicItemShort(cprefix + "json", this.json, EValueType.TEXT.getValue());
        rs.addResourceCharacteristicItemShort("spec", this.specObj, EValueType.OBJECT.getValue());
        rs.addResourceCharacteristicItemShort("spec", this.specObj, EValueType.OBJECT.getValue());
        rs.addResourceCharacteristicItemShort("status", this.statusObj, EValueType.OBJECT.getValue());
        rs.addResourceCharacteristicItemShort("status", this.statusObj, EValueType.OBJECT.getValue());