Git Product home page Git Product logo

oci-cli's Introduction

Oracle Cloud Infrastructure CLI

About

This is the command line interface for Oracle Cloud Infrastructure.

The project is open source and maintained by Oracle Corp. The home page for the project is here.

Announcements

Interactive Features

OCI CLI offers interactive features to guide you through command usage.

Enabling them allows:
  • Suggestions and autocompletion to help compose commands;
  • Color-coded suggestions to distinguish required parameters from optional parameters; and
  • Quick references display alongside suggestions to recognize command and parameter purposes.

Try the interactive features anytime with the -i option: :

oci -i

Alternative text

Read more on OCI Documentation.

Container Image

OCI CLI is now available as container images.

With a standards-compliant container runtime engine, pull and run the latest version of oci-cli from the GitHub Container Registry.

Read about setup requirements and instructions on Working with the OCI CLI Container Image.

Find previous image versions on our package page.

Installation

Mac OS X

brew install oci-cli

OCI Command Line Interface Installation and Configuration on Mac Instance

Linux

bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"

OCI Command Line Interface Installation and Configuration on Linux Instance

Oracle Linux 7

sudo yum install python36-oci-cli

Fedora Linux

sudo dnf install oci-cli

Windows

powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1'))"

OCI Command Line Interface Installation and Configuration on Windows Instance

See the installation guide for detailed installation instructions, options and troubleshooting.

Offline Installation

  1. Go to the CLI releases page and locate the required CLI version.
  2. For the release, go to the "Assets" area.
  3. Download and copy the zip file for your Operating System to the environment where you want to install CLI.
  4. Unzip the file and execute the following from inside the unzipped folder

    On Linux: :

    bash install.sh --offline-install

    On Windows: :

    install.ps1 -OfflineInstall

OCI Command Line Interface (CLI) Installation on an Offline Linux Instance

OCI Command Line Interface (CLI) Installation on an Offline Windows Instance

Usage

To get help with the command line: :

oci --help

or

oci -h

To enable interactive features for usage guidance: :

oci -i

Examples

Examples can be found here under the section 'Example Commands'.

Documentation

Detailed documentation for CLI prerequisites, installation and configuration, and troubleshooting can be found here.

Help

See the “Questions or Feedback?” section here.

Changes

See CHANGELOG.

Contributing

oci-cli is an open source project. See CONTRIBUTING for details.

Oracle gratefully acknowledges the contributions to oci-cli that have been made by the community.

Known Issues

You can find information on any known issues with the CLI here, here and under the “Issues” tab of this project's GitHub repository.

License

Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.

This SDK and sample is dual licensed under the Universal Permissive License 1.0 and the Apache License 2.0.

See LICENSE for more details.

oci-cli's People

Contributors

anup-21 avatar dayongfu avatar dch avatar dshelbyo avatar europ avatar gibson042 avatar hamadagabribrahim avatar harshkumar-dev avatar jodoglevy avatar jotruon avatar jtpereyda avatar kalpanaramasamy90 avatar kanvipasricha avatar karthik-k-kamath avatar kernleee avatar khs28gu avatar kishan0201 avatar lealex262 avatar mandyht avatar mross22 avatar nivipari avatar nupurgupta3101 avatar pankajmjx avatar paul-hummel-oracle avatar srikanthkumbham avatar swarn10 avatar thehhugg avatar viralmodi avatar vish1 avatar zhongwaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oci-cli's Issues

install.ps1 fails - Directory test not sufficient if key exists but is empty.

Directory test not sufficient if key is empty.

Certain programs like Anaconda or other Python installs that might have installed into the HKLM, if removed, my leave that path blank. Likewise, with HKCU. If either of these directory checks returns TRUE, but returns zero child objects, the script fails with

You cannot call a method on a null-valued expression.
At C:\Users\admin72014\Projects\oci\oci-cli\scripts\install\install.ps1:108 char:44

  •         If ($installation.Name.EndsWith <<<< ("\InstallPath")) {
    
    • CategoryInfo : InvalidOperation: (EndsWith:String) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

image

Commenting out the empty key allows installation to proceed.

Issue with downloading

Dear team,

I am downloading cli using powershell.

I keep getting this error

[]( error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

----------------------------------------

Rolling back uninstall of cryptography
Command "c:\users\adrlee\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\adrlee\AppData\Local\Temp\pip-install-x_mrrxsh\cryptography\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\adrlee\AppData\Local\Temp\pip-record-2mobamcf\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\adrlee\AppData\Local\Temp\pip-install-x_mrrxsh\cryptography
)
I already installed the C++ 2015 redistribute. Whats wrong

error after installing in non default dirs

After installing in non default dirs - On my mac I used /usr/local/lib/oracle-cli and /usr/local/bin - I got the following error when running oci command:

Traceback (most recent call last):
File "/usr/local/bin/oci", line 7, in
from oci_cli.cli import cli
ModuleNotFoundError: No module named 'oci_cli'

solved installing oci_cli manually

pip3 install oci_cli

"oci ce cluster create --generate-param-json-input options" does not work

The man pages indicate that this option is supported:

The --generate-param-json-input option can be used to generate an exam-
ple of the JSON which must be provided. We recommend storing this exam-
ple in a file, modifying it as needed and then passing it back in via
the file:// syntax.

When attempting to run the command the output is:

oci ce cluster create --generate-param-json-input options
Option options is not a recognized complex type, so no example JSON can be produced. Invoke help for this command (--help/-h/-?) to see available documentation on this option

Unable to install on my Mac due to SSL: CERTIFICATE_VERIFY_FAILED

Here's the exception ...

-- Downloading virtualenv package from https://github.com/pypa/virtualenv/archive/15.0.0.tar.gz.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1400, in connect
server_hostname=server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 814, in init
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1068, in do_handshake
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/var/folders/2k/ssrhhylx4xd2pdwvhb9vwh2h0000gn/T/oci_cli_install_tmp_XXXX.1ZYU5Y4T", line 133, in create_virtualenv
response = urlopen(VIRTUALENV_DOWNLOAD_URL)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1361, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)>
ERROR: Failed to download virtualenv package. Please check that your trusted certificates are up to date and include the certificates necessary to verify github.com

