GitHub user ludop-usharesoft opened a pull request:

    https://github.com/apache/brooklyn-ui/pull/88

    Allow to resolve different virtual type according to the entity config

    One possible use case of the composer is to have a custom palette that 
represents several elements ("virutal types") that are based on the same 
brooklyn type with different brooklyn configuration (referencing different 
external element like docker image or, in our case, UForge appliance).
    
    In that use case, with the following yaml
    ```
    services:
      - type: com.usharesoft.brooklyn.type.LinuxAppliance
        brooklyn.config:
          applianceUUID: 'AAAA-AAAA-AAAA'
      - type: com.usharesoft.brooklyn.type.LinuxAppliance
        brooklyn.config:
          applianceUUID: 'BBBB-BBBB-BBBB'
      - type: com.usharesoft.brooklyn.type.LinuxAppliance
        brooklyn.config:
          applianceUUID: 'AAAA-AAAA-AAAA'
    ```
    the three services of the same 
`com.usharesoft.brooklyn.type.LinuxAppliance` brooklyn type should be resolved 
by two different "virtual" types from the composer point of view, one for the 
reference `AAAA-AAAA-AAAA` and one for the reference `BBBB-BBBB-BBBB`.
    
    So that graphically we can have when switching from the yaml editor to the 
graphical editor
    
![image](https://user-images.githubusercontent.com/22656857/47286412-e1adda00-d5ee-11e8-8456-bdb517e964f1.png)
    
    In order to be able to do that, we need to add an extra third parameters 
with the entity configuration when the type is resolved by the palette-api 
provider (when the user switch from the yaml editor to the graphical editor).
    
    In the standard use case of the palette, this extra parameter is ignored 
and the palette-api simply calls the catalog-api as before.
    
    PS: it's one of my first pull request on the project so don't hesitate to 
correct me and to tell me the proper way of doing it. Thanks !

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

    $ git pull https://github.com/usharesoft/brooklyn-ui gettypeconfig

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

    https://github.com/apache/brooklyn-ui/pull/88.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 #88
    
----

----


---

Reply via email to