@Path(value="/")
@Configurable
public interface EliseRepository
Modifier and Type | Method and Description |
---|---|
void |
deleteArtifact(Artifact artifact)
To delete the artifact
|
void |
deleteProvider(String uniqueID)
Delete information of provider from DB
|
void |
deleteServiceTemplate(String uniqueID)
Delete the service template from DB
|
void |
deleteUnitInstance(String uniqueID)
Delete unit instance by ID
|
Set<String> |
getUnitCategory()
Return a list of supported service unit types.
|
String |
health()
To check the availability of this RESTful API.
|
Set<UnitInstance> |
query(at.ac.tuwien.dsg.cloud.salsa.messaging.model.Elise.EliseQuery query)
Filter unit instance by an ID
|
Set<Provider> |
readAllProviders()
Get a list of all available provider
|
Set<ServiceTemplate> |
readAllServiceTemplates()
Get all the list of service template
|
Set<UnitInstance> |
readAllUnitInstances(String name,
String category,
String state,
String hostedOnID)
Get the unit instance base on some basic metadata, managed by ELISE.
|
Set<Artifact> |
readArtifact(String name,
String version,
String type)
Read the artifact information.
|
Provider |
readProvider(String uniqueID)
Read information about provider
|
ServiceTemplate |
readServiceTemplate(String uniqueID)
To read service template
|
UnitInstance |
readUnitInstance(String uniqueID)
Read an unit instance from the database and all its extensions
|
Set<UnitInstance> |
readUnitInstanceByExtension(List<ExtensibleModel> extra)
Get the list of instance with external model info, e.g.
|
Artifact |
saveArtifact(Artifact artifact)
To create new or update artifacts
|
String |
saveProvider(Provider provider)
To save a provider
|
void |
saveRelationshipConnectTo(ConnectToRelationshipInstance connectToRela)
To save a relationship between two instances
|
void |
saveRelationshipHostOn(HostOnRelationshipInstance hostOnRela)
To save a relationship between two instances
|
ServiceTemplate |
saveServiceTemplate(ServiceTemplate serviceTemplate)
Create new or update a service template
|
UnitInstance |
saveUnitInstance(UnitInstance unitInstance)
Add new or update an unit instance.
|
@GET @Path(value="/instance/{uniqueID}") @Produces(value="application/json") UnitInstance readUnitInstance(@PathParam(value="uniqueID") String uniqueID)
uniqueID
- The uuid of the unit@GET @Path(value="/instance/") @Produces(value="application/json") Set<UnitInstance> readAllUnitInstances(@QueryParam(value="name") String name, @QueryParam(value="category") String category, @QueryParam(value="state") String state, @QueryParam(value="hostedOnID") String hostedOnID)
name
- Name of the service instance, e.g. LoadBalancerUnitcategory
- The category, e.g. dockerstate
- The state, e.g. to get all "error" instancehostedOnID
- To find all instances which is hosted by an instance@POST @Path(value="/instance/querymeta") @Produces(value="application/json") Set<UnitInstance> readUnitInstanceByExtension(List<ExtensibleModel> extra)
extra
- The template of extra information@POST @Path(value="/instance") @Consumes(value="application/json") @Produces(value="application/json") UnitInstance saveUnitInstance(UnitInstance unitInstance)
unitInstance
- The instance to be saved@POST @Path(value="/instance/relationship/hoston") @Consumes(value="application/json") void saveRelationshipHostOn(HostOnRelationshipInstance hostOnRela)
hostOnRela
- The relationship type@POST @Path(value="/instance/relationship/connectto") @Consumes(value="application/json") void saveRelationshipConnectTo(ConnectToRelationshipInstance connectToRela)
connectToRela
- The relationship type@DELETE @Path(value="/instance/{uniqueID}") void deleteUnitInstance(@PathParam(value="uniqueID") String uniqueID)
uniqueID
- The ID of the unit@POST @Path(value="/instance/query") @Consumes(value="application/json") Set<UnitInstance> query(at.ac.tuwien.dsg.cloud.salsa.messaging.model.Elise.EliseQuery query)
query
- A filter to query the result.
This functions will be replated by the readUnitInstanceByExtension function@GET @Path(value="/provider/{uniqueID}") @Produces(value="application/json") Provider readProvider(@PathParam(value="uniqueID") String uniqueID)
uniqueID
- the uuid of provider@GET @Path(value="/provider") @Produces(value="application/json") Set<Provider> readAllProviders()
@POST @Path(value="/provider") @Consumes(value="application/json") String saveProvider(Provider provider)
provider
- the information@DELETE @Path(value="/provider/{uniqueID}") @Produces(value="application/json") void deleteProvider(@PathParam(value="uniqueID") String uniqueID)
uniqueID
- The id of the provider to be deleted@GET @Path(value="/servicetemplate/{uniqueID}") @Produces(value="application/json") ServiceTemplate readServiceTemplate(@PathParam(value="uniqueID") String uniqueID)
uniqueID
- The uuid of the template@GET @Path(value="/servicetemplate") @Produces(value="application/json") Set<ServiceTemplate> readAllServiceTemplates()
@POST @Path(value="/servicetemplate") @Consumes(value="application/json") @Produces(value="application/json") ServiceTemplate saveServiceTemplate(ServiceTemplate serviceTemplate)
serviceTemplate
- the service template to be saved@DELETE @Path(value="/servicetemplate/{uniqueID}") void deleteServiceTemplate(@PathParam(value="uniqueID") String uniqueID)
uniqueID
- The uuid of the template@GET @Path(value="/artifact/") @Produces(value="application/json") Set<Artifact> readArtifact(@QueryParam(value="name") String name, @QueryParam(value="version") String version, @QueryParam(value="type") String type)
name
- E.g. haproxy.shversion
- E.g. v1.0type
- E.g. shellscript@POST @Path(value="/artifact") @Consumes(value="application/json") @Produces(value="application/json") Artifact saveArtifact(Artifact artifact)
artifact
- the information@DELETE @Path(value="/artifact") @Consumes(value="application/json") void deleteArtifact(Artifact artifact)
artifact
- The artifact object@GET @Path(value="/categories") Set<String> getUnitCategory()
@GET @Path(value="/health") String health()
Copyright © 2016. All Rights Reserved.