ENH: consider adding a convenience command or simple means to retrieve the tenancy_ocid
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
Consider adding a simple way to get the tenancy_ocid based on the configured SDK credentials.
I am regularly doing something like this:
oci os-management software-source list
…which requires the tenancy OCID as input. I resort to something like this:
oci os-management software-source list $(oci iam group list --raw-output --query 'data[0]."compartment-id"')
…and am surprised there isn't a way to either default to the tenanc_ocid from the ~/.oci/config file or otherwise easily get the tenancy_ocid otherwise. I would expect oci iam tenancy command to offer that value but, alas, it ALSO requires the tenancy ID as input.
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.
Research direction
Start by tracing the entry points for oci os-management software-source list, oci iam group list, and the ~/.oci/config credentials described in the issue. Compare how tenancy and compartment identifiers are currently resolved. Done means users have a documented, tested way to retrieve or supply the configured tenancy OCID without the existing workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100