Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/373#discussion_r82358926
--- Diff:
software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessImpl.java
---
@@ -268,6 +272,36 @@ protected void onUpdated() {
* Called before driver.start; guarantees the driver will exist, and
locations will have been set.
*/
protected void preStart() {
+ if (!getLocations().isEmpty() && getLocations().iterator().next()
instanceof JcloudsMachineLocation) {
+ JcloudsMachineLocation location = (JcloudsMachineLocation)
getLocations().iterator().next();
+ if (location.getParent().getProvider().equals("aws-ec2")
--- End diff --
@iyovcheva I agree with @neykov - this looks like a very specific use-case.
It's a code-smell when we have cloud-specific code (e.g. checking for
"aws-ec2"), particularly in generic entities like this.
Also, because the `EffectorBody` class is instantiated reflectively (with
classname supplied via the config key), this code really isn't doing anything
specific about "extra HDD" other than wiring in a given class to be an effector
with that name.
We should be able to use a "mixin". We can use `AddEffector`, which is an
`EntityInitializer`, which people can optionally include.
---
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.
---