brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Added basic migration capability ...
Date Wed, 14 Oct 2015 21:35:51 GMT
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/924#issuecomment-148209355
  
    @adriannieto thanks for your contribution.
    
    I've made a few comments on and asked a few questions about the implementation as it is.

    
    It's interesting to see that nothing in the implementation of `JavaWebAppSoftwareProcessImpl.migrate`
is specific to the webapp entity. A cleaner approach would be to create an [entity initializer](https://github.com/apache/incubator-brooklyn/blob/0c3e7ea5381d91263c6e492063fe3f42e4aef8c4/api/src/main/java/org/apache/brooklyn/api/entity/EntityInitializer.java)
that adds the `migrate` effector and implementation to an entity dynamically. This way entity
writers can choose when and where it is available. In fact you might not even need to write
the initialiser - `org.apache.brooklyn.core.effector.AddEffector` looks like a useful starting
point, though you may need to extend it to allow the effector body to be specified.
    
    You can refer to [vanilla-bash-netcat-w-client.yaml](https://github.com/apache/incubator-brooklyn/blob/0c3e7ea5381d91263c6e492063fe3f42e4aef8c4/docs/guide/yaml/example_yaml/vanilla-bash-netcat-w-client.yaml#L29-L40)
for an example of how initialisers are used from Yaml.
    



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

Mime
View raw message