import java.io.Serializable;\r
\r
import com.fasterxml.jackson.annotation.JsonIgnore;\r
+import com.fasterxml.jackson.annotation.JsonInclude;\r
\r
\r
\r
public abstract class Resource extends JsonWrapper implements Serializable {\r
\r
private static final long serialVersionUID = 1L;\r
- private String resourceId;\r
+ private String resourceId; // TODO name this field just id instead, should be the id of the object as it is in aai\r
protected ResourceType resourceType; // Enum of vnf or network or allotted resource\r
protected ModelInfo modelInfo;\r
private long concurrencyCounter = 1L;\r
\r
//private List modules;\r
private ResourceInstance resourceInstance = new ResourceInstance(); // TODO possibly remove\r
- private HomingSolution homingSolution = new HomingSolution(); // TODO maybe this instead of resourceInstance being "bridge"\r
+ private HomingSolution homingSolution = new HomingSolution();\r
+ @JsonInclude(JsonInclude.Include.NON_NULL)\r
+ private HomingSolution currentHomingSolution;\r
\r
//common parameters for all Resources\r
private String toscaNodeType;\r
public void setHomingSolution(HomingSolution homingSolution){\r
this.homingSolution = homingSolution;\r
}\r
+ public HomingSolution getCurrentHomingSolution() {\r
+ return currentHomingSolution;\r
+ }\r
+ public void setCurrentHomingSolution(HomingSolution currentHomingSolution) {\r
+ this.currentHomingSolution = currentHomingSolution;\r
+ }\r
public void setResourceType(ResourceType resourceType) {\r
this.resourceType = resourceType;\r
}\r