oracle / oracle/oci-cli

ENH: consider adding a convenience command or simple means to retrieve the tenancy_ocid

Open
#464 0 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.