You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2017/08/02 16:26:50 UTC

[GitHub] brooklyn-server pull request #786: Freemarker DSL

GitHub user neykov opened a pull request:

    https://github.com/apache/brooklyn-server/pull/786

    Freemarker DSL

    Provides `$brooklyn:template(...)` evaluated against the context entity as a freemarker template.
    The main advantage of the new DSL is that it's now possible to do simple expressions in YAML - both logical or algebraic.
    
    Re-implements the most useful parts of #392 for easier merge.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/neykov/brooklyn-server brooklyn-template

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/786.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #786
    
----
commit 7952c0566f0077dfd0a289281fa1946bda3adc41
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2017-08-02T16:22:07Z

    Freemarker DSL
    
    Provides "$brooklyn:template(...)" evaluated against the context entity as freemarker template.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #786: Freemarker DSL

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/786
  
    Added more test coverage.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #786: Freemarker DSL

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/786
  
    Thanks @geomacy, fixed the typo.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server pull request #786: Freemarker DSL

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/786#discussion_r131181517
  
    --- Diff: camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/DslComponent.java ---
    @@ -738,6 +741,82 @@ public String toString() {
             }
         }
     
    +    public Object template(Object template) {
    +        return new DslTemplate(this, template);
    +    }
    +
    +    public Object template(Object template, Map<?, ?> substitutions) {
    +        return new DslTemplate(this, template, substitutions);
    +    }
    +
    +    protected final static class DslTemplate extends BrooklynDslDeferredSupplier<Object> {
    +        private static final long serialVersionUID = -585564936781673667L;
    +        private DslComponent component;
    +        private Object template;
    +        private Map<?, ?> subsitutions;
    --- End diff --
    
    typo `subsitutions`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server pull request #786: Freemarker DSL

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-server/pull/786


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #786: Freemarker DSL

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/786
  
    Added additional template variables (substitutions) as a second argument.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---