Package: osc-sdk
Outscale CLIOfficial Outscale CLI providing connectors to Outscale API.Getting StartedInstalling on Macososc-cli is available onbrew.Installing on Linuxosc-cli is pre-packaged for Linux as a standaloneAppImage.Downloadosc-cli-x86_64.AppImagefrom latest version inreleases.Allow file to be executed by runningchmod a+x osc-cli-x86_64.AppImageRun osc-cli:./osc-cli-x86_64.AppImageOptionally, you can install it for all users:sudo mv osc-cli-x86_64.AppImage /usr/local/bin/osc-cliand just runosc-cli.you can also installosc-cli-giton Arch Linux using AUR: (yay -S osc-cli-git)Note:if you have this error (or one similar about fuse):fuse: failed to exec fusermount: No such file or directory

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage
if you run it with the --appimage-extract option.
See https://github.com/AppImage/AppImageKit/wiki/FUSE
for more information
open dir error: No such file or directoryYou can either install fuse yourself, or execute the appimage with--appimage-extract-and-runoptionExample:./osc-cli-x86_64.AppImage --appimage-extract-and-run osc-cli api ReadImages --profile=myusingappimage-extract-and-runextract the content of the AppImage in a temporary directory and execute it,
this operation is alotslower than using fuse, and the fuse solution should be use if posible.Installing on WindowsCheck dedicated documentationregarding windows installation.Installing from Python packagePrerequisitesYou will needPython 3.6+or later. Earlier versions including Python 2 are not supported.PipYou can get the package frompypi:pip3 install osc-sdkIf you are using Microsoft Windows, seehow to setup osc-cli on Windows.Installing from sourcesIt is a good practice to create adedicated virtualenvfirst. Even if it usually won't harm to install Python libraries directly on the system, better to contain dependencies in a virtual environment.python3-mvenv.venvsource.venv/bin/activateThen install osc-cli in your virtual env:pipinstall-e.Configure osc-cliThe CLI requires a configuration file in~/.osc/config.jsonThe content must be a JSON whose contents look like this:
/!\ the old configuration path using.osc_sdkfolder isdeprecated. Please use the new one with.osc.{"default":{"access_key":"MYACCESSKEY","secret_key":"MYSECRETKEY","region":"eu-west-2"},"us":{"access_key":"MYACCESSKEY","secret_key":"MYSECRETKEY","host":"outscale.com","https":true,"method":"POST","region":"us-east-2"}}You can add several profiles for different regions or users.Optional parameters can be applied to each profile :client_certificate: if you need additional security, your pem must include your private key and your certificateversion: if you want to query another version of the API{"default":{"access_key":"MYACCESSKEY","secret_key":"MYSECRETKEY","client_certificate":"path_to_your_pem","host":"outscale.com","https":true,"method":"POST","region":"eu-west-2","version":"2018-11-19"}}Get osc-cli version--versionoption will print osc-cli version and exit.osc-cli --versionActivate bash-completionActivate the completion for the current bash sessionsource <(osc-cli --bash_completion)Generate the file to add it in your bach rc:osc-cli --bash_completion > ~/.osc/cli-completion.bashthen in your bashrc add:source ~/.osc/cli-completion.bashUsageosc-cli SERVICE CALL [PROFILE] [CALL-PARAMETERS]orosc-cli --service SERVICE --call CALL [PROFILE] [--CALL_PARAMS ...]withSERVICE one of theservicesprovided by Outscale (fcu,lbu,icu,eim,directlink,okmsandapi)CALL the call you request (ie ReadVms, DescribeInstances...)PROFILE the profile you want to connect to (optional)CALL_PARAMS call arguments which are case-sensitive (optional)Here is an example of a simple volume creation:osc-clifcuCreateVolume--AvailabilityZoneeu-west-2a--Size10{"CreateVolumeResponse":{"@xmlns":"http://ec2.amazonaws.com/doc/2014-06-15/","requestId":"508f428a-9fd8-4a49-9fe6-d0bf311de3b4","volumeId":"vol-6a2aa442","size":"10","snapshotId":null,"availabilityZone":"eu-west-2a","status":"creating","createTime":"2019-01-17T12:53:57.836Z","volumeType":"standard"}}Be careful with your quotes ! If you want to pass the string"12345678"rather than the integer12345678you'll need to quote your quotes:$osc-cliicuCreateAccount--Email"example@email.com"\--FirstName"Osc"\--LastName"Cli"\--Password"12345toto"\--ZipCode'"92000"'\--Country"France"\--CustomerId'"12345678"'Another example with an array of strings into args:$osc-cliapiCreateDhcpOptions--DomainName="toot.toot"\--DomainNameServers="['1.1.1.1']"\--NtpServers="['1.1.1.1']"Example with a complex structure:osc-cliicuCreateListenerRule\--Instances'[{"InstanceId": "i-12345678"}]'\--ListenerDescription'{"LoadBalancerName": "osc", "LoadBalancerPort": 80}'--ListenerRuleDescription'{"RuleName": "hello", "Priority": 100, "PathPattern": "/"}'Argument Parsing$osc-cliapiexample--obj=[1,2]# list$osc-cliapiexample--obj=10# int$osc-cliapiexample--obj="10"# int$osc-cliapiexample--obj="'10'"# str$osc-cliapiexample--obj=\"10\"# str$osc-cliapiexample--obj="hello"# str$osc-cliapiexample--obj=hello# strWarningif you're adding a list which contain strings with specifics characteres, there is a workaround:$osc-cliapiexample--obj="['vol-12345678', 'vol-87654322']"# listAuthenticationYou API crendentials are composed of an Access Key and a Secret Key located in.osc_sdk/config.json.
You can list you access keys using your user and password:osc-cliicuListAccessKeys--authentication-method=password--loginyouremail@company.com--password=Y0URpAssOrdContributingOSC-CLI is anopen source softwarelicensed underBSD-3-Clause.Patches and discussions are welcome about bugs you've found or features you think are missing. If you would like to help makingosc-clibetter, take a look toCONTRIBUTING.mdfile.