GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-server/pull/744
Allow catalog item to be force-updated via query string flag on the REST API # Issue When `POST`ing a catalog item (YAML file) with an ID and version to already exist, the REST API returns a `400` with a message inviting the user to use a `forceUpdate` flag if one wishes to. However, this flag is only available internally and not exposed to the REST API. Another issue is that under the same condition for ZIP/JAR archives, the `OsgiArchiveInstaller` silently ignores the update and therefore, the REST API returns a `201` even though it has done anything. # Fix This fixes both above issues by: - exposing a `forceUpdate` flag on the REST API for `/v1/catalog` - checking the result code from `OsgiArchiveInstaller.install()` method and throw the same error message inviting the user to use the flag You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-server feature/catalog-force-update Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-server/pull/744.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 #744 ---- commit 884b901e052c793a14e82f0e3d11fb100fad5dc0 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2017-06-23T10:07:27Z Allow catalog item (YAML or bundle) to be force-updated via query string flag on the REST API ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---