brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetoslav Neykov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-353) Best-practice for adding endpoints to the REST interface?
Date Thu, 29 Sep 2016 09:27:22 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15532288#comment-15532288
] 

Svetoslav Neykov commented on BROOKLYN-353:
-------------------------------------------

That's a good advice from [~andreaturli]. You can plug in your own parser so Brooklyn supports
your format natively. It can  essentially follow the same approach - taking the xml, transforming
it and passing it to the yaml parser. Ping us on the dev list if you need additional details.

As for the concrete question you have, I've seen this done a couple of ways:
  * create a new REST endpoint, unrelated to the Brooklyn's, on another port
  * override BrooklynRestApi with your own version adding the new API, placing the new class
in patches folder

Brooklyn is in the process of moving to Karaf (OSGi) which makes it easier to plug in your
own REST APIs. Any jar can register it's own services, similar to how it's done in https://github.com/apache/brooklyn-server/blob/master/rest/rest-resources/src/main/resources/OSGI-INF/blueprint/service.xml.

> Best-practice for adding endpoints to the REST interface?
> ---------------------------------------------------------
>
>                 Key: BROOKLYN-353
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-353
>             Project: Brooklyn
>          Issue Type: Question
>    Affects Versions: 0.9.0
>            Reporter: Francesco Chicchiriccò
>
> At the [CHOReVOLUTION|http://www.chorevolution.eu] project we are using Apache Brooklyn
to manage the whole deployment.
> As we need to add some endpoints to the REST interface, is there any best practice around?
At the moment we are just adding our classes to the Brooklyn codebase - which does not look
particularly fancy.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message