cloudfoundry / cloudfoundry/cli
There should be a programmatic way to get the current space guid
@a-b is already working on this.
Since Oct 3, 2024.
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 990
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 8
Description
What's the user value of this feature request?
Improve scripting capabilities of cf curl ...
Who is the functionality for?
CF users and CI / CD builders
How often will this functionality be used by the user?
It is going to be used in scripts and CI/CDs. It is hard to say how often.
Who else is affected by the change?
Not a breaking change
Is your feature request related to a problem? Please describe.
There is no reliable scriptable way of checking if an application exists in the current space unless:
- we know guid of the current space (
GET /v3/apps?names=APPNAME&space_guids=SPACE_GUID)
OR - we know guid of the application itself
OR cf app appnameproduces a parsable response so that there is no need to check for unreliableApp 'APPNAME' not found
Describe the solution you'd like
cf target or cf space should have an option to get guid of the current space
Describe alternatives you've considered
Another option would be to parse ~/.cf/config.json though I'm not sure if this file has a stable format and supposed to be read by users. I'd expect this not to be the case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.