You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2020/08/10 16:13:00 UTC

[GitHub] [brooklyn-server] jcabrerizo opened a new pull request #1106: New ChildrenBatchEffector

jcabrerizo opened a new pull request #1106:
URL: https://github.com/apache/brooklyn-server/pull/1106


   Adding a new effector to call a inner effector in all the children entities where the effector is inserted in batches of a parametrized size.
   It accept also a couple of parameters for define if it should continue or fail when the child effector doesn't exist and for failing and skipt next if one of the inner effector taks fails. An of course a parameter for define the name of the child effector o be called
   This example blueprint shows the idea
   ```
   services:
     - type: org.apache.brooklyn.entity.stock.BasicApplication
       name: Test ChildrenBatchEffector
   
       brooklyn.initializers:
         - type: org.apache.brooklyn.core.effector.util.ChildrenBatchEffector
           brooklyn.config:
             name: ChildrenBatchEffectorInParent
             effectorToInvoke: testEffector
             failOnMissingEffector: true
   
       brooklyn.children:
         - type: org.apache.brooklyn.entity.stock.BasicEntity
           name: child one
           brooklyn.initializers:
             - type: org.apache.brooklyn.core.effector.http.HttpCommandEffector
               brooklyn.config:
                 name: testEffector
                 uri: "http://localhost.io:8081/v1/applications"
                 httpUsername: admin
                 httpPassword: password
                 httpVerb: get
   
         - type: org.apache.brooklyn.entity.stock.BasicEntity
           name: child two
           brooklyn.initializers:
             - type: org.apache.brooklyn.core.effector.http.HttpCommandEffector
               brooklyn.config:
                 name: testEffector
                 uri: "http://localhost.io:8081/v1/applications"
                 httpUsername: admin
                 httpPassword: password
                 httpVerb: get
   ```
   
   If you call the effector from the UI it will show you this dialog with the fields filled with the information from the blueprint
   ![image](https://user-images.githubusercontent.com/17095501/89804846-a5819b80-db2c-11ea-9ea8-be176d89bf06.png)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org