oracle / oracle/oci-cli

List compartments in subtree from compartment other than root

Open
#397 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When using [list compartments] (https://docs.oracle.com/en-us/iaas/tools/oci-cli/2.16.0/oci_cli_docs/cmdref/iam/compartment/list.html) with compartment-id-in-subtree is enabled, root/tenancy is required for the compartment ID. This can be limited with the access level accessible flag, but if a user has access to multiple parent compartments, then more compartments than needed will be pulled. This can have a downstream affect if this builds a compartment list to use for other lists (instances, volumes, etc.).

In summary, can a different compartment ID than root be used with compartment-id-in-subtree? That way it only traverses one parent compartment instead of all?

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 with the OCI CLI IAM compartment list command and the linked compartment-list documentation, then check how compartment-id-in-subtree and access-level are passed to the OCI API. Determine whether a non-root compartment ID can scope traversal; done means documenting the limitation or supporting scoped subtree listing without including unrelated parent compartments.

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.