You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2015/11/06 17:49:45 UTC

[GitHub] incubator-brooklyn pull request: Unwrap camp plan with parent over...

GitHub user neykov opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/1007

    Unwrap camp plan with parent overriding child displayName

    There's an unexpected side effect presently where pointing to a catalog item and giving a top-level name to the plan will prevent unwrapping. It's surprising to users and even more so because it wasn't the case a few months ago.
    
    For example the following catalog item:
    
    ```
    brooklyn.catalog:
      id: simpleApp
      version: 1.0
      displayName: Simple App
      itemType: template
      item:
        services:
        - type: my-simple-app
    ```
    
    when started in the Application Wizard and given a name, equivalent to the following plan:
    
    ```
    name: My App
    services:
      - type: "simpleApp:1.0"
    ```
    
    will result in this hierarchy:
    
    ```
    * My App (BasicApplication)
        * Simple App (my-simple-app)
    ```
    
    I propose that we change the logic such that the root level name will overwrite the child's name, so the hierarchy becomes:
    
    ```
    * My App (my-simple-app)
    ```

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

    $ git pull https://github.com/neykov/incubator-brooklyn unwrap-display-name

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

    https://github.com/apache/incubator-brooklyn/pull/1007.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 #1007
    
----
commit 564586b45ef61809df1bfdac9140d97819df6eb8
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2015-11-06T16:48:05Z

    Unwrap camp plan with parent overriding child displayName
    
    Don't prevent unwrapping in case displayName is different, override the child's name instead

----


---
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] incubator-brooklyn pull request: Unwrap camp plan with parent over...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1007#issuecomment-154526598
  
    Looks good.  Agree with @bostko a catalog item test would be useful but not essential.
    
    There is one failing test:
    * org.apache.brooklyn.camp.brooklyn.AppYamlTest.testWrapsAppIfNameAtTopLevelAndOnApp


---
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] incubator-brooklyn pull request: Unwrap camp plan with parent over...

Posted by bostko <gi...@git.apache.org>.
Github user bostko commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1007#issuecomment-154483716
  
    @neykov, would you like to add more complicated test like the one bellow.
    You should also assert that the name which will be passed when a user selects catalog item, will be assigned to the BasicApplication node.
    
    ```
    brooklyn.catalog:
      id: org.apache.webcluster.tomcat
      version: 1.0
      description: A Tomcat load-balanced cluster, with MySQL
      displayName: MySQL and Tomcat cluster
      itemType: template
    
    - type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
      defaultDisplayName: Web-cluster
      displayName: extra node
      brooklyn.config:
        childSpec:
          $brooklyn:entitySpec:
            type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
            brooklyn.config:
              initialSize: 1
    
              memberSpec:
                $brooklyn:entitySpec:
                  type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
    ```



---
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] incubator-brooklyn pull request: Unwrap camp plan with parent over...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1007#issuecomment-155028441
  
    Added some more catalog tests, also fixed another issue with unwrapping when enrichers/policies are set at root.


---
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] incubator-brooklyn pull request: Unwrap camp plan with parent over...

Posted by iyovcheva <gi...@git.apache.org>.
Github user iyovcheva commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1007#issuecomment-155059374
  
    The changes were successfully tested in vCloud. Everything looks fine.


---
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] incubator-brooklyn pull request: Unwrap camp plan with parent over...

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

    https://github.com/apache/incubator-brooklyn/pull/1007


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