2019-03-22 15:51:44 +01:00
/ * *
*
* /
package org.gcube.resourcemanagement.model.reference.entities.resources ;
2020-07-07 17:12:10 +02:00
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize ;
2020-01-15 17:26:54 +01:00
import org.gcube.informationsystem.types.annotations.ResourceSchema ;
import org.gcube.informationsystem.types.annotations.ResourceSchemaEntry ;
2020-12-15 20:06:58 +01:00
import org.gcube.informationsystem.types.reference.Change ;
import org.gcube.informationsystem.types.reference.TypeMetadata ;
import org.gcube.informationsystem.utils.TypeVersion ;
2019-03-22 15:51:44 +01:00
import org.gcube.resourcemanagement.model.impl.entities.resources.HostingNodeImpl ;
2020-01-15 17:26:54 +01:00
import org.gcube.resourcemanagement.model.reference.entities.facets.CPUFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.EventFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.MemoryFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.NetworkingFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.SimplePropertyFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet ;
2020-12-21 13:59:53 +01:00
import org.gcube.resourcemanagement.model.reference.entities.facets.StateFacet ;
2020-01-15 17:26:54 +01:00
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasPersistentMemory ;
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasVolatileMemory ;
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy ;
2019-03-22 15:51:44 +01:00
/ * *
2020-12-21 15:43:36 +01:00
* The HostingNode represent a container capable of managing the lifecycle of an
* electronic service , i . e . , being capable to host and operate an { @link EService } .
* Examples are docker , tomcat .
*
* A container is a service which is conceived to enable any services respecting
* the container rules to be operative . The container does not typically provide any
* functionality rather than allowing the hosted service to operate .
*
* The HostingNode characterisation in terms of facets reflects the one presented for { @link VirtualMachine } .
*
* In particular , facets representing memory , CPU and networking interface are used to describe
* the HostingNode when the VirtualMachine enabling the HostingNode is not represented .
*
* Federated systems can provide virtual machines as resource or containers as resources .
* In some cases , the description of a container includes ( virtual ) hardware information .
*
* It is important to highlight that HostingNode is not a subclass of VirtualMachine .
*
* HostingNode could be though as a specialisation of the entity
* PE6_Software_Hosting_Service defined in PARTHENOS Entities Model ( PE Model ) .
*
2021-03-02 16:16:35 +01:00
* https : //wiki.gcube-system.org/gcube/GCube_Model#Hosting_Node
2020-12-21 15:43:36 +01:00
*
* @author Luca Frosini ( ISTI - CNR )
2019-03-22 15:51:44 +01:00
* /
@JsonDeserialize ( as = HostingNodeImpl . class )
2020-01-15 17:26:54 +01:00
@ResourceSchema (
facets = {
2021-03-02 15:57:39 +01:00
@ResourceSchemaEntry ( relation = IsIdentifiedBy . class , facet = NetworkingFacet . class , min = 1 , max = 1 , description = " The Network ID characterising the Hosting Node. " ) ,
2020-01-15 17:26:54 +01:00
@ResourceSchemaEntry ( facet = CPUFacet . class , min = 1 , description = " The CPU equipping the Hosting Node. " ) ,
@ResourceSchemaEntry ( relation = HasPersistentMemory . class , facet = MemoryFacet . class , min = 1 , description = " The Disk Space Capacity of the Hosting Node. " ) ,
@ResourceSchemaEntry ( relation = HasVolatileMemory . class , facet = MemoryFacet . class , min = 1 , description = " The RAM Capacity of the Hosting Node. " ) ,
@ResourceSchemaEntry ( facet = EventFacet . class , min = 1 , description = " Every event characterizing the life cycle of the Hosting Node, e.g. the activation time. " ) ,
2020-12-21 13:59:53 +01:00
@ResourceSchemaEntry ( facet = StateFacet . class , min = 1 , max = 1 , description = " The current state of the Hosting Node, e.g. started, ready, certified, down, failed. " ) ,
2020-01-15 17:26:54 +01:00
@ResourceSchemaEntry ( facet = SimplePropertyFacet . class , description = " Any <key,value> pair property worth associating with the Hosting Node, e.g. Environment Variables " ) ,
@ResourceSchemaEntry ( facet = SoftwareFacet . class , description = " Any Software characterising the Hosting Node. Useful to report the hosted software that are not registered in the Resource Registry as Software Resource, e.g. Operating System " )
}
)
2020-12-15 20:06:58 +01:00
@TypeMetadata (
name = HostingNode . NAME ,
2020-12-21 15:43:36 +01:00
description = " The HostingNode represent a container capable of managing the lifecycle of "
+ " an electronic service, i.e., being capable to host and operate an {@link EService}. "
2021-09-13 12:57:00 +02:00
+ " Examples are docker, tomcat. "
2020-12-21 15:43:36 +01:00
+ " A container is a service which is conceived to enable any services respecting "
+ " the container rules to be operative. The container does not typically provide any "
2021-09-13 12:57:00 +02:00
+ " functionality rather than allowing the hosted service to operate. "
+ " The HostingNode characterisation in terms of facets reflects the one presented for {@link VirtualMachine}. "
2020-12-21 15:43:36 +01:00
+ " In particular, facets representing memory, CPU and networking interface are used to describe "
2021-09-13 12:57:00 +02:00
+ " the HostingNode when the {@link VirtualMachine} enabling the HostingNode is not represented. "
+ " Federated systems can provide virtual machines as resource or containers as resources. "
+ " In some cases, the description of a container includes (virtual) hardware information. "
2020-12-21 15:43:36 +01:00
+ " It is important to highlight that HostingNode is not a subclass of {@link VirtualMachine}. " ,
2020-12-15 20:06:58 +01:00
version = TypeVersion . MINIMAL_VERSION_STRING
)
@Change ( version = TypeVersion . MINIMAL_VERSION_STRING , description = TypeVersion . MINIMAL_VERSION_DESCRIPTION )
2019-03-22 15:51:44 +01:00
public interface HostingNode extends Service {
public static final String NAME = " HostingNode " ; //HostingNode.class.getSimpleName();
}