use of io.kaoto.backend.model.deployment.Integration in project kaoto-backend by KaotoIO.
the class ClusterService method getIntegrations.
public List<Integration> getIntegrations() {
List<Integration> res = new ArrayList<>();
try {
final var resources = kubernetesClient.resources(KameletBinding.class).list().getItems();
for (KameletBinding integration : resources) {
Integration i = new Integration();
i.setName(integration.getMetadata().getName());
i.setRunning(true);
i.setResource(integration);
res.add(i);
}
} catch (Exception e) {
log.warn("Error extracting the list of integrations.", e);
}
return res;
}
use of io.kaoto.backend.model.deployment.Integration in project kaoto-backend by KaotoIO.
the class IntegrationResource method integrations.
/*
* 🐱method stop: String
*
* Stops and deletes an integration by name
*/
@DELETE
@Produces(MediaType.APPLICATION_JSON)
@Path("/{name}")
@Operation(summary = "Stop/Remove integration", description = "Remove the integration identified by name.")
public boolean integrations(@Parameter(description = "Name of the integration to stop.") @PathParam("name") final String name) {
Integration i = new Integration();
i.setName(name);
return clusterService.stop(i);
}
Aggregations