Infinite loop when running install.sh with option --accept-all-defaults

When running install.sh with option --accept-all-defaults on a system which as a previous installation of the oci cli in the default location, the installer enters an infinite loop in function get_install_dir. The issue appears to be on line 182 which reads:

  ans_yes = prompt_y_n('Remove this directory', 'n')

and should probably read:

  ans_yes = True if ACCEPT_ALL_DEFAULTS else prompt_y_n('Remove this directory', 'n')

without this change, the variable install_dir is reset to None and the encompassing while loop repeats.

CLI Image Export Fails

Issue

The bmcs compute image export takes in a --destination-type switch which says where to place the exported image; the value passed in as a parameter is a JSON string and can identify either an Object Storage URI or a Object Storage tuple of (namespace, bucket name, object name)

Currently this CLI command fails to export an image using either the URI or tuple, even though the JSON string is formatted properly as per the CLI help documentation, and an Invalid Parameter error is passed back.

Repro Steps

Example command (with dummy Image ID and Destination URI):

bmcs compute image export --image-id "ocid1.image.oc1.phx....." \
--destination-type ' { "destinationUri": "https://objectstorage.us-phoenix-1.oraclecloud.com/....", "destinationType": "objectStorageUri" }'

Oracle vcn dns entries

I can't find a method via the cli to query to the VCN resolver DNs data for ocids that begin
ocid1.vcndnsrecord...

Is there a new method coming out to handle this
I assume it will mean being able to access dbaas vnic and VCN private Ip records

Regards
Ernie

