Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/156#discussion_r17300345
--- Diff:
usage/camp/src/main/java/io/brooklyn/camp/brooklyn/spi/creation/BrooklynAssemblyTemplateInstantiator.java
---
@@ -162,23 +163,7 @@ protected boolean shouldUnwrap(AssemblyTemplate
template, EntitySpec<? extends A
if (childSpec.getType()==null ||
!Application.class.isAssignableFrom(childSpec.getType()))
return false;
- Set<String> rootAttrs = template.getCustomAttributes().keySet();
- for (String rootAttr: rootAttrs) {
- if (rootAttr.equals("brooklyn.catalog")) {
- // this attr does not block promotion
- continue;
- }
- if (rootAttr.startsWith("brooklyn.")) {
- // any others in 'brooklyn' namespace will block promotion
- return false;
- }
- // location is allowed in both, and is copied on promotion
- // (name also copied)
- // others are root currently are ignored on promotion; they
are usually metadata
- // TODO might be nice to know what we are excluding
- }
-
- return true;
+ return AddChildrenEffector.hasNoNameOrCustomKeysOrRoot(template,
app);
--- End diff --
As above.
---
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.
---