Skip to content

Commit

Permalink
support oapi-cli variables
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Mar 25, 2024
1 parent 01e8e67 commit 604df1a
Show file tree
Hide file tree
Showing 7 changed files with 6,208 additions and 984 deletions.
2 changes: 1 addition & 1 deletion COGNAC
Submodule COGNAC updated 5 files
+28 −3 cognac_gen.sh
+1 −1 function.c
+10 −14 lib.c
+11 −0 lib.h
+69 −6 main_tpl.c
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export OSC_ENDPOINT_API=XXX

```bash
brew tap outscale/tap
brew install outscale/tap/oapi-cli
brew install outscale/tap/oapi-cli
```
or if you want to clone the homebrew repo:

Expand All @@ -119,7 +119,7 @@ brew install Formula/oapi-cli.rb

oapi-cli is pre-packaged for Linux as a standalone AppImage.
Download oapi-cli-x86_64.AppImage from [nightly build](https://github.com/outscale/oapi-cli/releases/tag/nightly-linux).
Allow file to be executed by running
Allow file to be executed by running
`chmod a+x ./oapi-cli-x86_64.AppImage`

Run oapi-cli: `./oapi-cli-x86_64.AppImage`
Expand Down
7 changes: 7 additions & 0 deletions local-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,11 @@ trap "echo '[Test Read vms with user 0 (my) is not empty, with conf (separate ar
oapi-cli --config="./local-tests-cfg.json" --authentication_method password --profile my ReadVms --Filters.VmIds[] i-00000003 | jq .Vms | grep 'i-00000003' > /dev/null
echo "[Test Read vms with user 0 (my) is not empty, with conf (separate argument) Ok]"

trap "echo '[Test CreateVms with Tags using oapi-cli variable FAIL]'" ERR
OSC_ACCESS_KEY=11112211111110000000 OSC_SECRET_KEY=0000001111112222223333334444445555555666 oapi-cli ReadImages --Filters.ImageNames[] "Fill More is for Penguin General" --set-var 'img_id=Images.0.ImageId' \
CreateVms --ImageId --var img_id --set-var vm_id=Vms.0.VmId \
CreateTags --ResourceIds[] --var vm_id --Tags.0.Key k ..Value v \
ReadVms --Filters.VmIds[] --var vm_id | jq .Vms[0].Tags | grep '"v"' > /dev/null
echo "[Test CreateVms with Tags using oapi-cli variable OK]"

pkill ricochet
Loading

0 comments on commit 604df1a

Please sign in to comment.