brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Harris (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BROOKLYN-195) Invalid catalog item can be posted to catalog
Date Wed, 18 Nov 2015 10:37:11 GMT

     [ https://issues.apache.org/jira/browse/BROOKLYN-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Martin Harris updated BROOKLYN-195:
-----------------------------------
    Description: 
The following YAML can be posted to the catalog

{noformat}
brooklyn.catalog:
  id: invalid-catalog-item
  version: 1.0
  displayName: Invalid Catalog Item
  itemType: template

services:
- type: org.apache.brooklyn.entity.stock.BasicApplication
- type: org.apache.brooklyn.entity.stock.BasicApplication
{noformat}

E.g. by using the following curl command 

curl http://localhost:8081/v1/catalog --data-binary @`pwd`/services.yaml

This will return a 201 and the catalog item will be created. However, when trying to deploy
the catalog item, the following error is returned:

{noformat}
Transformer for Brooklyn OASIS CAMP interpreter gave an error creating this plan: Transformer
for catalog gave an error creating this plan: Transformer for Brooklyn OASIS CAMP interpreter
gave an error creating this plan: java.lang.UnsupportedOperationException: Single service
expected, but got [EntitySpec{type=interface org.apache.brooklyn.entity.stock.BasicApplication},
EntitySpec{type=interface org.apache.brooklyn.entity.stock.BasicApplication}]
{noformat}

As the use of multiple services is not supported, Brooklyn should not allow the catalog item
to be created

Marked as low priority as the workaround is fairly simple (i.e. use the following YAML):

{noformat}
brooklyn.catalog:
  id: invalid-catalog-item
  version: 1.0
  displayName: Invalid Catalog Item
  itemType: template

services:
- type: org.apache.brooklyn.entity.stock.BasicApplication
  brooklyn.children:
  - type: org.apache.brooklyn.entity.stock.BasicApplication
  - type: org.apache.brooklyn.entity.stock.BasicApplication

{noformat}


  was:
The following YAML can be posted to the catalog

{noformat}
brooklyn.catalog:
  id: invalid-catalog-item
  version: 1.0
  displayName: Invalid Catalog Item
  itemType: template

services:
- type: org.apache.brooklyn.entity.stock.BasicApplication
- type: org.apache.brooklyn.entity.stock.BasicApplication
{noformat}

E.g. by using the following curl command 

curl http://localhost:8081/v1/catalog --data-binary @`pwd`/services.yaml

This will return a 201 and the catalog item will be created. However, when trying to deploy
the catalog item, the following error is returned:

"Transformer for Brooklyn OASIS CAMP interpreter gave an error creating this plan: Transformer
for catalog gave an error creating this plan: Transformer for Brooklyn OASIS CAMP interpreter
gave an error creating this plan: java.lang.UnsupportedOperationException: Single service
expected, but got [EntitySpec{type=interface org.apache.brooklyn.entity.stock.BasicApplication},
EntitySpec{type=interface org.apache.brooklyn.entity.stock.BasicApplication}]"

As the use of multiple services is not supported, Brooklyn should not allow the catalog item
to be created

Marked as low priority as the workaround is fairly simple (i.e. use the following YAML):

{noformat}
brooklyn.catalog:
  id: invalid-catalog-item
  version: 1.0
  displayName: Invalid Catalog Item
  itemType: template

services:
- type: org.apache.brooklyn.entity.stock.BasicApplication
  brooklyn.children:
  - type: org.apache.brooklyn.entity.stock.BasicApplication
  - type: org.apache.brooklyn.entity.stock.BasicApplication

{noformat}



> Invalid catalog item can be posted to catalog
> ---------------------------------------------
>
>                 Key: BROOKLYN-195
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-195
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Martin Harris
>            Priority: Minor
>
> The following YAML can be posted to the catalog
> {noformat}
> brooklyn.catalog:
>   id: invalid-catalog-item
>   version: 1.0
>   displayName: Invalid Catalog Item
>   itemType: template
> services:
> - type: org.apache.brooklyn.entity.stock.BasicApplication
> - type: org.apache.brooklyn.entity.stock.BasicApplication
> {noformat}
> E.g. by using the following curl command 
> curl http://localhost:8081/v1/catalog --data-binary @`pwd`/services.yaml
> This will return a 201 and the catalog item will be created. However, when trying to
deploy the catalog item, the following error is returned:
> {noformat}
> Transformer for Brooklyn OASIS CAMP interpreter gave an error creating this plan: Transformer
for catalog gave an error creating this plan: Transformer for Brooklyn OASIS CAMP interpreter
gave an error creating this plan: java.lang.UnsupportedOperationException: Single service
expected, but got [EntitySpec{type=interface org.apache.brooklyn.entity.stock.BasicApplication},
EntitySpec{type=interface org.apache.brooklyn.entity.stock.BasicApplication}]
> {noformat}
> As the use of multiple services is not supported, Brooklyn should not allow the catalog
item to be created
> Marked as low priority as the workaround is fairly simple (i.e. use the following YAML):
> {noformat}
> brooklyn.catalog:
>   id: invalid-catalog-item
>   version: 1.0
>   displayName: Invalid Catalog Item
>   itemType: template
> services:
> - type: org.apache.brooklyn.entity.stock.BasicApplication
>   brooklyn.children:
>   - type: org.apache.brooklyn.entity.stock.BasicApplication
>   - type: org.apache.brooklyn.entity.stock.BasicApplication
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message