Project_O "o" command used from an instance principal
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
Can the "o" command be used from an instance principal defined in a dynamic group similarly to how regular oci commands can be used? I noticed "o" works from a cloud shell host so I was hoping it worked equally well from instance principal hosts to perform selected tasks from them.
When I ran "o oci_commands" it seemed to be working but the resulting oci_commands file just has a header followed by a bunch of blank lines in it. I ran "export OCI_CLI_AUTH=instance_principal" and retried but got the same result.
Update: Copying the ocids and oci_commands from my Dev laptop to the host's ~/.oci directory seems to be working correctly w/o need for a config file I just had to set OCI_CLI_AUTH as above. Thinking it may be a viable workaround. Please let me know if there's a better way or if some changes to o's code may be needed to fully support its use from an instance principal.
"o" is a great wrapper for working with the underlying OCI commands. It makes scripting and ad hoc tasks much easier and a lot more concise. Love it!
Thanks,
Jim
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 reproducing o oci_commands on an instance-principal host with OCI_CLI_AUTH=instance_principal, comparing it with the copied ~/.oci/ocids and ~/.oci/oci_commands workaround described in the issue. Trace the o command's generation path and verify that the completed output contains usable OCI commands rather than a header and blank lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, cli, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100