GitHub user aledsage opened a pull request:
https://github.com/apache/brooklyn-server/pull/903
Delete bundle: handle pre-installed karaf bundles
Previously, if you tried to delete a bundle that was pre-installed in
brooklyn karaf then the REST pai call would return a 500 response:
```
curl -v -X DELETE -u xxxxxxxx:xxxxxxxx
http://localhost:8081/v1/catalog/bundles/org.example.my-pre-installed-bundle/1.0.0
```
gave the exception:
```
"No such bundle installed in OSGi when uninstalling:
BasicManagedBundle{symbolicName=org.example.my-pre-installed-bundle,
version=1.0.0, url=mvn:org.example/my-pre-installed-bundle/1.0.0}"...
```
e.g. to reproduce, try removing a bundle like
`http://localhost:8081/v1/catalog/bundles/org.apache.brooklyn.software-database/1.0.0.SNAPSHOT`
This PR changes our bundle-lookup so that we don't just use the
`bundleMetadata.getOsgiUniqueUrl()`, but instead use lookup by url etc (in the
same way as we use elsewhere).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/brooklyn-server fix-bundle-remove
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/903.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 #903
----
commit 08d237466eff048c650ebb6b830ce5b1e2dffbcf
Author: Aled Sage <[email protected]>
Date: 2017-11-21T15:29:50Z
Delete bundle: handle pre-installed karaf bundles
----
---