Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion cmd/iaas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,5 +401,11 @@ func TestReadConsumptionAggregate(t *testing.T) {
}

func TestFilterNullValues(t *testing.T) {
run(t, []string{"iaas", "image", "ls", "--filter", "AccountAlias:Outscale"}, nil)
_ = run(t, []string{"iaas", "image", "ls", "--filter", "AccountAlias:Outscale"}, nil)
}

func TestDryRun(t *testing.T) {
var req osc.ReadVmsRequest
runJSON(t, []string{"iaas", "vm", "ls", "--subregion", "foo", "--dry-run", "-o", "json"}, nil, &req)
assert.Equal(t, osc.ReadVmsRequest{Filters: &osc.FiltersVm{SubregionNames: &[]string{"foo"}}}, req)
}
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func init() {
rootCmd.PersistentFlags().String("payload", "", "JSON content for query body")
rootCmd.PersistentFlags().String("root", "", "the root attribute for the template or payload")
_ = rootCmd.PersistentFlags().MarkHidden("root")
rootCmd.PersistentFlags().Bool("dry-run", false, "Display the request payload that would be sent to the API without sending it")

rootCmd.PersistentFlags().String("jq", "", "jq filter")
rootCmd.PersistentFlags().StringSlice("filter", nil, `comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'`)
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ octl [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
-h, --help help for octl
--jq string jq filter
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ OUTSCALE IaaS management
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_accesskey.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ accesskey commands
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_accesskey_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ octl iaas accesskey create [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_accesskey_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ octl iaas accesskey delete access_key_id [access_key_id]... [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_accesskey_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ octl iaas accesskey describe access_key_id [access_key_id]... [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_accesskey_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ octl iaas accesskey list [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_accesskey_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ octl iaas accesskey update access_key_id [access_key_id]... [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ account commands
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_account_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ octl iaas account create [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_account_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ octl iaas account list [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_adminpassword.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ adminpassword commands
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_adminpassword_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ octl iaas adminpassword list [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ iaas api calls
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_AcceptNetPeering.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ octl iaas api AcceptNetPeering [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_AddUserToUserGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ octl iaas api AddUserToUserGroup [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CheckAuthentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ octl iaas api CheckAuthentication [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateAccessKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ octl iaas api CreateAccessKey [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ octl iaas api CreateAccount [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateApiAccessRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ octl iaas api CreateApiAccessRule [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateCa.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ octl iaas api CreateCa [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateClientGateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ octl iaas api CreateClientGateway [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateDedicatedGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ octl iaas api CreateDedicatedGroup [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateDhcpOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ octl iaas api CreateDhcpOptions [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateDirectLink.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ octl iaas api CreateDirectLink [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ octl iaas api CreateDirectLinkInterface [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateFlexibleGpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ octl iaas api CreateFlexibleGpu [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
1 change: 1 addition & 0 deletions docs/reference/octl_iaas_api_CreateImage.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ octl iaas api CreateImage [flags]
```
-c, --columns string columns to display - [+]<title>:<jq query for content>||<title>:<jq query for content>
--config string Path of profile file (by default, ~/.osc/config.json)
--dry-run Display the request payload that would be sent to the API without sending it
--filter strings comma separated list of filters for results - name:value,name:value, alias for jq filter 'select(.name | tostring | test("value"))'
--jq string jq filter
--no-upgrade do not check for new versions
Expand Down
Loading
Loading