You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Martin Harris (JIRA)" <ji...@apache.org> on 2015/11/18 11:35:11 UTC
[jira] [Created] (BROOKLYN-195) Invalid catalog item can be posted
to catalog
Martin Harris created BROOKLYN-195:
--------------------------------------
Summary: 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
`
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
`
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):
```
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
```
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)