Issue: Lines 76 and 77 fail for $PythonExecutable value containing non-alphanumeric characters like ), ( etc..

Issue: Lines 76 and 77 fail for $PythonExecutable value containing non-alphanumeric characters like ), ( etc..

Solution that worked for me:

Lines 76 and 77 to be changed to :

  $EscapedExecutable = $PythonExecutable 
  $PythonVersion = Invoke-Expression "& `"$EscapedExecutable`" -c 'import platform;print(platform.python_version())'"

Explanation:
Instead of trying to escape just spaces (like the current logic), make powershell to call/invoke (using & ) a not-escaped value as is by enclosing it in between .

I forked the install.ps1 with my fix included for your review-and-merge-easiness.

Default --compartment-id to tenant id

Since a tenant OCID is a valid --compartment-id value, it would be great if I didn't have to specify it again (it already lives in my config file) for cases when I'm using the root compartment.

Even if the desire is to encourage users to compartmentalize, a shortcut like --compartment-id=ROOT could save copy-pasting, rekeying errors, etc while still encouraging the use of the --compartment-id flag.

Not able to access buckets/objects from OCI CLI

I have properly seted up OCI at my instance and trying to access buckets/objects from command line but getting NotAuthenticatederror:

#oci os object list -ns *******-bn ************
ServiceError:
{
"code": "NotAuthenticated",
"message": "The required information to complete authentication was not provided.",
"opc-request-id": "651A4773BFD745919585A7FC2E4CBC00",
"status": 401
}

Support for nested profiles

Sort of continuation to #47.

My understanding is that right now optional default values go into .oci/oci_cli_rc while high-level profile settings (user, tenancy, fingerprint, key_file, region) go into .oci/config.

While it would be easier if all settings lived under one roof, with the current layout of two separate config files, would there be an easy way to support nested profiles?

For example, let's say that I have a tenancy T with 2 compartments A and B. Right now, I need to create 2 identical profiles in .oci/config for the auth settings, and then 2 profiles in .oci/oci_cli_rc with the corresponding compartment-id.

Ideally, I would want to have the auth settings defined within [T] in .oci/config, which also defines two child profiles [A] and [B] (let's say with a new import keyword referencing the T profile). Alternatively, instead of nested profiles it would be nice if multiple profiles could be created with the same settings in .oci/config (e.g. [A] [B])

Would any of these approaches be possible to implement?

Use full path when writing `key_file` in `setup config`

I wanted my config and key files to live in the directory where I created my virtualenv, instead of in ~/.oci (so that I could experiment in a directory instead of writing more global state). When asked for my key directory I typed . for the current directory. Now when I run oci form a different directory I get configuration failures and my commands don't work, eg: IOError: [Errno 2] No such file or directory: './iad_key.pem'

It would be great for the setup process to always expand the full path of the key file when it writes the config setting.

OCI CLI does not pull correct db versions

When running the CLI to pull DB versions, it does not pull the same list as is provided on the console.

oci db version list --output table --all --compartment-id --region

The Console allows Version 18, yet the CLI does not extract this

--generate-full-command-json-input command doesn't include all required fields

the json generated here:
xxx-mac~/Documents % oci db system launch --generate-full-command-json-input
{
"adminPassword": "string",
"availabilityDomain": "string",
"backupSubnetId": "string",
"characterSet": "string",
"clusterName": "string",
"compartmentId": "string",
"cpuCoreCount": 0,
"dataStoragePercentage": 0,
"databaseEdition": "STANDARD_EDITION|ENTERPRISE_EDITION|ENTERPRISE_EDITION_EXTREME_PERFORMANCE|ENTERPRISE_EDITION_HIGH_PERFORMANCE",
"dbName": "string",
"dbVersion": "string",
"dbWorkload": "string",
"diskRedundancy": "HIGH|NORMAL",
"displayName": "string",
"domain": "string",
"hostname": "string",
"initialDataStorageSizeInGb": 0,
"licenseModel": "LICENSE_INCLUDED|BRING_YOUR_OWN_LICENSE",
"maxWaitSeconds": 0,
"ncharacterSet": "string",
"nodeCount": 0,
"pdbName": "string",
"shape": "string",
"subnetId": "string",
"waitForState": "PROVISIONING|AVAILABLE|UPDATING|TERMINATING|TERMINATED|FAILED",
"waitIntervalSeconds": 0
}

from the service api, the sshpublickeys is required, but not generated
https://docs.us-phoenix-1.oraclecloud.com/api/#/en/database/20160918/DbSystem/LaunchDbSystem

one more question:
I saw there is a parameter '--ssh-authorized-keys-file' which is different than the service spec, is it expected?

Changelog warning in pip install.

(venv)[vagrant@ol7 ~]$ pip install oci-cli
Downloading/unpacking oci-cli
  Downloading oci-cli-2.4.11.tar.gz (169kB): 169kB downloaded
  Running setup.py egg_info for package oci-cli

    warning: no files found matching 'CHANGELOG.md'

I see that MANIFEST.in has CHANGELOG.md instead of CHANGELOG.rst, which may be the root cause?

Add SMTP credential management for use wtih Email Delivery Service

Right now Email Delivery service 'sender' and 'suppression' operations are available in the CLI (under oci email) but SMTP credential operations are not. The workaround is currently to use either the console or one of the SDKs to manage SMTP credentials. We plan to add this in our next CLI release.

Add md5-checking mode or retry to `oci os object bulk-upload`

My usage of the oci os object bulk-upload here at the oracle data cloud involves uploading 1.3TB of files each day. If for some reason there are errors when doing that, it would be nice to have a new mode in addition to --no-overwrite and --overwrite that checked file md5sums before uploading, and only overwrites if the sums don't match.

I know md5sums are stored on upload, so it seems like a feature that would be fairly easily supported.

I am aware that the json returned by the command returns the failed uploads. It would certainly be possible to parse that json and just overwrite those files with some more more external commands. Another option could be having the bulk-upload function add a retry functionality (during uploading, or accepting the json output from the "upload-failures": { in the json.)

Thanks for your consideration.

list compartments?

When trying to list compartments, I get an error that compartment needs to be specified. Am I using this incorrectly? Thanks

λ oci --version
2.4.13
λ oci iam compartment list
Usage: oci iam compartment list [OPTIONS]

Error: Missing option(s) --compartment-id.

Compartment id is required to list compartments

TLDR; oci iam compartment list requires compartment id - this is very confusing.

Env:

$ oci -v
2.4.17
$ python --version
Python 2.7.14

Description:

Compartment id is required to list compartments:

$ oci iam compartment list
Usage: oci iam compartment list [OPTIONS]

Error: Missing option(s) --compartment-id.

While the option is documented to be actually tenant OCID, it is very confusing and inconsistent with the rest of the cli:

$ oci iam compartment --help
...
    --compartment-id, -c [text]
        The OCID of the tenancy containing the compartment. [required]
...

# Inconsistent with:
$ oci network vcn --help
...
    --compartment-id, -c [text]
        The OCID of the compartment to contain the VCN. [required]
...

$ oci compute instance --help
...
   --compartment-id, -c [text]
       The OCID of the instance's compartment. [required]
... 

$ oci os bucket --help
...
    --compartment-id, -c [text]
        The ID of the compartment in which to create the bucket. [required]
...

If I understand it correctly, compartments can be nested so it actually makes sense to have this option. Perhaps default value with tenancy OCID specified in config file could fix this.

Expected result:
List of compartments in tenancy is shown

Error For patching a DB System from 18.2.0.0 to 18.3

PS C:\Travail\Travail2019\Demos\InfraAsCode\DbSystem> oci --version
2.4.31

$dbsystemid=oci db system list
--compartment-id="ocid1.compartment.oc1..aaaaaaaach4c3i5kpecjfjqwp3wfjfmbbjniyzieaxhcjs6c73ya2wl6vaxq"
| jq .data[].id
echo

$dbid=oci db database list --db-system-id=$dbsystemid --compartment-id=ocid1.compartment.oc1..aaaaaaaach4c3i5kpecjfjqwp3wfjfmbbjniyzieaxhcjs6c73ya2wl6vaxq
| jq .data[].id
echo $dbid

$dbpatchid=oci db patch list by-db-system --all --db-system-id=$dbsystemid | jq .data[].id

oci db database patch --database-id=$dbid --patch-action="APPLY"
--patch-id=$dbpatchid

{
"data": {
"character-set": "AL32UTF8",
"compartment-id":
"ocid1.compartment.oc1..aaaaaaaach4c3i5kpecjfjqwp3wfjfmbbjniyzieaxhcjs6c73ya2wl6vaxq",
"db-backup-config": {
"auto-backup-enabled": true
},
"db-home-id":
"ocid1.dbhome.oc1.iad.abuwcljtdqhkr3jtm2i2a4mdtmu5fufkunartbsh5b64udsvq5w4awchxqmq",
"db-name": "aTFdb",
"db-unique-name": "aTFdb_iad27g",
"db-workload": "OLTP",
"defined-tags": {},
"freeform-tags": {},
"id":
"ocid1.database.oc1.iad.abuwcljtmhudxalrltdihk7ct57mqhg2v2adrxuco2clbr5kxymbeyidiioq",
"lifecycle-details": null,
"lifecycle-state": "UPDATING",
"ncharacter-set": "AL16UTF16",
"pdb-name": "MyPDB",
"time-created": "2018-09-24T13:32:48.311000+00:00"
}
}

oci db patch get by-database --database-id=$dbid --patch-id=$dbpatchid

{
"data": {
"available-actions": [
"APPLY",
"PRECHECK"
],
"description": "Jul 2018 18c Db System patch",
"id":
"ocid1.dbpatch.oc1.iad.abuwcljt6lyj6x6ggz3gasxdxtzqqcpla5pllymxwm5k4bifbvzrpkifzy3a",
"last-action": "APPLY",
"lifecycle-details": "Error running backup. See https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Troubleshooting/Backup/backupfail.htm
for information on how to determine and fix the problem.",
"lifecycle-state": "FAILED",
"time-released": "2018-07-30T01:00:00+00:00",
"version": "18.3.0.0.180717"
}
}

So it failed with a problem of backup...

After If I run : oci db backup create --database-id=$dbid --display-name="backup before patch 18.3" --wait-for-state="ACTIVE" then I got a good backup so I do not understand

Can't "bmcs os object put" from stdin

bmcs os object put -? says:

  --file FILENAME                 The file to load as the content of the
                                  object, or '-' to read from STDIN.

But on Fedora 26:

$ bmcs os object put -ns $ns -bn $bucket --name test --file - <<<data
FileNotFoundError: [Errno 2] No such file or directory: '<stdin>'

Specify the --profile value via environment variable

It would be nice if the profile (--profile) could be specified via environment variable

5a6
> from os import environ as os_environ
26a28,30
> DEFAULT_PROFILE = "DEFAULT"
> if "OCI_PROFILE" in os_environ: DEFAULT_PROFILE = os_environ["OCI_PROFILE"]
> 
44c48
<               default='DEFAULT', show_default=True,
---
>               default=DEFAULT_PROFILE, show_default=True,

by making this simple change to oci_cli/cli_root.py simply setting OCI_PROFILE will make that happen

can not get a string value using --raw-output

hi, experts

can not get a string value using --raw-output

expected result is ...

$ oci network vcn list --query 'data[?"display-name"==`'${VCN_NAME}'`].id' --raw-output
ocid1.vcn.oc1.iad.aaaaaaaa....

but, actual result is ...

$ oci network vcn list --query 'data[?"display-name"==`'${VCN_NAME}'`].id' --raw-output
[
  "ocid1.vcn.oc1.iad.aaaaaaaa...."
]
$ oci network vcn list --query 'data[?"display-name"==`'${VCN_NAME}'`].id' --raw-output --output=table
+--------------------------------------------------------------------------------+
| Column1                                                                        |
+--------------------------------------------------------------------------------+
| ocid1.vcn.oc1.iad.aaaaaaa... |
+--------------------------------------------------------------------------------+
$ oci --version
2.4.29

thanks!

Show fingerprints after creating key with `oci setup config`

Since the web console uses the fingerprint to identify keypairs, it would be nice to have it echoed after a key is created, with the instructions on uploading a key.

I know it is in the config file, but if the CLI is coaching users on how to upload a keypair, it should also give them the validation information.

Error installing Python during CLI install

Hi,
I'm running Windows 7 64-bit and am getting the following error in my attempt to install CLI. (Using the same command syntax on Windows Server 2016 Standard 64-bit installs ok.) Please advise.

Thanks,
Thuymy

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:\windows\system32> Set-ExecutionPolicy RemoteSigned

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic. Do you want to change the execution
policy?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):
PS C:\windows\system32> powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).D
ownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1'))"

Python is required to run the CLI.
Install Python now? (Entering "n" will exit the installation script)
[Y] Yes [N] No [?] Help (default is "Y"):
Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: An unexpected error occur
red on a send."
At line:133 char:55

  •     (New-Object System.Net.WebClient).DownloadFile <<<< ($Uri, $OutFile)
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : DotNetMethodException

Error on query with an attribute avuth a "-" in the name

oci db system list --compartment-id="ocid1.compartment.oc1..aaaaaaaach4c3i5kpecjfjqwp3wfjfmbbjniyzieaxhcjs6c73ya2wl6vaxq" --query "data [?"display-name"=='MyTFDatabaseNode'].{Id:id}"

LexerError: Bad jmespath expression: Unclosed " delimiter:
data [?" display-name=='MyTFDatabaseNode'].{Id:id}

Ty for all

PS : Another question
PS C:\Travail\Travail2019\Demos\InfraAsCode\DbSystem> oci db system list --compartment-id="ocid1.compartment.oc1..aaaaaaaa
ch4c3i5kpecjfjqwp3wfjfmbbjniyzieaxhcjs6c73ya2wl6vaxq" --query "data [*].{Id:id}"
[
{
"Id": "ocid1.dbsystem.oc1.iad.abuwcljtxci4exlyiplphv5tl2457smpkrjqxsc6dmb3eygb4tsb4immn64q"
}
]
Does I need jq to get Id in a variable ? or is there a more simple solution ?

Unable to attach / detach volume

It seems that availability-domain value is not passed correctly:

ServiceError:
{
"code": "InvalidParameter",
"message": "Invalid AD: phx-ad-1",
"opc-request-id": "614F756F61E84494BF3732D205FCBEE2/AF47688F2E89823025FB4D6648BEE11B/67B1E71EB5E7C06E09FDE2A318EC62AF",
"status": 400
}

Get "RequestException: HTTPSConnectionPool" when call "oci os"

[oracle@infbjvm118 env]$ oci os ns get --config-file ./config --cli-rc-file ./oci-cli-file
RequestException: HTTPSConnectionPool(host='objectstorage.us-phoenix-1.oraclecloud.com', port=443): Max retries exceeded with url: /n/ (Caused by NewConnectionError('<oci._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f66678e8790>: Failed to establish a new connection: [Errno 113] No route to host',))

[oracle@infbjvm118 env]$ oci os bucket create --config-file ./config --cli-rc-file ./oci-cli-file --name adw-demo-oardc2 --namespace-name oraclekennguyen
RequestException: HTTPSConnectionPool(host='objectstorage.us-phoenix-1.oraclecloud.com', port=443): Max retries exceeded with url: /n/oraclekennguyen/b/ (Caused by NewConnectionError('<oci._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f90f2093bd0>: Failed to establish a new connection: [Errno 113] No route to host',))

Support for compartment id in profile

It'd be really nice if we could configure the compartment id in the config as part of the profile since OCIDs aren't something that you can easily just type out on demand. It'll greatly increase the usability of the client.

Package fails to install on Fedora 26

On Fedora 26, running pip install oraclebmc-cli in a fresh virtualenv produces a build failure in the cryptography package. bmcs-cli's setup.py depends on cryptography==1.8.1, but cryptography < 1.8.2 will not build with OpenSSL ≥ 1.1.0f (pyca/cryptography#3603). If I install oraclebmc-cli from a Git checkout that has the version pins removed from setup.py, the package installs and works properly.

Please consider dropping the version pins from setup.py, and instead specifying only the minimum required versions of dependencies. Pinning is not considered best practice and tends to produce problems like this one.

Malformed ssh_authorized_keys on instances created using `oci compute-management` operations

There is a known issue affecting the newly released oci compute-management instance-configuration create and oci compute-management instance-configuration launch-compute-instance commands in version 2.4.35 of the CLI.

These commands are improperly serializing the ssh_authorized_keys property inside instance metadata, which results in the inability to SSH into the created instances.

Note that this only affects the new compute-management operations, and launching instances through other commands will continue to work as expected.

bmcs compute image export returns "Unable to process JSON input"

Hi Below is the command used and the return response.
bmcs compute image export --image-id "ocid1.image.oc1.xxxxxx" --destination-type '{"objectName": "xxxxx","bucketName": "xxxxx", "namespaceName": "xxxxxx", "destinationType": "objectStorageTuple"}'

ServiceError:
{
"code": "InvalidParameter",
"message": "Unable to process JSON input",
"opc-request-id": "xxxxxxxxxxxxxxx",
"status": 400
}
Let me know if I am missing anything here. Thanks in advance.

bmcs compute shape lists duplicates

Here is the listing command I used:

bmcs compute shape list --compartment-id=ocid1.compartment.oc1..zzzzzzz

Let me know if I'm to attach the resulting listing.

Thanks

"display-name" filter does not work in "oci db autonomous-data-warehouse list"

I used "display-name" filter in "oci db autonomous-data-warehouse list", but it does not work, still show all instances in my account. Like the following:

[oracle@infbjvm118 ~]$ oci db autonomous-data-warehouse list --config-file ./config --cli-rc-file ./oci-cli-file --display-name adw20180820
{
"data": [
{
"compartment-id": "ocid1.compartment.oc1..aaaaaaaaztqsn6rp56wtb7nyhfxhg66gymlahcia3gxwjft3dqaqbxiv3j4q",
"connection-strings": {
"high": "adwc.uscom-west-1.oraclecloud.com:1522/nwupzjyn5vqrvyp_adwdemo1_high.adwc.oraclecloud.com",
"low": "adwc.uscom-west-1.oraclecloud.com:1522/nwupzjyn5vqrvyp_adwdemo1_low.adwc.oraclecloud.com",
"medium": "adwc.uscom-west-1.oraclecloud.com:1522/nwupzjyn5vqrvyp_adwdemo1_medium.adwc.oraclecloud.com"
},
"cpu-core-count": 4,
"data-storage-size-in-tbs": 8,
"db-name": "adwDemo1",
"defined-tags": {},
"display-name": "adw-oardc-demo",
"freeform-tags": {},
"id": "ocid1.autonomousdwdatabase.oc1.phx.abyhqljtejufd6km24jad6nfu72qwskr7hgl2urcrrc4fpiqlywel733gdka",
"license-model": "LICENSE_INCLUDED",
"lifecycle-details": null,
"lifecycle-state": "AVAILABLE",
"service-console-url": "https://adwc.uscom-west-1.oraclecloud.com/console/index.html?tenant_name=OCID1.TENANCY.OC1..AAAAAAAA6KXBN3RZ7CV3L5RBF5NVKPTU2K7LY3WWGQSMFOWONKBGYP26267Q&database_name=ADWDEMO1&service_type=ADW",
"time-created": "2018-08-24T07:47:33.484000+00:00"
},
{
"compartment-id": "ocid1.compartment.oc1..aaaaaaaaztqsn6rp56wtb7nyhfxhg66gymlahcia3gxwjft3dqaqbxiv3j4q",
"connection-strings": {
"high": "adwc.uscom-west-1.oraclecloud.com:1522/nwupzjyn5vqrvyp_adw0820_high.adwc.oraclecloud.com",
"low": "adwc.uscom-west-1.oraclecloud.com:1522/nwupzjyn5vqrvyp_adw0820_low.adwc.oraclecloud.com",
"medium": "adwc.uscom-west-1.oraclecloud.com:1522/nwupzjyn5vqrvyp_adw0820_medium.adwc.oraclecloud.com"
},
"cpu-core-count": 4,
"data-storage-size-in-tbs": 8,
"db-name": "adw0820",
"defined-tags": {},
"display-name": "adw20180820",
"freeform-tags": {},
"id": "ocid1.autonomousdwdatabase.oc1.phx.abyhqljthqcamtju3ydvdtf4mboxuxynadg4rpflso7solxmnnojf4otx4ka",
"license-model": "LICENSE_INCLUDED",
"lifecycle-details": null,
"lifecycle-state": "AVAILABLE",
"service-console-url": "https://adwc.uscom-west-1.oraclecloud.com/console/index.html?tenant_name=OCID1.TENANCY.OC1..AAAAAAAA6KXBN3RZ7CV3L5RBF5NVKPTU2K7LY3WWGQSMFOWONKBGYP26267Q&database_name=ADW0820&service_type=ADW",
"time-created": "2018-08-21T06:20:47.838000+00:00"
}
]
}

Is there a CLI De-Install Method?

I have a failed install. I would like to start over and capture all that may have gone wrong.
Per subject, is there a defined deinstall method?

I am on linux.

pip install oraclebmc-cli fails on clean install

Summary: upon executing pip install oracle-bmcs-cli/oraclebmc_cli-2.4.5-py2.py3-none-any.whl or pip install oraclebmc-cli (with or without sudo), error returned:

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-iBfi6V/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-LBnltB-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-iBfi6V/cryptography/

Environment: Oracle BMCS: BM.Standard1.36
Image: Oracle-Linux-7.3-2017.07.17-0
Docs used: https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/cli.htm

Session dialog:

[opc@ml1 ~]$ uname -a
Linux ml1 4.1.12-94.3.8.el7uek.x86_64 #2 SMP Fri Jun 30 10:40:13 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux

[opc@ml1 ~]$ sudo yum install libffi-devel python-devel openssl-devel
Loaded plugins: langpacks, ulninfo
Package libffi-devel-3.0.13-18.el7.x86_64 already installed and latest version
Package python-devel-2.7.5-58.0.1.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-8.0.1.el7.x86_64 already installed and latest version
Nothing to do

[opc@ml1 ~]$ sudo easy_install pip
Searching for pip
Best match: pip 9.0.1
Processing pip-9.0.1-py2.7.egg
pip 9.0.1 is already the active version in easy-install.pth
Installing pip script to /usr/bin
Installing pip2.7 script to /usr/bin
Installing pip2 script to /usr/bin
Using /usr/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

[opc@ml1 ~]$ pip install virtualenv
Requirement already satisfied: virtualenv in /usr/lib/python2.7/site-packages

[opc@ml1 ~]$ sudo pip install oracle-bmcs-cli/oraclebmc_cli-2.4.5-py2.py3-none-any.whl
Processing ./oracle-bmcs-cli/oraclebmc_cli-2.4.5-py2.py3-none-any.whl
Requirement already satisfied: pytz==2016.7 in /usr/lib/python2.7/site-packages (from oraclebmc-cli==2.4.5)
Collecting oraclebmc==1.3.5 (from oraclebmc-cli==2.4.5)
Downloading oraclebmc-1.3.5-py2.py3-none-any.whl (287kB)
100% |████████████████████████████████| 296kB 3.8MB/s
Collecting click==6.7 (from oraclebmc-cli==2.4.5)
Using cached click-6.7-py2.py3-none-any.whl
Collecting certifi (from oraclebmc-cli==2.4.5)
Using cached certifi-2017.7.27.1-py2.py3-none-any.whl
Requirement already satisfied: six==1.10.0 in /usr/lib/python2.7/site-packages (from oraclebmc-cli==2.4.5)
Collecting cryptography==1.8.1 (from oraclebmc-cli==2.4.5)
Downloading cryptography-1.8.1.tar.gz (423kB)
100% |████████████████████████████████| 430kB 2.7MB/s
Collecting terminaltables==3.1.0 (from oraclebmc-cli==2.4.5)
Using cached terminaltables-3.1.0.tar.gz
Collecting python-dateutil==2.5.3 (from oraclebmc-cli==2.4.5)
Using cached python_dateutil-2.5.3-py2.py3-none-any.whl
Collecting httpsig-cffi==15.0.0 (from oraclebmc-cli==2.4.5)
Using cached httpsig_cffi-15.0.0-py2.py3-none-any.whl
Collecting requests[security]==2.11.1 (from oraclebmc-cli==2.4.5)
Using cached requests-2.11.1-py2.py3-none-any.whl
Collecting configparser==3.5.0 (from oraclebmc-cli==2.4.5)
Using cached configparser-3.5.0.tar.gz
Requirement already satisfied: idna>=2.1 in /usr/lib/python2.7/site-packages (from cryptography==1.8.1->oraclebmc-cli==2.4.5)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/lib/python2.7/site-packages (from cryptography==1.8.1->oraclebmc-cli==2.4.5)
Requirement already satisfied: packaging in /usr/lib/python2.7/site-packages (from cryptography==1.8.1->oraclebmc-cli==2.4.5)
Requirement already satisfied: setuptools>=11.3 in /usr/lib/python2.7/site-packages (from cryptography==1.8.1->oraclebmc-cli==2.4.5)
Requirement already satisfied: enum34 in /usr/lib/python2.7/site-packages (from cryptography==1.8.1->oraclebmc-cli==2.4.5)
Requirement already satisfied: ipaddress in /usr/lib/python2.7/site-packages (from cryptography==1.8.1->oraclebmc-cli==2.4.5)
Requirement already satisfied: cffi>=1.4.1 in /usr/lib64/python2.7/site-packages (from cryptography==1.8.1->oraclebmc-cli==2.4.5)
Requirement already satisfied: pyOpenSSL>=0.13; extra == "security" in /usr/lib64/python2.7/site-packages (from requests[security]==2.11.1->oraclebmc-cli==2.4.5)
Collecting ndg-httpsclient; extra == "security" (from requests[security]==2.11.1->oraclebmc-cli==2.4.5)
Using cached ndg_httpsclient-0.4.2.tar.gz
Collecting pyasn1; extra == "security" (from requests[security]==2.11.1->oraclebmc-cli==2.4.5)
Using cached pyasn1-0.3.2-py2.py3-none-any.whl
Requirement already satisfied: pyparsing in /usr/lib/python2.7/site-packages (from packaging->cryptography==1.8.1->oraclebmc-cli==2.4.5)
Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography==1.8.1->oraclebmc-cli==2.4.5)
Installing collected packages: certifi, ndg-httpsclient, pyasn1, requests, cryptography, python-dateutil, httpsig-cffi, configparser, oraclebmc, click, terminaltables, oraclebmc-cli
Running setup.py install for ndg-httpsclient ... done
Found existing installation: requests 2.6.0
DEPRECATION: Uninstalling a distutils installed project (requests) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling requests-2.6.0:
Successfully uninstalled requests-2.6.0
Running setup.py install for cryptography ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-iBfi6V/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-LBnltB-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/about.py -> build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/init.py -> build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/fernet.py -> build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/utils.py -> build/lib.linux-x86_64-2.7/cryptography
creating build/lib.linux-x86_64-2.7/cryptography/hazmat
copying src/cryptography/hazmat/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat
creating build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/init.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/base.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/extensions.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/general_name.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/name.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/oid.py -> build/lib.linux-x86_64-2.7/cryptography/x509
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/multibackend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings
copying src/cryptography/hazmat/bindings/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/serialization.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
copying src/cryptography/hazmat/backends/commoncrypto/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
copying src/cryptography/hazmat/backends/commoncrypto/backend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
copying src/cryptography/hazmat/backends/commoncrypto/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
copying src/cryptography/hazmat/backends/commoncrypto/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
copying src/cryptography/hazmat/backends/commoncrypto/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto
copying src/cryptography/hazmat/bindings/commoncrypto/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto
copying src/cryptography/hazmat/bindings/commoncrypto/binding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/interfaces
copying src/cryptography/hazmat/primitives/interfaces/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/interfaces
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/init.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
running egg_info
writing requirements to src/cryptography.egg-info/requires.txt
writing src/cryptography.egg-info/PKG-INFO
writing top-level names to src/cryptography.egg-info/top_level.txt
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing entry points to src/cryptography.egg-info/entry_points.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c'
creating build/temp.linux-x86_64-2.7
generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'
generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
building '_openssl' extension
creating build/temp.linux-x86_64-2.7/build
creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-iBfi6V/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-LBnltB-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-iBfi6V/cryptography/

Notes:

  1. Docs do not state to use sudo, get many permission violations without.
  2. Same result when using pip install oraclebmc-cli instead of github zip download.
  3. Tried with and without performing sudo yum update with no change, although running the yum update breaks connecting via iscsi to block devices.

Have -h flag show help

On Unix -h is the conventional short option for help. -? doesn't feel natural and I keep forgetting to type it instead of -h.

Suggestion: Allow compartment name in addition to compartment-id

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

Lacking "friendly" error message for oci compute launch

$ oci compute instance launch

Traceback (most recent call last):
File "/usr/local/bin/oci", line 11, in
sys.exit(cli())
File "/Library/Python/2.7/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/Library/Python/2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Python/2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Library/Python/2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Library/Python/2.7/site-packages/oci_cli/json_skeleton_utils.py", line 58, in wrapped_call
func(ctx, *args, **kwargs)
File "/Library/Python/2.7/site-packages/oci_cli/core_cli_extended.py", line 445, in launch_instance_extended
kwargs['availability_domain'] = cli_util.coalesce_provided_and_default_value(ctx, 'availability-domain', kwargs.get('availability_domain'), True)
File "/Library/Python/2.7/site-packages/oci_cli/cli_util.py", line 767, in coalesce_provided_and_default_value
raise cli_exceptions.RequiredValueNotInDefaultOrUserInputError('Missing option "--{}".'.format(param_name))
oci_cli.cli_exceptions.RequiredValueNotInDefaultOrUserInputError: Missing option "--availability-domain".

SSL certificate issue while creating kubeconfig

I have successfully installed, configured the oci-cli. I have tried fetching information like region list, etc from server to make sure i am able to connect with server, and end to end communication is successful. Now i tried to download the kubeconfig from already created OKE cluster using below command, and it's throwing SSL certificate errors.

BTW i am on mac

Command : oci ce cluster create-kubeconfig --cluster-id ocid1.cluster.oc1.xxxxxx(removed for securoty reasons) --file ~/.kube --config-file ~/oci/config -d

Error : raise MaxRetryError(_pool, url, error or ResponseError(cause))
oci._vendor.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='containerengine.us-phoenix-1.oraclecloud.com', port=443): Max retries exceeded with url: /20180222/clusters/ocid1.cluster.oc1.phx.aaaaaaaaaezdimjsge3wcmlbmm3dsnbygeywczjqmjqtcnzqgczdenrvmi4d/kubeconfig/content (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')])")))

Object put from STDIN fails when piping input

This doesn't work:

elvis-mac:ansible ejakupov$ echo "tst" | oci os object put --namespace my-namespace -bn backup --name backup/logging/test.tgz --file -
IOError: [Errno 29] Illegal seek

whereas this works
elvis-mac:ansible ejakupov$ oci os object put --namespace my-namespace -bn backup --name backup/logging/test.tgz --file - <<< "tst"
{
"etag": "5A487BF2EC84B94DE053C254C00A5918",
"last-modified": "Thu, 28 Sep 2017 22:46:05 GMT",
"opc-content-md5": "dGou+QLPdZbQyfZq3VUk1Q=="
}

I would expect both commands to work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.