GitHub user tbouron opened a pull request:
https://github.com/apache/brooklyn-server/pull/635
Allow passing "latest" as version for catalog endpoints
This allow passing `latest` as the version for the following endpoints:
- `GET /v1/catalog/applications/<symbolicName>/<version>`
- `GET /v1/catalog/entities/<symbolicName>/<version>`
- `GET /v1/catalog/policies/<symbolicName>/<version>`
- `GET /v1/catalog/locations/<symbolicName>/<version>`
- `DELETE /v1/catalog/applications/<symbolicName>/<version>`
- `DELETE /v1/catalog/entities/<symbolicName>/<version>`
- `DELETE /v1/catalog/policies/<symbolicName>/<version>`
- `DELETE /v1/catalog/locations/<symbolicName>/<version>`
For the `GET` requests, the latest catalog item matching the `symbolicName`
will be returned. Similarly, for the `DELETE` requests, the latest catalog item
matching the `symbolicName` will be deleted.
This is very useful to get the information back of an entity if one don't
currently know the version. Most of the times, one will be interested in the
latest version.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tbouron/brooklyn-server
fix/catalog-api-version
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/635.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 #635
----
commit 7ba584cc249fff1dc138a6e2d8cdf7e81c042578
Author: Thomas Bouron <[email protected]>
Date: 2017-04-13T07:11:52Z
Allow passing "latest" as version for catalog endpoint
commit 6ad3b5c4dd844455de9924ffa85c53df1e3fe295
Author: Thomas Bouron <[email protected]>
Date: 2017-04-13T17:14:30Z
Add unit tests
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---