OCI CLI Interactive - Default value for compartment-id is not working in interactive mode.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
As per https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliconfigure.htm#Specifying_Default_Values, We can store default values for options in oci_cli_rc file which works fine when we run the commands in non-interactive mode.
But, when OCI CLI is used in interactive mode, these default values are not being honored or considered - which is resulting in error Error: Missing required parameters ['--compartment-id']
For example with api-gateway.compartment-id default value specified in configuration:
- Command
oci api-gateway deployment list --lifecycle-state ACTIVEworks and returns list of ACTIVE deployments in the default compartment. - Command
oci api-gateway deployment listworks fine in interactive mode, and returns list of all deployments in default compartment. - Command
oci api-gateway deployment list --lifecycle-state ACTIVEdoesn't work in interactive mode, and returns errorError: Missing required parameters ['--compartment-id']
Expected:
- Command
oci api-gateway deployment list --lifecycle-state ACTIVEshould return list of all deployments in the default compartment.
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
Reproduce the two deployment-list commands in interactive and non-interactive modes, using an oci_cli_rc default for api-gateway.compartment-id. Compare how interactive mode handles the default when --lifecycle-state ACTIVE is supplied. Done means the interactive command honors the configured compartment-id and returns the deployments without a missing-parameter error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100