You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2017/06/12 01:15:05 UTC

[GitHub] brooklyn-server pull request #729: Use PolicySpec instead of policy construc...

GitHub user aledsage opened a pull request:

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

    Use PolicySpec instead of policy constructor

    Changes (mostly test) code to use `PolicySpec` to create policies, rather than calling the policy's constructor. There are two big reasons for doing this:
    1. the `PolicySpec` approach is the same as is used by yaml blueprints - by using/testing in this way, we are more confident that we'll be able to do the same in yaml blueprints.
    2. we want to simplify our code - reducing the number of ways a policy/enricher/location/entity can be created and configured will give us some simplification.

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

    $ git pull https://github.com/aledsage/brooklyn-server use-PolicySpec-instead-of-constructor

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

    https://github.com/apache/brooklyn-server/pull/729.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 #729
    
----
commit 0fac0d6c99c560bacb3c1a3dac6316be66b412f9
Author: Aled Sage <al...@gmail.com>
Date:   2017-06-11T10:28:37Z

    Use PolicySpec instead of policy constructor

commit 260c80f95e6a62c5526d81b1f0db0cc3352d3434
Author: Aled Sage <al...@gmail.com>
Date:   2017-06-11T14:52:29Z

    Fix BrooklynYamlTypeInstantiatorTest.testLoadPolicySpecWithBrooklynConfig
    
    Previously it relied on ServiceRestarter to have a constructor that 
    took a Map or ConfigBag. Now we check if the type implements
    Configurable, to handle no-arg constructors as well.

----


---
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 #729: Use PolicySpec instead of policy construc...

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

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


---
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.
---