You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ge...@apache.org on 2017/07/27 17:15:11 UTC

[2/2] brooklyn-client git commit: Closes #56

Closes #56

Set ContentType header when adding .yaml and .bom files to the catalog

Using application/x-yaml saves the Brooklyn server the hassle of guessing. At the moment it's too smart for its own good and gives useless errors about zipfiles when there are errors in yaml files, e.g. when trying to add yaml containing an undefined alias.

Before:
```
$ br catalog add mybp.bom
Server error (400): Bundle BasicManagedBundle{symbolicName=null, version=null, url=n
ull} failed preparation: Unable to read /tmp/brooklyn-bundle-transient-null-86366849
75390229868.zip when looking for manifest: ZipException: error in opening zip file
```
After:
```
$ br catalog add mybp.bom
Server error (400): ComposerException: found undefined alias doesntexist
 in 'reader', line 23, column 15:
            name: *doesntexist
```
I'll look to improve the feedback from Brooklyn's guessing endpoint too.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/5dc3c6c2
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/5dc3c6c2
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/5dc3c6c2

Branch: refs/heads/master
Commit: 5dc3c6c264c1661ca216e007444753873778993b
Parents: be80516 635328e
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Authored: Thu Jul 27 18:15:03 2017 +0100
Committer: Geoff Macartney <ge...@cloudsoftcorp.com>
Committed: Thu Jul 27 18:15:03 2017 +0100

----------------------------------------------------------------------
 cli/api/catalog/catalog.go | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------