You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Tidd, Bryan (MAN-Corporate)" <Br...@Manheim.com> on 2014/10/14 23:34:39 UTC

Catalog.xml

Does anyone have a larger catalog.xml that could be shared with the community based on available entities, etc.?

Bryan Tidd | Senior Engineer, Release Engineering

Manheim | 6325 Peachtree Dunwoody Road | Atlanta, GA | 30328

M: 770.595.2516 | bryan.tidd@manheim.com

Re: Catalog.xml

Posted by Sam Corbett <sa...@cloudsoftcorp.com>.
Hi Bryan,

I don't think there is a canonical resource at the moment.

I'm assuming you have a catalog.xml file and that it contains an element 
like:

     <classpath scan="annotations">
         <entry>url</entry>
         ...
     </classpath>

Brooklyn should scan the URLs listed for classes annotated @Catalog. 
They should appear in the web console on the catalogue page.

Unintuitively, the best way to get Brooklyn to include bundled entities 
in the catalogue is to start it with an empty classpath element. If you 
do this and view the catalogue page in the web console you should see 
Brooklyn's standard entities and policies listed. If you would like to 
obtain this catalogue in a format suitable for a catalog.xml file you 
can run this snippet of code in the Groovy scripting portion of the web 
console:

     import brooklyn.catalog.internal.BasicBrooklynCatalog
     ((BasicBrooklynCatalog) mgmt.catalog).toXmlString()

The output should look like this:

     <catalog>
<contentsDescription>scanning-local-classpath</contentsDescription>
       <name>Local Scanned Catalog</name>
       <description>All annotated Brooklyn entities detected in the 
default classpath</description>
       <classpath scan="ANNOTATIONS"/>
       <entity id="brooklyn.entity.nosql.redis.RedisStore" name="Redis 
Server">
      ...

You can then merge the entities and policies with your existing 
catalog.xml file.

There is also a list of entities, policies and enrichers available at 
https://brooklyn.incubator.apache.org/learnmore/catalog/, albeit not in 
a format suitable for a catalog.xml file.

It has been noted in Jira that we should improve this part of Brooklyn: 
https://issues.apache.org/jira/browse/BROOKLYN-58.

Sam

On 14/10/2014 22:34, Tidd, Bryan (MAN-Corporate) wrote:
> Does anyone have a larger catalog.xml that could be shared with the community based on available entities, etc.?
>
> Bryan Tidd | Senior Engineer, Release Engineering
>
> Manheim | 6325 Peachtree Dunwoody Road | Atlanta, GA | 30328
>
> M: 770.595.2516 | bryan.tidd@manheim.com
>