oracle / oracle/oci-cli

Suggestion: Allow compartment name in addition to compartment-id

Open
#74 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Object Storage
Dominant language
Python
Stars
669
Forks
236
Avg merge
1m
Merged PRs (30d)
4

Description

Quality of life suggestion.

Example if I run:
oci os bucket list --compartment-id --namespace-name

I would prefer to be able to run:
oci os bucket list --compartment --namespace-name

The UI has a tendency to report the compartment name.
This affects a number of areas / commands.

There does not seem to be any way to achieve this with CLI version 2.4.27 apart from pulling the compartment IDs using "iam compartment list".

Thanks for considering

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 CLI handling for oci os bucket list and the existing --compartment-id option, then compare it with the iam compartment list command mentioned in the issue. Check how commands across the affected areas resolve compartment identifiers. Done means a short compartment name can be accepted in place of an ID wherever this request applies, with existing ID usage preserved.

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.