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-12-21 15:43:36 +01:00
|
|
|
|
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint;
|
2020-01-15 17:26:54 +01:00
|
|
|
|
import org.gcube.informationsystem.types.annotations.ResourceSchema;
|
|
|
|
|
import org.gcube.informationsystem.types.annotations.ResourceSchemaEntry;
|
2021-02-18 15:44:45 +01:00
|
|
|
|
import org.gcube.informationsystem.types.annotations.RelatedResourcesEntry;
|
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.VirtualServiceImpl;
|
2020-01-15 17:26:54 +01:00
|
|
|
|
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
|
|
|
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
2020-01-16 12:44:10 +01:00
|
|
|
|
import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Demands;
|
2019-03-22 15:51:44 +01:00
|
|
|
|
|
|
|
|
|
/**
|
2020-12-21 15:43:36 +01:00
|
|
|
|
* VirtualService is an abstract service (non-physically existing service) worth being
|
|
|
|
|
* represented as an existing Service for management purposes.
|
|
|
|
|
* Examples of usage include cases where classes or set of services have to
|
|
|
|
|
* be managed like an existing unit.
|
|
|
|
|
* This resource is essential from infrastructure management point of view because
|
|
|
|
|
* it allows easily share a pool of services across VREs as a single unit.
|
|
|
|
|
*
|
|
|
|
|
* VirtualService mainly consist of a service definition which uses relations to
|
|
|
|
|
* {@link ConfigurationTemplate}, {@link EService},
|
|
|
|
|
* {@link Software} (using {@link Demands} relation) to properly support the sharing across VREs.
|
|
|
|
|
*
|
|
|
|
|
* The correct sharing is feasible thanks to the {@link PropagationConstraint} of the model.
|
|
|
|
|
*
|
|
|
|
|
* The IS provides only the support for resource sharing as a bundle.
|
|
|
|
|
* Instead, the actions required to deploy a {@link Software} are a responsibility of the service
|
|
|
|
|
* invoking the sharing operation.
|
|
|
|
|
*
|
|
|
|
|
* This resource emerged thank to the experience maturated with
|
|
|
|
|
* gCube IS V.1 (gCore Based IS) where this resource was represented as a Generic Resource
|
|
|
|
|
* containing the list of the resource’s id forming the bundle which often lead to inconsistency.
|
|
|
|
|
*
|
2021-03-02 16:16:35 +01:00
|
|
|
|
* https://wiki.gcube-system.org/gcube/GCube_Model#Virtual_Service
|
2020-12-21 15:43:36 +01:00
|
|
|
|
*
|
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
2019-03-22 15:51:44 +01:00
|
|
|
|
*/
|
|
|
|
|
@JsonDeserialize(as=VirtualServiceImpl.class)
|
2020-01-15 17:26:54 +01:00
|
|
|
|
@ResourceSchema(
|
|
|
|
|
facets={
|
|
|
|
|
@ResourceSchemaEntry(relation=IsIdentifiedBy.class, facet=SoftwareFacet.class, min=1),
|
2020-01-16 12:44:10 +01:00
|
|
|
|
},
|
|
|
|
|
resources= {
|
2021-02-18 15:44:45 +01:00
|
|
|
|
@RelatedResourcesEntry(source=VirtualService.class, relation=Demands.class, target=Software.class)
|
2020-01-15 17:26:54 +01:00
|
|
|
|
}
|
|
|
|
|
)
|
2020-12-15 20:06:58 +01:00
|
|
|
|
@TypeMetadata(
|
|
|
|
|
name = VirtualService.NAME,
|
2020-12-21 15:43:36 +01:00
|
|
|
|
description = "VirtualService is an abstract service (non-physically existing service) worth being "
|
|
|
|
|
+ "represented as an existing Service for management purposes.\n"
|
|
|
|
|
+ "Examples of usage include cases where classes or set of services have to be managed like an existing unit.\n"
|
|
|
|
|
+ "This resource is essential from infrastructure management point of view because "
|
|
|
|
|
+ "it allows easily share a pool of services across VREs as a single unit.\n"
|
|
|
|
|
+ "VirtualService mainly consist of a service definition which uses relations to {@link ConfigurationTemplate}, "
|
|
|
|
|
+ "{@link EService}, {@link Software} (using {@link Demands} relation) to properly support the sharing across VREs.\n"
|
|
|
|
|
+ "The correct sharing is feasible thanks to the {@link PropagationConstraint} of the model.\n"
|
|
|
|
|
+ "The IS provides only the support for resource sharing as a bundle.\n"
|
|
|
|
|
+ "Instead, the actions required to deploy a {@link Software} are a responsibility "
|
|
|
|
|
+ "of the service invoking the sharing operation.\n"
|
|
|
|
|
+ "This resource emerged thank to the experience maturated with gCube IS V.1 (gCore Based IS) "
|
|
|
|
|
+ "where this resource was represented as a Generic Resource containing "
|
|
|
|
|
+ "the list of the resource’s id forming the bundle which often lead to inconsistency.",
|
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 VirtualService extends Service {
|
|
|
|
|
|
|
|
|
|
public static final String NAME = "VirtualService"; // VirtualService.class.getSimpleName();
|
2020-12-15 20:06:58 +01:00
|
|
|
|
|
2019-03-22 15:51:44 +01:00
|
|
|
|
}
|