(ctx context.Context, databaseID string)
| 116 | } |
| 117 | |
| 118 | func DatabaseNetworkConfigurationShow(ctx context.Context, databaseID string) error { |
| 119 | c, err := config.ScalingoClient(ctx) |
| 120 | if err != nil { |
| 121 | return errors.Wrap(ctx, err, "get Scalingo client") |
| 122 | } |
| 123 | |
| 124 | networkConfiguration, err := c.Preview().DatabaseNetworkConfigurationShow(ctx, databaseID) |
| 125 | if err != nil { |
| 126 | return errors.Wrap(ctx, err, "show database network configuration") |
| 127 | } |
| 128 | |
| 129 | t := tablewriter.NewWriter(os.Stdout) |
| 130 | _ = t.Bulk([][]string{ |
| 131 | {"Outscale account ID", networkConfiguration.OutscaleAccountID}, |
| 132 | {"Outscale net ID", networkConfiguration.OutscaleNetID}, |
| 133 | {"IP range", networkConfiguration.IPRange}, |
| 134 | }) |
| 135 | _ = t.Render() |
| 136 | |
| 137 | return nil |
| 138 | } |
no test coverage detected