Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/ovhcloud_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Manage your projects and services in the Public Cloud universe (MKS, MPR, MRS, O
* [ovhcloud cloud alerting](ovhcloud_cloud_alerting.md) - Manage billing alert configurations in the given cloud project
* [ovhcloud cloud container-registry](ovhcloud_cloud_container-registry.md) - Manage container registries in the given cloud project
* [ovhcloud cloud database-service](ovhcloud_cloud_database-service.md) - Manage database services in the given cloud project
* [ovhcloud cloud floating-ip](ovhcloud_cloud_floating-ip.md) - Manage floating IPs in the given cloud project
* [ovhcloud cloud instance](ovhcloud_cloud_instance.md) - Manage instances in the given cloud project
* [ovhcloud cloud ip-failover](ovhcloud_cloud_ip-failover.md) - Manage failover IPs in the given cloud project
* [ovhcloud cloud kube](ovhcloud_cloud_kube.md) - Manage Kubernetes clusters in the given cloud project
Expand Down
38 changes: 38 additions & 0 deletions doc/ovhcloud_cloud_floating-ip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## ovhcloud cloud floating-ip

Manage floating IPs in the given cloud project

### Options

```
--cloud-project string Cloud project ID
-h, --help help for floating-ip
--region string Filter by region or specify the region of the floating IP
```

### Options inherited from parent commands

```
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud](ovhcloud_cloud.md) - Manage your projects and services in the Public Cloud universe (MKS, MPR, MRS, Object Storage...)
* [ovhcloud cloud floating-ip delete](ovhcloud_cloud_floating-ip_delete.md) - Delete a floating IP
* [ovhcloud cloud floating-ip get](ovhcloud_cloud_floating-ip_get.md) - Get information about a floating IP
* [ovhcloud cloud floating-ip list](ovhcloud_cloud_floating-ip_list.md) - List floating IPs

39 changes: 39 additions & 0 deletions doc/ovhcloud_cloud_floating-ip_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## ovhcloud cloud floating-ip delete

Delete a floating IP

```
ovhcloud cloud floating-ip delete <floating_ip_id> [flags]
```

### Options

```
-h, --help help for delete
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
--region string Filter by region or specify the region of the floating IP
```

### SEE ALSO

* [ovhcloud cloud floating-ip](ovhcloud_cloud_floating-ip.md) - Manage floating IPs in the given cloud project

39 changes: 39 additions & 0 deletions doc/ovhcloud_cloud_floating-ip_get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## ovhcloud cloud floating-ip get

Get information about a floating IP

```
ovhcloud cloud floating-ip get <floating_ip_id> [flags]
```

### Options

```
-h, --help help for get
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
--region string Filter by region or specify the region of the floating IP
```

### SEE ALSO

* [ovhcloud cloud floating-ip](ovhcloud_cloud_floating-ip.md) - Manage floating IPs in the given cloud project

46 changes: 46 additions & 0 deletions doc/ovhcloud_cloud_floating-ip_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## ovhcloud cloud floating-ip list

List floating IPs

```
ovhcloud cloud floating-ip list [flags]
```

### Options

```
--filter stringArray Filter results by any property using https://github.com/PaesslerAG/gval syntax
Examples:
--filter 'state="running"'
--filter 'name=~"^my.*"'
--filter 'nested.property.subproperty>10'
--filter 'startDate>="2023-12-01"'
--filter 'name=~"something" && nbField>10'
-h, --help help for list
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
--region string Filter by region or specify the region of the floating IP
```

### SEE ALSO

* [ovhcloud cloud floating-ip](ovhcloud_cloud_floating-ip.md) - Manage floating IPs in the given cloud project

4 changes: 2 additions & 2 deletions doc/ovhcloud_cloud_loadbalancer_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ There are three ways to define the parameters:

3. Using only CLI flags:

ovhcloud cloud loadbalancer create <region> --name my-lb --flavor <flavor_id>
ovhcloud cloud loadbalancer create <region> --name my-lb --size small


```
Expand All @@ -36,7 +36,6 @@ ovhcloud cloud loadbalancer create <region> [flags]

```
--editor Use a text editor to define parameters
--flavor string Flavor ID (can be retrieved with 'cloud reference loadbalancer list-flavors <region>')
--floating-ip string Floating IP ID to associate to the loadbalancer
--from-file string File containing parameters
--gateway string Gateway ID to associate to the loadbalancer
Expand All @@ -45,6 +44,7 @@ ovhcloud cloud loadbalancer create <region> [flags]
--name string Name of the loadbalancer
--network-id string Network ID
--replace Replace parameters file if it already exists
--size string Size of the loadbalancer (e.g. small, medium, large) or flavor UUID
--subnet-id string Subnet ID
```

Expand Down
2 changes: 1 addition & 1 deletion doc/ovhcloud_cloud_loadbalancer_edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ ovhcloud cloud loadbalancer edit <loadbalancer_id> [flags]
```
--description string Description of the loadbalancer
--editor Use a text editor to define parameters
--flavor string Flavor ID of the loadbalancer (can be retrieved with 'cloud reference loadbalancer list-flavors <region>')
-h, --help help for edit
--name string Name of the loadbalancer
--size string Size of the loadbalancer (e.g. small, medium, large) or flavor UUID
```

### Options inherited from parent commands
Expand Down
17 changes: 9 additions & 8 deletions doc/ovhcloud_cloud_loadbalancer_listener_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ ovhcloud cloud loadbalancer listener list [flags]
### Options

```
--filter stringArray Filter results by any property using https://github.com/PaesslerAG/gval syntax
Examples:
--filter 'state="running"'
--filter 'name=~"^my.*"'
--filter 'nested.property.subproperty>10'
--filter 'startDate>="2023-12-01"'
--filter 'name=~"something" && nbField>10'
-h, --help help for list
--filter stringArray Filter results by any property using https://github.com/PaesslerAG/gval syntax
Examples:
--filter 'state="running"'
--filter 'name=~"^my.*"'
--filter 'nested.property.subproperty>10'
--filter 'startDate>="2023-12-01"'
--filter 'name=~"something" && nbField>10'
-h, --help help for list
--loadbalancer-id string Filter listeners by loadbalancer ID
```

### Options inherited from parent commands
Expand Down
14 changes: 9 additions & 5 deletions doc/ovhcloud_cloud_loadbalancer_pool_member_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ ovhcloud cloud loadbalancer pool member create <pool_id> [flags]
### Options

```
--editor Use a text editor to define parameters
--from-file string File containing parameters
-h, --help help for create
--init-file string Create a file with example parameters
--replace Replace parameters file if it already exists
--address string IP address of the member
--editor Use a text editor to define parameters
--from-file string File containing parameters
-h, --help help for create
--init-file string Create a file with example parameters
--name string Name of the member
--protocol-port int Protocol port number of the member
--replace Replace parameters file if it already exists
--weight int Weight of the member (1-256)
```

### Options inherited from parent commands
Expand Down
43 changes: 43 additions & 0 deletions internal/cmd/cloud_floating_ip.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
//
// SPDX-License-Identifier: Apache-2.0

package cmd

import (
"github.com/ovh/ovhcloud-cli/internal/services/cloud"
"github.com/spf13/cobra"
)

func initCloudFloatingIPCommand(cloudCmd *cobra.Command) {
floatingIPCmd := &cobra.Command{
Use: "floating-ip",
Short: "Manage floating IPs in the given cloud project",
}
floatingIPCmd.PersistentFlags().StringVar(&cloud.CloudProject, "cloud-project", "", "Cloud project ID")
floatingIPCmd.PersistentFlags().StringVar(&cloud.CloudFloatingIPRegionFilter, "region", "", "Filter by region or specify the region of the floating IP")

floatingIPListCmd := &cobra.Command{
Use: "list",
Aliases: []string{"ls"},
Short: "List floating IPs",
Run: cloud.ListFloatingIPs,
}
floatingIPCmd.AddCommand(withFilterFlag(floatingIPListCmd))

floatingIPCmd.AddCommand(&cobra.Command{
Use: "get <floating_ip_id>",
Short: "Get information about a floating IP",
Run: cloud.GetFloatingIP,
Args: cobra.ExactArgs(1),
})

floatingIPCmd.AddCommand(&cobra.Command{
Use: "delete <floating_ip_id>",
Short: "Delete a floating IP",
Run: cloud.DeleteFloatingIP,
Args: cobra.ExactArgs(1),
})

cloudCmd.AddCommand(floatingIPCmd)
}
Loading
Loading