brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geom...@apache.org
Subject [3/3] brooklyn-server git commit: Closes #638
Date Tue, 09 May 2017 16:23:15 GMT
Closes #638

Add support for managing enrichers within the catalog

This allows enrichers to be registered within the Brooklyn catalog, same as entities or policies.
It allows enrichers' registration via:
- `@Catalog` annotation on the java class
- YAML with an `itemType: enricher`

This also adds 3 endpoints to the `/v1/catalog` REST API:
- `GET /v1/catalog/enrichers` returns the list of all registered enrichers
- `GET /v1/catalog/enrichers/<enricherId>/<version>` returns the detail of a specific
enricher
- `DELETE /v1/catalog/enrichers/<enricherId>/<version>` details a specific enricher

_PS: If the PR is too big, I can split up to multiples PRs. Hopefully the commit's messages
are pretty clear_


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/36b9045b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/36b9045b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/36b9045b

Branch: refs/heads/master
Commit: 36b9045b2f417016bde22846ebfb8a72c56c6820
Parents: fc575d7 02305e7
Author: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Authored: Tue May 9 17:21:53 2017 +0100
Committer: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Committed: Tue May 9 17:21:53 2017 +0100

----------------------------------------------------------------------
 .../brooklyn/api/catalog/CatalogItem.java       |   5 +
 .../spi/creation/CampInternalUtils.java         |  52 ++++++++++
 .../brooklyn/spi/creation/CampResolver.java     |   3 +
 .../spi/creation/CampTypePlanTransformer.java   |   1 +
 .../core/catalog/CatalogPredicates.java         |   4 +
 .../catalog/internal/BasicBrooklynCatalog.java  |   5 +
 .../catalog/internal/CatalogClasspathDo.java    |   8 ++
 .../internal/CatalogEnricherItemDto.java        |  43 ++++++++
 .../catalog/internal/CatalogItemBuilder.java    |   7 ++
 .../internal/JavaCatalogToSpecTransformer.java  |   6 ++
 .../core/network/OnPublicNetworkEnricher.java   |   2 +
 .../core/network/OnSubnetNetworkEnricher.java   |   2 +
 .../core/typereg/RegisteredTypePredicates.java  |   2 +
 .../brooklyn/enricher/stock/Aggregator.java     |   3 +-
 .../brooklyn/enricher/stock/Combiner.java       |   3 +-
 .../apache/brooklyn/enricher/stock/Joiner.java  |   3 +-
 .../brooklyn/enricher/stock/MapAggregator.java  |   2 +
 .../enricher/stock/PercentageEnricher.java      |   2 +
 .../brooklyn/enricher/stock/Propagator.java     |   3 +-
 .../brooklyn/enricher/stock/Transformer.java    |   7 +-
 .../brooklyn/enricher/stock/UpdatingMap.java    |   2 +
 .../YamlRollingTimeWindowMeanEnricher.java      |   3 +
 .../stock/YamlTimeWeightedDeltaEnricher.java    |   2 +
 .../enricher/stock/reducer/Reducer.java         |   4 +-
 core/src/main/resources/catalog.bom             |  60 ++++++++++-
 .../internal/CatalogItemBuilderTest.java        |   7 ++
 .../typereg/RegisteredTypePredicatesTest.java   |   3 +
 .../init/src/main/resources/catalog-classes.bom |  84 ++++++++++++++++
 .../brooklyn/policy/enricher/DeltaEnricher.java |   5 +-
 .../policy/enricher/HttpLatencyDetector.java    |   3 +-
 .../policy/enricher/RollingMeanEnricher.java    |   5 +-
 .../enricher/RollingTimeWindowMeanEnricher.java |   5 +-
 .../enricher/TimeFractionDeltaEnricher.java     |   5 +-
 .../enricher/TimeWeightedDeltaEnricher.java     |   7 +-
 .../policy/ha/ServiceFailureDetector.java       |   3 +-
 policy/src/main/resources/catalog.bom           |  30 ++++++
 .../apache/brooklyn/rest/api/CatalogApi.java    |  40 ++++++++
 .../rest/domain/CatalogEnricherSummary.java     |  80 +++++++++++++++
 .../rest/domain/EnricherConfigSummary.java      |  79 +++++++++++++++
 .../rest/resources/CatalogResource.java         |  55 ++++++++++-
 .../rest/transform/CatalogTransformer.java      |  27 ++++-
 .../rest/transform/EntityTransformer.java       |  10 ++
 .../CatalogResourcePerformanceTest.java         |  15 ++-
 .../rest/resources/CatalogResourceTest.java     |  99 +++++++++++++++++++
 .../test/osgi/entities/SimpleEnricher.java      |  42 ++++++++
 .../brooklyn/util/osgi/OsgiTestResources.java   |   1 +
 .../osgi/brooklyn-test-osgi-entities.jar        | Bin 22067 -> 22900 bytes
 47 files changed, 813 insertions(+), 26 deletions(-)
----------------------------------------------------------------------



Mime
View raw message