Github user geomacy commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/485#discussion_r107477582
--- Diff:
core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
---
@@ -417,6 +419,53 @@ else for (String key: otherKeys) {
return result;
}
+ public static Map<?,?> getCatalogMetadata(String yaml) {
+ Map<?,?> itemDef = Yamls.getAs(Yamls.parseAll(yaml), Map.class);
+ return getFirstAsMap(itemDef, "brooklyn.catalog").orNull();
+ }
+
+ public static VersionedName getVersionedName(Map<?,?> catalogMetadata)
{
+ String id = getFirstAs(catalogMetadata, String.class,
"id").orNull();
+ String version = getFirstAs(catalogMetadata, String.class,
"version").orNull();
+ String symbolicName = getFirstAs(catalogMetadata, String.class,
"symbolicName").orNull();
--- End diff --
Related to comment
https://github.com/apache/brooklyn-server/pull/485#issuecomment-288044805 from
@tbouron, will this not clash with the use of `symbolicName` made in
`BasicBrooklynCatalog` to define catalog item ids? The "symbolicName" we want
here is related to the bundle and is distinct from the ids of the catalog items
that will be created from the bom files in the zip. Maybe we should call this
`bundleSymbolicName`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---